diff --git a/tests/integration/input_date_test.py b/tests/integration/input_date_test.py index 8cf5e0349..dca8fef5f 100644 --- a/tests/integration/input_date_test.py +++ b/tests/integration/input_date_test.py @@ -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() @@ -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)")