cypress 3.1.4 → 3.3.1
Sign up to get free protection for your applications and to get access to all the features.
- package/lib/cli.js +54 -15
- package/lib/errors.js +89 -41
- package/lib/exec/open.js +4 -0
- package/lib/exec/spawn.js +98 -19
- package/lib/exec/xvfb.js +38 -10
- package/lib/tasks/download.js +16 -1
- package/lib/tasks/verify.js +92 -39
- package/lib/util.js +68 -3
- package/package.json +18 -33
- package/types/blob-util/LICENSE +21 -0
- package/types/blob-util/README.md +16 -0
- package/types/blob-util/index.d.ts +97 -0
- package/types/bluebird/LICENSE +21 -0
- package/types/bluebird/README.md +16 -0
- package/types/bluebird/index.d.ts +1315 -0
- package/types/chai/LICENSE +21 -0
- package/types/chai/README.md +16 -0
- package/types/chai/index.d.ts +1624 -0
- package/types/chai-jquery/LICENSE +21 -0
- package/types/chai-jquery/README.md +16 -0
- package/types/chai-jquery/index.d.ts +2587 -0
- package/types/{blob-util.d.ts → cy-blob-util.d.ts} +1 -1
- package/types/{bluebird.d.ts → cy-bluebird.d.ts} +1 -1
- package/types/{chai.d.ts → cy-chai.d.ts} +1 -2
- package/types/cy-minimatch.d.ts +96 -0
- package/types/cy-moment.d.ts +7 -0
- package/types/cypress-npm-api.d.ts +504 -0
- package/types/index.d.ts +403 -125
- package/types/jquery/LICENSE +21 -0
- package/types/jquery/README.md +16 -0
- package/types/jquery/index.d.ts +8560 -0
- package/types/lodash/LICENSE +21 -0
- package/types/lodash/README.md +16 -0
- package/types/lodash/add.d.ts +2 -0
- package/types/lodash/after.d.ts +2 -0
- package/types/lodash/ary.d.ts +2 -0
- package/types/lodash/assign.d.ts +2 -0
- package/types/lodash/assignIn.d.ts +2 -0
- package/types/lodash/assignInWith.d.ts +2 -0
- package/types/lodash/assignWith.d.ts +2 -0
- package/types/lodash/at.d.ts +2 -0
- package/types/lodash/attempt.d.ts +2 -0
- package/types/lodash/before.d.ts +2 -0
- package/types/lodash/bind.d.ts +2 -0
- package/types/lodash/bindAll.d.ts +2 -0
- package/types/lodash/bindKey.d.ts +2 -0
- package/types/lodash/camelCase.d.ts +2 -0
- package/types/lodash/capitalize.d.ts +2 -0
- package/types/lodash/castArray.d.ts +2 -0
- package/types/lodash/ceil.d.ts +2 -0
- package/types/lodash/chain.d.ts +2 -0
- package/types/lodash/chunk.d.ts +2 -0
- package/types/lodash/clamp.d.ts +2 -0
- package/types/lodash/clone.d.ts +2 -0
- package/types/lodash/cloneDeep.d.ts +2 -0
- package/types/lodash/cloneDeepWith.d.ts +2 -0
- package/types/lodash/cloneWith.d.ts +2 -0
- package/types/lodash/common/array.d.ts +3708 -0
- package/types/lodash/common/collection.d.ts +2575 -0
- package/types/lodash/common/common.d.ts +270 -0
- package/types/lodash/common/date.d.ts +27 -0
- package/types/lodash/common/function.d.ts +1489 -0
- package/types/lodash/common/lang.d.ts +1936 -0
- package/types/lodash/common/math.d.ts +532 -0
- package/types/lodash/common/number.d.ts +178 -0
- package/types/lodash/common/object.d.ts +3905 -0
- package/types/lodash/common/seq.d.ts +196 -0
- package/types/lodash/common/string.d.ts +1059 -0
- package/types/lodash/common/util.d.ts +1463 -0
- package/types/lodash/compact.d.ts +2 -0
- package/types/lodash/concat.d.ts +2 -0
- package/types/lodash/cond.d.ts +2 -0
- package/types/lodash/conformsTo.d.ts +2 -0
- package/types/lodash/constant.d.ts +2 -0
- package/types/lodash/countBy.d.ts +2 -0
- package/types/lodash/create.d.ts +2 -0
- package/types/lodash/curry.d.ts +2 -0
- package/types/lodash/curryRight.d.ts +2 -0
- package/types/lodash/debounce.d.ts +2 -0
- package/types/lodash/deburr.d.ts +2 -0
- package/types/lodash/defaultTo.d.ts +2 -0
- package/types/lodash/defaults.d.ts +2 -0
- package/types/lodash/defaultsDeep.d.ts +2 -0
- package/types/lodash/defer.d.ts +2 -0
- package/types/lodash/delay.d.ts +2 -0
- package/types/lodash/difference.d.ts +2 -0
- package/types/lodash/differenceBy.d.ts +2 -0
- package/types/lodash/differenceWith.d.ts +2 -0
- package/types/lodash/divide.d.ts +2 -0
- package/types/lodash/drop.d.ts +2 -0
- package/types/lodash/dropRight.d.ts +2 -0
- package/types/lodash/dropRightWhile.d.ts +2 -0
- package/types/lodash/dropWhile.d.ts +2 -0
- package/types/lodash/each.d.ts +2 -0
- package/types/lodash/eachRight.d.ts +2 -0
- package/types/lodash/endsWith.d.ts +2 -0
- package/types/lodash/entries.d.ts +2 -0
- package/types/lodash/entriesIn.d.ts +2 -0
- package/types/lodash/eq.d.ts +2 -0
- package/types/lodash/escape.d.ts +2 -0
- package/types/lodash/escapeRegExp.d.ts +2 -0
- package/types/lodash/every.d.ts +2 -0
- package/types/lodash/extend.d.ts +2 -0
- package/types/lodash/extendWith.d.ts +2 -0
- package/types/lodash/fill.d.ts +2 -0
- package/types/lodash/filter.d.ts +2 -0
- package/types/lodash/find.d.ts +2 -0
- package/types/lodash/findIndex.d.ts +2 -0
- package/types/lodash/findKey.d.ts +2 -0
- package/types/lodash/findLast.d.ts +2 -0
- package/types/lodash/findLastIndex.d.ts +2 -0
- package/types/lodash/findLastKey.d.ts +2 -0
- package/types/lodash/first.d.ts +2 -0
- package/types/lodash/flatMap.d.ts +2 -0
- package/types/lodash/flatMapDeep.d.ts +2 -0
- package/types/lodash/flatMapDepth.d.ts +2 -0
- package/types/lodash/flatten.d.ts +2 -0
- package/types/lodash/flattenDeep.d.ts +2 -0
- package/types/lodash/flattenDepth.d.ts +2 -0
- package/types/lodash/flip.d.ts +2 -0
- package/types/lodash/floor.d.ts +2 -0
- package/types/lodash/flow.d.ts +2 -0
- package/types/lodash/flowRight.d.ts +2 -0
- package/types/lodash/forEach.d.ts +2 -0
- package/types/lodash/forEachRight.d.ts +2 -0
- package/types/lodash/forIn.d.ts +2 -0
- package/types/lodash/forInRight.d.ts +2 -0
- package/types/lodash/forOwn.d.ts +2 -0
- package/types/lodash/forOwnRight.d.ts +2 -0
- package/types/lodash/fp/F.d.ts +2 -0
- package/types/lodash/fp/T.d.ts +2 -0
- package/types/lodash/fp/__.d.ts +3 -0
- package/types/lodash/fp/add.d.ts +2 -0
- package/types/lodash/fp/after.d.ts +2 -0
- package/types/lodash/fp/all.d.ts +2 -0
- package/types/lodash/fp/allPass.d.ts +2 -0
- package/types/lodash/fp/always.d.ts +2 -0
- package/types/lodash/fp/any.d.ts +2 -0
- package/types/lodash/fp/anyPass.d.ts +2 -0
- package/types/lodash/fp/apply.d.ts +2 -0
- package/types/lodash/fp/ary.d.ts +2 -0
- package/types/lodash/fp/assign.d.ts +2 -0
- package/types/lodash/fp/assignAll.d.ts +2 -0
- package/types/lodash/fp/assignAllWith.d.ts +2 -0
- package/types/lodash/fp/assignIn.d.ts +2 -0
- package/types/lodash/fp/assignInAll.d.ts +2 -0
- package/types/lodash/fp/assignInAllWith.d.ts +2 -0
- package/types/lodash/fp/assignInWith.d.ts +2 -0
- package/types/lodash/fp/assignWith.d.ts +2 -0
- package/types/lodash/fp/assoc.d.ts +2 -0
- package/types/lodash/fp/assocPath.d.ts +2 -0
- package/types/lodash/fp/at.d.ts +2 -0
- package/types/lodash/fp/attempt.d.ts +2 -0
- package/types/lodash/fp/before.d.ts +2 -0
- package/types/lodash/fp/bind.d.ts +2 -0
- package/types/lodash/fp/bindAll.d.ts +2 -0
- package/types/lodash/fp/bindKey.d.ts +2 -0
- package/types/lodash/fp/camelCase.d.ts +2 -0
- package/types/lodash/fp/capitalize.d.ts +2 -0
- package/types/lodash/fp/castArray.d.ts +2 -0
- package/types/lodash/fp/ceil.d.ts +2 -0
- package/types/lodash/fp/chunk.d.ts +2 -0
- package/types/lodash/fp/clamp.d.ts +2 -0
- package/types/lodash/fp/clone.d.ts +2 -0
- package/types/lodash/fp/cloneDeep.d.ts +2 -0
- package/types/lodash/fp/cloneDeepWith.d.ts +2 -0
- package/types/lodash/fp/cloneWith.d.ts +2 -0
- package/types/lodash/fp/compact.d.ts +2 -0
- package/types/lodash/fp/complement.d.ts +2 -0
- package/types/lodash/fp/compose.d.ts +2 -0
- package/types/lodash/fp/concat.d.ts +2 -0
- package/types/lodash/fp/cond.d.ts +2 -0
- package/types/lodash/fp/conforms.d.ts +2 -0
- package/types/lodash/fp/conformsTo.d.ts +2 -0
- package/types/lodash/fp/constant.d.ts +2 -0
- package/types/lodash/fp/contains.d.ts +2 -0
- package/types/lodash/fp/convert.d.ts +15 -0
- package/types/lodash/fp/countBy.d.ts +2 -0
- package/types/lodash/fp/create.d.ts +2 -0
- package/types/lodash/fp/curry.d.ts +2 -0
- package/types/lodash/fp/curryN.d.ts +2 -0
- package/types/lodash/fp/curryRight.d.ts +2 -0
- package/types/lodash/fp/curryRightN.d.ts +2 -0
- package/types/lodash/fp/debounce.d.ts +2 -0
- package/types/lodash/fp/deburr.d.ts +2 -0
- package/types/lodash/fp/defaultTo.d.ts +2 -0
- package/types/lodash/fp/defaults.d.ts +2 -0
- package/types/lodash/fp/defaultsAll.d.ts +2 -0
- package/types/lodash/fp/defaultsDeep.d.ts +2 -0
- package/types/lodash/fp/defaultsDeepAll.d.ts +2 -0
- package/types/lodash/fp/defer.d.ts +2 -0
- package/types/lodash/fp/delay.d.ts +2 -0
- package/types/lodash/fp/difference.d.ts +2 -0
- package/types/lodash/fp/differenceBy.d.ts +2 -0
- package/types/lodash/fp/differenceWith.d.ts +2 -0
- package/types/lodash/fp/dissoc.d.ts +2 -0
- package/types/lodash/fp/dissocPath.d.ts +2 -0
- package/types/lodash/fp/divide.d.ts +2 -0
- package/types/lodash/fp/drop.d.ts +2 -0
- package/types/lodash/fp/dropLast.d.ts +2 -0
- package/types/lodash/fp/dropLastWhile.d.ts +2 -0
- package/types/lodash/fp/dropRight.d.ts +2 -0
- package/types/lodash/fp/dropRightWhile.d.ts +2 -0
- package/types/lodash/fp/dropWhile.d.ts +2 -0
- package/types/lodash/fp/each.d.ts +2 -0
- package/types/lodash/fp/eachRight.d.ts +2 -0
- package/types/lodash/fp/endsWith.d.ts +2 -0
- package/types/lodash/fp/entries.d.ts +2 -0
- package/types/lodash/fp/entriesIn.d.ts +2 -0
- package/types/lodash/fp/eq.d.ts +2 -0
- package/types/lodash/fp/equals.d.ts +2 -0
- package/types/lodash/fp/escape.d.ts +2 -0
- package/types/lodash/fp/escapeRegExp.d.ts +2 -0
- package/types/lodash/fp/every.d.ts +2 -0
- package/types/lodash/fp/extend.d.ts +2 -0
- package/types/lodash/fp/extendAll.d.ts +2 -0
- package/types/lodash/fp/extendAllWith.d.ts +2 -0
- package/types/lodash/fp/extendWith.d.ts +2 -0
- package/types/lodash/fp/fill.d.ts +2 -0
- package/types/lodash/fp/filter.d.ts +2 -0
- package/types/lodash/fp/find.d.ts +2 -0
- package/types/lodash/fp/findFrom.d.ts +2 -0
- package/types/lodash/fp/findIndex.d.ts +2 -0
- package/types/lodash/fp/findIndexFrom.d.ts +2 -0
- package/types/lodash/fp/findKey.d.ts +2 -0
- package/types/lodash/fp/findLast.d.ts +2 -0
- package/types/lodash/fp/findLastFrom.d.ts +2 -0
- package/types/lodash/fp/findLastIndex.d.ts +2 -0
- package/types/lodash/fp/findLastIndexFrom.d.ts +2 -0
- package/types/lodash/fp/findLastKey.d.ts +2 -0
- package/types/lodash/fp/first.d.ts +2 -0
- package/types/lodash/fp/flatMap.d.ts +2 -0
- package/types/lodash/fp/flatMapDeep.d.ts +2 -0
- package/types/lodash/fp/flatMapDepth.d.ts +2 -0
- package/types/lodash/fp/flatten.d.ts +2 -0
- package/types/lodash/fp/flattenDeep.d.ts +2 -0
- package/types/lodash/fp/flattenDepth.d.ts +2 -0
- package/types/lodash/fp/flip.d.ts +2 -0
- package/types/lodash/fp/floor.d.ts +2 -0
- package/types/lodash/fp/flow.d.ts +2 -0
- package/types/lodash/fp/flowRight.d.ts +2 -0
- package/types/lodash/fp/forEach.d.ts +2 -0
- package/types/lodash/fp/forEachRight.d.ts +2 -0
- package/types/lodash/fp/forIn.d.ts +2 -0
- package/types/lodash/fp/forInRight.d.ts +2 -0
- package/types/lodash/fp/forOwn.d.ts +2 -0
- package/types/lodash/fp/forOwnRight.d.ts +2 -0
- package/types/lodash/fp/fromPairs.d.ts +2 -0
- package/types/lodash/fp/functions.d.ts +2 -0
- package/types/lodash/fp/functionsIn.d.ts +2 -0
- package/types/lodash/fp/get.d.ts +2 -0
- package/types/lodash/fp/getOr.d.ts +2 -0
- package/types/lodash/fp/groupBy.d.ts +2 -0
- package/types/lodash/fp/gt.d.ts +2 -0
- package/types/lodash/fp/gte.d.ts +2 -0
- package/types/lodash/fp/has.d.ts +2 -0
- package/types/lodash/fp/hasIn.d.ts +2 -0
- package/types/lodash/fp/head.d.ts +2 -0
- package/types/lodash/fp/identical.d.ts +2 -0
- package/types/lodash/fp/identity.d.ts +2 -0
- package/types/lodash/fp/inRange.d.ts +2 -0
- package/types/lodash/fp/includes.d.ts +2 -0
- package/types/lodash/fp/includesFrom.d.ts +2 -0
- package/types/lodash/fp/indexBy.d.ts +2 -0
- package/types/lodash/fp/indexOf.d.ts +2 -0
- package/types/lodash/fp/indexOfFrom.d.ts +2 -0
- package/types/lodash/fp/init.d.ts +2 -0
- package/types/lodash/fp/initial.d.ts +2 -0
- package/types/lodash/fp/intersection.d.ts +2 -0
- package/types/lodash/fp/intersectionBy.d.ts +2 -0
- package/types/lodash/fp/intersectionWith.d.ts +2 -0
- package/types/lodash/fp/invert.d.ts +2 -0
- package/types/lodash/fp/invertBy.d.ts +2 -0
- package/types/lodash/fp/invertObj.d.ts +2 -0
- package/types/lodash/fp/invoke.d.ts +2 -0
- package/types/lodash/fp/invokeArgs.d.ts +2 -0
- package/types/lodash/fp/invokeArgsMap.d.ts +2 -0
- package/types/lodash/fp/invokeMap.d.ts +2 -0
- package/types/lodash/fp/isArguments.d.ts +2 -0
- package/types/lodash/fp/isArray.d.ts +2 -0
- package/types/lodash/fp/isArrayBuffer.d.ts +2 -0
- package/types/lodash/fp/isArrayLike.d.ts +2 -0
- package/types/lodash/fp/isArrayLikeObject.d.ts +2 -0
- package/types/lodash/fp/isBoolean.d.ts +2 -0
- package/types/lodash/fp/isBuffer.d.ts +2 -0
- package/types/lodash/fp/isDate.d.ts +2 -0
- package/types/lodash/fp/isElement.d.ts +2 -0
- package/types/lodash/fp/isEmpty.d.ts +2 -0
- package/types/lodash/fp/isEqual.d.ts +2 -0
- package/types/lodash/fp/isEqualWith.d.ts +2 -0
- package/types/lodash/fp/isError.d.ts +2 -0
- package/types/lodash/fp/isFinite.d.ts +2 -0
- package/types/lodash/fp/isFunction.d.ts +2 -0
- package/types/lodash/fp/isInteger.d.ts +2 -0
- package/types/lodash/fp/isLength.d.ts +2 -0
- package/types/lodash/fp/isMap.d.ts +2 -0
- package/types/lodash/fp/isMatch.d.ts +2 -0
- package/types/lodash/fp/isMatchWith.d.ts +2 -0
- package/types/lodash/fp/isNaN.d.ts +2 -0
- package/types/lodash/fp/isNative.d.ts +2 -0
- package/types/lodash/fp/isNil.d.ts +2 -0
- package/types/lodash/fp/isNull.d.ts +2 -0
- package/types/lodash/fp/isNumber.d.ts +2 -0
- package/types/lodash/fp/isObject.d.ts +2 -0
- package/types/lodash/fp/isObjectLike.d.ts +2 -0
- package/types/lodash/fp/isPlainObject.d.ts +2 -0
- package/types/lodash/fp/isRegExp.d.ts +2 -0
- package/types/lodash/fp/isSafeInteger.d.ts +2 -0
- package/types/lodash/fp/isSet.d.ts +2 -0
- package/types/lodash/fp/isString.d.ts +2 -0
- package/types/lodash/fp/isSymbol.d.ts +2 -0
- package/types/lodash/fp/isTypedArray.d.ts +2 -0
- package/types/lodash/fp/isUndefined.d.ts +2 -0
- package/types/lodash/fp/isWeakMap.d.ts +2 -0
- package/types/lodash/fp/isWeakSet.d.ts +2 -0
- package/types/lodash/fp/iteratee.d.ts +2 -0
- package/types/lodash/fp/join.d.ts +2 -0
- package/types/lodash/fp/juxt.d.ts +2 -0
- package/types/lodash/fp/kebabCase.d.ts +2 -0
- package/types/lodash/fp/keyBy.d.ts +2 -0
- package/types/lodash/fp/keys.d.ts +2 -0
- package/types/lodash/fp/keysIn.d.ts +2 -0
- package/types/lodash/fp/last.d.ts +2 -0
- package/types/lodash/fp/lastIndexOf.d.ts +2 -0
- package/types/lodash/fp/lastIndexOfFrom.d.ts +2 -0
- package/types/lodash/fp/lowerCase.d.ts +2 -0
- package/types/lodash/fp/lowerFirst.d.ts +2 -0
- package/types/lodash/fp/lt.d.ts +2 -0
- package/types/lodash/fp/lte.d.ts +2 -0
- package/types/lodash/fp/map.d.ts +2 -0
- package/types/lodash/fp/mapKeys.d.ts +2 -0
- package/types/lodash/fp/mapValues.d.ts +2 -0
- package/types/lodash/fp/matches.d.ts +2 -0
- package/types/lodash/fp/matchesProperty.d.ts +2 -0
- package/types/lodash/fp/max.d.ts +2 -0
- package/types/lodash/fp/maxBy.d.ts +2 -0
- package/types/lodash/fp/mean.d.ts +2 -0
- package/types/lodash/fp/meanBy.d.ts +2 -0
- package/types/lodash/fp/memoize.d.ts +2 -0
- package/types/lodash/fp/merge.d.ts +2 -0
- package/types/lodash/fp/mergeAll.d.ts +2 -0
- package/types/lodash/fp/mergeAllWith.d.ts +2 -0
- package/types/lodash/fp/mergeWith.d.ts +2 -0
- package/types/lodash/fp/method.d.ts +2 -0
- package/types/lodash/fp/methodOf.d.ts +2 -0
- package/types/lodash/fp/min.d.ts +2 -0
- package/types/lodash/fp/minBy.d.ts +2 -0
- package/types/lodash/fp/multiply.d.ts +2 -0
- package/types/lodash/fp/nAry.d.ts +2 -0
- package/types/lodash/fp/negate.d.ts +2 -0
- package/types/lodash/fp/noConflict.d.ts +2 -0
- package/types/lodash/fp/noop.d.ts +2 -0
- package/types/lodash/fp/now.d.ts +2 -0
- package/types/lodash/fp/nth.d.ts +2 -0
- package/types/lodash/fp/nthArg.d.ts +2 -0
- package/types/lodash/fp/omit.d.ts +2 -0
- package/types/lodash/fp/omitAll.d.ts +2 -0
- package/types/lodash/fp/omitBy.d.ts +2 -0
- package/types/lodash/fp/once.d.ts +2 -0
- package/types/lodash/fp/orderBy.d.ts +2 -0
- package/types/lodash/fp/over.d.ts +2 -0
- package/types/lodash/fp/overArgs.d.ts +2 -0
- package/types/lodash/fp/overEvery.d.ts +2 -0
- package/types/lodash/fp/overSome.d.ts +2 -0
- package/types/lodash/fp/pad.d.ts +2 -0
- package/types/lodash/fp/padChars.d.ts +2 -0
- package/types/lodash/fp/padCharsEnd.d.ts +2 -0
- package/types/lodash/fp/padCharsStart.d.ts +2 -0
- package/types/lodash/fp/padEnd.d.ts +2 -0
- package/types/lodash/fp/padStart.d.ts +2 -0
- package/types/lodash/fp/parseInt.d.ts +2 -0
- package/types/lodash/fp/partial.d.ts +2 -0
- package/types/lodash/fp/partialRight.d.ts +2 -0
- package/types/lodash/fp/partition.d.ts +2 -0
- package/types/lodash/fp/path.d.ts +2 -0
- package/types/lodash/fp/pathEq.d.ts +2 -0
- package/types/lodash/fp/pathOr.d.ts +2 -0
- package/types/lodash/fp/paths.d.ts +2 -0
- package/types/lodash/fp/pick.d.ts +2 -0
- package/types/lodash/fp/pickAll.d.ts +2 -0
- package/types/lodash/fp/pickBy.d.ts +2 -0
- package/types/lodash/fp/pipe.d.ts +2 -0
- package/types/lodash/fp/placeholder.d.ts +3 -0
- package/types/lodash/fp/pluck.d.ts +2 -0
- package/types/lodash/fp/prop.d.ts +2 -0
- package/types/lodash/fp/propEq.d.ts +2 -0
- package/types/lodash/fp/propOr.d.ts +2 -0
- package/types/lodash/fp/property.d.ts +2 -0
- package/types/lodash/fp/propertyOf.d.ts +2 -0
- package/types/lodash/fp/props.d.ts +2 -0
- package/types/lodash/fp/pull.d.ts +2 -0
- package/types/lodash/fp/pullAll.d.ts +2 -0
- package/types/lodash/fp/pullAllBy.d.ts +2 -0
- package/types/lodash/fp/pullAllWith.d.ts +2 -0
- package/types/lodash/fp/pullAt.d.ts +2 -0
- package/types/lodash/fp/random.d.ts +2 -0
- package/types/lodash/fp/range.d.ts +2 -0
- package/types/lodash/fp/rangeRight.d.ts +2 -0
- package/types/lodash/fp/rangeStep.d.ts +2 -0
- package/types/lodash/fp/rangeStepRight.d.ts +2 -0
- package/types/lodash/fp/rearg.d.ts +2 -0
- package/types/lodash/fp/reduce.d.ts +2 -0
- package/types/lodash/fp/reduceRight.d.ts +2 -0
- package/types/lodash/fp/reject.d.ts +2 -0
- package/types/lodash/fp/remove.d.ts +2 -0
- package/types/lodash/fp/repeat.d.ts +2 -0
- package/types/lodash/fp/replace.d.ts +2 -0
- package/types/lodash/fp/rest.d.ts +2 -0
- package/types/lodash/fp/restFrom.d.ts +2 -0
- package/types/lodash/fp/result.d.ts +2 -0
- package/types/lodash/fp/reverse.d.ts +2 -0
- package/types/lodash/fp/round.d.ts +2 -0
- package/types/lodash/fp/runInContext.d.ts +2 -0
- package/types/lodash/fp/sample.d.ts +2 -0
- package/types/lodash/fp/sampleSize.d.ts +2 -0
- package/types/lodash/fp/set.d.ts +2 -0
- package/types/lodash/fp/setWith.d.ts +2 -0
- package/types/lodash/fp/shuffle.d.ts +2 -0
- package/types/lodash/fp/size.d.ts +2 -0
- package/types/lodash/fp/slice.d.ts +2 -0
- package/types/lodash/fp/snakeCase.d.ts +2 -0
- package/types/lodash/fp/some.d.ts +2 -0
- package/types/lodash/fp/sortBy.d.ts +2 -0
- package/types/lodash/fp/sortedIndex.d.ts +2 -0
- package/types/lodash/fp/sortedIndexBy.d.ts +2 -0
- package/types/lodash/fp/sortedIndexOf.d.ts +2 -0
- package/types/lodash/fp/sortedLastIndex.d.ts +2 -0
- package/types/lodash/fp/sortedLastIndexBy.d.ts +2 -0
- package/types/lodash/fp/sortedLastIndexOf.d.ts +2 -0
- package/types/lodash/fp/sortedUniq.d.ts +2 -0
- package/types/lodash/fp/sortedUniqBy.d.ts +2 -0
- package/types/lodash/fp/split.d.ts +2 -0
- package/types/lodash/fp/spread.d.ts +2 -0
- package/types/lodash/fp/spreadFrom.d.ts +2 -0
- package/types/lodash/fp/startCase.d.ts +2 -0
- package/types/lodash/fp/startsWith.d.ts +2 -0
- package/types/lodash/fp/stubArray.d.ts +2 -0
- package/types/lodash/fp/stubFalse.d.ts +2 -0
- package/types/lodash/fp/stubObject.d.ts +2 -0
- package/types/lodash/fp/stubString.d.ts +2 -0
- package/types/lodash/fp/stubTrue.d.ts +2 -0
- package/types/lodash/fp/subtract.d.ts +2 -0
- package/types/lodash/fp/sum.d.ts +2 -0
- package/types/lodash/fp/sumBy.d.ts +2 -0
- package/types/lodash/fp/symmetricDifference.d.ts +2 -0
- package/types/lodash/fp/symmetricDifferenceBy.d.ts +2 -0
- package/types/lodash/fp/symmetricDifferenceWith.d.ts +2 -0
- package/types/lodash/fp/tail.d.ts +2 -0
- package/types/lodash/fp/take.d.ts +2 -0
- package/types/lodash/fp/takeLast.d.ts +2 -0
- package/types/lodash/fp/takeLastWhile.d.ts +2 -0
- package/types/lodash/fp/takeRight.d.ts +2 -0
- package/types/lodash/fp/takeRightWhile.d.ts +2 -0
- package/types/lodash/fp/takeWhile.d.ts +2 -0
- package/types/lodash/fp/tap.d.ts +2 -0
- package/types/lodash/fp/template.d.ts +2 -0
- package/types/lodash/fp/throttle.d.ts +2 -0
- package/types/lodash/fp/thru.d.ts +2 -0
- package/types/lodash/fp/times.d.ts +2 -0
- package/types/lodash/fp/toArray.d.ts +2 -0
- package/types/lodash/fp/toFinite.d.ts +2 -0
- package/types/lodash/fp/toInteger.d.ts +2 -0
- package/types/lodash/fp/toLength.d.ts +2 -0
- package/types/lodash/fp/toLower.d.ts +2 -0
- package/types/lodash/fp/toNumber.d.ts +2 -0
- package/types/lodash/fp/toPairs.d.ts +2 -0
- package/types/lodash/fp/toPairsIn.d.ts +2 -0
- package/types/lodash/fp/toPath.d.ts +2 -0
- package/types/lodash/fp/toPlainObject.d.ts +2 -0
- package/types/lodash/fp/toSafeInteger.d.ts +2 -0
- package/types/lodash/fp/toString.d.ts +2 -0
- package/types/lodash/fp/toUpper.d.ts +2 -0
- package/types/lodash/fp/transform.d.ts +2 -0
- package/types/lodash/fp/trim.d.ts +2 -0
- package/types/lodash/fp/trimChars.d.ts +2 -0
- package/types/lodash/fp/trimCharsEnd.d.ts +2 -0
- package/types/lodash/fp/trimCharsStart.d.ts +2 -0
- package/types/lodash/fp/trimEnd.d.ts +2 -0
- package/types/lodash/fp/trimStart.d.ts +2 -0
- package/types/lodash/fp/truncate.d.ts +2 -0
- package/types/lodash/fp/unapply.d.ts +2 -0
- package/types/lodash/fp/unary.d.ts +2 -0
- package/types/lodash/fp/unescape.d.ts +2 -0
- package/types/lodash/fp/union.d.ts +2 -0
- package/types/lodash/fp/unionBy.d.ts +2 -0
- package/types/lodash/fp/unionWith.d.ts +2 -0
- package/types/lodash/fp/uniq.d.ts +2 -0
- package/types/lodash/fp/uniqBy.d.ts +2 -0
- package/types/lodash/fp/uniqWith.d.ts +2 -0
- package/types/lodash/fp/uniqueId.d.ts +2 -0
- package/types/lodash/fp/unnest.d.ts +2 -0
- package/types/lodash/fp/unset.d.ts +2 -0
- package/types/lodash/fp/unzip.d.ts +2 -0
- package/types/lodash/fp/unzipWith.d.ts +2 -0
- package/types/lodash/fp/update.d.ts +2 -0
- package/types/lodash/fp/updateWith.d.ts +2 -0
- package/types/lodash/fp/upperCase.d.ts +2 -0
- package/types/lodash/fp/upperFirst.d.ts +2 -0
- package/types/lodash/fp/useWith.d.ts +2 -0
- package/types/lodash/fp/values.d.ts +2 -0
- package/types/lodash/fp/valuesIn.d.ts +2 -0
- package/types/lodash/fp/where.d.ts +2 -0
- package/types/lodash/fp/whereEq.d.ts +2 -0
- package/types/lodash/fp/without.d.ts +2 -0
- package/types/lodash/fp/words.d.ts +2 -0
- package/types/lodash/fp/wrap.d.ts +2 -0
- package/types/lodash/fp/xor.d.ts +2 -0
- package/types/lodash/fp/xorBy.d.ts +2 -0
- package/types/lodash/fp/xorWith.d.ts +2 -0
- package/types/lodash/fp/zip.d.ts +2 -0
- package/types/lodash/fp/zipAll.d.ts +2 -0
- package/types/lodash/fp/zipObj.d.ts +2 -0
- package/types/lodash/fp/zipObject.d.ts +2 -0
- package/types/lodash/fp/zipObjectDeep.d.ts +2 -0
- package/types/lodash/fp/zipWith.d.ts +2 -0
- package/types/lodash/fp.d.ts +4766 -0
- package/types/lodash/fromPairs.d.ts +2 -0
- package/types/lodash/functions.d.ts +2 -0
- package/types/lodash/functionsIn.d.ts +2 -0
- package/types/lodash/get.d.ts +2 -0
- package/types/lodash/groupBy.d.ts +2 -0
- package/types/lodash/gt.d.ts +2 -0
- package/types/lodash/gte.d.ts +2 -0
- package/types/lodash/has.d.ts +2 -0
- package/types/lodash/hasIn.d.ts +2 -0
- package/types/lodash/head.d.ts +2 -0
- package/types/lodash/identity.d.ts +2 -0
- package/types/lodash/inRange.d.ts +2 -0
- package/types/lodash/includes.d.ts +2 -0
- package/types/lodash/index.d.ts +47 -0
- package/types/lodash/indexOf.d.ts +2 -0
- package/types/lodash/initial.d.ts +2 -0
- package/types/lodash/intersection.d.ts +2 -0
- package/types/lodash/intersectionBy.d.ts +2 -0
- package/types/lodash/intersectionWith.d.ts +2 -0
- package/types/lodash/invert.d.ts +2 -0
- package/types/lodash/invertBy.d.ts +2 -0
- package/types/lodash/invoke.d.ts +2 -0
- package/types/lodash/invokeMap.d.ts +2 -0
- package/types/lodash/isArguments.d.ts +2 -0
- package/types/lodash/isArray.d.ts +2 -0
- package/types/lodash/isArrayBuffer.d.ts +2 -0
- package/types/lodash/isArrayLike.d.ts +2 -0
- package/types/lodash/isArrayLikeObject.d.ts +2 -0
- package/types/lodash/isBoolean.d.ts +2 -0
- package/types/lodash/isBuffer.d.ts +2 -0
- package/types/lodash/isDate.d.ts +2 -0
- package/types/lodash/isElement.d.ts +2 -0
- package/types/lodash/isEmpty.d.ts +2 -0
- package/types/lodash/isEqual.d.ts +2 -0
- package/types/lodash/isEqualWith.d.ts +2 -0
- package/types/lodash/isError.d.ts +2 -0
- package/types/lodash/isFinite.d.ts +2 -0
- package/types/lodash/isFunction.d.ts +2 -0
- package/types/lodash/isInteger.d.ts +2 -0
- package/types/lodash/isLength.d.ts +2 -0
- package/types/lodash/isMap.d.ts +2 -0
- package/types/lodash/isMatch.d.ts +2 -0
- package/types/lodash/isMatchWith.d.ts +2 -0
- package/types/lodash/isNaN.d.ts +2 -0
- package/types/lodash/isNative.d.ts +2 -0
- package/types/lodash/isNil.d.ts +2 -0
- package/types/lodash/isNull.d.ts +2 -0
- package/types/lodash/isNumber.d.ts +2 -0
- package/types/lodash/isObject.d.ts +2 -0
- package/types/lodash/isObjectLike.d.ts +2 -0
- package/types/lodash/isPlainObject.d.ts +2 -0
- package/types/lodash/isRegExp.d.ts +2 -0
- package/types/lodash/isSafeInteger.d.ts +2 -0
- package/types/lodash/isSet.d.ts +2 -0
- package/types/lodash/isString.d.ts +2 -0
- package/types/lodash/isSymbol.d.ts +2 -0
- package/types/lodash/isTypedArray.d.ts +2 -0
- package/types/lodash/isUndefined.d.ts +2 -0
- package/types/lodash/isWeakMap.d.ts +2 -0
- package/types/lodash/isWeakSet.d.ts +2 -0
- package/types/lodash/iteratee.d.ts +2 -0
- package/types/lodash/join.d.ts +2 -0
- package/types/lodash/kebabCase.d.ts +2 -0
- package/types/lodash/keyBy.d.ts +2 -0
- package/types/lodash/keys.d.ts +2 -0
- package/types/lodash/keysIn.d.ts +2 -0
- package/types/lodash/last.d.ts +2 -0
- package/types/lodash/lastIndexOf.d.ts +2 -0
- package/types/lodash/lowerCase.d.ts +2 -0
- package/types/lodash/lowerFirst.d.ts +2 -0
- package/types/lodash/lt.d.ts +2 -0
- package/types/lodash/lte.d.ts +2 -0
- package/types/lodash/map.d.ts +2 -0
- package/types/lodash/mapKeys.d.ts +2 -0
- package/types/lodash/mapValues.d.ts +2 -0
- package/types/lodash/matches.d.ts +2 -0
- package/types/lodash/matchesProperty.d.ts +2 -0
- package/types/lodash/max.d.ts +2 -0
- package/types/lodash/maxBy.d.ts +2 -0
- package/types/lodash/mean.d.ts +2 -0
- package/types/lodash/meanBy.d.ts +2 -0
- package/types/lodash/memoize.d.ts +2 -0
- package/types/lodash/merge.d.ts +2 -0
- package/types/lodash/mergeWith.d.ts +2 -0
- package/types/lodash/method.d.ts +2 -0
- package/types/lodash/methodOf.d.ts +2 -0
- package/types/lodash/min.d.ts +2 -0
- package/types/lodash/minBy.d.ts +2 -0
- package/types/lodash/mixin.d.ts +2 -0
- package/types/lodash/negate.d.ts +2 -0
- package/types/lodash/noConflict.d.ts +2 -0
- package/types/lodash/noop.d.ts +2 -0
- package/types/lodash/now.d.ts +2 -0
- package/types/lodash/nth.d.ts +2 -0
- package/types/lodash/nthArg.d.ts +2 -0
- package/types/lodash/omit.d.ts +2 -0
- package/types/lodash/omitBy.d.ts +2 -0
- package/types/lodash/once.d.ts +2 -0
- package/types/lodash/orderBy.d.ts +2 -0
- package/types/lodash/over.d.ts +2 -0
- package/types/lodash/overArgs.d.ts +2 -0
- package/types/lodash/overEvery.d.ts +2 -0
- package/types/lodash/overSome.d.ts +2 -0
- package/types/lodash/pad.d.ts +2 -0
- package/types/lodash/padEnd.d.ts +2 -0
- package/types/lodash/padStart.d.ts +2 -0
- package/types/lodash/parseInt.d.ts +2 -0
- package/types/lodash/partial.d.ts +2 -0
- package/types/lodash/partialRight.d.ts +2 -0
- package/types/lodash/partition.d.ts +2 -0
- package/types/lodash/pick.d.ts +2 -0
- package/types/lodash/pickBy.d.ts +2 -0
- package/types/lodash/property.d.ts +2 -0
- package/types/lodash/propertyOf.d.ts +2 -0
- package/types/lodash/pull.d.ts +2 -0
- package/types/lodash/pullAll.d.ts +2 -0
- package/types/lodash/pullAllBy.d.ts +2 -0
- package/types/lodash/pullAllWith.d.ts +2 -0
- package/types/lodash/pullAt.d.ts +2 -0
- package/types/lodash/random.d.ts +2 -0
- package/types/lodash/range.d.ts +2 -0
- package/types/lodash/rangeRight.d.ts +2 -0
- package/types/lodash/rearg.d.ts +2 -0
- package/types/lodash/reduce.d.ts +2 -0
- package/types/lodash/reduceRight.d.ts +2 -0
- package/types/lodash/reject.d.ts +2 -0
- package/types/lodash/remove.d.ts +2 -0
- package/types/lodash/repeat.d.ts +2 -0
- package/types/lodash/replace.d.ts +2 -0
- package/types/lodash/rest.d.ts +2 -0
- package/types/lodash/result.d.ts +2 -0
- package/types/lodash/reverse.d.ts +2 -0
- package/types/lodash/round.d.ts +2 -0
- package/types/lodash/runInContext.d.ts +2 -0
- package/types/lodash/sample.d.ts +2 -0
- package/types/lodash/sampleSize.d.ts +2 -0
- package/types/lodash/set.d.ts +2 -0
- package/types/lodash/setWith.d.ts +2 -0
- package/types/lodash/shuffle.d.ts +2 -0
- package/types/lodash/size.d.ts +2 -0
- package/types/lodash/slice.d.ts +2 -0
- package/types/lodash/snakeCase.d.ts +2 -0
- package/types/lodash/some.d.ts +2 -0
- package/types/lodash/sortBy.d.ts +2 -0
- package/types/lodash/sortedIndex.d.ts +2 -0
- package/types/lodash/sortedIndexBy.d.ts +2 -0
- package/types/lodash/sortedIndexOf.d.ts +2 -0
- package/types/lodash/sortedLastIndex.d.ts +2 -0
- package/types/lodash/sortedLastIndexBy.d.ts +2 -0
- package/types/lodash/sortedLastIndexOf.d.ts +2 -0
- package/types/lodash/sortedUniq.d.ts +2 -0
- package/types/lodash/sortedUniqBy.d.ts +2 -0
- package/types/lodash/split.d.ts +2 -0
- package/types/lodash/spread.d.ts +2 -0
- package/types/lodash/startCase.d.ts +2 -0
- package/types/lodash/startsWith.d.ts +2 -0
- package/types/lodash/subtract.d.ts +2 -0
- package/types/lodash/sum.d.ts +2 -0
- package/types/lodash/sumBy.d.ts +2 -0
- package/types/lodash/tail.d.ts +2 -0
- package/types/lodash/take.d.ts +2 -0
- package/types/lodash/takeRight.d.ts +2 -0
- package/types/lodash/takeRightWhile.d.ts +2 -0
- package/types/lodash/takeWhile.d.ts +2 -0
- package/types/lodash/tap.d.ts +2 -0
- package/types/lodash/template.d.ts +2 -0
- package/types/lodash/throttle.d.ts +2 -0
- package/types/lodash/thru.d.ts +2 -0
- package/types/lodash/times.d.ts +2 -0
- package/types/lodash/toArray.d.ts +2 -0
- package/types/lodash/toFinite.d.ts +2 -0
- package/types/lodash/toInteger.d.ts +2 -0
- package/types/lodash/toLength.d.ts +2 -0
- package/types/lodash/toLower.d.ts +2 -0
- package/types/lodash/toNumber.d.ts +2 -0
- package/types/lodash/toPairs.d.ts +2 -0
- package/types/lodash/toPairsIn.d.ts +2 -0
- package/types/lodash/toPath.d.ts +2 -0
- package/types/lodash/toPlainObject.d.ts +2 -0
- package/types/lodash/toSafeInteger.d.ts +2 -0
- package/types/lodash/toString.d.ts +2 -0
- package/types/lodash/toUpper.d.ts +2 -0
- package/types/lodash/transform.d.ts +2 -0
- package/types/lodash/trim.d.ts +2 -0
- package/types/lodash/trimEnd.d.ts +2 -0
- package/types/lodash/trimStart.d.ts +2 -0
- package/types/lodash/truncate.d.ts +2 -0
- package/types/lodash/unary.d.ts +2 -0
- package/types/lodash/unescape.d.ts +2 -0
- package/types/lodash/union.d.ts +2 -0
- package/types/lodash/unionBy.d.ts +2 -0
- package/types/lodash/unionWith.d.ts +2 -0
- package/types/lodash/uniq.d.ts +2 -0
- package/types/lodash/uniqBy.d.ts +2 -0
- package/types/lodash/uniqWith.d.ts +2 -0
- package/types/lodash/uniqueId.d.ts +2 -0
- package/types/lodash/unset.d.ts +2 -0
- package/types/lodash/unzip.d.ts +2 -0
- package/types/lodash/unzipWith.d.ts +2 -0
- package/types/lodash/update.d.ts +2 -0
- package/types/lodash/updateWith.d.ts +2 -0
- package/types/lodash/upperCase.d.ts +2 -0
- package/types/lodash/upperFirst.d.ts +2 -0
- package/types/lodash/values.d.ts +2 -0
- package/types/lodash/valuesIn.d.ts +2 -0
- package/types/lodash/without.d.ts +2 -0
- package/types/lodash/words.d.ts +2 -0
- package/types/lodash/wrap.d.ts +2 -0
- package/types/lodash/xor.d.ts +2 -0
- package/types/lodash/xorBy.d.ts +2 -0
- package/types/lodash/xorWith.d.ts +2 -0
- package/types/lodash/zip.d.ts +2 -0
- package/types/lodash/zipObject.d.ts +2 -0
- package/types/lodash/zipObjectDeep.d.ts +2 -0
- package/types/lodash/zipWith.d.ts +2 -0
- package/types/minimatch/LICENSE +21 -0
- package/types/minimatch/README.md +16 -0
- package/types/minimatch/index.d.ts +214 -0
- package/types/mocha/LICENSE +21 -0
- package/types/mocha/README.md +16 -0
- package/types/mocha/index.d.ts +241 -0
- package/types/sinon/LICENSE +21 -0
- package/types/sinon/README.md +16 -0
- package/types/sinon/index.d.ts +1659 -0
- package/types/sinon/ts3.1/index.d.ts +1747 -0
- package/types/sinon-chai/LICENSE +21 -0
- package/types/sinon-chai/README.md +16 -0
- package/types/sinon-chai/index.d.ts +109 -0
- package/types/minimatch.d.ts +0 -11
- package/types/moment.d.ts +0 -11
package/types/index.d.ts
CHANGED
@@ -7,19 +7,24 @@
|
|
7
7
|
// TypeScript Version: 2.8
|
8
8
|
// Updated by the Cypress team: https://www.cypress.io/about/
|
9
9
|
|
10
|
-
/// <reference path="./blob-util.d.ts" />
|
11
|
-
/// <reference path="./bluebird.d.ts" />
|
12
|
-
/// <reference path="./
|
13
|
-
/// <reference path="./
|
14
|
-
|
15
|
-
/// <reference
|
16
|
-
/// <reference
|
17
|
-
/// <reference
|
18
|
-
/// <reference
|
19
|
-
/// <reference
|
10
|
+
/// <reference path="./cy-blob-util.d.ts" />
|
11
|
+
/// <reference path="./cy-bluebird.d.ts" />
|
12
|
+
/// <reference path="./cy-moment.d.ts" />
|
13
|
+
/// <reference path="./cy-minimatch.d.ts" />
|
14
|
+
/// <reference path="./cy-chai.d.ts" />
|
15
|
+
/// <reference path="./lodash/index.d.ts" />
|
16
|
+
/// <reference path="./sinon/index.d.ts" />
|
17
|
+
/// <reference path="./sinon-chai/index.d.ts" />
|
18
|
+
/// <reference path="./mocha/index.d.ts" />
|
19
|
+
/// <reference path="./jquery/index.d.ts" />
|
20
|
+
/// <reference path="./chai-jquery/index.d.ts" />
|
21
|
+
|
22
|
+
// "moment" types are with "node_modules/moment"
|
20
23
|
/// <reference types="moment" />
|
21
|
-
|
22
|
-
|
24
|
+
|
25
|
+
// load ambient declaration for "cypress" NPM module
|
26
|
+
// hmm, how to load it better?
|
27
|
+
/// <reference path="./cypress-npm-api.d.ts" />
|
23
28
|
|
24
29
|
// Cypress adds chai expect and assert to global
|
25
30
|
declare const expect: Chai.ExpectStatic
|
@@ -28,7 +33,7 @@ declare const assert: Chai.AssertStatic
|
|
28
33
|
declare namespace Cypress {
|
29
34
|
type FileContents = string | any[] | object
|
30
35
|
type HistoryDirection = "back" | "forward"
|
31
|
-
type HttpMethod =
|
36
|
+
type HttpMethod = string
|
32
37
|
type RequestBody = string | object
|
33
38
|
type ViewportOrientation = "portrait" | "landscape"
|
34
39
|
type PrevSubject = "optional" | "element" | "document" | "window"
|
@@ -57,6 +62,20 @@ declare namespace Cypress {
|
|
57
62
|
isHeadless: boolean
|
58
63
|
}
|
59
64
|
|
65
|
+
interface LocalStorage {
|
66
|
+
/**
|
67
|
+
* Called internally to clear `localStorage` in two situations.
|
68
|
+
*
|
69
|
+
* 1. Before every test, this is called with no argument to clear all keys.
|
70
|
+
* 2. On `cy.clearLocalStorage(keys)` this is called with `keys` as an argument.
|
71
|
+
*
|
72
|
+
* You should not call this method directly to clear `localStorage`; instead, use `cy.clearLocalStorage(key)`.
|
73
|
+
*
|
74
|
+
* @see https://on.cypress.io/clearlocalstorage
|
75
|
+
*/
|
76
|
+
clear: (keys?: string[]) => void
|
77
|
+
}
|
78
|
+
|
60
79
|
/**
|
61
80
|
* Several libraries are bundled with Cypress by default.
|
62
81
|
*
|
@@ -93,7 +112,7 @@ declare namespace Cypress {
|
|
93
112
|
*
|
94
113
|
* @see https://on.cypress.io/minimatch
|
95
114
|
*/
|
96
|
-
minimatch:
|
115
|
+
minimatch: typeof Minimatch.minimatch
|
97
116
|
/**
|
98
117
|
* Cypress automatically includes moment.js and exposes it as Cypress.moment.
|
99
118
|
*
|
@@ -116,10 +135,12 @@ declare namespace Cypress {
|
|
116
135
|
* Cypress version string. i.e. "1.1.2"
|
117
136
|
* @see https://on.cypress.io/version
|
118
137
|
* @example
|
119
|
-
|
120
|
-
|
121
|
-
|
122
|
-
|
138
|
+
```
|
139
|
+
expect(Cypress.version).to.be.a('string')
|
140
|
+
if (Cypress.version === '1.2.0') {
|
141
|
+
// test something specific
|
142
|
+
}
|
143
|
+
```
|
123
144
|
*/
|
124
145
|
version: string
|
125
146
|
|
@@ -143,6 +164,15 @@ declare namespace Cypress {
|
|
143
164
|
|
144
165
|
/**
|
145
166
|
* Currently executing spec file.
|
167
|
+
* @example
|
168
|
+
```
|
169
|
+
Cypress.spec
|
170
|
+
// {
|
171
|
+
// name: "config_passing_spec.coffee",
|
172
|
+
// relative: "cypress/integration/config_passing_spec.coffee",
|
173
|
+
// absolute: "/users/smith/projects/web/cypress/integration/config_passing_spec.coffee"
|
174
|
+
// }
|
175
|
+
```
|
146
176
|
*/
|
147
177
|
spec: {
|
148
178
|
name: string // "config_passing_spec.coffee"
|
@@ -156,11 +186,50 @@ declare namespace Cypress {
|
|
156
186
|
browser: Browser
|
157
187
|
|
158
188
|
/**
|
189
|
+
* Internal class for LocalStorage management.
|
190
|
+
*/
|
191
|
+
LocalStorage: LocalStorage
|
192
|
+
|
193
|
+
/**
|
194
|
+
* Returns all configuration objects.
|
159
195
|
* @see https://on.cypress.io/config
|
196
|
+
* @example
|
197
|
+
```
|
198
|
+
Cypress.config()
|
199
|
+
// {defaultCommandTimeout: 10000, pageLoadTimeout: 30000, ...}
|
200
|
+
```
|
160
201
|
*/
|
161
202
|
config(): ConfigOptions
|
203
|
+
/**
|
204
|
+
* Returns one configuration value.
|
205
|
+
* @see https://on.cypress.io/config
|
206
|
+
* @example
|
207
|
+
```
|
208
|
+
Cypress.config('pageLoadTimeout')
|
209
|
+
// 60000
|
210
|
+
```
|
211
|
+
*/
|
162
212
|
config<K extends keyof ConfigOptions>(key: K): ConfigOptions[K]
|
213
|
+
/**
|
214
|
+
* Sets one configuration value.
|
215
|
+
* @see https://on.cypress.io/config
|
216
|
+
* @example
|
217
|
+
```
|
218
|
+
Cypress.config('viewportWidth', 800)
|
219
|
+
```
|
220
|
+
*/
|
163
221
|
config<K extends keyof ConfigOptions>(key: K, value: ConfigOptions[K]): void
|
222
|
+
/**
|
223
|
+
* Sets multiple configuration values at once.
|
224
|
+
* @see https://on.cypress.io/config
|
225
|
+
* @example
|
226
|
+
```
|
227
|
+
Cypress.config({
|
228
|
+
defaultCommandTimeout: 10000,
|
229
|
+
viewportHeight: 900
|
230
|
+
})
|
231
|
+
```
|
232
|
+
*/
|
164
233
|
config(Object: Partial<ConfigOptions>): void
|
165
234
|
|
166
235
|
// no real way to type without generics
|
@@ -195,6 +264,16 @@ declare namespace Cypress {
|
|
195
264
|
*/
|
196
265
|
env(object: ObjectLike): void
|
197
266
|
|
267
|
+
/**
|
268
|
+
* Checks if a variable is a valid instance of `cy` or a `cy` chainable.
|
269
|
+
*
|
270
|
+
* @see https://on.cypress.io/iscy
|
271
|
+
* @example
|
272
|
+
* Cypress.isCy(cy) // => true
|
273
|
+
*/
|
274
|
+
isCy<TSubject = any>(obj: Chainable<TSubject>): obj is Chainable<TSubject>
|
275
|
+
isCy(obj: any): obj is Chainable
|
276
|
+
|
198
277
|
/**
|
199
278
|
* Internal options for "cy.log" used in custom commands.
|
200
279
|
*
|
@@ -277,16 +356,20 @@ declare namespace Cypress {
|
|
277
356
|
* @see https://on.cypress.io/variables-and-aliases
|
278
357
|
* @see https://on.cypress.io/get
|
279
358
|
* @example
|
280
|
-
|
281
|
-
|
282
|
-
|
283
|
-
|
284
|
-
|
359
|
+
```
|
360
|
+
// Get the aliased ‘todos’ elements
|
361
|
+
cy.get('ul#todos').as('todos')
|
362
|
+
//...hack hack hack...
|
363
|
+
// later retrieve the todos
|
364
|
+
cy.get('@todos')
|
365
|
+
```
|
285
366
|
*/
|
286
367
|
as(alias: string): Chainable<Subject>
|
287
368
|
|
288
369
|
/**
|
289
|
-
* Blur a focused element. This element must currently be in focus.
|
370
|
+
* Blur a focused element. This element must currently be in focus.
|
371
|
+
* If you want to ensure an element is focused before blurring,
|
372
|
+
* try using .focus() before .blur().
|
290
373
|
*
|
291
374
|
* @see https://on.cypress.io/blur
|
292
375
|
*/
|
@@ -355,19 +438,29 @@ declare namespace Cypress {
|
|
355
438
|
* to clear localStorage inside a single test. Yields `localStorage` object.
|
356
439
|
*
|
357
440
|
* @see https://on.cypress.io/clearlocalstorage
|
358
|
-
* @
|
359
|
-
*
|
360
|
-
|
361
|
-
|
441
|
+
* @param {string} [key] - name of a particular item to remove (optional).
|
442
|
+
* @example
|
443
|
+
```
|
444
|
+
// removes all local storage keys
|
445
|
+
cy.clearLocalStorage()
|
446
|
+
.should(ls => {
|
447
|
+
expect(ls.getItem('prop1')).to.be.null
|
448
|
+
})
|
449
|
+
// removes item "todos"
|
450
|
+
cy.clearLocalStorage("todos")
|
451
|
+
```
|
362
452
|
*/
|
363
453
|
clearLocalStorage(key?: string): Chainable<Storage>
|
364
454
|
/**
|
365
455
|
* Clear keys in local storage that match given regular expression.
|
366
456
|
*
|
367
457
|
* @see https://on.cypress.io/clearlocalstorage
|
458
|
+
* @param {RegExp} re - regular expression to match.
|
368
459
|
* @example
|
369
|
-
|
370
|
-
|
460
|
+
```
|
461
|
+
// Clear all local storage matching /app-/
|
462
|
+
cy.clearLocalStorage(/app-/)
|
463
|
+
```
|
371
464
|
*/
|
372
465
|
clearLocalStorage(re: RegExp): Chainable<Storage>
|
373
466
|
|
@@ -384,7 +477,8 @@ declare namespace Cypress {
|
|
384
477
|
/**
|
385
478
|
* Click a DOM element at specific corner / side.
|
386
479
|
*
|
387
|
-
* @param {String} position The position where the click should be issued.
|
480
|
+
* @param {String} position - The position where the click should be issued.
|
481
|
+
* The `center` position is the default position.
|
388
482
|
* @see https://on.cypress.io/click
|
389
483
|
* @example
|
390
484
|
* cy.get('button').click('topRight')
|
@@ -397,9 +491,11 @@ declare namespace Cypress {
|
|
397
491
|
* @param {number} y The distance in pixels from the element’s top to issue the click.
|
398
492
|
* @see https://on.cypress.io/click
|
399
493
|
* @example
|
400
|
-
|
401
|
-
|
402
|
-
|
494
|
+
```
|
495
|
+
// The click below will be issued inside of the element
|
496
|
+
// (15px from the left and 40px from the top).
|
497
|
+
cy.get('button').click(15, 40)
|
498
|
+
```
|
403
499
|
*/
|
404
500
|
click(x: number, y: number, options?: Partial<ClickOptions>): Chainable<Subject>
|
405
501
|
|
@@ -443,7 +539,7 @@ declare namespace Cypress {
|
|
443
539
|
* // keep current date but override "setTimeout" and "clearTimeout"
|
444
540
|
* cy.clock(null, ['setTimeout', 'clearTimeout'])
|
445
541
|
*/
|
446
|
-
clock(now: number, functions?: Array<'setTimeout' | 'clearTimeout' | 'setInterval' | 'clearInterval'>, options?: Loggable): Chainable<Clock>
|
542
|
+
clock(now: number, functions?: Array<'setTimeout' | 'clearTimeout' | 'setInterval' | 'clearInterval' | 'Date'>, options?: Loggable): Chainable<Clock>
|
447
543
|
/**
|
448
544
|
* Mocks global clock and all functions.
|
449
545
|
*
|
@@ -623,9 +719,11 @@ declare namespace Cypress {
|
|
623
719
|
fixture<Contents = any>(path: string, encoding: Encodings, options?: Partial<Timeoutable>): Chainable<Contents> // no log?
|
624
720
|
|
625
721
|
/**
|
626
|
-
*
|
722
|
+
* Focus on a DOM element.
|
627
723
|
*
|
628
724
|
* @see https://on.cypress.io/focus
|
725
|
+
* @example
|
726
|
+
* cy.get('input').first().focus() // Focus on the first input
|
629
727
|
*/
|
630
728
|
focus(options?: Partial<Loggable & Timeoutable>): Chainable<Subject>
|
631
729
|
|
@@ -701,7 +799,7 @@ declare namespace Cypress {
|
|
701
799
|
*
|
702
800
|
* @see https://on.cypress.io/hash
|
703
801
|
*/
|
704
|
-
hash(options?: Partial<Loggable>): Chainable<string>
|
802
|
+
hash(options?: Partial<Loggable & Timeoutable>): Chainable<string>
|
705
803
|
|
706
804
|
/**
|
707
805
|
* Invoke a function on the previously yielded subject.
|
@@ -1327,19 +1425,37 @@ declare namespace Cypress {
|
|
1327
1425
|
*
|
1328
1426
|
* @see https://on.cypress.io/then
|
1329
1427
|
*/
|
1330
|
-
then<S>(fn: (this: ObjectLike, currentSubject: Subject) => Chainable<S
|
1428
|
+
then<S>(fn: (this: ObjectLike, currentSubject: Subject) => Chainable<S>): Chainable<S>
|
1429
|
+
/**
|
1430
|
+
* Enables you to work with the subject yielded from the previous command.
|
1431
|
+
*
|
1432
|
+
* @see https://on.cypress.io/then
|
1433
|
+
*/
|
1434
|
+
then<S>(options: Partial<Timeoutable>, fn: (this: ObjectLike, currentSubject: Subject) => Chainable<S>): Chainable<S>
|
1435
|
+
/**
|
1436
|
+
* Enables you to work with the subject yielded from the previous command / promise.
|
1437
|
+
*
|
1438
|
+
* @see https://on.cypress.io/then
|
1439
|
+
*/
|
1440
|
+
then<S>(fn: (this: ObjectLike, currentSubject: Subject) => PromiseLike<S>): Chainable<S>
|
1441
|
+
/**
|
1442
|
+
* Enables you to work with the subject yielded from the previous command / promise.
|
1443
|
+
*
|
1444
|
+
* @see https://on.cypress.io/then
|
1445
|
+
*/
|
1446
|
+
then<S>(options: Partial<Timeoutable>, fn: (this: ObjectLike, currentSubject: Subject) => PromiseLike<S>): Chainable<S>
|
1331
1447
|
/**
|
1332
1448
|
* Enables you to work with the subject yielded from the previous command / promise.
|
1333
1449
|
*
|
1334
1450
|
* @see https://on.cypress.io/then
|
1335
1451
|
*/
|
1336
|
-
then<S>(fn: (this: ObjectLike, currentSubject: Subject) =>
|
1452
|
+
then<S extends object | any[] | string | number | boolean>(fn: (this: ObjectLike, currentSubject: Subject) => S): Chainable<S>
|
1337
1453
|
/**
|
1338
1454
|
* Enables you to work with the subject yielded from the previous command / promise.
|
1339
1455
|
*
|
1340
1456
|
* @see https://on.cypress.io/then
|
1341
1457
|
*/
|
1342
|
-
then<S extends object | any[] | string | number | boolean>(fn: (this: ObjectLike, currentSubject: Subject) => S
|
1458
|
+
then<S extends object | any[] | string | number | boolean>(options: Partial<Timeoutable>, fn: (this: ObjectLike, currentSubject: Subject) => S): Chainable<S>
|
1343
1459
|
/**
|
1344
1460
|
* Enables you to work with the subject yielded from the previous command.
|
1345
1461
|
*
|
@@ -1348,7 +1464,16 @@ declare namespace Cypress {
|
|
1348
1464
|
* cy.get('.nav').then(($nav) => {}) // Yields .nav as first arg
|
1349
1465
|
* cy.location().then((loc) => {}) // Yields location object as first arg
|
1350
1466
|
*/
|
1351
|
-
then(fn: (this: ObjectLike, currentSubject: Subject) => void
|
1467
|
+
then(fn: (this: ObjectLike, currentSubject: Subject) => void): Chainable<Subject>
|
1468
|
+
/**
|
1469
|
+
* Enables you to work with the subject yielded from the previous command.
|
1470
|
+
*
|
1471
|
+
* @see https://on.cypress.io/then
|
1472
|
+
* @example
|
1473
|
+
* cy.get('.nav').then(($nav) => {}) // Yields .nav as first arg
|
1474
|
+
* cy.location().then((loc) => {}) // Yields location object as first arg
|
1475
|
+
*/
|
1476
|
+
then(options: Partial<Timeoutable>, fn: (this: ObjectLike, currentSubject: Subject) => void): Chainable<Subject>
|
1352
1477
|
|
1353
1478
|
/**
|
1354
1479
|
* Move time after overriding a native time function with [cy.clock()](https://on.cypress.io/clock).
|
@@ -1370,19 +1495,19 @@ declare namespace Cypress {
|
|
1370
1495
|
*
|
1371
1496
|
* @see https://on.cypress.io/trigger
|
1372
1497
|
*/
|
1373
|
-
trigger<K extends keyof DocumentEventMap>(eventName: K, options?: Partial<TriggerOptions & DocumentEventMap[K]>): Chainable<Subject>
|
1498
|
+
trigger<K extends keyof DocumentEventMap>(eventName: K, options?: Partial<TriggerOptions & ObjectLike & DocumentEventMap[K]>): Chainable<Subject>
|
1374
1499
|
/**
|
1375
1500
|
* Trigger an event on a DOM element.
|
1376
1501
|
*
|
1377
1502
|
* @see https://on.cypress.io/trigger
|
1378
1503
|
*/
|
1379
|
-
trigger<K extends keyof DocumentEventMap>(eventName: K, position?: PositionType, options?: Partial<TriggerOptions & DocumentEventMap[K]>): Chainable<Subject>
|
1504
|
+
trigger<K extends keyof DocumentEventMap>(eventName: K, position?: PositionType, options?: Partial<TriggerOptions & ObjectLike & DocumentEventMap[K]>): Chainable<Subject>
|
1380
1505
|
/**
|
1381
1506
|
* Trigger an event on a DOM element.
|
1382
1507
|
*
|
1383
1508
|
* @see https://on.cypress.io/trigger
|
1384
1509
|
*/
|
1385
|
-
trigger<K extends keyof DocumentEventMap>(eventName: K, x: number, y: number, options?: Partial<TriggerOptions & DocumentEventMap[K]>): Chainable<Subject>
|
1510
|
+
trigger<K extends keyof DocumentEventMap>(eventName: K, x: number, y: number, options?: Partial<TriggerOptions & ObjectLike & DocumentEventMap[K]>): Chainable<Subject>
|
1386
1511
|
/**
|
1387
1512
|
* Trigger an event on a DOM element.
|
1388
1513
|
* Custom events... If the following were `.triggerCustom`,
|
@@ -1392,7 +1517,7 @@ declare namespace Cypress {
|
|
1392
1517
|
* @example
|
1393
1518
|
* cy.get('a').trigger('mousedown')
|
1394
1519
|
*/
|
1395
|
-
trigger(eventName: string, position?: PositionType, options?: Partial<TriggerOptions>): Chainable<Subject>
|
1520
|
+
trigger(eventName: string, position?: PositionType, options?: Partial<TriggerOptions & ObjectLike>): Chainable<Subject>
|
1396
1521
|
/**
|
1397
1522
|
* Trigger an event on a DOM element.
|
1398
1523
|
* Custom events... If the following were `.triggerCustom`,
|
@@ -1412,7 +1537,7 @@ declare namespace Cypress {
|
|
1412
1537
|
* @example
|
1413
1538
|
* cy.get('a').trigger('mousedown')
|
1414
1539
|
*/
|
1415
|
-
trigger(eventName: string, x: number, y: number, options?: Partial<TriggerOptions>): Chainable<Subject>
|
1540
|
+
trigger(eventName: string, x: number, y: number, options?: Partial<TriggerOptions & ObjectLike>): Chainable<Subject>
|
1416
1541
|
|
1417
1542
|
/**
|
1418
1543
|
* Type into a DOM element.
|
@@ -1497,14 +1622,22 @@ declare namespace Cypress {
|
|
1497
1622
|
* @example
|
1498
1623
|
* cy.visit('http://localhost:3000')
|
1499
1624
|
* cy.visit('/somewhere') // opens ${baseUrl}/somewhere
|
1625
|
+
* cy.visit({
|
1626
|
+
* url: 'http://google.com',
|
1627
|
+
* method: 'POST'
|
1628
|
+
* })
|
1500
1629
|
*
|
1501
1630
|
*/
|
1502
1631
|
visit(url: string, options?: Partial<VisitOptions>): Chainable<Window>
|
1632
|
+
visit(options: Partial<VisitOptions> & { url: string }): Chainable<Window>
|
1503
1633
|
|
1504
1634
|
/**
|
1505
|
-
* Wait for a number of milliseconds
|
1635
|
+
* Wait for a number of milliseconds.
|
1636
|
+
* You almost never need to wait for an arbitrary period of time.
|
1637
|
+
* There are always better ways to express this in Cypress, see the documentation.
|
1506
1638
|
*
|
1507
1639
|
* @see https://on.cypress.io/wait
|
1640
|
+
* @param {number} ms - Milliseconds to wait.
|
1508
1641
|
* @example
|
1509
1642
|
* cy.wait(1000) // wait for 1 second
|
1510
1643
|
*/
|
@@ -1513,12 +1646,44 @@ declare namespace Cypress {
|
|
1513
1646
|
* Wait for a specific XHR to respond.
|
1514
1647
|
*
|
1515
1648
|
* @see https://on.cypress.io/wait
|
1649
|
+
* @param {string} alias - Name of the alias to wait for.
|
1650
|
+
*
|
1651
|
+
```
|
1652
|
+
// Wait for the route aliased as 'getAccount' to respond
|
1653
|
+
// without changing or stubbing its response
|
1654
|
+
cy.server()
|
1655
|
+
cy.route('/accounts/*').as('getAccount')
|
1656
|
+
cy.visit('/accounts/123')
|
1657
|
+
cy.wait('@getAccount').then((xhr) => {
|
1658
|
+
// we can now access the low level xhr
|
1659
|
+
// that contains the request body,
|
1660
|
+
// response body, status, etc
|
1661
|
+
})
|
1662
|
+
```
|
1516
1663
|
*/
|
1517
1664
|
wait(alias: string, options?: Partial<Loggable & Timeoutable & TimeoutableXHR>): Chainable<WaitXHR>
|
1518
1665
|
/**
|
1519
1666
|
* Wait for list of XHR requests to complete.
|
1520
1667
|
*
|
1521
1668
|
* @see https://on.cypress.io/wait
|
1669
|
+
* @param {string[]} aliases - An array of aliased routes as defined using the `.as()` command.
|
1670
|
+
*
|
1671
|
+
```
|
1672
|
+
// wait for 3 XHR requests to complete
|
1673
|
+
cy.server()
|
1674
|
+
cy.route('users/*').as('getUsers')
|
1675
|
+
cy.route('activities/*').as('getActivities')
|
1676
|
+
cy.route('comments/*').as('getComments')
|
1677
|
+
cy.visit('/dashboard')
|
1678
|
+
|
1679
|
+
cy.wait(['@getUsers', '@getActivities', '@getComments'])
|
1680
|
+
.then((xhrs) => {
|
1681
|
+
// xhrs will now be an array of matching XHR's
|
1682
|
+
// xhrs[0] <-- getUsers
|
1683
|
+
// xhrs[1] <-- getActivities
|
1684
|
+
// xhrs[2] <-- getComments
|
1685
|
+
})
|
1686
|
+
```
|
1522
1687
|
*/
|
1523
1688
|
wait(alias: string[], options?: Partial<Loggable & Timeoutable & TimeoutableXHR>): Chainable<WaitXHR[]>
|
1524
1689
|
|
@@ -1527,11 +1692,13 @@ declare namespace Cypress {
|
|
1527
1692
|
*
|
1528
1693
|
* @see https://on.cypress.io/window
|
1529
1694
|
* @example
|
1530
|
-
|
1531
|
-
|
1532
|
-
|
1533
|
-
|
1534
|
-
|
1695
|
+
```
|
1696
|
+
cy.visit('http://localhost:8080/app')
|
1697
|
+
cy.window().then(function(win){
|
1698
|
+
// win is the remote window
|
1699
|
+
// of the page at: http://localhost:8080/app
|
1700
|
+
})
|
1701
|
+
```
|
1535
1702
|
*/
|
1536
1703
|
window(options?: Partial<Loggable & Timeoutable>): Chainable<Window>
|
1537
1704
|
|
@@ -1540,14 +1707,15 @@ declare namespace Cypress {
|
|
1540
1707
|
* Useful when working within a particular group of elements such as a `<form>`.
|
1541
1708
|
* @see https://on.cypress.io/within
|
1542
1709
|
* @example
|
1543
|
-
|
1544
|
-
|
1545
|
-
|
1546
|
-
|
1547
|
-
|
1548
|
-
|
1549
|
-
|
1550
|
-
|
1710
|
+
```
|
1711
|
+
cy.get('form').within(($form) => {
|
1712
|
+
// cy.get() will only search for elements within form,
|
1713
|
+
// not within the entire document
|
1714
|
+
cy.get('input[name="username"]').type('john')
|
1715
|
+
cy.get('input[name="password"]').type('password')
|
1716
|
+
cy.root().submit()
|
1717
|
+
})
|
1718
|
+
```
|
1551
1719
|
*/
|
1552
1720
|
within(fn: (currentSubject: Subject) => void): Chainable<Subject>
|
1553
1721
|
/**
|
@@ -1562,10 +1730,13 @@ declare namespace Cypress {
|
|
1562
1730
|
*
|
1563
1731
|
* @see https://on.cypress.io/wrap
|
1564
1732
|
* @example
|
1565
|
-
|
1566
|
-
|
1567
|
-
|
1568
|
-
|
1733
|
+
```
|
1734
|
+
// wraps DOM element
|
1735
|
+
cy.get('form').within(($form) => {
|
1736
|
+
// more commands
|
1737
|
+
cy.wrap($form).should('have.class', 'form-container')
|
1738
|
+
})
|
1739
|
+
```
|
1569
1740
|
*/
|
1570
1741
|
wrap<E extends Node = HTMLElement>(element: E | JQuery<E>, options?: Partial<Loggable & Timeoutable>): Chainable<JQuery<E>>
|
1571
1742
|
/**
|
@@ -1573,9 +1744,11 @@ declare namespace Cypress {
|
|
1573
1744
|
*
|
1574
1745
|
* @see https://on.cypress.io/wrap
|
1575
1746
|
* @example
|
1576
|
-
|
1577
|
-
|
1578
|
-
|
1747
|
+
```
|
1748
|
+
cy.wrap(new Promise((resolve, reject) => {
|
1749
|
+
setTimeout(resolve, 1000);
|
1750
|
+
}).then(result => {})
|
1751
|
+
```
|
1579
1752
|
*/
|
1580
1753
|
wrap<F extends Promise<S>, S>(promise: F, options?: Partial<Loggable & Timeoutable>): Chainable<S>
|
1581
1754
|
/**
|
@@ -1583,10 +1756,12 @@ declare namespace Cypress {
|
|
1583
1756
|
*
|
1584
1757
|
* @see https://on.cypress.io/wrap
|
1585
1758
|
* @example
|
1586
|
-
|
1587
|
-
|
1588
|
-
|
1589
|
-
|
1759
|
+
```
|
1760
|
+
// Make assertions about object
|
1761
|
+
cy.wrap({ amount: 10 })
|
1762
|
+
.should('have.property', 'amount')
|
1763
|
+
.and('eq', 10)
|
1764
|
+
```
|
1590
1765
|
*/
|
1591
1766
|
wrap<S>(object: S, options?: Partial<Loggable & Timeoutable>): Chainable<S>
|
1592
1767
|
|
@@ -1594,6 +1769,12 @@ declare namespace Cypress {
|
|
1594
1769
|
* Write to a file with the specified contents.
|
1595
1770
|
*
|
1596
1771
|
* @see https://on.cypress.io/writefile
|
1772
|
+
```
|
1773
|
+
cy.writeFile('path/to/message.txt', 'Hello World')
|
1774
|
+
.then((text) => {
|
1775
|
+
expect(text).to.equal('Hello World') // true
|
1776
|
+
})
|
1777
|
+
```
|
1597
1778
|
*/
|
1598
1779
|
writeFile<C extends FileContents>(filePath: string, contents: C, options?: Partial<Loggable>): Chainable<C>
|
1599
1780
|
/**
|
@@ -1632,6 +1813,29 @@ declare namespace Cypress {
|
|
1632
1813
|
whitelist: string | string[] | RegExp | ((cookie: any) => boolean)
|
1633
1814
|
}
|
1634
1815
|
|
1816
|
+
interface Failable {
|
1817
|
+
/**
|
1818
|
+
* Whether to fail on response codes other than 2xx and 3xx
|
1819
|
+
*
|
1820
|
+
* @default {true}
|
1821
|
+
*/
|
1822
|
+
failOnStatusCode: boolean
|
1823
|
+
|
1824
|
+
/**
|
1825
|
+
* Whether Cypress should automatically retry status code errors under the hood
|
1826
|
+
*
|
1827
|
+
* @default {false}
|
1828
|
+
*/
|
1829
|
+
retryOnStatusCodeFailure: boolean
|
1830
|
+
|
1831
|
+
/**
|
1832
|
+
* Whether Cypress should automatically retry transient network errors under the hood
|
1833
|
+
*
|
1834
|
+
* @default {true}
|
1835
|
+
*/
|
1836
|
+
retryOnNetworkFailure: boolean
|
1837
|
+
}
|
1838
|
+
|
1635
1839
|
/**
|
1636
1840
|
* Options that control how a command is logged in the Reporter
|
1637
1841
|
*/
|
@@ -1882,10 +2086,9 @@ declare namespace Cypress {
|
|
1882
2086
|
/**
|
1883
2087
|
* Full set of possible options for cy.request call
|
1884
2088
|
*/
|
1885
|
-
interface RequestOptions extends Loggable, Timeoutable {
|
2089
|
+
interface RequestOptions extends Loggable, Timeoutable, Failable {
|
1886
2090
|
auth: object
|
1887
2091
|
body: RequestBody
|
1888
|
-
failOnStatusCode: boolean
|
1889
2092
|
followRedirect: boolean
|
1890
2093
|
form: boolean
|
1891
2094
|
gzip: boolean
|
@@ -2015,7 +2218,47 @@ declare namespace Cypress {
|
|
2015
2218
|
*
|
2016
2219
|
* @see https://on.cypress.io/visit
|
2017
2220
|
*/
|
2018
|
-
interface VisitOptions extends Loggable, Timeoutable {
|
2221
|
+
interface VisitOptions extends Loggable, Timeoutable, Failable {
|
2222
|
+
/**
|
2223
|
+
* The URL to visit. Behaves the same as the `url` argument.
|
2224
|
+
*/
|
2225
|
+
url: string
|
2226
|
+
|
2227
|
+
/**
|
2228
|
+
* The HTTP method to use in the visit. Can be `GET` or `POST`.
|
2229
|
+
*
|
2230
|
+
* @default "GET"
|
2231
|
+
*/
|
2232
|
+
method: 'GET' | 'POST'
|
2233
|
+
|
2234
|
+
/**
|
2235
|
+
* An optional body to send along with a `POST` request. If it is a string, it will be passed along unmodified. If it is an object, it will be URL encoded to a string and sent with a `Content-Type: application/x-www-urlencoded` header.
|
2236
|
+
*
|
2237
|
+
* @example
|
2238
|
+
* cy.visit({
|
2239
|
+
* url: 'http://www.example.com/form.html',
|
2240
|
+
* method: 'POST',
|
2241
|
+
* body: {
|
2242
|
+
* "field1": "foo",
|
2243
|
+
* "field2": "bar"
|
2244
|
+
* }
|
2245
|
+
* })
|
2246
|
+
*/
|
2247
|
+
body: RequestBody
|
2248
|
+
|
2249
|
+
/**
|
2250
|
+
* An object that maps HTTP header names to values to be sent along with the request.
|
2251
|
+
*
|
2252
|
+
* @example
|
2253
|
+
* cy.visit({
|
2254
|
+
* url: 'http://www.example.com',
|
2255
|
+
* headers: {
|
2256
|
+
* 'Accept-Language': 'en-US'
|
2257
|
+
* }
|
2258
|
+
* })
|
2259
|
+
*/
|
2260
|
+
headers: { [header: string]: string }
|
2261
|
+
|
2019
2262
|
/**
|
2020
2263
|
* Called before your page has loaded all of its resources.
|
2021
2264
|
*
|
@@ -2030,13 +2273,6 @@ declare namespace Cypress {
|
|
2030
2273
|
*/
|
2031
2274
|
onLoad(win: Window): void
|
2032
2275
|
|
2033
|
-
/**
|
2034
|
-
* Whether to fail on response codes other than 2xx and 3xx
|
2035
|
-
*
|
2036
|
-
* @default {true}
|
2037
|
-
*/
|
2038
|
-
failOnStatusCode: boolean
|
2039
|
-
|
2040
2276
|
/**
|
2041
2277
|
* Cypress will automatically apply the right authorization headers
|
2042
2278
|
* if you’re attempting to visit an application that requires
|
@@ -2068,7 +2304,7 @@ declare namespace Cypress {
|
|
2068
2304
|
*
|
2069
2305
|
* @default true
|
2070
2306
|
*/
|
2071
|
-
|
2307
|
+
cancelable: boolean
|
2072
2308
|
}
|
2073
2309
|
|
2074
2310
|
// Kind of onerous, but has a nice auto-complete. Also fallbacks at the end for custom stuff
|
@@ -2534,7 +2770,7 @@ declare namespace Cypress {
|
|
2534
2770
|
* @see http://chaijs.com/api/bdd/#method_match
|
2535
2771
|
* @see https://on.cypress.io/assertions
|
2536
2772
|
*/
|
2537
|
-
(chainer: 'match', value:
|
2773
|
+
(chainer: 'match', value: RegExp): Chainable<Subject>
|
2538
2774
|
/**
|
2539
2775
|
* When the target is a non-function object, `.respondTo` asserts that the target has a `method` with the given name method. The method can be own or inherited, and it can be enumerable or non-enumerable.
|
2540
2776
|
* @example
|
@@ -3034,7 +3270,7 @@ declare namespace Cypress {
|
|
3034
3270
|
* @see http://chaijs.com/api/bdd/#method_match
|
3035
3271
|
* @see https://on.cypress.io/assertions
|
3036
3272
|
*/
|
3037
|
-
(chainer: 'not.match', value:
|
3273
|
+
(chainer: 'not.match', value: RegExp): Chainable<Subject>
|
3038
3274
|
/**
|
3039
3275
|
* When the target is a non-function object, `.respondTo` asserts that the target does not have a `method` with the given name method. The method can be own or inherited, and it can be enumerable or non-enumerable.
|
3040
3276
|
* @example
|
@@ -3357,6 +3593,22 @@ declare namespace Cypress {
|
|
3357
3593
|
* @see https://on.cypress.io/assertions
|
3358
3594
|
*/
|
3359
3595
|
(chainer: 'contain', value: string): Chainable<Subject>
|
3596
|
+
/**
|
3597
|
+
* Assert that at least one element of the selection is focused.
|
3598
|
+
* @example
|
3599
|
+
* cy.get('#result').should('have.focus')
|
3600
|
+
* cy.get('#result').should('be.focused')
|
3601
|
+
* @see https://on.cypress.io/assertions
|
3602
|
+
*/
|
3603
|
+
(chainer: 'have.focus'): Chainable<Subject>
|
3604
|
+
/**
|
3605
|
+
* Assert that at least one element of the selection is focused.
|
3606
|
+
* @example
|
3607
|
+
* cy.get('#result').should('be.focused')
|
3608
|
+
* cy.get('#result').should('have.focus')
|
3609
|
+
* @see https://on.cypress.io/assertions
|
3610
|
+
*/
|
3611
|
+
(chainer: 'be.focused'): Chainable<Subject>
|
3360
3612
|
/**
|
3361
3613
|
* Assert that the selection is not empty. Note that this overrides the built-in chai assertion. If the object asserted against is not a jQuery object, the original implementation will be called.
|
3362
3614
|
* @example
|
@@ -3513,6 +3765,22 @@ declare namespace Cypress {
|
|
3513
3765
|
* @see https://on.cypress.io/assertions
|
3514
3766
|
*/
|
3515
3767
|
(chainer: 'not.be.visible'): Chainable<Subject>
|
3768
|
+
/**
|
3769
|
+
* Assert that no element of the selection is focused.
|
3770
|
+
* @example
|
3771
|
+
* cy.get('#result').should('not.have.focus')
|
3772
|
+
* cy.get('#result').should('not.be.focused')
|
3773
|
+
* @see https://on.cypress.io/assertions
|
3774
|
+
*/
|
3775
|
+
(chainer: 'not.have.focus'): Chainable<Subject>
|
3776
|
+
/**
|
3777
|
+
* Assert that no element of the selection is focused.
|
3778
|
+
* @example
|
3779
|
+
* cy.get('#result').should('not.be.focused')
|
3780
|
+
* cy.get('#result').should('not.have.focus')
|
3781
|
+
* @see https://on.cypress.io/assertions
|
3782
|
+
*/
|
3783
|
+
(chainer: 'not.be.focused'): Chainable<Subject>
|
3516
3784
|
/**
|
3517
3785
|
* Assert that the selection does not contain the given text, using `:contains()`. If the object asserted against is not a jQuery object, or if `contain` is not called as a function, the original implementation will be called.
|
3518
3786
|
* @example
|
@@ -3674,26 +3942,28 @@ declare namespace Cypress {
|
|
3674
3942
|
* Fires when an uncaught exception occurs in your application.
|
3675
3943
|
* Cypress will fail the test when this fires.
|
3676
3944
|
* Return `false` from this event and Cypress will not fail the test. Also useful for debugging purposes because the actual `error` instance is provided to you.
|
3677
|
-
* @example
|
3678
|
-
* // likely want to do this in a support file
|
3679
|
-
* // so it's applied to all spec files
|
3680
|
-
* // cypress/support/index.js
|
3681
|
-
*
|
3682
|
-
* Cypress.on('uncaught:exception', (err, runnable) => {
|
3683
|
-
* // returning false here prevents Cypress from
|
3684
|
-
* // failing the test
|
3685
|
-
* return false
|
3686
|
-
* })
|
3687
|
-
* // stub "window.alert" in a single test
|
3688
|
-
* it('shows alert', () => {
|
3689
|
-
* const stub = cy.stub()
|
3690
|
-
* cy.on('window:alert', stub)
|
3691
|
-
* // trigger application code that calls alert(...)
|
3692
|
-
* .then(() => {
|
3693
|
-
* expect(stub).to.have.been.calledOnce
|
3694
|
-
* })
|
3695
|
-
* })
|
3696
3945
|
* @see https://on.cypress.io/catalog-of-events#App-Events
|
3946
|
+
* @example
|
3947
|
+
```
|
3948
|
+
// likely want to do this in a support file
|
3949
|
+
// so it's applied to all spec files
|
3950
|
+
// cypress/support/index.js
|
3951
|
+
|
3952
|
+
Cypress.on('uncaught:exception', (err, runnable) => {
|
3953
|
+
// returning false here prevents Cypress from
|
3954
|
+
// failing the test
|
3955
|
+
return false
|
3956
|
+
})
|
3957
|
+
// stub "window.alert" in a single test
|
3958
|
+
it('shows alert', () => {
|
3959
|
+
const stub = cy.stub()
|
3960
|
+
cy.on('window:alert', stub)
|
3961
|
+
// trigger application code that calls alert(...)
|
3962
|
+
.then(() => {
|
3963
|
+
expect(stub).to.have.been.calledOnce
|
3964
|
+
})
|
3965
|
+
})
|
3966
|
+
```
|
3697
3967
|
*/
|
3698
3968
|
(action: 'uncaught:exception', fn: (error: Error, runnable: Mocha.IRunnable) => false | void): void
|
3699
3969
|
/**
|
@@ -3701,26 +3971,31 @@ declare namespace Cypress {
|
|
3701
3971
|
* Cypress will auto accept confirmations. Return `false` from this event and the confirmation will be cancelled.
|
3702
3972
|
* @see https://on.cypress.io/catalog-of-events#App-Events
|
3703
3973
|
* @example
|
3704
|
-
|
3705
|
-
|
3706
|
-
|
3707
|
-
|
3974
|
+
```
|
3975
|
+
cy.on('window:confirm', (str) => {
|
3976
|
+
console.log(str)
|
3977
|
+
return false // simulate "Cancel"
|
3978
|
+
})
|
3979
|
+
```
|
3708
3980
|
*/
|
3709
|
-
(action: 'window:confirm', fn: ((text: string) => false | void) | Agent<sinon.SinonSpy>): void
|
3981
|
+
(action: 'window:confirm', fn: ((text: string) => false | void) | Agent<sinon.SinonSpy> | Agent<sinon.SinonStub>): void
|
3710
3982
|
/**
|
3711
3983
|
* Fires when your app calls the global `window.alert()` method.
|
3712
3984
|
* Cypress will auto accept alerts. You cannot change this behavior.
|
3713
3985
|
* @example
|
3714
|
-
|
3715
|
-
|
3716
|
-
|
3717
|
-
|
3718
|
-
|
3719
|
-
|
3720
|
-
|
3986
|
+
```
|
3987
|
+
const stub = cy.stub()
|
3988
|
+
cy.on('window:alert', stub)
|
3989
|
+
// assume the button calls window.alert()
|
3990
|
+
cy.get('.my-button')
|
3991
|
+
.click()
|
3992
|
+
.then(() => {
|
3993
|
+
expect(stub).to.have.been.calledOnce
|
3994
|
+
})
|
3995
|
+
```
|
3721
3996
|
* @see https://on.cypress.io/catalog-of-events#App-Events
|
3722
3997
|
*/
|
3723
|
-
(action: 'window:alert', fn: ((text: string) => void) | Agent<sinon.SinonSpy>): void
|
3998
|
+
(action: 'window:alert', fn: ((text: string) => void) | Agent<sinon.SinonSpy> | Agent<sinon.SinonStub>): void
|
3724
3999
|
/**
|
3725
4000
|
* Fires as the page begins to load, but before any of your applications JavaScript has executed. This fires at the exact same time as `cy.visit()` `onBeforeLoad` callback. Useful to modify the window on a page transition.
|
3726
4001
|
* @see https://on.cypress.io/catalog-of-events#App-Events
|
@@ -3931,26 +4206,29 @@ declare namespace Cypress {
|
|
3931
4206
|
left: number
|
3932
4207
|
}
|
3933
4208
|
|
3934
|
-
// Diff
|
3935
|
-
type Diff<T extends string, U extends string> = ({[P in T]: P } & {[P in U]: never } & { [x: string]: never })[T]
|
3936
|
-
|
3937
|
-
type Omit<T, K extends keyof T> = Pick<T, Diff<keyof T, K>> // tslint:disable-line
|
4209
|
+
// Diff taken from https://github.com/Microsoft/TypeScript/issues/12215#issuecomment-311923766
|
4210
|
+
type Diff<T extends string, U extends string> = ({ [P in T]: P } & { [P in U]: never } & { [x: string]: never })[T]
|
4211
|
+
type Omit<T, K extends keyof T> = Pick<T, Exclude<keyof T, K>>
|
3938
4212
|
}
|
3939
4213
|
|
3940
4214
|
/**
|
3941
4215
|
* Global variables `cy` added by Cypress with all API commands.
|
3942
4216
|
* @see https://on.cypress.io/api
|
3943
4217
|
* @example
|
3944
|
-
|
3945
|
-
|
4218
|
+
```
|
4219
|
+
cy.get('button').click()
|
4220
|
+
cy.get('.result').contains('Expected text')
|
4221
|
+
```
|
3946
4222
|
*/
|
3947
4223
|
declare const cy: Cypress.Chainable<undefined>
|
3948
4224
|
/**
|
3949
4225
|
* Global variable `Cypress` holds common utilities and constants.
|
3950
4226
|
* @see https://on.cypress.io/api
|
3951
4227
|
* @example
|
3952
|
-
|
3953
|
-
|
3954
|
-
|
4228
|
+
```
|
4229
|
+
Cypress.config("pageLoadTimeout") // => 60000
|
4230
|
+
Cypress.version // => "1.4.0"
|
4231
|
+
Cypress._ // => Lodash _
|
4232
|
+
```
|
3955
4233
|
*/
|
3956
4234
|
declare const Cypress: Cypress.Cypress
|