Commit Graph

12373 Commits

Author SHA1 Message Date
KHeo a1d49c5ee4 decaffeinate: Run post-processing cleanups on querying_spec.coffee
Fixed eslint errors and removed returns.
2019-11-28 09:33:19 +09:00
decaffeinate c977d82ec8 decaffeinate: Convert querying_spec.coffee to JS 2019-11-28 09:33:19 +09:00
decaffeinate ffd7c527b7 decaffeinate: Rename querying_spec.coffee from .coffee to .js 2019-11-28 09:33:19 +09:00
Zach Bloomquist b0378dc04e Refactor proxy into own package, implement middleware pattern (#5136)
* renames

* Refactor proxy into own package, implement middleware pattern

don't need these mocha opts anymore

fix test

no more zunder

READMEs

fix test

* pass request by reference

* fix cors path

* Move replace_stream to proxy, concat-stream util in network

* Pin dependency versions

* Revert addDefaultPort behavior

* Add READMEs for proxy, network

* Update README.md

* eslint --fix

* set to null not undefined

* use delete and bump node types

* import cors from package now

* parse-domain@2.3.4

* proxy package needs common-tags

* move pumpify dep

* load through where it's needed, remove unused passthru_stream

* remove unneeded getbuffer call


Co-authored-by: Gleb Bahmutov <gleb.bahmutov@gmail.com>
2019-11-27 19:16:15 -05:00
Zach Bloomquist b96071ba1b release 3.7.0 [skip ci] v3.7.0 2019-11-27 18:09:09 -05:00
Zach Bloomquist 5e3b4bdd84 Revert "fix type when previous selection in input in some cases" (#5812)
Revert "fix type when previous selection in input in some cases"
2019-11-27 16:16:30 -05:00
Zach Bloomquist 0ddedfac0a Revert "fix type when previous selection in input in some cases (#5809)"
This reverts commit bfb9d83fb4.
2019-11-27 16:15:41 -05:00
Ben Kucera bfb9d83fb4 fix type when previous selection in input in some cases (#5809)
* fix type when previous selection in input

* cleanup

* cleanup more

* more cleanup

* more more cleanup final
2019-11-27 15:41:01 -05:00
Gleb Bahmutov 64f5bf0870 catch child process killed with a signal (#5810)
* WIP: catch child process killed with a signal

* unit test getError

* we don't need custom exit code

* Update cli/lib/exec/spawn.js

Co-Authored-By: Zach Bloomquist <github@chary.us>

* Update cli/lib/errors.js

Co-Authored-By: Zach Bloomquist <github@chary.us>

* update snapshots with wording
2019-11-27 15:21:47 -05:00
Kukhyeon Heo 0311c580c8 TypeScriptify reporter. (#5666)
* Turn on strict mode for ts files.

* Tsified lib/app-state.

* Tsified lib/err-model

* Fixed eslint setting for tsx files.

* Installed typings for classnames, chai-enzyme.

* Tsified header/controls.jsx. Fixed app-state.ts for it.

* Changed parser to typescript-eslint.

* Tsified header/stats-store

* Turn off no-unused-vars because it is checked by typescript compiler.

* Removed Omit because we use typescript parser for eslint.

* Tsified header/stats

* Created Props interfaces.

* Tsified header/header

* Tsified hooks/hook-model

* Tsified routes/route-model

* Tsified lib/util

* Tsified collapsible/collapsible

* Tsified lib/flash-on-click

* Tsified instrument-model and agent.

* Tsified command/command-model.ts

* Made hook-model use command-model types.

* Tsified runnable/runnable-model and suite-model

* Tsified lib/scroller.

* Tsified test/test-model.

* Tsified runnable-store and fixed related files.

* Tsified shortcuts

* Renamed events.ts

* Tsified lib/events

* Added typings

* Tsified command/command.tsx.

* Added more types to command.tsx

* Tsified AnError and TestError

* Tsified Hooks.

* Tsified Routes.

* Tsified test.tsx.

* Tsified runnable-and-suite.tsx.

* Tsified runnables.tsx

* Added react-dom types.

* Tsified main.jsx.

* Fixed for build.

* Fixed "Definition was not found" error.

* Fixed sinon name imports.

* Fixed Agents test types.

* Removed IAppState.

* Renamed for clarity.

* Fixed model type in test-error.

* Removed IStatsStore

* Fixed HookModel.

* Removed !. in events.

* Fixed RouteModel.

* Fixed runnables-store.

* Fixed TestModel-related things.

* Removed anys.

* Fixed lint error.

* Fixed AppState.pinnedSnapshotId type.

* Fixed more types.

* Removed NodeJS.TimeOut.

* Fixed unit test failures.

* fix lint script

* used warn instead of 1
2019-11-27 14:10:04 -05:00
Kukhyeon Heo e19bcc038a CI should fail when something went wrong. (#5779)
* Added unit test script wrapper.

* Removed bin-up to make lint-coffee fail.

* Made mocha tests return non-zero value on failure for reporter and runner

* Added empty space to test ci failure.

* remove extra whitespace

* use Promise.delay instead of hand-rolled sleep function

* include root-level tests

* exit with number of failures
2019-11-27 12:41:45 -05:00
Kukhyeon Heo e313f8cdc3 Fixed reporter unit-test failures. (#5775)
Co-authored-by: Chris Breiding <chrisbreiding@users.noreply.github.com>
2019-11-27 11:23:54 -05:00
Kukhyeon Heo 26ed04b637 Fixed null JSON file error. (#5562)
* Fixed null JSON file error.

* Added new fixture page to fix the failure.

* [] -> ''.

* Fixed test message.

* Asserts returned json value on the client side.

* simplify test a little, remove waits

* fixture json format


Co-authored-by: Gleb Bahmutov <gleb.bahmutov@gmail.com>
2019-11-27 10:22:50 -05:00
Josef Biehler 421bed6dc3 Enable e2e test run on windows systems (#5586)
* do not pass mocha again if we are on windows

* seems that we have to run the runner before the execution of the e2e tests

* adjust README according to review
2019-11-26 20:18:25 -05:00
Zach Bloomquist 8b561c31ef Decaff cypress/log.coffee (#5733)
Decaff cypress/log.coffee
2019-11-26 17:27:54 -05:00
decaffeinate f887b532f6 decaffeinate: Run post-processing cleanups on log.coffee
Fixed eslint errors.

Fixed pick.
2019-11-26 17:00:14 -05:00
Zach Bloomquist 4c194fca32 Fix regression in 3.5.0 where a cy.visit that changes superdoma… (#5702)
* clean up cookies_spec in preparation for more assertions

* add test for setting 2 cookies at each redirect

* clean up tests somewhat

* add failing test

* make buffers a singleton

* do not resolve visit on superdomain change with cached buffer

* Update request_spec that expects 1 GET per visit

* update server_specs that expect 1 request/visit

* improve variable names + logging in request.coffee

* always reset buffers before test run + on visit
2019-11-26 13:39:39 -05:00
Aleksandr Elmekeev fd38e39799 Issue 5656 Fix validation of cookie domain (#5657)
* Correct domainMatch usage in request.coffee

* Correct domainMatch usage in cdp_automation.ts

* improve variable names + logging in request.coffee

* truncate screenshot data in verbose cri logs

* add some headers to maybeRetryOnStatusCodeFailure

* try: i believe the cdp_automation ordering was correct

* add add'l cookie verbose logging

* add e2e tests for this cookies bug


Co-authored-by: Zach Bloomquist <github@chary.us>
2019-11-26 12:45:41 -05:00
Andrew Smith 146680eff8 Introduced new error message for position:fixed and needs scrol… (#5594)
Introduced new error message for position:fixed and needs scroll.

Co-authored-by: Andrew Smith <andrew@andrew.codes>
2019-11-26 11:29:52 -05:00
Andrew Smith 67fb54454c Merge branch 'develop' into issue-1379 2019-11-26 10:23:48 -05:00
Ben Kucera f2dfebe1b4 filter out duplicate modifiers from cy.type (#5696)
* filter out duplicate modifiers from cy.type

* add comments

* undo reversing modifier keys, keep FIFO order of release

* fix test

* feedback: use lodash chain
2019-11-26 09:26:06 -05:00
Zach Bloomquist 16f085dc12 Extend cy.its and cy.invoke to accept a number as 1st arg (#5755)
* extend cy.its and cy.invoke to accept a number as 1st arg

* add types tests

* add expecttype

* add its and invoke types to take an index
2019-11-26 08:26:45 -05:00
Zach Bloomquist bbb8149a04 Delete some very old unused server tests (#5768) 2019-11-25 11:03:21 -05:00
sainthkh 6749a0edc6 Fix lint error. (#5735) 2019-11-19 13:38:40 -05:00
renovate[bot] 6bb3a483f9 fix(deps): update dependency parse-domain to version 2.3.4 🌟 (#5726)
* fix(deps): update parse-domain to 2.3.4 🌟

* update details now that s3.amazonaws.com is a public suffix

* bump max size


Co-authored-by: Renovate Bot <bot@renovateapp.com>
Co-authored-by: Zach Bloomquist <github@chary.us>
2019-11-19 13:06:11 -05:00
Gleb Bahmutov b03b25c258 feat: pass list of browsers to plugins file (#5068)
and allow project to customize the list of browsers
2019-11-19 09:02:17 -05:00
decaffeinate 5b99196e1e decaffeinate: Convert log.coffee to JS 2019-11-19 14:56:58 +09:00
decaffeinate 33d57f9999 decaffeinate: Rename log.coffee from .coffee to .js 2019-11-19 14:56:58 +09:00
Zach Bloomquist 7fc110dfb6 Delete old 'driver' unit tests (#5730) 2019-11-18 17:40:58 -05:00
Jennifer Shehane d194914408 Get TRAVIS_PULL_REQUEST_SHA or the commit sha (#5714)
* Get TRAVIS_PULL_REQUEST_SHA or the commit sha

* add SHA to captured env vars + update tests for PR vs regular travis env vars
2019-11-18 15:33:58 -05:00
Gleb Bahmutov 2ea77db35a Collect GitHub templates in .github folder (#5701)
* move github templates into .github folder

* move code of conduct

* add pull request review comments

* fix a few missed links to newly moved github resources


Co-authored-by: Jennifer Shehane <jennifer@cypress.io>
2019-11-18 15:32:41 -05:00
renovate[bot] bf6c187a0d chore(deps): Update dependency @cypress/json-schemas to version… (#5713)
Co-authored-by: Renovate Bot <bot@renovateapp.com>
2019-11-15 14:04:33 -05:00
Zach Bloomquist 2efb176f50 Fix bug where cy.request does not work with followRedirect: fal… (#5704)
* add failing test

* always define currentUrl in sendPromise

* simplify test case
2019-11-15 12:16:26 -05:00
Ben Kucera d0a5134a77 Normalize e2e test snapshot stacktraces (#5705)
* squash stacktrace lines in e2e stdout snapshots

* apply snapshot change

* fix smol error

* update re, re snapshot

* fix re again

* add comment
2019-11-15 12:12:13 -05:00
Gleb Bahmutov 8c911a58ae cli: remove any leftover double quotes from group and ci build… (#5692)
* cli: remove any leftover double quotes from group and ci build id CLI args

* call function directly
2019-11-15 11:59:45 -05:00
Gleb Bahmutov 95a5d17fa0 add ci variables for GitHub Actions (#5687)
* add ci variables for GitHub Actions

* update snapshot
2019-11-15 11:57:16 -05:00
Brian Mann ff6bdcdfee call setTimeout with the right global scope to prevent 'this' f… (#5709) 2019-11-15 09:01:34 -05:00
Jennifer Shehane 5d2825c844 Add publish docker image step to Deploy.md (#5677)
- also minor updates / more internal links
2019-11-14 10:31:49 -05:00
Jennifer Shehane df54480d09 Add back checkbox to tag original issue in ZenHub [skip ci]
- Some PRs have forgotten to do this - this should be added back as a checklist before merging.
2019-11-14 09:32:46 -05:00
Zach Bloomquist 4358afd29c Fix flaky request retrying unit tests (#5693) 2019-11-13 13:27:24 -05:00
renovate[bot] 888513fb07 chore(deps): Update dependency @cypress/webpack-preprocessor to… (#5690)
Co-authored-by: Renovate Bot <bot@renovateapp.com>
2019-11-13 12:37:56 -05:00
sainthkh d65ee3045e Fix formatting in Command Log test results. (#5619)
* Preserve number strings.

* Fixed warning caused by exception.

* Fixed excessive quotation marks. And added related tests to show this.

* Show keys properly.

* Minor fixes: arrowify, use backtick.

* Added tests.

* Fixed confusing asterisks.
2019-11-12 10:20:15 -05:00
Zach Bloomquist 46ad71a6b9 release 3.6.1 [skip ci] 2019-11-08 18:04:11 -05:00
renovate[bot] 87d41bc54c chore(deps): Update cypress-example-kitchensink to 1.8.1 🌟 (#5600) 2019-11-08 15:57:44 -05:00
sainthkh ab8957a3ba Fixed backface visibility. (#5591)
* Fixed backface visibility.

* Show reason.

* Reorganized logic.
2019-11-08 15:49:56 -05:00
Ben Kucera 6c39d2ebfd fix: give proper error message when err.stack is undefined (#5313)
* fix: give proper error message when err.stack is undefined

* fix lint

* update snapshot

* update test to fail w/o src changes
2019-11-08 15:43:06 -05:00
Jennifer Shehane 1466f7cc98 Properly close login modal during project setup (#5647)
* write failing test for login modal not closing during project setup

* add closeLogin, openLogin to authStore

* update test to click Continue before setup can proceed

* add event listeners to fix this strange modal flow
2019-11-08 15:38:44 -05:00
Zach Bloomquist 98063aec64 Fix cy.clearCookie, fix HTTP redirect behavior, fix cy.visit HT… (#5478)
* Add a bunch of extra tests in 2_cookies_spec

* Try not doing weird things to cookies

* if cypress.env.debug is set, log command execution thru server

* improve elctron logging - we missed this when doing cri-client logging

* make video_capture frames part of verbose

* cleanup

* use the data from getCookie to run deleteCookies

* fix screenshots

* still resolve with cleared cookie

* cy.getcookie now gets ALL cookies from ALL domains

* return Promise for followRedirect, not req.init wrap

* allow passing domain: null to cy.getCookies to get all

* update request_spec to be clearer

* still need to call followRedirect option during sendStream

* beautify the e2e tests

* correct e2e test + snapshot

* always discard default ports when get/set buffer - fixes #5367

* make cy.clearCookies({ domain: null }) clear ALL cookies

* update spec

* use string url as key

* rebalance some e2e tests to make time for new cookies e2e tests

* always add default port to buffer url

* jk, remove default port

* set hostOnly: true when appropriate when setting cookies back on visit

* update tests

* Revert "if cypress.env.debug is set, log command execution thru server"

This reverts commit 623ed443d4.

* try to clean diff, cookies_no_baseurl didnt change

* WIP move the expected cookies array out of snapshot and expect inline

* finish updating tests

* add missing snapshot

* remove useless onstdout


Co-authored-by: Brian Mann <brian.mann86@gmail.com>
2019-11-07 19:12:27 -05:00
Zach Bloomquist 8298881c4f test commit [skip ci] (#5640) 2019-11-07 17:57:00 -05:00
Zach Bloomquist 2c2549aff6 Catch stray reads/writes on destroyed stream_buffers (#5605)
* Catch stray reads/writes on destroyed stream_buffers

* tsify stream_buffer to catch anything else like this
2019-11-07 17:51:42 -05:00