Skip to content

Commit c3d8207

Browse files
committed
fix tests
1 parent 9104fce commit c3d8207

File tree

2 files changed

+7
-2
lines changed

2 files changed

+7
-2
lines changed

site/src/modules/dashboard/Navbar/Navbar.test.tsx

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
import { render, screen, waitFor } from "@testing-library/react";
2+
import userEvent from "@testing-library/user-event";
23
import { HttpResponse, http } from "msw";
34
import { App } from "App";
45
import {
@@ -21,6 +22,8 @@ describe("Navbar", () => {
2122
}),
2223
);
2324
render(<App />);
25+
const deploymentMenu = await screen.findByText("Deployment");
26+
await userEvent.click(deploymentMenu);
2427
await waitFor(
2528
() => {
2629
const link = screen.getByText(Language.audit);
@@ -34,6 +37,8 @@ describe("Navbar", () => {
3437
// by default, user is an Admin with permission to see the audit log,
3538
// but is unlicensed so not entitled to see the audit log
3639
render(<App />);
40+
const deploymentMenu = await screen.findByText("Deployment");
41+
await userEvent.click(deploymentMenu);
3742
await waitFor(
3843
() => {
3944
const link = screen.queryByText(Language.audit);
@@ -59,7 +64,7 @@ describe("Navbar", () => {
5964
render(<App />);
6065
await waitFor(
6166
() => {
62-
const link = screen.queryByText(Language.audit);
67+
const link = screen.queryByText("Deployment");
6368
expect(link).toBe(null);
6469
},
6570
{ timeout: 2000 },

site/src/modules/dashboard/Navbar/NavbarView.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ export const Language = {
4040
workspaces: "Workspaces",
4141
templates: "Templates",
4242
users: "Users",
43-
audit: "Audit",
43+
audit: "Auditing",
4444
deployment: "Settings",
4545
};
4646

0 commit comments

Comments
 (0)