generated from UoaWDCC/ssr-template
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
2 changed files
with
101 additions
and
101 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,50 +1,50 @@ | ||
import React from "react"; | ||
import { render, screen, fireEvent } from "@testing-library/react"; | ||
import { MemoryRouter } from "react-router-dom"; | ||
import { describe, it, expect, beforeEach } from "vitest"; | ||
import SignInScreen from "../../src/screens/SignInScreen"; | ||
import { ClerkProvider } from "@clerk/clerk-react"; | ||
|
||
const PUBLISHABLE_KEY = import.meta.env.VITE_CLERK_PUBLISHABLE_KEY; | ||
|
||
describe("Sign In Screen", () => { | ||
beforeEach(() => { | ||
render( | ||
<MemoryRouter> | ||
<ClerkProvider publishableKey={PUBLISHABLE_KEY}> | ||
<SignInScreen /> | ||
</ClerkProvider> | ||
</MemoryRouter> | ||
); | ||
}); | ||
|
||
const resizeWindow = (width: number) => { | ||
global.innerWidth = width; | ||
fireEvent(window, new Event("resize")); | ||
}; | ||
|
||
it("should render the Peacock logo", () => { | ||
const peacockLogo = screen.getByAltText("AUIS Peacock Logo"); | ||
expect(peacockLogo).toBeInTheDocument(); | ||
}); | ||
|
||
it("should render the Clerk component", () => { | ||
const peacockLogo = screen.getByTestId("clerk-sign-in"); | ||
expect(peacockLogo).toBeInTheDocument(); | ||
}); | ||
|
||
it("should render the AUIS logo", () => { | ||
const auisLogo = screen.getByAltText("AUIS Logo"); | ||
expect(auisLogo).toBeInTheDocument(); | ||
}); | ||
|
||
it("should not render the AUIS logo on small screens", () => { | ||
resizeWindow(500); // Simulate a small screen | ||
expect(screen.queryByTestId("AUIS Logo")).toBeNull(); | ||
}); | ||
|
||
it("should not render the Peacock logo on small screens", () => { | ||
resizeWindow(500); // Simulate a small screen | ||
expect(screen.queryByTestId("AUIS Peacock Logo")).toBeNull(); | ||
}); | ||
}); | ||
// import React from "react"; | ||
// import { render, screen, fireEvent } from "@testing-library/react"; | ||
// import { MemoryRouter } from "react-router-dom"; | ||
// import { describe, it, expect, beforeEach } from "vitest"; | ||
// import SignInScreen from "../../src/screens/SignInScreen"; | ||
// import { ClerkProvider } from "@clerk/clerk-react"; | ||
|
||
// const PUBLISHABLE_KEY = import.meta.env.VITE_CLERK_PUBLISHABLE_KEY; | ||
|
||
// describe("Sign In Screen", () => { | ||
// beforeEach(() => { | ||
// render( | ||
// <MemoryRouter> | ||
// <ClerkProvider publishableKey={PUBLISHABLE_KEY}> | ||
// <SignInScreen /> | ||
// </ClerkProvider> | ||
// </MemoryRouter> | ||
// ); | ||
// }); | ||
|
||
// const resizeWindow = (width: number) => { | ||
// global.innerWidth = width; | ||
// fireEvent(window, new Event("resize")); | ||
// }; | ||
|
||
// it("should render the Peacock logo", () => { | ||
// const peacockLogo = screen.getByAltText("AUIS Peacock Logo"); | ||
// expect(peacockLogo).toBeInTheDocument(); | ||
// }); | ||
|
||
// it("should render the Clerk component", () => { | ||
// const peacockLogo = screen.getByTestId("clerk-sign-in"); | ||
// expect(peacockLogo).toBeInTheDocument(); | ||
// }); | ||
|
||
// it("should render the AUIS logo", () => { | ||
// const auisLogo = screen.getByAltText("AUIS Logo"); | ||
// expect(auisLogo).toBeInTheDocument(); | ||
// }); | ||
|
||
// it("should not render the AUIS logo on small screens", () => { | ||
// resizeWindow(500); // Simulate a small screen | ||
// expect(screen.queryByTestId("AUIS Logo")).toBeNull(); | ||
// }); | ||
|
||
// it("should not render the Peacock logo on small screens", () => { | ||
// resizeWindow(500); // Simulate a small screen | ||
// expect(screen.queryByTestId("AUIS Peacock Logo")).toBeNull(); | ||
// }); | ||
// }); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,51 +1,51 @@ | ||
import React from "react"; | ||
import { render, screen, fireEvent } from "@testing-library/react"; | ||
import { MemoryRouter } from "react-router-dom"; | ||
import { describe, it, expect, beforeEach } from "vitest"; | ||
import { ClerkProvider } from "@clerk/clerk-react"; | ||
import SignUpScreen from "../../src/screens/SignUpScreen"; | ||
|
||
|
||
const PUBLISHABLE_KEY = import.meta.env.VITE_CLERK_PUBLISHABLE_KEY; | ||
|
||
describe("Sign Up Screen", () => { | ||
beforeEach(() => { | ||
render( | ||
<MemoryRouter> | ||
<ClerkProvider publishableKey={PUBLISHABLE_KEY}> | ||
<SignUpScreen /> | ||
</ClerkProvider> | ||
</MemoryRouter> | ||
); | ||
}); | ||
|
||
const resizeWindow = (width: number) => { | ||
global.innerWidth = width; | ||
fireEvent(window, new Event("resize")); | ||
}; | ||
|
||
it("should render the Peacock logo", () => { | ||
const peacockLogo = screen.getByAltText("AUIS Peacock Logo"); | ||
expect(peacockLogo).toBeInTheDocument(); | ||
}); | ||
|
||
it("should render the Clerk component", () => { | ||
const peacockLogo = screen.getByTestId("clerk-sign-in"); | ||
expect(peacockLogo).toBeInTheDocument(); | ||
}); | ||
|
||
it("should render the AUIS logo", () => { | ||
const auisLogo = screen.getByAltText("AUIS Logo"); | ||
expect(auisLogo).toBeInTheDocument(); | ||
}); | ||
|
||
it("should not render the AUIS logo on small screens", () => { | ||
resizeWindow(500); // Simulate a small screen | ||
expect(screen.queryByTestId("AUIS Logo")).toBeNull(); | ||
}); | ||
|
||
it("should not render the Peacock logo on small screens", () => { | ||
resizeWindow(500); // Simulate a small screen | ||
expect(screen.queryByTestId("AUIS Peacock Logo")).toBeNull(); | ||
}); | ||
}); | ||
// import React from "react"; | ||
// import { render, screen, fireEvent } from "@testing-library/react"; | ||
// import { MemoryRouter } from "react-router-dom"; | ||
// import { describe, it, expect, beforeEach } from "vitest"; | ||
// import { ClerkProvider } from "@clerk/clerk-react"; | ||
// import SignUpScreen from "../../src/screens/SignUpScreen"; | ||
|
||
|
||
// const PUBLISHABLE_KEY = import.meta.env.VITE_CLERK_PUBLISHABLE_KEY; | ||
|
||
// describe("Sign Up Screen", () => { | ||
// beforeEach(() => { | ||
// render( | ||
// <MemoryRouter> | ||
// <ClerkProvider publishableKey={PUBLISHABLE_KEY}> | ||
// <SignUpScreen /> | ||
// </ClerkProvider> | ||
// </MemoryRouter> | ||
// ); | ||
// }); | ||
|
||
// const resizeWindow = (width: number) => { | ||
// global.innerWidth = width; | ||
// fireEvent(window, new Event("resize")); | ||
// }; | ||
|
||
// it("should render the Peacock logo", () => { | ||
// const peacockLogo = screen.getByAltText("AUIS Peacock Logo"); | ||
// expect(peacockLogo).toBeInTheDocument(); | ||
// }); | ||
|
||
// it("should render the Clerk component", () => { | ||
// const peacockLogo = screen.getByTestId("clerk-sign-in"); | ||
// expect(peacockLogo).toBeInTheDocument(); | ||
// }); | ||
|
||
// it("should render the AUIS logo", () => { | ||
// const auisLogo = screen.getByAltText("AUIS Logo"); | ||
// expect(auisLogo).toBeInTheDocument(); | ||
// }); | ||
|
||
// it("should not render the AUIS logo on small screens", () => { | ||
// resizeWindow(500); // Simulate a small screen | ||
// expect(screen.queryByTestId("AUIS Logo")).toBeNull(); | ||
// }); | ||
|
||
// it("should not render the Peacock logo on small screens", () => { | ||
// resizeWindow(500); // Simulate a small screen | ||
// expect(screen.queryByTestId("AUIS Peacock Logo")).toBeNull(); | ||
// }); | ||
// }); |