Skip to content

Commit

Permalink
Update LoginPage.ts
Browse files Browse the repository at this point in the history
  • Loading branch information
Kaushikgtm authored Nov 29, 2024
1 parent 22ab14b commit 1a3b7b9
Showing 1 changed file with 7 additions and 5 deletions.
12 changes: 7 additions & 5 deletions cypress/pageobject/Login/LoginPage.ts
Original file line number Diff line number Diff line change
Expand Up @@ -63,8 +63,9 @@ class LoginPage {
}) {
Object.entries(languageMappings).forEach(([languageCode, expectedText]) => {
this.selectLanguage(languageCode);
cy.wait(500);
this.verifySubmitButtonText(expectedText);
+ cy.get(this.submitButtonSelector, { timeout: 10000 })
+ .should("be.visible")
+ .and("have.text", expectedText);
});
}

Expand All @@ -78,9 +79,10 @@ class LoginPage {

switchLanguageAndVerifySidebars(languageMappings: { [key: string]: string }) {
Object.entries(languageMappings).forEach(([languageCode, expectedText]) => {
this.selectSidebarLanguage(languageCode);
cy.wait(500);
this.verifySidebarText(expectedText);
this.selectLanguage(languageCode);
cy.get(this.sidebarSelector, { timeout: 10000 })
+ .should("be.visible")
+ .and("have.text", expectedText);
});
}
}
Expand Down

0 comments on commit 1a3b7b9

Please sign in to comment.