QA-CS-105 — WaitForTimeoutAsync hard sleep
Generated from the rule registry. Get the same detail from the CLI with
mjolnir explain QA-CS-105.
| Field | Value |
|---|---|
| Severity | warning |
| Confidence | high |
| Tier | extended |
| Measured FP rate | 25% (n=16) |
| Evidence level | E2 |
| QA impact | Flaky-test risk (FLAKY-RISK) |
| False-positive risk (author estimate) | low |
| Autofix available | no |
| Languages | csharp |
| Frameworks | nunit, xunit, mstest, playwright |
| Detection strategy | QA_MODEL |
| Introduced in | v0.4.0 |
Why this fails in production
Fixed waits encode hope, not synchronization — too short flakes under load, too long slows every run.
What gets flagged (real detector output)
`WaitForTimeoutAsync()` hard sleep.Example from this rule's own must-fire fixture: tests/fixtures/QA-CS-105/must-fire/ModalTests.cs
The fix
Use await Assertions.Expect(locator).ToBeVisibleAsync() or locator.WaitForAsync() with auto-waiting.
Confirmed NOT to fire on the corresponding clean pattern
Verified against tests/fixtures/QA-CS-105/must-not-fire/ModalTests.cs — 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):
| Repo | Occurrences |
|---|---|
| microsoft-playwright-dotnet | 16 |