* Added option to ignore special character sequences to cy.type
* Fixed lint issues
* Made option to disable special character sequences more explicitly named.
* Add typedef for new disableSpecialCharSequences option of type
Co-authored-by: Jennifer Shehane <jennifer@cypress.io>
* refactor typedefs for cy
* fix dtslint
* fix dtslint
* add test for extending types
03-00000014
* typo
* docs and examples for cy type
* sorted props
* remove a few tabs
* better jsdoc
* [#4461] Change typescript declaration for .writeFile()
* Fix dtslint error
* Add example to tsdoc definition
* Add testing example of new ts definition
* Fix trailling whitespace
* fix programmatic blur events, allow typing into currently focused, fix getHostContenteditable
* intercept .blur
* reference issues in tests
* make tests account for conditional number of new lines inserted
- newer browsers insert a double new line, whereas older browsers dont
- write a helper that exposes the multiplier of new lines
* cleanup, remove dead code
* make tests dynamic when browser is or isn't out of focus
* cleanup, remove old notes, add more notes
* add failing tests for when native focus / blur are called multiple times
- need to handle not firing the events conditionally based on whether
or not the element would / should receive them
* remove old code for priming focus/blur events when window is out of focus
* remove dead code
* update focus_blur spec + add chai-subset
* decaffeinate: Rename focus_blur_spec.coffee from .coffee to .js
* decaffeinate: Convert focus_blur_spec.coffee to JS
* decaffeinate: Run post-processing cleanups on focus_blur_spec.coffee
* add failing test
* fix double blur/focus events
* make document.hasFocus always return true, add test
* fix focus events when non-focusable element
* remove unneeded retrun
* fix focusing body/ bluring active element on click
* forgot to call .get() with index
* fix focus issue with body/window
* still allow firefocus on window, skip firing focus if firstfocusable is window during click
* left out return in intercept blur/focus
* cleanup test code for focus_blur spec
* add tests to type_spec, focus_blur_spec
00-00005bfe
* update focus logic for click, fix dtslint error
06-00003d9c
* add tests for selectionchange event in focus_blur spec
01-00000dae
* set dep to exact version
06-00002320
* minor formatting
* intercept focus/blur for SVGElement
* add comment to type-into-already-focused logic
Co-authored-by: Brian Mann <brian.mann86@gmail.com>
Co-authored-by: Jennifer Shehane <shehane.jennifer@gmail.com>
* add "be.focused" to chai_jquery
* add comment explaining the mess
* add type definitions
* refactor assertion to use jquery assertion
* remove trailing whitespace
* add test for multiple elements, update typedefs
* fix failing tests: not.be.visible -> not.exist
* allow should(not.be.visible) for failed selectors
* remove unrelated visibility changes
* extract only focus assertion
* Revert "Merge remote-tracking branch 'origin/develop' into issue-97-focus-assertion"
This reverts commit b401c32a61, reversing
changes made to ab14758d31.
* force jquery to use custom focus pseudo selector
* only force custom matchers for focus selectors
* rewrote matchesSelector wrap code
* add lodash
* Merge in origin/develop
* changes on 3.3.0
Co-authored-by: Brian Mann <brian.mann86@gmail.com>
* retry requests, basic e2e test
* basic e2e test for chrome behavior
* don't use timeouts to test
* some minor cleanup
* validate google chrome's retry behavior w/ a proxy
* get retries on network errors workin
* cleanup
* final changes before switching approach
* Reverting previous approach in request.coffee, server.coffee
* add retryOnNetworkFailure
* now works with retryOnStatusCodeFailure
* retry 4 times in addition to the 1 initial attempt
* add tests for subresources
* much improved error handling
* have the e2e test really work
* e2e baseurl check
* retry baseurl check
* remove special handling for node 8.2.1 bug
* WIP: continue making progress building out request retry
- swap out passthrough’s for pumpify / duplexify / pump
- clean up error handling / messaging / retry logic
* pipe clientrequest events
* buffer req body to disk, restore error handling/retrying
* don't bubble up errors from failed attempts
* actually pipe reqstream, oops
* add some e2e tests for request body
* revert lib/request.coffee to 7be1051
* add almost-working lazy-stream
* manually fire the 'pipe' event on the reqStream to copy headers to the outgoing message
- restore the ‘error’ propagation so that all tests pass for now
* cleanup leaking 'undefined' into stdout, causing failing e2e tests
- do not set onWarning as a property of project, just pass as an
argument
* add new options to request_spec, deduplicate default opts
* use stream buffer in request.coffee
* revert request.coffee
* last stream_buffer changes before removing fs stuff
* remove fs stuff from stream_buffer, add stream piping tests
* it works! :tada::tada:🎉 using duplexify to separate delayStream and reqBodyBuffer
* retry for .5s max on ECONNREFUSED
* add error codes
* don't timeout proxied requests
* restore baseurl check
* update new e2e tests
* make delay work with rp
* propagate clientresponse events
* removing tests that don't do anything now that we don't ESOCKETTIMEOUT on proxied requests
* add new visit, req options to index.d.ts
* don't fail on server-performance-test
* make retries with status code work again
* account for different stack trace in ci
* fix test
* retry https requests
* add tests for https passthru retries working
* clean up error handling for https-proxy
* fix failing https-proxy tests, tweak agent error handling to prevent multiple callbacks
* make expectedExitCode actual vs. expected in the correct order
* bump up e2e test timeout so it can retry and still work
* update tests
* retry up to 500ms on proxied requests
* add tests for incompatible options errors
* remove .only
* maybe this will help it act more consistently
* help e2e test work in ci
* don't reconnect on already made connections
* clarify naming
* wip: testing https proxy
* better debug calls
* WIP: getting proxy passthrough retry tests going
* handle retrying upstream proxy errors
- add tests for successfully retrying proxy errors and for unsuccessful
retries
- fix onClose errors when proxy connection is closed before enough data
is received
- fix not returning setTimeout correctly
* group related code accordingly
* do not build typescript by default, drop extension from main
* more TODO notes
* don't set a default NO_PROXY if NO_PROXY = ''
* debugging-proxy@2.0.0
* null out reqBodyBuffer when req finishes
* wip: retry in agent, not https-proxy [skip-ci]
* update https-proxy to use @packages/network retries
* retry after connection but before proxy tunnel established
* appease my linty overlords
* update https-proxy tests
* update agent specs, decided to still use tls.connect
it's easier to test and has less complexity
* test retrying HTTPS passthru
* debugging-proxy@2.0.1
* increase defaultCommandTimeout 100 -> 200 to prevent flake in CI
* auto formatting
* fix test to be dynamic and not rely on magic constants
* copy types field when linking proxy images, update packages/network types field
* linting
* add network index.js file
* linting
* improve error messaging experience when verifying base url
* only insert 1 new line
* fix failing test not binding to localhost
* removed test that's covered by e2e specs
* remove dash in 're-try'
* some cleanup for readability
* use allocUnsafe per perf
* unset NO_PROXY with an empty string
* move retry ensuring the baseUrl into url, cleanup some imperative code
* if the head is already present during connect, make connection, else wait for first head bytes
* minor formatting, clarity around conditions, naming
* rename retryInterval -> retryIntervals
* set defaults for requests during creation for clarity
* rename send -> sendPromise to pair better with sendStream
* use retryIntervals instead of juggling MAX_REQUEST_RETRIES
- ensure debug messages are consistent between request streams +
promises
- set static constants
* DRY up status check + network failure + retry logic
- keeps the debug logic identical between promises + streams
- ensures all logic paths are also consistent
- consolidates the pop’ing of intervals in a single place
* find / replace fail
* derp
* make the logic actually correct, set intervals as cloned defaults for recursive lookup
* pass arg correctly
* reduce debugging noise, formatting
* rename intervals -> delaysRemaining for clarity
* added unit tests around getDelayForRetry
* set retryIntervals as default options correctly, add unit tests
Co-authored-by: Brian Mann <brian.mann86@gmail.com>
Co-authored-by: Jennifer Shehane <jennifer@cypress.io>
Co-authored-by: Gleb Bahmutov <gleb.bahmutov@gmail.com>
The implementation of cy.request was recently changed (#3555) to support more HTTP methods, but the type definitions were not updated to match.
Adds type definitions for closed issue #1302
* WIP: start TS definition for Cypress NPM module
* describe run and open options
* add jsdoc and make options optional
* fix expected type
* add more properties to Cypress config interface
* explain all config properties
* more definitions
* add types for test results
* export = cypress in NPM module
* remove ts ignore that is no longer needed
* wip: move lodash types to dev dependencies
* move blob-util types
* move types for minimatch
* do not lint types from minimatch
* move types sinon to dev dependencies
* move sinon-chai types to dev dependencies
* update tslint
* move types bluebird to dev dependencies
* move mocha types
* move jquery types to dev dependencies
* rename moment local wrapper
* move chai and chai-jquery
* refactor code for building CLI and dealing with folders
* linting
* include types subfolders
* replace types with relative paths
* transform sinon path to relative
* linting
* do not delete d.ts files
* linting
* chore: build npm package from this branch
* add minimatch relative reference
* work around minimatch
* set sinon to be relative load
* add readme to CLI
* linting readme
* driver, server: visit with a POST [wip]
* driver, server: allow sending body, headers, method in .visit
* driver: test: doublequotes
* driver: api cleanup, error handling
* driver, server: tests
* driver: only recognize visit(opts) if options is sole argument
* server: don't confuse options
* driver: validate method passed to 'visit'
* driver: validate that headers is an object
* driver: shows URL and not object in command log (fixes part of #678)
* cli: add new cy.visit(opts) invocation
* update a few comments
* update more jsdocs
* update actions examples
* update a few more docs
* more jsdoc
* disable linting jsdoc comments in index.d.ts file
* test built binary and NPM against kitchensink
* try building cypress/browsers:chrome67
* implement Omit using Exclude
* bump down to chrome64
* remove this branch from building binary
* doc second cy.find type
* document type for cy.request
* document Cypress.env command
* doc type for Cypress.log
* doc types for uncheck
* add type docs for cy.spy
* document spies and stubs types
* add space to align jsdoc stars
* types: show to correctly pass request options, close#2093
* cast just the http method property
* types for spy withArgs and as
* doc more types for overrides
* type for spread
* type for overriden then
* types for cy.trigger overrides
* rest of types of overriden methods, close#2009
* add cy.stub type for window alert and confirm
* jsdoc for cy.contains
* add jsdoc for viewport width and height
* jsdoc for prev command
* add jsdoc for cy.wait
* add jsdoc for clearLocalStorage
* jsdoc for wrap
* add jsdoc for screenshot with filename
* add jsdoc for clock
* add jsdoc example to cy.its
* complete jsdoc for siblings
* jsdoc for route overrides
* add isHeadless + isHeaded to browser
- move around logic so that instead of launching a browser by name, its
passed the entire browser object
- simplify logic for passing around options.headed
* launch the browser with an object, not browser name
* update browser types
* fix failing tests
* create directory path from screenshot name
* fix screenshot e2e specs
* ensure unique file paths for non-named screenshots
* append failure screenshots with ‘— failure’
* fix snapshot differences caused by slow computer
* fix driver specs
* fix minutes/seconds e2e snapshot replacer
* fix minutes/seconds e2e snapshot replacer again
* fix e2e specs failing due to screenshot path differences
* more snapshot fixes
* more snapshot fixes
* more snapshot fixes
* fix reporter showing wrong path for nested spec when no tests
* nest non-named screenshots in path based on spec path
* fix specs
* fix snapshot
* test that server + project state is reset between specs in cypress run mode
* rename spec.path to spec.relative. pass around the spec object instead of a string path
- store state on the project for current spec + browsers
- simplify how desktop gui passes around spec object
- fixes#1921
- make all specs a real spec model
- rename ‘Run all tests’ to ‘Run all specs’
* remove pretty-error dependency
* fixes#1919 and #1918, add Cypress.spec and Cypress.browser
* fixes all the failing tests
* fixes failing tests
* types: Cypress.spec
* add types for Cypress.browser
* fixes more failing tests
* enable null for spec props when running "All Specs"
* read comments per PR
https://github.com/cypress-io/cypress/pull/1858#issuecomment-396121876
* fixes failing tests
* fix linting
* fix types assertion
* fixes failing tests
* fixes failing tests, update from -- failed to (failed)
* ugh regexp
* fixes more tests
* add name, specName, and testFailure to the afterScreenshot props
* fix failing tests. append (failed) for failed screenshots
- use { testFailure: true } to indicate a failing test screenshot for
use in props