diff --git a/site/src/pages/WorkspacePage/WorkspaceNotifications/WorkspaceNotifications.stories.tsx b/site/src/pages/WorkspacePage/WorkspaceNotifications/WorkspaceNotifications.stories.tsx index 2ad22e590d..d2a014b6eb 100644 --- a/site/src/pages/WorkspacePage/WorkspaceNotifications/WorkspaceNotifications.stories.tsx +++ b/site/src/pages/WorkspacePage/WorkspaceNotifications/WorkspaceNotifications.stories.tsx @@ -55,10 +55,10 @@ export const Outdated: Story = { }, play: async ({ step }) => { - await step("activate hover trigger", async () => { - await userEvent.hover(screen.getByTestId("info-notifications")); + await step("activate click trigger", async () => { + await userEvent.click(screen.getByTestId("info-notifications")); await waitFor(() => - expect(screen.getByRole("tooltip")).toHaveTextContent( + expect(screen.getByRole("dialog")).toHaveTextContent( MockTemplateVersion.message, ), ); @@ -73,10 +73,10 @@ export const OutdatedWithMarkdownMessage: Story = { }, play: async ({ step }) => { - await step("activate hover trigger", async () => { - await userEvent.hover(screen.getByTestId("info-notifications")); + await step("activate click trigger", async () => { + await userEvent.click(screen.getByTestId("info-notifications")); await waitFor(() => - expect(screen.getByRole("tooltip")).toHaveTextContent( + expect(screen.getByRole("dialog")).toHaveTextContent( /an update is available/i, ), ); @@ -104,10 +104,10 @@ export const RequiresManualUpdate: Story = { }, play: async ({ step }) => { - await step("activate hover trigger", async () => { - await userEvent.hover(screen.getByTestId("warning-notifications")); + await step("activate click trigger", async () => { + await userEvent.click(screen.getByTestId("warning-notifications")); await waitFor(() => - expect(screen.getByRole("tooltip")).toHaveTextContent( + expect(screen.getByRole("dialog")).toHaveTextContent( /unable to automatically update/i, ), ); @@ -153,9 +153,9 @@ export const StartupScriptFailed: Story = { play: async ({ step }) => { await step("shows startup script failure message", async () => { - await userEvent.hover(screen.getByTestId("warning-notifications")); + await userEvent.click(screen.getByTestId("warning-notifications")); await waitFor(() => - expect(screen.getByRole("tooltip")).toHaveTextContent( + expect(screen.getByRole("dialog")).toHaveTextContent( /a startup script has failed/i, ), ); @@ -178,10 +178,10 @@ export const AgentDisconnected: Story = { }, play: async ({ step }) => { - await step("activate hover trigger", async () => { - await userEvent.hover(screen.getByTestId("warning-notifications")); + await step("activate click trigger", async () => { + await userEvent.click(screen.getByTestId("warning-notifications")); await waitFor(() => - expect(screen.getByRole("tooltip")).toHaveTextContent( + expect(screen.getByRole("dialog")).toHaveTextContent( /one or more workspace agents need attention/i, ), ); @@ -199,10 +199,10 @@ export const AgentTimeout: Story = { }, play: async ({ step }) => { - await step("activate hover trigger", async () => { - await userEvent.hover(screen.getByTestId("warning-notifications")); + await step("activate click trigger", async () => { + await userEvent.click(screen.getByTestId("warning-notifications")); await waitFor(() => - expect(screen.getByRole("tooltip")).toHaveTextContent( + expect(screen.getByRole("dialog")).toHaveTextContent( /one or more workspace agents need attention/i, ), ); @@ -233,10 +233,10 @@ export const Dormant: Story = { }, play: async ({ step }) => { - await step("activate hover trigger", async () => { - await userEvent.hover(screen.getByTestId("warning-notifications")); + await step("activate click trigger", async () => { + await userEvent.click(screen.getByTestId("warning-notifications")); await waitFor(() => - expect(screen.getByRole("tooltip")).toHaveTextContent( + expect(screen.getByRole("dialog")).toHaveTextContent( /workspace is dormant/i, ), ); @@ -273,10 +273,10 @@ export const PendingInQueue: Story = { }, play: async ({ step }) => { - await step("activate hover trigger", async () => { - await userEvent.hover(await screen.findByTestId("info-notifications")); + await step("activate click trigger", async () => { + await userEvent.click(await screen.findByTestId("info-notifications")); await waitFor(() => - expect(screen.getByRole("tooltip")).toHaveTextContent( + expect(screen.getByRole("dialog")).toHaveTextContent( /build is pending/i, ), ); @@ -295,10 +295,10 @@ export const TemplateDeprecated: Story = { }, play: async ({ step }) => { - await step("activate hover trigger", async () => { - await userEvent.hover(screen.getByTestId("warning-notifications")); + await step("activate click trigger", async () => { + await userEvent.click(screen.getByTestId("warning-notifications")); await waitFor(() => - expect(screen.getByRole("tooltip")).toHaveTextContent( + expect(screen.getByRole("dialog")).toHaveTextContent( /deprecated template/i, ), );