From e9128c4cbf5795a7f098d98016f5364babb2aea5 Mon Sep 17 00:00:00 2001 From: Sarthak0702 Date: Tue, 12 Apr 2022 00:05:34 +0530 Subject: [PATCH] mgr/dashboard:Add cypress env for login credentials Fixes: https://tracker.ceph.com/issues/55270 Signed-off-by: Sarthak0702 --- src/pybind/mgr/dashboard/frontend/cypress.json | 6 +++++- .../mgr/dashboard/frontend/cypress/support/commands.ts | 4 ++-- 2 files changed, 7 insertions(+), 3 deletions(-) diff --git a/src/pybind/mgr/dashboard/frontend/cypress.json b/src/pybind/mgr/dashboard/frontend/cypress.json index fae585389f6c7..fa21e890f711a 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 aa8cbb96994c6..9d0028ea54e63 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({ -- 2.39.5