From 4b9c7de0313fb24834a92389d8b5a960678e6d67 Mon Sep 17 00:00:00 2001 From: chreamy Date: Wed, 17 Jan 2024 21:55:52 -0600 Subject: [PATCH] fix: issue #96 --- example.env | 5 ----- tests/cypress.config.js | 8 ++++---- 2 files changed, 4 insertions(+), 9 deletions(-) delete mode 100644 example.env diff --git a/example.env b/example.env deleted file mode 100644 index 03f5ea8..0000000 --- a/example.env +++ /dev/null @@ -1,5 +0,0 @@ -BASE_URL=https://example.com -GOOGLE_CLIENT_ID= -GOOGLE_CLIENT_SECRET= -GITHUB_CLIENT_ID= -GITNUB_CLIENT_SECRET= diff --git a/tests/cypress.config.js b/tests/cypress.config.js index b2bb72e..40f6724 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) => { - const value = getConfig(key) +const getOrFail = (key, defaultValue=undefined) => { + const value = getConfig(key, defaultValue) 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'), - defaultPassword: getOrFail('TESTING_PASSWORD'), + defaultAccount: getOrFail('TESTING_USERNAME', 'alex'), + defaultPassword: getOrFail('TESTING_PASSWORD', 'Alex1234'), isCHVersion: true, // google_username: process.env.GOOGLE_USERNAME, // google_password: process.env.GOOGLE_PASSWORD,