Skip to content

test(09-02): task runs tab E2E tests#20773

Merged
desertaxle merged 2 commits intomainfrom
runs-page/task-runs-tab
Feb 19, 2026
Merged

test(09-02): task runs tab E2E tests#20773
desertaxle merged 2 commits intomainfrom
runs-page/task-runs-tab

Conversation

@devin-ai-integration
Copy link
Contributor

@devin-ai-integration devin-ai-integration bot commented Feb 19, 2026

Adds E2E tests for the Task Runs tab on the combined Runs page (/runs).

What's new

New test file ui-v2/e2e/runs/runs-task-runs.spec.ts with 3 serial tests:

  1. Deep-link to Task Runs tab — navigates to /runs?tab=task-runs, verifies the tab is active and URL param is preserved
  2. Task runs list rendering — verifies a task run name, "Completed" state badge, and flow run breadcrumb link are visible
  3. Click-to-detail navigation — clicks the task run name link and verifies navigation to /runs/task-run/:id

Test data is created via runSimpleTask() in beforeAll, which executes a real Python @flow/@task via subprocess.

Updates since last revision

  • Scoped state badge assertion: The "Completed" check was originally page.getByText("Completed").first() (global). Now scoped to the specific task run's listitem via getByRole("listitem").filter({ has: getByRole("link", { name: taskRunName }) }), so it won't false-positive from unrelated rows.

Notes for review

  • Tests pass locally against a running Prefect server with Playwright.
  • The flow run name breadcrumb link assertion (getByRole("link", { name: flowRunName })) is page-scoped rather than row-scoped. This is lower risk since flow run names are unique, but could be tightened if desired.
  • Only the flow run name breadcrumb is asserted, not the flow name breadcrumb (plan called for both).

Checklist

  • This pull request references any related issue by including "closes <link to issue>"
    • If no issue exists and your change is not a small fix, please create an issue first.
  • If this pull request adds new functionality, it includes unit tests that cover the changes
  • If this pull request removes docs files, it includes redirect settings in mint.json.
  • If this pull request adds functions or classes, it includes helpful docstrings.

Link to Devin run: https://app.devin.ai/sessions/190c2cfaed5e4903980bc28276ffd539
Requested by: @desertaxle

…click-to-detail

Co-Authored-By: alex.s@prefect.io <ajstreed1@gmail.com>
@devin-ai-integration
Copy link
Contributor Author

🤖 Devin AI Engineer

I'll be helping with this pull request! Here's what you should know:

✅ I will automatically:

  • Address comments on this PR. Add '(aside)' to your comment to have me ignore it.
  • Look at CI failures and help fix them

Note: I can only respond to comments from users who have write access to this repository.

⚙️ Control Options:

  • Disable automatic comment and CI monitoring

@github-actions github-actions bot added the ui-replatform Related to the React UI rewrite label Feb 19, 2026
@desertaxle desertaxle marked this pull request as ready for review February 19, 2026 21:56
Copy link

@chatgpt-codex-connector chatgpt-codex-connector bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: fa23ddb3d0

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

});
}).toPass({ timeout: 15000 });

await expect(page.getByText("Completed").first()).toBeVisible();

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Badge Scope state assertion to the target task-run row

The assertion page.getByText("Completed").first() is global, so it can pass when any unrelated "Completed" label is present on the page (for example from older runs), even if the created taskRunName row is not completed. In that scenario the test gives a false positive and fails to catch regressions in the task-run row state rendering; the check should be tied to the row/link for the specific task run under test.

Useful? React with 👍 / 👎.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good catch. Fixed in 3f74698 — now scoped to the specific listitem containing the task run link:

const taskRunRow = page
    .getByRole("listitem")
    .filter({ has: page.getByRole("link", { name: taskRunName }) });
await expect(taskRunRow.getByText("Completed")).toBeVisible();

Co-Authored-By: alex.s@prefect.io <ajstreed1@gmail.com>
@desertaxle desertaxle merged commit 9b50ae1 into main Feb 19, 2026
25 of 26 checks passed
@desertaxle desertaxle deleted the runs-page/task-runs-tab branch February 19, 2026 22:26
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

ui-replatform Related to the React UI rewrite

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant

Comments