def test_tag_long_press_issue()

in issues/201/user_tool.py [0:0]


def test_tag_long_press_issue():
    with sync_playwright() as pw:
        browser, context, page, user_email = login_user(pw)
        try:
            page.wait_for_timeout(2000)
            page.get_by_label("Back").click()
            page.wait_for_timeout(2000)
            page.get_by_label("Start chat (Floating action)").click()
            page.wait_for_timeout(2000)
            page.get_by_label("New workspace").click()
            page.wait_for_timeout(2000)
            page.get_by_label("More features").click()
            page.wait_for_timeout(2000)
            page.get_by_label("Classify costs and track").click()
            page.wait_for_timeout(2000)
            page.get_by_label("Tags").click()
            page.wait_for_timeout(2000)
            page.get_by_role("button", name="Add tag").click()
            page.wait_for_timeout(2000)
            page.get_by_role("textbox", name="Name").fill("Tag1")
            page.wait_for_timeout(2000)
            page.get_by_role("textbox", name="Name").press("Enter")
            page.wait_for_timeout(2000)
            if(page.get_by_test_id("WorkspaceMoreFeaturesPage").get_by_label("Back").is_visible()):
                page.get_by_test_id("WorkspaceMoreFeaturesPage").get_by_label("Back").click()
            page.get_by_role("button", name="Add tag").click()
            page.wait_for_timeout(2000)
            page.get_by_role("textbox", name="Name").fill("Tag2")
            page.wait_for_timeout(2000)
            page.get_by_role("textbox", name="Name").press("Enter")
            page.wait_for_timeout(2000)
            if(page.get_by_test_id("WorkspaceMoreFeaturesPage").get_by_label("Back").is_visible()):
                page.get_by_test_id("WorkspaceMoreFeaturesPage").get_by_label("Back").click()
            page.get_by_label("Tag1").click()
            page.get_by_label("Tag1").first.hover()
            page.mouse.down()
            page.wait_for_timeout(5000)
            page.mouse.up()
            page.wait_for_timeout(2000)
            expect(page.get_by_text("Enable tag")).to_be_visible()
            expect(page.get_by_text("Select")).not_to_be_visible()
        finally:
            # Stop tracing and export to zip file
            trace_file = "/app/expensify/user_tool/output_browser1.zip"
            context.tracing.stop(path=trace_file)
            trace_cleaner(trace_file)
            # Close the browser
            page.close()
            browser.close()