* Add warning when setting CYPRESS_ENV to non-production value
* Add warning and update error when setting CYPRESS_ENV in config to non-production value
* Update config test/to throw
* we want warning, not throw
* Rename env var to CYPRESS_INTERNAL_ENV + fix warning to actually warn when staging
* update cli snapshot to include new 'info' command
* yarn.lock
* removed the warning from config, is overboard on our own tests 😓
* cleanup from review
Co-authored-by: Gleb Bahmutov <gleb.bahmutov@gmail.com>
* Turn exception message into something human readable
* Pass ipc as parameter to invoke function
* Creating file to validate event name and handler
* Creating tests to validate_event
* Remove ipc from invoke parameter
* Removing ipc parameter being passed to validateEvent
* convert spec to js
* increase line-height for plugins error message
* refactor error messages and implementation
* fix race condition where async error in plugins file could hang run
a quick async error at the root of the plugins file had the potential to hang the run because the ‘exitEarlyWithErr’ listener was registered later than that error was emitted
this enables that error to be tracked so we can properly exit at the appropriate time
it also refactors run.js to not rely on an event emitted on the project and instead passes through an onError handler, which makes more sense since the event was only used in run.js (except for one case). it also makes for easier unit testing
* fix missing reference
* fix duplicate reference
* fix args being passed in incorrectly
* fix way args were handled in server.open
* fix exit early implementation
* fix duplicate logging
* fix unit test
* update snapshot
* fix missing reference
* add e2e test to cover plugin registration validation
* clean up after merge
* add back snapshot
* fix e2e tests
Co-authored-by: Chris Breiding <chrisbreiding@users.noreply.github.com>
Co-authored-by: Zach Bloomquist <github@chary.us>
Co-authored-by: Jennifer Shehane <shehane.jennifer@gmail.com>
* Allow %, & in file name.
* Extract escapeFilenameInUrl
* Fix tests.
* Add test for ? (non-Windows).
* Remove platform condition. And handle when special chars are in the dir.
* Fix failure.
* Fix failure.
* add e2e test for specs with special characters
* minor refactor
Co-authored-by: Chris Breiding <chrisbreiding@users.noreply.github.com>
* fix race condition when there's an async error in root of plugins file
* return the promise
* fix routes creation
* fix tests
* fix error throwing and add tests
* update snapshots
* revert changes to server.open signatures in tests
* fix test
* properly wrap error so it doesn't log twice
* slow down test to ensure plugins error occurs before run is over
* wait to log early exit error until after run start
* Use CDP to record video for Electron
* Enable video recording in Electron headed
* Test video in headed + headless for all browsers
* Update e2e tests
* Set window size to a better default size when running headless in chrome
* add test for spawning in 720p
Co-authored-by: Ben Kucera <14625260+Bkucera@users.noreply.github.com>
* #6231 use more CI information from GitLab
* issue-6231 fix spec provider tests
* issue-6231 use GitLab CI Repository URL instead of Project URL as remoteOrigin commit param
* remove 'electron' as known browser family during validation error.
* fix tests that had unexpected results because fixture has invalid family name set
* whoops, missed updated one family in the spec
* missed another snapshot change
* WIP: add cli info command to list detected browsers
* print found browsers
* change to list
* start work on info command calling into binary
* move info command into binary
* print OS info during cypress info command
* add binary cache path to info command
* add browser profile path
* add memory
* get browser profile path without partition
* pick real browsers as examples
* output same info as desired
* better names
* changed colors
* add list of cached binary versions
* do not put stable into name
* add underlined link
* conditionally show profile path, only if the folder exists
* do not list cached binaries
* human-friendly memory print
* print env proxy vars
* print CYPRESS_ env variables
* use _.sample
* update order
* store cypress info output on CI as HTML page artifact
* add percy CLI screenshots
* sanitize cypress info command
* store CLI snapshots in cli/visual-snapshots folder
* update cli unit snapshot
* add cli unit test
* start e2e testing for cypress info
* add test with proxy and cypress vars
* make sure we call the binary
* stricter start check
* start unit testing modes info
* test info mode browser print
* add test for profile path
* add cypress info command to test binary Circle job
* add cypress info to test-binary-as-specific-user circle
* print cypress info --dev on circle and on appveyor
* update .gitignore
* move error in environment load to debug
* force websockets transport
* wip: ensure ws connections take place thru a known socket
* clean up yesterday's work
* remove dead code (request is undefined)
* update websocket tests
* add websocket tests
* update socket + server specs
* add token auth for file_server
* Fix cy.visit file_server
* restrict non-proxied URLs, serve error on runner URL non-proxied
* add e2e test for server splash page
* fix types
* use clientRoute, fix tests
* only run 6_non_proxied in electron
* use browser.path
* improve empty options type
* add ws assertions in e2e tests
* fix server_spec
* refactor socket whitelisting logic
* update server_spec
* respond to PR feedback
- added tests for non-clientRoute redirecting to clientRoute when not behind proxy
- cleaned up comments
- cleaned up logic in server.coffee
- moved error html to own file
- added unit test for socket whitelist + fixed removal bug
* pass -no-remote when launching firefox
* use name-channel for profile directories in FF
* Revert "use name-channel for profile directories in FF"
This reverts commit dcfa147415.
* Move profiles into name-channel directories
* fix e2e test
* use Promises driver and handle connection errors
* repin marionette-client dep
* --compilers... so our tests run....
* update firefox spec
* fix failing specs from tests not running
* update error with a hint
* fix the other on
* tests
* 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 ba23be5349)
* 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>
* 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>
* WIP: throw specific error when cannot parse Cypress arguments
* test invalid config string
* add unit test
* rework error message, handle env, reporter options and config
* add args error unit tests
* rework snapshots
* use reporterOptions name
* update snapshot
* add process profiler for debugging
* remove existing CYPRESS_MEMORY check
* rename some columns, format PIDs a little nicer, start when debug is enabled or verbosedebug is enabled
* use shared method for determining if this is the electron process running
* finish adding enhanced grouping
* cleanup
* add tests for changes to other parts of cypress
* add tests for process_profiler
* use browser displayname to group
* fix ffmpeg and add tests
Co-authored-by: Brian Mann <brian.mann86@gmail.com>
* WIP: retry CRI.List when connecting to the browser
* add unit tests
* don't need to use module.exports to stub this
* use existing retry delay logic for CRI list
* add tests that stdout is correct
Co-authored-by: Zach Bloomquist <github@chary.us>
* 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.