From: Sarthak0702 Date: Mon, 11 Apr 2022 18:35:34 +0000 (+0530) Subject: mgr/dashboard:Add cypress env for login credentials X-Git-Tag: v18.0.0~1070^2 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=refs%2Fpull%2F45859%2Fhead;p=ceph.git mgr/dashboard:Add cypress env for login credentials Fixes: https://tracker.ceph.com/issues/55270 Signed-off-by: Sarthak0702 --- diff --git a/src/pybind/mgr/dashboard/frontend/cypress.json b/src/pybind/mgr/dashboard/frontend/cypress.json index fae585389f6c..fa21e890f711 100644 --- a/src/pybind/mgr/dashboard/frontend/cypress.json +++ b/src/pybind/mgr/dashboard/frontend/cypress.json @@ -18,5 +18,9 @@ "mochaFile": "cypress/reports/results-[hash].xml" } }, - "retries": 1 + "retries": 1, + "env": { + "LOGIN_USER": "admin", + "LOGIN_PASSWORD": "admin" + } } diff --git a/src/pybind/mgr/dashboard/frontend/cypress/support/commands.ts b/src/pybind/mgr/dashboard/frontend/cypress/support/commands.ts index aa8cbb96994c..9d0028ea54e6 100644 --- a/src/pybind/mgr/dashboard/frontend/cypress/support/commands.ts +++ b/src/pybind/mgr/dashboard/frontend/cypress/support/commands.ts @@ -26,8 +26,8 @@ const fillAuth = () => { }; Cypress.Commands.add('login', () => { - const username = Cypress.env('LOGIN_USER') || 'admin'; - const password = Cypress.env('LOGIN_PWD') || 'admin'; + const username = Cypress.env('LOGIN_USER'); + const password = Cypress.env('LOGIN_PWD'); if (auth === undefined) { cy.request({