From 654db9581213cdec08dc3641ba9178924e7d93da Mon Sep 17 00:00:00 2001 From: Brian308 Date: Sat, 18 Jan 2025 23:07:20 +0300 Subject: [PATCH] Replaced overly specific selector with a more maintainable and concise version --- frontend/cypress/e2e/login.cy.js | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/frontend/cypress/e2e/login.cy.js b/frontend/cypress/e2e/login.cy.js index 5d91ab5eab..dd5bcc441b 100755 --- a/frontend/cypress/e2e/login.cy.js +++ b/frontend/cypress/e2e/login.cy.js @@ -45,12 +45,10 @@ describe("Failing or Succeeding to Login", function () { login.signIn(); if (user.correctPass === true) { - cy.get("header#mainHeader > button[title='Open menu']") - .should("exist") - .and( - "span:nth-of-type(3) > .cds--btn.cds--btn--icon-only.cds--btn--primary.cds--header__action > svg > path:nth-of-type(1)", - "exist", - ); + cy.get("header#mainHeader > button[title='Open menu']").should( + "exist", + ); + cy.get(".custom-action svg path:first-of-type").should("exist"); } else { cy.get("div[role='status']").should("be.visible"); }