Commit Graph

49 Commits

Author SHA1 Message Date
Lachlan Miller
f49ad641e6 chore: delete unsed code in runner, runner-shared, runner-ct (#20663)
* chore: delete a lot of old code

* remove unused code

* update test

* remove dep on cypress_runner for non proxied page

* change binary

* revert scss changes

* delete a lot of code

* update sass

* update jsx

* styles

* revert change

* dont destructure from window.mobx anymore

* update readmes

* revert change to mobx store

* Update packages/runner-shared/README.md

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

* remove old code

* remove html webpack and copy webpack plugins from runner

* Apply suggestions from code review

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

Co-authored-by: Emily Rohrbough  <emilyrohrbough@users.noreply.github.com>
Co-authored-by: Barthélémy Ledoux <bart@cypress.io>
2022-03-25 10:24:05 +10:00
Zach Bloomquist
7aafae11fb Merge remote-tracking branch 'origin/develop' into 10.0-release-merge-3-24 2022-03-24 10:18:02 -04:00
Lachlan Miller
bf85d7cdae try using non secure nanoid 2022-03-23 08:02:07 +10:00
Renovate Bot
ef3bf91d71 chore(deps): update dependency nanoid to v3.1.31 [security] 2022-03-22 13:48:44 +00:00
Zachary Williams
110f8ae02d fix: remove --config-file false references and update types (#20643)
* fix: remove --config-file false references and update types

* cleanup tests and types, catch errors when calling open

* fix test

* remove string check

* code quality feedback
2022-03-21 22:49:14 +10:00
Lachlan Miller
2abb54ddcb chore(app): delete old code to lighten webpack bundle (#20069)
* chore: delete old code to lighten webpack bundle

* delete unused code

* update test

* lodash

* remove lodash

* remove lodash
2022-02-10 12:50:35 +10: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
Ryan Manuel
ed51bcbdda feat: Set up cypress in cypress (#19602)
Co-authored-by: Brian Mann <brian.mann86@gmail.com>
2022-01-14 17:07:07 -06:00
Lachlan Miller
816dac8a95 refactor: inject websocket to event manager (#19396)
* update

* inject web socket

* yarn lock

* fix types

* update test code
2021-12-17 03:25:47 +10:00
Lachlan Miller
168600b285 feat(launchpad): open in IDE modal and feature (#18975)
* better tests

* basic support for open in ide

* extract modal component

* mutation to open file

* remove old code

* add a ton of tests

* update

* lint

* types

* ignore typeless import

* update links

* backwards compat so we do not break all system tests

* add back missing code

* missing code

* fix bug

* add regression test

* ts

* types
2021-11-24 11:00:16 +10:00
Tim Griesser
7c339d41c8 Merge branch 'develop' into 10.0-release
* develop: (52 commits)
  feat: use hoisted yarn install in binary build (#17285)
  fix: compile npm packages for node 12 (#18989)
  fix: show call count even if `cy.stub().log(false)`. (#18907)
  chore: Update TypeScript to 4.4.4 (#18930)
  fix: wrap playground selectors in double quotes if not included (#18442)
  fix: flaky settings_spec test (#18979)
  chore: Update Chrome (stable) to 96.0.4664.45 (#18931)
  fix: Loading of specs with % in the filename (#18877)
  chore: refactor `create` into class `$Cy` (#18715)
  chore: Update Chrome (beta) to 96.0.4664.45 (#18891)
  fix: flaky `system-tests-firefox` job (#18848)
  chore: release @cypress/webpack-preprocessor-v5.10.0
  chore: release @cypress/vue-v3.0.5
  chore: release @cypress/schematic-v1.6.0
  chore: release create-cypress-tests-v1.2.0
  release 9.0.0
  feat: ensure major release
  have conduit app wait on localhost:3000
  fix install-required-node
  use --legacy-peer-deps
  ...
2021-11-20 16:03:53 -05:00
Tim Griesser
e4f5b106d4 feat: use hoisted yarn install in binary build (#17285) 2021-11-20 14:19:51 -05:00
Kukhyeon Heo
2a6ded2352 chore: Update TypeScript to 4.4.4 (#18930) 2021-11-19 10:01:23 -05:00
Blue F
81626870bf fix: Loading of specs with % in the filename (#18877) 2021-11-17 08:27:40 -08:00
Lachlan Miller
339da7063a feat(app): selector playground (#18813)
* wip: selector playground in vue

* wip

* remove old code

* close selector playground when changing spec

* do not use mobx selector playground in unified

* correctly toggle type

* update

* tests

* add back in mouse over functionality

* add styles

* style

* fix tests

* remove unneeded import

* remove unused types

* remove commented out code

* lint

* linting

* remove comment

* improve type safety
2021-11-09 23:22:19 +10:00
Tim Griesser
6a9f5a1a41 Merge branch 'develop' into unified-desktop-gui
* develop: (40 commits)
  fix(driver): Sticky elements within a fixed container will not prevent an element from being scrolled to (#18441)
  chore: make `create` function on server.ts obsolete (#18615)
  docs: Add instructions to squash commits to develop in Contributing (#18728)
  fix(@cypress/react): throw if using Next.js swc-loader without nodeVersion=system (#18686)
  refactor: remove Ramda (#18723)
  chore: Increase paralleled machines for desktop-gui tests (#18725)
  chore: Update Chrome (stable) to 95.0.4638.69 (#18696)
  chore: release @cypress/vue-v3.0.4
  chore: release @cypress/react-v5.10.2
  chore: release @cypress/schematic-v1.5.3
  fix: remove outdated registry link (#18710)
  chore: release @cypress/schematic-v1.5.2
  chore: release create-cypress-tests-v1.1.3
  chore: Update Chrome (beta) to 96.0.4664.27 (#18676)
  chore(tests): Remove flaky assertion that relies on png how compression (#18668)
  fix: make sure to go back to no-specs when delete spec file (#17760)
  fix: Next.JS 12 components testing failing with ` TypeError: Cannot read property 'traceChild' of undefined` (#18648)
  Backport .gitignore from unified-desktop-gui
  chore(docs): add 'Upgrading Electron' instructions (#18594)
  release 8.7.0 [skip ci]
  ...
2021-11-02 21:35:26 -04:00
Lachlan Miller
69d316e428 feat(app): decouple event manager from driver (#18695)
* change event manager to be a class

* update method

* attach event manager to window for cypress-in-cypress

* fix CT tests

* do not use fake event manager anymore

* remove cypress import from event manager

* pass in cypress as arg

* move regenerator runtime

* move async runtime

* include regenerator-runtime in runner unit tests

* fix unit tests

* inject studio

* attach event manager to window for unified app

* move event manager to app

* move event manager entirely to app, delete runner-shared copy

* improve tests

* add missing arg

* types

* remove unused optimization
2021-11-03 11:28:51 +10:00
Alejandro Estrada
081dd19cc6 feat: Use .config files (#18578)
Co-authored-by: Tim Griesser <tgriesser10@gmail.com>
2021-11-02 10:24:39 -04:00
Barthélémy Ledoux
6d6623c1b5 fix: make sure to go back to no-specs when delete spec file (#17760)
* fix: make sure to go back to no-specs when delete spec file

closes #16553

* refactor extract functino
2021-10-28 11:48:28 +10:00
Lachlan Miller
dfb3e84bfd feat(app): work on routing and executing specs (#18605)
* wip: work on routing and running spec

* removed old code

* remove <keep-alive>

* don't listen to hashchange event when in vite mode

* renamed specs to specs-store, update activeSpec method + prop

* switch from buttons to router-link

* create dedicated "spec" route, rename old files, reimplement logic for activeSpec + initializing runner-ct bundle

* just a simple example spec

* cache shiki

* add volar vue extension for vscode

* fix TS linting

* remove unused variables

* remove unused code

* rebuild schema

* fixing tests

* fix ts

Co-authored-by: Brian Mann <brian.mann86@gmail.com>
2021-10-25 20:03:53 +10:00
Lachlan Miller
ac0b2aa567 chore: fix runner prototype in app (#18601)
* wip: fix runner in app

* remove duplication

* update method

* fix regressions

* fix runner-ct test

* update a bit
2021-10-22 18:00:26 +10:00
Lachlan Miller
5754b2c480 merge in develop 2021-10-20 18:36:26 +10:00
Kukhyeon Heo
af472b6419 fix: revive type checker (#18172)
Co-authored-by: Zach Bloomquist <github@chary.us>
2021-10-13 23:51:38 +00:00
Lachlan Miller
0b98d669c3 fix conflicts 2021-10-13 15:45:27 +10:00
Lachlan Miller
61c8f6bb28 merged in develop 2021-10-13 15:43:37 +10:00
cbolgiano
7a4c59a12c fix: do not attempt to trim objects when printing to console (#18341) 2021-10-11 17:47:30 +00:00
Tim Griesser
d841e1331f refactor: Data context cleanup & IPC bindings for data push (#18357) 2021-10-11 12:13:41 -04:00
Lachlan Miller
b07ccf8972 feat(app): persist current spec in data context, update runner workflow for demo (#18406)
* wip: save current spec on server in data context

* execute spec when clickd

* basic CT workflow

* share types

* style

* style

* fix types

* use id to identify current spec

* fix types
2021-10-11 12:34:58 +10:00
Lachlan Miller
a8b43eec78 feat(app): render spec list, command log, iframe (#18372)
* wip

* wip

* wip

* pre-bundle deps

* wip

* wip: spec

* clear iframe

* wip: it kind of works

* wip, docs

* wip

* update runner API

* wip

* remove comments

* do not render header

* revert some stuff

* remove test

* update tests to work with react 17

* types

* wip

* revert react deps

* move code around

* add back hash change code

* lint

* comment

* update readme

* remove commet

* revert yarn lock

* remove unused file

* Delete HelloWorld1.spec.tsx

* Delete HelloWorld2.spec.tsx

* update types

* fix ui

* fix bugs

* fix test

* remove dead code

* more dead code

Co-authored-by: Jessica Sachs <jess@jessicasachs.io>
2021-10-08 14:29:00 +10:00
Tim Griesser
11ba5c53b1 chore: improving component test infra (#18378) 2021-10-06 14:21:13 -04:00
Kukhyeon Heo
8a1aefa9e7 feat: log args separately. (#17650) 2021-09-08 10:42:29 -04:00
Jessica Sachs
901338866a chore: converting packages/driver to be esm 2021-09-07 13:28:16 -04:00
Ben Kucera
6f32561d6f feat: add session support (#14350) 2021-08-04 10:23:45 -04:00
Zach Bloomquist
2454c19afb feat: proxy logging (#16730)
Co-authored-by: Chris Breiding <chrisbreiding@users.noreply.github.com>
2021-08-02 21:10:19 +00:00
Lachlan Miller
257ff95dcb chore: change ct -> component, projectType -> testingType everywhere for consistency (#17461)
Co-authored-by: Barthélémy Ledoux <bart@cypress.io>
2021-07-26 11:11:56 -05:00
Barthélémy Ledoux
1433b64d25 fix: only rerun if current spec+deps changed (#17269)
Co-authored-by: Lachlan Miller <lachlan.miller.1990@outlook.com>
2021-07-26 11:52:59 +10:00
Zach Panzarino
b25d09f9a2 feat: abilty to add assertions in Cypress Studio (#16295)
Co-authored-by: Jennifer Shehane <jennifer@cypress.io>
2021-07-22 13:04:24 -04:00
Jennifer Shehane
23edbc0595 Merge branch 'develop' into 8.0-release
# Conflicts:
#	yarn.lock
2021-07-19 11:20:10 -05:00
Zach Panzarino
113d05e7c4 fix(studio): more resilient saving to file (#17297) 2021-07-19 10:45:23 -04:00
Zach Bloomquist
97c03c1f4d chore: remove Firefox < 80 auto garbage collection (#17368) 2021-07-19 14:11:29 +00:00
Jennifer Shehane
5ced6abb2d docs: Add README for some newly added packages (#17283)
Co-authored-by: Barthélémy Ledoux <bart@cypress.io>
2021-07-14 09:38:38 -05:00
Tim Griesser
ca44464521 fix: revert #17132 use hoisted yarn install in build binary (#17215) 2021-07-06 16:30:33 -04:00
Tim Griesser
0064dce259 refactor: Loosen semver ranges for deps 2021-07-06 09:58:28 -04:00
Zach Panzarino
7362bce7f3 fix(studio): restore intro modal styles (#17118) 2021-06-30 08:35:08 -05:00
Tim Griesser
7276f5e2b3 refactor: @packages/runner-shared should also be devDependencies (#17133) 2021-06-29 11:15:08 -04:00
Lachlan Miller
0b19da80e1 chore(runner): render spec list inline (behind feature flag) (#17069)
* move spec list to shared package

* render and hydrate spec list

* share base store

* deps

* set current spec

* render spec list in e2e runner

* lint

* add design system import

* add deps

* wip: layout

* use dynamic spec list width

* remove debugging code

* feature flag

* fix tests

* do not emit event when feature flag is OFF

* revert CSS

* revert more changes

* whitelist specListWidth

* add test selector

* update feature flag

* improve feature flag

* add tests for inline spec list

* allow using real onSpecWindow in runner integration tests

* update tests

* improve tests

* make feature flag more explicit
2021-06-29 17:11:08 +10:00
Zach Panzarino
d866a7603a feat(studio): add ability to copy commands to clipboard (#16912) 2021-06-25 10:27:28 -05:00
Lachlan Miller
8e11b2d3b2 chore(server,server-ct): share initPlugins and spec watcher via Server Base class #16974 (#16981)
* move specs store to server

* customize spec directory in store

* share plugins via project base

* shared updated config

* share spec finding logic

* fix test

* share spec store code

* remove comment

* try fixing test

* move code around

* move more code

* share sendSpecList

* comment out line

* comments

* logs

* stub chokidar

* remove stub

* move spec watcher to later in the lifecycle

* refactor watcher

* stub out chikidar

* remove old code

* refactor

* update server-ct

* fix implementation

* fix implementation

* fix test

* update types

* add back check for config

* add comment

* make server base abstract

* fix type

* export interface

* move routes to TS

* update types

* types

* fix types

* correctly pass specs store in test

Co-authored-by: Barthélémy Ledoux <bart@cypress.io>
2021-06-23 10:35:12 +10:00
Lachlan Miller
929cac807a chore(runner,runner-ct): reduce duplication with packages/runner-shared (#16866)
* move snapshot-controls to shared package

* share visit-failure component

* share blank-contents

* share message component

* move message styling to shared

* stub scss in unit tests

* remove whitespace

* make dup files match

* share selector playground

* share script error

* share automation-disconnected

* remove old file

* share no-automation

* share error messages

* share errors

* make iframe model files similar

* share iframe-model

* share selector playground

* share style

* share highlight in selector playground

* share dom file

* update import

* share aut-iframe

* wip: shared event manager

* remove CT event manager

* move studio to shared runner package

* fix tests

* use shared event manager in CT runner

* comment back in code

* rename viewporth width/height to width/height

* fix ts errors

* share viewport info

* share header

* revert changed test

* remove old code

* fix tests and move test to shared package

* move tests to shared package

* make container files similar

* share container in runner

* share container

* move test

* move spec

* update tsconfig]

* update headeR

* fix styling

* style

* refactor

* refactor

* reduce public modules

* Update packages/runner-shared/src/event-manager.js

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

* fix percy regression

* fix regression in style

* improve types, try reverting style

* add runner-shared tests to pipeline

Co-authored-by: Zach Bloomquist <github@chary.us>
Co-authored-by: Barthélémy Ledoux <bart@cypress.io>
2021-06-16 10:22:09 +10:00