mirror of
https://github.com/AmruthPillai/Reactive-Resume.git
synced 2026-07-27 02:14:50 +10:00
fix: polish ai agent and command palette
This commit is contained in:
@@ -1,17 +1,27 @@
|
||||
// @vitest-environment happy-dom
|
||||
|
||||
import { readFileSync } from "node:fs";
|
||||
import { render, screen } from "@testing-library/react";
|
||||
import { describe, expect, it } from "vitest";
|
||||
import { LoadingScreen } from "./loading-screen";
|
||||
|
||||
describe("LoadingScreen", () => {
|
||||
it("renders the Reactive Resume logo and spinner", () => {
|
||||
it("renders the Reactive Resume icon and spinner", () => {
|
||||
render(<LoadingScreen />);
|
||||
|
||||
expect(screen.getAllByAltText("Reactive Resume")).toHaveLength(2);
|
||||
const icons = screen.getAllByAltText("Reactive Resume");
|
||||
expect(icons).toHaveLength(2);
|
||||
expect(icons.map((icon) => icon.getAttribute("src"))).toEqual(["/icon/dark.svg", "/icon/light.svg"]);
|
||||
expect(screen.getByLabelText("Loading")).toBeInTheDocument();
|
||||
});
|
||||
|
||||
it("uses the same icon asset as the initial HTML loader", () => {
|
||||
const html = readFileSync("index.html", "utf8");
|
||||
|
||||
expect(html).toContain('src="/icon/dark.svg"');
|
||||
expect(html).not.toContain('src="/logo/dark.svg"');
|
||||
});
|
||||
|
||||
it("fills the viewport (fixed inset-0)", () => {
|
||||
const { container } = render(<LoadingScreen />);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user