Commit Graph

318 Commits

Author SHA1 Message Date
Zach Bloomquist
5696bee2ad chore: restrict get-next-version to packages and cli dirs (#15099) 2021-02-15 18:47:02 +00:00
Zach Panzarino
7b0b1798c0 build: fix release script for first release 2021-02-11 15:36:34 -05:00
ElevateBart
f4efe38a05 build: make npm releases work properly
- Remove extraneous failing semantic-release script
- Allow execustion of npm-release.js locally for simulation
- Provide a default fake NPM_TOKEN to avoid semantic-release break
- Update npm/vue.releaserc.js > next/npm/vue to be released as @next
- Fix package.json for npm/webpack-dev-server &
vite-dev-server to release them under sematic release
  - private should not be true
  - they should have a repository field
  - they should have a starter tag
2021-02-11 08:17:56 -06:00
Brian Mann
af26fbebe6 feat: component testing (#14479)
Co-authored-by: Jessica Sachs <jess@jessicasachs.io>
Co-authored-by: Barthélémy Ledoux <bart@cypress.io>
Co-authored-by: Lachlan Miller <lachlan.miller.1990@outlook.com>
Co-authored-by: Zach Bloomquist <github@chary.us>
Co-authored-by: Dmitriy Kovalenko <dmtr.kovalenko@outlook.com>
Co-authored-by: ElevateBart <ledouxb@gmail.com>
Co-authored-by: Ben Kucera <14625260+Bkucera@users.noreply.github.com>
2021-02-04 15:45:16 -05:00
Zach Bloomquist
0abb5efe90 build: use semantic commits to get next version (#14851) 2021-02-04 18:30:27 +00:00
Jennifer Shehane
d945728e78 chore: TR-479 Remove decaffeinate tasks (#14586) 2021-01-21 22:51:46 +06:30
Zach Bloomquist
9c51428382 chore(docs): remove binary-build-linux references 2021-01-11 16:28:54 -05:00
Jennifer Shehane
2b67505d09 Merge pull request #14425 from cypress-io/TR-561-decaffeinate
test: decaffeinate fixtures/projects/e2e (files s-t)
2021-01-08 20:33:55 +06:30
Jennifer Shehane
9ab9995a2b cleanup JS + update snapshots
Cleanup js + update snapshots

Cleanup JS + update snapshots

Cleanup JS + update snapshots
2021-01-08 09:56:29 +06:30
Barthélémy Ledoux
dd559d9862 feat(component-testing): changes to the driver and reporter preparing for runner-ct (#14434)
* chore: update driver with component testing

* feat: bring ct changes in reporter

* test: update script utils test

* fix: type issue

* test: add test for new ct behavior in driver

runScript can now use promises instead of files.
Thi test this new behavior

* tests(ct): tests for the reporter runable store

* fix: remove changes on event handling in driver

* build: augment zip size to avoid zip errors

* test: add renderin tests for reporter multispec

* test: better matcher for runnableHistory

Co-authored-by: Jessica Sachs <jess@jessicasachs.io>

* test: make the runscripts eval tests clearer

* refactor(reporter): main interface instead of type

* fix(reporter): runInAction when specRunId changes

* refactor(driver): remove restartRunner function

Co-authored-by: Jessica Sachs <jess@jessicasachs.io>
2021-01-07 19:30:52 -05:00
Zach Panzarino
74f6db0fb4 build: fix linting checks for .only (#14422) 2021-01-06 14:42:05 -05:00
Zach Panzarino
3eb3bfa487 build: properly use local npm packages for development and binary build (#14182) 2021-01-05 00:34:13 -05:00
Zach Bloomquist
c87f7b9104 chore: revert "feat: create-cypress-tests wizard (#8857)" (#9554) 2020-12-07 17:09:32 -05:00
renovate[bot]
2207bb105e feat(deps): update dependency electron to version 11.0.2 🌟 (#9222)
Co-authored-by: Renovate Bot <bot@renovateapp.com>
Co-authored-by: Zach Bloomquist <github@chary.us>
2020-11-20 18:58:55 -05:00
Jennifer Shehane
bb0d98d3c6 Merge branch 'develop' into v6.0-release 2020-11-17 22:38:39 +06:30
Gleb Bahmutov
84d1afd27d feat: print bundled Node and Electron versions in cypress version (#9183) 2020-11-16 13:17:24 -05:00
Jennifer Shehane
e2a5de0104 Merge branch 'develop' into v6.0-release 2020-11-14 14:23:50 +06:30
Zach Bloomquist
cc0a80ffb8 chore(ci): build v6.0-release branch like develop (#9161) 2020-11-12 11:17:43 +06:30
Zach Panzarino
42a0a67c77 build: fail tests when the conditional CI script errors (#9141)
* fail tests if ci script fails

* exit with nonzero exit code on uncaught exeptions

* move check halt out of yarn so it doesn't check node version

* rename check halt to check conditional ci
2020-11-10 12:46:59 -05:00
Jessica Sachs
2a642b2272 chore: adding bluebird promise to release script (#9047) 2020-10-30 13:24:11 -04:00
Jessica Sachs
462829bea1 fix: adding build-prod tasks to all of the npm dependencies that need artifacts (#9046) 2020-10-30 12:44:45 -04:00
Zach Panzarino
1903437c3c build: fix issue with timeouts in release script (#9020) 2020-10-29 01:34:06 -04:00
Zach Panzarino
5842d1dffe build: conditional CI jobs, dynamic test requirements for release, updated independent package release process (#8730) 2020-10-28 18:03:28 -04:00
Jessica Sachs
41a83f1b1f chore: better debug logs for semrel (#8834) 2020-10-14 03:15:36 -04:00
Jessica Sachs
ee3f7bcf08 chore: adding prerelease for @cypress/vue and refactoring .releaserc.js to have a base config (#8778) 2020-10-07 21:13:52 -04:00
Zach Panzarino
4533767543 fix: issues with monorepo tools (#8687) 2020-09-29 19:24:15 -04:00
Zach Bloomquist
e9854c0df2 chore: update pre-release install comment (#8673) 2020-09-25 16:19:20 -04:00
Jessica Sachs
59ceab5e8c chore: merge branch 'develop' (#8665) 2020-09-24 19:16:11 -04:00
Ben Kucera
7ccf59562e fix(runner): fix firefox 'Open in IDE', test against prod builds in CI (#8551) 2020-09-14 12:40:00 -04:00
Zach Bloomquist
fe4e11ec6e feat(cli): install pre-release binaries by computing binary URL from NPM URL (#8483) 2020-09-08 17:44:37 -04:00
Zach Bloomquist
c37896089b feat(net-stubbing): experimental full network mocking support (#4176) 2020-08-31 09:41:47 -04:00
Gleb Bahmutov
c338856bf8 chore: fix the after pack to wait while files are being copied (#8378) 2020-08-21 13:42:15 -04:00
Zach Bloomquist
5a3e7e6143 fix: add patches to package files (#8272) 2020-08-13 14:39:30 -04:00
Gleb Bahmutov
dc523eb390 chore: install specific Node version on Mac before building binary (#8242) 2020-08-11 13:14:33 -04:00
Ben Kucera
860a20af30 feat: support test retries (#3968)
* add retries e2e test

* restore runner/test/eslintrc

* use mocha pass event, move runner.spec to runner package

* fix .eslintignore

* remove npmInstall logic in helper/e2e script, force custom reporters to use our mocha

* temp 04/09/20 [skip ci]

* add retries output to server/reporter, fix mocha pass event order, cleanup

* e2e tests - dont run electron tests in other browsers

* Update readme to reflect how to start server for cypress tests

* fix after merge

* fix .coffee -> .js after merge

* fix attempt.tsx

* fix runnable titles emitted to terminal reporters

* fix more tests: update snapshots, fix 7_record_spec, 8_reporters_spec

* remove styling for 'attempt-error-region' so it's not indented

- This was the older styling before error improvements and is no longer
necessary.

* try 2: fix rerun before/after hooks

* fix runner with only, runner snapshots, lint fixes

* temp 04/29/20 [skip ci]

* backport changes from test-retries

* change logic to rerun before hooks after top navigation

* fix windowSize for browser e2e test

* fix windowSize for xvfb chrome in e2e test

* ok fine, just disable screenshots

* fix after merge: decaffed navigation.js

* update server/unit test snapshots

* fix after merge: decaffed aliases.js

* fix usage of cypress --parallel flag in circle.yml

* fix circle.yml integration-tests jobs

* fix decaf related typo

* fix circle.yml separate command for runner-integration-tests

* update runner/integration tests + snapshot after error improvements

* fix runner/integration snapshots for chrome/ff stacktrace differences

* rerun ci

* fix passing --parallel to runner-integration tests

* perf: faster lookup for hooks without runnables

* fix afterAll hook switch logic

* simplify mocha prototype patches

* fix decaf utils.coffee after merge

* backport to before/after fix

* backport to before/after fix 2

* cleanup from decaf, fix ui/package.json

* update helpers, simplify runner.spec

* fix lint-types errors, flaky spec

* fix noExit passed to e2e test inline options

* cleanup snapshot utility - refactor to use util file

* remove before/after changes

* make cy obj a class instance

* cleanup/unmerge before/after fixes PR...

* more cleanup

* add comment

* fix runner.spec

* cleanup snapshot utility more, cleanup reporter.spec

* fix after merge

* minor rename variable

* fix after merge: decaffed files

* fix specName in reporterHeader, spec_helper require

* replace reporter specPath usages with spec object from config

* cleanup, fix specs, fix types tests

* fix config spec paths in isolated runner, fix snapshot plugin button

* combine runner.spec.js and runner_spec.js

* fix incorrect merge

* minor minor cleanup

* rename driver/test/cypress to driver/test

* use yarn workspace over lerna for individual package commands

* add error message to driver start

* remove usage of wait-on

* update <reference types/>, import string

* fix driver/readme

* fix readmes after regex replace

* revert wait-on changes

* Revert "revert wait-on changes"

This reverts commit 6de684cf34.

* update yarn.lock

* fix broken path in spec

* fix broken paths in specs with @packages/driver

* move runner/test/cypress into runner/cypress

* start server in pluginsFile in runner/cypress tests

* fix more broken spec paths

* fix broken paths after runner/cypress folder move

* move type definition loading for driver/cypress into dedicated file

* move internal-types to "types" folder, fix driver/index.d.ts

* fix type-check in packages/runner. not exactly sure why

* fix runner type-check by excluding test folder in tsconfig

* bump timeout on e2e/8_error_ui_spec

* update snapshot utility, rename tests in runner/runner.spec, fix README yarn commands

* delete old spec

* fix snapshot naming, remove redundant test in reporter_spec

* fix file renames after merge

* rename runner/ snapshot

* update server/unit/reporter_spec snapshot

* update runner/runner_spec snapshot

* rename runner snapshot file

* address feedback: move server reporter snapshot specs out

* address feedback: add comment about exposing globals

* fix test-retries after merging isolated-runner

* fix runner/test helper, update snapshot

* address feedback: split out runner/retries spec, move reporter/ui tests to runner/ui spec (mostly done), various cleanup

* fix scrolling, attempt opening, update snapshots

* fix e2e support file

* fix 5_spec_isolation

* fix mislabeling attempt screenshots

* only add test results prevAttempts if exists

* fix reporter/unit tests, server/unit tests

* remove dead code, fix test isOpen

* update snapshots for retries.mochaEvents, fix snapshot error in state hydration test, remove dead snapshots

* new moduleAPI schema using attempts array, fix wrapping errors from hook retries, update snapshots

* add displayError, null out fields in moduleAPI schema

* change default retries to {runMode:2, openMode:0}

* fix reporter type-check

* upgrade json-schemas, update snapshots

* reformat error.stack to be only stacktrace, update snapshots

* fix stacktrace replacing in 5_spec_isolation

* fix navigation error causing infinite reloading, bump timeout on e2e/8_error_ui

* fix server/unit tests for new schema

* fix reporter/unit tests

* fix reporting duplicate screenshots using cy.screenshot during test retry

* update snapshot for 6_uncaught_support_file_spec

* bump x-route-version: 3

* fix test.tsx collapsible content, css, fix e2e/8_error_ui, e2e projects excluding retries

* fix css, fix padding in runnable-instruments, fix runner/integration tests

* fixup after merge

* fix reporter/runner to work with split hooks

* update api tests, runner/cypress tests, reporter

* fix 5_spec_isolation snapshots, fix runner/cypress errors.spec, fix null reference in test.tsx

* fix e2e/non_root spec, fix type_check, fix reporter/unit tests

* setup percy snapshots in runner/cypress, fix driver/runner test:after:run event, add tests for only,skip in runner/cypress, fix retried css

* add customPercySnapshot

* fix circle.yml

* fix circle.yml 2

* fix circle.yml 3

* add warning for incompatible retries plugin

* add more percy snapshots

* fix firefox screenshot resolution in e2e test

* Fix testConfigOverrides not affecting viewport (#8006)

* finish adding percy snapshots to runner/cypress retries spec, update error msgs, add tests to be fixed

* remove .only

* fixing missing repo argument

* fix testConfigOverrides usage with retries, fix test

* fix issues from previous merge

* add script that can query CircleCI workflow status

* add circleci job to poll

* add retries

* try yarn lock

* retry, percy finalize

* check for current running job

* do not swallow request error

* better print

* use job name from circle environment

* use debug instead

* renamed circle polling script

* refactor circle to conditionally run percy-finalize when env var is available

- pass job-names to wait on as an argument

* use multi-line strings and quote --job-names

- rename —circle-jobs to —job-names

* add comment

* only poll until the jobs to wait for are blocked or running

* fix running hooks at correct depth after attempt fails from hook and will retry, update e2e snapshots

* fix reporter/unit tests, remove unused toggleOpen code

* move custom percy command into @packages/ui-components and apply them to desktop-gui

* halt percy finalize job if env variable is not set

* if only I could code

* update runner/cypress mochaEvent snapshots, fix e2e firefox resolution

* fix css for attempt border-left, fix attempt-tag open/close icon, add color to attempt collapsible dot

* try percy set viewport width

* set default retries back to {runMode:0, openMode:0}

* formatting: add backticks to warning message

* write explicit test for screenshot overwriting behavior, fix snapshots after changing retries defaults

* fix e2e.it.only`

* cleanup whitespace

* update snapshots

* fix cypress module API types for new result schema

* build and upload binary for test-retries branch too (linux)

* add pre-release PR comment

* fix pre-release commit comment

* rename runner/cypress test

* update retries.ui.spec test titles

* fix after merge: use most recent attempt for before/after hooks

* add suite title to hook error in runner/cypress tests

Co-authored-by: Jennifer Shehane <jennifer@cypress.io>
Co-authored-by: Brian Mann <brian.mann86@gmail.com>
Co-authored-by: Gleb Bahmutov <gleb.bahmutov@gmail.com>
2020-08-10 18:36:45 -04:00
Zach Bloomquist
ffcb036b40 feat(deps): electron@9.0.5 (#7791)
* chore(deps): electron@9.0.5

BREAKING CHANGE: libgbm is a requirement

* update node, xcode, docker images

* lockfile

* chore(types): tsify lib/gui/windows and spec

* fix Electron extension loading

global extension loading was deprecated in 9, now has to be per-session

* make windows fns stubbable

* update electron_spec

* tsify issue_173_spec

* use upstream foxdriver to fix FF >= 75

see https://github.com/benmalka/foxdriver/issues/7

* update test

* for now, install libgbm-dev at ci time

see https://github.com/cypress-io/cypress-docker-images/pull/332

* fix open mode

* remove devtools-ext dir
2020-06-29 14:29:51 -04:00
Zach Bloomquist
882774d949 fix(server): fix excess debug logs from foxdriver (#7727) 2020-06-25 13:58:08 -04:00
Zach Bloomquist
0e632635cd chore: rm non-test-related coffeescript references 2020-06-10 10:49:31 -04:00
renovate[bot]
fedd30cb36 fix(deps): update dependency jimp to version 0.13.0 🌟 (#7618)
* fix(deps): update jimp to 0.13.0 🌟

* Bump max linux filesize for binary

Co-authored-by: Renovate Bot <bot@renovateapp.com>
Co-authored-by: Jennifer Shehane <jennifer@cypress.io>
2020-06-09 15:26:17 +06:30
Zach Bloomquist
1875027073 chore: decaffeinate server tests, scripts, other files (#7591) 2020-06-05 15:12:53 -04:00
Gleb Bahmutov
d69c1d184f do not follow symlinks when copying files during build (#7156) 2020-04-27 16:09:51 -04:00
Dmitriy Kovalenko
379a9e7008 feat: improve component based tests approach (#5923)
- new mode that mounts the spec iframe instead of application iframe
2020-04-26 16:25:24 -04:00
Zach Bloomquist
c80e482009 Fix test script, add Mocha result checks to internal Cypress te… (#7110)
* fix cypress.js script typo

* add verify-mocha-results to driver integration test stages

* add cypress-multi-reporters

* fix circle.yml

* fix yarn.lock

* cleanup

* use working_directory instead of yarn workspace commands

* add reports to ui-components and reporter, update circle.yml

* fix circle.yml

* fix circle.yml

* fix circle.yml

* add more verify-mocha-results
2020-04-23 13:00:46 -04:00
Gleb Bahmutov
eae1a893ff Investigate spec on mac (#7111)
* run scripts unit tests on Mac too

* build this branch on Mac on CircleCI

* skip some mock file system tests, run them only on Linux

* skip dynamically

* use function expression
2020-04-22 13:35:30 -04:00
Zach Bloomquist
4f127e9368 Fix internal driver tests exiting with wrong exitCode (#7078)
* use error.exitCode in cypress:run script

* add log if code is NaN

* expect exitCode in .then too
2020-04-20 14:57:31 -04:00
Gleb Bahmutov
54586f9e4a rename built folder on Windows (#6860) 2020-03-26 13:30:38 -04:00
Gleb Bahmutov
abf4d85869 switch to electron-builder to code sign and notarize Cypress ap… (#6013)
* electron@7.x

* node12.8.1-chrome78-ff70

* Revert "node12.8.1-chrome78-ff70" for now

This reverts commit db2d521994.

* update sendCommand to log on all sendcommands

* promisification in 6.x

* Revert "Revert "node12.8.1-chrome78-ff70" for now"

This reverts commit 57fe764098.

* fix sendcommand

* fix cdp in electron

* fix desktop-gui test

* skip tests that will be fixed by #4973

* bump MAX_ALLOWED_FILE_SIZE :/

* update electron browser spec

* make new dialog code null-proof

* add failing e2e test for issue 5475

* bump electron packager

* add e2e snapshot

* update deprecated electron getters/setters

https://github.com/electron/electron/blob/7-1-x/docs/api/modernization/property-updates.md

* build and test on Mac

* use electron-builder 20.41.0

that adds an option to use hardened Mac OS, which is necessary
for code notarization later.

See https://github.com/electron-userland/electron-builder/releases/tag/v20.41.0
and https://github.com/electron-userland/electron-builder/pull/3858

* electron-builder and pass hardenedRuntime: true

* uncomment build

* upload built binary on mac

* back to 20.41.0, trying after sign hook without success

* use current electron-builder alias instead of build

* retry smoke test on first failure

* testing

* trying to notarize signed app (that does not have node_modules yet)

* env variable names

* copy node_modules ourselves

* build and bundle binary on mac on circle, inject new context

* enable build steps before electron build

* increase mac build timeout

* update build folder on mac

* uncomment actual electron build command

* set linux target to zip

* set zip as target for all platforms

* updated steps

* put notarization hook back

* tweaks for icons

* remove dist electron before code sign

* icons per platform

* make node_modules copy path platform-specific

* fix linux build unpacked folder

* build mac

* fix lint

* test new mac binary against kitchensink

* working on Linux build

* try building entire thing on Linux

* removing correct electron dist folder

* increase zip size limit for now

* add folder rename on Linux from linux-unpacked to Cypress

* print file sizes before zipping

* move linux-unpacked to build dir function

* try deleting second electron file, but code signing probably would not work

* test windows build [build binary]

* ignore tsc errors

* windows build path

* windows [build binary]

* update windows build folder

* increase binary build timeout on Mac

* no need to pass our dist folder

* adding explicit list of additional binaries to code sign on mac

* yarn lock

* uncomment necessary build steps

* electron dir for Linux

* yarn lock again

* back to execa v3

* use execa v4 in packages launcher

* yarn lock again and again

* updated tests that use execa

* print build folder

* add executable name on Linux

* get rid of execa.shell in build scripts

* remove old and commented out code

* need to test building binary on Windows

* throw error from after sign hook if fails

* use execa to zip

* yarn lock

* fix after merge variable

* update test

* add nohoist ffmpeg installer

* patch

* yarn types pass

* yarn lock has binary

Co-authored-by: Zach Bloomquist <github@chary.us>
Co-authored-by: Brian Mann <brian.mann86@gmail.com>
2020-03-24 21:34:52 -04:00
Zach Bloomquist
d810950379 Switch request, request-promise to @cypress/ forks (#6777) 2020-03-19 11:48:24 +06:30
Kukhyeon Heo
ee494d04ee Added TypeScript type checker + Fixed type errors. (#5780)
* Added type_check.js

* Now checks cli, too.

* Ignored a line that should fail.

* Removed cli shims and post-install.

* Updated @types/chai to fix type error.

* Fixed keyboard type errors.

* Updated typescript to 3.7.2 to fix window.Node error in dom/document.

* Removed tsconfig errors that caused type errors in reporter and runner.

* Ignored error test by dtslint. Becaust it's done by type_check.js

* Added npm command.

* Added it to CI.

* Added skipLibCheck option.

* Removed checking chai folder existence.

copy of chai is unnecessary.

* Added 'ignore-progress' option for CI.

* Show success message when type check is finished successfully.

* Use ignore-progress option on CI.

* Moved type definitions from devDependencies to dependencies.

* Fixed new type errors after rebase.

* Updated type errors.

* Removed cli. Because its types are checked by dtslint.

* type_check -> type-check for consistency.

* Updated json-schema.

* Updated blob-util.

* Fix wrong command in CI.

* Revert "Updated blob-util."

This reverts commit e46549af54.
Because it's a breaking change.

* Remove copies of @types if exists.

* Fix stream buffer type error.

* Fix type errors in ui-components.

* Fix type failure.

* Fix lint error.

* Fix type errors

* Regenerate yarn.lock

* Fix type error.

* Fix type failures.

Co-authored-by: Jennifer Shehane <jennifer@cypress.io>
Co-authored-by: Gleb Bahmutov <gleb.bahmutov@gmail.com>
2020-03-17 11:01:31 +06:30
Gleb Bahmutov
ffd4331aa5 Support experimental features (#6265)
* add packages/server experiments

* show experiments in desktop GUI

* add intro experiments text

* conditional message

* add experiments record to start of the headless run

* keep experiments in the config, remove duplicate logic

* small tweaks

* remove experimentalComponentTesting for now, separate PR

* rearrange settings spec into sections per panel

* do not crash if there are no experiments

* return component testing experiment

* work on styling of experiments panel + adding basic tests

* update settings spec text

* add unit tests for experimental features in cypress run output

* Add styling for 'non-enabled' status sign.

* add more experiments and key whitelist in experiments GUI

* add message when there are no experiments

* fix coffeelint

* fix merge in settings spec

* trailing whitespace

* make experiments info all live in one place

* add ts lint exception

* update unit test

* update run spec

* do not show experiments panel at all without experiments

* add more comments

* Update style of ON/OFF status for experimental features.

* remove empty messaging from experiments panel (since panel is no longer shown when empty)

* remove check for 'isEmpty' when showing list

* update lock file

Co-authored-by: Jennifer Shehane <jennifer@cypress.io>
2020-03-16 21:10:08 +06:30