* fix(deps): update ansi_up to 4.0.3 🌟
* Update ansi_up to use new non-deprecated 2.0+ api
* Do not pass 'use_classes: true' (defaults to false) - we are expecting rgb values in our tests
* set back to use_classes
* Fix 'use_classes' option which was being incorrectly passed
Co-authored-by: Renovate Bot <renovatebot@gmail.com>
Co-authored-by: Jennifer Shehane <shehane.jennifer@gmail.com>
* use cross-env in npm scripts so they work on Windows
* update more cross-envs
* Apply suggestions from code review
Co-Authored-By: Gleb Bahmutov <gleb.bahmutov@gmail.com>
* 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>
* 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
* 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>
* 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>
* WIP: log spec search steps
* add multiple files via glob test
* allow testFiles to be a string or a list of strings to match
* failing config tests: testFiles type change
Change `testFiles` from a string to either a string **or** array of strings; following similar pattern as `ignoreTestFiles`
* testFiles type change passing tests
* update verbiage related to testFiles type change
* enable running integration tests locally
See https://github.com/paulmillr/chokidar/issues/855 for more details.
* integration tests; failing
Seems to fail for similar reason as #4543 and is likely resolved with PR #4849
* correct test verbiage
Distinguish between the two tests; as they are subtly different.
* update TS types for testFiles type change
Updated the comments, but forgot to update the actual type. This commit rectifies that.
* correct CLI syntax in test
`--config` was not being passed the appropriate value. Now matches other test cases; such as that found in [args_spec](https://github.com/cypress-io/cypress/blob/92b91fe514e5ff6286b4d4e26d2df23062bdf869/packages/server/test/unit/args_spec.coffee#L210)
* remove unsupported syntax from tests
From looking at other tests, it does not appear that the syntax `--config=testFiles=glob1,glob2` is current supported. Removing the test for this test case.
* test the correct config value
Previously was testing `ignoreTestFiles` instead of `testFies`
* provide more accurate test assertion
* correct config's `testFiles` type
Should be a string or an array of strings.
* remove unnecessary newline
* tweak verbiage to better align with intention
Co-Authored-By: Ben Kucera <14625260+Bkucera@users.noreply.github.com>
Co-authored-by: Andrew Smith <andrew@andrew.codes>
* WIP: rip out handlebars and implement with squirrelly
- handle caching ourselves
- TODO: add tests, make sure escaping and all that jazz works
* fixes squirrelly template handling
* only fire mocha events when in run mode
* add unit tests for template engine rendering + caching
* try connecting to chrome remote interface
* linting
* print CRI targets for better debugging
* linting
* load empty tab first when connecting to CRI
* first load blank page, then navigate
* Page.navigate is working
* linting
* remove title
* add mocha banner
* more banners
* update some server unit tests
* update integration test
* document how to run single driver spec file
* set the focus back on the page before navigating from blank chrome tab
* update server unit test
* do not store Chrome remote interface reference for now
* record video of the Chrome tab using screencast API
* use dynamic port to connect to Chrome remote interface
* update unit tests
* refactoring
* wrap chrome remote interface in our interface, limit access to send
* resolved merge
* fix reference
* passing run unit spec
* stub canary search for CI to pass
* add build step to packages/server
* update chrome spec
* do not build js on install for server
* updated spec snapshots
* update 6_visit_spec snapshot
* update snapshot for 6_web_security_spec
* update snapshot for 3_plugins_spec
* update snapshot for 3_user_agent_spec
* update snapshot for 5_stdout_spec
* update snapshot for 2_browser_path_spec
* do not git ignore js files, add note why
* update several snapshots with video on Chrome
* update visit performance snapshot
* add chrome-remote-interface dependency
* cleanup coffeescript conversion to JS, fix some type errors, make parallel override clearer
* fix failing tests
* Fix snapshot - now we do record in Chrome, so warning message is no longer there.
* remove chrome warnings about not recording from snapshot
* Remove performance tests from 6_visit_spec snapshot
* Remove error from snapshot
* Add newline back to cy_visit_performance_spec snapshot
* Use CDP to control Chrome cookies + screenshot
* Add devtools types
* Cleanup
* Cleanup
* Add guards for minimum CDP version
* Fix failing tests
* Split cdp_automation_spec out of electron_spec
* Move takeScreenshot to cri-client
* Navigate to about:blank
* look for blank page url
* add note about avoiding Prettier
* disable prettier a little more
* call chrome remote interface close after each spec
* return promise when starting screencast
* update failing unit tests, add cri client close test
* update integration test
* Add verbose debug statements to cri-client
* Use connect.createRetryingSocket for CDP connection
* record video from chrome browsers
* add method for validating browser family
* update e2e spec snapshot
* update 4_request_spec snapshot
* update snapshot for spec 1_commands_outside_of_test_spec
* update snapshot for 3_plugins_spec
* update snapshot for spec 3_user_agent_spec
* try: Always log video capturing errors
* update snapshot for 2_browser_path_spec
* update snapshot for 2_cookies_spec
* better browser family test
* update snapshot for 5_stdout_spec
* update snapshot for 5_subdomain_spec
* Add protocol_spec tests
* do not capture video during performance test
* Add test for VIDEO_POST_PROCESSING_FAILED warning
* Add basic cookie validation in cy.setCookie
* Update cdp_automation to throw on Network.setCookie failure code
* Update tests 🎉
* Update snapshot
* Fix test
* Remove redundant logs, cleanup
* Add cri-client_spec, fix some small bugs, improve errors
* Update dep
* use client.on to register screencast callback
* use isCookieName
* strict-cookie-parser@3.1.0
* cleanup prettier, extract some functions, switch to browser.family
* moar cleanup and fixes
* add logging to the cri-client so we can see every message sent + received to the cdp protocol
* bump bluebird to 3.7.0 for .tapCatch addition
* Fix unit tests
* WIP: update e2e test to ensure that duration of the video matches what we expect
* Test duration of recorded video
* Run 6_video_compression in chrome + electron
* Cleanup
* finish ffmpeg duration verification
* Update 8_reporters_spec snapshot
* Fix cri-client test
* Update CRI close logic to monkey-patch browser.kill
* add isBrowserFamily back
* make it possible for remote-debugging-port to get overridden
* Make CDP timeout 5s; add unit, e2e tests for CDP failure; add user-friendly CDP failure error
* Update tests
* Use CYPRESS_REMOTE_DEBUGGING_PORT to set CDP port; update CDP error message
* Change new Buffer to Buffer.from
* Apply name validation on all cookie commands
* Just throw on Chrome start if the CDP version is < 1.3
* Fix cypress_spec
* Use CDP to set resolution + scale factor in Chrome e2e
* Revert "Use CDP to set resolution + scale factor in Chrome e2e"
This reverts commit a1b86d9413.
* use CYPRESS_FORCE_BROWSER_SCALE to force standard resolution
* don't do --window-size --kiosk
* Use CDP to set resolution + scale factor in Chrome e2e
* Revert "use CYPRESS_FORCE_BROWSER_SCALE to force standard resolution"
This reverts commit 22c5e78670.
* Use Page.captureScreenshot for Electron + Chrome, reduce logic
* Use before() task to force device metrics in Chrome
* Fix protocol_spec
* Update 7_record_spec to allow for before() hook
* Update 6_task_spec snapshot
* Appease eslint
* Update hooks in 5_spec_isolation snapshot
* some general promisification and cleanup
* feedback on pluginsfile
* cdp_automation feedback
* chrome.coff feedback
* feedback
* run e2e tests on port 4466, ensure no e2e test ever runs on 5566 to prevent conflicting with debugger port
* accept new 'remote:debugger:protocol' automation command to control device metrics overrides
* update web security e2e to run on electron + chrome
* run web security tests in electorn, disable context isolation
* pass disable-site-isolation-trials to Electron so webSecurity works
* Fix errors in e2e tests caused by extra log item
* fix cri-client unit tests
* fancy arrows in log message
Co-authored-by: Gleb Bahmutov <gleb.bahmutov@gmail.com>
Co-authored-by: Brian Mann <brian.mann86@gmail.com>
Co-authored-by: Jennifer Shehane <jennifer@cypress.io>
* Update circle.yml to run e2e tests in chrome + electron
* WIP: create multiple tests per browser, but utilizing the same base snapshot
- create a dynamic test title with browser appended
- use a base named snapshot without the browser name appended
- patch snap-shot-it not to rethrow twice unnecessarily which ends up
throwing the wrong error
* Add e2e.coffee to stop-only ignore
* Convert existing x-browser e2e tests to use e2e.it
* update snapshots
* really add e2e to stop-only skip
* Replace screenshot dimensions in all tests, run only in process.env.BROWSER
* add e2e.it to more tests that should be x-browser
* update snapshots
* PEMDAS
* default e2e browser -> electron
Run afterEaches when skipping testo
Recurse upwards with runAfterEach
stop promise chains
* Revert "default e2e browser -> electron"
This reverts commit 3104f998da.
* Undo
* snap-shot-it@7.9.0
* Remove snap-shot-it patch
* Change e2e snapshot to use allowSharedSnapshot
* Add keepScreenshotDimensions to screenshot specs
* update snapshots
* fix snapshotit
* keepScreenshotDimensions: true -> sanitizeScreenshotDimensions: false
* Fix screenshot snapshots
* reduce snapshot noise
* rm 0_simple_spec
* deabstract circle.yml command
* fix circle.yml
* reduce snapshot noise
* clean up 6_visit_spec snapshot
* use allowSharedSnapshot: true in 5_spec_isolation
* Fix 5_screenshots, 2_form_submissions
* Normalize screenshot sizes in 5_spec_isolation snapshot
* Add sanitizeScreenshotDimensions only to non-e2e-project tests
Add --window-size=1280,720 --kiosk to chrome args
* update snapshots
* Use e2e.it for chrome/electron-specific tests
* handle logic for skipping tests when default browsers do not match specified browser
- implement e2e.it.skip to match mocha’s it.skip
- allow turning off dynamic test generation
Co-authored-by: Brian Mann <brian.mann86@gmail.com>
* try connecting to chrome remote interface
* linting
* print CRI targets for better debugging
* linting
* load empty tab first when connecting to CRI
* first load blank page, then navigate
* Page.navigate is working
* linting
* remove title
* add mocha banner
* more banners
* update some server unit tests
* update integration test
* document how to run single driver spec file
* set the focus back on the page before navigating from blank chrome tab
* update server unit test
* do not store Chrome remote interface reference for now
* record video of the Chrome tab using screencast API
* use dynamic port to connect to Chrome remote interface
* update unit tests
* refactoring
* wrap chrome remote interface in our interface, limit access to send
* resolved merge
* fix reference
* passing run unit spec
* stub canary search for CI to pass
* add build step to packages/server
* update chrome spec
* do not build js on install for server
* updated spec snapshots
* update 6_visit_spec snapshot
* update snapshot for 6_web_security_spec
* update snapshot for 3_plugins_spec
* update snapshot for 3_user_agent_spec
* update snapshot for 5_stdout_spec
* update snapshot for 2_browser_path_spec
* do not git ignore js files, add note why
* update several snapshots with video on Chrome
* update visit performance snapshot
* add chrome-remote-interface dependency
* cleanup coffeescript conversion to JS, fix some type errors, make parallel override clearer
* fix failing tests
* Fix snapshot - now we do record in Chrome, so warning message is no longer there.
* remove chrome warnings about not recording from snapshot
* Remove performance tests from 6_visit_spec snapshot
* Remove error from snapshot
* Add newline back to cy_visit_performance_spec snapshot
* Navigate to about:blank
* look for blank page url
* add note about avoiding Prettier
* disable prettier a little more
* call chrome remote interface close after each spec
* return promise when starting screencast
* update failing unit tests, add cri client close test
* update integration test
* Add verbose debug statements to cri-client
* Use connect.createRetryingSocket for CDP connection
* record video from chrome browsers
* add method for validating browser family
* update e2e spec snapshot
* update 4_request_spec snapshot
* update snapshot for spec 1_commands_outside_of_test_spec
* update snapshot for 3_plugins_spec
* update snapshot for spec 3_user_agent_spec
* try: Always log video capturing errors
* update snapshot for 2_browser_path_spec
* update snapshot for 2_cookies_spec
* better browser family test
* update snapshot for 5_stdout_spec
* update snapshot for 5_subdomain_spec
* Add protocol_spec tests
* do not capture video during performance test
* Add test for VIDEO_POST_PROCESSING_FAILED warning
* use client.on to register screencast callback
* cleanup prettier, extract some functions, switch to browser.family
* moar cleanup and fixes
* add logging to the cri-client so we can see every message sent + received to the cdp protocol
* bump bluebird to 3.7.0 for .tapCatch addition
* Fix unit tests
* WIP: update e2e test to ensure that duration of the video matches what we expect
* Test duration of recorded video
* Run 6_video_compression in chrome + electron
* Cleanup
* finish ffmpeg duration verification
* Update 8_reporters_spec snapshot
* Update CRI close logic to monkey-patch browser.kill
* add isBrowserFamily back
* make it possible for remote-debugging-port to get overridden
* Make CDP timeout 5s; add unit, e2e tests for CDP failure; add user-friendly CDP failure error
* Update tests
* Use CYPRESS_REMOTE_DEBUGGING_PORT to set CDP port; update CDP error message
Co-authored-by: Brian Mann <brian.mann86@gmail.com>
Co-authored-by: Jennifer Shehane <jennifer@cypress.io>
Co-authored-by: Zach Bloomquist <github@chary.us>
* use Node path from config file to run plugins
* add finding system node
* memoize node find, use fix-path if Node is not found
* find Node asynchronously
* update note on ENFILE
* print node version before executing registered event
* use nodeVersion option, add validator isOneOf
* linting
* remove resolve-dir
* debugging unit test
* resolve original promise to make the tests run correctly
* update second test
* add unit tests
* upgrade snap-shot-it package to be able to update snapshots
* make finding node path part of startup, merge into config
* update tests
* add node version & path to run output
* add node version display to desktop-gui
* add warnings, add tests, add learn more link in desktop-gui
* Revert "add node version & path to run output"
This reverts commit 40a3218175.
* only show Node Version if it is non-default
* Add e2e test for using system node
* cleanup
* add tests that resolvedNodePath and Version are available in tests
* assert nodeVersion == system
* add nodeVersion to schema
* add new configoptions to types
* add fallback if pluginsfile is disabled
* new package.json sorting
* update some of the wording/styling of Node Version panel
* remove ` from schema file
* clean up decaffeinated tests + update wording when no pluginsfile is present
* playing with messaging.
* push updated node version panel design
* update design + copy of Node panel again
* some more iteration on design (WIP)
* Finish design changes + fix tests
* add debug message
* linting problems
* add missed require
* Add comment to refactor the colWidths in this PR after another PR goes
* replace the exact length of Node version in specfiles
* print object for node version and path instead of %s %s
* update snapshot to match v12 length
Co-authored-by: Zach Bloomquist <github@chary.us>
Co-authored-by: Jennifer Shehane <jennifer@cypress.io>
* add failing test for utf8 word boundary corruption
* use UTF-8 aware stream replacer
* cleanup
* cleanup test server
* add link to issue
* add replace_stream tests
* add license
* perf improvements - tsificiation
* emit the maximum chars possible
* add better types
* move license, update test
* fix specs
* use debugger protocol for cookie handling in electron
* use latest gulp
* use rimraf instead of gulp-clean
* use electron 3.1.8 and node 10.2.1
* use gulp 4 in packages/static
* fix sendCommandAsync, log Schema.getDomains on CDP connect
* autofill e2e test name [skip ci]
* electron@5.0.7, see what new failures exist
* --no-sandbox for launching Electron
* update cookies logic for electron
* node 12
* update snapshot for new node
* update error message for new node
* stub sendCommandAsync
* only connect to socket if path has been replaced, fixes#4776
* update node-sass to support node 12
* skip wacky socket tests for now
* snapshot
* fix run_plugins_spec snapshot, don't include stack trace
* use --no-sandbox on linux to run as root
* allow sendCommandAsync to resolve
* use euid for root check
* log domains even if undefined
* don't worry about ending 1xx responses immediately anymore
* use --max-http-header-size, change max size from 8kb to 1mb, fix#76
* do not send 502 on failed websocket, just send back ECONNRESET
* update websocket spec port to not collide with other test
* update outdated expect
* Revert "only connect to socket if path has been replaced, fixes#4776"
This reverts commit f179eda5ca.
* update gulp in root
* update https-proxy unit tests
* update network spec to properly close server
* update reporter spec
* update https-proxy-agent to fix node 10.10.0 change
discussion: https://github.com/nodejs/node/issues/24474\#issuecomment-511963799
* only pass --max-http-header-size on node >=12
* use own server-destroy implementation that supports secureConnect events
* oops
* update socket_spec
* electron 6.0.0
* console.table introduced in node 10
* change browserify entry to init.js
* handle edge case when no response body
* console.table added in node 10
* do not exit app when all BrowserWindows are closed
* update e2e snapshots
* value may not be null
* update plugins spec
* correct cookie expiry, use browser.getversion for CDP version check
* fix snapshotting for require stacks
* reorder cookies in spec
* warn when depreated electron callback apis are used
* only report 1 plugin error per process
* cleanup
* node 12.4.0, cypress/browsers:node12.4.0-chrome76 docker image
* update shell.openExternal to promisified
* update dialog.showOpenDialog to promisified
* update webContents.session.setProxy to promisified
* updating native dependencies since we don't need ancient node ABI support anymore
* WIP: switch cookies to simpler, jar-less approach
* WIP: switch cookies to simpler, jar-less approach
* making tests pass
* improve cookie filtering logic
* Remove unneeded Promise.try
* filter what makes it to the extension
* properly re-set superdomain cookies on cross-origin cy.visit
* allow comma-separated list of e2e tests
* sort cookies in order of expiration date, ascending
* updating tests, cleanup
* update tests
* version electron as a devDependency, electron@6.0.1
* cleanup, remove old automation
* cleanup, remove old automation
* bump chokidar to fix win10 + node12 issue
was seeing this on windows:
https://github.com/nuxt/nuxt.js/issues/6035
fixed with version bump
* enable now-supported quit role, re-enable old tests
* don't need that arg there
* remove last deprecated callback electron invocations
* Delete cypress.json
* responding to PR feedback
* cleanup
* invoke
* use 'quit' role
* Use new appMenu role for Cypress menu on mac
* electron@6.0.2
* electron@6.0.3
* remove domain: cookie.domain and see what happens
* remove setErrorHandler
* Revert "remove domain: cookie.domain and see what happens"
This reverts commit 49e916896d.
* add unit tests for cookies
* ci
* fix project-content css
* electron@6.0.4
* fix specs_list test
* electron@6.0.7
* some cleanup
* electron@6.0.9
* Update 8_reporters_spec.coffee.js
* electron@5.0.10 - Chromium 73, Node 12
* cli: fix the STDIN pipe on Windows (#5045)
* cli: pipe stdin
* uggh, here is the actual change
* update cli unit tests
* add unit test
* more permissive check for json to include application/vnd.api+j… (#5166)
* more permissive check for json to include
* add json test for content-type application/vnd.api+json
* cruder solution passes e2e tests locally, so let's go with that
* Remove 'charset' from content-type before checking if JSON
* fix eslint for fixture specs (#5176)
* update eslint to lint files within 'fixtures' in support files
- ignore some edge cases like jquery, jsx and obvious js files we wrote
with broken code
* Fixes from eslint to 'fixtures' files
* Catch env variable with reserved name CYPRESS_ENV 1621 (#1626)
* server: check CYPRESS_ENV variable when merging configs
* catch invalid CYPRESS_ENV value in CLI, close#1621
* linting
* sanitize platform in test snapshot
* linting
* update error message text
* add missing comma
* fix finally merge in JS code
* pass CLI linter
* fix log reference, should be debug
* use correct sinon reference
* update message, show first part in red
* update error message text
* Addresses #2953 (#5174)
* Addresses #2953
* Added proper test for new error message
* Didn't realize it ran this test as well, whoops
* Implementing changes as suggested by @jennifer-shehane
* Fixing tests and error output. Moved the checks to the start of the get command to ensure we always catch improper options
* Removing issue test since the querying spec covers it
* Using coffescript isArray check
* depromisify things that were promisified b/t electron 5 <=> 6
Revert "update shell.openExternal to promisified"
This reverts commit 8b6460d015.
Revert "update dialog.showOpenDialog to promisified"
This reverts commit 5f178b075b.
Revert "update webContents.session.setProxy to promisified"
This reverts commit 727df3a4e5.
* node12.4.0-chrome76 => node12.0.0-chrome75
* fix tests for electron downgrade
* node12.0.0-chrome75 => node12.0.0-chrome73
Co-authored-by: Zach Bloomquist <github@chary.us>
Co-authored-by: Brian Mann <brian.mann86@gmail.com>
* use own server-destroy implementation that supports secureConnect events
* stand up HTTPS server for requests over ssl to IPs
* don't need to resolve with
* fix tests
* stand up a server on 127.0.0.1 for test
* tighten up / cleanup code, consolidate + refactor
- lazily fs.outputfile’s
- move sslIpServers to be global
- add remove all CA utility
* Improve proxy_spec test
* Don't crash on server error events
* feedback
* derp
Co-authored-by: Brian Mann <brian.mann86@gmail.com>
* Move fast_visit_spec to performance-test stage
* upload results from fast_visit_spec and proxy_performance_spec
* test
* Track URL in proxy_perf_spec
* also send commit timestamp
* use more params, use ciProviders where possible
* test
* add platform + arch
* use commit-info for timestamp, commit message
* Revert "use commit-info for timestamp, commit message"
This reverts commit a55d16af3d.
* use commit-info for timestamp, commit message
* just always have nock
* slice(1) the testCases
* send current retry with fast_visit_spec
* currentRetry
* chore(deps): Update supertest-session to 2.0.1 🌟
* update supertest-session to no longer use module configuration - as this has been removed in 2.x
* supertest-session also no longer requires obj + app key, just pass app
Co-authored-by: Renovate Bot <bot@renovateapp.com>
Co-authored-by: Jennifer Shehane <jennifer@cypress.io>