Skip to content

Commit

Permalink
Switch toBeNull to not.toBeInTheDocument
Browse files Browse the repository at this point in the history
  • Loading branch information
dougmacknz committed Nov 28, 2024
1 parent 73e3012 commit 03bc812
Showing 1 changed file with 7 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -116,7 +116,7 @@ export const ClearAllFromValue: Story = {
canvas.queryByRole("button", {
name: "Clear all filters",
})
).toBeNull()
).not.toBeInTheDocument()
}
)

Expand Down Expand Up @@ -149,7 +149,7 @@ export const ClearAllFromValue: Story = {
canvas.queryByRole("button", {
name: "Clear all filters",
})
).toBeNull()
).not.toBeInTheDocument()
)
}
)
Expand Down Expand Up @@ -191,15 +191,17 @@ export const ClearAllFromRemovable: Story = {
})

waitFor(() =>
expect(canvas.queryByRole("button", { name: "Toppings" })).toBeNull()
expect(
canvas.queryByRole("button", { name: "Toppings" })
).not.toBeInTheDocument()
)

waitFor(() =>
expect(
canvas.queryByRole("button", {
name: "Clear all filters",
})
).toBeNull()
).not.toBeInTheDocument()
)
})
},
Expand Down Expand Up @@ -241,7 +243,7 @@ export const ClearAllRemovesItself: Story = {
canvas.queryByRole("button", {
name: "Clear all filters",
})
).toBeNull()
).not.toBeInTheDocument()
)
},
}

0 comments on commit 03bc812

Please sign in to comment.