Commit Graph

454 Commits

Author SHA1 Message Date
Mike Plummer bf590eba3f feat: CT stack traces (#23916)
Co-authored-by: Zachary Williams <zachjw34@gmail.com>
Co-authored-by: astone123 <adams@cypress.io>
Co-authored-by: Lachlan Miller <lachlan.miller.1990@outlook.com>
2022-09-26 17:31:46 -05:00
msebas 6a40936604 fix: allow asynchronous vue cli init phase (#23936)
Co-authored-by: Zachary Williams <ZachJW34@gmail.com>
2022-09-26 16:04:48 -05:00
Emily Rohrbough be73359437 Merge branch 'develop' into cache-sessions 2022-09-23 11:12:14 -05:00
Emily Rohrbough ca0fe1caf6 fix broken system -test and improve error handling I spent 3 hrs debugging 2022-09-23 11:05:12 -05: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
Emily Rohrbough 77c5ebfeb9 Merge branch 'develop' into cache-sessions 2022-09-22 15:05:28 -05:00
Emily Rohrbough a1b5db6c5c Apply suggestions from code review
Co-authored-by: Bill Glesias <bglesias@gmail.com>
2022-09-22 13:52:03 -05:00
Lachlan Miller 4c647f6d5b feat: allow vite/webpack config to be an async function (#23605)
* vite dev server async fn

* test projects

* update types

* simplify setup

* fix tests

* types

* remove junk file

* update comments

* add more tests

* fix system tests
2022-09-22 14:11:04 +10:00
Emily Rohrbough 37ed973118 okay -- fix all the test (hopefully) 2022-09-21 12:07:04 -05:00
Emily Rohrbough f45d607a92 fix system tests and bug found for recreating global session after failed with validation 2022-09-21 07:40:17 -05:00
Chris Breiding c48b80a0df feat: Support dependencies in cy.origin() callback (#23283)
Co-authored-by: Bill Glesias <bglesias@gmail.com>
2022-09-20 14:04:24 -04:00
Emily Rohrbough 9e2c15d23a Merge branch 'develop' into cache-sessions 2022-09-20 08:09:19 -05:00
Emily Rohrbough 8c3a68d80a fix tests 2022-09-20 08:08:44 -05:00
Emily Rohrbough 6968c8ea7a tests 2022-09-19 15:18:21 -05:00
Casey Holzer 823ffd0ca9 fix: Webpack 5 automatic publicPath error (#23760)
* fix: Webpack 5 automatic publicPath error

* update webpack-preprocessor test

* fix: disable webpack-preprocessor chunking

* stub LimitChunkCountPlugin

Co-authored-by: Zachary Williams <zachjw34@gmail.com>
2022-09-19 11:35:09 +10:00
Emily Rohrbough d00dd12d5a Merge branch 'develop' into cache-sessions 2022-09-16 11:07:46 -05:00
Lachlan Miller b9fec60604 fix(server): use correct property for spec name in CLI (#23794)
* use correct property in CLI

* use longer spec name everywhere in report

* snapshots
2022-09-16 16:39:28 +10:00
Mike Plummer 64c0f45182 fix: Fix missing it.skip function in Angular tests (#23829)
* fix: restore mocha methods

* Simplify `it.skip` patch, add tests

* Consolidate test runs for perf

* Add tests to validate `skip` and `only` behaviors

Co-authored-by: Zachary Williams <zachjw34@gmail.com>
2022-09-16 09:42:01 +10:00
Emily Rohrbough b0c8bc5c0e fix 2022-09-15 15:41:24 -05:00
Emily Rohrbough f459b21fc0 Merge branch 'develop' into cache-sessions
# Conflicts:
#	packages/server/lib/remote_states.ts
#	packages/server/lib/socket-base.ts
#	packages/server/test/unit/socket_spec.js
2022-09-15 13:10:52 -05:00
Matt Henkes 6ee305ba41 feat: Allow cy.visit to visit cross origin sites. (#23297)
* 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>
2022-09-15 12:28:27 -05:00
Emily Rohrbough 13e986dfd5 Merge branch 'develop' into cache-sessions
# Conflicts:
#	packages/app/src/runner/event-manager.ts
#	packages/driver/cypress.config.ts
#	packages/driver/src/cy/commands/sessions/index.ts
#	packages/reporter/src/sessions/sessions.tsx
#	packages/server/lib/project-base.ts
#	packages/server/lib/server-base.ts
#	system-tests/test/session_spec.ts
2022-09-15 11:19:14 -05:00
Adam Stone fada0be117 chore: fix flake for experimentalStudio config error test (#23800) 2022-09-13 15:14:27 -04:00
Zach Bloomquist 566a1a208c feat: gate WebKit behind experimentalWebKitSupport in prod (#23711) 2022-09-13 01:56:13 +00:00
Zachary Williams 96b03abc74 fix(svelte): default mount log to true (#23771) 2022-09-12 17:20:02 -05: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 a2170ac1ff chore: add regression test (#23695) 2022-09-12 10:21:13 +10:00
Rachel 406eb069a6 fix: issue-7715 (#23575)
Co-authored-by: Chris Breiding <chrisbreiding@gmail.com>
2022-09-09 11:36:19 -07:00
Emily Rohrbough e32e3638df fix: suite-level-only configuration does not throw when config is restored (#23646) 2022-09-08 21:19:04 -05:00
Emily Rohrbough 38412925ba fix: correct dashboard result when successful spec run and videoUploadOnPasses=false (#23660) 2022-09-07 19:42:34 -05:00
Lachlan Miller b6dad0a674 fix: support type: module in Node.js 16.17.0+ and 18.6.0+ (#23637)
* chore: bump ts-node version

* debugging

* update tests with docker images and docker script

* Update system-tests/scripts/bootstrap-docker-container.sh

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

* use chown

* Update system-tests/scripts/bootstrap-docker-container.sh

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

* Update bootstrap-docker-container.sh

* Update bootstrap-docker-container.sh

Co-authored-by: Zach Bloomquist <git@chary.us>
2022-09-07 10:21:02 +10:00
Zach Bloomquist b5ba6d7b87 chore(webkit): add before:browser:launch and download support (#23662) 2022-09-06 18:19:42 +00:00
Zach Bloomquist dc9e9dc62c chore(webkit): add video recording (#23579) 2022-09-06 17:12:13 +00:00
Emily Rohrbough 4e0e1cb85b chore: remove skipped test - covered elsewhere (#23675) 2022-09-02 17:50:49 -05:00
Jon Hieb 8b8f20eec7 fix: cypress/react18 rerender (#23360)
Co-authored-by: astone123 <adams@cypress.io>
2022-09-02 08:40:23 -04:00
Emily Rohrbough c8b1b30323 fix: run "before:spec" plugin event when experimentalInteractiveRunEvents is enabled (#23634)
Co-authored-by: Lachlan Miller <lachlan.miller.1990@outlook.com>
Co-authored-by: Rachel <Raquel.rudermano@gmail.com>
2022-08-31 13:40:11 -05:00
Zachary Williams b615e8ac30 fix: don't show deps warning for projects that don't require bundler (#23598) 2022-08-30 15:43:01 -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
Zachary Williams 2f337dbfa2 fix: angular 14.2 mount compilation error (#23593) 2022-08-29 13:40:43 -05:00
Zachary Williams f6eaad40e1 feat: adding svelte component testing support (#23553)
Co-authored-by: Jessica Sachs <jess@jessicasachs.io>
Co-authored-by: Rocky <25568640+rockindahizzy@users.noreply.github.com>
2022-08-26 12:36:05 -05:00
Emily Rohrbough 9ba71c6093 perf(cy.session): keep page state after validation runs (#23503) 2022-08-26 12:22:50 -05:00
Emily Rohrbough ab4f54b335 more 2022-08-24 10:34:32 -05:00
Jordan 5db08bc6ac chore: rename types, add comments 2022-08-23 20:03:33 -04:00
Emily Rohrbough 64319186cd . 2022-08-23 15:45:38 -05:00
Jordan a07a2a118d fix(webpack-dev-server): add custom project config to handler 2022-08-23 10:18:38 -04:00
Emily Rohrbough e0f3891eb5 more 2022-08-22 18:24:38 -05:00
Rachel ab23d7797b chore: skip or fix flaky tests II (#23386)
* fix leftover percy network-idle-timeout

* Skip another instance of 23153

* fix 23147

* Revert fix 23147

* try percy upgrade again

* Update yarn.lock

* skip 23404

* bring in emilys override version change for percy ui

* skip 23406

* skip 23407

* downgrade percy to 1.2.0

* fix percy diff

* fix percy diff

* update comment

* restore lock file

* Update yarn.lock

* Update yarn.lock

* percy fixes

* possible fix

* fix verison flake??

* Revert "fix percy diff"

This reverts commit e4c4e2e990.

* Revert "Revert "fix percy diff""

This reverts commit 94284e4694.

* Remove version assertion

* Trigger Build

* ignore spec duration in percy snapshots

* use .each to preserve order of execution

* add comment

* fix comment

* try new logic for header wait

* Revert "try new logic for header wait"

This reverts commit bfed31edce.

* add timeout to choose a browser

* Trigger Build

* try without promise.all; revert timeout to choose a browser tests

* ignore spec-duration in percy in runner

* clean up .thens

* clean up diffs

* move around .thens

* wait for tooltip to take snapshot, skip flakers

* try hiding spec duration

* Revert: try hiding spec duration

* Bring back duration mock

* Add another duration mock

* try cy.contains with tooltip, comment out removeGlobalStyles

* skip 23417

* skip choose a browser failures

* skip 23419

* skip 23414

* bring back // removeGlobalStyles()

* skip 23422

* skip 23423

* skip 23424

* set version to empty string to make percy happy

* Remove duration mock

* Do not display top-nav-cypress-version-current-link, skip 23433?

* skip 23434, clean up diffs

* clean up diffs, skip percy flake

* skip 23434

* skip 23437

* fix 23156

* fix 23250 and similar

* fix 23157

* skip more percies

* skip 23443

* skip more tooltip snapshots

* Update net_stubbing.cy.ts

* Update cookies.cy.js

* Update e2e_cookies.cy.js

* add missing github issue

* Update circle.yml

* Skip all of network stubbing

* Skip 23158

* Skip 23448

* remove unnecessary async, add skip for 23444

* more skips for 23444

* skip 23451

* More skips 23436

* More skips 23444

* skip 23455

* more skips 23444

* skip 23457

* more skips 23444

* mroe skip 23455

* Trigger Build

* skip set cookie 23444

* skip 21300

* skip 23417

* Trigger Build

* potential fix for 23308

* skip 23472

* skip snapshot

* skip 23474

* Trigger Build

* Trigger Build

* Trigger Build

* Trigger Build

* skip more 23245

* Trigger Build

* Trigger Build

* Trigger Build

* Trigger Build

* Trigger Build

* Trigger Build

* Trigger Build

* skip 23480,23481

* skip 23307

* Trigger Build

* addtl skip 23481

* skip 23484

* try cy.origin stability fix on nav commands issue

* Revert: try cy.origin stability fix on nav commands issue

* skip more 23452

* Trigger Build

* Trigger Build

* Trigger Build

* Trigger Build

* Trigger Build

* Trigger Build

* Trigger Build

* Trigger Build

* skip 23493

* Trigger Build
2022-08-22 10:50:12 -07:00
Adam Stone 03182625cf feat: Enable create from Vue component for projects with custom spec patterns (#23298) 2022-08-18 11:00:29 -04:00
Emily Rohrbough ae5cbb592d fix: persist registered spec sessions (#23347) 2022-08-16 09:27:28 -05: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