Skip to content

Commit

Permalink
test: fix date so we don't have unexpected failures (#390)
Browse files Browse the repository at this point in the history
We were matching 23 in the date and the year in the test
  • Loading branch information
maartenbreddels committed Nov 22, 2023
1 parent a789fb3 commit 5212b79
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions tests/integration/input_date_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -30,13 +30,13 @@ def update_value(value: float):
input.click()
page_session.wait_for_timeout(350)
expect(page_session.get_by_role("menu")).to_be_visible()
today_button = page_session.get_by_role("button", name=today.strftime("%d"))
today_button = page_session.get_by_role("button", name=today.strftime("%d"), exact=True)
# We click it, but it does not trigger a change, so we don't auto close
# Do we want to change this behaviour, and still close it?
today_button.click()
page_session.wait_for_timeout(350)
expect(page_session.get_by_role("menu")).to_be_visible()
tomorrow_button = page_session.get_by_role("button", name=tomorrow.strftime("%d"))
tomorrow_button = page_session.get_by_role("button", name=tomorrow.strftime("%d"), exact=True)
tomorrow_button.click()
page_session.wait_for_timeout(350)
expect(page_session.get_by_role("menu")).not_to_be_visible()
Expand Down Expand Up @@ -79,12 +79,12 @@ def update_value(value: float):
input.click()
page_session.wait_for_timeout(350)
expect(page_session.get_by_role("menu")).to_be_visible()
today_button = page_session.get_by_role("button", name=today.strftime("%d"))
today_button = page_session.get_by_role("button", name=today.strftime("%d"), exact=True)
today_button.click()
page_session.wait_for_timeout(350)
expect(page_session.locator(".test-class label")).to_contain_text("label (Please select two dates)")
expect(page_session.get_by_role("menu")).to_be_visible()
tomorrow_button = page_session.get_by_role("button", name=tomorrow.strftime("%d"))
tomorrow_button = page_session.get_by_role("button", name=tomorrow.strftime("%d"), exact=True)
tomorrow_button.click()
page_session.wait_for_timeout(350)
expect(page_session.locator(".test-class label")).not_to_contain_text("(Please select two dates)")
Expand Down

0 comments on commit 5212b79

Please sign in to comment.