* 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>
* fix chrome headless
* update tests, load absolutely no extensions
* lol
* add e2e test for '--headless' flag
* add get:screenshots:taken
* add test for window bounds
* fix --headless test
* update snapshot
* ts'ify and document functions in chrome.ts
* properly export @packages/launcher types
* fix types
* assert on window bounds in headless spec
* add navigator.userAgent test
* only run in ci
* remove test of questionable value
* pass additional Electron launch args from env variable
* iterate over keys
* add environment test
* hmm, print error
* do not rethrow error
* do not swallow error in development, stub disable hw acc method
* use app.command.appendArgument
* always disable xvfb
* add --headless
* Revert "always disable xvfb" - it is still needed for Electron
This reverts commit 058679f4ce.
* updates
* update 3_plugins_spec
* update wording now that chrome can be headless
* fix video recording when headless
* Don't assume that chrome is headed
* update electron video recording message
* Add 2_headless_spec for Cypress.browser values
* update headless language
* still use headless by default for electron and headed for chrome
* fix up cli
* fix e2e tests
* update npm api types
* fix 2_headless_spec
* keep alphabetical ordering
* increase binary size limit
* add a comment on the cli error impl
* use _.defaults for default for headed
* fix
* _.defaults mutates
* 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
* move macbuildfilters to top
* 7.1.3
* electron@7.1.4
Co-authored-by: Brian Mann <brian.mann86@gmail.com>
Co-authored-by: Gleb Bahmutov <gleb.bahmutov@gmail.com>
decaffeinate: Run post-processing cleanups on project_spec.coffee
decaffeinate: Run post-processing cleanups on open_project.coffee
decaffeinate: Run post-processing cleanups on open_project_spec.coffee
Fixed error.
Fixed snapshot.
Removed returns.
decaffeinate: Rename project_spec.coffee from .coffee to .js
decaffeinate: Rename open_project.coffee from .coffee to .js
decaffeinate: Rename open_project_spec.coffee from .coffee to .js
* try: options.cookies as object is not documented
* add test that demonstrates 5894
* merge user-supplied cookie header with genned one
* update 2_cookies_spec snapshot
* only consider an existing Cookie header for the 1st request
* Alphabetize cli options for my own sanity
* begin added tag flag
* Fix some minor grammar in cli help output + be more specific for specs description
* update snapshot based on alphabetization change
* update snapshot to include --tag in help output
* update logic for pulling out space delimited args to look through --tag and --spec flags dynamically
* Support and pass along tag flag to run and record
- show err if passed without record flag
- sanitize args into comma separated string
- display tag in record errors
* fix some tests/snapshots where 'tag' was missing
* Actually try passing in tag through tests to ensure it prints.
* Merge branch 'develop' into issue-2561-tags
# Conflicts:
# cli/__snapshots__/cli_spec.js
# cli/lib/cli.js
# cli/lib/exec/run.js
# packages/server/lib/modes/run.js
# packages/server/lib/util/args.js
* Send 'tags' as an array to backend API
* Update json-schemas to query against 2.2.0 of postRun
- this will require a bump to json-schemas repo
* update test to reflect tags array
* update snapshot to display nightly tag
* rearrange args to alphabetical order in specs
* Add tags to runResponses / remove tag from incorrect instance post
* Fix failing specs / snapshots
* Update error messages + snapshots
* Fix snapshot that no longer displays tag arg
* fix args unit test
* remove extra slash
* add a few more cli tests
* another test just in case
* a quick unit test for displayFlags utility
Co-authored-by: Gleb Bahmutov <gleb.bahmutov@gmail.com>
* if cypress gets -- as leading argument, remove it
* start Eletron app args with --
* remove only
* update CLI to pass --no-sandbox before -- separator
* remove -- from args in cypress server
* do not use --no-sandbox in CLI when running in dev mode
* 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>
* 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>
* 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
* 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>
* 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>
* Use win.destroy to destroy windows, log more events
* fix test
* Add tests for onbeforeunload, beforeunload exiting successfully
* add window.open beforeunload tests
* beforeunload, not beforeload
* just destroy those child windows
* 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>
* server: add test for XHR with body > 100kb via CLI
* Use websockets to stub large XHR response bodies instead of headers
* Properly cleanup outstanding XHRs on before:test:run
* Add lil unit test for xhr_ws_server
* Use reset:xhr:server to get around sending entire test:before:run:async payload
* Responding to feedback
* Implement feedback
* move data obj wrapping into xhrs controller
* 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
* cli: set NODE_OPTIONS=--max-http-header-size=1024*1024 on spawn
* electron: remove redundant max-http-header-size
* server: add useCli option to make e2e tests go thru cli
* server: add test for XHR with body > 100kb via CLI
* clean up conditional
* cli: don't pass --max-http-header-size in dev w node < 11.10
* add original_node_options to restore o.g. user node_options
* force no color
* 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>
* Begin inserting newlines for long specfiles in results table of stdout
* clean up some decaff weirdness
* move newlines function into util
- call ‘formatPath’ on any area where the path could be too long and
needs to word wrap
* Clean up some styles, padding that does nothing - get specname closer to symbol by 1 pixel
* Commit new snapshot changes. Word wrapping, some spacing changes
* remove more padding that does functionally nothing
* Fix more of the extra unnecessary padding in 'Running' table
* Update other CLI snapshots to match new spacing
* Remove the error thrown when colWidths exceeds 100, I don't see this as necessary since we have snapshots covering the design of the columns.
* Update some snapshots I missed
* Add gaurd in newLine function in case there is no specfile name
* fix more snapshots
* Fix snapshot extra space
* forcibly enable colors in all e2e tests, and strip them back out of the snapshots
* Fix colors that got lost in stdout
* Update newlines function to use simpler ramda split + fix implementation to remove last newline
- write unit test for newlines function for easier refactoring in future
* iterating on fixing the weird column issues
* handle if str is undefined in newlines function
* Draw the tables at exact 100 width, taking into account padding and borders
- Calculate the actual width of the table column in order to add
newlines at that length
- Add newlines for the ‘Finished processing’ output of video file
- Add newlines for the ‘Screenshots’ output of screenshot paths
* remove .only
* Remove extra 1 char padding
* Remove color changes (separate PR for this)
* Replace project path with same num chars of X's
We were just replacing it with foo/bar/baz which would mess up the
alignment of the snapshots since it was removing chars
* If we are running with a CYPRESS_ENV of 'test', replace the cwd
- Replace the current working directory if we’re running withing
Cypress so that our snapshots are consistent when run on diff machines.
- Ideally, I would have liked to have had a special ‘—fake-cwd-path’
flag so that we can override this later, but I couldn’t figure how to
pass that.
* Continue stripping the projectPath from snapshot output
- This is required because some messaging comes from outside of the
run.js file, so we still need to replace these paths in snapshot.
* Update snapshots to have correctly replaced cwd
* Update formatting of new Node Version path to properly return within our stdout tables
* remove tests for method that does not exist
- update the drawing of table columns to match the new logic - don’t
need weird spaces and padding right anymore.
- update snapshot to match
* Update snapshot for performance test that didn't previously run
* return empty string if no name passed (really just for weird edgecases in our own tests)
* Add instructions on how to run performance tests in server
* Update video processing and screenshot tables so they no longer use weird negative padding hack with ' ' border
* Update snapshots to reflect new table spacing
* Another snapshot update missed
* Accept 'FAKE_CWD_PATH' env var to replace it in the run
* Pad paren time to factor in extra whitespace
* Update snapshots to no longer have static 'acb123.mp4' for video names
- This was throwing off the table calculations.
* remove stripping screenshot dimensions + replace padStart with padEnd
* Update snapshots to instead user shorter form 'second' in order to account for shorter duration printing when it is 1 second
* Add correct padding for screenshot dimensions
* update perf spec
* Update performance snapshot
* remove unused 'stripAnsi' dep
* Fix merge conflict failure - didn't regenerate snapshot correctly last time.
* commit size of electron screenshot (fix incoming in another PR to avoid this)
* Correctly handle padding of node version so we don't have to rewrite this later.
* split out let & const assignments
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>
* Suppress NODE_TLS_REJECT_UNAUTHORIZED warning
* move warning suppression to own module; add tests with and without
* use spread operator for args
* move originalEmitWarning
* 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>