From 7efccfa9960ee1553a7594d32fd38a3ea24e52b4 Mon Sep 17 00:00:00 2001 From: Cian Johnston Date: Thu, 23 Apr 2026 17:41:31 +0100 Subject: [PATCH] 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) --- site/src/pages/AgentsPage/AgentsPageView.stories.tsx | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/site/src/pages/AgentsPage/AgentsPageView.stories.tsx b/site/src/pages/AgentsPage/AgentsPageView.stories.tsx index 228876e2b0..180f9fd64b 100644 --- a/site/src/pages/AgentsPage/AgentsPageView.stories.tsx +++ b/site/src/pages/AgentsPage/AgentsPageView.stories.tsx @@ -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" }),