Skip to content

docs: waitForResponse method predicate example #37801

docs: waitForResponse method predicate example

docs: waitForResponse method predicate example #37801

Triggered via pull request May 10, 2024 00:27
Status Failure
Total duration 3m 45s
Artifacts

infra.yml

on: pull_request
Fit to window
Zoom out
Zoom in

Annotations

1 error and 2 warnings
Lint snippets
Process completed with exit code 1.
Lint snippets
Node.js 16 actions are deprecated. Please update the following actions to use Node.js 20: actions/setup-python@v4, actions/setup-dotnet@v3. For more information see: https://github.blog/changelog/2023-09-22-github-actions-transitioning-from-node-16-to-node-20/.
js linting error: docs/src/api/class-page.md#L1
Error: This line has a length of 112. Maximum allowed is 100. 6 | // Alternative way with a predicate. Note no await. 7 | const responsePromise = page.waitForResponse(response => > 8 | response.url() === 'https://example.com' && response.status() === 200 && response.request().method() === 'GET' | ^ 9 | ); 10 | await page.getByText('trigger response').click(); 11 | const response = await responsePromise; Unable to lint: // Start waiting for response before clicking. Note no await. const responsePromise = page.waitForResponse('https://example.com/resource'); await page.getByText('trigger response').click(); const response = await responsePromise; // Alternative way with a predicate. Note no await. const responsePromise = page.waitForResponse(response => response.url() === 'https://example.com' && response.status() === 200 && response.request().method() === 'GET' ); await page.getByText('trigger response').click(); const response = await responsePromise;