Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
25 changes: 25 additions & 0 deletions cypress/e2e/products.cy.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
describe("Homepage functionality and products visibility", () => {
beforeEach(() => {
cy.visit("../../index.html");
});

it("should have 'Urban Grace' as the page title", () => {
cy.title().should("equal", "Urban Grace");
});

it("should have at least one product displayed in the products container", () => {
cy.get("#products-container .product-container")
.its("length")
.should("be.greaterThan", 0);
});

it("should render product cards with all details", () => {
cy.get("#products-container").each(($product) => {
cy.wrap($product).find(".product-image").should("be.visible");
cy.wrap($product).find(".product-title").should("be.visible");
cy.wrap($product).find(".product-category").should("be.visible");
cy.wrap($product).find(".product-price").should("be.visible");
cy.wrap($product).find(".add-to-cart").should("be.visible");
});
});
});
1 change: 0 additions & 1 deletion index.html
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta name="description" content="Urban Grace - Discover our latest range of products including women's clothing, jewelry, and more. Enjoy special discounts and early access as a community member.">
<title>Urban Grace</title>
<title>Urban Grace</title>
<link rel="preconnect" href="https://fonts.googleapis.com">
<link rel="preconnect" href="https://fonts.gstatic.com" crossorigin>
<link href="https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700;800&display=swap" rel="stylesheet">
Expand Down