Skip to content

Commit

Permalink
add assertion to the test scenario
Browse files Browse the repository at this point in the history
  • Loading branch information
razvanvancea committed Oct 14, 2020
1 parent a47eeda commit 28af86b
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 0 deletions.
4 changes: 4 additions & 0 deletions page-objects-cypress/cypress/elements/pages/LoginPage.js
Original file line number Diff line number Diff line change
Expand Up @@ -10,4 +10,8 @@ export default class LoginPage {
getSubmitBtn() {
return cy.get("#submitLoginBtn");
}

getResponseMessage() {
return cy.get("#message");
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -13,5 +13,8 @@ describe("user actions suite", function () {
loginPage.getEmailField().type("[email protected]");
loginPage.getPasswordField().type("admin123");
loginPage.getSubmitBtn().click();
loginPage
.getResponseMessage()
.should("have.text", "You have successfully logged in!");
});
});

0 comments on commit 28af86b

Please sign in to comment.