Skip to content

Commit

Permalink
new tests to check popup message and constants file created to store …
Browse files Browse the repository at this point in the history
…data
  • Loading branch information
mflorlorenzo committed Jul 9, 2024
1 parent faa7a4f commit 01c6e9e
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 0 deletions.
8 changes: 8 additions & 0 deletions cypress/e2e/specs/home.cy.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
import { onHomepage } from "../../support/page_objects/homepage.js";
import selectors from "../../fixtures/index.json";
import urls from "../../fixtures/urls.json";
import constants from "../../fixtures/constants.json";

context("Cat Web", () => {
describe("Homepage: ", { tags: "smoke" }, () => {
Expand All @@ -13,5 +14,12 @@ context("Cat Web", () => {
.should("have.attr", "src")
.should("include", urls.logoImg);
});

it("Popup should exists, be visible and have specific text", () => {
cy.get(selectors.homePopupClass).should(
"have.text",
constants.popupMessage
);
});
});
});
3 changes: 3 additions & 0 deletions cypress/fixtures/constants.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
{
"popupMessage": "Too many ads? Join our community of cat lovers now to reduce ads by 90%! Click here to join for free!"
}

0 comments on commit 01c6e9e

Please sign in to comment.