Skip to content

QA-PY-107 — waitForLoadState(networkidle) used ​

← Back to the rule catalog

Generated from the rule registry. Get the same detail from the CLI with mjolnir explain QA-PY-107.

FieldValue
Severitywarning
Confidencehigh
Tierextended
Measured FP rate0% (n=10)
Evidence levelE2
QA impactFlaky-test risk (FLAKY-RISK)
False-positive risk (author estimate)low
Autofix availableno
Languagespython
Frameworkspytest
Detection strategyLEXICAL
Introduced inv0.4.0

Why this fails in production ​

Analytics, websockets, and polling make network idle never fire or fire randomly — a documented source of Playwright flakes.

What gets flagged (real detector output) ​

`wait_for_load_state('networkidle')` used.

Example from this rule's own must-fire fixture: tests/fixtures/QA-PY-107/must-fire/test_reports.py

The fix ​

Wait for a specific response: with page.expect_response(...), or expect(locator).to_be_visible().

Confirmed NOT to fire on the corresponding clean pattern ​

Verified against tests/fixtures/QA-PY-107/must-not-fire/test_reports.py — 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-fixtures3

Released under the MIT License.