* chore: update ts-loader from v8 to v9
* chore: update sass-loader from v10 to v13
* chore: update postcss-loader from v4 to v7
* chore: update mini-css-extract-plugin from v1 to v2
* chore: update html-webpack-plugin from v4 to v5
* chore: update css-loader from v5 to v6
* chore: update copy-webpack-plugin from v6 to v 11
* chore: update babel and babel loader to latest
* chore: remove Url import from validation as it should be available globally
* chore: update coffee-loader to latest and coffeescript to 2.6.0. coffee
script > 2.6.0 has issues with packheard transpilation, which likely
isnt worth the squeeze here to update it further
* chore: fix react component tests with webpack 4 as babl loader 9 only works with webpack 5, so we need ot pin the dep to 8 in the system-test project
* chore: remove dependency on file-loader and opt for ubilt in assert handling where applicable. Additionally, remove react-svg-loader and move to svgr loader inside the runner to bundle svgs needed for react components. Make sure that all SVGs are being imported correctly
chore: tell webpack preprocessor to process svgs inside of e2e tests for
the reporter. We did not need this before because we were using
react-svg-loader, which was used directly in source to process the svg
and allowed the svg to work under test. Since the source code is now
bundler independent, we need to tell cypress to bundle the svgs under
test. To do this, we pass our webpack config into
@cypress/webpack-preprocessor to allow loading the svgs. This is not a
breaking change.
* chore: switch from hash to contenthash
* chore: remove use of moduleIds for chunkIds as the defaults are likely better and handle caching/debugging better
* chore: mark tests that need to be updated as node 12 and 14 are no longer supported. node 12 doesnt ship with fs/promises, which causes fatal errors with babel-loader 9
try to test against new docker images [run ci]
* chore: updating v8 snapshot cache
* chore: updating v8 snapshot cache
* chore: updating v8 snapshot cache
* skip http/https form submittal unit tests for experimental webkit due to the clientRoute 404ing after submitting
* chore: pin webpack 5 for component tests in cy in cy to prevent using 4 from hoisted deps [run ci]
* build binaries [run ci]
* chore: bump circle cache [run ci]
* fix: turn off svgo from @svgr/webpack to preserve our scss class names within the svg. see https://react-svgr.com/docs/options/#svgo [run ci]
---------
Co-authored-by: cypress-bot[bot] <+cypress-bot[bot]@users.noreply.github.com>
* chore: [run ci] does further prerequisites for webpack 5:
https://webpack.js.org/migrate/5/#make-sure-your-build-has-no-errors-or-warningshttps://webpack.js.org/migrate/5/#make-sure-to-use-modehttps://webpack.js.org/migrate/5/#update-outdated-optionshttps://webpack.js.org/migrate/5/#test-webpack-5-compatibility
app builds and runs locally. Time to test out in CI and see if buffer or
process need to be polyfilled by the build
* chore: upgrade to webpack 5 and do the bare minimum to get it working
* chore: get @packages/extension working
* chore: add TODOs to finish after webpack 5 update
* chore: update the webpack config for npm/webpack-batteries-included-preprocessor to be webpack 5 compliant
* chore: patch whatwg-url 7.1.0. package 'source-map' uses
whatwg-url@7.1.0 which has a dependency on punycode node expected API.
since punycode is now polyfilled for us implicitly via the punycode npm
package, the API signatures are a bit different
https://github.com/mathiasbynens/punycode.js/blob/main/punycode.js#L101
vs https://nodejs.org/api/punycode.html#punycodeucs2. The patch uses the
punycode npm package expected API and is needed for source maps to work
for cy.origin() dependencies for Cypress.require()
* chore: convert whatwg patch into dev patch as source-map is not installed when building the binary / installing prod dependencies
* chore: only move production level patches into the binary dist directory for yarn install --production
* chore: remove --openssl-legacy-provider code for node versions 17 and over as webpack has been updated to v5
* chore: fix the webpack-batteries-included-preprocessor tests by shimming the correct node globals and built ins
* chore: provide the define plugin and evalDevtoolPlugin again as we need define in order to build the react-dom library correctly in the bundle to not include the development version
* chore: updating v8 snapshot cache
* chore: updating v8 snapshot cache
* chore: updating v8 snapshot cache
* chore: fix the webpack preprocessor not to change promise references under the hood when compiling the first bundle, as it was causing the webpack preprocessor to hang as the reference itself was different
* chore: fix issues from readFile that were caused by Webpack 5 using 'path-browserify'
* chore: update chrome component testing snapshots to match Webpack 5 changes
* chore: fix mismatched snapshots from webpack 5 update
* chore: use Cypress.Buffer instead of Buffer for selectFile system test to avoid having to polyfill Buffer from webpack
* chore: fix system test webpack path that now includes e2e workspace
* chore: patch enhanced-resolve to properly discover the pnp api for the yarn_v3.1.1_pnp_spec.ts system test. see https://github.com/webpack/enhanced-resolve/issues/263 for more details
* chore: set stats to 'none' for experimentalSingleTabMode to prevent different webpack compiled terminal formatting in the snapshot between local and CI.
* chore: fix node built in tests and configure webpack-batteries-included-preprocessor correctly
* chore: fallback to buffer correctly in config, even though there is no impact due to the provide plugin
* Update binary-cleanup.js to exclude added build dependencies for webpack
5 added by webpack-terser-plugin under the hood
* chore: add stream-browserify to webpack preprocessor batteries included as a dep as its used in the config [run ci]
* chore: make sure process and buffer are installed in the CLI for webpack provide
* chore: build cross platform binaries [run ci]
* chore: fix webpack evalDevToolPlugin instantiation [run ci]
* run all binary jobs [run ci]
* chore: updating v8 snapshot cache
* add find-up to the entry points that need to be kept
* chore: updating v8 snapshot cache
* chore: updating v8 snapshot cache
* chore: fix mocha build warnings
* chore: fix STRIPPED_INTEGRITY_TAG import warnings
* chore: add changelog event
---------
Co-authored-by: cypress-bot[bot] <+cypress-bot[bot]@users.noreply.github.com>
Co-authored-by: Ryan Manuel <ryanm@cypress.io>
* chore: upgrade webpack dependencies to latest sub 5 compat [run ci]
* chore: updating v8 snapshot cache
* chore: updating v8 snapshot cache
* chore: updating v8 snapshot cache
* chore: build binaries [run ci]
* chore: update snapshot for darwin
* chore: downgrade tsconfig-paths-webpack-loader from v4 to v3 [run ci]
* [run ci]
* chore: add rimraf in @packages/runner to use in prebuild command to clear out dist directory to get windows compat [run ci]
* don't pass -rf flags into rimraf as it is inherit with the command
---------
Co-authored-by: cypress-bot[bot] <+cypress-bot[bot]@users.noreply.github.com>
* chore: add regression tests for duplicate cookies and bad expiry times
* avoid prepending domain with dot for cookies that are set with the server side jar. This is to avoid the cookie being duplicated if it is set or overridden in a different context (request that can actually set the cookie or via document.domain)
* feat: use cookie.toString() in the cookie patch to more accurately set cookies on the document, which should include other properties besides key=value
* fix: add logic to handle expired cookies in the document.cookie patch, as well as in CDP
* chore: build binary for cookie fixes for users to test
* chore: change name of fixture to something more accurate
* chore: comment why we are using the toughCookie toString method in the patch
* [run ci]
* chore: add changelog entry
* [run ci]
* fix: revert back to key=value when getting document.cookie as those are the only values are displayed (oversight on my end)
* [run ci]
* chore: make compatible with cypress.require
* fix: add tests for hostOnly/non hostOnly cookies to make sure property gets sent up to automation client correctly. No longer need custom cookie prop to determine destination
* [run ci]
* fix: stale unit test
* chore: adjust comments
* [run ci]
* fix: bad domain logic
* [run ci]
* chore: remove irrelevant comment
* [run ci]
* fix: adjust cookie login text to spec hostOnly cookie within the cookie patch. This should yield the same behavior as we are bound to same origin within the spec bridge
* [run ci]
* [run ci]
* fix: allow for cookies on request of same key to take precedence over cookies in the jar, regardless of how many hierachy cookies exist in the jar
* chore: fix cookie misc tests for cy.origin (dont run cy.origin)
* [run ci]
* chore: skip misc cookie tests in webkit as headless behavior doesn't clear cookies between tests correctly
* Revert "fix: allow for cookies on request of same key to take precedence over cookies in the jar, regardless of how many hierachy cookies exist in the jar"
This reverts commit 17de1883ab.
* [run ci]
* chore: split changelog entry into two parts
* chore: update logic to remove else statement and add comments
* [run ci]
* chore: readd windows snapshot branch in workflows
* [run ci]
* chore: fix workflows from bad merge
* [run ci]
* Revert "chore: split changelog entry into two parts"
This reverts commit 4352ef5f3e.
* [run ci]
* React to vue
* Goodbye dom.
* Use event modifier.
* Remove leading underscore in names
* Use modifier.
* Add flip, shift options.
* Use createPopper instead of floating-ui.
* Remove unnecessary dependencies.
* addAssertion to event.
* setPopperElement to event.
* Strong types.
* clarify test.
Co-authored-by: Blue F <blue@cypress.io>
* fix: spec bridges no-longer create their own spec bridge but instead use post message to communicate with the primary instance.
* fix test errors
* fix tests, ignore change to cookie
* Move patch code into injection
* Code cleanup
* Fix most failing tests
* Enable patching for both spec bridges and the primary cypress instance.
* clean up
* Updates from self PR review
* Remove before each limiting spec bridges.
* rename attach function
* whoops, better call the function with the correct parameters
* Apply suggestions from code review
Co-authored-by: Chris Breiding <chrisbreiding@users.noreply.github.com>
* Update packages/driver/src/cross-origin/communicator.ts
Co-authored-by: Chris Breiding <chrisbreiding@users.noreply.github.com>
* Apply suggestions from code review
* Apply suggestions from code review
Co-authored-by: Bill Glesias <bglesias@gmail.com>
* updated test name
Co-authored-by: Chris Breiding <chrisbreiding@users.noreply.github.com>
Co-authored-by: Bill Glesias <bglesias@gmail.com>
* chore: enforce strict origin spec bridges
chore: refactor spec bridges to strictly enforce same origin
fix: wrap fullCrossOrigin injection around feature flag inside buffered response
* fix: do NOT set the initial cypress cookie inside the spec bridge as it is sending unecessary cookies
* chore: simplify the finding cypress in the injection code
* chore: change order in which callback fn is declared
* chore: add spec bridge performance issue to validation tests
* Initial async changes
* Small fixes and test updates.
* updating tests
* Fixes for cookie login tests
* remove the onlys
* Most tests passing
* Fix driver tests?
* fix firefox test?
* fix unit tests
* fix tests??
* a better check
* fix integration tests
* minor cleanup
* Comment out tyler fix for 10.0 origin issue
* also fix integration tests
* remove fixmes
* Adding Retries for cookie actions. May break other error tests.
* Address (some) PR comments
* update to warn about cross origin command AUT in assertions
* Fix type errors
* Move document.cookie patch to injection
* Adding iframe patching.
* forward errors prior to attaching
* Add error message when using visit to visit a cross origin site with the onLoad or onBeforeLoad options.
* Attempt to fix test errors.
* more fixes, but not all
* use the origin policy
* Fix types
* more fixes
* consider chromeWebSecurity when checking if you can communicate with the AUT
* firefox
* prevent hangs if before unload happens after on load.
* Fix some ToDos
* code cleanup
* remove quotes
* Code review changes
* more cr changes
* fix tests possibly
* for realz this time
* roll back change
* Fix some flake
* Fix flakey xhr test hopefully.
* oops, forgot communicator changes. need those.
* modify error message to not lose the original error
* read config right derp
* simpler check
* no unused vars
* don't put config on window
* Make isRunnerAbleToCommunicateWithTheAUT a util function instead of attaching it to cypress.
* fix a race condition maybe
* clear document when window is cross origin... we'll see if this breaks anything.
* Retry if querying against the wrong AUT
* use timeout
* Don't print the retrying string unless you're retrying due to command aut origin mismatch
* try handling undefined document
* Code review updates. What could go wrong??
* Apply suggestions from code review
Co-authored-by: Bill Glesias <bglesias@gmail.com>
* minor fixes
* try aut location and move the async state collection.
* fix flake around the loading message, probably
* Fix system tests and some flake around redirect counts.
* Improve error handler prior to attaching.
* Code review suggestions
* use a generated ID when promisifying post message
* clean up promise helper
* skip xhr test until issue is resolved.
* Apply suggestions from code review
Co-authored-by: Chris Breiding <chrisbreiding@users.noreply.github.com>
* use state directly
* Apply suggestions from code review
Co-authored-by: Bill Glesias <bglesias@gmail.com>
* Update packages/driver/src/cypress/error_messages.ts
Co-authored-by: Chris Breiding <chrisbreiding@users.noreply.github.com>
Co-authored-by: Bill Glesias <bglesias@gmail.com>
Co-authored-by: Chris Breiding <chrisbreiding@users.noreply.github.com>
* chore: wire up Cypress Studio (#23413)
* wip
* wip
* wip - spike
* more wip [skip ci]
* update style
* fix ts
* move types around
* extract types
* lint
* fixing tests
* fix component test
* skip some tests
* do not error on experimentalStudio flag
* add studio controls placeholder
* fixing tests
* revert
* revert changes
* rename store
* rename method
* remove comment
* refactor
* correctly feature flag studio
* simplify code
* simplify code
* lift check into useEventManager
* correctly hide create studio prompt based on flag;
* remove superfulous css
* rename variables
* fix bugs
* wip
* unskip tests
* unskip more tests
* fix a bug in the assertion API
* fix bug in assertions [skip ci]
* wip - bugs [skip ci]
* feat: add experimentalStudio flag back (#23506)
Co-authored-by: astone123 <adams@cypress.io>
* chore: Add Studio UI to Cypress 10 (#23537)
* wip
* wip
* wip - spike
* more wip [skip ci]
* update style
* fix ts
* move types around
* extract types
* lint
* fixing tests
* fix component test
* skip some tests
* do not error on experimentalStudio flag
* add studio controls placeholder
* fixing tests
* revert
* revert changes
* rename store
* rename method
* remove comment
* refactor
* correctly feature flag studio
* chore: wip add barebones studio modals
* simplify code
* simplify code
* lift check into useEventManager
* correctly hide create studio prompt based on flag;
* remove superfulous css
* chore: style studio toolbar
* chore: misc feedback
* chore: remove studio store prop
* chore: studio URL prompt and other changes
* update component
* chore: UI styling and remove studio init modal
* chore: revert unnecessary changes
* chore: fix types
* chore: fix some tests, minor refactor (#23545)
* fix test
* fix test
* add noHelp link to StandardModal
Co-authored-by: Lachlan Miller <lachlan.miller.1990@outlook.com>
* test: studio e2e tests (#23546)
* add basic e2e test
* add some e2e tests for studio and a note on limitations
* additional spec
* add more tests, refactor helper
* fix bug in studio
* remove test code
* chore: UI feedback
* fix race condition
* update tests
* rename test
* improve types in reporter
* remove dead code
* improve tests
* merge tests into one spec
* chore: Cap instruction modal width; exit studio mode when new spec is chosen
* chore: Only render studio error when test has failed; add test for studioEnabled
* correctly check if command is studio or not
* improve specs and hopefully reduce flake
* communicate studio state from app->reporter
* receive studio save state validity from app
* fix test
* improve test coverage
* fix external link
Co-authored-by: astone123 <adams@cypress.io>
* fix iframe performance issues in electron
* reduce 1000ms to 300ms for cross:origin:release:html
* reduce shouldWithTimeout from 3000ms to 250ms
* Update system-tests/projects/e2e/cypress/e2e/spec_bridge.cy.ts
Co-authored-by: Chris Breiding <chrisbreiding@users.noreply.github.com>
* add some regression tests around screenshot size when taking screenshots within cy.origin
* move screenshot e2e tests from system-tests into the driver
* move spec bridge system test into driver test
* add additional comments to spec bridge iframe scss for caution
* resolve snapshots directory correctly in open vs run mode
* revert this commit to see if assets are being tampered with or just missing in CI
* fix check:screenshot:size to always point to correct screenshot path
* remove isCypressRunMode from cypress config as internal flag as we no longer need it
* add check:screenshot:size to task.cy.js registered plugin assertion
Co-authored-by: Chris Breiding <chrisbreiding@users.noreply.github.com>
* chore(sessions): break out sessions manager code
* manager manages registered sessions
* some unit tests
* add more tests and some slight clean up
* .
* fix run mode issue.
* bind correctly for spies
* remove types. not sure on the return values.
* fix tests
* check in dump
* add some command tests
* more driver tests and fix session config error
* Fix parsing error argument
* test for failed validation error messges
* wait for diff pr
* update ui tests
* add more ui tests
* align with 10.0 test setup
* clean up
* will add later
* fix
* fix tests
* baseline for session flow tests
* test for logs...lots here....
* update log attrs to be able to collect session logs for tests
* refactor flows, fix grouping bugs and align validation fail text
* update UI test these changes fixed.
* fix test failures observed in run mode
* reduce flake in log updates
* add generic to cy.origin type
* fix log type, update/add comments
* fix comment indentation
* specific generic
* move RemoteState to internal types
* add on links to experimental flag descriptions
* chore: reduce nesting by flipping condition
* fix test title
* simplify failing log
* rename variable
* delete error property
* fix types
* fix type
* remove unnecessary todo
* update wait test
* jquery -> this
* update comment
* remove vestigial autoRun
* use finally
* re-throw non-security errors
* move back getting index
* add new state types
* remove unnecessary export
* startsWith -> includes
* it -> them
* update system test
* remove use of promise constructor
* Revert "remove use of promise constructor"
This reverts commit 35ccc28b6f.
* log errors from Page.getFrameTree
* test if anything breaks when removing optional chaining operator
* remove vestigial file
* handle queue ending in cross-origin driver
* fix coordinates spec
* improve chrome/firefox check in extension
* improve secure cookie regex
* use production mode for cross-origin driver bundle
* adding remoteStates.getPrimary
* catch and ignore queue errors
* remove optional chaining in postMessage handler
* removed unnecessary async
* update frame tree on cri client reconnect
* fix formatting
* renaming remoteStates variable
* prevent requests from being paused if experimentalSessionAndOrigin flag is off
Co-authored-by: Matt Schile <mschile@cypress.io>
* Empty commit to get a new percy nonce
* Implement snapshots and consoleprops within multi origin
further progress with getters
cleaned up log/snapshot serialization
attempt to pass and hydrate value state of serialized dom elements
temp commit traversal dom
by some stretch of a miracle this is working...
still somehow working
after massive performance issues with full tree serialization, fix here is to just attach values to inputs for reifying on primary
now we are cookin
test WIP
tests WIP
working multi-domain actions snapshots tests
added more tests to verify snapshots
add tests and refactor certain tests to make simpler
added misc snapshot tests
add navigation snapshot placeholder
add network request snapshot tests
add shadow querying snapshot tests
update test names
added snapshot querying spec
added screenshot snapshot test
add spies,clocks, and stubs tests
implement snapshot tests for traversal commands
rename local storeage snapshot tests to fit convention
add viewport snapshot tests
rename snapshot traversal to fit naming convention
add snapshot waiting tests
added window snapshot tests
implement navigation snapshot tests now that sinon proxy issues internal to log are now fixed
refactor multi-domain snapshot tests to leverage utility method over redefining in each spec
* fix lint types issues on serializationKeys
* rename switchToDomain to origin (might help with failing tests... ya know?)
* rename snapshot files to fit origin paradigm and fix misname on primaryDomainCommunicator
* fix .tick() snapshot/consoleProps test (figure out the deal with consoleProps sometimes being a function)
* rename multiDomainCommunicator to origin primaryDomainCommunicator
* don't invoke functions with arguments (we need to be more explicit about the functions we are invoking
* opt for my explicit serialization behavior with functions, never attempt to serialize bluebird promises
* move serialization to folder and change name to index
* refactor log serialization to own file, clean up code and add comments to what is going on in this 'here be dragons' code
* make sure to serialize functions for snapshots
* fix pause snapshot test for multi origin
* refactor postprocess snapshot into own method to handle in final state snapshot processing for cross origin
* update snapshot comments to be more accurate
* fix renamings within tests
* fix path in log.ts serialization
* revert about:blank changes in aut-iframe which was breaking session
* move all log/snapshot serialization magic invokations into the communicator
* update typos and fix namings of preprocess and reify
* further name changes
* fix snapshot generator to always reify snapshot (<body>) over attempting to match in the DOM
* unskip test that was fixed with explicit function serialization for logs
* fix flaky screenshot test that was screensize dependent
* rename a few items in the log serialization file
* clean up snapshot style reification to be more straightforward and remove redundancies
* refactor snapshots code to be more readable
* update reifyDomElement docs to actually explain what hte method does
* fix typos within the log serialization file pertaining to comments
* use Cypress._ over lodash import to reduce spec bundle size
* remove snapshots test folder and migrate tests into commands directory with #consoleProps context blocks for each
* change removeSrcAttributeFromAUTIframe name to removeSrcAttribute as it is implied on the AUT
* update log consoleProps comment to better reflect cross origin nature
* remove skipped consoleProps tests that do not have a command log to test against
* add createSnapshot to internal types (might need more specifics on this)
* refactor multi-domain consoleProp tests to use shouldWithTimeout custom command to avoid setTimeouts on command queue event to make test implementation cleaner
* simplify DOM hydration for input based elements
* update preprocessedHTMLElement type
* clean up some documentation and remove TS ignores. added getStyles to internal-types.
* add comment to aut-iframe on src attr removal for posterity
* reverse snapshot ternary for readability
* add shouldWithTimeout into spec-types and refactor out of internal-types
* add getAll type to cypress spec-types
* compare originPolicy of top and AUT instead of just origin to make snapshots work in subdomains
* add comment to _storeOriginalState for future developers and to add clarity
* add some basic log serialization tests that show full pre/reification of log, as well as state hydration for innerHTML. break out object/array methods from log like serialization into own methods
* update variables to metasyntactic
* add renderProps assertion for cy.request
* apply suggestions from code review to clean up log serializer
* make snapshot serialization more generic and typesafe
* work around firefox 93 issues by unsetting the document in cy state as the document is in a cross origin context in the primary, which means accessing any elements will not work
* clean up code and implement suggestions in code review
* remove crossOriginLog in favor of nullish coalescing if visible on the log is not set
* if get is null, return null for whole snapshot
Co-authored-by: Ryan Manuel <ryanm@cypress.io>
Co-authored-by: Matt Henkes <mjhenkes@gmail.com>