noPlaywrightWaitForNavigation
Цей контент ще не доступний вашою мовою.
Summary
Section titled “Summary”- Rule available since:
v2.4.2 - Diagnostic Category:
lint/nursery/noPlaywrightWaitForNavigation - This rule doesn’t have a fix.
- The default severity of this rule is information.
- This rule belongs to the following domains:
- Sources:
How to configure
Section titled “How to configure”{ "linter": { "rules": { "nursery": { "noPlaywrightWaitForNavigation": "error" } } }}Description
Section titled “Description”Disallow using page.waitForNavigation().
Playwright’s page.waitForNavigation() is deprecated and should be replaced with more reliable
alternatives like page.waitForURL() or page.waitForLoadState().
Examples
Section titled “Examples”Invalid
Section titled “Invalid”await page.waitForNavigation();code-block.js:1:7 lint/nursery/noPlaywrightWaitForNavigation ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
ℹ Unexpected use of page.waitForNavigation().
> 1 │ await page.waitForNavigation();
│ ^^^^^^^^^^^^^^^^^^^^^^^^
2 │
ℹ waitForNavigation() is deprecated because it can be unreliable.
ℹ Use page.waitForURL() or page.waitForLoadState() instead.
ℹ This rule belongs to the nursery group, which means it is not yet stable and may change in the future. Visit https://biomejs.dev/linter/#nursery for more information.
await page.click('button');await page.waitForNavigation({ waitUntil: 'networkidle' });code-block.js:2:7 lint/nursery/noPlaywrightWaitForNavigation ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
ℹ Unexpected use of page.waitForNavigation().
1 │ await page.click(‘button’);
> 2 │ await page.waitForNavigation({ waitUntil: ‘networkidle’ });
│ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
3 │
ℹ waitForNavigation() is deprecated because it can be unreliable.
ℹ Use page.waitForURL() or page.waitForLoadState() instead.
ℹ This rule belongs to the nursery group, which means it is not yet stable and may change in the future. Visit https://biomejs.dev/linter/#nursery for more information.
await page.waitForURL('/home');await page.waitForLoadState('networkidle');await page.goto('/home');Related links
Section titled “Related links”Copyright (c) 2023-present Biome Developers and Contributors.