mirror of
https://github.com/coder/coder.git
synced 2026-09-22 05:05:20 +08:00
chore: rename 'Deployment' button to 'Administration' (#14240)
* chore: rename 'Deployment' button to 'Administration' Reword "Auditing" to a noun like the rest of the dropdowns
This commit is contained in:
@@ -52,7 +52,7 @@ export const DeploymentDropdown: FC<DeploymentDropdownProps> = ({
|
||||
/>
|
||||
}
|
||||
>
|
||||
Deployment
|
||||
Administration
|
||||
</Button>
|
||||
</PopoverTrigger>
|
||||
|
||||
@@ -128,7 +128,7 @@ const DeploymentDropdownContent: FC<DeploymentDropdownProps> = ({
|
||||
css={styles.menuItem}
|
||||
onClick={onPopoverClose}
|
||||
>
|
||||
Auditing
|
||||
Audit Logs
|
||||
</MenuItem>
|
||||
)}
|
||||
{canViewHealth && (
|
||||
|
||||
@@ -22,7 +22,7 @@ describe("Navbar", () => {
|
||||
}),
|
||||
);
|
||||
render(<App />);
|
||||
const deploymentMenu = await screen.findByText("Deployment");
|
||||
const deploymentMenu = await screen.findByText("Administration");
|
||||
await userEvent.click(deploymentMenu);
|
||||
await waitFor(
|
||||
() => {
|
||||
@@ -37,7 +37,7 @@ describe("Navbar", () => {
|
||||
// by default, user is an Admin with permission to see the audit log,
|
||||
// but is unlicensed so not entitled to see the audit log
|
||||
render(<App />);
|
||||
const deploymentMenu = await screen.findByText("Deployment");
|
||||
const deploymentMenu = await screen.findByText("Administration");
|
||||
await userEvent.click(deploymentMenu);
|
||||
await waitFor(
|
||||
() => {
|
||||
|
||||
@@ -26,7 +26,9 @@ type Story = StoryObj<typeof NavbarView>;
|
||||
export const ForAdmin: Story = {
|
||||
play: async ({ canvasElement }) => {
|
||||
const canvas = within(canvasElement);
|
||||
await userEvent.click(canvas.getByRole("button", { name: "Deployment" }));
|
||||
await userEvent.click(
|
||||
canvas.getByRole("button", { name: "Administration" }),
|
||||
);
|
||||
},
|
||||
};
|
||||
|
||||
@@ -41,7 +43,9 @@ export const ForAuditor: Story = {
|
||||
},
|
||||
play: async ({ canvasElement }) => {
|
||||
const canvas = within(canvasElement);
|
||||
await userEvent.click(canvas.getByRole("button", { name: "Deployment" }));
|
||||
await userEvent.click(
|
||||
canvas.getByRole("button", { name: "Administration" }),
|
||||
);
|
||||
},
|
||||
};
|
||||
|
||||
@@ -56,7 +60,9 @@ export const ForOrgAdmin: Story = {
|
||||
},
|
||||
play: async ({ canvasElement }) => {
|
||||
const canvas = within(canvasElement);
|
||||
await userEvent.click(canvas.getByRole("button", { name: "Deployment" }));
|
||||
await userEvent.click(
|
||||
canvas.getByRole("button", { name: "Administration" }),
|
||||
);
|
||||
},
|
||||
};
|
||||
|
||||
|
||||
@@ -69,7 +69,7 @@ describe("NavbarView", () => {
|
||||
canViewAuditLog
|
||||
/>,
|
||||
);
|
||||
const deploymentMenu = await screen.findByText("Deployment");
|
||||
const deploymentMenu = await screen.findByText("Administration");
|
||||
await userEvent.click(deploymentMenu);
|
||||
const userLink = await screen.findByText(navLanguage.users);
|
||||
expect((userLink as HTMLAnchorElement).href).toContain("/users");
|
||||
@@ -88,7 +88,7 @@ describe("NavbarView", () => {
|
||||
canViewAuditLog
|
||||
/>,
|
||||
);
|
||||
const deploymentMenu = await screen.findByText("Deployment");
|
||||
const deploymentMenu = await screen.findByText("Administration");
|
||||
await userEvent.click(deploymentMenu);
|
||||
const auditLink = await screen.findByText(navLanguage.audit);
|
||||
expect((auditLink as HTMLAnchorElement).href).toContain("/audit");
|
||||
@@ -107,7 +107,7 @@ describe("NavbarView", () => {
|
||||
canViewAuditLog
|
||||
/>,
|
||||
);
|
||||
const deploymentMenu = await screen.findByText("Deployment");
|
||||
const deploymentMenu = await screen.findByText("Administration");
|
||||
await userEvent.click(deploymentMenu);
|
||||
const deploymentSettingsLink = await screen.findByText(
|
||||
navLanguage.deployment,
|
||||
|
||||
@@ -31,7 +31,7 @@ export const Language = {
|
||||
workspaces: "Workspaces",
|
||||
templates: "Templates",
|
||||
users: "Users",
|
||||
audit: "Auditing",
|
||||
audit: "Audit Logs",
|
||||
deployment: "Settings",
|
||||
};
|
||||
|
||||
|
||||
Reference in New Issue
Block a user