Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Cypress v4.0 #4226

Merged
merged 65 commits into from
Feb 6, 2020
Merged

Cypress v4.0 #4226

merged 65 commits into from
Feb 6, 2020

Conversation

jennifer-shehane
Copy link
Member

@jennifer-shehane jennifer-shehane commented May 17, 2019

User facing changelog

See cypress-io/cypress-documentation#1710 for full list of changes

How has the user experience changed?

Migration Guide: https://github.com/cypress-io/cypress-documentation/pull/1710/files#diff-f4f21d3e2e892c9d9bbf95cbe7c55c98

PR Tasks

jennifer-shehane and others added 17 commits May 17, 2019 14:23
…t did not support Node 4 (#4208)

* remove Node 4 support, bump packages that were previously approved but had removed Node 4 support

* Update snapshots to reflect whitespace changes made in commander dep

* bump supports-color dep (was previously not updated due to lack of Node 4 support)
* Initial upgrade changes

* Some quick fixes

* More fixes

* Clean up exp logic and fix spread array failures

* Remove caret from package.json

* Add handling for proxies in isJquery

* iterate on flaky test, increase default command timeout
* upgrade @cypress/browserify-preprocessor to 2.1.0

* fix failing tests

* update snapshot
chrisbreiding and others added 3 commits June 4, 2019 10:06
# Conflicts:
#	cli/__snapshots__/cli_spec.js
#	packages/driver/test/cypress/integration/cypress/cypress_spec.coffee
#	packages/server/package.json
@cypress

This comment has been minimized.

chrisbreiding and others added 14 commits January 29, 2020 12:47
* migrate vscode eslint settings

* Handles whitespaces with newlines.

* Feature: contains() matches case insensitivity

* Fixed merge conflicts.

* Fixed conflicts.

* Added option type, CaseMatchable.

* Fixed lint error.

* Added test for leading/trailing spaces.

* Add an error message for regex and matchCase conflict.

* Fix the valid case that throws an error.

* Fix how error message is thrown.

* update some cli deps that have fallen out of date since last commit

* update cli snapshot

Co-authored-by: Gleb Bahmutov <gleb.bahmutov@gmail.com>
Co-authored-by: Jennifer Shehane <shehane.jennifer@gmail.com>
Co-authored-by: Chris Breiding <chrisbreiding@users.noreply.github.com>
* upgrade mocha to 7.0.1

* enableTimeouts: false -> timeout: false

* upgrade sinon to 8.1.1

* sinon.sandbox.create -> sinon.createSandbox
something is wrong with coffeescript compiling, where a syntax error in the test file also gets thrown as an error in the support file, but inconsistently, causing this e2e test snapshot to be flaky. solution for now is to avoid coffeescript for that test file.
* update browser types and list

* add todo

* first pass of changes

* remove 'server' mode, since it is unused

* use foundbrowser type for eletron definition

* fix server unit tests

* update --browser arg to allow name:channel

* improve backwards compatibility impl

* update 3_config_spec snapshot

* fix 2_headless_spec

* fix 5_stdout_spec

* update browser icon stuff

* update 5_spec_isolation_spec snapshot

* Chrome Canary => Canary

* update user-facing types

* fix displayName type

* add debug logs

* fix cypress_spec

* taps

* update config.json
* feat: add microsoft edge support

* feat: support edge dev

* feat: support windows edge canary and edge dev

* test: update snapshots

* fix lint errors

* edge dev -> edge

* trigger windows build

* run kitchensink tests on Chrome and Edge on AppVeyor

* update browser types

* add Edge Beta + Edge Dev

* move edge stable to top of list

Co-authored-by: Yousaf Nabi <yousafn@gmail.com>
Co-authored-by: Jennifer Shehane <shehane.jennifer@gmail.com>
Co-authored-by: Chris Breiding <chrisbreiding@users.noreply.github.com>
Co-authored-by: Zach Bloomquist <github@chary.us>
* add test for stub.callThroughWithNew on constructor

* add test for spy on constructor

* use patch-package for now
* async/await-ify chrome.ts, update e2e.js

* remove psInclude

* bump snap-shot-it, remove patch-package

* fix failing tests, tighten up code

* remove unused Promise.all

* more code cleanup from coffeescript conversion

* fix expectedExitcode

* update snapshot with cross origin error message

* more code cleanup from coffeescript conversion

* remove global state, cleanup normalizing stdout in snapshots

* fix asserting on the expected exit code

* remove firefox a default browser in e2e tests

* remove dupe const

* make onStdout return first arg by default

* make expectedExitCode: 0 the default, remove duplicate option from all e2e tests

* reuse _getArgs() properly, tighten up dupe code, move perf e2e tests to use new e2e.it helpers

* make e2e test pass properly, and capture snapshot

- this was being overlooked because expectedExitCode wasn’t being set
(until now its the default)

* revert firefox specific changes to reduce PR diff

* remove newline

Co-authored-by: Brian Mann <brian.mann86@gmail.com>
* deprecate old API for before:browser:launch

* trigger ci

* allow chrome preferences to be overwritten in before:browser:launch

* add e2e test for chrome preferences

* add launchOptions.windowSize, refactor plugin handling into browser/utils

* async/await-ify chrome.ts, update e2e.js

* add padding to warning, allow more than 1 warning in run mode

* remove psInclude

* bump snap-shot-it, remove patch-package

* fix failing tests, tighten up code

* remove unused Promise.all

* more code cleanup from coffeescript conversion

* fix expectedExitcode

* update snapshot with cross origin error message

* more code cleanup from coffeescript conversion

* remove global state, cleanup normalizing stdout in snapshots

* fix asserting on the expected exit code

* remove firefox a default browser in e2e tests

* remove dupe const

* make onStdout return first arg by default

* remove only

* make expectedExitCode: 0 the default, remove duplicate option from all e2e tests

* fix test for electron

* reuse _getArgs() properly, tighten up dupe code, move perf e2e tests to use new e2e.it helpers

* make e2e test pass properly, and capture snapshot

- this was being overlooked because expectedExitCode wasn’t being set
(until now its the default)

* revert firefox specific changes to reduce PR diff

* remove newline

* temp 02/04/20 [skip ci]

* add more scenarios / return values

* rename plugin deprecation project fixture

* prevent warnings in run mode from being called multiple times in the same browser launch

- add plugin integration tests
- cleanup some promise code in browsers/chrome
- refactor the e2e deprecation tests

* update e2e deprecation specs, test that deprecation warning is displayed once per spec on a run

* cleanup let -> const, coffescript conversion

* bump snap-shot-it, remove patch-package

(cherry picked from commit ba23be5)

* bump cli snap-shot-it

* cleanup: let -> const, parseFloat, formatting

* revert cross origin normalization

* fix spacing

* add types for plugin events

* dont pad warning message in run mode

* add e2e test for adding extensions before:browser:launch

* fix failing electron unit test, consolidate creating default launch options

* add extensions for electron + warning if install fails

* fix failing tests, yield the right before:browser:launch args signature

* e2e test electron via devtools extension

* remove .only

* add stdout assertions to e2e/1_deprecated_spec

* remove snapshot whitespace

* rename deprecation event

* update deprecated browser launch args warning message

* throw error on unexpected bbl property

* add tests for warning + error on bbl

* update snapshot

* revive 2 useful tests to validate how launchOption args are merged

* try fix e2e fullscreen spec, update snapshots

* tighten up code for throwing errors on unknown launch options properties

- list out the unknown and expected properties using existing
conventions
- tighten up the error message a bit

* rename options -> launchOptions, add e2e test for adding unknown properties to launchOptions, removed dupe snapshots

* fix fullscreen e2e test

* only push user gesture arg if chromium

* add e2e tests for throwing + rejecting errors, run e2e tests on all browsers, avoid ps logic only in electron

* remove conditional args in fullscreen test

* dont automatically install the latest version of chrome in circle

* add stubs for new electron properties

* switch from using port 5555 to 5544 to avoid common conflicts

* temporarily commenting out windowSize launchOption so release is unblocked and all tests pass

- can add it back in later once the e2e tests pass in CI

* make the path to chrome profile correctly dynamic to account for all operating systems

* remove magic length(8) and slice out the first 4 custom args set from the plugin launch options

* add back --start-maximized in chrome

* deleting windowSize-related code... for now!

Co-authored-by: Zach Bloomquist <github@chary.us>
Co-authored-by: Brian Mann <brian.mann86@gmail.com>
Co-authored-by: Chris Breiding <chrisbreiding@users.noreply.github.com>
Comment on lines 45 to 47
expect(err.backend).to.be.true
expect(err.stack).not.to.include("From previous event")

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this needed a done callback because there's no guarantee the .catch handler was fired - so we either need to use done or use a .then(() => throw new Error(...) or expect(@Cypress.backend("foo")).to.eventually.be.rejectedWith(...)

@@ -106,7 +106,7 @@ describe "promises", ->

cy.foo()

it "can return a promise that throws on its own without warning", (done) ->
it "can return a promise that throws on its own without warning", ->
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

done problem with done here as previous comment

@@ -128,3 +127,4 @@ describe "promises", ->
.then ->
cy.wrap({}).then ->
throw new Error("foo")
return
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

add comment why this is necessary

flotwig and others added 6 commits February 5, 2020 15:53
* remove --browser canary compatibility

* update warning when canary is passed

* add tests for --browser canary warning

* Update packages/server/test/unit/browsers/browsers_spec.coffee
* define types for plugin events

* add plugins file TS test

* fix plugins return type

* add void returns where allowed

* config can be partial

* add async test

* cannot return unknown keys in config

* add more tests

* add Task types and tests

* fix style issues

* update task type with compromise, remove redundant tests

* fix type

* bump kitchensink dep

* add typescript reference and jsdoc to plugins scaffold file

* update scaffold snapshot

* add more tests for before:browser:launch

* fix return type

Co-authored-by: Gleb Bahmutov <gleb.bahmutov@gmail.com>
Co-authored-by: Jennifer Shehane <shehane.jennifer@gmail.com>
- Windows.resetExtensions => removeAllExtensions
- remove all extensions before installing too
Co-authored-by: Ben Kucera <14625260+Bkucera@users.noreply.github.com>
Co-authored-by: Gleb Bahmutov <gleb.bahmutov@gmail.com>
Co-authored-by: Brian Mann <brian.mann86@gmail.com>
Co-authored-by: Zach Bloomquist <github@chary.us>
Co-authored-by: Jennifer Shehane <shehane.jennifer@gmail.com>
@flotwig flotwig merged commit c9bccf2 into develop Feb 6, 2020
@cypress-bot cypress-bot bot mentioned this pull request Feb 6, 2020
18 tasks
@flotwig flotwig deleted the v4.0-release branch January 24, 2022 18:16
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Cypress v4.0
8 participants