Commit Graph

414 Commits

Author SHA1 Message Date
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
Jordan
5db08bc6ac chore: rename types, add comments 2022-08-23 20:03:33 -04:00
Jordan
a07a2a118d fix(webpack-dev-server): add custom project config to handler 2022-08-23 10:18:38 -04: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
Zach Bloomquist
4580330763 chore: WebKit support (development-only) (#15533) 2022-08-15 22:53:37 +00:00
Bill Glesias
17f430768b Merge branch 'master' into develop 2022-08-15 12:29:07 -04:00
Rachel
c40a120aa7 chore: skip or fix flaky tests (#23167) 2022-08-15 08:50:34 -07:00
Tyler Biethman
e80e4e8334 fix: remove working directory from --spec glob patterns (#23296)
* fix: remove working directory from glob patterns

* Adding a few specs to FileDataSource

* Cleaning up leaky stubs

* Adding little system test

* Get mac binary too
2022-08-15 16:57:05 +10:00
Emily Rohrbough
f1122fcf62 fix: clear session state when changing specs in open mode (#23146) 2022-08-12 13:00:01 -05:00
Emily Rohrbough
0729a6833b feat: add testIsolation option and support describe-only overrides (#23040)
Co-authored-by: Lachlan Miller <lachlan.miller.1990@outlook.com>
Co-authored-by: Bill Glesias <bglesias@gmail.com>
Co-authored-by: Matt Henkes <mjhenkes@gmail.com>
2022-08-12 11:56:39 -05:00
Emily Rohrbough
0129a80883 fix: cypress hang caused in run mode when test:before:run handler throws (#23226)
Co-authored-by: Matt Henkes <mjhenkes@gmail.com>
2022-08-10 14:53:05 -05:00
Lachlan Miller
3e76ed0523 chore: add warning encouraging react users to update mount function (#23182)
Co-authored-by: Zachary Williams <ZachJW34@gmail.com>
2022-08-10 12:27:10 -05: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
Adam Stone
7ef6f972aa feat: Create spec from Vue component (#22898)
Co-authored-by: Lachlan Miller <lachlan.miller.1990@outlook.com>
Co-authored-by: Zachary Williams <ZachJW34@gmail.com>
2022-08-09 11:50:27 -04:00
Matt Schile
453f53f070 chore: Updated UI styling for Cypress about:blank pages (#23095)
Co-authored-by: Emily Rohrbough <emilyrohrbough@users.noreply.github.com>
2022-08-09 10:21:15 -05: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
Zachary Williams
20f89bfa32 fix: remove dependency causing semantic-release to fail (#23142) 2022-08-05 15:54:44 -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
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
Zachary Williams
a7b140d438 feat: add angular-ct project setup (#22897) 2022-07-28 11:14:37 -05:00
rockindahizzy
72078ef3d2 fix: Throw error when custom config file does not return expected value (#22927)
* fix: Throw error when custom config file does not return expected value

* Improve test to avoid false positive

* Code review changes

* remove old code

* remove unused yarn.lock

Co-authored-by: Lachlan Miller <lachlan.miller.1990@outlook.com>
2022-07-28 10:19:39 +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
Emily Rohrbough
b0590a1505 style: update session verbiage & styles and update alias styles (#22857)
Co-authored-by: Bill Glesias <bglesias@gmail.com>
2022-07-27 13:07:02 -05:00
rockindahizzy
952a9aad86 chore: fix glob pattern for system tests (#22918)
* chore: Adjust system test glob pattern for m1

* Address windows issue and add branch to windows workflow
2022-07-27 09:51:18 +10:00
Jordan
4131b1fa84 feat(angular): angular mount (#22858)
Co-authored-by: Zachary Williams <zachjw34@gmail.com>
2022-07-26 17:44:44 -05:00
renovate[bot]
7c3a4f8bb6 chore(deps): update dependency nock to v13.2.9 🌟 (#22854)
* chore(deps): update dependency nock to v13.2.9 🌟

* chore: update nock api from v12 to v13 by changing socketDelay to delayConnection. See https://github.com/nock/nock/releases/tag/v13.0.0 for more details

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Co-authored-by: Bill Glesias <bglesias@gmail.com>
Co-authored-by: Lachlan Miller <lachlan.miller.1990@outlook.com>
2022-07-25 15:17:32 -04:00
Emily Rohrbough
65d29cdcf3 chore: remove dead server code (#22902) 2022-07-25 10:29:14 -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
Lachlan Miller
f0d3a48679 feat: React 18 support (#22876)
* update cli exports

* add additional react adapters

* update system test infra to better cover react versions

* use idiomatic cy.mount and cy.unmount

* add additional test projects

* update tests

* add new modules

* remove dead code, organize code more

* add react 16 project

* update webpack to resolve react correctly

* add test for react 16

* update snaps

* add react adapters

* ignore cli/react files

* use official rollup plugin to bundle npm/react

* update yarn lock for webpack dev server tests

* update vite dev server projects

* update config

* remove console.log

* update tsconfig

* fix tests

* fix another test

* update snaps

* update snaps

* fix build

* remove react{16,17}, update tests

* update build

* add missing export

* update test

* fixing tests

* fixing tests

* update snaps

* update snaps again

* build artifacts on circle

* dont try to update rollup plugin

* update circle

* update

* add missing build step

* update deps, remove old code

* revert circle changes

* do not hoist deps from react18

* remove deps
2022-07-22 11:35:09 +10:00
Zachary Williams
2027f1daee fix: allow next.js apps to import global styles (#22769) 2022-07-21 14:36:50 -05:00
Tyler Biethman
c94fbb6321 chore(deps): Updating to electron@19.0.8 (#22775)
* Trying out electron 19.0.4

* nvm-for-windows 1.1.7 is busted for node-16.14.2

* Went a bit overboard with the exit I think

* Stepping this back

* Breaking out yarn install

* Print runtime data

* log more data points

* well i'm confused. seeing what happens after these steps

* Lets see if powershell picks up the new PATH

* Maybe shell is refreshed between jobs?

* Installing nvm-1.1.9 manually

* Cleaning up circle.yml and a few other node references.

* Yeah that ain't gonna work

* Trying bash implementation

* Urgh yaml

* Bumping to latest patch version

* Getting a full build + artifacts

* Sourcing node in build step

* More node sourcing

* Run against updated recipes repo

* I'll find all these eventually

* Trigger new build after cache busting

* Let's slim this down to test recipes for a bit

* Good ol' working_directory

* Fixing bad syntax

* Not quite sure where all this is necessary at this point

* Using recipes PR branch

* This isn't necessary here

* Re-enabling jobs

* More node sourcing

* Running kitchensink tests against PR branch

* Moving nvm-windows update to script

* Even more node sourcing

* Removing CI config for merged kitchensink/recipes PRs
2022-07-21 13:02:46 -05:00
Hugo Alliaume
f512f75ceb fix(config): allow "additionalIgnorePattern" to be an array of strings (#22826)
* fix(config): allow "additionalIgnorePattern" to be an array of string

Also set default value to "[]", to prevent issue when running E2E tests.

* chore(test): set "additionalIgnorePattern: undefined" for Cypress-in-Cypress config

* chore: update snapshots

* chore: update types for additionalIgnorePattern

Co-authored-by: Lachlan Miller <lachlan.miller.1990@outlook.com>
2022-07-21 11:19:06 +10:00
Lachlan Miller
0e2011d00d chore: fix test by normalizing stdout (#22861)
* chore: fix test by normalizing stdout

* extract util function to avoid side effects during test

* update spec
2022-07-21 10:22:19 +10:00
mirobo
9517b60e9d fix: don't cut off a long runUrl in console (#22619)
Co-authored-by: Lachlan Miller <lachlan.miller.1990@outlook.com>
Co-authored-by: Ben M <benm@cypress.io>
Co-authored-by: Adam Stone <adams@cypress.io>
2022-07-19 15:04:56 -04:00
Zachary Williams
7e0de0b0d0 fix: map framework name to dependency that contains webpack (#22774) 2022-07-15 14:36:29 -05:00
Bill Glesias
e16820b23e fix: absolute positioning element blackouts in cy.screenshot (#22756)
* add regression tests

* attempt to fix screenshot blacks basing blackouted element around container instead of body dimensions

* move blackout test to screenshot viewport suite and update snapshot

* add github issue to test
2022-07-13 15:16:50 -04:00
Tyler Biethman
782dfb7a90 test: Fixing system test with missing setup (#22767)
* test: Fixing test with missing setup

* Blank commit for percy
2022-07-13 12:16:53 -05:00
Zachary Williams
a9476ecb3d fix: remove CT side effects from mount when e2e testing (#22633) 2022-07-11 10:52:20 -05:00
Lachlan Miller
c0ea9bdaa5 fix: use posix path for ts-node loader (#22550)
* fix: distribute files to machines for external contributors. (#22326)

* fix: distribute files to machines for external contributors.

* fix path

* fix

* fix glob

* fix

* fix glob pattern spec->cy.

* fix

* echo things.

* test

* use cd.

* fix component tests.

* test

* test

* fix

* refactor

* test distribut-step

fix error
fix
fix
test
TEST

* Revert "test distribut-step"

This reverts commit 15c36065ca.

* Revert "refactor"

This reverts commit 21a8ad9211.

* reduce flake by increasing viewport height

Co-authored-by: Ryan Manuel <ryanm@cypress.io>
Co-authored-by: Lachlan Miller <lachlan.miller.1990@outlook.com>

* fix: add baseUrl to TestConfigOverrides (#22445)

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

* handle white space when registering ts-node using --require

* update test project

* move config

Co-authored-by: Kukhyeon Heo <sainthkh@naver.com>
Co-authored-by: Ryan Manuel <ryanm@cypress.io>
Co-authored-by: Ishan Madhusanka <ahtimadhusanka@gmail.com>
2022-06-28 09:00:06 -05:00
Muaz Othman
4726ea90a9 feat: Display Cypress Dashboard metrics in the Specs Explorer (#21250)
Co-authored-by: Muaz Othman <muazweb@gmail.com>
Co-authored-by: Tim Griesser <tgriesser10@gmail.com>
Co-authored-by: Mike Plummer <mikep@cypress.io>
Co-authored-by: Peter Stakoun <peter@stakoun.com>
Co-authored-by: Mike Plummer <mike-plummer@users.noreply.github.com>
Co-authored-by: Zachary Williams <ZachJW34@gmail.com>
2022-06-27 17:37:36 -05:00
Tyler Biethman
24052eb62a test: Addressing launchpad test flake in Windows (#22536)
* test: Bumping timeout on breadcrumb state checks for Windows

* todos project was missing component index but has component testing configured

* Adding key to links to ensure attrs are cleaned up/reset

* Coercing boolean keys to strings to match vue key types
2022-06-27 14:24:33 -05:00
Adam Stone
22d2c31d85 chore: Address skipped specs in server package (#22356)
* chore: Un-skip some tests

* chore: Unskip more tests

* chore: Use exec rather than spawn

* chore: Fix test

* chore: Remove events_spec tests

* chore: Add defaultValue for specPattern option

* chore: Remove default value

* chore: Use os to determine system arch and platform during testing

* chore: Add comment for specPattern defaultValue

* chore: Remove comment
2022-06-27 12:34:51 +10:00
Lachlan Miller
c7f63e1f29 fix: handle case of implicit plugins/index.js files during migration (#22501)
* handle case of implicit index.js

* fix test error message

* fix test
2022-06-24 09:48:42 -05:00
Tyler Biethman
b925dce224 Merge pull request #22424 from cypress-io/master
Merging master into develop for 10.2.0 release
2022-06-21 11:03:14 -05:00