Commit Graph

70 Commits

Author SHA1 Message Date
Bill Glesias
201e9f366e feat: experimental retries (#27930)
* chore: set up feature/test-burn-in feature branch

* feat: add burnIn Configuration option (currently a no-op) (#27377)

* feat: add the burnIn Configuration to the config package. Option
currently is a no-op

* chore: make burn in experimental

* chore: set experimentalBurnIn to false by default

* feat: add new experimental retries configuration (#27412)

* feat: implement the experimental retries configuration options to pair
with test burn in

* [run ci]

* fix cache invalidation [run ci]

* fix snapshot added in v13 for module api to include test burn in experimentalflag

* chore: fix merge conflict

* chore: add burnInTestAction capability (#27768)

* add burnInTestAction capability

* feat: add burn in capability for cloud

* chore: fix snapshot for record_spec

* feat: implement experimental retries (#27826)

* chore: format the retries/runner snapshot files to make diff easier

* feat: implement experimentalRetries strategies 'detect-flake-and-pass-on-threshold' and 'detect-flake-but-always-fail'. This should not be a breaking change, though it does modify mocha and the test object even when the experiment is not configured. This is to exercise the system and make sure things still work as expected even when we go GA. Test updates will follow in following commits.

* chore: update snapshots from system tests and cy-in-cy tests that now have the cypress test metadata property _cypressTestStatusInfo. tests have been added in the fail-with-[before|after]each specs to visually see the suite being skipped when developing.

* chore: add cy-in-cy tests to verify reporter behavior for pass/fail tests, as well as new mocha snapshots to verify attempts. New tests were needed for this as the 'retries' option in testConfigOverrides currently is and will be invalid for experiment and will function as an override. tests run in the cy-in-cy tests are using globally configured experimentalRetries for the given tested project, which showcases the different behavior between attempts/retries and pass/fail status.

* chore: add unit test like driver test to verify the test object in mocha is decorated/handled properly in calculateTestStatus

* chore: add sanity system tests to verify console reporter output for experimental retries logic. Currently there is a bug in the reporter where the logged status doesnt wait for the aftereach to complete, which impacts the total exitCode and printed status.

* fix: aftereach console output. make sure to fail the test in the appropriate spot in runner.ts and not prematurely, which in turn updates the snapshots for cy-in-cy as the fail event comes later."

* chore: address comments from code review

* fix: make sure hook failures print outer status + attempts when the error is the hook itself.

* chore: improve types within calculateTestStatus inside mocha.ts

* Revert "feat: add burnIn Configuration option (currently a no-op) (#27377)"

This reverts commit c428443079.

* Revert "chore: add burnInTestAction capability (#27768)"

This reverts commit ae3df1a505.

* chore: run snapshot and binary jobs against experimental retries feature branch

* chore: add changelog entry (wip)

* Revert "fix snapshot added in v13 for module api to include test burn in experimentalflag"

This reverts commit bb5046c91e.

* Fix system tests

* Clear CircleCI cache

* Normalize retries config for test execution

* Fixed some unit tests

* update snapshots for newer test metadata

* Fix cy-in-cy snapshots

* update snapshots

* bump cache version

* chore: ensure legacy retry overrides work; reject exp. retries overrides (#28045)

* update changelog

* flip if statement in experimental retries option validation

* refactor invalid experimental retry override for more useful error msg

* revert testConfigOverrides snapshot

* update snapshots for test override sys test

* Update packages/config/src/validation.ts

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

* succinct changelog entry; links to docs for details

* testConfigOverride system test snapshots

* Update .github/workflows/update_v8_snapshot_cache.yml

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

* Update cli/CHANGELOG.md

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

* Update packages/driver/src/cypress.ts

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

* updating cache-version

* improve typescript usage when appending experimental retry options to experiments in Experimenets.vue

* Revert "improve typescript usage when appending experimental retry options to experiments in Experimenets.vue"

This reverts commit b459aba882.

* refactor test config override validation for experimental retry subkeys

* account for error throw differences in browsers in system tests

* bump circle cache

* bump circle cache again

---------

Co-authored-by: astone123 <adams@cypress.io>
Co-authored-by: mabela416 <mabel@cypress.io>
Co-authored-by: Muaz Othman <muaz@cypress.io>
Co-authored-by: Muaz Othman <muazweb@gmail.com>
Co-authored-by: Cacie Prins <cacie@cypress.io>
Co-authored-by: Cacie Prins <cacieprins@users.noreply.github.com>
Co-authored-by: Chris Breiding <chrisbreiding@users.noreply.github.com>
Co-authored-by: Ryan Manuel <ryanm@cypress.io>
Co-authored-by: Matthew Schile <mschile@cypress.io>
2023-10-26 14:06:14 -04:00
Jim Hays
34c8b1f884 refactor: Spellcheck (#27964)
Co-authored-by: Matthew Schile <mschile@cypress.io>
2023-10-11 10:06:10 -04:00
Bill Glesias
b85dd752f2 dependency: update to electron 25 and node 18 (#27715)
* feat: update to electron 25 and bump node dependencies. need to remove
custom docker image

* chore: update node versions to 18+ [run ci]

* chore: bump @types/node from v16 to v18 and bump the typescript supported CLI version from 3.9 to 4.4

* update mock-fs to 5.2.0 to fix BigInt issue (see https://github.com/tschaub/mock-fs/releases/tag/v5.1.4) [run ci]

* chore: update electron integrity check to pass create binary job

* chore: fix issues with achrinza/node-ipc not yet having node 18 engine support (only up to 17 by patching from 9.2.2 to 9.2.5 as seen in https://github.com/achrinza/node-ipc/pull/38. vue/cli-service is not maintained and we should migrate these over to vue create at some point in the near future to get rid of these resolutions

* allow for TLSv1 tests to work with node 18 as the express server running node 18 with tlsv1 needs to allow legacy ciphers

* chore: update snyk workflows to use node 18

* chore: add changelog

* update timeout

* more cleanup during binary build

* bump cache and run ci. include ignore engines for rwa and get rid of
16.16 image references

* chore: update FF tests to 115 as serialization now works with errors and click events do not get fired on buttons being typed into

* chore: don't error when symlink already exists

* chore: fix serialization test for newer versions of firefox

* chore: fix CI config

* chore: fix chrome system tests to work with chrome 114. updates mostly caused by bugs in screen height in chrome. see https://bugs.chromium.org/p/chromium/issues/detail?id=1416398

* chore: test binary against vite update in RWA

* remove wait for RWA as it shouldnt be needed for vite. link example recipes update to node 18

chore: remove commented out code

* chore: print message when DISABLE_SNAPSHOT_REQUIRE is set

* chore: clean out unneeded dependencies always

* chore: remove trailing space

* fix: propagate click events for enter and typing on firefox 106 or later

* chore: fix changelog failures

* fix: correctly simulate click events for buttons on keyup and space type  in Firefox versions greater than 91 and simulate click for buttons on enter in Firefox versions greater than or equal to 106

* chore: add documentation to type to clarify firefox synthetic events

* chore: update protocol snapshot as order or log messages seems to have changed

* update comments

* sort commandLogChanged events for protocol

* chore: remove PR ids from CRA and CER as the PRs are merged into develop

---------

Co-authored-by: Ryan Manuel <ryanm@cypress.io>
Co-authored-by: Chris Breiding <chrisbreiding@gmail.com>
Co-authored-by: Matt Schile <mschile@cypress.io>
2023-09-07 15:26:09 -04:00
Ryan Manuel
0a0eebd67d Merge branch 'develop' into fix/config-port-overriding-devserver 2023-08-28 20:32:23 -05:00
Ryan Manuel
b6f8794df7 fix tests 2023-08-28 16:41:11 -05:00
Matt Schile
0bda09bf8d fix require 2023-08-28 13:25:21 -06:00
Matt Schile
ed303ba40c fix issue where vite config was set properly 2023-08-28 13:02:52 -06:00
Brian Mann
f82fdf026e fix: allow cypress config.port to override devServer.port for proxying assets 2023-08-28 03:01:35 -04:00
Bill Glesias
aa8972b07d Merge branch 'develop' into chore/develop-into-release-13 2023-06-22 12:42:18 -04:00
Bill Glesias
9e698cea12 breaking: set videoCompression to false by default (#27009)
Update system-tests/projects/ts-proj-5/cypress.config.ts



Update system-tests/projects/vite-simple/cypress.config.js



Update system-tests/projects/react-vite-ts-configured/cypress.config.ts



Update system-tests/projects/svelte-vite/cypress.config.js



Update system-tests/projects/ts-proj-4-5/cypress.config.ts



Update system-tests/projects/webpack-dev-server-ts/cypress.config.ts



Update system-tests/projects/vue3-vite-ts-configured/cypress.config.ts



Update system-tests/projects/vue3-vite-ts-custom-index-html/cypress.config.ts



Update cli/CHANGELOG.md



Update cli/CHANGELOG.md

Co-authored-by: Emily Rohrbough <emilyrohrbough@users.noreply.github.com>
2023-06-20 15:08:01 -04:00
Chris Breiding
89f0fb6465 chore: internal refactor of privileged commands (#27060) 2023-06-16 10:45:53 -04:00
Jordan
e2439b19b4 chore: add support for Angular 16 (#26052)
* feat(angular): add support for Angular 16

* chore: update angular 16 pre-release version

* feat: handle getStylesConfig returning a Promise in Angular 16 (#26559)

* chore: remove next from deps to prepare for release

* remove .only, add angular-16 to webpack-dev-server e2e tests

---------

Co-authored-by: Leosvel Pérez Espinosa <leosvel.perez.espinosa@gmail.com>
Co-authored-by: astone123 <adams@cypress.io>
2023-04-24 09:57:12 -04:00
Matt Henkes
3d0a2b4061 fix: Treat Video compression 0 as false. (#26503)
* chore: disable video compression

* system test updates

* moar system test fixes

* a couple of telemetry tweaks

* more intelligent defaults, don't touch firefox.

* trying this

* probably finally fix firefox system tests

* unformat plz

* ugh, also add a test

* plz stop formatting that file

* re-enable firefox tests

* Change log

* don't save videos to artifacts

* this will be fixed in another pr

* quoth the raven, quotes matter don't mess them up
2023-04-17 16:33:36 -05:00
Michal Wozniak
e674f43040 fix(angular): mount cy-root in original location (#25965)
* fix(angular): mount cy-root in original location

* correctly fix insertRootElement to preserves html hierarchy, trim system-tests

---------

Co-authored-by: Zachary Williams <ZachJW34@gmail.com>
2023-03-01 16:12:34 -05:00
Adam Stone-Lord
87816de1b7 fix(webpack-dev-server): touch component-index during onSpecsChange to avoid writing to app file (#25861)
* testing: try disabling uTimesSync and see what happens

* build binaries [run ci]

* fix: touch component index file instead of browser.js

* build binaries [run ci]

* update test

* fix test

* add test for custom HTML file in config

* use existing component index in webpack-dev-server unit tests

---------

Co-authored-by: Lachlan Miller <lachlan.miller.1990@outlook.com>
2023-02-20 16:09:19 +10:00
Zachary Williams
104eef5dfb fix: mount component in [data-cy-root] (#25807)
* fix(angular): mount component in [data-cy-root]

* fix e2e test

* add changelog entry

* changelog [skip ci]

* changelog

---------

Co-authored-by: Lachlan Miller <lachlan.miller.1990@outlook.com>
2023-02-17 20:21:36 +10:00
Zach Bloomquist
748f3a56ca chore: lint system tests in CI (#25673) 2023-02-13 21:40:58 +00:00
Mike Plummer
fdd402fee2 fix: Extend mock logger used in angular bootstrap (#25500) 2023-01-19 16:01:16 -06:00
Adam Stone-Lord
51f30a2a34 chore: use experimentalSingleTabRunMode in all of our monorepo packages and system tests that are configured for CT (#25257) 2022-12-23 10:28:39 -05:00
Gergo Tolnai
470b94b8fa fix: log error on reject with string content (#25059)
Co-authored-by: Chris Breiding <chrisbreiding@users.noreply.github.com>
Co-authored-by: Chris Breiding <chrisbreiding@gmail.com>
Closes undefined
2022-12-19 10:57:38 -06:00
Lachlan Miller
331c1dcc9c chore: correctly resolve url sass bundle in Angular CT (#25191)
Co-authored-by: Zachary Williams <zachjw34@gmail.com>
2022-12-16 10:32:47 -06:00
Chris Breiding
4cb1c074f7 chore: Add eslint config to system-test project fixtures (#25089) 2022-12-09 15:31:01 -05:00
Emily Rohrbough
83f8997532 chore(v12): test isolation GA cleanup (#24736)
Co-authored-by: Matt Henkes <mjhenkes@gmail.com>
Closes undefined
2022-11-29 08:30:14 -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
Zachary Williams
838dd4fa2e fix: make component derived info not throw (#24571) 2022-11-07 16:36:43 -06: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
Adam Stone
294985f8b3 fix: remove some CT functions and props (#24419)
* fix: remove mountHook function for React

* fix: remove `unmount` from @cypress/react exports

* fix: remove `unmount` from the @cypress/react readme

* fix: don't alias React components on mount

* fix: remove `mountCallback` from Vue adapters

* fix: remove style injection utility functions from `mount-utils`

* fix: fix React tests

* fix: fix more React tests

* fix: fix more tests

* fix: fix screenshot test styles

* fix: update documentation around mount-utils styles; fix tests

* fix: update Vue docs to use `props` key rather than `propsData`

* fix: add test styles back in

* update unmount test and export getContainerEl for back compat

* better errors

* docs

* error for unmount

* test for error

* fix last test

* adjust language to reflect removed methods

* one last deprecation

* fix error

* wip - [skip ci]

* use proxy to catch errors

* deprecate alias

* update tests

* update on link

* use on links properly

* revert changes

Co-authored-by: Lachlan Miller <lachlan.miller.1990@outlook.com>
2022-11-04 15:05:26 +10:00
Zachary Williams
f39eb1c19e fix: remove last mounted component upon subsequent mount calls (#24470)
BREAKING CHANGE: remove last mounted component upon subsequent mount calls of mount
2022-11-03 12:19:29 -05:00
Lachlan Miller
33875d7550 feat: include component and wrapper in return type for vue mount adapter (#24479)
BREAKING CHANGE: Vue mount returns wrapper and component rather than wrapper only
2022-11-02 09:32:29 -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
Rainer Hahnekamp
54d2853217 fix: possibility to override global services in Angular component tests (#24394)
* fix: allow to override global services in Angular component tests

* move DI tests into their own context

* exclude `componentProviders` when a component is mounted with a template

* - revert and remove `componentProviders`
- run `eslint --fix` on `mount.cy.ts`
- add tests that use `TestBed.inject`

Co-authored-by: Zachary Williams <ZachJW34@gmail.com>
2022-11-01 09:16:10 +10: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
Zachary Williams
53eef4fbd7 fix: angular and nuxt ct tests now fail on uncaught exceptions (#24122) 2022-10-11 10:21:32 -04:00
amehta265
5af6b27ed9 fix: CSS import in CT Support file is not working (#24117) 2022-10-07 11:24:54 -05:00
Jordan
139046619b test(webpack-dev-server): add more angular mount tests (#23569) 2022-10-06 10:44:58 -05:00
Jordan
c18678381c fix(angular): set webpack base so angular assets load (#24106)
* fix(angular): set webpack base so angular assets load
2022-10-04 10:46:42 -04:00
Jordan
670d438309 fix(angular): call ngOnChanges after mount (#23596)
* fix(angular): call ngOnChanges after mounting
2022-10-03 18:17:46 -04:00
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
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
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
Zachary Williams
96b03abc74 fix(svelte): default mount log to true (#23771) 2022-09-12 17:20:02 -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
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
Bill Glesias
17f430768b Merge branch 'master' into develop 2022-08-15 12:29:07 -04:00
rockindahizzy
eab950bec0 fix(react18): unmount component with react18 API (#23204)
* fix(react18): unmount component with react18 API

* Add null check and explicit typing per code review

* update snapshots and make code more concise

Co-authored-by: Zachary Williams <zachjw34@gmail.com>
Co-authored-by: Lachlan Miller <lachlan.miller.1990@outlook.com>
2022-08-10 21:50:28 +10:00
Jordan
d201b37b3d feat: add template support, teardown & standalone (#23117)
Co-authored-by: Jordan <jordan@jpdesigning.com>
Co-authored-by: Zachary Williams <zachjw34@gmail.com>
Co-authored-by: Zachary Williams <ZachJW34@gmail.com>
2022-08-08 09:38:52 -05:00
Adam Murray
915859c1a7 fix(cypress/schematic): add --e2e option. ensure binary is installed in Angular 14 (#22922)
Co-authored-by: Zachary Williams <zachjw34@gmail.com>
2022-08-04 10:45:51 -05:00
Jordan
4131b1fa84 feat(angular): angular mount (#22858)
Co-authored-by: Zachary Williams <zachjw34@gmail.com>
2022-07-26 17:44:44 -05:00
Jordan
dc5d9de290 feat(webpack-dev-server): add angular handler (#22314)
Co-authored-by: Zachary Williams <zachjw34@gmail.com>
2022-07-22 13:41:23 -05:00