-
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
1 parent
f26d5a0
commit a0815bc
Showing
2 changed files
with
41 additions
and
3 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 |
---|---|---|
@@ -0,0 +1,33 @@ | ||
import React from "react"; | ||
import { render, screen } from "@testing-library/react"; | ||
import "@testing-library/jest-dom"; | ||
import LoadingPage from "./LoadingPage"; | ||
|
||
describe("LoadingPage", () => { | ||
it("renders without crashing", () => { | ||
render(<LoadingPage />); | ||
expect(screen.getByText("Loading...")).toBeInTheDocument(); | ||
}); | ||
|
||
it("displays the flamingo icon with correct styling", () => { | ||
render(<LoadingPage />); | ||
const flamingoIcon = screen.getByTestId("flamingo-icon"); | ||
expect(flamingoIcon).toBeInTheDocument(); | ||
expect(flamingoIcon).toHaveClass("text-white text-8xl animate-flip"); | ||
}); | ||
|
||
it("displays the loading text with correct styling", () => { | ||
render(<LoadingPage />); | ||
const loadingText = screen.getByText("Loading..."); | ||
expect(loadingText).toBeInTheDocument(); | ||
expect(loadingText).toHaveClass("text-lg text-white mt-4"); | ||
}); | ||
|
||
it("has the correct background styling", () => { | ||
render(<LoadingPage />); | ||
const container = screen.getByTestId("loading-container"); | ||
expect(container).toHaveClass( | ||
"bg-pink-700 flex flex-col items-center justify-center h-screen bg-gray-100", | ||
); | ||
}); | ||
}); |
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