Skip to content

Commit a602c72

Browse files
committed
Fix lint error
1 parent bd90740 commit a602c72

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

site/src/pages/DeploySettingsPage/NotificationsPage/NotificationsPage.stories.tsx

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -95,7 +95,11 @@ export const Toggle: Story = {
9595
const user = userEvent.setup();
9696
const canvas = within(canvasElement);
9797
const option = await canvas.findByText("Workspace Marked as Dormant");
98-
const toggleButton = within(option.closest("li")!).getByRole("button", {
98+
const li = option.closest("li");
99+
if(!li) {
100+
throw new Error("Could not find li");
101+
}
102+
const toggleButton = within(li).getByRole("button", {
99103
name: "Webhook",
100104
});
101105
await user.click(toggleButton);

0 commit comments

Comments
 (0)