* decaffeinate: Rename browser.coffee from .coffee to .js
* decaffeinate: Convert browser.coffee to JS
* decaffeinate: Run post-processing cleanups on browser.coffee
* temp 02/14/20 [skip ci]
* add beforeEachRestoreRunner to select specs, remove support file hook
* temp 03/03/20 [skip ci]
* fix more specs due to support file change
* fix errored spec
* add isInteractive config to many specs
* update yarn.lock
* use yarn.lock from develop
* fix nested suite configurations
* fix nested suite configurations 2
* force isInteractive in driver/support file
* update more specs to use test config format
* update more specs to use test config format 2
* update more specs to use test config format 3
* update more specs to use test config format 4
* update more specs to use test config format 5
* fix cli/types tests, unit tests
* cleanup
* allow .isBrowser to support array, use .isBrowser for per-test-config
* allow null browser test/suite config value
* temp 04/10/20 [skip ci]
* restore test originalTitle when skip due to browser
* add tests for per-test-config baseUrl
* update .isBrowser error message
* fix rerunning hooks on top navigation
* rename duplicate issue number
* up timeout for server/integration test
* change test to be more specific
* rename TestOptions, add baseUrl test, override xit xdescribe methods
* add tests for xit/xdescribe
* disable video for flaky e2e test
* fix lint-types, e2e snapshot
* try 2: fix rerun before/after hooks
* temp 04/29/20 [skip ci]
* change logic to rerun before hooks after top navigation
* fix windowSize for browser e2e test
* fix windowSize for xvfb chrome in e2e test
* ok fine, just disable screenshots
* perf: faster lookup for hooks without runnables
* fix afterAll hook switch logic
* backport to before/after fix
* backport to before/after fix 2
* fix noExit passed to e2e test inline options
* remove extra root afterhook check
* add issue link..twice
* cleanup function to arrows
* remove Cypress object proxying related code for certain utils
* use getTest() as we did previously
* remove Cypress object proxying related code for certain utils
* fix Cypress._RESUMED_AT_TEST access
* fix Cypress._RESUMED_AT_TEST access 2
* fix runner.getResumedAtTestIndex, state accesses
* fix firefoxgcinterval access
* fix arrow function
* fix firefoxgcinterval access
* try a simpler way to fix afterAll hook issue
* fix decaf after merge
* cleanup internal-types.d.ts
* fix internal-types
* fix comment, getTestFromRunnable signature
* remove unneeded lastTestInSuiteLogic
* fix after merge: many decaffed specs, typedefs
* minor cleanup
* fix typedefs: add taskTimeout
* minor typedef fix, fix more specs modifying config()
* fix e2e snapshot
* fix flake: waiting_spec cancel outstanding XHR between tests
* fix flake
* change config mutation logic, add tests, update typedefs
* add env support to testConfigOverride
* fix specs: remove isInteractive override, add to beforeEach
* move testConfigOverride to file
* finish moving local config logic to cy.js
* fix typedefs cypress.d.ts
* fix minor minor dtslint
* minor spec cleanup
* chunk: typescript spec fixes, bind Cypress.$
* apply chunk: typescript spec fixes, bind Cypress.$
* fix stop-only
* fix stop-only 2
* extend the jqueryProxyFn in the constructor
* remove experimental code
* rename spec files for overrides, cleanup
* rename snapshots + tests to match updated test config overrides
* fix firefox flake: navigation_spec
Co-authored-by: Brian Mann <brian.mann86@gmail.com>
* Add winPropAccessor to security.js, remove other replacers
* Add start of Cypress.resolveWindowReference
* Add regexes for dot and bracket access
* Some security_spec tests pass with new injection
* Add resolveWindowReference unit tests
* Old security_spec now passes with resolveWindowReference
* Inject stub resolveWindowReference so proxy still works outside of Cypress
* wip: rewrite HTML + JS with tokenizer
* Move to using esprima + hyntax to rewrite JS + HTML
* remove comment; oneLine makes the whole thing commented
* Fix tests, apple.com edge case
* wip: add getOrSet
* Revert "wip: add getOrSet"
This reverts commit a5c647c00f.
* release 3.5.0 [skip ci]
* use recast to replace window property accesses
* replace assignments to top properly
* fix yarn.lock
* bump deps
* update integration tests
* remove old security ts?
* fix integration spec
* always ignore js interception failure
* use globalThis instead of window
* add experimentalSourceRewriting flag
* restore regex-writer spec
* fix types
* update config_spec
* add source rewriting spec
* cleanup
* simplify rewriting logic, move rules into rewriter package
* create threaded rewriting tool for non-streaming use
* update @packages/rewriter to use threads for async
* use async rewriting where convenient
* add worker-shim.js
* add performance info to debug logs
* properly handle +=, -=, ...
* add proxy, rewriter to unit-tests stage
* cleanup
* use parse5 to rewrite HTML, strip SRI
* update tests
* reorganization, cleanup
* rewrite ALL parent, top identifiers except in a few cases
* handle many JS edge cases
* ensure parse5@5.1.1 is installed
* update yarn.lock
* update tests
* add debugging, add tests
* add attempted repro for .href issue
* implement source maps + extending inline source maps
* update opts passing in proxy layer
* fix sourcemap naming structure
* update tests to account for sourcemaps
* sourcemap tests
* remote source maps work
* comment
* update rewriter tests
* clean up TODOs in resolveWindowReference
* remove @types/nock
* clean up todos in deferred-source-map-cache
* fix rewriter build script
* fix concatStream import
* bump expectedresultcount
* clean up js-rules
* threading improvements, workaround for Electron segfault
* no visit_spec for now
* fix 6_visit_spec
* update MAX_WORKER_THREADS
* add repro for #3975
* cleanup
* cleanup
* make better use of namedTypes and builders
* get rid of the horrific closureDetectionTernary
ast-types keeps track of scope, so it is unneeded
* fix#3975, #3994
* add x-sourcemap, sourcemap header support
* snap-shot-it 7.9.3
* add deferred-source-map-cache-spec
* add tests
* Throw error in driver if AST rewriting fails
* Fix "location = 'relative-url'"
* fix max recursion depth
* slim down some fixtures
* fix window.location usage
* don't mess with `frames` at all
* no integration tests
* skip testing apple.com for now
* update wording: regex-based vs. ast-based
* skip real-world tests for now
* add some padding to process.exit workaround
* fix resolvers_spec
* fix html-spec
* cleanup
* Update packages/rewriter/lib/js-rules.ts
* Update packages/driver/src/cypress/resolvers.ts
* just import find by itself
* privatize typedefs for Cypress.state, remove .gitignore, remove dead code
Co-authored-by: Ben Kucera <14625260+Bkucera@users.noreply.github.com>
* Add a type for CypressFailedRunResult distinct from CypressRunResult
* add back @example for detecting cy run failure
* remove trailing whitespaces found in dtslint
Co-authored-by: Joseph Weissman <61561354+CypressJoseph@users.noreply.github.com>
Co-authored-by: Jennifer Shehane <jennifer@cypress.io>
* add experimental feature for sameSite
* allow experimental descriptions to render markdown
* sameSite support mostly working
* also strip sameSite from setCookie yielded value
* don't use `unspecified` - let browser set default
* add tests
* decaffeinate: Rename cdp_automation_spec.coffee from .coffee to .js
* decaffeinate: Convert cdp_automation_spec.coffee to JS
* decaffeinate: Run post-processing cleanups on cdp_automation_spec.coffee
* cleanup cdp_automation_spec.ts
* update unit tests
* update settings_spec to not render as markdown
* user-friendly error for insecure SameSite=None
* fix styling
* fix markdown renderer
* update types + schema
* use renderInline
* update experiment summary
* bind renderFn to md
* Added type_check.js
* Now checks cli, too.
* Ignored a line that should fail.
* Removed cli shims and post-install.
* Updated @types/chai to fix type error.
* Fixed keyboard type errors.
* Updated typescript to 3.7.2 to fix window.Node error in dom/document.
* Removed tsconfig errors that caused type errors in reporter and runner.
* Ignored error test by dtslint. Becaust it's done by type_check.js
* Added npm command.
* Added it to CI.
* Added skipLibCheck option.
* Removed checking chai folder existence.
copy of chai is unnecessary.
* Added 'ignore-progress' option for CI.
* Show success message when type check is finished successfully.
* Use ignore-progress option on CI.
* Moved type definitions from devDependencies to dependencies.
* Fixed new type errors after rebase.
* Updated type errors.
* Removed cli. Because its types are checked by dtslint.
* type_check -> type-check for consistency.
* Updated json-schema.
* Updated blob-util.
* Fix wrong command in CI.
* Revert "Updated blob-util."
This reverts commit e46549af54.
Because it's a breaking change.
* Remove copies of @types if exists.
* Fix stream buffer type error.
* Fix type errors in ui-components.
* Fix type failure.
* Fix lint error.
* Fix type errors
* Regenerate yarn.lock
* Fix type error.
* Fix type failures.
Co-authored-by: Jennifer Shehane <jennifer@cypress.io>
Co-authored-by: Gleb Bahmutov <gleb.bahmutov@gmail.com>
* add check within getFirstStickyPositionParent for $el[0] to exist
- pull out check for undefined or html/body/doc element into a shared
elements method.
* prevent more checks on undefined parents & els causing getComputedStyle to throw
* yarn-lock
* Expand isUndefinedOrHTMLBodyDoc to Cypress.dom + add types
* Add unit tests for isUndefinedOrHTMLBodyDoc method
* yarn-lock
* move 'el[0]' existence check to below other checks (right when it's needed)
* yarn-lock
* add isDetached to type declaration
* add rest of dom function declarations
* remove any type union
* remove duplicate declaration
* add docstrings for documented types
* .js => .ts
* update types + tests
fix ts lint
* add Cypress.dom type tests
Co-authored-by: Zach Bloomquist <github@chary.us>
Co-authored-by: Jennifer Shehane <shehane.jennifer@gmail.com>
* 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>
* migrate vscode eslint settings
* Handles whitespaces with newlines.
* Feature: contains() matches case insensitivity
* Fixed merge conflicts.
* Fixed conflicts.
* Added option type, CaseMatchable.
* Fixed lint error.
* Added test for leading/trailing spaces.
* Add an error message for regex and matchCase conflict.
* Fix the valid case that throws an error.
* Fix how error message is thrown.
* update some cli deps that have fallen out of date since last commit
* update cli snapshot
Co-authored-by: Gleb Bahmutov <gleb.bahmutov@gmail.com>
Co-authored-by: Jennifer Shehane <shehane.jennifer@gmail.com>
Co-authored-by: Chris Breiding <chrisbreiding@users.noreply.github.com>
* 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
* 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>
* 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>
* 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>