mirror of
https://github.com/coder/coder.git
synced 2026-09-24 15:04:27 +08:00
fix(site): fix OpensAdminSubPanelOnMobile story on mobile viewport (#24678)
`OpensAdminSubPanelOnMobile` story has been failing due to not finding a role="link" with name "Settings". Agent investigated and claimed the Settings icon gets hidden in mobile view. Suggested fix is to start the story directly at `/agents/settings`. > Generated with [Coder Agents](https://coder.com/agents)
This commit is contained in:
@@ -701,10 +701,15 @@ export const OpensAdminSubPanelOnMobile: Story = {
|
||||
},
|
||||
parameters: {
|
||||
viewport: { defaultViewport: "mobile1" },
|
||||
reactRouter: reactRouterParameters({
|
||||
location: { path: "/agents/settings" },
|
||||
routing: agentsRouting,
|
||||
}),
|
||||
},
|
||||
play: async ({ canvasElement }) => {
|
||||
await openSettingsView(canvasElement);
|
||||
await userEvent.click(screen.getByRole("link", { name: "Manage Agents" }));
|
||||
play: async () => {
|
||||
await userEvent.click(
|
||||
await screen.findByRole("link", { name: "Manage Agents" }),
|
||||
);
|
||||
|
||||
await expect(
|
||||
await screen.findByRole("link", { name: "Providers" }),
|
||||
|
||||
Reference in New Issue
Block a user