Skip to content

QA-PW-147 — Playwright codegen default test title (recording artifact) ​

← Back to the rule catalog

Generated from the rule registry. Get the same detail from the CLI with mjolnir explain QA-PW-147.

FieldValue
Severityinfo
Confidencemedium
Tierquarantine
Measured FP ratenot yet measured
Evidence levelE0
QA impactTest hygiene debt (HYGIENE)
False-positive risk (author estimate)medium
Autofix availableno
Languagestypescript, javascript
Frameworksplaywright
Detection strategyLEXICAL (the codegen recorder's default test title ('test', 'test 1', 'test 2', …) committed verbatim, on the RAW text view (the title is a string literal))
Introduced inv0.6.0

Why this fails in production ​

The default codegen title ("test") says this spec is an unreviewed recording — recorded browser actions frequently include navigation noise and never carry the assertions a real regression test needs.

What gets flagged (real detector output) ​

Codegen default test title (test("test",) — an unreviewed recording artifact.

Example from this rule's own must-fire fixture: tests/fixtures/QA-PW-147/must-fire/codegen.spec.ts

The fix ​

Rename the test to describe the behavior under test, prune the recorded noise, and add assertions on the expected outcome — or delete the recording.

Confirmed NOT to fire on the corresponding clean pattern ​

Verified against tests/fixtures/QA-PW-147/must-not-fire/cart.spec.ts — a legitimate, similar-looking pattern this rule correctly leaves alone.

Corpus-measured false-positive risk ​

Real occurrence counts from npm run corpus:audit against actively-maintained OSS repos — reproduce yourself, don't just trust this table (see the false-positive audit):

RepoOccurrences
positive-fixtures1
vitest-dev-vitest153

Released under the MIT License.