Commit Graph

255 Commits

Author SHA1 Message Date
Emily Rohrbough 797c8f8d77 chore: update session api types & exposed global helpers (#24980)
Co-authored-by: Matt Schile <mschile@cypress.io>
Co-authored-by: Chris Breiding <chrisbreiding@users.noreply.github.com>
2022-12-06 08:19:39 -06:00
Matt Henkes 5a0313dd44 chore: run tests for cy.origin (#24947)
* chore: run tests for cy.origin

* enable experimentalModifyObstructiveThirdpartyCode

* Disabling cleaning subjects

* Bump memory for driver integration tests

Co-authored-by: Emily Rohrbough <emilyrohrbough@users.noreply.github.com>
2022-12-02 15:28:10 -06:00
Emily Rohrbough 79ea453764 chore(v12): merge develop into release/12.0.0 (#24705)
Co-authored-by: amehta265 <65267668+amehta265@users.noreply.github.com>
Co-authored-by: Bill Glesias <bglesias@gmail.com>
Co-authored-by: mattvCypress <mattv@cypress.io>
Co-authored-by: Ryan Manuel <ryanm@cypress.io>
Co-authored-by: Lachlan Miller <lachlan.miller.1990@outlook.com>
Co-authored-by: Jordan <jordan@jpdesigning.com>
Co-authored-by: Adam Stone <adams@cypress.io>
2022-11-18 16:02:31 -06:00
Chris Breiding e4be9697bd Merge branch 'develop' into merge-develop-v12-2022-11-14-take-2 2022-11-14 13:57:38 -05:00
Blue F 9ae911f396 feat: Queries, Detached DOM, and Retry-Ability (#24628)
* feat: Commands.addSelector, and migrate .get() to be a selector

* Fix for failed tests

* Last test fix

* More test fixes

* Self review changes

* Remove the concept of prevSubject from selectors entirely

* Rename addSelector to addQuery

* Quick fix for last commit

* Fix TS

* Fix merge from develop

* Add types and other review updates

* Increase timeout to try fixing flakiness

* Rename addQuery to _addQuery

* Fix typo in previous commit

* Fix TS

* Include AUT assertion in cy.get()

* Fix for previous commit

* Review feedback

* Minor test improvement

* Swifter failure on sizzle syntax error

* Better solution for refetching current subject in verifyUpcomingAssertions

* Command IDs now include their chainerId

* Revert "chore: Revert "feat: _addQuery() (#23665)" (#24022)"

This reverts commit f399994e9f.

* feat: move .contains() and .shadow() to be queries; remove cy.ng() (#23791)

* First stab at removing old .get() implementation

* Fix TS and a couple of tests

* Fix tests and TS

* Fix case-sensitivity for .contains()

* Stop TS complaining

* Rework cy-contains jquery expression

* Add comments, make ts happy

* Fix one test, review feedback

* Review updates

* Fix additional tests

* Fix accidental deletion of vital code

* One more try at getting logs right

* Fix race condition in cross-origin .contains

* Add commented out test to ensure .within() works properly with selectors

* Fix for sessions + query subject chaining

* Fix mixing .within() shadow DOM and .contains() in same chainer

* One more attempt at .within + .contains

* Fix rebase commits

* feat: addQuery Remaining Queries (#24203)

* First stab at removing old .get() implementation

* Fix TS and a couple of tests

* Fix tests and TS

* Fix case-sensitivity for .contains()

* Stop TS complaining

* Rework cy-contains jquery expression

* Add comments, make ts happy

* Fix one test, review feedback

* Review updates

* Fix additional tests

* Fix accidental deletion of vital code

* One more try at getting logs right

* Fix race condition in cross-origin .contains

* Add commented out test to ensure .within() works properly with selectors

* Fix for sessions + query subject chaining

* Fix mixing .within() shadow DOM and .contains() in same chainer

* One more attempt at .within + .contains

* Fix rebase commits

* Update many commands to be queries; improve log message around invalid subjects

* Update connectors, location, focused and window commands to queries

* Return noop to a command and not a query (to avoid implicit assertions)

* More test fixes

* Fix test failures

* Fix for weird-ass frontend-component test

* Error message improvements

* Fix for broken system test

* Update withinSubject to use subject chain

* Test clarifications

* Unbreak cypress-testing-library via withinState backwards compatibility

* Typo in last commit

* Improvement for assertion following failed traversal

* feat: Fix detached DOM errors for all Cypress commands (#24417)

* First stab at removing old .get() implementation

* Fix TS and a couple of tests

* Fix tests and TS

* Fix case-sensitivity for .contains()

* Stop TS complaining

* Rework cy-contains jquery expression

* Add comments, make ts happy

* Fix one test, review feedback

* Review updates

* Fix additional tests

* Fix accidental deletion of vital code

* One more try at getting logs right

* Fix race condition in cross-origin .contains

* Add commented out test to ensure .within() works properly with selectors

* Fix for sessions + query subject chaining

* Fix mixing .within() shadow DOM and .contains() in same chainer

* One more attempt at .within + .contains

* Fix rebase commits

* Update many commands to be queries; improve log message around invalid subjects

* Update connectors, location, focused and window commands to queries

* Return noop to a command and not a query (to avoid implicit assertions)

* More test fixes

* Fix test failures

* Fix for weird-ass frontend-component test

* Error message improvements

* Fix for broken system test

* Update withinSubject to use subject chain

* Test clarifications

* Unbreak cypress-testing-library via withinState backwards compatibility

* Typo in last commit

* Improvement for assertion following failed traversal

* WIP adding query support to

* More work on actionability + detached dom

* Fix TS, rename _addQuery to addQuery

* Another try to fix types

* Fix lint

* Fix for bad merge

* Fixes for a couple more tests

* Increase timeout 50ms -> 100ms on certain tests failing in CI

* Switch to new branch of cypress-testing-library

* Update lockfile

* Fix yarn.lock with latest version of forked testing-library

* More test fixes

* Fix TS again

* Increase test assertion timeout so it passes on slow browsers (webkit)

* Apply suggestions from code review

Co-authored-by: Emily Rohrbough <emilyrohrbough@users.noreply.github.com>
Co-authored-by: Zach Bloomquist <git@chary.us>

* More review changes

* Fix selectFile tests based on updated error message

* Improve types and type comments for Commands.add

* Undo change to Commands.add types

* Update yarn lockfiles again

* Remove overwriteQuery from Cy12; .focused() now respects passed in timeout

* Update cli/types/cypress.d.ts

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

* Restore .uncheck() tests

Co-authored-by: Emily Rohrbough <emilyrohrbough@users.noreply.github.com>
Co-authored-by: Zach Bloomquist <git@chary.us>
Co-authored-by: Chris Breiding <chrisbreiding@users.noreply.github.com>

* Fix for hanging driver test after merge

* Fix for app component test

Co-authored-by: Emily Rohrbough <emilyrohrbough@users.noreply.github.com>
Co-authored-by: Zach Bloomquist <git@chary.us>
Co-authored-by: Chris Breiding <chrisbreiding@users.noreply.github.com>
2022-11-14 10:26:05 -06:00
renovate[bot] b595636d06 fix(deps): update dependency minimatch to v3.0.5 [security] (#24393) 2022-11-03 08:58:51 -06:00
Matt Schile 69873ae988 chore: remove experimentalSessionAndOrigin flag (#24340)
BREAKING CHANGE: removed experimentalSessionAndOrigin flag. testIsolation defaults to strict
2022-10-24 08:49:13 -06:00
Lachlan Miller 23d52af3a2 chore: update eventemitter2 and vite deps (#23740) 2022-09-09 08:14:41 -05:00
Kukhyeon Heo a27affe447 chore: refactor server/lib/config.ts to pkg/config (#22530)
Co-authored-by: Rachel <rachel@cypress.io>
Co-authored-by: Emily Rohrbough <emilyrohrbough@users.noreply.github.com>
Co-authored-by: Rachel <Raquel.rudermano@gmail.com>
2022-08-17 10:54:02 -07:00
Kukhyeon Heo 0aa89fa5b3 chore: add check-ts command to pkg/driver (#22912)
Co-authored-by: Blue F <blue@everblue.info>
Co-authored-by: Rachel <Raquel.rudermano@gmail.com>
Co-authored-by: Rachel <rachel@cypress.io>
2022-08-15 09:46:24 -05:00
Kukhyeon Heo 2d119ad46a chore: Intregrate runner packages. (#23028)
* chore: Intregrate runner packages.

* Remove unnecessary Studio react files.

* Remove unnecessary gif

* runner-shared to runner-ct.

* fix path.

* fix package.json

* Remove scss files from runner-ct

* Remove runner-ct

* Remove runner-shared and runner-ct comments.

* Feedback

* chore: reduce parallelism for reporter-componen-tests

* chore: reduce paralelleism

Co-authored-by: Emily Rohrbough <emilyrohrbough@users.noreply.github.com>
Co-authored-by: Lachlan Miller <lachlan.miller.1990@outlook.com>
2022-08-11 14:07:10 +10:00
Lachlan Miller 6adba462ea feat: update to Vite 3 (#22915)
* chore: do not rely on transitive dep. from npm/react

* chore: bump to vite 3.0.2

* revert

* target es6

* remove unused code

* update styles

* remove ts-ignore

* bump to vite 3.0.3
2022-07-28 10:00:31 +10:00
Bill Glesias 5ff15046e2 feat: add experimentalModifyObstructiveThirdPartyCode flag for regex rewriter (#22568) 2022-07-22 08:30:20 -06:00
Bill Glesias 045ad04cbd fix: electron slowness within cy origin (#21445)
* 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>
2022-05-17 12:03:45 -04:00
Bill Glesias 346bf458b0 Merge branch 'develop' into merge-develop-into-10.0 2022-05-10 12:46:29 -04:00
Emily Rohrbough dbbad318aa chore(sessions): add additional tests (#21338) 2022-05-05 18:21:15 -05:00
Bill Glesias 328a8265dd fix driver tests to glob correct specs in e2e directory over integration directory 2022-05-02 13:52:01 -04:00
Bill Glesias 373ed05298 Merge branch 'develop' into md-10.0-merge 2022-05-02 12:26:58 -04:00
Bill Glesias bbd9e7f1b2 Merge branch 'develop' into md-10.0-merge 2022-04-29 10:39:54 -04:00
Bill Glesias bc01e44338 chore: rename multi-domain to origin paradigm (#21231) 2022-04-28 15:19:40 -04: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
Zach Bloomquist afca88e7a9 chore: remove unused dependencies (#21092) 2022-04-19 14:51:21 +00:00
Matt Henkes 8f7cc74ba9 Merge branch 'develop' into feature-multidomain 2022-03-24 16:01:06 -05:00
Zach Bloomquist 7aafae11fb Merge remote-tracking branch 'origin/develop' into 10.0-release-merge-3-24 2022-03-24 10:18:02 -04:00
renovate[bot] d59b7bd009 fix(deps): update dependency minimist to v1.2.6 🌟 (#20756)
Co-authored-by: Renovate Bot <bot@renovateapp.com>
2022-03-23 11:50:35 -06:00
Chris Breiding 22b35be276 fix(multi-domain): Handle SameSite cookies (#20450) 2022-03-22 09:57:12 -04:00
Jess ff401ee20c chore: adding stability to component tests (#20659) 2022-03-21 18:54:01 -04:00
Matt Henkes 9827b26730 chore: [Multi-domain] Improve timeout error message. (#20671)
* Better timeout error handling

* quick fix, should re-visit

* cancel dangling timeouts

* re-broadcast the window load event.

* clean up code and comment more

* ignore better

* PR updates

* oops, didn't mean to enable this

* Apply suggestions from code review

Co-authored-by: Bill Glesias <bglesias@gmail.com>

* moar pr updates

* Apply suggestions from code review

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

* Fix test

* message changes

* message update

Co-authored-by: Bill Glesias <bglesias@gmail.com>
Co-authored-by: Chris Breiding <chrisbreiding@users.noreply.github.com>
2022-03-21 10:55:36 -07:00
Chris Breiding bc30c6868e Merge branch 'develop' into feature-multidomain 2022-03-16 11:23:30 -04:00
Emily Rohrbough efede20d9e chore(unification): remove pluginsFile references (#20560)
* remove pluginsFile references

* fix all tests relying on this system test

* fix broken tests

* fix more broken tests

* one more

* relative path

* pr feedbkac

* fix vite-dev-server broken configuration

* PR feedback on error message

* update errors snaphsot

* bring back error in gql

* fix snapshot

* fix snapshot.

* fix merge issues

Co-authored-by: ElevateBart <ledouxb@gmail.com>
2022-03-15 11:27:04 +10:00
Matt Schile ca510cebc1 chore: (multi-domain) support origin and domain name in switchToDomain (#20564) 2022-03-14 08:41:23 -06:00
Jessica Sachs cf653b9bcd Merge remote-tracking branch 'origin/10.0-release' into chore/vite-dev-server 2022-03-09 13:55:33 -05:00
Jessica Sachs ebd044c8f3 Merge remote-tracking branch 'origin/10.0-release' into chore/vite-dev-server 2022-03-08 15:48:56 -05:00
Mark Noonan a7c8367794 resolve conflicts 2022-03-08 15:36:37 +00:00
renovate[bot] ae3c75381a fix(deps): update dependency url-parse to v1.5.9 [security] (#20439)
Co-authored-by: Renovate Bot <bot@renovateapp.com>
2022-03-07 10:00:30 -06:00
Lachlan Miller 76129e26af merge in develop to 10.0-release 2022-03-07 10:44:26 +10:00
Jessica Sachs 6c09616870 updated versions 2022-03-04 16:15:59 -05:00
Jessica Sachs 8bc9ad8cf3 updated versions 2022-03-04 04:45:17 -05:00
renovate[bot] 47ee6e2c4a fix(deps): update dependency url-parse to v1.5.8 [security] (#20386)
Co-authored-by: Renovate Bot <bot@renovateapp.com>
2022-03-01 21:48:29 +00:00
Matt Henkes b6243f5b20 chore: [Multi-domain] Validate domain name (#20321)
* basic domain name validation

* tests and an updated message

* Apply suggestions from code review

Co-authored-by: Bill Glesias <bglesias@gmail.com>

* pr changes

* skip flaky tests for now

* Apply suggestions from code review

* support localhost and ip addresses

Co-authored-by: Bill Glesias <bglesias@gmail.com>
2022-02-23 13:52:02 -08:00
Chris Breiding fc7149ed5c Merge branch 'develop' into feature-multidomain 2022-02-23 10:28:34 -05:00
Tim Griesser 47b1f38f62 Merge branch 'develop' into 10.0-release
* develop: (35 commits)
  fix(deps): update dependency url-parse to v1.5.6 [security] (#20270)
  chore: fix cache keys to include PLATFORM (#20279)
  chore: fix server performance flake (#20271)
  test(system-tests): support docker-based tests against built binary (#20250)
  chore: fix system-test-firefox screenshots_spec flake (#20268)
  chore(deps): update dependency fs-extra to v9 🌟 (#19939)
  fix: Wait for child process to be ready (#19792)
  fix: treat form-data bodies as binary (#20144)
  test: replace cypress-test-example-repos coverage + remove bump (#20186)
  fix(driver): update wrapErr to ignore number and boolean values (#20172)
  release 9.5.0 [skip ci]
  chore: Update Chrome (stable) to 98.0.4758.102 (#20192)
  chore: enable volar.takeOverMode
  Add span names, merge develop
  fix: Update `.type(' ')` to not emit clicks when the keyup event has been prevented (#20156)
  test: remove redundant "other projects" CI jobs (#20133)
  chore(driver): move cy.focused and cy.root into their own files (#20054)
  Move sending root event to own script
  chore: release @cypress/vue-v3.1.1
  chore: release @cypress/react-v5.12.3
  ...
2022-02-22 12:40:07 -05:00
Bill Glesias 288f6bd215 feat: sync config and env (#20102)
* sync Cypress.config() from primary over to secondary domain

* skip async tests until refactoring changes are released

* attempt to sync config and env to secondary domain

* fix cy.pause() in run mode now that configs are synced properly

* fix issue where video is being turned on twice in firefox, causing multi-domain tests to fail in firefox run mode

* remove iframe before multi domain sync spec runs to allow for determinisitc testing of big Cypress config/env changes

* remove isDocument and isWindow checks from omitUnserializableValues fn

* change spec bridge removal code inside multi domain sync test

* Implement bi-directional syncing of config and env

* remove preprocessing of thrown errors in secondary domain (meant to remove this)

* skip structuredClone test for firefox versions below 94

* delete half of test code with same value as env and config are very similar

* address comments in code review to improve tests

* rename config_utilities to config since util is implied by directory name

* simplify config utils and preprocess functions

* wrap read only config test in promise to prevent false negatives

* make code review comments to fix coding errors and improve tests/documentation

* cut over env/config test to exclusively use promises over done

* reset config and env after multi domain env/config tests

* namespace env/config keys to prevent any overlap in tests. Deleting env keys persist through test due to known bug on soft reruns. Also doctored spies tests to not directly assert on the values of env.
2022-02-22 12:01:24 -05:00
renovate[bot] 0143e13388 fix(deps): update dependency url-parse to v1.5.6 [security] (#20270)
Co-authored-by: Renovate Bot <bot@renovateapp.com>
2022-02-21 23:01:35 +00:00
Matt Schile 0639d147ac feat: (multi-domain) add support for screenshot blackout (#20150) 2022-02-14 11:16:03 -07:00
Jess 4299af8a0c chore: support vite 2.5 (#20084)
* chore: support vite 2.5

* chore: update eslint ignore statements

* chore: ignore jquery type issue

* chore: yarn integrity checks

* chore: use latest commit of branch for kitchensink

Co-authored-by: Lachlan Miller <lachlan.miller.1990@outlook.com>
2022-02-08 12:07:16 -05:00
Emily Rohrbough f669c101e1 Merge branch '10.0-release' into 1f70b21bc4-develop-into-10.0-release 2022-01-21 15:50:16 -06:00
Blue F b16553ec70 feat: Add mimeType support; Improve TypedArray support (#19794)
* Add mimeType support; Improve ArrayBuffer support
2022-01-21 10:23:59 -08:00
Kukhyeon Heo ea531b7840 chore: remove pkg/driver //@ts-nocheck part 2 (#19483)
* listeners.ts

* chainer.ts

* command.ts

* actionability.ts

* inspect.ts

* agents.ts

* aliasing.ts

* angular.ts

* asserting.ts

* clock.ts files

* commands.ts

* debugging.ts

* fix comment.

* roll back change.

* Fix.

* fix

* Casted to cast.

* Feedback changes.

* fix any.
2022-01-11 09:37:05 -06:00