Skip to content

Commit

Permalink
Replaced overly specific selector with a more maintainable and concis…
Browse files Browse the repository at this point in the history
…e version
  • Loading branch information
Bahati308 committed Jan 18, 2025
1 parent 808384b commit 654db95
Showing 1 changed file with 4 additions and 6 deletions.
10 changes: 4 additions & 6 deletions frontend/cypress/e2e/login.cy.js
Original file line number Diff line number Diff line change
Expand Up @@ -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");
}
Expand Down

0 comments on commit 654db95

Please sign in to comment.