in issues/325/user_tool.py [0:0]
def verify_delete_confirmation_modal_back_out(page: Page):
page.get_by_label("Start chat (Floating action)").click()
page.get_by_label("Track expense").click()
try:
page.get_by_label("Don't show me this again").click()
page.get_by_role("button", name="Got it").click()
except:
pass
page.get_by_label("Distance").click()
page.wait_for_timeout(2000)
page.get_by_test_id("IOURequestStartPage").get_by_role("button", name="Start").click()
page.wait_for_timeout(2000)
page.get_by_test_id("IOURequestStepWaypoint").get_by_role("textbox").fill("Golden Gate Bridge Vista Point")
page.wait_for_timeout(2000)
page.get_by_text("Golden Gate Bridge Vista Point", exact=True).first.click()
page.wait_for_timeout(2000)
page.get_by_role("button", name="Stop").click()
page.wait_for_timeout(2000)
page.get_by_test_id("IOURequestStepWaypoint").get_by_role("textbox").fill("Telegraph Hill")
page.wait_for_timeout(2000)
page.get_by_text("Telegraph Hill", exact=True).first.click()
page.wait_for_timeout(2000)
page.locator('button[style="cursor: pointer;"]').wait_for()
page.wait_for_timeout(2000)
for _ in range(3):
try:
page.get_by_role("button", name="Next").nth(1).click()
page.wait_for_timeout(2000)
page.get_by_role("button", name="Track expense").wait_for(timeout=1000)
page.wait_for_timeout(2000)
break
except:
pass
page.get_by_role("button", name="Track expense").click()
page.wait_for_timeout(2000)
try:
page.get_by_label("Cash").locator("img").wait_for(timeout=120000)
except:
assert False, "Receipt was not able to load due to network issues"
page.get_by_label("Cash").locator("img").click()
page.get_by_label("View attachment").click()
page.get_by_label("More").click()
page.get_by_label("Download").wait_for()
if page.get_by_label("Delete receipt").is_visible():
page.get_by_label("Delete receipt").click()
page.get_by_role("button", name="Delete").wait_for()
page.locator("body").press("Escape")
expect(page.get_by_role("dialog").get_by_text("Receipt", exact=True)).to_have_count(1)
expect(page.get_by_role("button", name="Delete")).to_have_count(0)