From af088730e87e571af327e410a74632ba46914766 Mon Sep 17 00:00:00 2001 From: chreamy Date: Wed, 17 Jan 2024 22:02:39 -0600 Subject: [PATCH] fix: issue #96 --- tests/cypress.config.js | 8 ++++---- tests/package.json | 4 ++-- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/tests/cypress.config.js b/tests/cypress.config.js index 40f6724..b2bb72e 100644 --- a/tests/cypress.config.js +++ b/tests/cypress.config.js @@ -6,8 +6,8 @@ const getConfig = (key, defaultValue) => { return process.env[key] || defaultValue } -const getOrFail = (key, defaultValue=undefined) => { - const value = getConfig(key, defaultValue) +const getOrFail = (key) => { + const value = getConfig(key) if (!value) { throw new Error(`Missing required environment variable ${key}`) } @@ -25,8 +25,8 @@ module.exports = defineConfig({ retries: { runMode: 5, openMode: 5 }, }, env: { - defaultAccount: getOrFail('TESTING_USERNAME', 'alex'), - defaultPassword: getOrFail('TESTING_PASSWORD', 'Alex1234'), + defaultAccount: getOrFail('TESTING_USERNAME'), + defaultPassword: getOrFail('TESTING_PASSWORD'), isCHVersion: true, // google_username: process.env.GOOGLE_USERNAME, // google_password: process.env.GOOGLE_PASSWORD, diff --git a/tests/package.json b/tests/package.json index d7a5065..550544c 100644 --- a/tests/package.json +++ b/tests/package.json @@ -5,8 +5,8 @@ "main": "index.js", "license": "MIT", "scripts": { - "test": "cypress run", - "test:open": "cypress open" + "test": "export TESTING_USERNAME=alex && export TESTING_PASSWORD=Alex1234 && cypress run", + "test:open": "export TESTING_USERNAME=alex && export TESTING_PASSWORD=Alex1234 && cypress open" }, "dependencies": { "@testing-library/cypress": "^10.0.1",