Auto-fix: spec failure in yaml-examples/triage-fixtures/01-spec-drift.test.yaml - #17
Open
feng-shiplight wants to merge 1 commit into
Conversation
…yaml (verification: verified) Update the VERIFY step to target the renamed button: change the js predicate locator from '#generateReport' to '#createReport' and update the statement text from 'Generate Report' to 'Create Report'. Opened automatically by CI Failure Triage; verification result recorded in the PR. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fix stale locator in
01-spec-drifttriage fixtureWhat failed
The test
triage-fixtures/01-spec-drift.test.yamlverifies that the reportaction button is visible on the dashboard. Its
VERIFYstep used ajs:predicate pinned to the old element id:
Because
#generateReportno longer exists in the DOM, the visibilityassertion times out after 3000 ms and the test fails.
Root cause
The dashboard was renamed in a UI refresh — the functionality is unchanged,
only the label and id changed:
generateReportcreateReportThe application behavior is correct: the report action button is present
and visible; it is simply labeled "Create Report" now. Confirmed by inspecting
the live page
https://static.shiplight.ai/testing/failure-analysis/renamed-elements.html,whose rendered DOM shows a
<button>reading "Create Report". This is astale-spec (assertion-drift) failure, so the fix is test-only.
The change
Updated only the
VERIFYstep to target the renamed button:statement text. No other steps, templates, or files touched.
toBeVisible({ timeout: 3000 })Playwright web-assertion, which polls until the element is visible rather
than relying on a fixed sleep. The locator now matches the app's current,
stable id (
#createReport).Verification (recorded, not a merge gate): ✅ Verified — re-ran
yaml-examples/triage-fixtures/01-spec-drift.test.yamltwice, both passed.Diff
Failing run: https://github.com/ShiplightAI/examples/actions/runs/31583416180