Commit Graph

55 Commits

Author SHA1 Message Date
Gweesin Chan
7337927a74 chore(deps): update dependency rimraf to v5.0.10 (#30155)
* chore(deps): update dependency rimraf to v5.0.10

* fix: fix clean errors caused by rimraf breaking change

* refactor: use promise instead of callback

---------

Co-authored-by: Ryan Manuel <ryanm@cypress.io>
2024-09-05 15:32:23 -04:00
Bill Glesias
0ea72a4c62 chore: disable live reloading inside cypress component tests [run ci] (#28908) 2024-02-15 11:57:55 -05:00
Jim Hays
34c8b1f884 refactor: Spellcheck (#27964)
Co-authored-by: Matthew Schile <mschile@cypress.io>
2023-10-11 10:06:10 -04:00
Adam Stone-Lord
4c11731ee1 chore: optimize task execution (#27848)
* Revert "chore: simplify build script (#27547)"

This reverts commit 0a86ec686e.

* Revert "chore: upgrade lerna to 6, cache build step (#26913)"

This reverts commit 9e60aeba8f.

* [run ci]

* chore: upgrade lerna to 6, cache build step (#26913)

* chore: update build-npm-modules script

* chore: update build-npm-modules script

* chore: update build-npm-modules script

* chore: update build-npm-modules script

* chore: update lerna to 6

* [run ci]

* try caching build step

* we can't clean without building after

* add dependencies on scripts for npm packages

* update commands

* add config for data-context build step

* fix output configurations for npm packages, add gitignores

* revert changes to config and data-context build steps

* fix outputs

* run with cache

* fix outputs for cli

* actually fix outputs

* test with cache

---------

Co-authored-by: astone123 <adams@cypress.io>

* chore: simplify build script (#27547)

* chore: simplify build script

* update CI workflows

* fix workflows

* empty commit because Percy weirdness

* chore: add driver, reporter, config as implicit dependencies for runner package (#27559)

* run all workflows on branch

* chore: parallelize test-binary-against-recipes CI step (#27570)

* chore: fix some easy circular dependencies in dep graph (#27612)

* chore: remove gulp tasks from postinstall (#27616)

* empty commit

* chore: minor improvements to node_modules_install (#27647)

* chore: fix cypress:open and dev scripts

* run with cache [run ci]

* exclude mochaawesome assets from .yarnclean [run ci]

* bump cache again [run ci]

* run cached [run ci]

* chore: do not cache cli build step [run ci]

* update workflow command and docs for build-cli [run ci]

* fix commands that use scope [run ci]

* use different branch for publish repo [run ci]

* percy weirdness? [run ci]

* fix postbuild cli script [run ci]

* try to remove typescript from production binary [run ci]

* fix circular dependency [run ci]

* try removing ts from node_modules [run ci]

* remove typescript resolution [run ci]

* remove redundant target scripts

* update to lerna scoped commands

* remove unneeded yarn in lerna command

* try to fix Electron install in Windows workflow

---------

Co-authored-by: Jordan <jordan@jpdesigning.com>
Co-authored-by: Dave Kasper <dave.m.kasper@gmail.com>
2023-10-04 12:25:00 -05:00
Bill Glesias
a956fb4d0d Merge branch 'develop' of https://github.com/cypress-io/cypress into chore/merge_develop_into_release_13 2023-08-14 12:01:26 -04:00
Bill Glesias
faf66dc737 chore: fix gulp watch scripts using webpack as stdout is looking for webpack 4 based output and now needs to be updated to 5 (#27548) 2023-08-14 12:00:41 -04:00
Bill Glesias
fe6d3274f4 Merge branch 'develop' into chore/merge-develop-v13 2023-08-11 13:25:08 -04:00
Adam Stone-Lord
28189fb577 chore: remove check-ts from Gulp (#27492)
* chore: update build-npm-modules script

* chore: update build-npm-modules script

* chore: update build-npm-modules script

* chore: update build-npm-modules script

* [run ci]

* we can't clean without building after

* update commands

* add config for data-context build step

* fix output configurations for npm packages, add gitignores

* revert changes to config and data-context build steps

* run with cache

* fix outputs for cli

* actually fix outputs

* test with cache

* chore: remove check-ts from Gulp and use Nx

* try limiting concurrency

* try concurrency 1

* add check-ts to packages where it is missing

---------

Co-authored-by: jordanpowell88 <jordan@jpdesigning.com>
2023-08-10 16:04:25 -04:00
Bill Glesias
171d1fa646 chore: update to webpack v5 (#27438)
* chore: [run ci] does further prerequisites for webpack 5:
https://webpack.js.org/migrate/5/#make-sure-your-build-has-no-errors-or-warnings
https://webpack.js.org/migrate/5/#make-sure-to-use-mode
https://webpack.js.org/migrate/5/#update-outdated-options
https://webpack.js.org/migrate/5/#test-webpack-5-compatibility
app builds and runs locally. Time to test out in CI and see if buffer or
process need to be polyfilled by the build

* chore: upgrade to webpack 5 and do the bare minimum to get it working

* chore: get @packages/extension working

* chore: add TODOs to finish after webpack 5 update

* chore: update the webpack config for npm/webpack-batteries-included-preprocessor to be webpack 5 compliant

* chore: patch whatwg-url 7.1.0. package 'source-map' uses
whatwg-url@7.1.0 which has a dependency on punycode node expected API.
since punycode is now polyfilled for us implicitly via the punycode npm
package, the API signatures are a bit different
https://github.com/mathiasbynens/punycode.js/blob/main/punycode.js#L101
vs https://nodejs.org/api/punycode.html#punycodeucs2. The patch uses the
punycode npm package expected API and is needed for source maps to work
for cy.origin() dependencies for Cypress.require()

* chore: convert whatwg patch into dev patch as source-map is not installed when building the binary / installing prod dependencies

* chore: only move production level patches into the binary dist directory for yarn install --production

* chore: remove --openssl-legacy-provider code for node versions 17 and over as webpack has been updated to v5

* chore: fix the webpack-batteries-included-preprocessor tests by shimming the correct node globals and built ins

* chore: provide the define plugin and evalDevtoolPlugin again as we need define in order to build the react-dom library correctly in the bundle to not include the development version

* chore: updating v8 snapshot cache

* chore: updating v8 snapshot cache

* chore: updating v8 snapshot cache

* chore: fix the webpack preprocessor not to change promise references under the hood when compiling the first bundle, as it was causing the webpack preprocessor to hang as the reference itself was different

* chore: fix issues from readFile that were caused by Webpack 5 using 'path-browserify'

* chore: update chrome component testing snapshots to match Webpack 5 changes

* chore: fix mismatched snapshots from webpack 5 update

* chore: use Cypress.Buffer instead of Buffer for selectFile system test to avoid having to polyfill Buffer from webpack

* chore: fix system test webpack path that now includes e2e workspace

* chore: patch enhanced-resolve to properly discover the pnp api for the yarn_v3.1.1_pnp_spec.ts system test. see https://github.com/webpack/enhanced-resolve/issues/263 for more details

* chore: set stats to 'none' for experimentalSingleTabMode to prevent different webpack compiled terminal formatting in the snapshot between local and CI.

* chore: fix node built in tests and configure webpack-batteries-included-preprocessor correctly

* chore: fallback to buffer correctly in config, even though there is no impact due to the provide plugin

* Update binary-cleanup.js to exclude added build dependencies for webpack
5 added by webpack-terser-plugin under the hood

* chore: add stream-browserify to webpack preprocessor batteries included as a dep as its used in the config [run ci]

* chore: make sure process and buffer are installed in the CLI for webpack provide

* chore: build cross platform binaries [run ci]

* chore: fix webpack evalDevToolPlugin instantiation [run ci]

* run all binary jobs [run ci]

* chore: updating v8 snapshot cache

* add find-up to the entry points that need to be kept

* chore: updating v8 snapshot cache

* chore: updating v8 snapshot cache

* chore: fix mocha build warnings

* chore: fix STRIPPED_INTEGRITY_TAG import warnings

* chore: add changelog event

---------

Co-authored-by: cypress-bot[bot] <+cypress-bot[bot]@users.noreply.github.com>
Co-authored-by: Ryan Manuel <ryanm@cypress.io>
2023-08-09 11:59:36 -04:00
Tim Griesser
d2ef2c1393 feat: capture protocol delivery (#26421)
Co-authored-by: Matt Schile <mschile@cypress.io>
Co-authored-by: David Rowe <95636404+davidr-cy@users.noreply.github.com>
Co-authored-by: Ryan Manuel <ryanm@cypress.io>
2023-05-15 14:06:27 -05:00
Ryan Manuel
bbe90abee7 chore: add better-sqlite3 dependency (#26168)
Co-authored-by: Emily Rohrbough <emilyrohrbough@users.noreply.github.com>
2023-03-23 12:01:13 -05:00
Ryan Manuel
0a4550ea0c chore: add linting to the scripts directory (#26197) 2023-03-23 12:00:56 -05:00
Zachary Williams
991c532447 fix: re-enable CYPRESS_INTERNAL_VITE_DEV development (#25364) 2023-01-18 11:47:08 +10:00
Mark Noonan
5f536fef9b fix: make NODE_ENV "production" for prod builds of launchpad (#25320) 2023-01-03 13:45:51 -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
Zachary Williams
17f442d592 feat: scaffold react18 projects in component setup (#23251)
* feat: scaffold react18 projects in component setup

* try catch semver.major

* address feedback
2022-08-12 09:19:38 +10:00
Zachary Williams
9c8f61db55 chore: remove redundant runner-ct webpack script from watch (#23288) 2022-08-12 08:46:43 +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
Emily Rohrbough
2f8475cbc0 chore: add reporter webpack to gulp watch script (#22386) 2022-06-23 14:08:15 -05:00
Bill Glesias
9cdab566d9 chore: enable runner to be rebuild with general watcher (#21664)
Co-authored-by: Matt Henkes <mjhenkes@gmail.com>
2022-06-02 11:39:32 +10:00
Zachary Williams
0f786ab893 fix: ct testing support for node 17+ (#21430) 2022-05-13 11:01:30 -05:00
Tim Griesser
383bdb1d3d fix: UNIFY-1625 Runs tab not updating in real time (#21370)
* feat: improved CloudDataSource caching & tests

* feat: pushFragment subscription, for updating the client with remote data (#21408)

* refactor: add pushFragment utility for pushing remote data into the client

* fix: UNIFY-1625 Runs tab not updating in real time (#21412)

* allow returning a Response object in the remoteGraphQLIntercept, handle 401
2022-05-12 09:06:12 -04:00
Tim Griesser
4a9d6831ba chore: system test tooling improvements (#20966)
* chore: fixture tooling improvements

* simplifying the imports of the @tooling/system-tests

* A bit of cleanup

* browser export path for fixture dirs
2022-04-07 15:32:51 -04: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
Tim Griesser
4f9c0d0730 chore: properly cleanup outdated system-test directories (#20822) 2022-03-30 08:27:42 +10:00
Tim Griesser
92eac2f67e feat: Error standardization (#20323)
* refactor: reworking client-side error shape

* feat: add the CodeFrame to baseerror

* consolidate baseError handling, type fixes

* Fix UNIFY-1164 w/ test cleanup to avoid intercepting

* fix types, cleanup based on review / Brian

* fix: imports / types / tests

* cleanup tests, fix TSError location, add reinitializeCypress mutation

* fix: show correct stack trace file name (#20410)

* Improve comments for regexes / TSError capture

* feat: Add codeframe to error, address PR comments

* update snapshot

* change codeframe impl, per Brian's request

* Attempt to fix test flake

Co-authored-by: ElevateBart <ledouxb@gmail.com>
Co-authored-by: Alejandro Estrada <estrada9166@hotmail.com>
2022-03-02 18:03:52 -05:00
Zach Bloomquist
dfd70445b1 test(app): fix EBUSY/EPERM errors when running e2e tests on Windows (#19848)
Co-authored-by: Barthélémy Ledoux <bart@cypress.io>
Co-authored-by: ElevateBart <ledouxb@gmail.com>
2022-01-26 19:39:13 +00:00
Lachlan Miller
721e586625 feat: use unified app for run mode (#19625)
* start graphql server in run mode

* update url logic

* use correct mobx instance

* expose util method for testing selector playground

* add __Cypress__ global

* correctly order aut lifecycle methods

* correct spec url in tests

* fix server integration tests

* add title to html

* update url encoding

* uni test

* encoding

* encode ssr data as base64

* set correct cypress.spec.name

* set arch and os options

* add version to options

* update config test

* update encoding

* temp skip

* more skips

* try to fix launchpad tests

* update test

* update runner

* feat: automation

* ignore error

* remove unused runner steps

* try remove error

* config

* Ensuring a provided testId gets rendered on a consistent element reference within HeaderBar.

* better conditionals

* automation connection

* try applying firefox cdp automation

* skip spec

* skip for now

* skips

* respond to failed visit event correctly

* chore: fix screenshot system tests (#19686)

* set fake  __CYPRESS_MODE__ on window

* vue logic for screenshot + run-mode checks

* Restore AUT wrapper div, make the name more clear

* switch to await for `before:screenshot` event send

* remove skipped tests

* add CYPRESS_INTERNAL_MODE to env

* move logic into component

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

* do not run runner-shared tests anymore

* dont care about runner unit test

* add reference screenshots confirmed to be good

* fix rerun spec

* do not hardcode http protocol, remove old code

* revert protocol and add missing pre-fetch gql query

* correctly pass ssr data, update request policy

* automation element updates

* do not apply CDP automation for firefox

* make assertions more debug-friendly

* up timeout, make firefox pixels slightly looser on CI

* Fix TS

* Try to fix tests

* Try to fix tests

* do not require urql for run mode

* wip: request policy changes

* use separate component for run mode and open mode

* expose selector playground function globally for testing purposes

* fix typescript

* fixing unit tests

* encode ssr data to match production

* fix test

* fix test

* readme

* fix: Run mode for unified runner resolve conflicts (#19743)

* merge in 10.0-release

* Fix merge conflict with client route

* Fail earlier when trying to run cypress in cypress in a browser other than chrome

* Fix some tests

* Set empty obj if config is not set

* Update tests

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

* update automation namespace, remove old code

* remove skipped test

* handle non proxied case

* clean up code

* revert png

* do not start graphql server in run mode

* Fix ts error

* revert type.cy.js to original test

* revert change in driver screenshot

* remove unused async

* remove unused env var

* remove old todo comment

* remove needless console.log

* unskip test

* use pause: true to avoid gql request

* remove unused automation element

* remove unused setAutomationStatus method

* change pane -> panel

* reimplement 1px flake fix for firefox type.cy.js

* chore: remove launchpad environment variable (#19778)

* remove LAUNCHPAD conditionals

* add timeout to test

* revert file

* correctly normalize url

Co-authored-by: Tyler Biethman <tbiethman@gmail.com>
Co-authored-by: Mark Noonan <oddlyaromatic@gmail.com>
Co-authored-by: Mark Noonan <mark@cypress.io>
Co-authored-by: Alejandro Estrada <estrada9166@gmail.com>
Co-authored-by: estrada9166 <estrada9166@hotmail.com>
Co-authored-by: Ryan Manuel <ryanm@cypress.io>
2022-01-20 15:02:00 +10:00
Tim Griesser
f750aea088 refactor: namespace & consolidate launchpad / graphql routing (#19746)
* refactor: namespace & consolidate launchpad / graphql routing
* fix: ensure vite dev flow works
* fix: proper tslint, fix race condition
2022-01-19 17:43:42 -05:00
Tim Griesser
4626f7481c feat: ProjectLifecycleManager & general launchpad cleanup (#19347)
See #19347 for full summary

Co-authored-by: Lachlan Miller <lachlan.miller.1990@outlook.com>
Co-authored-by: estrada9166 <estrada9166@hotmail.com>
Co-authored-by: Alejandro Estrada <estrada9166@gmail.com>
Co-authored-by: Jess <jess@jessicasachs.io>
2021-12-21 21:28:44 -05:00
Barthélémy Ledoux
9058e2f23b build: fix dev process on windows (#19401)
* build: fix dev process on windows

* build: reuse "spawned" function

* Revert "build: reuse "spawned" function"

This reverts commit 67289c281a.

* use winSpawn for spawned too

* refactor: rename uSpawn function
2021-12-21 08:58:26 +10:00
Tim Griesser
e4442ab7ac refactor: remove global.root & usage in require (#19336)
* refactor: remove global.root & use in requires

* fix types
2021-12-11 14:06:49 -05:00
Tim Griesser
806a31a989 refactor: Improved support for e2e testing (#19306) 2021-12-09 21:23:58 -05:00
Tim Griesser
a45825eafc fix: change // -> //z to @types comments once on postinstall (#19041) 2021-11-22 13:16:29 -05:00
Tim Griesser
2eb0ff551a feat: improve vite DX (#18937) 2021-11-17 11:24:04 -05:00
Chris Breiding
a9902b2fe6 feat: Support --browser cli option in Launchpad (#18473) 2021-11-08 11:06:23 -05:00
Tim Griesser
05887aa3dd feat: Adding a cache layer for remote queries, e2e test helpers (#18652) 2021-10-26 19:37:02 -04:00
Zachary Williams
e93a074abc feat: detect framework, guess component glob and query files (#18548)
* feat: detect framework, guess component glob and query files

* add test for Storybook detection and spec generation

* fix test flake

* chore(app): simplify glob finding logic (#18562)

* rebase, use globby, create new test project

* fix ts and test scaffold

Co-authored-by: Lachlan Miller <lachlan.miller.1990@outlook.com>
2021-10-21 09:44:28 +10:00
Barthélémy Ledoux
9a2e55071d feat(unify): removing prism and adding infrastructure for shiki (#18514)
* feat: use shikijs for highlighting code

* add line numbers

* fix Jess's remarks

* remove last instances of prism

* fix: remove unused prism packages

* fix broken build

* remove prism

* remnove prism one last time

* remove the last piece of prism in tests

* remove prism and refactor

* restore proper fe-shared test

* use windi to color shiki

* rename theme and create test

* cosmetic fixes

* avoid the jank

* fix image imports in typescript

* restore mistake

* make the shiki theme generator

* gitignore the shiki-heme generated

* add the shiki theme generation to yarn build

* make shiki theme look good

* last colors to update

* styling fixes

* styling fixes

* styling fixes

* styling fixes

* theme

* fix relative positioning

* Update .gitignore

* Update packages/frontend-shared/src/components/ShikiHighlight.vue

* remove conflicting copy button

* dont top level await

* add a readme for theme generation

* ignore generated theme

* fix integration test in launchpad

* fix other integration test

* bring back the cypress theme

* fixing public path issue

* make e2e work

* fix yarn dev (remove the double slash)

* review theme with ryan

* make copy on click optional

* adjust viewports

* move generation of theme before vite build

Co-authored-by: Jessica Sachs <jess@jessicasachs.io>
Co-authored-by: Lachlan Miller <lachlan.miller.1990@outlook.com>
2021-10-20 08:00:32 +10:00
Tim Griesser
3f32b68447 fix: fixes symlinking by only adding if they do not exist (#18513) 2021-10-15 15:50:29 -04:00
Lachlan Miller
d52a1137f1 fix: change symlinks to avoid conflict (#18507) 2021-10-16 00:59:30 +10:00
Tim Griesser
bdfc4a7b80 feat: setting up e2e open mode testing framework (#18472) 2021-10-14 11:10:26 -04:00
Lachlan Miller
9ca177c4be feat(app): run e2e tests (#18448)
* update server

* add launchMode param

* update logic

* update types

* update gql

* basic WIP for e2e

* hot reload

* dead code

* try to conditionally launch existing runner

* types

* update server

* params

* append gql port

* override to default ot e2e runner on launchpad and app e2e tests

* do not set launchpad variable for e2e runs

* use window to get graphql port and correctly run e2e conditionally using CIRCLECI env. var
2021-10-13 12:13:15 +10:00
Tim Griesser
7f6a64d789 chore: DX improvements in unify workflow (#18444) 2021-10-11 18:29:01 -04:00
Tim Griesser
d841e1331f refactor: Data context cleanup & IPC bindings for data push (#18357) 2021-10-11 12:13:41 -04:00
Tim Griesser
11ba5c53b1 chore: improving component test infra (#18378) 2021-10-06 14:21:13 -04:00
Cesar
98f2604abd feat: wire up add project button (#18320)
Co-authored-by: Jessica Sachs <jess@jessicasachs.io>
Co-authored-by: Tim Griesser <tgriesser10@gmail.com>
2021-10-06 07:42:40 -07:00
Tim Griesser
c200e95e14 chore: unify e2e tests launchpad (#18314) 2021-09-30 16:50:39 -04:00
Jessica Sachs
d39b1694aa feat: improved DX and support for running component and e2e tests w/ gulp (#18135)
Co-authored-by: Tim Griesser <tgriesser10@gmail.com>
2021-09-30 12:11:47 -04:00
Tim Griesser
1d5b185c5b refactor: remove nexus-decorators, add data context (#18211)
- Add `@packages/data-context`
- Add `yarn gulp makePackage` for scaffolding a new server package
- Removes `nexus-decorators` in favor of regular Nexus, creating better separation between data & schema
- Possible to launch project in different browser types

Co-authored-by: Jessica Sachs <jess@jessicasachs.io>
Co-authored-by: Lachlan Miller <lachlan.miller.1990@outlook.com>
Co-authored-by: Cesar <cesaravitia@outlook.com>
2021-09-27 11:49:39 -04:00