From d1f2be2a4d7ae9085fe394d3bfa66026c57e5d38 Mon Sep 17 00:00:00 2001 From: Chirag Gupta <103719146+chiruu12@users.noreply.github.com> Date: Mon, 24 Aug 2026 12:56:38 +0530 Subject: [PATCH] fix(tests): wait for the workflow detail header before asserting on it (#6730) Signed-off-by: chiruu12 <103719146+chiruu12@users.noreply.github.com> --- tests/e2e_tests/test_end_to_end.py | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/tests/e2e_tests/test_end_to_end.py b/tests/e2e_tests/test_end_to_end.py index f182fbab3c..e9d5825af4 100644 --- a/tests/e2e_tests/test_end_to_end.py +++ b/tests/e2e_tests/test_end_to_end.py @@ -423,6 +423,13 @@ def test_add_workflow(browser: Page, setup_page_logging, failure_artifacts): page.get_by_placeholder("message", exact=True).fill("Hello world!") page.get_by_test_id("wf-editor-configure-save-button").click() page.wait_for_url(re.compile("http://localhost:3000/workflows/.*")) + # wait_for_url returns as soon as the URL changes, which is before the + # workflow detail fetch resolves. Until it does, WorkflowDetailHeader + # renders a skeleton and wf-name is absent from the DOM rather than + # empty, so an immediate text assertion spends its default 5s window + # waiting for an element that does not exist yet. Wait for the heading + # to attach first, then assert on what it says. + expect(page.get_by_test_id("wf-name")).to_be_visible(timeout=15000) expect(page.get_by_test_id("wf-name")).to_contain_text( "Example Console Workflow" )