Skip to content

QA-PW-113 — frameLocator chain deeper than 2 ​

← Back to the rule catalog

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

FieldValue
Severitywarning
Confidencehigh
Tierextended
Measured FP rate0% (n=11)
Evidence levelE1
QA impactTest hygiene debt (HYGIENE)
False-positive risk (author estimate)low
Autofix availableno
Languagestypescript, javascript
Frameworksplaywright
Detection strategyLEXICAL
Introduced inv0.3.0

Why this fails in production ​

Each nested iframe multiplies timing and attachment flake; tests this coupled to embedding structure break on every layout change.

What gets flagged (real detector output) ​

frameLocator chained 3 levels deep.

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

The fix ​

Expose a stable handle to the innermost content (postMessage bridge, test hook, or flatten the frames).

Confirmed NOT to fire on the corresponding clean pattern ​

Verified against tests/fixtures/QA-PW-113/must-not-fire/shallow.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-fixtures11

Released under the MIT License.