Commit Graph

16611 Commits

Author SHA1 Message Date
Zach Bloomquist fe3e2afbea chore: add env var checking to verify-mocha-results (#21211)
Co-authored-by: Ryan Manuel <ryanm@cypress.io>
2022-04-29 01:44:15 +00:00
Sam Tsai 51b4bdc2ce fix: do not override existingSession setup (#21226)
Co-authored-by: Emily Rohrbough <emilyrohrbough@users.noreply.github.com>
2022-04-28 16:56:44 -05:00
Bill Glesias bc01e44338 chore: rename multi-domain to origin paradigm (#21231) 2022-04-28 15:19:40 -04:00
Zach Bloomquist b62599481d chore: clean up root-level scripts (#21215) 2022-04-28 17:49:05 +00:00
Ryan Manuel 7fa946d479 chore: update the release guide to ensure all changes have prs and tweak the order (#21194) 2022-04-28 09:22:09 -05:00
github-actions[bot] 6b3e79d563 chore: Update Chrome (stable) to 101.0.4951.41 (#21222)
Co-authored-by: cypress-bot[bot] <2f0651858c6e38e0+cypress-bot[bot]@users.noreply.github.com>
2022-04-27 10:49:12 -05:00
renovate[bot] f9ad6a820e chore(deps): update dependency @percy/cli to v1.1.0 🌟 (#21219)
Co-authored-by: Renovate Bot <bot@renovateapp.com>
Co-authored-by: Zach Bloomquist <git@chary.us>
2022-04-27 03:28:15 +00:00
renovate[bot] fbaaeb78b2 chore(deps): update dependency @percy/cypress to ^3.1.1 🌟 (#21217)
Co-authored-by: Renovate Bot <bot@renovateapp.com>
Co-authored-by: Zach Bloomquist <git@chary.us>
2022-04-27 01:42:52 +00:00
Zach Bloomquist 2709b69e9e chore: cache Percy's Chromium browser at yarn install (#21218) 2022-04-27 01:07:35 +00:00
Bryan Lee 363c1a8a3a chore: replace git.io link with the original URL (#21206) 2022-04-26 21:07:26 +00:00
Blue F 30a9a2796e Merge pull request #20704 from sainthkh/issue-19116
fix: `cy.contains` and `should('contain')` handle backslash correctly.
2022-04-26 11:48:18 -07:00
Tyler Biethman 4972872a25 chore: Updating system test node modules cache logic to support binary tests (#21187)
* Updating state cache key names to limit improper fallback matches. Sorting output for cache key for cross-arch determinism.

* Trying to normalize cache output

* Lost tracking for this change somehow

* Changing key name to invalidate current cache.

* Tweaking install script

* Tweaking install script again

* Another commit to test existing cache

* Resetting keys for PR

* Whoops, this slipped into the last commit

* Missed one key rename somehow

* Update system-tests/scripts/cache-key.sh

Co-authored-by: Emily Rohrbough  <emilyrohrbough@users.noreply.github.com>

Co-authored-by: Emily Rohrbough  <emilyrohrbough@users.noreply.github.com>
2022-04-26 12:02:05 -05:00
Matt Henkes 3d7ab6addb Merge pull request #21192 from cypress-io/chore-remove-feature-multi-domain-from-circle-yml
chore: remove feature-multidomain branch from circle.yml
2022-04-25 16:59:28 -05:00
mjhenkes 2338635d02 chore: remove feature-multidomain branch from circle.yml 2022-04-25 16:10:43 -05:00
Ryan Manuel 2d866f387c release 9.6.0 [skip ci] v9.6.0 2022-04-25 12:39:03 -05:00
Matt Henkes 676fc97f46 Merge pull request #18075 from cypress-io/feature-multidomain
feat: Cross Origin Testing Support
2022-04-25 07:54:32 -05:00
Matt Schile f473d29b2c removing migration guide reference 2022-04-22 18:35:44 -06:00
mjhenkes b8ae51edbc Remove reference to migration guide 2022-04-22 19:11:02 -05:00
Matt Henkes d86674636b Update packages/runner-shared/src/event-manager.js
Co-authored-by: Zach Bloomquist <git@chary.us>
2022-04-22 15:27:50 -05:00
Chris Breiding 3e6d6bfe15 chore: Updates based on PR feedback (#21137)
* 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>
2022-04-22 14:58:02 -05:00
Matt Henkes ebaaf18268 Merge branch 'develop' into feature-multidomain 2022-04-22 09:31:41 -05:00
Bill Glesias a1101e6562 feat: support snapshots and console props within multi-domain (#20949)
* 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>
2022-04-22 10:30:40 -04:00
Kukhyeon Heo 0bb655e379 chore: remove command type todos (#20601)
Co-authored-by: Zach Bloomquist <git@chary.us>
Co-authored-by: Jennifer Shehane <jennifer@cypress.io>
Co-authored-by: Rachel <rachel@cypress.io>
Co-authored-by: Tyler Biethman <tbiethman@users.noreply.github.com>
2022-04-22 14:28:13 +00:00
Bill Glesias 885541ea5e improve error messages for unsupported APIs/commands 2022-04-22 09:41:35 -04:00
Matt Henkes f1644045fc Merge branch 'develop' into feature-multidomain 2022-04-21 16:36:40 -05:00
Ahmed Tarek 342bc06ae3 fix: prevObject types (#21106)
Co-authored-by: Emily Rohrbough <emilyrohrbough@users.noreply.github.com>
Co-authored-by: Rachel <rachel@cypress.io>
Co-authored-by: Tyler Biethman <tbiethman@users.noreply.github.com>
2022-04-21 15:54:50 -05:00
Matt Schile f819be315a Merge branch 'develop' into feature-multidomain 2022-04-21 09:53:49 -06:00
Matt Henkes e3161a0b37 chore: [Multi-domain] Break out separate CI tasks to test the driver with experimentalSessionAndOrigin on (#21148)
* Attempt to run tests without the feature flag and the multi-domain folder

* do it for real this time dummy

* trying circleci changes

* valid file???

* moar changes!

* i am a master of bash scripting

* try another exclude pattern

* one more time with feeling

* lets do it again

* maybe this?

* different parallel group

* lets try this

* updating tests phase 1

* updating tests phase 2

* Apply suggestions from code review

Co-authored-by: Matt Schile <mschile@gmail.com>

* Update tests

* Run more tests

* Re-locate system test

* Flex message for firefox

Co-authored-by: Matt Schile <mschile@gmail.com>
2022-04-21 09:32:47 -05:00
github-actions[bot] 55e7f8a231 chore: Update Chrome (beta) to 101.0.4951.41 (#21161)
Co-authored-by: cypress-bot[bot] <2f0651858c6e38e0+cypress-bot[bot]@users.noreply.github.com>
2022-04-21 03:25:54 -05:00
Kukhyeon Heo 81f8a85821 Fix typo. 2022-04-21 14:49:16 +09:00
Matt Schile d7ce86541d chore: (cross-origin) add support for redirecting back to primary (#21144) 2022-04-20 23:03:08 -06:00
dependabot[bot] 68173be4aa chore: bump minimist from 1.2.5 to 1.2.6 (#21134)
Co-authored-by: Lachlan Miller <lachlan.miller.1990@outlook.com>
2022-04-20 12:39:48 +10:00
Emily Rohrbough 86f5b49d2c chore(sessions): break out session utils and write some unit tests (#21048)
Co-authored-by: Matt Schile <mschile@gmail.com>
Co-authored-by: Bill Glesias <bglesias@gmail.com>
2022-04-19 11:00:16 -05:00
Zach Bloomquist afca88e7a9 chore: remove unused dependencies (#21092) 2022-04-19 14:51:21 +00:00
Matt Henkes f02d7509b0 chore: [Multi-origin] Correctly find the spec bridge if chromeWebSecurity set to false. (#21117)
* chore: [Multi-origin] Correctly find the spec bridge if chromeWebSecurity set to false.

* Update packages/runner/injection/multi-domain.js

Co-authored-by: Chris Breiding <chrisbreiding@users.noreply.github.com>

* Attempting a system test

Co-authored-by: Chris Breiding <chrisbreiding@users.noreply.github.com>
2022-04-18 16:24:45 -05:00
Zach Bloomquist 79267ddc0f fix: revert "fix: types for Cypress.Commands.add (#20376)" (#21104) 2022-04-15 19:03:36 +00:00
github-actions[bot] a0ed4a08e9 chore: Update Chrome (stable) to 100.0.4896.127 and Chrome (beta) to 101.0.4951.34 (#21083)
Co-authored-by: cypress-bot[bot] <2f0651858c6e38e0+cypress-bot[bot]@users.noreply.github.com>
2022-04-15 11:26:43 -05:00
Chris Breiding 890bde6a05 fix(multi-origin): Fix some issues with errors (#21071) 2022-04-15 12:19:48 -04:00
Ahmed Tarek 92d94252ca fix: types for Cypress.Commands.add (#20376) (#20377)
Co-authored-by: Emily Rohrbough <emilyrohrbough@users.noreply.github.com>
2022-04-15 15:35:45 +00:00
Tyler Biethman 71a18e4321 chore(deps): Bumping electron dependency to 15.5.1 (#21072)
* chore(deps): Bumping electron dependency to 15.5.1

* Updating Settings test that was producing flaky snapshots
2022-04-14 13:42:21 -05:00
Kukhyeon Heo e5002f0368 fix: cy.type('{enter}') on <input> elements submits the form correctly after Firefox 98. (#21042)
* fix: cy.type('{enter}') submits the form correctly after Firefox 98.

* simplify condition.
2022-04-14 10:24:08 -07:00
Zach Bloomquist 546ed16c77 fix(cli): show additional mitigation steps for max path length error (#21047) 2022-04-14 16:23:31 +00:00
Matt Henkes e4dcb12c50 Merge branch 'develop' into feature-multidomain 2022-04-13 15:51:10 -05:00
Chris Breiding c560caf6b1 feat(multi-origin): Group cy.origin commands (#21046)
Co-authored-by: Matt Henkes <mjhenkes@gmail.com>
2022-04-13 16:49:15 -04:00
Tom Udding 57dbc170e6 fix: Plugin error when sending on disconnected IPC channel (#21011)
* fix: Plugin error when sending on disconnected IPC channel

* Add unit test for new no send behaviour

Co-authored-by: Emily Rohrbough <emilyrohrbough@users.noreply.github.com>
2022-04-13 11:51:27 -05:00
Matt Schile 27e1afbdd7 chore: (multi-domain) renaming flag to experimentalSessionAndOrigin (#21053) 2022-04-13 10:50:17 -06:00
Matt Henkes dd3557f5f3 chore: [Multi-domain] Reset timeout after transition from before to it while unstable. (#21032)
* chore: [Multi-domain] Reset timeout after transition from before block to it block while unstable.

* enable clear timeout

* Adding tests and a comment

* Update packages/driver/src/cypress/command_queue.ts

Co-authored-by: Chris Breiding <chrisbreiding@users.noreply.github.com>

* Move tests to their own file.

Co-authored-by: Chris Breiding <chrisbreiding@users.noreply.github.com>
2022-04-13 08:07:52 -05:00
Matt Henkes 663e5d577e Merge branch 'develop' into feature-multidomain 2022-04-12 11:31:47 -05:00
Matt Schile d98d0e1e79 chore: (multi-domain) add experimentalLoginFlows to the settings page (#21030) 2022-04-12 09:23:58 -06:00
Emily Rohrbough 476f2ad12b chore: add internal types for cy.session command (#21028) 2022-04-12 10:00:18 -05:00