]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
mgr/dashboard:Add cypress env for login credentials 45859/head
authorSarthak0702 <sarthak.dev.0702@gmail.com>
Mon, 11 Apr 2022 18:35:34 +0000 (00:05 +0530)
committerSarthak0702 <sarthak.dev.0702@gmail.com>
Mon, 11 Apr 2022 18:37:30 +0000 (00:07 +0530)
Fixes: https://tracker.ceph.com/issues/55270
Signed-off-by: Sarthak0702 <sarthak.dev.0702@gmail.com>
src/pybind/mgr/dashboard/frontend/cypress.json
src/pybind/mgr/dashboard/frontend/cypress/support/commands.ts

index fae585389f6c723cc725c4e86e9ec340e6222622..fa21e890f711abfe42cf3c2e9cee40f0526cba67 100644 (file)
@@ -18,5 +18,9 @@
       "mochaFile": "cypress/reports/results-[hash].xml"
     }
   },
-  "retries": 1
+  "retries": 1,
+  "env": {
+    "LOGIN_USER": "admin",
+    "LOGIN_PASSWORD": "admin"
+  }
 }
index aa8cbb96994c6cf20d9b376ff88e5eb9571b6e77..9d0028ea54e63003f0aa54706077971b4b07869f 100644 (file)
@@ -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({