Repository navigation
fix(verify): read the checks playwright reports as failed - #1978
Open
rafaelnovah1 wants to merge 2 commits into
Open
rafaelnovah1 wants to merge 2 commits into
rafaelnovah1 wants to merge 2 commits into
Conversation
FailingTests read nothing out of a red playwright suite, although discovery already treats playwright.config.* as a test runner. Read the closing `N failed` section of the list, line and dot reporters: it excludes checks that passed on retry (listed under `N flaky`), keeps the project in the name, and drops the spec file's line and column so a check does not look new after an edit above it.
Member
|
Hey, thanks for the PR. Could you sign the CLA when you get a chance so we can review it? |
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.
What changed
verify.FailingTestsdid not recognize any failure in Playwright output. Theproject already detects Playwright as a test runner (
playwright.config.*indiscovery.go), but when a Playwright suite was red, its reading named zerofailing checks. As a result, the gate could not tell which checks a change
turned red.
Playwright's
list,lineanddotreporters all end with a summary likethis:
This PR reads the
N failedsection and nothing else:N failed, not the numbered banners. A test that fails and thenpasses on retry still gets a
1) …banner. Reading the banners would report aflaky-but-green check as a new failure. The
✘progress lines are skipped too,because their leading counter changes with worker scheduling.
[chromium]and[firefox]are two checks, so the bracketedproject stays in the name.
login.spec.ts:3:7becomeslogin.spec.tsinside a
›chain, innormalizeTestName. Otherwise, adding a line above atest would make an unchanged red check look new. The strip applies only to
file.(js|ts|…):line:col ›, so rspec's./spec/a_spec.rb:12keeps its linenumber.
Scope: this only changes the failing-check reading.
ReportedTests(the roster)still reads Playwright's
✓lines with their counter. I left that alone so thischange stays small, and can follow up if useful.
How it was checked
@playwright/test1.64.1. They cover the listreporter with two projects, the same suite after a line was inserted above
every test, the line reporter with no projects, and a retry run with one flaky
test. The absolute workspace path was replaced with
/work/app.devwithout the change, the new test fails: every fixture reads[].With the change, it passes.
file:lineidentity is unchanged and thatmocha's numbered
1) …failure list is not read as Playwright.go test ./internal/verify/... ./internal/revision/...: pass.make test-quick: pass on macOS (arm64), Go 1.27.3.go test -timeout 25m ./internal/session: one failure,TestTheDailyCeilingBindsTaskAndErrandTurnsToo(daily limit reached · $1.07 spent of $1). It also fails on a cleandevworktree run at the sametime, so this change did not cause it. It passes when run on its own
(
-count=5). It looks like daily spend shared between tests that run inparallel. I can open a separate issue if useful.
Context: we run a fork of SWE-AF whose port of
failing.goadded this readingfor a Next.js + Playwright project. This PR brings the fix back here, improved
to handle flaky tests and moving line numbers. Written with help from an AI
coding agent and reviewed by me.
Checklist
docs/changes/unreleased/<pr>-playwright-failing-checks.md(kind: fixed)git add -A