Skip to content

Commit 370ac2d

Browse files
cristipufuclaude
andcommitted
fix: update e2e tests for new setup view UI flow
Tests now use Autonomous card → Execute flow instead of the removed Run button. Also skip fastapi-dependent unit tests gracefully when the module is not installed. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
1 parent 8fe14c1 commit 370ac2d

1 file changed

Lines changed: 37 additions & 18 deletions

File tree

tests/e2e/test_web_run.py

Lines changed: 37 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -27,15 +27,21 @@ def _go_to_new_run(page: Page, url: str) -> None:
2727
_wait_for_entrypoints(page)
2828

2929

30-
def _run_and_wait_completed(page: Page) -> None:
31-
"""Click Run, switch to Output tab, wait for completed status."""
32-
page.get_by_role("button", name="Run", exact=True).click()
33-
34-
# After clicking Run, the app navigates to run details (Trace tab).
35-
# Switch to Output tab where the status badge lives.
36-
output_tab = page.get_by_role("button", name="Output")
37-
expect(output_tab).to_be_visible(timeout=10000)
38-
output_tab.click()
30+
def _run_autonomous_and_wait_completed(page: Page) -> None:
31+
"""Click Autonomous, then Execute, switch to I/O tab, wait for completed."""
32+
# Click Autonomous mode card
33+
page.get_by_role("button", name="Autonomous").click()
34+
35+
# Wait for setup view with Execute button
36+
execute_btn = page.get_by_role("button", name="Execute")
37+
expect(execute_btn).to_be_visible(timeout=10000)
38+
execute_btn.click()
39+
40+
# After clicking Execute, the app navigates to run details.
41+
# Switch to I/O tab where the status badge lives.
42+
io_tab = page.get_by_role("button", name="I/O")
43+
expect(io_tab).to_be_visible(timeout=10000)
44+
io_tab.click()
3945

4046
# Wait for the completed status badge
4147
expect(page.get_by_text("Completed", exact=True)).to_be_visible(timeout=15000)
@@ -57,21 +63,28 @@ def test_run_greeting_and_check_output(page: Page, live_server_url: str):
5763
"""Run the default entrypoint and verify output JSON appears."""
5864
_go_to_new_run(page, live_server_url)
5965

60-
_run_and_wait_completed(page)
66+
_run_autonomous_and_wait_completed(page)
6167

62-
# The output tab should render the JSON output from the greeting runtime
68+
# The I/O tab should render the JSON output from the greeting runtime
6369
expect(page.locator("pre").first).to_be_visible(timeout=5000)
6470

6571

66-
def test_run_shows_traces(page: Page, live_server_url: str):
67-
"""Run and verify the Trace/Output tab bar is shown."""
72+
def test_run_shows_sidebar_tabs(page: Page, live_server_url: str):
73+
"""Run and verify the sidebar tabs (Events, I/O, Logs) are shown."""
6874
_go_to_new_run(page, live_server_url)
6975

70-
page.get_by_role("button", name="Run", exact=True).click()
76+
# Click Autonomous mode card
77+
page.get_by_role("button", name="Autonomous").click()
78+
79+
# Wait for setup view, then execute
80+
execute_btn = page.get_by_role("button", name="Execute")
81+
expect(execute_btn).to_be_visible(timeout=10000)
82+
execute_btn.click()
7183

72-
# Run details view should show both tab buttons
73-
expect(page.get_by_role("button", name="Trace")).to_be_visible(timeout=10000)
74-
expect(page.get_by_role("button", name="Output")).to_be_visible()
84+
# Run details view should show sidebar tab buttons
85+
expect(page.get_by_role("button", name="Events")).to_be_visible(timeout=10000)
86+
expect(page.get_by_role("button", name="I/O")).to_be_visible()
87+
expect(page.get_by_role("button", name="Logs")).to_be_visible()
7588

7689

7790
def test_sidebar_shows_run_history(page: Page, live_server_url: str):
@@ -81,7 +94,13 @@ def test_sidebar_shows_run_history(page: Page, live_server_url: str):
8194
sidebar = page.locator("aside")
8295
before_count = sidebar.get_by_role("button").count()
8396

84-
page.get_by_role("button", name="Run", exact=True).click()
97+
# Click Autonomous mode card
98+
page.get_by_role("button", name="Autonomous").click()
99+
100+
# Wait for setup view, then execute
101+
execute_btn = page.get_by_role("button", name="Execute")
102+
expect(execute_btn).to_be_visible(timeout=10000)
103+
execute_btn.click()
85104

86105
# Sidebar should now have one more button (the new run entry)
87106
expect(sidebar.get_by_role("button").nth(before_count)).to_be_visible(

0 commit comments

Comments
 (0)