Skip to content

Commit

Permalink
Add a starting point for cypress tests
Browse files Browse the repository at this point in the history
Fixes #17
  • Loading branch information
magdapoppins committed Apr 4, 2022
1 parent d3ff158 commit a50462c
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 1 deletion.
2 changes: 1 addition & 1 deletion components/pages/Homepage/EventCard.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,7 @@ const Category = ({ category }: CategoryProps) => {

export const EventCard = ({ event }: EventCardProps) => {
return (
<div className={styles["event-card"]}>
<div className={`${styles["event-card"]} eventcard`}>
<div className={styles["image-container"]}>
{/* TODO:
We skip next/image for now to be able to export fully static build.
Expand Down
9 changes: 9 additions & 0 deletions cypress/fixtures/landingpage.spec.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
describe("the landing page", () => {
beforeEach(() => {
cy.visit("/");
});
it("displays a list of events", () => {
cy.contains("Tapahtumat");
cy.get("div").find(".eventcard").its("length").should("be.gt", 0);
});
});

0 comments on commit a50462c

Please sign in to comment.