Skip to content

Commit 7dd27ca

Browse files
committed
.
1 parent 8534bf7 commit 7dd27ca

File tree

6 files changed

+13
-14
lines changed

6 files changed

+13
-14
lines changed

AGENTS.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -352,7 +352,7 @@ describe("Component", () => {
352352
it("does something", async () => {
353353
render(<Component />);
354354
await waitFor(() => {
355-
expect(screen.getByText("Expected")).toBeInTheDocument();
355+
expect(screen.getByText("Expected")).toBeVisible();
356356
});
357357
});
358358
});

src/app/catalog/[repoName]/[serverName]/[version]/not-found.test.tsx

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -8,15 +8,15 @@ describe("NotFound", () => {
88

99
expect(
1010
screen.getByRole("heading", { name: /server not found/i }),
11-
).toBeInTheDocument();
11+
).toBeVisible();
1212
});
1313

1414
it("displays a descriptive message", () => {
1515
render(<NotFound />);
1616

1717
expect(
1818
screen.getByText(/doesn't exist or has been removed/i),
19-
).toBeInTheDocument();
19+
).toBeVisible();
2020
});
2121

2222
it("has a link to browse the catalog", () => {
@@ -29,13 +29,13 @@ describe("NotFound", () => {
2929
it("has a back button", () => {
3030
render(<NotFound />);
3131

32-
expect(screen.getByRole("button", { name: /back/i })).toBeInTheDocument();
32+
expect(screen.getByRole("button", { name: /back/i })).toBeVisible();
3333
});
3434

3535
it("displays a decorative illustration", () => {
3636
const { container } = render(<NotFound />);
3737

3838
const svg = container.querySelector("svg[aria-hidden='true']");
39-
expect(svg).toBeInTheDocument();
39+
expect(svg).toBeVisible();
4040
});
4141
});

src/app/catalog/components/__tests__/servers-wrapper.test.tsx

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -161,7 +161,6 @@ describe("ServersWrapper", () => {
161161
const awsCanvas = screen.queryByText("aws-nova-canvas");
162162
const googleApps = screen.queryByText("google-applications");
163163

164-
expect(awsCanvas).toBeInTheDocument();
165164
expect(awsCanvas).toBeVisible();
166165
expect(googleApps).not.toBeInTheDocument();
167166
});

src/app/catalog/components/__tests__/servers.test.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -224,7 +224,7 @@ describe("Servers", () => {
224224
/>,
225225
);
226226

227-
expect(container.querySelector("svg")).toBeInTheDocument();
227+
expect(container.querySelector("svg")).toBeVisible();
228228
});
229229

230230
it("does not show clear search button when no servers and no search", () => {

src/app/not-found.test.tsx

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -12,15 +12,15 @@ describe("NotFound (root)", () => {
1212

1313
expect(
1414
screen.getByRole("heading", { name: /page not found/i }),
15-
).toBeInTheDocument();
15+
).toBeVisible();
1616
});
1717

1818
it("displays a generic error message", async () => {
1919
render(await NotFound());
2020

2121
expect(
2222
screen.getByText(/the page you're looking for doesn't exist/i),
23-
).toBeInTheDocument();
23+
).toBeVisible();
2424
});
2525

2626
it("has a link to browse the catalog", async () => {
@@ -42,12 +42,12 @@ describe("NotFound (root)", () => {
4242
const { container } = render(await NotFound());
4343

4444
const svg = container.querySelector("svg[aria-hidden='true']");
45-
expect(svg).toBeInTheDocument();
45+
expect(svg).toBeVisible();
4646
});
4747

4848
it("displays the navbar", async () => {
4949
render(await NotFound());
5050

51-
expect(screen.getByTestId("navbar")).toBeInTheDocument();
51+
expect(screen.getByTestId("navbar")).toBeVisible();
5252
});
5353
});

src/components/user-menu/user-menu.test.tsx

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -49,9 +49,9 @@ describe("UserMenu", () => {
4949
const trigger = screen.getByRole("button", { name: /test user/i });
5050
await user.click(trigger);
5151

52-
expect(screen.getByText(/light mode/i)).toBeInTheDocument();
53-
expect(screen.getByText(/dark mode/i)).toBeInTheDocument();
54-
expect(screen.getByText(/use system settings/i)).toBeInTheDocument();
52+
expect(screen.getByText(/light mode/i)).toBeVisible();
53+
expect(screen.getByText(/dark mode/i)).toBeVisible();
54+
expect(screen.getByText(/use system settings/i)).toBeVisible();
5555
});
5656

5757
it.each([

0 commit comments

Comments
 (0)