Skip to content

Fix E2E timeout: WaitForPreseasonQuestionDiffRows fails when section has no data - #278

Merged
PhilipWoulfe merged 2 commits into
mainfrom
copilot/fix-run-e2e-test-failure
Jul 6, 2026
Merged

Fix E2E timeout: WaitForPreseasonQuestionDiffRows fails when section has no data#278
PhilipWoulfe merged 2 commits into
mainfrom
copilot/fix-run-e2e-test-failure

Conversation

Copilot AI commented Jul 6, 2026

Copy link
Copy Markdown
Contributor

AdminMigrationRuns_ShouldLoadRun_AndShowResultTables was timing out (30s) because WaitForPreseasonQuestionDiffRows() used an XPath that only matched when the section had actual <tbody><tr> rows. When the first migration run has zero preseason question diffs, the Blazor component renders an empty-state <p> instead — the selector found nothing and timed out.

Changes

  • MigrationRunsPage.cs — replaced WaitForPreseasonQuestionDiffRows() with WaitForPreseasonQuestionDiffSection(), updating the XPath to accept either a populated table or the empty-state paragraph, consistent with WaitForParticipantComparisonSection / WaitForRaceComparisonSection / WaitForPickComparisonSection
  • MigrationRunsFlowsTests.cs — updated call site to use the renamed method
// Before — only matched when rows exist
driver.FindElements(By.XPath(
    "//h4[normalize-space()='Preseason Question Diffs']/following-sibling::*[1][self::div]//tbody/tr"))

// After — matches table-with-rows OR empty-state paragraph
By.XPath(
    "//h4[normalize-space()='Preseason Question Diffs']" +
    "/following-sibling::*[1]" +
    "[self::div[.//tbody/tr] or self::p[normalize-space()='No preseason question diffs available for this run.']]")

Copilot AI changed the title [WIP] Fix failing GitHub Actions job run-e2e-test Fix E2E timeout: WaitForPreseasonQuestionDiffRows fails when section has no data Jul 6, 2026
Copilot AI requested a review from PhilipWoulfe July 6, 2026 21:11
@PhilipWoulfe
PhilipWoulfe marked this pull request as ready for review July 6, 2026 21:13
Copilot AI review requested due to automatic review settings July 6, 2026 21:13

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Pull request overview

Fixes an E2E test timeout on the Admin Migration Runs page by updating the Selenium wait logic to treat the “Preseason Question Diffs” section as loaded even when it renders an empty-state message instead of a populated table.

Changes:

  • Renamed/replaced the E2E page-object wait method to WaitForPreseasonQuestionDiffSection() and updated its XPath to match either the table variant or the empty-state paragraph.
  • Updated the flow test to call the renamed wait method.

Reviewed changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated 1 comment.

File Description
tests/F1.E2E.Tests/Pages/MigrationRunsPage.cs Updates the wait selector to recognize the preseason question diffs section in both “has data” and “empty state” render paths.
tests/F1.E2E.Tests/Flows/MigrationRunsFlowsTests.cs Updates the test flow to use the renamed section-wait method.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment on lines +149 to +152
var sectionSelector = By.XPath(
"//h4[normalize-space()='Preseason Question Diffs']" +
"/following-sibling::*[1]" +
"[self::div[.//tbody/tr] or self::p[normalize-space()='No preseason question diffs available for this run.']]");
@PhilipWoulfe
PhilipWoulfe merged commit c7dd7ba into main Jul 6, 2026
10 checks passed
@PhilipWoulfe
PhilipWoulfe deleted the copilot/fix-run-e2e-test-failure branch July 6, 2026 21:19
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants