Skip to content

Commit

Permalink
Use .to_have_count() to avoid test flakiness (#262)
Browse files Browse the repository at this point in the history
  • Loading branch information
masenf authored Oct 8, 2024
1 parent 0e6d1df commit 8535587
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions form-designer/tests/test_create_form.py
Original file line number Diff line number Diff line change
Expand Up @@ -132,9 +132,9 @@ def _url(url):

# There should be two responses
triggers = page.locator(".AccordionTrigger")
assert triggers.count() == 2
expect(triggers).to_have_count(2)
contents = page.locator(".AccordionContent")
assert contents.count() == 2
expect(contents).to_have_count(2)

# Open the second response
triggers.nth(1).click()
Expand All @@ -152,4 +152,4 @@ def _url(url):
triggers.nth(0).click()

# There should be one response now
assert triggers.count() == 1
expect(triggers).to_have_count(1)

0 comments on commit 8535587

Please sign in to comment.