Commit Graph

87 Commits

Author SHA1 Message Date
Josef Biehler
259bfbecbe add Loggable options to its() / invoke() command (#5519)
* 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>
2019-12-04 11:52:44 +06:30
Zach Bloomquist
16f085dc12 Extend cy.its and cy.invoke to accept a number as 1st arg (#5755)
* extend cy.its and cy.invoke to accept a number as 1st arg

* add types tests

* add expecttype

* add its and invoke types to take an index
2019-11-26 08:26:45 -05:00
Gleb Bahmutov
b03b25c258 feat: pass list of browsers to plugins file (#5068)
and allow project to customize the list of browsers
2019-11-19 09:02:17 -05:00
Nicolas Ramz
9aeadbdfa2 Fix types for cy.dblclick and cy.rightclick (#5618)
* 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
2019-11-07 16:58:50 -05:00
Gleb Bahmutov
b3e40b08cd allow list of search patterns in testFiles config option (#5402)
* 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>
2019-10-31 11:26:47 -04:00
Gleb Bahmutov
bd54e3dff7 types: add failures and message to npm module result (#5337)
* types: add failures and message to npm module result

* remove memberof in comments
2019-10-22 15:29:21 -04:00
Jennifer Shehane
89ceb7ac45 Remove incorrect typing for Cypress.Commands.overwrite - does not accept options (#5347)
* Remove incorrect typing for Cypress.Commands.overwrite - does not accept options

* remove test that accepted options
2019-10-11 19:21:01 -04:00
Ben Kucera
abdf436638 simulated mouse fixes, rightclick, dblclick (#3030)
* 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>
2019-10-11 18:43:57 -04:00
Seb Insua
116a634a90 Add padding support to element screenshot (#4440) (#5078)
* Handle 0px tall elements with a better error message

Closes #5149

Co-authored-by: Minh Nguyen <minhnguyenxx@gmail.com>
Co-authored-by: Jennifer Shehane <shehane.jennifer@gmail.com>

* Add padding support to element#screenshot

Closes #4440

Co-authored-by: Minh Nguyen <minhnguyenxx@gmail.com>
Co-authored-by: Jennifer Shehane <shehane.jennifer@gmail.com>

* add e2e tests
2019-10-11 14:52:00 -04:00
Gleb Bahmutov
4ec77e3d58 use Node path from config file to run plugins (#4436)
* 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>
2019-10-01 17:08:11 -04:00
Gleb Bahmutov
21cdf6fc47 cli: add sizzle types needed by jQuery types (#5247) 2019-09-30 12:47:22 -04:00
Zach Bloomquist
49f5b3e80c Introduce --config-file argument (#3246)
* 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
2019-09-27 10:25:07 -04:00
Zach Bloomquist
9f717fe7e8 Allow passing qs parameter to cy.visit to set querystring (#5040)
* allow passing qs param to cy.visit

* add types

* qs -> params, merge with url, throw errors on invalid type, add tests

* params -> qs

* cleanup

* fix test
2019-09-17 16:06:55 -04:00
ccodecamp
1b2faa2748 Adding presets for following viewports: 1) iPhone-XR, 2) iPhone-X, 3)… (#4967)
* Adding presets for following viewports: 1) iPhone-XR, 2) iPhone-X, 3) Samsung-S10, 4) Samsung-Note9

* Adding presets for following viewports: 1) iPhone-XR, 2) iPhone-X, 3) Samsung-S10, 4) Samsung-Note9

* Fix casing

* Cleanup

* Update window_spec
2019-08-26 15:25:22 -04:00
Gleb Bahmutov
6930cabd7b Revert "Provide strong types for 'invoke' command (#4022) (#4907)"
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)
```
2019-08-06 15:38:33 -04:00
Mayfield
15685dbb9f Provide strong types for 'invoke' command (#4022) (#4907)
* 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'
2019-08-06 10:27:45 -04:00
Ben Kucera
1ceb9a4f0f fix .and chainer for chai-jquery assertions (#4834)
* fix .and chainer

* fix .and chainer by returning undefined

* fix .and chainer by returning undefined

* try fix e2e spec: return assertion result?

* add "inlcudes" as "contains" alias, fix chai-jquery typedefs

* re-run dtslint (passes locally)

* extend chai thru cy-chai.d.ts

* remove unneeded code

* add tests for .contains messages
2019-07-29 00:29:41 -04:00
Ben Kucera
50a285a980 rename cy.type disableSpecialChars options (#4761)
* Revert "Add option to ignore special character sequences to cy.type (#4744)"

This reverts commit 8153c6ec96.

* rename disableSpecialCharSequences

* update err msg pt 2

* update err msg pt 3

* update parseSpecialChar booleon - default is TRUE

* remove trailing whitespace


Co-authored-by: Jennifer Shehane <jennifer@cypress.io>
2019-07-24 15:50:52 -04:00
Stefano Magni
abc996ec70 Fix the cy.once typings (#4788)
* Fix the cy.once typings

* C -> c


Co-authored-by: Zach Bloomquist <github@chary.us>
2019-07-23 14:37:59 -04:00
Gleb Bahmutov
dd81ca5e3e add options argument to cy.contains TS definition (#4756) 2019-07-19 10:15:50 -04:00
John Arlinghaus
8153c6ec96 Add option to ignore special character sequences to cy.type (#4744)
* 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>
2019-07-18 14:47:55 +06:30
Ben Kucera
f518e6e8c2 refactor typedefs for cy (#3499)
* 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
2019-07-15 10:36:12 -04:00
Jennifer Shehane
5963b1eff8 Add example for location.href - also should example (#4702) 2019-07-12 13:59:53 -04:00
Paul Sachs
27ccf751ba Publicly export withinSubject option on get command (#2791)
* Publicly export withinSubject field on get requests

* Fix linting

* review adjustments
2019-07-09 10:57:13 -04:00
Jennifer Shehane
13b5a0acda Prefer American spelling 'canceled' (#4676) 2019-07-09 21:15:04 +06:30
Ben Kucera
52ca8ed839 support partial matching text,html,value (#3259)
* 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

* support partial matching text,html,value,id

* add partials for html,text,value ONLY, add typedefs, fix tests

* address changes
2019-07-09 10:30:15 -04:00
Zach Bloomquist
19e1297240 Add server onAnyRequest, etc... functions to typedefs (#4109) 2019-06-28 19:52:58 +06:30
Dmitriy Kovalenko
e44fc780dd [#4461] Change typescript declaration for .writeFile() (#4463)
* [#4461] Change typescript declaration for .writeFile()

* Fix dtslint error

* Add example to tsdoc definition

* Add testing example of new ts definition

* Fix trailling whitespace
2019-06-17 22:14:43 +06:30
Ben Kucera
7efd9d8ab0 fix programmatic focus/blur events, typing into currently focused (#2982)
* 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>
2019-06-11 11:06:26 -04:00
Gleb Bahmutov
06796484ec use relative types path from sinon-chai (#4382)
* use relative types path from sinon-chai

* change sinon-chai path post-install
2019-06-04 12:52:52 -04:00
Stefano Magni
d55acdee2e Fix the cy.stub type signature (#4302)
* Fix the cy.stub type signature

* Fix the TS linter failures
2019-05-24 12:39:30 -04:00
Ben Kucera
ef5c38d178 add "be.focused" and "have.focus" to assertions (#3219) (#4274)
* 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>
2019-05-21 18:56:15 -04:00
Zach Bloomquist
432b5366d9 Expose cy.isCy as Cypress.isCy, add typedefs (#4170)
* expose cy.isCy on Cypress object

* add typedefs for Cypress.isCy

* :face_palm:
2019-05-16 11:10:58 +06:30
Zach Bloomquist
b8a6baaca3 Retry certain requests on failure (#4015)
* 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>
2019-05-15 12:46:55 -04:00
Zach Bloomquist
1b1c2f24bd Add typedefs for Cypress.LocalStorage.clear (#4168)
* add typedefs for LocalStorage.clear

* clean up unused arguments

* appease the linter
2019-05-13 16:58:20 +06:30
Zach Bloomquist
146d4cd5cf Add missing Date to cy.clock typescript def (#4106)
* add missing option from clock tsdef

* add type test for cy.clock with Date
2019-05-03 11:34:16 +06:30
Zach Bloomquist
28f24b5997 Add missing fields to typescript definition for VisitOptions (#3991) 2019-04-17 19:16:11 -04:00
Nicholas Boll
0336fc03bc Update valid HTTP methods in the type definitions (#3764)
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
2019-04-17 17:02:55 -04:00
Gleb Bahmutov
143eccd607 add TypeScript definitions for the cypress npm module (#3826)
* 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
2019-04-03 11:25:36 -04:00
Maarten Claes
c4e90956de Allow timeout on hash (#3844)
Allow timeout on hash according to the documentation (https://docs.cypress.io/api/commands/hash.html#Arguments).
2019-03-29 12:14:34 -04:00
Takuya HARA
e2e454262b fix: trigger() accepts arbitrary event properties in options (#3809) 2019-03-26 15:59:57 -04:00
Jennifer Shehane
e4bb945541 remove string as valid type for match chainer (#3787)
Co-authored-by: Zach Bloomquist <github@chary.us>
2019-03-25 18:16:34 +06:30
Gleb Bahmutov
f81dc7a6b2 move 3rd party types to dev dependencies in CLI NPM package (#3425)
* 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
2019-03-05 12:49:42 -05:00
Zach Bloomquist
d24285bbdd Visit with a POST and/or custom headers (#3489)
* 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
2019-02-27 09:19:31 -08:00
Jennifer Shehane
a18dac6931 fix typo in index.d.ts file (#3588) 2019-02-25 23:04:21 +00:00
Gleb Bahmutov
5e86622b63 add sinon stub types to window alert and confirm (#3452) 2019-02-13 13:09:24 -05:00
Gleb Bahmutov
a92d0579a1 Fix jsdoc examples and expand comments in TypeScript definition file (#3163)
* 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
2019-01-23 01:50:34 -05:00
Nicholas Boll
2e2c5af441 fix: Type definitions for .then (#3105)
Fixes #3075
2019-01-09 13:43:19 -05:00
Gleb Bahmutov
71429e620e Fix TypeScript Omit definition (#3031)
* 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
2019-01-02 15:09:18 -05:00
Thomas Rich
852176f468 https://github.com/cypress-io/cypress/issues/2975 (#2976)
Connects https://github.com/cypress-io/cypress/issues/2975
2018-12-26 23:19:13 +06:30