Skip to content

Commit ccc664d

Browse files
authored
chore: rename 'Deployment' button to 'Administration' (coder#14240)
* chore: rename 'Deployment' button to 'Administration' Reword "Auditing" to a noun like the rest of the dropdowns
1 parent f1feb40 commit ccc664d

File tree

5 files changed

+17
-11
lines changed

5 files changed

+17
-11
lines changed

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

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,7 @@ export const DeploymentDropdown: FC<DeploymentDropdownProps> = ({
5252
/>
5353
}
5454
>
55-
Deployment
55+
Administration
5656
</Button>
5757
</PopoverTrigger>
5858

@@ -128,7 +128,7 @@ const DeploymentDropdownContent: FC<DeploymentDropdownProps> = ({
128128
css={styles.menuItem}
129129
onClick={onPopoverClose}
130130
>
131-
Auditing
131+
Audit Logs
132132
</MenuItem>
133133
)}
134134
{canViewHealth && (

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

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ describe("Navbar", () => {
2222
}),
2323
);
2424
render(<App />);
25-
const deploymentMenu = await screen.findByText("Deployment");
25+
const deploymentMenu = await screen.findByText("Administration");
2626
await userEvent.click(deploymentMenu);
2727
await waitFor(
2828
() => {
@@ -37,7 +37,7 @@ describe("Navbar", () => {
3737
// by default, user is an Admin with permission to see the audit log,
3838
// but is unlicensed so not entitled to see the audit log
3939
render(<App />);
40-
const deploymentMenu = await screen.findByText("Deployment");
40+
const deploymentMenu = await screen.findByText("Administration");
4141
await userEvent.click(deploymentMenu);
4242
await waitFor(
4343
() => {

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

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,9 @@ type Story = StoryObj<typeof NavbarView>;
2626
export const ForAdmin: Story = {
2727
play: async ({ canvasElement }) => {
2828
const canvas = within(canvasElement);
29-
await userEvent.click(canvas.getByRole("button", { name: "Deployment" }));
29+
await userEvent.click(
30+
canvas.getByRole("button", { name: "Administration" }),
31+
);
3032
},
3133
};
3234

@@ -41,7 +43,9 @@ export const ForAuditor: Story = {
4143
},
4244
play: async ({ canvasElement }) => {
4345
const canvas = within(canvasElement);
44-
await userEvent.click(canvas.getByRole("button", { name: "Deployment" }));
46+
await userEvent.click(
47+
canvas.getByRole("button", { name: "Administration" }),
48+
);
4549
},
4650
};
4751

@@ -56,7 +60,9 @@ export const ForOrgAdmin: Story = {
5660
},
5761
play: async ({ canvasElement }) => {
5862
const canvas = within(canvasElement);
59-
await userEvent.click(canvas.getByRole("button", { name: "Deployment" }));
63+
await userEvent.click(
64+
canvas.getByRole("button", { name: "Administration" }),
65+
);
6066
},
6167
};
6268

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

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -69,7 +69,7 @@ describe("NavbarView", () => {
6969
canViewAuditLog
7070
/>,
7171
);
72-
const deploymentMenu = await screen.findByText("Deployment");
72+
const deploymentMenu = await screen.findByText("Administration");
7373
await userEvent.click(deploymentMenu);
7474
const userLink = await screen.findByText(navLanguage.users);
7575
expect((userLink as HTMLAnchorElement).href).toContain("/users");
@@ -88,7 +88,7 @@ describe("NavbarView", () => {
8888
canViewAuditLog
8989
/>,
9090
);
91-
const deploymentMenu = await screen.findByText("Deployment");
91+
const deploymentMenu = await screen.findByText("Administration");
9292
await userEvent.click(deploymentMenu);
9393
const auditLink = await screen.findByText(navLanguage.audit);
9494
expect((auditLink as HTMLAnchorElement).href).toContain("/audit");
@@ -107,7 +107,7 @@ describe("NavbarView", () => {
107107
canViewAuditLog
108108
/>,
109109
);
110-
const deploymentMenu = await screen.findByText("Deployment");
110+
const deploymentMenu = await screen.findByText("Administration");
111111
await userEvent.click(deploymentMenu);
112112
const deploymentSettingsLink = await screen.findByText(
113113
navLanguage.deployment,

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ export const Language = {
3131
workspaces: "Workspaces",
3232
templates: "Templates",
3333
users: "Users",
34-
audit: "Auditing",
34+
audit: "Audit Logs",
3535
deployment: "Settings",
3636
};
3737

0 commit comments

Comments
 (0)