Skip to content
Next Next commit
Fix lint error
  • Loading branch information
BrunoQuaresma committed Sep 4, 2024
commit a602c72f1c7d55bea0c20341d77c262796bef2be
Original file line number Diff line number Diff line change
Expand Up @@ -95,7 +95,11 @@ export const Toggle: Story = {
const user = userEvent.setup();
const canvas = within(canvasElement);
const option = await canvas.findByText("Workspace Marked as Dormant");
const toggleButton = within(option.closest("li")!).getByRole("button", {
const li = option.closest("li");
if(!li) {
throw new Error("Could not find li");
}
const toggleButton = within(li).getByRole("button", {
name: "Webhook",
});
await user.click(toggleButton);
Expand Down