Commit Graph

439 Commits

Author SHA1 Message Date
Chris Breiding 5573fe50b0 fix: Make cross-origin document.cookie work (#22594) 2022-06-30 14:03:21 -04:00
Bill Glesias e18819d6a0 chore: remove old runIsolated in the runner, as well as clean up old runner related dependencies (#21638) 2022-06-06 11:16:15 -04:00
Zachary Williams e4873649c1 Merge remote-tracking branch 'origin/develop' into zachw/merge-develop-10.0 2022-05-24 10:30:14 -05:00
Matt Schile 53030b79f6 feat: (origin) handle waiting for aliased intercepts (#21579) 2022-05-24 09:02:01 -06:00
Zach Bloomquist 8043405688 Merge remote-tracking branch 'origin/develop' into 10.0-release 2022-05-19 09:56:39 -04: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
Kukhyeon Heo 38bd1bb048 chore: improve pkg/driver types (#21197)
Co-authored-by: Zach Bloomquist <git@chary.us>
Co-authored-by: Blue F <blue@cypress.io>
2022-05-13 18:57:12 +00:00
Zachary Williams 0f786ab893 fix: ct testing support for node 17+ (#21430) 2022-05-13 11:01:30 -05:00
Emily Rohrbough 599e0c859a fix(sessions): refactor flows, fix grouping bugs and align validation fail text (#21379)
* 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
2022-05-11 08:11:24 -05:00
Bill Glesias 04dc2e3130 Merge branch '10.0-release' of github.com:cypress-io/cypress into md-10.0-merge 2022-05-06 10:07:06 -04:00
Emily Rohrbough dbbad318aa chore(sessions): add additional tests (#21338) 2022-05-05 18:21:15 -05:00
Zach Bloomquist c336d7da5c chore: remove unused parts of design-system, move SCSS to runner-ct (#21345) 2022-05-05 23:02:43 +00:00
Bill Glesias 373ed05298 Merge branch 'develop' into md-10.0-merge 2022-05-02 12:26:58 -04:00
Bill Glesias 7e79860466 Merge branch '10.0-release' of github.com:cypress-io/cypress into md-10.0-merge 2022-04-29 10:41:47 -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
Emily Rohrbough 1232b07d4f feat(Unification): Update Command Group UI (#20465) 2022-04-27 10:23:39 -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
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
Matt Schile f819be315a Merge branch 'develop' into feature-multidomain 2022-04-21 09:53:49 -06: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
Matt Schile 27e1afbdd7 chore: (multi-domain) renaming flag to experimentalSessionAndOrigin (#21053) 2022-04-13 10:50:17 -06:00
Matt Henkes 8a78b5c127 Merge branch 'develop' into feature-multidomain 2022-04-07 12:59:18 -05:00
Matt Henkes c68692212a chore: [Multi-domain] Rename the last of the domain/multi-domain to origin type names. (#20965)
* chore: [Multi-domain] Rename the last of the domain/multi-domain to origin type names.

* oops

* typo

* Update packages/driver/cypress/integration/e2e/multi-domain/multi_domain_validation_specs.ts

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

* Update packages/driver/cypress/integration/e2e/multi-domain/multi_domain_validation_specs.ts

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

Co-authored-by: Matt Schile <mschile@gmail.com>
2022-04-07 12:30:06 -05:00
Matt Henkes 25af92134a chore: [Multi-domain] Rename isMultiDomain for the driver and the server (#20947)
* chore: [Multi-domain] Rename isMultiDomain for the driver and the server

* A couple more changes

* Update packages/driver/src/cy/commands/navigation.ts

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

Co-authored-by: Matt Schile <mschile@gmail.com>
2022-04-07 09:22:49 -05:00
Emily Rohrbough 3b7f0b5c59 fix(session): error thrown by unset cookies when printing session details to dev tools console (#20946) 2022-04-07 08:24:21 -05:00
Matt Schile dcbc68b8e7 chore: (multi-domain) updating experimental flag to experimentalLoginFlows (#20942) 2022-04-06 15:08:18 -06:00
Matt Henkes b65db7b81f chore: [Multi-domain] Rename domain events (#20945)
* chore: [Multi-domain] Rename domain events

* finish index.ts

* missed one!

* rename error message

* Update packages/driver/src/cy/commands/navigation.ts

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

Co-authored-by: Emily Rohrbough  <emilyrohrbough@users.noreply.github.com>
2022-04-06 14:26:10 -05:00
Matt Henkes b3e66e79ab chore: [Multi-domain]: Support spec bridges with same domain (#20829)
* chore: [Multi-domain]: Support spec bridges with same domain

* Add a little test

* Fix spec bridge tests

* make sure we grab the origin policy

* Update tests and origin policy

* moving tests

Co-authored-by: Bill Glesias <bglesias@gmail.com>
2022-03-31 09:25:28 -05:00
Matt Schile 4c1c18dd83 fix: (multi-domain) fix injection issue (#20816) 2022-03-30 08:26:21 -06:00
Matt Schile fedb65c97c chore: (multi-domain) support multiple remote states (#20752) 2022-03-28 15:26:51 -06:00
Lachlan Miller f49ad641e6 chore: delete unsed code in runner, runner-shared, runner-ct (#20663)
* chore: delete a lot of old code

* remove unused code

* update test

* remove dep on cypress_runner for non proxied page

* change binary

* revert scss changes

* delete a lot of code

* update sass

* update jsx

* styles

* revert change

* dont destructure from window.mobx anymore

* update readmes

* revert change to mobx store

* Update packages/runner-shared/README.md

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

* remove old code

* remove html webpack and copy webpack plugins from runner

* Apply suggestions from code review

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

Co-authored-by: Emily Rohrbough  <emilyrohrbough@users.noreply.github.com>
Co-authored-by: Barthélémy Ledoux <bart@cypress.io>
2022-03-25 10:24:05 +10:00
Lachlan Miller 03fbbd7bc7 chore: migrate mochaEvents integration tests from runner to app (#20678)
* mocha-events

* wip

* work on snapshots tests

* update

* lint

* remove unused code

* revert some changes

* remove old code

* migrate retries tests to app

* reduce duplication

* remove old code

* rename method

* use disparity
2022-03-24 15:32:25 +10:00
Shawn Taylor fd11c68bc2 feat(unify): default blank page (#20551)
* tdd for initial

* improve styles; add more tests

* new CT state and a few tweaks

* change cy.mount to mount

* update visitFailure states too

update visitFailure states too

* address PR comments

* added tests

* fix tests

* rename method

Co-authored-by: Lachlan Miller <lachlan.miller.1990@outlook.com>
2022-03-16 12:16:59 +10:00
Matt Schile ca510cebc1 chore: (multi-domain) support origin and domain name in switchToDomain (#20564) 2022-03-14 08:41:23 -06:00
Tim Griesser e7efc10aed feat: Add initial structure to support GraphQL subscriptions (#20558)
* feat: rename __socket.io -> __socket, add __socket-graphql for graphql-ws

* fix: remove currentTestingType from Query type

* feat: add subscription to refresh when auth state changes

* Update packages/frontend-shared/src/gql-components/HeaderBarContent.vue

* PR review updates, add docs, tests for authChange subscription

* remove login/logout toApp/toLaunchpad calls

* remove login/logout/devChange toApp/toLaunchpad calls

* fix, getCtx lazily to fix proxy performance spec

* Fix, thanks @JessicaSachs

* test fixes, remove flash of missing content in wizard

Co-authored-by: Ryan Manuel <ryanm@cypress.io>
Co-authored-by: Jess <jess@jessicasachs.io>
Co-authored-by: Lachlan Miller <lachlan.miller.1990@outlook.com>
2022-03-14 10:03:48 -04:00
Matt Schile 74dea8921e feat: (multi-domain) adding support for cy.visit in multi-domain (#20467) 2022-03-08 13:50:39 -07:00
Barthélémy Ledoux 93f83d8613 chore: upgrade fa-free to v6 (#20510) 2022-03-08 13:56:22 -06:00
Barthélémy Ledoux 9f624b4f7a feat: update icons with new design (#20338)
Co-authored-by: Lachlan Miller <lachlan.miller.1990@outlook.com>
Co-authored-by: Zachary Williams <ZachJW34@gmail.com>
2022-02-28 12:28:14 -06:00
Matt Schile 4c36cf9cff feat: (multi-domain) add viewport support (#20266) 2022-02-25 11:05:48 -07:00
Matt Henkes a0c6f00a99 chore: [Multi-domain]: Support multiple multi-domain commands in a single test (#20354)
* multi-multi-domain changes

* tests

* line it up!

* trim tests

* try skipping unicode test

* Pr Updates

* support unicode domain names
2022-02-24 14:41:31 -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
Brian Mann da48210216 Merge branch '10.0-release' into 10.0-release-merge-4b50f9ee 2022-02-18 15:11:59 -05:00
renovate[bot] 8d28261499 chore(deps): update dependency fs-extra to v9 🌟 (#19939)
Co-authored-by: Renovate Bot <bot@renovateapp.com>
Co-authored-by: Emily Rohrbough <emilyrohrbough@users.noreply.github.com>
Co-authored-by: David Munechika <david@cypress.io>
2022-02-18 10:33:27 -06:00
Tyler Biethman d4fa37e652 test: Migrate more runner UI specs to app (#20118)
* Adding remaining reporter error tests.

* Removing existing integration spec file

* Removing existing runner fixtures for error specs

* Fixing ts lint

* Testing with less tests kept in memory

* Testing some cypress-in-cypress settings to improve run-mode performance.

* Reverting changes to doc_url specs

* PR Updates. Inverting default value for 'open in IDE' validation in an attempt to reduce test time.

* Cleaning up ported code

* Update system-tests/projects/runner-e2e-specs/cypress/fixtures/index.html

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

* Trying build workaround

* Bumping up parallelized builds for app integration tests

* Removing suspicious tests to validate CI build

* Removing more suspicious tests to test CI

* Trying to not scaffold every navigation

* Bumping resources for run-app-integration job. Updating reporter.errors specs to appropriately reduce AUT refreshes.

* Couple API tweaks

* test: Migrating runner hooks specs to app

* Removing unused helper from runner package; cleaning up a few things

* Updating yarn.lock

* fix: Migrating runner sessions ui tests to app

* test: Migrating runner's runner.ui tests to app

* test: Migrating runner retries ui tests to app

* Cleaning up a few things for consistency

* Fixing ts errors

* Removing tests for runner header that have existing coverage in app

* Working around detached elements in CI

* Still working around detached elements in CI

* Updating sessions.ui test to click more carefully. Adding bit more coverage around runner header and snapshot pinning.

* Update packages/app/cypress/e2e/runner/retries.ui.cy.ts

Co-authored-by: Ryan Manuel <ryanm@cypress.io>

* Migrating issue specs. Updating TODOs. Hopefully addressing some flake.

* Stopping icon spin animation for percy snapshots

* WIP

* customPercyCommand.ts

* WIP: working on custom percy snapshots for hiding elements other than the reporter [skip ci]

* WIP: Adding naive mutation observer for reseting DOM mutations after snapshots [skip ci]

Got tired of tripping over types, I can add them when we're feature complete

* Implementing scoped snapshots throughout app/runner tests, let's see how percy output looks

* Adding more snapshots to runner tests.

* Using spec link as click target

* Stop taking snapshots of failed tests

* Scoping selector playground snapshots (though they're still unstyled)

* Addressing flake in virtualized spec list

* Drying up runner snapshotting

* Logging single percy snapshot that reflects proper viewport and overrides

* Updating describes to better match previous snapshot names

* Removing added snapshots to get more accurate better diff presentation in Percy

* Removing new runner.ui snapshots as well

* Adding a few PR recommendations. Updating one last spec name that was corrected for grammar and no longer matched. Updating/removing relevant TODOs.

* Updating to use anticipated default width for reporter

* Updating tests for consistency with previous snapshots

* Tying original command into promise chain

* Let's try that again

* Making percy command enqueuing explicit to test result

* Scoping down on some variables. Using defaults for sessions tests.

* Updating some overrides to see if visibility is handled inconsistently

* Whitespace vanquished, working session test updates back in for long command logs

* Viewport height is not reflected in snapshots, let's try forcing the height on the panel

* Forcing the height issue

* Let's try a minHeight on the percy command

* Cleaning up alterations made during percy exploration

* Trying to get a cleaner percy diff after merge

* Fix Percy to use 10.0-release branch as baseline image comparison

* add comments about temporary percy env vars

* Adding some doc for changes made to customPercyCommand

Co-authored-by: Emily Rohrbough  <emilyrohrbough@users.noreply.github.com>
Co-authored-by: Ryan Manuel <ryanm@cypress.io>
Co-authored-by: Brian Mann <brian.mann86@gmail.com>
Co-authored-by: Emily Rohrbough <emilyrohrbough@yahoo.com>
2022-02-17 18:29:44 -06:00
Matt Schile 5f905ee49b feat: (multi-domain) add support for pausing timers during screenshots (#20209) 2022-02-17 12:53:45 -07:00
Chris Breiding 89ea47d180 Merge branch 'feature-multidomain' of github.com:cypress-io/cypress into feature-multidomain 2022-02-14 14:58:52 -05:00
Chris Breiding 8d54632226 Merge branch 'develop' into feature-multidomain 2022-02-14 14:58:19 -05:00