Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: add failOnStatusCode option to API request context #34346

Open
wants to merge 12 commits into
base: main
Choose a base branch
from

Conversation

JacksonLei123
Copy link

Add failOnStatusCode option to API request context so that the flag is applied to every request made unless specified.

References issue #34204

This comment has been minimized.

docs/src/api/params.md Outdated Show resolved Hide resolved
tests/library/global-fetch.spec.ts Outdated Show resolved Hide resolved
tests/library/global-fetch.spec.ts Outdated Show resolved Hide resolved
packages/playwright-core/types/types.d.ts Outdated Show resolved Hide resolved
docs/src/api/params.md Outdated Show resolved Hide resolved

This comment has been minimized.

This comment has been minimized.

This comment has been minimized.

@JacksonLei123 JacksonLei123 requested a review from yury-s January 20, 2025 17:44

This comment has been minimized.

This comment has been minimized.

@dgozman dgozman requested a review from Skn0tt February 4, 2025 16:44
@Skn0tt
Copy link
Member

Skn0tt commented Feb 5, 2025

Hi @JacksonLei123! The code looks generally good, but CI is failing because there's a mismatch in the generated files. Could you run npm run build and commit the generated files?

Copy link
Contributor

github-actions bot commented Feb 6, 2025

Test results for "tests 1"

17 failed
❌ [webkit-library] › tests/library/browsertype-connect.spec.ts:173:5 › run-server › should ignore page.pause when headed @webkit-ubuntu-22.04-node18
❌ [webkit-library] › tests/library/headful.spec.ts:24:3 › should have default url when launching browser @smoke @webkit-ubuntu-22.04-node18
❌ [webkit-library] › tests/library/headful.spec.ts:30:3 › should close browser with beforeunload page @webkit-ubuntu-22.04-node18
❌ [webkit-library] › tests/library/headful.spec.ts:42:3 › should close browsercontext with pending beforeunload dialog @webkit-ubuntu-22.04-node18
❌ [webkit-library] › tests/library/headful.spec.ts:56:3 › should not crash when creating second context @webkit-ubuntu-22.04-node18
❌ [webkit-library] › tests/library/headful.spec.ts:69:3 › should click when viewport size is larger than screen @webkit-ubuntu-22.04-node18
❌ [webkit-library] › tests/library/headful.spec.ts:84:3 › should dispatch click events to oversized viewports @webkit-ubuntu-22.04-node18
❌ [webkit-library] › tests/library/headful.spec.ts:108:3 › should click background tab @webkit-ubuntu-22.04-node18
❌ [webkit-library] › tests/library/headful.spec.ts:114:3 › should close browser after context menu was triggered @webkit-ubuntu-22.04-node18
❌ [webkit-library] › tests/library/headful.spec.ts:122:3 › should(not) block third party cookies @webkit-ubuntu-22.04-node18
❌ [webkit-library] › tests/library/headful.spec.ts:158:3 › should not block third party SameSite=None cookies @webkit-ubuntu-22.04-node18
❌ [webkit-library] › tests/library/headful.spec.ts:195:3 › should not override viewport size when passed null @webkit-ubuntu-22.04-node18
❌ [webkit-library] › tests/library/headful.spec.ts:213:3 › Page.bringToFront should work @webkit-ubuntu-22.04-node18
❌ [webkit-library] › tests/library/headful.spec.ts:233:3 › should click in OOPIF @webkit-ubuntu-22.04-node18
❌ [webkit-library] › tests/library/headful.spec.ts:252:3 › should click bottom row w/ infobar in OOPIF @webkit-ubuntu-22.04-node18
❌ [webkit-library] › tests/library/headful.spec.ts:287:3 › headless and headful should use same default fonts @webkit-ubuntu-22.04-node18
❌ [webkit-library] › tests/library/headful.spec.ts:317:3 › should have the same hyphen rendering on headless and headed @webkit-ubuntu-22.04-node18

17 flaky ⚠️ [firefox-page] › tests/page/page-evaluate.spec.ts:403:3 › should throw for too deep reference chain @firefox-ubuntu-22.04-node18
⚠️ [installation tests] › tests/playwright-electron-should-work.spec.ts:31:5 › electron should work with special characters in path @package-installations-macos-latest
⚠️ [webkit-library] › tests/library/inspector/cli-codegen-1.spec.ts:23:7 › cli codegen › should click @webkit-ubuntu-22.04-node18
⚠️ [webkit-library] › tests/library/inspector/cli-codegen-pytest.spec.ts:33:5 › should print the correct context options when using a device and lang @webkit-ubuntu-22.04-node18
⚠️ [webkit-library] › tests/library/inspector/console-api.spec.ts:38:3 › should support playwright.$, playwright.$$ @webkit-ubuntu-22.04-node18
⚠️ [webkit-library] › tests/library/inspector/console-api.spec.ts:50:3 › should support playwright.locator.value @webkit-ubuntu-22.04-node18
⚠️ [webkit-library] › tests/library/proxy.spec.ts:93:11 › should proxy local network requests › by default › localhost @webkit-ubuntu-22.04-node18
⚠️ [webkit-library] › tests/library/selector-generator.spec.ts:39:5 › selector generator › should prefer button over inner span @webkit-ubuntu-22.04-node18
⚠️ [webkit-library] › tests/library/selector-generator.spec.ts:68:5 › selector generator › should generate text for @webkit-ubuntu-22.04-node18
⚠️ [webkit-library] › tests/library/selector-generator.spec.ts:73:5 › selector generator › should trim text @webkit-ubuntu-22.04-node18
⚠️ [webkit-library] › tests/library/selector-generator.spec.ts:96:5 › selector generator › should try to improve label text by shortening @webkit-ubuntu-22.04-node18
⚠️ [webkit-library] › tests/library/selector-generator.spec.ts:540:5 › selector generator › should generate relative selector @webkit-ubuntu-22.04-node18
⚠️ [webkit-library] › tests/library/trace-viewer.spec.ts:90:1 › should show empty trace viewer @webkit-ubuntu-22.04-node18
⚠️ [webkit-library] › tests/library/trace-viewer.spec.ts:366:1 › should filter network requests by resource type @webkit-ubuntu-22.04-node18
⚠️ [webkit-page] › tests/page/page-leaks.spec.ts:82:5 › click should not leak @webkit-ubuntu-22.04-node18
⚠️ [webkit-page] › tests/page/page-leaks.spec.ts:107:5 › fill should not leak @webkit-ubuntu-22.04-node18
⚠️ [webkit-page] › tests/page/page-set-input-files.spec.ts:205:3 › should upload multiple large files @webkit-ubuntu-22.04-node18

37815 passed, 653 skipped
✔️✔️✔️

Merge workflow run.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants