* 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>
* 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
* add Loggable options to its() command
* add test for new Loggable option for its()
* add loggable options to invoke()
* add type definition
fix: only set logger config once. afterwards other commands can overwrite the logger config as done in line 322
remove unused error message (usage was removed in a former commit)
remove test that is unnecessary now
* add check if its() was passed additional arguments next to options
* try to fix test
* do not log 'this' context
* from review: add additional tests and fix some edge cases
* add tests for combination of loggable options and numeric index
* fix wrong indentation
* write as 'functionName' and 'propertyName' to match other error message
* Update tests to reflect newly worded errors
Co-authored-by: Jennifer Shehane <shehane.jennifer@gmail.com>
* 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
* ADDED: missing call signatures for right/dblclick
These two call signatures where missing for rightclick and dblclick: only the `rightclick(options?: Partial<ClickOptions>): Chainable<Subject> ` one was present.
See #5617
* FIXED: typo
* FIXED: dtslint errors
* 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](92b91fe514/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>
* 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
* WIP: add failing test job with non-root user
* change paths to node user
* print more info
* always use --no-sandbox when starting Electron on non-Windows OS
* add another test job that runs as a root
* use tilda
* use 12.0.0 image
* rename job
* 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>
* cleanup type_spec, allow unused-vars for args
* fix missing return
* rename mouse/keyboard
* apply changes on this branch with rename
* temp 07/18/19 [skip ci] type_spec minor changes
* temp 07/19/19 [skip ci]
* temp 07/22/19 [skip ci]
* temp 07/22/19 [skip ci]
* remove accidental spec, use beforeEach visit in click_spec
* add tests for cy.trigger changes
* re-run build
* add typedefs
* temp 08/08/19 [skip ci]
* fix type_spec, click_spec
* fix console table event table logging
* fix spec utils
* fix invalid clicking-into-iframe spec
* address review, cleanup
* temp 09/25/19 [skip ci]
* add test for clicking checkbox, cleanup click_spec
* document mouse click and mouse move algo, adjust mouse move, add test for recursive movement
* cleanup / formatting
* scope the getCommandLogWithText to the active runnable to prevent leakage
* cleanup tests, make values static so tests pass consistently
- use attach listener alias APIs
- remove magic number constants
- fix some incoherent html / script tag stuff
* begin implementation for returning fromAutWindow
- restore original fromWindow algorithm
- begin writing fromAutWindow for calculating red hitbox coordinates
which are layered on the AUT
* move describe block with the others
* refactor actions to DRY up duplicated logic between click/dblclick/rightclick
- tighten up the mouse.js method names, name them consistently
* remove comment
* fix iframe coords and test
* rename fromDocCoords->fromWindowCoords, fix type_spec ux test
* tighten up method, remove unnecessary arg
* add debug logic for retries to console.error() non cypress errors
* renamed fromWindow -> fromElWindow, and fromViewport -> fromElViewport
* handle calculating the fromElWindow coordinates inline
* extract out function for clarity, receive consistent arg names
* cleanup, add lots of comments
Co-authored-by: Brian Mann <brian.mann86@gmail.com>
Co-authored-by: Jennifer Shehane <jennifer@cypress.io>
* 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>
* cli, server: introduce --config-file argument
* server: remove unused import
* server: wip
* server: consider --config-file in settings
* server: pass options to settings.read from config
* server: store options in Project class, pass to all settings calls
* server: _initPlugins needs to accept options, for being called from server
* server: accept optional external options in open
* cli: update help snapshots
* server: realizing now that these were written like this so they could be stubbed - removing some unnecessary usages of @options
* cli: pass configFile when it's false
* server: --config-file false and --config-file blah.json work
* server: add unit tests for --config-file
* server: pass configFile to desktop-gui
* desktop-gui: display 'cypress.json' according to --config-file arg
* desktop-gui: add integration tests for --config-file
* cli: add tests for --config-file
* PR changes
* PR changes
* cli: update snapshots
* server: updating error messages
* runner: update cypress.json mention
* fixing name overlap
* server: integration tests for --config-file
* runner: update Header component tests
* cli: fix snapshot
* desktop-gui: fix test
* driver: fixing error messages - not really any visibility to cli args from here so just static strings
* server: update snapshots
* server: update snapshots
* cli: updating snapshot
* driver: how did i miss this?
* add skipped blank line to the snapshot
* fix missing proxy require statement (was lost in merge of develop)...weird
* add module API defs to types
* module API tests
* send better error when config file can't be found
* fix dtslint test
* update cli help to use 'configuration file'
* update snapshot using 7.7.1 in place
* fix failing config_spec
* be.visible
* show custom config file name in driver errors
* add tests for non-default config file in driver error messages
* single-quote config file name
* 🙅 IIFEs 🙅
* 🤦
* fix failing test
* fix failing test, cleanup
* lint
* delete duplicate coffee spec
* Update run.js
* Delete app_spec.js.mp4
* in open mode, only store projects to recents list if 'cypress.json' is the configFile
discussion: https://git.io/JeGyF
* feedback
* add --no-sandbox to spawn
* update tests to not require no-sandbox argument
* injecting test-runner:integration-tests for jobs that need to record to the dashboard
* add --no-sandbox positive test
* add comment
* 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
This reverts commit 15685dbb9f.
The type for `invoke` command seems to break jQuery method
that take an argument like
```js
cy.get('.trigger-input-range')
.invoke('val', 25)
```
* add strong return type to 'invoke' command
* refactor invoke for clarity. use dtslint tests
* add strong args types using typescript 3.0+ features
* handle invoke's jquery wrapping of its input
* move invoke tests to namespace
* add example to jsdocs of 'invoke'
* CLI: increase smoke test timeout to 30s
* hmm install reformarrted some files
* remove formatting changes
* update unit test
* add small test to confirm timeout property
* revert example changes
* commit previous changes made by @bahmutov for #1573
* Pass '--run-from-cli' flag through ping test in order to prevent warning from printing
* woops, require 'argsUntil'
* 'headed' was changed to 'interactiveMode'
* fix duplicate misspelled require
* tighten up args utils and cleanup decaf garbage
* cleanup errors.log to take a cb and conditionally be async
* remove extraneous --run-from-cli argument, consolidate to use --cli
- update tests
* fixes tests, ensure that record.createRun() always returns a promise
* refactor tests to handle new errors.logException interface
* make logException always return a promise, cleanup interface, add test
* fix linting errors
Co-authored-by: Brian Mann <brian.mann86@gmail.com>