Skip to content

Commit

Permalink
UADS-53 fix: Fixed build error in incorrect test files
Browse files Browse the repository at this point in the history
  • Loading branch information
Harsheel12 committed Jun 27, 2024
1 parent 6de6c62 commit dbe5490
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 3 deletions.
2 changes: 2 additions & 0 deletions web/src/components/__tests__/ExecCard.test.tsx
Original file line number Diff line number Diff line change
@@ -1,11 +1,13 @@
import { render, screen } from "@testing-library/react";
import "@testing-library/jest-dom";
import ExecCard, { ExecDataType } from "../ExecCard";
import execImage from "../../assets/placeholder.png"

describe("Exec Card Component", () => {
const exec: ExecDataType = {
name: "Kai Hirafune",
role: "President",
image: execImage
};

it("Renders the ExecCard component with correct name and role", () => {
Expand Down
4 changes: 3 additions & 1 deletion web/src/pages/__tests__/About.test.tsx
Original file line number Diff line number Diff line change
@@ -1,14 +1,16 @@
import { render, screen, waitFor } from "@testing-library/react";
import { render, screen } from "@testing-library/react";
import { MemoryRouter } from "react-router-dom";
import "@testing-library/jest-dom";
import About from "../About";
import icecream from "../../assets/ice-cream.svg";

/*
// Helper function to change viewport size
const setViewport = (width: number) => {
window.innerWidth = width;
window.dispatchEvent(new Event("resize"));
};
*/

/*
* Test suite to test if the elements in the About Page are rendered correctly
Expand Down
6 changes: 4 additions & 2 deletions web/src/pages/__tests__/Event.test.tsx
Original file line number Diff line number Diff line change
@@ -1,10 +1,11 @@
import { render, screen, fireEvent, waitFor } from "@testing-library/react";
import { render, screen } from "@testing-library/react";
import { MemoryRouter } from "react-router-dom";
import "@testing-library/jest-dom";
import Event from "../Event";
import cupcake from "../../assets/cupcake.svg";
import eventBackground from "../../assets/event.jpg";
//import eventBackground from "../../assets/event.jpg";

/*
const eventsData = [
{
name: "Meet and Greet",
Expand All @@ -19,6 +20,7 @@ const eventsData = [
image: eventBackground,
},
];
*/

/*
* Test suite to test if the elements in the Event Page are rendered correctly
Expand Down

0 comments on commit dbe5490

Please sign in to comment.