Commit Graph

95 Commits

Author SHA1 Message Date
Matt Schile
d1dc1258ea fix: improve memory management for chromium-based browsers (#25462) 2023-01-18 15:35:57 -07:00
Bill Glesias
d470f59ea2 feat: experimental skip domain injection (#25307)
* feat: set up experimentalUseDefaultDocumentDomain to disallow document.domain overwritting

* use default domain around experimentalUseDefaultDocumentDomain in main iframe and spec bridge iframes. Also adapt CORS policy to use same-origin if experimental flag is set

* run ci

* fix: add insertion of experimental flag where is was needed/missing

* chore: add system test to exercise experimental flag for expected behavior

* fix: fix issues with template updates to conform to squirrelly v7

* fix: update config tests to include new experimental flag

* run ci

* fix: trailing whitespace [run ci]

* chore: update snapshot

* run ci

* fix: update proxy unit tests to account for experimentalUseDefaultDocumentDomain

* run ci

* fix: Allow component tests with special characters in filepath (#25299)

feat: cut over experimental flag to take list of known problematic domains via string/glob pattern

run ci

chore: update system test and fix broken config

* fix: fix server unit and integration tests. integration tests should no longer use google to test against injection as we do not inject document.domain on google domains

* run ci

* run ci

* fix: server integration tests where google documents are expected to receive document.domain injection. Kept test same by changing URL

* run ci

* fix: update server test with mssing unupdated assertions

* run ci

* fix: turn off experimental flag by default while recommending sane defaults to users to configure

* run ci

* chore: fix typings [run ci]

* run ci

* chore: make experiment an e2e option only

* run ci

* chore: address comments in code review

* chore: rename experimentalUseDefaultDocumentDomain to experimentalSkipDomainInjection

* fix regression in shouldInjectionDocumentDomain utility function and add unit tests

* run ci

* chore: rename documentSuperDomainIfExists to superDomain [run ci]

* chore: address comments from code review

* chore: just pass opts through to policyForDomain

* run ci

Co-authored-by: Mike Plummer <mike-plummer@users.noreply.github.com>
2023-01-09 10:00:05 -05:00
Mark Noonan
ca53ee0b1d chore: support vite v4 for component testing (#25365) 2023-01-06 15:28:38 -05:00
Zach Bloomquist
4d6034f524 fix(launcher): set ARCHPREFERENCE on macOS to prefer arm64 (#25014) 2022-12-22 20:38:35 +00:00
Mike Plummer
7e67841c76 fix: Display correct major version in migration wizard (#25146) 2022-12-15 15:37:51 -06:00
Alejandro Estrada
7154fc8dcd feat: Improve CLOUD_PARALLEL_GROUP_PARAMS_MISMATCH error message (#24799)
Co-authored-by: Emily Rohrbough <emilyrohrbough@users.noreply.github.com>
2022-12-12 11:47:57 -06:00
Matt Schile
98efdf45b3 feat: Added experimentalOriginDependencies to gate dependencies support within cy.origin (#24931)
* adding experimentalOriginDependencies flag

* update system tests
2022-12-01 15:40:05 -06:00
Blue F
8ff38cdb01 feat: Create public Cypress.ensure API for use with custom queries (#24697)
* fix: Improve TypeScript support for custom queries

* Typo fix

* Fix TS more

* Move 'ensures' off of cy and onto Cypress

* Type fixes

* One missed replacement

* Test fixes

* Properly pass in  to ensureRunnable

* Add .eslintignores to quiet down warnings

* Review feedback

* Update cli/types/cypress.d.ts

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

Co-authored-by: Emily Rohrbough <emilyrohrbough@users.noreply.github.com>
2022-11-29 09:34:34 -06:00
Emily Rohrbough
5f56670051 chore(12): merge in develop (#24783)
Co-authored-by: Ben M <benm@cypress.io>
Co-authored-by: Dariusz Czajkowski <darek@darek.dev>
Co-authored-by: Ryan Manuel <ryanm@cypress.io>
Co-authored-by: Adam Stone <adams@cypress.io>
2022-11-23 07:55:29 -06:00
BlueWinds
286bd9dac1 Merge remote-tracking branch 'origin/develop' into update-release-12 2022-11-22 08:57:02 -08:00
Lachlan Miller
4bbd78e22e feat: Re-introduce Run All specs for End to End under experimentalRunAllSpecs flag (#24745)
* feat: re-enable Run All Specs (#24683)

* fix: disable query in run-mode

* feat: Run-all-specs-ui (#24738)

* wip run-all-specs-ui

* added component tests for specs-list, inline-specs-list, and run-all-specs

* updated tests for specslist, inlinespeclist, and runAllSpecs

* simplify test

* make prop with default value optional

* enable run all specs

* use named slot for clarify

* use Record type

* remove un-necessary dynamic component

* use group and hover to inline css

* fix tests

* fix tests and use snapshot for style testing

Co-authored-by: Lachlan Miller <lachlan.miller.1990@outlook.com>

* fix typescript

* fix test

* build binary for run all specs

* fix: tweaks for Run All Specs (#24746)

* update ui [skip ci]

* change types to reflect run all specs is e2e only

* chore: separate run all specs components

* fix typescript error

* fix: run-all UI tweaks and keyboard nav (#24757)

Closes undefined

* fix UI test

* move listener and use i18n [skip ci] (#24761)

* fix: run-all-specs duplicate file-matching (#24763)

* chore: limit linting [skip ci]

* do not get separator until app is loaded

* fix test

Co-authored-by: Zachary Williams <ZachJW34@gmail.com>
Co-authored-by: amehta265 <65267668+amehta265@users.noreply.github.com>
2022-11-22 17:28:48 +10: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
Adam Stone
e3435b6fba chore: re-name dashboard references to Cypress Cloud (#24699)
Co-authored-by: mattvCypress <mattv@cypress.io>
Co-authored-by: amehta265 <65267668+amehta265@users.noreply.github.com>
2022-11-17 09:10:50 -05:00
Jordan
ed90b14d4f refactor: move linting to each lib to enable caching (#24424) 2022-11-17 17:31:19 +10:00
Chris Breiding
e4be9697bd Merge branch 'develop' into merge-develop-v12-2022-11-14-take-2 2022-11-14 13:57:38 -05:00
Lachlan Miller
a8a9c784ed chore: make error more inclusive of future cypress versions (#24559)
* chore: make error more inclusive of future cypress versions

* Additional wording change

Co-authored-by: Mark Noonan <mark@cypress.io>

* Update snapshot to match

* fix test (hopefully)

Co-authored-by: Stokes Player <stokes@cypress.io>
Co-authored-by: Mark Noonan <mark@cypress.io>
2022-11-08 16:17:37 +10:00
Matt Henkes
2f18a8cbd2 fix: remove cypress.server.defaults, cy.server and cy.route (#24411)
* fix: remove server and route commands

* This won't totally pass but it's a step in the right direction.

* Should be down to only two failing tests due to abort.

* fix the alias.<thing> api for intercept to be equivalent to route.

* adjust timeouts to reduce flake, ideally

* skip xhr abort tests

* More clean up

* Increase timeout

* trick next version

* fix unit tests probably

* yeah sure

* Apply suggestions from code review

Co-authored-by: Blue F <blue@cypress.io>

* remove addXhrLog

* Remove more usage of XHR stemming from proxy-logging

* Remove a couple of files that found their way back with the merge from release/12.0.0

* remove more server types

* increase timeouts again to prevent flake

Co-authored-by: Blue F <blue@cypress.io>
Co-authored-by: Zach Bloomquist <git@chary.us>
2022-11-04 08:24:03 -05:00
Bill Glesias
6055af37b0 Merge branch 'develop' of github.com:cypress-io/cypress into release/12.0.0 2022-11-02 10:27:39 -04: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
Matt Henkes
382e0b525d fix: detect chrome browser process and tab crashes to no longer hang in CI (#24338)
* Handle chrome tab and browser crashes.

* handle process crashes and add system tests

* handle crashing on windows

* updating comment

* update unit tests

* Update packages/server/lib/browsers/index.ts

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

* Apply suggestions from code review

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

* fix flaky system test probably

Co-authored-by: Emily Rohrbough <emilyrohrbough@users.noreply.github.com>
Co-authored-by: Ryan Manuel <ryanm@cypress.io>
2022-10-21 15:10:26 -05:00
GitStart
f73aef54b0 fix: clean up inconsistencies in UI between sentence case and title case (#23681)
Co-authored-by: Rachel <Raquel.rudermano@gmail.com>
Co-authored-by: Rachel <rachel@cypress.io>
2022-10-14 12:54:59 -07:00
Ryan Duffy
acc1050dd2 feat: Add support for optional env key to browser launch options (#23624)
Co-authored-by: Lachlan Miller <lachlan.miller.1990@outlook.com>
2022-09-22 16:44:58 -05:00
Zach Bloomquist
566a1a208c feat: gate WebKit behind experimentalWebKitSupport in prod (#23711) 2022-09-13 01:56:13 +00:00
Tyler Biethman
405e7f7ccb chore(webkit): update error stack parsing and related system tests (#23730)
* chore(webkit): update error stack parsing and related system tests

* Adding better comment

* Putting column back. Indexing at 1.

* Let's wait for WebKit fixes to land for this

* Using default name/location values already used in stack enhancing logic

* Incorrect bracket in regex

* Trying without location, as the fake location causes more problems downstream.

* Loosening regex around locations in stack replacement

* Defaulting location sans row/column

* Parsing stack lines for reporter with unique regex

* D'oh

* Making the validation against '<unknown>' more specific

* Don't want a capture group here

* Updating spec_isolation system tests

* Consolidating regex pattern to errors package

* Can just keep this global now

* Simplifying regex. Removing lineAndColumn numbers from unknown locations.

* Updating system test stack regex

* Getting better baseline

* Revert "Updating system test stack regex"

This reverts commit 2b91eff369.

* Forking normalization for webkit to track down diffs

* Ensure line or column are set before rendering in enhanced stack

* Need to be a little more flexible

* Tweaking leading newline detection

* Trying out new composed regex

* Few more tweaks for multiple leading newlines and file locations without function name

* Updating remainderOfStack pattern with proper escaping

* Cleaning up comments

* Filtering native code from absolute path logic

* Rebuild CI after outage
2022-09-12 15:40:12 -05:00
Lachlan Miller
72b8a65e78 feat: Cypress Studio for Cypress 10 (#23544)
* 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>
2022-08-30 07:45:06 +10:00
Lachlan Miller
91beb9012c feat: experimental single tab run mode for component testing (#23104)
* revive logic to run CT in a single tab

* add feature flag: experimentalSingleTabRunMode

* remove log

* reset browser state between tests

* document single tab run mode experiment;

* add system test for experimental run mode

* fix snapshots

* use more simple project for testing

* additional guard;

* fix test

* Apply suggestions from code review

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

* destroy aut after each spec

* update snapshot

* fix types

* add experiment flag error

* add warning when using experimental flag with e2e

* build binaries for experimentalSingleTabRunMode feature

* build binaries take 2

* make error message more open ended

* destroy AUT later in run mode lifecycle

* add additional assertion around experimental flag

* simplify error

* remove test code from production code

Co-authored-by: Emily Rohrbough <emilyrohrbough@users.noreply.github.com>
2022-08-16 10:44:14 +10:00
Lachlan Miller
cbb5e35762 feat: warn when detecting unsupported dependencies for component testing (#22964)
* wip: basic implementation

* update dependencies to have maxVersion

* handle promises correctly

* fix test

* update test project and styling

* only check for CT deps in CT

* install required deps

* revert

* rework detection and extend tests

* remove unused code

* remove more code

Co-authored-by: Zachary Williams <ZachJW34@gmail.com>
2022-08-01 11:40:52 +10:00
Alejandro Estrada
e5c1f91652 feat: show better error message if testing type is not configured (#22000)
* feat: show better error message if testing type is not configured

* Add tests

* Update tests

* Fix some tests

* Fix some tests

* Fix test

* Fix tests

* Update packages/errors/src/errors.ts

Co-authored-by: Jennifer Shehane <jennifer@cypress.io>

* Update with code review

* Fix test

* Add on link

Co-authored-by: Jennifer Shehane <jennifer@cypress.io>
2022-06-07 15:47:24 -05:00
Jennifer Shehane
387202c083 fix: Update experimental studio error messaging to not indicate it will come back. (#22007)
Co-authored-by: Brian Mann <brian.mann86@gmail.com>
2022-06-01 15:21:15 -05:00
Tim Griesser
566a7b1feb fix: UNIFY-1774 error if component config is not sourced for webpack/vite (#21563)
* fix: UNIFY-1774, throw error if we do not detect a webpackConfig for the user

* remove dead code, rely on auto-sourcing webpack config

* fix error styles, exit the devServer process when config is missing, guard against empty remoteState

* Add missing webpack for todos project

* Update npm/webpack-dev-server/src/makeWebpackConfig.ts

Co-authored-by: Lachlan Miller <lachlan.miller.1990@outlook.com>
Co-authored-by: Zachary Williams <ZachJW34@gmail.com>
2022-05-31 14:34:05 -04:00
Tim Griesser
b0e32f8f8e fix: UNIFY-1408, warnings should be nested appropriately & clearable (#21630)
* fix: UNIFY-1408, warnings should be nested appropriately & clearable

* Add fix / test for UNIFY-1604, UNIFY-1732

* better tests around baseUrl handling, remove unneeded logic

* Fix stub usage, test failure, pingBaseUrl behavior

* fix duplicate test title
2022-05-27 11:31:07 -04:00
Alejandro Estrada
3274da7842 fix: terminal error message for non migrated config (#21467)
* fix: terminal error message for non migrated config

* fix: terminal error message for non migrated config
2022-05-13 16:56:01 -05:00
Alejandro Estrada
fbe645224e fix: handle errors on plugins migration child process (#21442)
* fix: handle errors on plugins migration child process

* Update error handler

* Remove console.log
2022-05-13 16:04:35 -05:00
Bill Glesias
56ee2a52fa Merge branch '10.0-release' of github.com:cypress-io/cypress into md-10.0-merge 2022-05-09 09:55:22 -04:00
Lachlan Miller
e218cd8ed5 fix: better language detection in migration/setup workflow (#21220)
* add function to detect lang

* update test files

* update pkg.json

* remove concept of lang from wizard

* update tests

* fix tests and add debugging

* update test

* fix test

* add ts to ts project deps

* update assertion

* empty commit to trigger CI

* fix ts

* add debug log
2022-05-09 12:56:11 +10:00
Lachlan Miller
99b7fb120b feat: gracefully fail an error when mismatching Cypress version used in migration (#21255)
* error when cypress is not found, or version is mismatching for migration

* add tests

* add defensive try/catch

* Update packages/errors/src/errors.ts

Co-authored-by: Zach Bloomquist <git@chary.us>

* fix error snapshots

* remove usage of resolve-from

* make error more clear around open vs migration

Co-authored-by: Zach Bloomquist <git@chary.us>
2022-05-09 12:54:49 +10:00
Bill Glesias
252566ce64 Merge branch '10.0-release' of github.com:cypress-io/cypress into md-10.0-merge 2022-05-02 13:34:59 -04:00
Zachary Williams
00a0f5a0e9 fix: restart dev-server on config change (#21212)
* fix: restart dev-server on config change

* close dev server before cp is spawned

* fix test that is failing... not sure why

* cleanup unsued close events

* remove wait

* add back in close for unit tests

Co-authored-by: Tim Griesser <tgriesser10@gmail.com>
2022-05-02 12:05:01 +10: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
Lachlan Miller
22e7d36673 fix: update dev server error message (#21181)
* fix: update dev server error message

* revert change

* remove obsolete test

* revert change

* update errors

* rename error
2022-04-26 12:37:18 +10:00
Matt Schile
f473d29b2c removing migration guide reference 2022-04-22 18:35:44 -06: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
Barthélémy Ledoux
026c300708 fix: make error on integration folder point to e2e (#20853)
* fix: make error on integration folder point to e2e

* fix: add context for testing type to the errors

* fix: pass testnigtype to errors

* add testingType where needed

* show setupNodeEvent when error

* fix some unit tests

* update snapshot

* update snapshot

* test: add test for stupNodeEvents

* fix: add name for config error

* fix: use distinct errors for root and e2e failures

* test: update 2 snapshots

* snapshot update again

* update snapshots again normally this time
2022-04-15 15:05:35 -05:00
Matt Schile
27e1afbdd7 chore: (multi-domain) renaming flag to experimentalSessionAndOrigin (#21053) 2022-04-13 10:50:17 -06:00
Alejandro Estrada
0af82eaf64 fix: display correct error location (#21003)
* fix: display correct error location

* Update ts_node

* Add test

* Fix test

* Update with feedback
2022-04-11 13:05:13 -04:00
Matt Schile
dcbc68b8e7 chore: (multi-domain) updating experimental flag to experimentalLoginFlows (#20942) 2022-04-06 15:08:18 -06:00
Alejandro Estrada
e6cbc5ae1e fix: windows build (#20854)
* fix: update icons build to work on windows

* Add rimraf

* Update scripts

* Update script

* Update scripts

* Fix windows migration

* Update postinstall script

* Remove script
2022-04-04 11:12:08 -05:00
Zachary Williams
2c8e97df24 refactor: lift indexHtmlFile up to component, add validation (#20870) 2022-04-01 09:45:21 -05:00