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

breaking: no longer inject document.domain by default #30770

Merged
merged 95 commits into from
Jan 6, 2025
Merged
Changes from 1 commit
Commits
Show all changes
95 commits
Select commit Hold shift + click to select a range
5b42419
remove experimentalSkipDomainInjection, add and deprecate injectDocum…
cacieprins Oct 17, 2024
151952d
remove experimentalSkipDomainInjection, add injectDocumentDomain
cacieprins Oct 17, 2024
dc4fb0b
begin rethreading domain injection
cacieprins Oct 18, 2024
330adc4
complete document domain transition
cacieprins Oct 21, 2024
2000405
move some cookie specs to separate test run
cacieprins Oct 22, 2024
0f822b5
origin and privileged commands with default docdom inject
cacieprins Oct 23, 2024
8275e4d
fix privileged channel when injecting document domain
cacieprins Oct 23, 2024
4a52817
rm unnecessary .getOrigin abstraction in cors lib
cacieprins Oct 23, 2024
b3b60a1
move remote-states in prep for refactor Replace Conditional with Poly…
cacieprins Oct 23, 2024
a8f6406
refactor remote states to strategy pattern
cacieprins Oct 24, 2024
c54224b
cookie commands work as expected w cross origin bridge on different o…
cacieprins Oct 28, 2024
110996b
some origin tests updated
cacieprins Oct 30, 2024
4895219
run tests with document domain enabled
cacieprins Oct 30, 2024
33d33cd
run tests actually
cacieprins Oct 30, 2024
1d348c9
use correct config, swap conditional
cacieprins Oct 30, 2024
8b943d0
check-ts
cacieprins Oct 30, 2024
1166858
inject documetn domain for webkit tests
cacieprins Oct 30, 2024
25c3ac7
do not exec injectDocumetnDomain in parallel
cacieprins Oct 30, 2024
b4c0be3
fix ServerBase construction in tests to include cfg now
cacieprins Oct 31, 2024
3e613f0
pass cfg to ServerBase
cacieprins Oct 31, 2024
b6090f7
improved integration tests
cacieprins Oct 31, 2024
4da149d
remove document domain checks for all server integration specs - will…
cacieprins Nov 1, 2024
9bcc1f3
tests for injecting document domain when configured to
cacieprins Nov 1, 2024
e8ccb4d
square away server integration tests
cacieprins Nov 5, 2024
db047b7
ensure cookies are set correctly, potentially
cacieprins Nov 7, 2024
55fa5b1
errors pkg snapshots
cacieprins Nov 7, 2024
018816c
fix config tests
cacieprins Nov 8, 2024
5622cc5
fixing config tests
cacieprins Nov 8, 2024
b01df45
somewhat improves tests for cors policies in packages/network
cacieprins Nov 12, 2024
03f34bb
fix ts err in server-base
cacieprins Nov 12, 2024
c3ac388
Merge branch 'release/14.0.0' into cacie/29590/document-domain-subdom…
cacieprins Nov 12, 2024
376627b
enable injectDocumentDomain for cy in cy tests
cacieprins Nov 13, 2024
52156bf
fix Policy type ref
cacieprins Nov 13, 2024
18ae100
refactor cypress-schematic ct spec to be less prone to timeouts
cacieprins Nov 14, 2024
e66d194
run vite-dev-server tests with injectDocumentDomain
cacieprins Nov 14, 2024
19ce24e
rm document domain assertion from page_loading system test
cacieprins Nov 14, 2024
3d2a0c1
add system tests that test with injectDocumentDomain and others that …
cacieprins Nov 15, 2024
edbdb36
fix results_spec snapshot
cacieprins Nov 15, 2024
dd9a50d
update experimentalSkipDomainInjection system test
cacieprins Nov 18, 2024
70c0a8f
different behavior for certain net_stubbing tests based on injectDocu…
cacieprins Nov 19, 2024
29110af
fix ts
cacieprins Nov 19, 2024
e1e0829
extract origin key logic from remote states, for now
cacieprins Nov 21, 2024
ec669b8
move server-base and response-middleware over to new pattern
cacieprins Nov 21, 2024
e448022
WIP - reentry
cacieprins Nov 22, 2024
e19fb59
Merge branch 'release/14.0.0' into cacie/29590/document-domain-subdom…
cacieprins Dec 4, 2024
9a1c30e
fix build, remove console.log
cacieprins Dec 4, 2024
e97d548
check-ts
cacieprins Dec 4, 2024
941701f
fix spec frame injection
cacieprins Dec 5, 2024
e651ef6
remove injection for localhost
cacieprins Dec 5, 2024
0ec1b12
mostly fix vite-dev-server app integration tests
cacieprins Dec 6, 2024
5de96f0
fix codeframe in certain cases in chrome
cacieprins Dec 9, 2024
0d6b14d
drop internal stack frames from stacks intended for determining code …
cacieprins Dec 10, 2024
5afda0f
some improvements to vite ct error codeframes
cacieprins Dec 13, 2024
6cde8b9
fix proxy unit tests to use document domain injection util class
cacieprins Dec 13, 2024
69b7f6b
rm .only
cacieprins Dec 13, 2024
ddce890
fix all vite ct error specs
cacieprins Dec 13, 2024
a6b486f
rm console.log
cacieprins Dec 13, 2024
a857a38
slight refactor to util class to make easier to test
cacieprins Dec 16, 2024
ec653df
fix refactor - missing rename in files.js
cacieprins Dec 16, 2024
81cacf8
several tests do not set testingtype in config, so just check against…
cacieprins Dec 16, 2024
125b41e
revert changes to getInvocationDetails to see if that breaks tests
cacieprins Dec 17, 2024
1dcc5ab
re-enable stack stripping in invocation details for chrome
cacieprins Dec 18, 2024
7378f8e
new snapshots with more accurate invocation details
cacieprins Dec 18, 2024
af8f2a7
test for same-site cross-origin cookie behavior
cacieprins Dec 18, 2024
40ea65a
ignore window.top ts errors
cacieprins Dec 18, 2024
e4cdd85
Merge branch 'release/14.0.0' into cacie/29590/document-domain-subdom…
cacieprins Dec 18, 2024
361b066
revert forcing injectDocumentDomain in vite-dev-server cy config
cacieprins Dec 18, 2024
3de7b83
fix normalized whitespace for firefox "loading_failed" error
cacieprins Dec 18, 2024
b560617
always trim trailing wsp from stack before appending additional content
cacieprins Dec 19, 2024
3966f54
force normalization of whitespace to three \n when adding additional …
cacieprins Dec 19, 2024
b8cfc70
normalize wsp between stack and additional stack to "\n \n" in firefox
cacieprins Dec 19, 2024
0300676
remove stack_utils attempt at normalizing wsp
cacieprins Dec 19, 2024
4e090de
various cleanup: remove commented console logs, add more detailed com…
cacieprins Dec 20, 2024
58db915
add on links to error messages
cacieprins Dec 20, 2024
728e4bf
remove experimentalSkipDomainInjection from exported type defs
cacieprins Dec 20, 2024
bed8fb3
Update system-tests/test/experimental_skip_domain_injection_spec.ts
cacieprins Dec 20, 2024
a0a151a
Update packages/driver/cypress/e2e/e2e/origin/cookie_misc.cy.ts
cacieprins Dec 20, 2024
6c52c93
no need to coerce a boolean value to a booleanc
cacieprins Dec 20, 2024
34e0573
export base config from primary cypress config in driver for use in i…
cacieprins Dec 20, 2024
c03e62b
lift experimentalSkipDomainInjection breaking option to root
cacieprins Dec 20, 2024
0539a72
rollback config/options changes
cacieprins Dec 20, 2024
a8f0663
rm invalid comment
cacieprins Dec 20, 2024
fb1219c
use hostname instead of origin to create cookie from automation cookie
cacieprins Dec 20, 2024
ea57654
clarify stack regex in results_spec
cacieprins Dec 20, 2024
b86bd00
lint
cacieprins Dec 20, 2024
a20a34e
Merge branch 'release/14.0.0' into cacie/29590/document-domain-subdom…
jennifer-shehane Dec 23, 2024
1bece96
take a stab at the changelog entries for this
jennifer-shehane Dec 23, 2024
8ce3f5e
Merge branch 'cacie/29590/document-domain-subdomains' of https://gith…
jennifer-shehane Dec 23, 2024
d7885cc
Update cli/CHANGELOG.md
cacieprins Jan 3, 2025
4149c3a
Update cli/CHANGELOG.md
cacieprins Jan 3, 2025
330e4e3
Merge branch 'release/14.0.0' into cacie/29590/document-domain-subdom…
cacieprins Jan 3, 2025
d0dfff3
reenable locally-failing test
cacieprins Jan 3, 2025
b5bfe47
changelog
cacieprins Jan 3, 2025
1fd3fee
snapshot updatesfor experimental skip domain injection err msg
cacieprins Jan 3, 2025
9584093
remove packageManager declaration in package.json
cacieprins Jan 3, 2025
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
drop internal stack frames from stacks intended for determining code …
…frame data
cacieprins committed Dec 10, 2024
commit 0d6b14dd412b2a759af5f2c6aa6d804ef5f07d7b
14 changes: 6 additions & 8 deletions packages/driver/src/cypress/stack_utils.ts
Original file line number Diff line number Diff line change
@@ -109,18 +109,15 @@ const getInvocationDetails = (specWindow, config) => {
// note: specWindow.Cypress can be undefined or null
// if the user quickly reloads the tests multiple times

// firefox throws a different stack than chromium
// which includes stackframes from cypress_runner.js.
// firefox and chromium include stackframes from cypress_runner.js.
// So we drop the lines until we get to the spec stackframe (includes __cypress/tests)
if (specWindow.Cypress && (
specWindow.Cypress.isBrowser('firefox') || specWindow.Cypress.isBrowser('chrome')
)) {
if (specWindow.Cypress) {
stack = stackWithLinesDroppedFromMarker(stack, '__cypress/tests', true)
}

const details: InvocationDetails = getSourceDetailsForFirstLine(stack, config('projectRoot')) || {};
const details: InvocationDetails = getSourceDetailsForFirstLine(stack, config('projectRoot')) || {}

(details as any).stack = stack
;(details as any).stack = stack

return details as (InvocationDetails & { stack: any })
}
@@ -410,8 +407,9 @@ const reconstructStack = (parsedStack) => {
const getSourceStack = (stack, projectRoot?) => {
if (!_.isString(stack)) return {}

const withDroppedInternal = stackWithLinesDroppedFromMarker(stack, '__cypress/tests', true)
const getSourceDetailsWithStackUtil = _.partial(getSourceDetailsForLine, projectRoot)
const parsed = _.map(stack.split('\n'), getSourceDetailsWithStackUtil)
const parsed = _.map(withDroppedInternal.split('\n'), getSourceDetailsWithStackUtil)

return {
parsed,