-
Notifications
You must be signed in to change notification settings - Fork 3.2k
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
chore(webkit): fix WebKit network-related driver tests #23232
Merged
Merged
Changes from all commits
Commits
Show all changes
46 commits
Select commit
Hold shift + click to select a range
de8e6c3
detect playwright-webkit browser
flotwig d0d1736
fix: use stdio for CDP instead of TCP (#14348)
flotwig 818c7de
wip: begin launchin webkit
flotwig a7279e5
Merge remote-tracking branch 'origin/develop' into cy-webkit
flotwig 45b5286
run mode works w webkit in 10.0
flotwig ecd6f0f
reset previous cdp changes
flotwig 505c0dd
run driver webkit tests
flotwig 35b4039
always detect webkit in non-prod
flotwig ceba06f
fix version detection
flotwig 68ebaca
actually run new job
flotwig a5a0fc6
Merge remote-tracking branch 'origin/develop' into cy-webkit
flotwig f974e99
cleanup
flotwig 25b8fc9
fix run
flotwig 411a2f1
try caching pw binary
flotwig 83c58d5
npx install pw binary
flotwig def14cc
install-deps
flotwig e85025c
add experimentalSessionAndOrigin wk tests
flotwig 53db500
wk experimentalSessionAndOrigin tests
flotwig 12b3cab
browser icon
flotwig 37de56a
fix some tests
flotwig 32ed232
reset browsers.ts change
flotwig 3acc19b
fix more tests
flotwig 0681f0a
fix even more tests, skip driver CI for now
flotwig 67fdd2d
comma
flotwig 58b2d39
fix server-unit-test
flotwig 406d8ec
fix websockets_spec
flotwig 8fb785a
refactor wkautomation to initialize self from static async method
flotwig b997ff0
fix(proxy/prerequests): fix duplicate key behavior, fallthrough
flotwig 14270e1
Apply suggestions from code review
flotwig 43b2f0a
simpler name for StackMap
flotwig ad863e2
fix proxy-logging spec, some xhr specs
flotwig ebc6335
fix last xhr test
flotwig 6620008
update testConfigOverrides
flotwig c8c7ac7
skip webcam.cy.js
flotwig fb66f8f
reenable driver tests
flotwig 71639e2
ci?
flotwig 9ac53fd
Suggestions from code review
flotwig b7117fe
skip remaining failures which won't be fixed here
flotwig f6f2513
Merge branch 'cy-webkit' into webkit-prerequests
flotwig f4a432b
Merge remote-tracking branch 'origin/develop' into webkit-prerequests
flotwig 8ca3edc
fix/skip a couple tests
flotwig 82950c5
fix tests
flotwig cb3821c
skip crashy specs
flotwig 50c5ae6
skip hidden suites
flotwig bd3606c
Merge branch 'develop' into webkit-prerequests
flotwig 8b1f855
Update packages/server/lib/browsers/webkit-automation.ts
flotwig File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
3 changes: 2 additions & 1 deletion
3
packages/driver/cypress/e2e/commands/actions/type_errors.cy.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -1009,7 +1009,7 @@ describe('network stubbing', function () { | |
// a different domain from the page own domain | ||
// NOTE: this domain is redirected back to the local host test server | ||
// using "hosts" setting in the "cypress.json" file | ||
const corsUrl = 'http://diff.foobar.com:3501/no-cors' | ||
let corsUrl = 'http://diff.foobar.com:3501/no-cors' | ||
|
||
beforeEach(() => { | ||
cy.visit('http://127.0.0.1:3500/fixtures/dom.html') | ||
|
@@ -1043,14 +1043,20 @@ describe('network stubbing', function () { | |
}) | ||
|
||
it('can be overwritten', function () { | ||
cy.intercept('OPTIONS', '/no-cors', (req) => { | ||
if (Cypress.isBrowser('webkit')) { | ||
// WebKit appears to cache successful OPTIONS responses that happen in quick succession | ||
// so append a number to the corsUrl so the previous test doesn't cause this one to fail | ||
corsUrl += 'v2' | ||
} | ||
|
||
cy.intercept('OPTIONS', '/no-cors*', (req) => { | ||
req.reply({ | ||
headers: { | ||
'access-control-allow-origin': 'http://wrong.invalid', | ||
}, | ||
}) | ||
}) | ||
.intercept('/no-cors', (req) => { | ||
.intercept('/no-cors*', (req) => { | ||
req.reply(`intercepted ${req.method}`) | ||
}) | ||
.then(() => { | ||
|
@@ -2379,7 +2385,9 @@ describe('network stubbing', function () { | |
.and('include', 'content-type: application/json') | ||
}) | ||
|
||
it('can forceNetworkError', function (done) { | ||
// TODO(webkit): extremely flaky for some reason. need to figure out why and either fix | ||
// or disable forceNetworkError for experimental release | ||
it('can forceNetworkError', { browser: '!webkit' }, function (done) { | ||
const url = uniqueRoute('/foo') | ||
|
||
cy.intercept(`${url}*`, function (req) { | ||
|
@@ -2609,7 +2617,9 @@ describe('network stubbing', function () { | |
}) | ||
|
||
it('intercepts cached responses as expected', { | ||
browser: '!firefox', // TODO: why does firefox behave differently? transparently returns cached response | ||
// TODO: why does firefox behave differently? transparently returns cached response | ||
// TODO(webkit): fix+unskip. currently fails in WK because cache is disabled | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Is disabling the cache in WebKit something Playwright automation does, or something we do? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. PW automation. |
||
browser: { family: 'chromium' }, | ||
}, function () { | ||
cy.visit('/fixtures/empty.html') | ||
|
||
|
@@ -3062,7 +3072,9 @@ describe('network stubbing', function () { | |
.should('include', { foo: 1 }) | ||
}) | ||
|
||
it('can forceNetworkError', function (done) { | ||
// TODO(webkit): extremely flaky for some reason. need to figure out why and either fix | ||
// or disable forceNetworkError for experimental release | ||
it('can forceNetworkError', { browser: '!webkit' }, function (done) { | ||
const url = uniqueRoute('/foo') | ||
|
||
cy.intercept(`${url}*`, function (req) { | ||
|
@@ -3453,7 +3465,8 @@ describe('network stubbing', function () { | |
}) | ||
|
||
// @see https://github.com/cypress-io/cypress/issues/8934 | ||
it('can spy on a 304 not modified image response', function () { | ||
// TODO(webkit): fix+unskip. currently fails in WK because cache is disabled | ||
it('can spy on a 304 not modified image response', { browser: '!webkit' }, function () { | ||
const url = `/fixtures/media/cypress.png?i=${Date.now()}` | ||
|
||
cy.intercept(url).as('image') | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Surprised these tests don't "just work" - I would have thought basic browser APIs would be fairly uniform, since we trigger them with standard client side JS (assuming here, haven't looked at how
cy.shadow
actually works).Edit: some actually do just work, or at least, it seems that way on my machine.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actually this passed for me
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I skipped out the entire click.cy.js because of the large number of failures, I could've been more selective here. This will be unskipped by
experimentalWebKitSupport
release.