Thanks to visit codestin.com
Credit goes to github.com

Skip to content

chore: rename 'Deployment' button to 'Administration' #14240

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 5 commits into from
Aug 13, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions site/src/modules/dashboard/Navbar/DeploymentDropdown.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ export const DeploymentDropdown: FC<DeploymentDropdownProps> = ({
/>
}
>
Deployment
Administration
</Button>
</PopoverTrigger>

Expand Down Expand Up @@ -128,7 +128,7 @@ const DeploymentDropdownContent: FC<DeploymentDropdownProps> = ({
css={styles.menuItem}
onClick={onPopoverClose}
>
Auditing
Audit Logs
</MenuItem>
)}
{canViewHealth && (
Expand Down
4 changes: 2 additions & 2 deletions site/src/modules/dashboard/Navbar/Navbar.test.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -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(
() => {
Expand All @@ -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(
() => {
Expand Down
12 changes: 9 additions & 3 deletions site/src/modules/dashboard/Navbar/NavbarView.stories.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -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" }),
);
},
};

Expand All @@ -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" }),
);
},
};

Expand All @@ -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" }),
);
},
};

Expand Down
6 changes: 3 additions & 3 deletions site/src/modules/dashboard/Navbar/NavbarView.test.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -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");
Expand All @@ -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");
Expand All @@ -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,
Expand Down
2 changes: 1 addition & 1 deletion site/src/modules/dashboard/Navbar/NavbarView.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ export const Language = {
workspaces: "Workspaces",
templates: "Templates",
users: "Users",
audit: "Auditing",
audit: "Audit Logs",
deployment: "Settings",
};

Expand Down
Loading