From 0d5ff9b9c674974243dce0707fd2b2be72d40be3 Mon Sep 17 00:00:00 2001 From: BlueWinds Date: Mon, 11 Oct 2021 16:19:38 -0700 Subject: [PATCH 01/27] Fix cypress_spec to run permissions test locally --- packages/server/lib/errors.js | 4 ++-- packages/server/lib/scaffold.js | 10 +++++++++- packages/server/test/integration/cypress_spec.js | 16 +++++++--------- 3 files changed, 18 insertions(+), 12 deletions(-) diff --git a/packages/server/lib/errors.js b/packages/server/lib/errors.js index 8574c0bd1984..3191983ac81d 100644 --- a/packages/server/lib/errors.js +++ b/packages/server/lib/errors.js @@ -705,7 +705,7 @@ const getMsgByType = function (type, arg1 = {}, arg2, arg3) { return stripIndent` There is both a \`${arg2}\` and a \`${arg3}\` at the location below: ${arg1} - + Cypress does not know which one to read for config. Please remove one of the two and try again. ` case 'CONFIG_FILE_NOT_FOUND': @@ -988,7 +988,7 @@ const getMsgByType = function (type, arg1 = {}, arg2, arg3) { ` case 'CT_NO_DEV_START_EVENT': return stripIndent`\ - To run component-testing, cypress needs the \`dev-server:start\` event. + To run component-testing, cypress needs the \`dev-server:start\` event. Implement it by adding a \`on('dev-server:start', () => startDevServer())\` call in your pluginsFile. ${arg1 ? diff --git a/packages/server/lib/scaffold.js b/packages/server/lib/scaffold.js index 7f29e59608ef..531ad3c6f5a6 100644 --- a/packages/server/lib/scaffold.js +++ b/packages/server/lib/scaffold.js @@ -7,6 +7,7 @@ const { fs } = require('./util/fs') const glob = require('./util/glob') const cwd = require('./cwd') const debug = require('debug')('cypress:server:scaffold') +const errors = require('./errors') const { isEmpty } = require('ramda') const { isDefault } = require('./util/config') @@ -232,7 +233,6 @@ module.exports = { plugins (folder, config) { debug(`plugins folder ${folder}`) - // skip if user has explicitly set pluginsFile if (!config.pluginsFile || !isDefault(config, 'pluginsFile')) { return Promise.resolve() @@ -254,6 +254,14 @@ module.exports = { return this._assertInFileTree(dest, config) .then(() => { return fs.copyAsync(src, dest) + }).catch((error) => { + if (error.code === 'EACCES') { + const err = errors.get('ERROR_WRITING_FILE', dest, error) + + errors.log(err) + } + + throw error }) }, diff --git a/packages/server/test/integration/cypress_spec.js b/packages/server/test/integration/cypress_spec.js index 0fdb877aa463..3692c449c8c9 100644 --- a/packages/server/test/integration/cypress_spec.js +++ b/packages/server/test/integration/cypress_spec.js @@ -108,6 +108,7 @@ describe('lib/cypress', () => { require('mocha-banner').register() beforeEach(function () { + process.chdir(previousCwd) this.timeout(8000) cache.__removeSync() @@ -839,17 +840,14 @@ describe('lib/cypress', () => { // also make sure we test the rest of the integration functionality // for headed errors! <-- not unit tests, but integration tests! it('logs error and exits when project folder has read permissions only and cannot write cypress.json', function () { - // test disabled if running as root - root can write all things at all times - if (process.geteuid() === 0) { - return - } - const permissionsPath = path.resolve('./permissions') const cypressJson = path.join(permissionsPath, 'cypress.json') - return fs.outputFileAsync(cypressJson, '{}') + return fs.mkdirAsync(permissionsPath) .then(() => { + return fs.outputFileAsync(cypressJson, '{}') + }).then(() => { // read only return fs.chmodAsync(permissionsPath, '555') }).then(() => { @@ -857,9 +855,9 @@ describe('lib/cypress', () => { }).then(() => { return fs.chmodAsync(permissionsPath, '777') }).then(() => { - return fs.removeAsync(permissionsPath) - }).then(() => { - this.expectExitWithErr('ERROR_READING_FILE', path.join(permissionsPath, 'cypress.json')) + this.expectExitWithErr('ERROR_WRITING_FILE', permissionsPath) + }).finally(() => { + return fs.rmdir(permissionsPath, { recursive: true }) }) }) From 4f38ffda0d9b2a294428ca50b595a614a0d2473a Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" <41898282+github-actions[bot]@users.noreply.github.com> Date: Tue, 12 Oct 2021 14:47:46 +0000 Subject: [PATCH 02/27] chore: Update Chrome (stable) to 94.0.4606.81 (#18411) Co-authored-by: cypress-bot[bot] <2f0651858c6e38e0+cypress-bot[bot]@users.noreply.github.com> --- browser-versions.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/browser-versions.json b/browser-versions.json index cc7c3c376625..475da3afb7c2 100644 --- a/browser-versions.json +++ b/browser-versions.json @@ -1,4 +1,4 @@ { "chrome:beta": "95.0.4638.40", - "chrome:stable": "94.0.4606.71" + "chrome:stable": "94.0.4606.81" } From 3e4012a6c3223837af31312d2e371d36b1609d85 Mon Sep 17 00:00:00 2001 From: BlueWinds Date: Tue, 12 Oct 2021 08:50:38 -0700 Subject: [PATCH 03/27] Re-add root check to permissions test --- packages/server/test/integration/cypress_spec.js | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/packages/server/test/integration/cypress_spec.js b/packages/server/test/integration/cypress_spec.js index 3692c449c8c9..c618ff5f8ee4 100644 --- a/packages/server/test/integration/cypress_spec.js +++ b/packages/server/test/integration/cypress_spec.js @@ -840,8 +840,12 @@ describe('lib/cypress', () => { // also make sure we test the rest of the integration functionality // for headed errors! <-- not unit tests, but integration tests! it('logs error and exits when project folder has read permissions only and cannot write cypress.json', function () { - const permissionsPath = path.resolve('./permissions') + // test disabled if running as root (such as inside docker) - root can write all things at all times + if (process.geteuid() === 0) { + return + } + const permissionsPath = path.resolve('./permissions') const cypressJson = path.join(permissionsPath, 'cypress.json') return fs.mkdirAsync(permissionsPath) From bc21574d014d965d507c3736ee5d366c3f6dc223 Mon Sep 17 00:00:00 2001 From: David Munechika Date: Wed, 13 Oct 2021 13:34:29 -0400 Subject: [PATCH 04/27] feat(driver): Add `overwrite` option to `Cypress.Screenshot.defaults` (#18457) --- .../integration/cypress/screenshot_spec.js | 23 +++++++++++++ packages/driver/src/cypress/screenshot.ts | 1 + .../__snapshots__/retries.mochaEvents.spec.js | 4 ++- .../__snapshots__/runner.mochaEvents.spec.js | 1 + .../cypress/integration/screenshots_spec.js | 33 +++++++++++++++++++ 5 files changed, 61 insertions(+), 1 deletion(-) diff --git a/packages/driver/cypress/integration/cypress/screenshot_spec.js b/packages/driver/cypress/integration/cypress/screenshot_spec.js index c6c828d5ce6a..d2be62b8779b 100644 --- a/packages/driver/cypress/integration/cypress/screenshot_spec.js +++ b/packages/driver/cypress/integration/cypress/screenshot_spec.js @@ -3,6 +3,7 @@ const { Screenshot } = Cypress const DEFAULTS = { capture: 'fullPage', scale: false, + overwrite: false, disableTimersAndAnimations: true, screenshotOnRunFailure: true, blackout: [], @@ -64,6 +65,14 @@ describe('src/cypress/screenshot', () => { expect(Screenshot.getConfig().scale).to.equal(true) }) + it('sets overwrite if specified', () => { + Screenshot.defaults({ + overwrite: true, + }) + + expect(Screenshot.getConfig().overwrite).to.equal(true) + }) + it('sets disableTimersAndAnimations if specified', () => { Screenshot.defaults({ disableTimersAndAnimations: false, @@ -187,6 +196,20 @@ describe('src/cypress/screenshot', () => { .and.eq('https://on.cypress.io/screenshot-api') }) + it('throws if overwrite is not a boolean', () => { + const fn = () => { + Screenshot.defaults({ overwrite: 'foo' }) + } + + expect(fn).to.throw() + .with.property('message') + .and.include('`Cypress.Screenshot.defaults()` `overwrite` option must be a boolean. You passed: `foo`') + + expect(fn).to.throw() + .with.property('docsUrl') + .and.eq('https://on.cypress.io/screenshot-api') + }) + it('throws if disableTimersAndAnimations is not a boolean', () => { const fn = () => { Screenshot.defaults({ disableTimersAndAnimations: 'foo' }) diff --git a/packages/driver/src/cypress/screenshot.ts b/packages/driver/src/cypress/screenshot.ts index 1cf06d85c491..43dfa207d11f 100644 --- a/packages/driver/src/cypress/screenshot.ts +++ b/packages/driver/src/cypress/screenshot.ts @@ -12,6 +12,7 @@ const _reset = () => { disableTimersAndAnimations: true, screenshotOnRunFailure: true, blackout: [], + overwrite: false, onBeforeScreenshot () {}, onAfterScreenshot () {}, } diff --git a/packages/runner/__snapshots__/retries.mochaEvents.spec.js b/packages/runner/__snapshots__/retries.mochaEvents.spec.js index 1aa18e0448cf..d440a0171dbd 100644 --- a/packages/runner/__snapshots__/retries.mochaEvents.spec.js +++ b/packages/runner/__snapshots__/retries.mochaEvents.spec.js @@ -6476,6 +6476,7 @@ exports['src/cypress/runner retries mochaEvents screenshots retry screenshot in "height": 660 }, "scaled": false, + "overwrite": false, "blackout": [], "startTime": "match.string", "current": 1, @@ -6491,7 +6492,8 @@ exports['src/cypress/runner retries mochaEvents screenshots retry screenshot in "scale": false, "waitForCommandSynchronization": false, "disableTimersAndAnimations": true, - "blackout": [] + "blackout": [], + "overwrite": false } exports['serialize state - retries'] = { diff --git a/packages/runner/__snapshots__/runner.mochaEvents.spec.js b/packages/runner/__snapshots__/runner.mochaEvents.spec.js index 610766f4043f..ab30d3da35c3 100644 --- a/packages/runner/__snapshots__/runner.mochaEvents.spec.js +++ b/packages/runner/__snapshots__/runner.mochaEvents.spec.js @@ -1939,6 +1939,7 @@ exports['src/cypress/runner other specs screenshots screenshot after failed test "height": 660 }, "scaled": true, + "overwrite": false, "blackout": [], "startTime": "1970-01-01T00:00:00.000Z" } diff --git a/packages/server/test/support/fixtures/projects/e2e/cypress/integration/screenshots_spec.js b/packages/server/test/support/fixtures/projects/e2e/cypress/integration/screenshots_spec.js index 3f27f5dadcbe..02c8bbcbf309 100644 --- a/packages/server/test/support/fixtures/projects/e2e/cypress/integration/screenshots_spec.js +++ b/packages/server/test/support/fixtures/projects/e2e/cypress/integration/screenshots_spec.js @@ -333,6 +333,39 @@ describe('taking screenshots', () => { }) }) + // @see https://github.com/cypress-io/cypress/issues/7955 + it('can set overwrite default option to replace existing filename', () => { + Cypress.Screenshot.defaults({ + overwrite: true, + }) + + cy.viewport(600, 200) + cy.visit('http://localhost:3322/color/yellow') + cy.screenshot('overwrite-test', { + clip: { x: 10, y: 10, width: 160, height: 80 }, + }) + + cy.task('check:screenshot:size', { + name: `${path.basename(__filename)}/overwrite-test.png`, + width: 160, + height: 80, + devicePixelRatio, + }) + + cy.screenshot('overwrite-test', { + clip: { x: 10, y: 10, width: 100, height: 50 }, + }) + + cy.readFile(`cypress/screenshots/${path.basename(__filename)}/overwrite-test (1).png`).should('not.exist') + + cy.task('check:screenshot:size', { + name: `${path.basename(__filename)}/overwrite-test.png`, + width: 100, + height: 50, + devicePixelRatio, + }) + }) + context('before hooks', () => { before(() => { // failure 2 From af472b6419ecb2aec1abdb09df99b2fa5f56e033 Mon Sep 17 00:00:00 2001 From: Kukhyeon Heo Date: Thu, 14 Oct 2021 08:51:38 +0900 Subject: [PATCH 05/27] fix: revive type checker (#18172) Co-authored-by: Zach Bloomquist --- cli/package.json | 2 +- cli/scripts/post-install.js | 21 + cli/types/cy-bluebird.d.ts | 5 +- cli/types/cypress.d.ts | 9 +- .../babel/babelTransform.test.ts | 2 + .../src/schematics/ng-add/index.spec.ts | 2 + package.json | 4 +- packages/desktop-gui/src/main.scss.d.ts | 7 + .../integration/dom/visibility_spec.ts | 1 + packages/driver/index.d.ts | 5 +- packages/driver/index.ts | 12 + packages/driver/package.json | 2 + packages/driver/src/config/jquery.scrollto.ts | 15 +- packages/driver/src/config/lodash.ts | 9 + .../driver/src/cy/commands/actions/click.ts | 13 +- .../driver/src/cy/commands/actions/focus.ts | 6 +- .../driver/src/cy/commands/actions/scroll.ts | 27 +- .../driver/src/cy/commands/actions/select.ts | 13 +- .../driver/src/cy/commands/actions/submit.ts | 3 +- .../driver/src/cy/commands/local_storage.ts | 2 +- packages/driver/src/cy/commands/querying.ts | 28 +- packages/driver/src/cy/commands/request.ts | 20 +- packages/driver/src/cy/commands/screenshot.ts | 31 +- packages/driver/src/cy/commands/task.ts | 3 +- packages/driver/src/cy/commands/traversals.ts | 11 +- packages/driver/src/cy/commands/waiting.ts | 14 +- packages/driver/src/cy/commands/window.ts | 25 +- packages/driver/src/cy/commands/xhr.ts | 21 +- packages/driver/src/cy/keyboard.ts | 4 +- packages/driver/src/cy/snapshots.ts | 2 +- packages/driver/src/cypress/error_messages.ts | 2 +- packages/driver/src/cypress/error_utils.ts | 10 +- packages/driver/src/cypress/proxy-logging.ts | 1 + packages/driver/src/cypress/resolvers.ts | 3 +- .../driver/src/cypress/selector_playground.ts | 7 +- packages/driver/src/cypress/server.ts | 10 +- packages/driver/src/dom/coordinates.ts | 48 +- .../driver/src/dom/elements/nativeProps.ts | 24 +- packages/driver/src/dom/selection.ts | 2 +- packages/driver/types/internal-types.d.ts | 5 + packages/extension/index.d.ts | 5 + packages/net-stubbing/package.json | 1 - .../reporter/src/commands/command-model.ts | 4 +- packages/reporter/src/main-runner.scss.d.ts | 7 + packages/reporter/src/main.scss.d.ts | 7 + packages/reporter/src/test/test-model.ts | 4 +- .../src/app/KeyboardHelper.scss.d.ts | 7 + packages/runner-ct/src/app/NoSpec.scss.d.ts | 7 + .../src/app/ReporterHeader.module.scss.d.ts | 8 + .../src/app/RunnerCt.module.scss.d.ts | 27 + packages/runner-ct/src/app/RunnerCt.scss.d.ts | 7 + .../runner-ct/src/iframe/iframes.scss.d.ts | 7 + .../src/plugins/devtools-fallback.scss.d.ts | 7 + packages/runner-shared/src/header/index.tsx | 2 +- .../src/message/message.scss.d.ts | 7 + packages/runner-shared/src/mobx.ts | 2 +- .../selector-playground.scss.d.ts | 7 + .../snapshot-controls.scss.d.ts | 7 + .../src/spec-list/SpecList.module.scss.d.ts | 13 + .../runner-shared/src/spec-list/SpecList.tsx | 6 +- .../src/studio/assertions-menu.scss.d.ts | 7 + .../src/studio/studio-modals.scss.d.ts | 7 + .../runner-shared/src/styles.module.scss.d.ts | 7 + packages/runner/index.d.ts | 3 + packages/runner/src/main.scss.d.ts | 7 + packages/server/index.d.ts | 1 + packages/server/lib/browsers/chrome.ts | 2 +- .../cypress/integration/failing_spec.ts | 8 +- .../tsconfig.json | 3 +- .../cypress/support/test-entry.scss.d.ts | 7 + packages/web-config/index.d.ts | 2 + packages/web-config/package.json | 2 + packages/web-config/webpack.config.base.ts | 7 + patches/@types+jquery+3.3.31.patch | 39622 ++++++++++++++++ patches/@types+mocha+8.0.3.patch | 5607 +++ patches/react-vtree+3.0.0-beta.1.patch | 102 + scripts/type_check.js | 34 +- yarn.lock | 78 +- 78 files changed, 45918 insertions(+), 161 deletions(-) create mode 100644 packages/desktop-gui/src/main.scss.d.ts create mode 100644 packages/extension/index.d.ts create mode 100644 packages/reporter/src/main-runner.scss.d.ts create mode 100644 packages/reporter/src/main.scss.d.ts create mode 100644 packages/runner-ct/src/app/KeyboardHelper.scss.d.ts create mode 100644 packages/runner-ct/src/app/NoSpec.scss.d.ts create mode 100644 packages/runner-ct/src/app/ReporterHeader.module.scss.d.ts create mode 100644 packages/runner-ct/src/app/RunnerCt.module.scss.d.ts create mode 100644 packages/runner-ct/src/app/RunnerCt.scss.d.ts create mode 100644 packages/runner-ct/src/iframe/iframes.scss.d.ts create mode 100644 packages/runner-ct/src/plugins/devtools-fallback.scss.d.ts create mode 100644 packages/runner-shared/src/message/message.scss.d.ts create mode 100644 packages/runner-shared/src/selector-playground/selector-playground.scss.d.ts create mode 100644 packages/runner-shared/src/snapshot-controls/snapshot-controls.scss.d.ts create mode 100644 packages/runner-shared/src/spec-list/SpecList.module.scss.d.ts create mode 100644 packages/runner-shared/src/studio/assertions-menu.scss.d.ts create mode 100644 packages/runner-shared/src/studio/studio-modals.scss.d.ts create mode 100644 packages/runner-shared/src/styles.module.scss.d.ts create mode 100644 packages/runner/src/main.scss.d.ts create mode 100644 packages/ui-components/cypress/support/test-entry.scss.d.ts create mode 100644 packages/web-config/index.d.ts create mode 100644 patches/@types+jquery+3.3.31.patch create mode 100644 patches/@types+mocha+8.0.3.patch create mode 100644 patches/react-vtree+3.0.0-beta.1.patch diff --git a/cli/package.json b/cli/package.json index e63e144e9d29..4387fc409906 100644 --- a/cli/package.json +++ b/cli/package.json @@ -74,7 +74,7 @@ "@types/jquery": "3.3.31", "@types/lodash": "4.14.168", "@types/minimatch": "3.0.3", - "@types/mocha": "5.2.7", + "@types/mocha": "8.0.3", "@types/sinon": "7.5.1", "@types/sinon-chai": "3.2.5", "chai": "3.5.0", diff --git a/cli/scripts/post-install.js b/cli/scripts/post-install.js index a632fe82946f..8439892c633c 100644 --- a/cli/scripts/post-install.js +++ b/cli/scripts/post-install.js @@ -5,6 +5,7 @@ const { includeTypes } = require('./utils') const shell = require('shelljs') +const fs = require('fs') const { join } = require('path') const resolvePkg = require('resolve-pkg') @@ -72,3 +73,23 @@ shell.sed('-i', 'from \'sinon\';', 'from \'../sinon\';', sinonChaiFilename) // copy experimental network stubbing type definitions // so users can import: `import 'cypress/types/net-stubbing'` shell.cp(resolvePkg('@packages/net-stubbing/lib/external-types.ts'), 'types/net-stubbing.ts') + +// https://github.com/cypress-io/cypress/issues/18069 +// To avoid type clashes, some files should be commented out entirely by patch-package +// and uncommented here. + +const filesToUncomment = [ + 'mocha/index.d.ts', + 'jquery/JQuery.d.ts', + 'jquery/legacy.d.ts', + 'jquery/misc.d.ts', +] + +filesToUncomment.forEach((file) => { + const filePath = join(__dirname, '../types', file) + const str = fs.readFileSync(filePath).toString() + + const result = str.split('\n').map((line) => line.substring(3)).join('\n') + + fs.writeFileSync(filePath, result) +}) diff --git a/cli/types/cy-bluebird.d.ts b/cli/types/cy-bluebird.d.ts index c729bd79c026..fced75ab6956 100644 --- a/cli/types/cy-bluebird.d.ts +++ b/cli/types/cy-bluebird.d.ts @@ -1,11 +1,12 @@ // Shim definition to export a namespace. Cypress is actually a global module // so import/export isn't allowed there. We import here and define a global module // so that Cypress can get and use the Blob type -import BluebirdStatic = require('./bluebird') +import ImportedBluebird = require('./bluebird') export = Bluebird export as namespace Bluebird declare namespace Bluebird { - type BluebirdStatic = typeof BluebirdStatic + type BluebirdStatic = typeof ImportedBluebird + interface Promise extends ImportedBluebird {} } diff --git a/cli/types/cypress.d.ts b/cli/types/cypress.d.ts index 5dd65e6b0525..4e58c6e5c14a 100644 --- a/cli/types/cypress.d.ts +++ b/cli/types/cypress.d.ts @@ -170,6 +170,11 @@ declare namespace Cypress { */ interface ApplicationWindow { } // tslint:disable-line + /** + * The configuration for Cypress. + */ + type Config = ResolvedConfigOptions & RuntimeConfigOptions + /** * Several libraries are bundled with Cypress by default. * @@ -297,7 +302,7 @@ declare namespace Cypress { /** * Fire automation:request event for internal use. */ - automation(eventName: string, ...args: any[]): Promise + automation(eventName: string, ...args: any[]): Bluebird.Promise /** * Promise wrapper for certain internal tasks. @@ -313,7 +318,7 @@ declare namespace Cypress { // {defaultCommandTimeout: 10000, pageLoadTimeout: 30000, ...} ``` */ - config(): ResolvedConfigOptions & RuntimeConfigOptions + config(): Config /** * Returns one configuration value. * @see https://on.cypress.io/config diff --git a/npm/create-cypress-tests/src/component-testing/babel/babelTransform.test.ts b/npm/create-cypress-tests/src/component-testing/babel/babelTransform.test.ts index be1a39d12a66..5bc9e1ed33dc 100644 --- a/npm/create-cypress-tests/src/component-testing/babel/babelTransform.test.ts +++ b/npm/create-cypress-tests/src/component-testing/babel/babelTransform.test.ts @@ -1,3 +1,5 @@ +/// + import * as babel from '@babel/core' import { expect } from 'chai' import { createTransformPluginsFileBabelPlugin } from './babelTransform' diff --git a/npm/cypress-schematic/src/schematics/ng-add/index.spec.ts b/npm/cypress-schematic/src/schematics/ng-add/index.spec.ts index 5adcc84af195..0bf90878cb31 100644 --- a/npm/cypress-schematic/src/schematics/ng-add/index.spec.ts +++ b/npm/cypress-schematic/src/schematics/ng-add/index.spec.ts @@ -1,3 +1,5 @@ +/// + import { SchematicTestRunner, UnitTestTree } from '@angular-devkit/schematics/testing' import { join, resolve } from 'path' import { expect } from 'chai' diff --git a/package.json b/package.json index c576e930f5d0..0fcec7af6491 100644 --- a/package.json +++ b/package.json @@ -90,7 +90,7 @@ "@types/glob": "7.1.1", "@types/lodash": "4.14.168", "@types/markdown-it": "0.0.9", - "@types/mini-css-extract-plugin": "1.4.2", + "@types/mini-css-extract-plugin": "1.2.3", "@types/mocha": "8.0.3", "@types/node": "14.14.31", "@types/prismjs": "1.16.0", @@ -165,7 +165,7 @@ "mock-fs": "4.9.0", "odiff-bin": "2.1.0", "parse-github-repo-url": "1.4.1", - "patch-package": "6.2.2", + "patch-package": "6.4.7", "plist": "3.0.1", "pluralize": "8.0.0", "postinstall-postinstall": "2.0.0", diff --git a/packages/desktop-gui/src/main.scss.d.ts b/packages/desktop-gui/src/main.scss.d.ts new file mode 100644 index 000000000000..132b232e8959 --- /dev/null +++ b/packages/desktop-gui/src/main.scss.d.ts @@ -0,0 +1,7 @@ +// This file is automatically generated. +// Please do not change this file! +interface CssExports { + +} +export const cssExports: CssExports; +export default cssExports; diff --git a/packages/driver/cypress/integration/dom/visibility_spec.ts b/packages/driver/cypress/integration/dom/visibility_spec.ts index 8c31ff19272a..cc04e297dde3 100644 --- a/packages/driver/cypress/integration/dom/visibility_spec.ts +++ b/packages/driver/cypress/integration/dom/visibility_spec.ts @@ -1,3 +1,4 @@ +// @ts-ignore const { $, dom } = Cypress describe('src/cypress/dom/visibility', () => { diff --git a/packages/driver/index.d.ts b/packages/driver/index.d.ts index 8bb8dc023219..10d847e97a11 100644 --- a/packages/driver/index.d.ts +++ b/packages/driver/index.d.ts @@ -1,6 +1,7 @@ /// -/// +/// + export const $Cypress: Cypress.Cypress -export const $: typeof JQuery +export const $: JQuery export default $Cypress \ No newline at end of file diff --git a/packages/driver/index.ts b/packages/driver/index.ts index d72e4cf11f8d..27fb8194b253 100644 --- a/packages/driver/index.ts +++ b/packages/driver/index.ts @@ -1,3 +1,15 @@ +/// +/// +/// + +/// + +declare global { + interface Window { + Cypress: Cypress.Cypress + } +} + import $Cypress from './src/main' export default $Cypress diff --git a/packages/driver/package.json b/packages/driver/package.json index dbdf17053e24..265068e64c0b 100644 --- a/packages/driver/package.json +++ b/packages/driver/package.json @@ -26,8 +26,10 @@ "@sinonjs/fake-timers": "7.0.2", "@types/chalk": "^2.2.0", "@types/common-tags": "^1.8.0", + "@types/jquery.scrollto": "1.4.29", "@types/lodash": "^4.14.168", "@types/mocha": "^8.0.3", + "@types/underscore.string": "0.0.38", "angular": "1.8.0", "basic-auth": "2.0.1", "blob-util": "2.0.2", diff --git a/packages/driver/src/config/jquery.scrollto.ts b/packages/driver/src/config/jquery.scrollto.ts index 83fcf25ba781..8568cfb76282 100644 --- a/packages/driver/src/config/jquery.scrollto.ts +++ b/packages/driver/src/config/jquery.scrollto.ts @@ -8,6 +8,8 @@ * @version 2.1.3 */ +/// + /** eslint-disable */ import $ from 'jquery' @@ -109,7 +111,7 @@ export function scrollTo (target, duration, settings) { let max = $scrollTo.max(elem, axis) if (toff) { // jQuery / DOMElement - attr[key] = toff[pos] + (win ? 0 : prev - $elem.offset()[pos]) + attr[key] = toff[pos] + (win ? 0 : prev - $elem.offset()![pos]) // If it's a dom element, reduce the margin if (settings.margin) { @@ -192,18 +194,25 @@ function both (val) { return isFunction(val) || $.isPlainObject(val) ? val : { top: val, left: val } } +// TODO: find the type of _last in the JQuery code. +interface Tween extends JQuery.Tween { + _last: any +} + // Add special hooks so that window scroll properties can be animated $.Tween.propHooks.scrollLeft = $.Tween.propHooks.scrollTop = { get (t) { return $(t.elem)[t.prop]() }, - set (t) { + set (t: Tween) { let curr = this.get(t) // If interrupt is true and user scrolled, stop animating if (t.options.interrupt && t._last && t._last !== curr) { - return $(t.elem).stop() + $(t.elem).stop() + + return } let next = Math.round(t.now) diff --git a/packages/driver/src/config/lodash.ts b/packages/driver/src/config/lodash.ts index 38bed62ce850..be1d1f94ed50 100644 --- a/packages/driver/src/config/lodash.ts +++ b/packages/driver/src/config/lodash.ts @@ -10,3 +10,12 @@ _.mixin({ }) export default _ + +declare module 'lodash' { + interface LoDashStatic { + clean: typeof clean + count: typeof count + isBlank: typeof isBlank + toBoolean: typeof toBoolean + } +} diff --git a/packages/driver/src/cy/commands/actions/click.ts b/packages/driver/src/cy/commands/actions/click.ts index 31554962924b..07bf7cd25c22 100644 --- a/packages/driver/src/cy/commands/actions/click.ts +++ b/packages/driver/src/cy/commands/actions/click.ts @@ -33,10 +33,21 @@ const formatMouseEvents = (events) => { }) } +// TODO: remove any, Function, Record +type MouseActionOptions = { + subject: any + positionOrX: string | number + y: number + userOptions: Record + onReady: Function + onTable: Function + defaultOptions?: Record +} + export default (Commands, Cypress, cy, state, config) => { const { mouse, keyboard } = cy.devices - const mouseAction = (eventName, { subject, positionOrX, y, userOptions, onReady, onTable, defaultOptions }) => { + const mouseAction = (eventName, { subject, positionOrX, y, userOptions, onReady, onTable, defaultOptions }: MouseActionOptions) => { let position let x diff --git a/packages/driver/src/cy/commands/actions/focus.ts b/packages/driver/src/cy/commands/actions/focus.ts index 2207ae937b01..5f5bc457a762 100644 --- a/packages/driver/src/cy/commands/actions/focus.ts +++ b/packages/driver/src/cy/commands/actions/focus.ts @@ -7,7 +7,8 @@ import $elements from '../../../dom/elements' export default (Commands, Cypress, cy) => { return Commands.addAll({ prevSubject: ['element', 'window'] }, { - focus (subject, options = {}) { + // TODO: any -> Partial + focus (subject, options: any = {}) { const userOptions = options // we should throw errors by default! @@ -84,7 +85,8 @@ export default (Commands, Cypress, cy) => { return verifyAssertions() }, - blur (subject, options = {}) { + // TODO: any -> Partial + blur (subject, options: any = {}) { const userOptions = options // we should throw errors by default! diff --git a/packages/driver/src/cy/commands/actions/scroll.ts b/packages/driver/src/cy/commands/actions/scroll.ts index 2d4d2cccc50d..48077d99b2eb 100644 --- a/packages/driver/src/cy/commands/actions/scroll.ts +++ b/packages/driver/src/cy/commands/actions/scroll.ts @@ -30,7 +30,8 @@ const isNaNOrInfinity = (item) => { export default (Commands, Cypress, cy, state) => { Commands.addAll({ prevSubject: 'element' }, { - scrollIntoView (subject, options = {}) { + // TODO: any -> Partial + scrollIntoView (subject, options: any = {}) { const userOptions = options if (!_.isObject(userOptions)) { @@ -114,6 +115,9 @@ export default (Commands, Cypress, cy, state) => { const scrollIntoView = () => { return new Promise((resolve, reject) => { // scroll our axes + // TODO: done() came from jQuery animate(), specifically, EffectsOptions at misc.d.ts + // The type definition should be fixed at @types/jquery.scrollto. + // @ts-ignore return $(options.$parent).scrollTo(options.$el, { axis: options.axis, easing: options.easing, @@ -132,7 +136,7 @@ export default (Commands, Cypress, cy, state) => { }, always () { if (parentIsWin) { - return delete options.$parent.contentWindow + delete options.$parent.contentWindow } }, }) @@ -153,7 +157,8 @@ export default (Commands, Cypress, cy, state) => { }) Commands.addAll({ prevSubject: ['optional', 'element', 'window'] }, { - scrollTo (subject, xOrPosition, yOrOptions, options = {}) { + // TODO: any -> Partial + scrollTo (subject, xOrPosition, yOrOptions, options: any = {}) { let x; let y let userOptions = options @@ -168,7 +173,7 @@ export default (Commands, Cypress, cy, state) => { y = yOrOptions } - let position = null + let position: string | null = null // we may be '50%' or 'bottomCenter' if (_.isString(xOrPosition)) { @@ -293,7 +298,7 @@ export default (Commands, Cypress, cy, state) => { $utils.filterOutOptions(options, { duration: 0, easing: 'swing' }), ) - const messageArgs = [] + const messageArgs: string[] = [] if (position) { messageArgs.push(position) @@ -306,12 +311,12 @@ export default (Commands, Cypress, cy, state) => { messageArgs.push(deltaOptions) } - const log = { + const log: Record = { message: messageArgs.join(', '), timeout: options.timeout, consoleProps () { // merge into consoleProps without mutating it - const obj = {} + const obj: Record = {} if (position) { obj.Position = position @@ -357,10 +362,16 @@ export default (Commands, Cypress, cy, state) => { const scrollTo = () => { return new Promise((resolve, reject) => { // scroll our axis' + // TODO: done() came from jQuery animate(), specifically, EffectsOptions at misc.d.ts + // The type definition should be fixed at @types/jquery.scrollto. + // @ts-ignore $(options.$el).scrollTo({ left: x, top: y }, { axis: options.axis, easing: options.easing, duration: options.duration, + // TODO: ensureScrollable option does not exist on jQuery or config/jquery.scrollto.ts. + // It can be removed. + // @ts-ignore ensureScrollable: options.ensureScrollable, done () { return resolve(options.$el) @@ -376,7 +387,7 @@ export default (Commands, Cypress, cy, state) => { }) if (isWin) { - return delete options.$el.contentWindow + delete options.$el.contentWindow } }) } diff --git a/packages/driver/src/cy/commands/actions/select.ts b/packages/driver/src/cy/commands/actions/select.ts index 36b2d455e494..ba5a47a409b0 100644 --- a/packages/driver/src/cy/commands/actions/select.ts +++ b/packages/driver/src/cy/commands/actions/select.ts @@ -10,7 +10,8 @@ const newLineRe = /\n/g export default (Commands, Cypress, cy) => { Commands.addAll({ prevSubject: 'element' }, { - select (subject, valueOrTextOrIndex, options = {}) { + // TODO: any -> Partial + select (subject, valueOrTextOrIndex, options: any = {}) { if ( !_.isNumber(valueOrTextOrIndex) && !_.isString(valueOrTextOrIndex) @@ -35,7 +36,7 @@ export default (Commands, Cypress, cy) => { force: false, }) - const consoleProps = {} + const consoleProps: Record = {} if (options.log) { // figure out the options which actually change the behavior of clicks @@ -80,7 +81,7 @@ export default (Commands, Cypress, cy) => { } // normalize valueOrTextOrIndex if its not an array - valueOrTextOrIndex = [].concat(valueOrTextOrIndex).map((v) => { + valueOrTextOrIndex = [].concat(valueOrTextOrIndex).map((v: any) => { if (_.isNumber(v) && (!_.isInteger(v) || v < 0)) { $errUtils.throwErrByPath('select.invalid_number', { args: { index: v } }) } @@ -108,8 +109,8 @@ export default (Commands, Cypress, cy) => { $errUtils.throwErrByPath('select.disabled', { args: { node } }) } - const values = [] - const optionEls = [] + const values: string[] = [] + const optionEls: JQuery[] = [] const optionsObjects = options.$el.find('option').map((index, el) => { // push the value in values array if its // found within the valueOrText @@ -266,7 +267,7 @@ export default (Commands, Cypress, cy) => { let selectedIndex = 0 _.each(optionEls, ($el) => { - const index = _.findIndex(optionsObjects, (optionObject) => { + const index = _.findIndex(optionsObjects, (optionObject: any) => { return $el.text() === optionObject.originalText }) diff --git a/packages/driver/src/cy/commands/actions/submit.ts b/packages/driver/src/cy/commands/actions/submit.ts index 4bc31414dd60..cbd61919c931 100644 --- a/packages/driver/src/cy/commands/actions/submit.ts +++ b/packages/driver/src/cy/commands/actions/submit.ts @@ -8,7 +8,8 @@ import $actionability from '../../actionability' export default (Commands, Cypress, cy) => { Commands.addAll({ prevSubject: 'element' }, { - submit (subject, options = {}) { + // TODO: any -> Partial + submit (subject, options: any = {}) { const userOptions = options options = _.defaults({}, userOptions, { diff --git a/packages/driver/src/cy/commands/local_storage.ts b/packages/driver/src/cy/commands/local_storage.ts index a8eb60e13dc3..3c7b0ffe6055 100644 --- a/packages/driver/src/cy/commands/local_storage.ts +++ b/packages/driver/src/cy/commands/local_storage.ts @@ -33,7 +33,7 @@ export default (Commands, Cypress, cy, state) => { }) Commands.addAll({ - clearLocalStorage (keys, options = {}) { + clearLocalStorage (keys, options: Partial = {}) { if (_.isPlainObject(keys)) { options = keys keys = null diff --git a/packages/driver/src/cy/commands/querying.ts b/packages/driver/src/cy/commands/querying.ts index 0570ce896361..7d1b2092c503 100644 --- a/packages/driver/src/cy/commands/querying.ts +++ b/packages/driver/src/cy/commands/querying.ts @@ -10,7 +10,8 @@ import { getAliasedRequests, isDynamicAliasingPossible } from '../net-stubbing/a export default (Commands, Cypress, cy, state) => { Commands.addAll({ - focused (options = {}) { + // TODO: any -> Partial + focused (options: any = {}) { const userOptions = options options = _.defaults({}, userOptions, { @@ -71,7 +72,8 @@ export default (Commands, Cypress, cy, state) => { return resolveFocused() }, - get (selector, options = {}) { + // TODO: any -> Partial + get (selector, options: any = {}) { const userOptions = options const ctx = this @@ -92,7 +94,7 @@ export default (Commands, Cypress, cy, state) => { options.includeShadowDom = resolveShadowDomInclusion(Cypress, userOptions.includeShadowDom) let aliasObj - const consoleProps = {} + const consoleProps: Record = {} const start = (aliasType) => { if (options.log === false) { return @@ -120,7 +122,7 @@ export default (Commands, Cypress, cy, state) => { start(aliasType) } - const obj = {} + const obj: any = {} if (aliasType === 'dom') { _.extend(obj, { @@ -226,7 +228,7 @@ export default (Commands, Cypress, cy, state) => { // within our subject then filter out // anything not currently in the DOM if ($dom.isDetached(subject)) { - subject = subject.filter((index, el) => $dom.isAttached(el)) + subject = (subject as any).filter((index, el) => $dom.isAttached(el)) // if we have nothing left // just go replay the commands @@ -246,6 +248,8 @@ export default (Commands, Cypress, cy, state) => { if ((err.type === 'length') && (err.actual < err.expected)) { return replayFrom = true } + + return false }, onRetry () { if (replayFrom) { @@ -347,7 +351,7 @@ export default (Commands, Cypress, cy, state) => { if ($el.selector == null) { $el.selector = selector } - } catch (err) { + } catch (err: any) { // this is usually a sizzle error (invalid selector) err.onFail = () => { if (options.log === false) { @@ -407,7 +411,8 @@ export default (Commands, Cypress, cy, state) => { return resolveElements() }, - root (options = {}) { + // TODO: any -> Partial + root (options: any = {}) { const userOptions = options options = _.defaults({}, userOptions, { log: true }) @@ -438,7 +443,8 @@ export default (Commands, Cypress, cy, state) => { }) Commands.addAll({ prevSubject: ['optional', 'window', 'document', 'element'] }, { - contains (subject, filter, text, options = {}) { + // TODO: any -> Partial + contains (subject, filter, text, options: any = {}) { let userOptions = options // nuke our subject if its present but not an element. @@ -516,6 +522,8 @@ export default (Commands, Cypress, cy, state) => { return `Expected to find content: '${text}' ${getPhrase()}but never did.` } + + return null } let consoleProps @@ -583,6 +591,8 @@ export default (Commands, Cypress, cy, state) => { default: break } + + return null }, }) }) @@ -697,7 +707,7 @@ export default (Commands, Cypress, cy, state) => { options = _.defaults({}, userOptions, { log: true }) - const consoleProps = { + const consoleProps: Record = { 'Applied To': $dom.getElements(subject), } diff --git a/packages/driver/src/cy/commands/request.ts b/packages/driver/src/cy/commands/request.ts index 599b36d34162..f40dcae64f8f 100644 --- a/packages/driver/src/cy/commands/request.ts +++ b/packages/driver/src/cy/commands/request.ts @@ -50,7 +50,7 @@ const whichAreOptional = (val, key) => { return (val === null) && OPTIONAL_OPTS.includes(key) } -const needsFormSpecified = (options = {}) => { +const needsFormSpecified = (options: any = {}) => { const { body, json, headers } = options // json isn't true, and we have an object body and the user @@ -58,13 +58,19 @@ const needsFormSpecified = (options = {}) => { return (json !== true) && _.isObject(body) && hasFormUrlEncodedContentTypeHeader(headers) } +interface BackendError { + backend: boolean + message?: string + stack?: any +} + export default (Commands, Cypress, cy, state, config) => { Commands.addAll({ // allow our signature to be similar to cy.route // METHOD / URL / BODY // or object literal with all expanded options request (...args) { - const o = {} + const o: any = {} const userOptions = o if (_.isObject(args[0])) { @@ -297,7 +303,11 @@ export default (Commands, Cypress, cy, state, config) => { // reset content-type if (requestOpts.headers) { - delete requestOpts.headers[Object.keys(requestOpts).find((key) => key.toLowerCase() === 'content-type')] + const contentTypeKey = Object.keys(requestOpts).find((key) => key.toLowerCase() === 'content-type') + + if (contentTypeKey) { + delete requestOpts.headers[contentTypeKey] + } } else { requestOpts.headers = {} } @@ -308,7 +318,7 @@ export default (Commands, Cypress, cy, state, config) => { // socket.io ignores FormData. // So, we need to encode the data into base64 string format. - const formBody = [] + const formBody: string[] = [] requestOpts.body.forEach((value, key) => { // HTTP line break style is \r\n. @@ -373,7 +383,7 @@ export default (Commands, Cypress, cy, state, config) => { timeout: options.timeout, }, }) - }).catch({ backend: true }, (err) => { + }).catch({ backend: true }, (err: BackendError) => { $errUtils.throwErrByPath('request.loading_failed', { onFail: options._log, args: { diff --git a/packages/driver/src/cy/commands/screenshot.ts b/packages/driver/src/cy/commands/screenshot.ts index 3b905426aaac..5ca9bcfff52d 100644 --- a/packages/driver/src/cy/commands/screenshot.ts +++ b/packages/driver/src/cy/commands/screenshot.ts @@ -18,10 +18,10 @@ const getViewportWidth = (state) => { return Math.min(state('viewportWidth'), window.innerWidth) } -const automateScreenshot = (state, options = {}) => { +const automateScreenshot = (state, options: TakeScreenshotOptions = {}) => { const { runnable, timeout } = options - const titles = [] + const titles: string[] = [] // if this a hook then push both the current test title // and our own hook title @@ -150,7 +150,7 @@ const takeFullPageScreenshot = (state, automationOptions) => { const resetScrollOverrides = scrollOverrides(win, doc) - const docHeight = $(doc).height() + const docHeight = $(doc).height() as number const viewportHeight = getViewportHeight(state) const numScreenshots = Math.ceil(docHeight / viewportHeight) @@ -279,7 +279,18 @@ const getBlackout = ({ capture, blackout }) => { return isAppOnly({ capture }) ? blackout : [] } -const takeScreenshot = (Cypress, state, screenshotConfig, options = {}) => { +// TODO: anys should be removed. +type TakeScreenshotOptions = { + name?: string + subject?: any + simple?: boolean + testFailure?: boolean + runnable?: any + log?: any + timeout?: number +} + +const takeScreenshot = (Cypress, state, screenshotConfig, options: TakeScreenshotOptions = {}) => { const { capture, padding, @@ -294,7 +305,8 @@ const takeScreenshot = (Cypress, state, screenshotConfig, options = {}) => { const startTime = new Date() - const send = (event, props, resolve) => { + // TODO: is this ok to make `resolve` undefined? + const send = (event, props, resolve?) => { Cypress.action(`cy:${event}`, props, resolve) } @@ -323,6 +335,8 @@ const takeScreenshot = (Cypress, state, screenshotConfig, options = {}) => { if (disableTimersAndAnimations) { return cy.pauseTimers(true) } + + return null }) .then(() => { return sendAsync('before:screenshot', getOptions(true)) @@ -336,6 +350,8 @@ const takeScreenshot = (Cypress, state, screenshotConfig, options = {}) => { if (disableTimersAndAnimations) { return cy.pauseTimers(false) } + + return null }) } @@ -424,7 +440,8 @@ export default function (Commands, Cypress, cy, state, config) { }) Commands.addAll({ prevSubject: ['optional', 'element', 'window', 'document'] }, { - screenshot (subject, name, options = {}) { + // TODO: any -> Partial + screenshot (subject, name, options: any = {}) { let userOptions = options if (_.isObject(name)) { @@ -453,7 +470,7 @@ export default function (Commands, Cypress, cy, state, config) { const isWin = $dom.isWindow(subject) - let screenshotConfig = _.pick(options, 'capture', 'scale', 'disableTimersAndAnimations', 'overwrite', 'blackout', 'waitForCommandSynchronization', 'padding', 'clip', 'onBeforeScreenshot', 'onAfterScreenshot') + let screenshotConfig: any = _.pick(options, 'capture', 'scale', 'disableTimersAndAnimations', 'overwrite', 'blackout', 'waitForCommandSynchronization', 'padding', 'clip', 'onBeforeScreenshot', 'onAfterScreenshot') screenshotConfig = $Screenshot.validate(screenshotConfig, 'screenshot', options._log) screenshotConfig = _.extend($Screenshot.getConfig(), screenshotConfig) diff --git a/packages/driver/src/cy/commands/task.ts b/packages/driver/src/cy/commands/task.ts index 6dc06b52a3f8..ff07b7bf8d7e 100644 --- a/packages/driver/src/cy/commands/task.ts +++ b/packages/driver/src/cy/commands/task.ts @@ -7,7 +7,8 @@ import $stackUtils from '../../cypress/stack_utils' export default (Commands, Cypress, cy) => { Commands.addAll({ - task (task, arg, options = {}) { + // TODO: any -> Partial + task (task, arg, options: any = {}) { const userOptions = options options = _.defaults({}, userOptions, { diff --git a/packages/driver/src/cy/commands/traversals.ts b/packages/driver/src/cy/commands/traversals.ts index d36244eb3b22..096bdb31fbeb 100644 --- a/packages/driver/src/cy/commands/traversals.ts +++ b/packages/driver/src/cy/commands/traversals.ts @@ -87,6 +87,13 @@ const autoShadowTraversals = { }, } +type EachConsoleProps = { + Selector: string + 'Applied To': any + Yielded?: any + Elements?: number | undefined +} + export default (Commands, Cypress, cy) => { _.each(traversals, (traversal) => { Commands.add(traversal, { prevSubject: ['element', 'document'] }, (subject, arg1, arg2, options) => { @@ -110,7 +117,7 @@ export default (Commands, Cypress, cy) => { return args.join(', ') } - const consoleProps = { + const consoleProps: EachConsoleProps = { Selector: getSelector(), 'Applied To': $dom.getElements(subject), } @@ -166,7 +173,7 @@ export default (Commands, Cypress, cy) => { // normalize the selector since jQuery won't have it // or completely borks it $el.selector = getSelector() - } catch (e) { + } catch (e: any) { e.onFail = () => { return options._log.error(e) } diff --git a/packages/driver/src/cy/commands/waiting.ts b/packages/driver/src/cy/commands/waiting.ts index 0290a0c32365..cfcbfafe5649 100644 --- a/packages/driver/src/cy/commands/waiting.ts +++ b/packages/driver/src/cy/commands/waiting.ts @@ -24,6 +24,12 @@ const throwErr = (arg) => { $errUtils.throwErrByPath('wait.invalid_1st_arg', { args: { arg } }) } +type Alias = { + name: string + cardinal: number + ordinal: number +} + export default (Commands, Cypress, cy, state) => { const waitNumber = (subject, ms, options) => { // increase the timeout by the delta @@ -83,7 +89,7 @@ export default (Commands, Cypress, cy, state) => { return xhr } - const args = [alias, type, index, num, options] + const args: [any, any, any, any, any] = [alias, type, index, num, options] return cy.retry(() => { return checkForXhr.apply(window, args) @@ -147,7 +153,7 @@ export default (Commands, Cypress, cy, state) => { // because wait can reference an array of aliases if (log) { const referencesAlias = log.get('referencesAlias') || [] - const aliases = [].concat(referencesAlias) + const aliases: Array = [].concat(referencesAlias) if (str) { aliases.push({ @@ -279,7 +285,7 @@ export default (Commands, Cypress, cy, state) => { } options = _.defaults({}, options, { log: true }) - const args = [subject, msOrAlias, options] + const args: any = [subject, msOrAlias, options] try { if (_.isFinite(msOrAlias)) { @@ -316,7 +322,7 @@ export default (Commands, Cypress, cy, state) => { } return throwErr(arg) - } catch (err) { + } catch (err: any) { if (err.name === 'CypressError') { throw err } else { diff --git a/packages/driver/src/cy/commands/window.ts b/packages/driver/src/cy/commands/window.ts index 3f3171bd0419..0ae8d7c226d8 100644 --- a/packages/driver/src/cy/commands/window.ts +++ b/packages/driver/src/cy/commands/window.ts @@ -26,15 +26,17 @@ const viewports = { const validOrientations = ['landscape', 'portrait'] +type CurrentViewport = Pick + // NOTE: this is outside the function because its 'global' state to the // cypress application and not local to the specific run. the last // viewport set is always the 'current' viewport as opposed to the // config. there was a bug where re-running tests without a hard // refresh would cause viewport to hang -let currentViewport = null +let currentViewport: CurrentViewport | null = null export default (Commands, Cypress, cy, state) => { - const defaultViewport = _.pick(Cypress.config(), 'viewportWidth', 'viewportHeight') + const defaultViewport: CurrentViewport = _.pick(Cypress.config() as Cypress.Config, 'viewportWidth', 'viewportHeight') // currentViewport could already be set due to previous runs currentViewport = currentViewport || defaultViewport @@ -57,7 +59,7 @@ export default (Commands, Cypress, cy, state) => { state(viewport) return new Promise((resolve) => { - if (currentViewport.viewportWidth === width && currentViewport.viewportHeight === height) { + if (currentViewport!.viewportWidth === width && currentViewport!.viewportHeight === height) { // noop if viewport won't change return resolve(currentViewport) } @@ -76,7 +78,8 @@ export default (Commands, Cypress, cy, state) => { } Commands.addAll({ - title (options = {}) { + // TODO: any -> Partial + title (options: any = {}) { const userOptions = options options = _.defaults({}, userOptions, { log: true }) @@ -98,7 +101,8 @@ export default (Commands, Cypress, cy, state) => { return resolveTitle() }, - window (options = {}) { + // TODO: any -> Partial + window (options: any = {}) { const userOptions = options options = _.defaults({}, userOptions, { log: true }) @@ -140,7 +144,8 @@ export default (Commands, Cypress, cy, state) => { return verifyAssertions() }, - document (options = {}) { + // TODO: any -> Partial + document (options: any = {}) { const userOptions = options options = _.defaults({}, userOptions, { log: true }) @@ -183,7 +188,8 @@ export default (Commands, Cypress, cy, state) => { return verifyAssertions() }, - viewport (presetOrWidth, heightOrOrientation, options = {}) { + // TODO: any -> Partial + viewport (presetOrWidth, heightOrOrientation, options: any = {}) { const userOptions = options if (_.isObject(heightOrOrientation)) { @@ -202,9 +208,12 @@ export default (Commands, Cypress, cy, state) => { const isPreset = typeof presetOrWidth === 'string' options._log = Cypress.log({ + // TODO: timeout below should be removed + // because cy.viewport option doesn't support `timeout` + // @see https://docs.cypress.io/api/commands/viewport#Arguments timeout: options.timeout, consoleProps () { - const obj = {} + const obj: Record = {} if (isPreset) { obj.Preset = presetOrWidth diff --git a/packages/driver/src/cy/commands/xhr.ts b/packages/driver/src/cy/commands/xhr.ts index b2b654ba3291..29cf190c4f00 100644 --- a/packages/driver/src/cy/commands/xhr.ts +++ b/packages/driver/src/cy/commands/xhr.ts @@ -5,10 +5,10 @@ import Promise from 'bluebird' import $utils from '../../cypress/utils' import $errUtils from '../../cypress/error_utils' import $stackUtils from '../../cypress/stack_utils' -import $Server from '../../cypress/server' +import $Server, { Server } from '../../cypress/server' import { $Location } from '../../cypress/location' -let server = null +let server: Server | null = null const tryDecodeUri = (uri) => { try { @@ -85,6 +85,21 @@ const setResponse = (state, xhr) => { return state('responses', responses) } +type XHRConsoleProps = { + Alias: string + Method: string + URL: string + 'Matched URL': string + Status: string + Duration: number + Stubbed: 'Yes' | 'No' + Request: object + Response: object + XHR: object + Note?: string + groups?: () => Array +} + const startXhrServer = (cy, state, config) => { const logs = {} @@ -119,7 +134,7 @@ const startXhrServer = (cy, state, config) => { event: true, timeout: 0, consoleProps: () => { - const consoleObj = { + const consoleObj: XHRConsoleProps = { Alias: alias, Method: xhr.method, URL: xhr.url, diff --git a/packages/driver/src/cy/keyboard.ts b/packages/driver/src/cy/keyboard.ts index 1df6537926e4..e9496d874f8e 100644 --- a/packages/driver/src/cy/keyboard.ts +++ b/packages/driver/src/cy/keyboard.ts @@ -6,7 +6,7 @@ import $errUtils from '../cypress/error_utils' import { USKeyboard } from '../cypress/UsKeyboardLayout' import $dom from '../dom' import $document from '../dom/document' -import $elements from '../dom/elements' +import $elements, { HTMLTextLikeInputElement } from '../dom/elements' // eslint-disable-next-line no-duplicate-imports import type { HTMLTextLikeElement } from '../dom/elements' import $selection from '../dom/selection' @@ -803,7 +803,7 @@ export class Keyboard { debug('setting element value', valToSet, activeEl) return $elements.setNativeProp( - activeEl as $elements.HTMLTextLikeInputElement, + activeEl as HTMLTextLikeInputElement, 'value', valToSet, ) diff --git a/packages/driver/src/cy/snapshots.ts b/packages/driver/src/cy/snapshots.ts index cab8099ca1ad..cf88e171347c 100644 --- a/packages/driver/src/cy/snapshots.ts +++ b/packages/driver/src/cy/snapshots.ts @@ -87,7 +87,7 @@ export default { padding: '20px', width: dimensions('outerWidth'), height: dimensions('outerHeight'), - }) + }) as JQuery $iframes.eq(idx).replaceWith($placeholder) const contents = `\ diff --git a/packages/driver/src/cypress/error_messages.ts b/packages/driver/src/cypress/error_messages.ts index d4b06241c9fb..3438c3b79581 100644 --- a/packages/driver/src/cypress/error_messages.ts +++ b/packages/driver/src/cypress/error_messages.ts @@ -78,7 +78,7 @@ const getRedirects = (obj, phrase, listIndentSize) => { const getHttpProps = (fields: { value: string, key: string }[] = []) => { return _ .chain(fields) - .reduce(formatProp, []) + .reduce(formatProp, []) .join('\n') .value() } diff --git a/packages/driver/src/cypress/error_utils.ts b/packages/driver/src/cypress/error_utils.ts index 1f4c143942b2..35daf3ed9aeb 100644 --- a/packages/driver/src/cypress/error_utils.ts +++ b/packages/driver/src/cypress/error_utils.ts @@ -79,7 +79,7 @@ const isSpecError = (spec, err) => { return _.includes(err.stack, spec.relative) } -const mergeErrProps = (origErr, ...newProps) => { +const mergeErrProps = (origErr: Error, ...newProps) => { return _.extend(origErr, ...newProps) } @@ -262,6 +262,8 @@ export class InternalCypressError extends Error { } export class CypressError extends Error { + docsUrl?: string + constructor (message) { super(message) @@ -283,13 +285,13 @@ const getUserInvocationStackFromError = (err) => { return err.userInvocationStack } -const internalErr = (err) => { +const internalErr = (err): InternalCypressError => { const newErr = new InternalCypressError(err.message) return mergeErrProps(newErr, err) } -const cypressErr = (err) => { +const cypressErr = (err): CypressError => { const newErr = new CypressError(err.message) return mergeErrProps(newErr, err) @@ -339,7 +341,7 @@ const docsUrlByParents = (msgPath) => { return docsUrlByParents(msgPath) } -const errByPath = (msgPath, args) => { +const errByPath = (msgPath, args?) => { let msgValue = _.get($errorMessages, msgPath) if (!msgValue) { diff --git a/packages/driver/src/cypress/proxy-logging.ts b/packages/driver/src/cypress/proxy-logging.ts index f9d1f4b5d07a..883f669ac4b8 100644 --- a/packages/driver/src/cypress/proxy-logging.ts +++ b/packages/driver/src/cypress/proxy-logging.ts @@ -1,3 +1,4 @@ +import _ from 'lodash' import type { Interception, Route } from '@packages/net-stubbing/lib/types' import type { BrowserPreRequest, BrowserResponseReceived, RequestError } from '@packages/proxy/lib/types' import $errUtils from './error_utils' diff --git a/packages/driver/src/cypress/resolvers.ts b/packages/driver/src/cypress/resolvers.ts index cc745e564654..4ac5e3ba3a3d 100644 --- a/packages/driver/src/cypress/resolvers.ts +++ b/packages/driver/src/cypress/resolvers.ts @@ -1,5 +1,4 @@ import _ from 'lodash' -import type $Cypress from '../..' /** * Fix property reads and writes that could potentially help the AUT to break out of its iframe. @@ -9,7 +8,7 @@ import type $Cypress from '../..' * @param accessedProp the property name being accessed (Symbol/number properties are not intercepted) * @param value the right-hand side of an assignment operation (accessedObject.accessedProp = value) */ -export function resolveWindowReference (this: typeof $Cypress, currentWindow: Window, accessedObject: Window | any, accessedProp: string, value?: any) { +export function resolveWindowReference (this: Cypress.Cypress, currentWindow: Window, accessedObject: Window | any, accessedProp: string, value?: any) { const { dom, state } = this const getTargetValue = () => { diff --git a/packages/driver/src/cypress/selector_playground.ts b/packages/driver/src/cypress/selector_playground.ts index 03f28192ac9f..b3aadf9234b3 100644 --- a/packages/driver/src/cypress/selector_playground.ts +++ b/packages/driver/src/cypress/selector_playground.ts @@ -6,7 +6,12 @@ import $errUtils from './error_utils' const SELECTOR_PRIORITIES = 'data-cy data-test data-testid id class tag attributes nth-child'.split(' ') -const reset = () => { +type Defaults = { + onElement: Cypress.SelectorPlaygroundDefaultsOptions['onElement'] | null + selectorPriority: Cypress.SelectorPlaygroundDefaultsOptions['selectorPriority'] +} + +const reset = (): Defaults => { return { onElement: null, selectorPriority: SELECTOR_PRIORITIES, diff --git a/packages/driver/src/cypress/server.ts b/packages/driver/src/cypress/server.ts index 2ccd3a289c7a..ffdd6908c7be 100644 --- a/packages/driver/src/cypress/server.ts +++ b/packages/driver/src/cypress/server.ts @@ -166,7 +166,15 @@ const defaults = (obj = {}) => { return _.extend(serverDefaults, obj) } -const create = (options = {}) => { +// TODO: Convert it to a class. +// It's written in this way to bypass type failures. +export type Server = { + restore: () => void + cancelPendingXhrs: () => any[] + bindTo: (win: Window) => void +} + +const create = (options = {}): Server => { options = _.defaults(options, serverDefaults) const xhrs = {} diff --git a/packages/driver/src/dom/coordinates.ts b/packages/driver/src/dom/coordinates.ts index 9a8dd0031da7..4f2733046ec4 100644 --- a/packages/driver/src/dom/coordinates.ts +++ b/packages/driver/src/dom/coordinates.ts @@ -22,13 +22,44 @@ const getFirstValidSizedRect = (el) => { }) || el.getBoundingClientRect() // otherwise fall back to the parent client rect } -/** - * @param {JQuery | HTMLElement} $el - */ -const getElementPositioning = ($el) => { +type ElementPositioning = { + scrollTop: number + scrollLeft: number + width: number + height: number + fromElViewport: { + doc: Document + x?: number + y?: number + top: number + left: number + right: number + bottom: number + topCenter: number + leftCenter: number + } + fromElWindow: { + x?: number + y?: number + top: number + left: number + topCenter: number + leftCenter: number + } + fromAutWindow: { + x?: number + y?: number + top: number + left: number + topCenter: number + leftCenter: number + } +} + +const getElementPositioning = ($el: JQuery | HTMLElement): ElementPositioning => { let autFrame - const el = $jquery.isJquery($el) ? $el[0] : $el + const el: HTMLElement = $jquery.isJquery($el) ? $el[0] : $el const win = $window.getWindowByElement(el) @@ -128,7 +159,12 @@ const getElementPositioning = ($el) => { } } -const getCoordsByPosition = (left, top, xPosition = 'center', yPosition = 'center') => { +const getCoordsByPosition = ( + left: number, + top: number, + xPosition: 'left' | 'center' | 'right' = 'center', + yPosition: 'top' | 'center' | 'bottom' = 'center', +) => { const getLeft = () => { /* eslint-disable default-case */ switch (xPosition) { diff --git a/packages/driver/src/dom/elements/nativeProps.ts b/packages/driver/src/dom/elements/nativeProps.ts index 11529595da20..fbc1094dffbb 100644 --- a/packages/driver/src/dom/elements/nativeProps.ts +++ b/packages/driver/src/dom/elements/nativeProps.ts @@ -18,7 +18,7 @@ const descriptor = any, opts: any) => any state: State + pauseTimers: (shouldPause: boolean) => Cypress.Chainable + // TODO: this function refers to clearTimeout at cy/timeouts.ts, which doesn't have any argument. + // But in many cases like cy/commands/screenshot.ts, it's called with a timeout id string. + // We should decide whether calling with id is correct or not. + clearTimeout: (timeoutId?: string) => Cypress.Chainable } interface Cypress { diff --git a/packages/extension/index.d.ts b/packages/extension/index.d.ts new file mode 100644 index 000000000000..902c9e199556 --- /dev/null +++ b/packages/extension/index.d.ts @@ -0,0 +1,5 @@ +/// + +declare const lib: typeof import('./lib/extension') + +export default lib \ No newline at end of file diff --git a/packages/net-stubbing/package.json b/packages/net-stubbing/package.json index a52eabc79c2a..ce048b9c3ba9 100644 --- a/packages/net-stubbing/package.json +++ b/packages/net-stubbing/package.json @@ -18,7 +18,6 @@ "throttle": "^1.0.3" }, "devDependencies": { - "@types/mocha": "7.0.2", "bin-up": "1.2.0", "chai": "4.2.0", "mocha": "7.1.2" diff --git a/packages/reporter/src/commands/command-model.ts b/packages/reporter/src/commands/command-model.ts index bd877bd18ea9..ec5ed9b21200 100644 --- a/packages/reporter/src/commands/command-model.ts +++ b/packages/reporter/src/commands/command-model.ts @@ -1,7 +1,7 @@ import _ from 'lodash' import { action, computed, observable } from 'mobx' -import Err from '../errors/err-model' +import Err, { ErrProps } from '../errors/err-model' import Instrument, { InstrumentProps } from '../instruments/instrument-model' import type { TimeoutID } from '../lib/types' @@ -20,7 +20,7 @@ interface RenderProps { } export interface CommandProps extends InstrumentProps { - err?: Err + err?: ErrProps event?: boolean number?: number numElements: number diff --git a/packages/reporter/src/main-runner.scss.d.ts b/packages/reporter/src/main-runner.scss.d.ts new file mode 100644 index 000000000000..132b232e8959 --- /dev/null +++ b/packages/reporter/src/main-runner.scss.d.ts @@ -0,0 +1,7 @@ +// This file is automatically generated. +// Please do not change this file! +interface CssExports { + +} +export const cssExports: CssExports; +export default cssExports; diff --git a/packages/reporter/src/main.scss.d.ts b/packages/reporter/src/main.scss.d.ts new file mode 100644 index 000000000000..132b232e8959 --- /dev/null +++ b/packages/reporter/src/main.scss.d.ts @@ -0,0 +1,7 @@ +// This file is automatically generated. +// Please do not change this file! +interface CssExports { + +} +export const cssExports: CssExports; +export default cssExports; diff --git a/packages/reporter/src/test/test-model.ts b/packages/reporter/src/test/test-model.ts index d46d45d277f4..2d9c4bc09b14 100644 --- a/packages/reporter/src/test/test-model.ts +++ b/packages/reporter/src/test/test-model.ts @@ -3,7 +3,7 @@ import { action, computed, observable } from 'mobx' import { FileDetails } from '@packages/ui-components' import Attempt from '../attempts/attempt-model' -import Err from '../errors/err-model' +import Err, { ErrProps } from '../errors/err-model' import { HookProps } from '../hooks/hook-model' import Runnable, { RunnableProps } from '../runnables/runnable-model' import { CommandProps } from '../commands/command-model' @@ -18,7 +18,7 @@ export type UpdateTestCallback = () => void export interface TestProps extends RunnableProps { state: TestState | null - err?: Err + err?: ErrProps isOpen?: boolean agents?: Array commands?: Array diff --git a/packages/runner-ct/src/app/KeyboardHelper.scss.d.ts b/packages/runner-ct/src/app/KeyboardHelper.scss.d.ts new file mode 100644 index 000000000000..132b232e8959 --- /dev/null +++ b/packages/runner-ct/src/app/KeyboardHelper.scss.d.ts @@ -0,0 +1,7 @@ +// This file is automatically generated. +// Please do not change this file! +interface CssExports { + +} +export const cssExports: CssExports; +export default cssExports; diff --git a/packages/runner-ct/src/app/NoSpec.scss.d.ts b/packages/runner-ct/src/app/NoSpec.scss.d.ts new file mode 100644 index 000000000000..132b232e8959 --- /dev/null +++ b/packages/runner-ct/src/app/NoSpec.scss.d.ts @@ -0,0 +1,7 @@ +// This file is automatically generated. +// Please do not change this file! +interface CssExports { + +} +export const cssExports: CssExports; +export default cssExports; diff --git a/packages/runner-ct/src/app/ReporterHeader.module.scss.d.ts b/packages/runner-ct/src/app/ReporterHeader.module.scss.d.ts new file mode 100644 index 000000000000..c353b869f4b7 --- /dev/null +++ b/packages/runner-ct/src/app/ReporterHeader.module.scss.d.ts @@ -0,0 +1,8 @@ +// This file is automatically generated. +// Please do not change this file! +interface CssExports { + 'ctReporterHeader': string; + 'display-none': string; +} +export const cssExports: CssExports; +export default cssExports; diff --git a/packages/runner-ct/src/app/RunnerCt.module.scss.d.ts b/packages/runner-ct/src/app/RunnerCt.module.scss.d.ts new file mode 100644 index 000000000000..04a5f2212d01 --- /dev/null +++ b/packages/runner-ct/src/app/RunnerCt.module.scss.d.ts @@ -0,0 +1,27 @@ +// This file is automatically generated. +// Please do not change this file! +interface CssExports { + 'app': string; + 'appWrapper': string; + 'appWrapperScreenshotting': string; + 'ctDevtoolsContainer': string; + 'ctPluginToggleButton': string; + 'ctPlugins': string; + 'ctPluginsHeader': string; + 'ctPluginsName': string; + 'ctTogglePluginsSectionButton': string; + 'ctTogglePluginsSectionButtonOpen': string; + 'display-none': string; + 'folder': string; + 'largerIcon': string; + 'leftNav': string; + 'noSpecAut': string; + 'noSpecsDescription': string; + 'reporter': string; + 'runner': string; + 'runnerCt': string; + 'screenshotting': string; + 'size-container': string; +} +export const cssExports: CssExports; +export default cssExports; diff --git a/packages/runner-ct/src/app/RunnerCt.scss.d.ts b/packages/runner-ct/src/app/RunnerCt.scss.d.ts new file mode 100644 index 000000000000..132b232e8959 --- /dev/null +++ b/packages/runner-ct/src/app/RunnerCt.scss.d.ts @@ -0,0 +1,7 @@ +// This file is automatically generated. +// Please do not change this file! +interface CssExports { + +} +export const cssExports: CssExports; +export default cssExports; diff --git a/packages/runner-ct/src/iframe/iframes.scss.d.ts b/packages/runner-ct/src/iframe/iframes.scss.d.ts new file mode 100644 index 000000000000..132b232e8959 --- /dev/null +++ b/packages/runner-ct/src/iframe/iframes.scss.d.ts @@ -0,0 +1,7 @@ +// This file is automatically generated. +// Please do not change this file! +interface CssExports { + +} +export const cssExports: CssExports; +export default cssExports; diff --git a/packages/runner-ct/src/plugins/devtools-fallback.scss.d.ts b/packages/runner-ct/src/plugins/devtools-fallback.scss.d.ts new file mode 100644 index 000000000000..132b232e8959 --- /dev/null +++ b/packages/runner-ct/src/plugins/devtools-fallback.scss.d.ts @@ -0,0 +1,7 @@ +// This file is automatically generated. +// Please do not change this file! +interface CssExports { + +} +export const cssExports: CssExports; +export default cssExports; diff --git a/packages/runner-shared/src/header/index.tsx b/packages/runner-shared/src/header/index.tsx index d7d0fd5f57d4..e524ec80e254 100644 --- a/packages/runner-shared/src/header/index.tsx +++ b/packages/runner-shared/src/header/index.tsx @@ -230,7 +230,7 @@ export class Header extends Component { } this.props.state.updateWindowDimensions({ - headerHeight: $(this.headerRef.current).outerHeight(), + headerHeight: $(this.headerRef.current).outerHeight() as number, }) }; diff --git a/packages/runner-shared/src/message/message.scss.d.ts b/packages/runner-shared/src/message/message.scss.d.ts new file mode 100644 index 000000000000..132b232e8959 --- /dev/null +++ b/packages/runner-shared/src/message/message.scss.d.ts @@ -0,0 +1,7 @@ +// This file is automatically generated. +// Please do not change this file! +interface CssExports { + +} +export const cssExports: CssExports; +export default cssExports; diff --git a/packages/runner-shared/src/mobx.ts b/packages/runner-shared/src/mobx.ts index bba94018f359..22d65446d781 100644 --- a/packages/runner-shared/src/mobx.ts +++ b/packages/runner-shared/src/mobx.ts @@ -1,5 +1,5 @@ import { observer } from 'mobx-react' -import * as React from 'react' +import type * as React from 'react' /** * Wraps MobX `observer` to properly add a component `displayName` for debugging purposes diff --git a/packages/runner-shared/src/selector-playground/selector-playground.scss.d.ts b/packages/runner-shared/src/selector-playground/selector-playground.scss.d.ts new file mode 100644 index 000000000000..132b232e8959 --- /dev/null +++ b/packages/runner-shared/src/selector-playground/selector-playground.scss.d.ts @@ -0,0 +1,7 @@ +// This file is automatically generated. +// Please do not change this file! +interface CssExports { + +} +export const cssExports: CssExports; +export default cssExports; diff --git a/packages/runner-shared/src/snapshot-controls/snapshot-controls.scss.d.ts b/packages/runner-shared/src/snapshot-controls/snapshot-controls.scss.d.ts new file mode 100644 index 000000000000..132b232e8959 --- /dev/null +++ b/packages/runner-shared/src/snapshot-controls/snapshot-controls.scss.d.ts @@ -0,0 +1,7 @@ +// This file is automatically generated. +// Please do not change this file! +interface CssExports { + +} +export const cssExports: CssExports; +export default cssExports; diff --git a/packages/runner-shared/src/spec-list/SpecList.module.scss.d.ts b/packages/runner-shared/src/spec-list/SpecList.module.scss.d.ts new file mode 100644 index 000000000000..1e69485e7a0d --- /dev/null +++ b/packages/runner-shared/src/spec-list/SpecList.module.scss.d.ts @@ -0,0 +1,13 @@ +// This file is automatically generated. +// Please do not change this file! +interface CssExports { + 'a': string; + 'isClosed': string; + 'isSelected': string; + 'li': string; + 'nav': string; + 'searchInput': string; + 'ul': string; +} +export const cssExports: CssExports; +export default cssExports; diff --git a/packages/runner-shared/src/spec-list/SpecList.tsx b/packages/runner-shared/src/spec-list/SpecList.tsx index d7e9c1a0bdaf..b4e1600b81c2 100644 --- a/packages/runner-shared/src/spec-list/SpecList.tsx +++ b/packages/runner-shared/src/spec-list/SpecList.tsx @@ -1,6 +1,6 @@ /// -import React, { useCallback, useMemo, useRef } from 'react' +import React, { MutableRefObject, useCallback, useMemo, useRef } from 'react' import cs from 'classnames' import { throttle } from 'lodash' import { SearchInput, FileTree, SpecificTreeNode, TreeFile, FileBase, TreeFolder, VirtualizedTreeRef } from '@cypress/design-system' @@ -47,7 +47,7 @@ export const SpecList: React.FC = ({ searchRef, className, specs, } }, [searchRef]) - const onEnter = useCallback(() => fileTreeRef.current.focus(), []) + const onEnter = useCallback(() => fileTreeRef.current!.focus(), []) const onVerticalArrowKey = useCallback((arrow: 'up' | 'down') => { if (arrow === 'down') { @@ -74,7 +74,7 @@ export const SpecList: React.FC = ({ searchRef, className, specs,
{/* TODO: Do we need any other rootDirectories? */} } files={matches} rootDirectory="/" emptyPlaceholder="No specs found" diff --git a/packages/runner-shared/src/studio/assertions-menu.scss.d.ts b/packages/runner-shared/src/studio/assertions-menu.scss.d.ts new file mode 100644 index 000000000000..132b232e8959 --- /dev/null +++ b/packages/runner-shared/src/studio/assertions-menu.scss.d.ts @@ -0,0 +1,7 @@ +// This file is automatically generated. +// Please do not change this file! +interface CssExports { + +} +export const cssExports: CssExports; +export default cssExports; diff --git a/packages/runner-shared/src/studio/studio-modals.scss.d.ts b/packages/runner-shared/src/studio/studio-modals.scss.d.ts new file mode 100644 index 000000000000..132b232e8959 --- /dev/null +++ b/packages/runner-shared/src/studio/studio-modals.scss.d.ts @@ -0,0 +1,7 @@ +// This file is automatically generated. +// Please do not change this file! +interface CssExports { + +} +export const cssExports: CssExports; +export default cssExports; diff --git a/packages/runner-shared/src/styles.module.scss.d.ts b/packages/runner-shared/src/styles.module.scss.d.ts new file mode 100644 index 000000000000..fd8bc08458a3 --- /dev/null +++ b/packages/runner-shared/src/styles.module.scss.d.ts @@ -0,0 +1,7 @@ +// This file is automatically generated. +// Please do not change this file! +interface CssExports { + 'specsList': string; +} +export const cssExports: CssExports; +export default cssExports; diff --git a/packages/runner/index.d.ts b/packages/runner/index.d.ts index f310b6a35425..918d244cd9e7 100644 --- a/packages/runner/index.d.ts +++ b/packages/runner/index.d.ts @@ -5,3 +5,6 @@ /// /// /// + +/// +/// diff --git a/packages/runner/src/main.scss.d.ts b/packages/runner/src/main.scss.d.ts new file mode 100644 index 000000000000..132b232e8959 --- /dev/null +++ b/packages/runner/src/main.scss.d.ts @@ -0,0 +1,7 @@ +// This file is automatically generated. +// Please do not change this file! +interface CssExports { + +} +export const cssExports: CssExports; +export default cssExports; diff --git a/packages/server/index.d.ts b/packages/server/index.d.ts index f1bb33865fe2..5b3c15366d63 100644 --- a/packages/server/index.d.ts +++ b/packages/server/index.d.ts @@ -4,6 +4,7 @@ /// /// /// +/// /// diff --git a/packages/server/lib/browsers/chrome.ts b/packages/server/lib/browsers/chrome.ts index ff6dfc62745c..1de4b17b7d18 100644 --- a/packages/server/lib/browsers/chrome.ts +++ b/packages/server/lib/browsers/chrome.ts @@ -207,7 +207,7 @@ const _normalizeArgExtensions = function (extPath, args, pluginExtensions, brows userExtensions = userExtensions.concat(pluginExtensions) } - const extensions = [].concat(userExtensions, extPath, pathToTheme) + const extensions = ([] as any).concat(userExtensions, extPath, pathToTheme) args.push(LOAD_EXTENSION + _.compact(extensions).join(',')) diff --git a/packages/server/test/support/fixtures/projects/webpack-preprocessor-awesome-typescript-loader/cypress/integration/failing_spec.ts b/packages/server/test/support/fixtures/projects/webpack-preprocessor-awesome-typescript-loader/cypress/integration/failing_spec.ts index 88b86372457d..1c85959e31a2 100644 --- a/packages/server/test/support/fixtures/projects/webpack-preprocessor-awesome-typescript-loader/cypress/integration/failing_spec.ts +++ b/packages/server/test/support/fixtures/projects/webpack-preprocessor-awesome-typescript-loader/cypress/integration/failing_spec.ts @@ -1,3 +1,9 @@ +// https://github.com/cypress-io/cypress/issues/18069 +// This fixture project is copied to packages/server/.project and executed there. +// Because of that, the reference path is wrong here. +/// +/// + /** * This tests the error UI for a certain webpack preprocessor setup. * It does this by having a test fail and then a subsequent test run that @@ -24,7 +30,7 @@ context('validation errors', function () { }) verify(this, { - line: 23, + line: 29, column: 8, message: 'can only accept a string preset or', stack: ['throwErrBadArgs', 'From Your Spec Code:'], diff --git a/packages/server/test/support/fixtures/projects/webpack-preprocessor-awesome-typescript-loader/tsconfig.json b/packages/server/test/support/fixtures/projects/webpack-preprocessor-awesome-typescript-loader/tsconfig.json index 57fc6a81fe50..fdd85d1d5ae4 100644 --- a/packages/server/test/support/fixtures/projects/webpack-preprocessor-awesome-typescript-loader/tsconfig.json +++ b/packages/server/test/support/fixtures/projects/webpack-preprocessor-awesome-typescript-loader/tsconfig.json @@ -6,6 +6,7 @@ "sourceMap": false, "inlineSourceMap": true, "inlineSources": false, - "types": ["cypress"] + "typeRoots": ["../../../../cli/types"], + // "types": ["cypress"] } } diff --git a/packages/ui-components/cypress/support/test-entry.scss.d.ts b/packages/ui-components/cypress/support/test-entry.scss.d.ts new file mode 100644 index 000000000000..132b232e8959 --- /dev/null +++ b/packages/ui-components/cypress/support/test-entry.scss.d.ts @@ -0,0 +1,7 @@ +// This file is automatically generated. +// Please do not change this file! +interface CssExports { + +} +export const cssExports: CssExports; +export default cssExports; diff --git a/packages/web-config/index.d.ts b/packages/web-config/index.d.ts new file mode 100644 index 000000000000..1e7cc7cbe756 --- /dev/null +++ b/packages/web-config/index.d.ts @@ -0,0 +1,2 @@ +/// +/// \ No newline at end of file diff --git a/packages/web-config/package.json b/packages/web-config/package.json index 56ba8d3b5ce8..3ad09744f6e2 100644 --- a/packages/web-config/package.json +++ b/packages/web-config/package.json @@ -14,6 +14,7 @@ "@types/jsdom": "12.2.4", "@types/mock-require": "2.0.0", "@types/webpack": "4.41.0", + "@types/webpack-dev-server": "^4.0.0", "ansi-escapes": "4.3.1", "arraybuffer-loader": "1.0.8", "autoprefixer": "9.7.4", @@ -24,6 +25,7 @@ "clean-webpack-plugin": "2.0.2", "copy-webpack-plugin": "5.1.2", "css-loader": "2.1.1", + "css-modules-typescript-loader": "4.0.1", "execa": "^5.0.0", "extract-text-webpack-plugin": "4.0.0-beta.0", "file-loader": "4.3.0", diff --git a/packages/web-config/webpack.config.base.ts b/packages/web-config/webpack.config.base.ts index cf636b6cc460..c7ba866e881e 100644 --- a/packages/web-config/webpack.config.base.ts +++ b/packages/web-config/webpack.config.base.ts @@ -65,6 +65,13 @@ function makeSassLoaders ({ modules }: { modules: boolean }): RuleSetRule { exclude, enforce: 'pre', use: [ + { + loader: require.resolve('css-modules-typescript-loader'), + options: { + modules: true, + mode: process.env.CI ? 'verify' : 'emit', + }, + }, { loader: require.resolve('css-loader'), options: { diff --git a/patches/@types+jquery+3.3.31.patch b/patches/@types+jquery+3.3.31.patch new file mode 100644 index 000000000000..99e90137d8e9 --- /dev/null +++ b/patches/@types+jquery+3.3.31.patch @@ -0,0 +1,39622 @@ +diff --git a/node_modules/@types/jquery/JQuery.d.ts b/node_modules/@types/jquery/JQuery.d.ts +index ed0147a..7542ce4 100644 +--- a/node_modules/@types/jquery/JQuery.d.ts ++++ b/node_modules/@types/jquery/JQuery.d.ts +@@ -1,12942 +1,12942 @@ +-// tslint:disable:jsdoc-format +-// tslint:disable:max-line-length +-// tslint:disable:no-irregular-whitespace ++// // tslint:disable:jsdoc-format ++// // tslint:disable:max-line-length ++// // tslint:disable:no-irregular-whitespace + +-interface JQuery extends Iterable { +- /** +- * A string containing the jQuery version number. +- * @see \`{@link https://api.jquery.com/jquery-2/#jquery1 }\` +- * @since 1.0 +- * @example ​ ````Determine if an object is a jQuery object +-```javascript +-var a = { what: "A regular JS object" }, +- b = $( "body" ); +-​ +-if ( a.jquery ) { // Falsy, since it's undefined +- alert( "a is a jQuery object!" ); +-} +-​ +-if ( b.jquery ) { // Truthy, since it's a string +- alert( "b is a jQuery object!" ); +-} +-``` +- * @example ​ ````Get the current version of jQuery running on the page +-```javascript +-alert( "You are running jQuery version: " + $.fn.jquery ); +-``` +- */ +- jquery: string; +- /** +- * The number of elements in the jQuery object. +- * @see \`{@link https://api.jquery.com/length/ }\` +- * @since 1.0 +- * @example ​ ````Count the divs. Click to add more. +-```html +- +- +- +- +- length demo +- +- +- +- +-​ +-
​ +- +-​ +- +- +-``` +- */ +- length: number; +- /** +- * Create a new jQuery object with elements added to the set of matched elements. +- * @param selector A string representing a selector expression to find additional elements to add to the set of matched elements. +- * @param context The point in the document at which the selector should begin matching; similar to the context +- * argument of the $(selector, context) method. +- * @see \`{@link https://api.jquery.com/add/ }\` +- * @since 1.4 +- */ +- add(selector: JQuery.Selector, context: Element): this; +- // TODO: The return type should reflect newly selected types. +- /** +- * Create a new jQuery object with elements added to the set of matched elements. +- * @param selector_elements_html_selection _@param_ `selector_elements_html_selection` +- *
+- * * `selector` — A string representing a selector expression to find additional elements to add to the set of matched elements.
+- * * `elements` — One or more elements to add to the set of matched elements.
+- * * `html` — An HTML fragment to add to the set of matched elements.
+- * * `selection` — An existing jQuery object to add to the set of matched elements. +- * @see \`{@link https://api.jquery.com/add/ }\` +- * @since 1.0 +- * @since 1.3.2 +- * @example ​ ````Finds all divs and makes a border. Then adds all paragraphs to the jQuery object to set their backgrounds yellow. +-```html +- +- +- +- +- add demo +- +- +- +- +-​ +-
+-
+-
+-
+-
+-
+-​ +-

Added this... (notice no border)

+-​ +- +-​ +- +- +-``` +- * @example ​ ````Adds more elements, matched by the given expression, to the set of matched elements. +-```html +- +- +- +- +- add demo +- +- +- +-​ +-

Hello

+-Hello Again +-​ +- +-​ +- +- +-``` +- * @example ​ ````Adds more elements, created on the fly, to the set of matched elements. +-```html +- +- +- +- +- add demo +- +- +- +-​ +-

Hello

+-​ +- +-​ +- +- +-``` +- * @example ​ ````Adds one or more Elements to the set of matched elements. +-```html +- +- +- +- +- add demo +- +- +- +-​ +-

Hello

+-Hello Again +-​ +- +-​ +- +- +-``` +- * @example ​ ````Demonstrates how to add (or push) elements to an existing collection +-```html +- +- +- +- +- add demo +- +- +- +-​ +-

Hello

+-Hello Again +-​ +- +-​ +- +- +-``` +- */ +- add(selector_elements_html_selection: JQuery.Selector | JQuery.TypeOrArray | JQuery.htmlString | JQuery | JQuery.Node): this; +- /** +- * Add the previous set of elements on the stack to the current set, optionally filtered by a selector. +- * @param selector A string containing a selector expression to match the current set of elements against. +- * @see \`{@link https://api.jquery.com/addBack/ }\` +- * @since 1.8 +- * @example ​ ````The .addBack() method causes the previous set of DOM elements in the traversal stack to be added to the current set. In the first example, the top stack contains the set resulting from .find("p"). In the second example, .addBack() adds the previous set of elements on the stack — in this case $("div.after-addback") — to the current set, selecting both the div and its enclosed paragraphs. +-```html +- +- +- +- +- addBack demo +- +- +- +- +-​ +-
+-

Before addBack()

+-
+-

First Paragraph

+-

Second Paragraph

+-
+-
+-
+-

After addBack()

+-
+-

First Paragraph

+-

Second Paragraph

+-
+-
+-​ +- +-​ +- +- +-``` +- */ +- addBack(selector?: JQuery.Selector): this; +- /** +- * Adds the specified class(es) to each element in the set of matched elements. +- * @param className_function _@param_ `className_function` +- *
+- * * `className` — One or more space-separated classes to be added to the class attribute of each matched element.
+- * * `function` — A function returning one or more space-separated class names to be added to the existing class +- * name(s). Receives the index position of the element in the set and the existing class name(s) as +- * arguments. Within the function, `this` refers to the current element in the set. +- * @see \`{@link https://api.jquery.com/addClass/ }\` +- * @since 1.0 +- * @since 1.4 +- * @since 3.3 +- * @example ​ ````Add the class "selected" to the matched elements. +-```html +- +- +- +- +- addClass demo +- +- +- +- +-​ +-

Hello

+-

and

+-

Goodbye

+-​ +- +-​ +- +- +-``` +- * @example ​ ````Add the classes "selected" and "highlight" to the matched elements. +-```html +- +- +- +- +- addClass demo +- +- +- +- +-​ +-

Hello

+-

and

+-

Goodbye

+-​ +- +-​ +- +- +-``` +- * @example ​ ````Pass in a function to .addClass() to add the "green" class to a div that already has a "red" class. +-```html +- +- +- +- +- addClass demo +- +- +- +- +-​ +-
This div should be white
+-
This div will be green because it now has the "green" and "red" classes. +- It would be red if the addClass function failed.
+-
This div should be white
+-

There are zero green divs

+-​ +- +-​ +- +- +-``` +- */ +- addClass(className_function: JQuery.TypeOrArray | ((this: TElement, index: number, currentClassName: string) => string)): this; +- /** +- * Insert content, specified by the parameter, after each element in the set of matched elements. +- * @param contents One or more additional DOM elements, text nodes, arrays of elements and text nodes, HTML strings, or +- * jQuery objects to insert after each element in the set of matched elements. +- * @see \`{@link https://api.jquery.com/after/ }\` +- * @since 1.0 +- * @example ​ ````Inserts some HTML after all paragraphs. +-```html +- +- +- +- +- after demo +- +- +- +- +-​ +-

I would like to say:

+-​ +- +-​ +- +- +-``` +- * @example ​ ````Inserts a DOM element after all paragraphs. +-```html +- +- +- +- +- after demo +- +- +- +- +-​ +-

I would like to say:

+-​ +- +-​ +- +- +-``` +- * @example ​ ````Inserts a jQuery object (similar to an Array of DOM Elements) after all paragraphs. +-```html +- +- +- +- +- after demo +- +- +- +- +-​ +-Hello +-

I would like to say:

+-​ +- +-​ +- +- +-``` +- */ +- after(...contents: Array>>): this; +- /** +- * Insert content, specified by the parameter, after each element in the set of matched elements. +- * @param function_functionーhtml _@param_ `function_functionーhtml` +- *
+- * * `function` — A function that returns an HTML string, DOM element(s), text node(s), or jQuery object to insert +- * after each element in the set of matched elements. Receives the index position of the element in the +- * set as an argument. Within the function, `this` refers to the current element in the set.
+- * * `functionーhtml` — A function that returns an HTML string, DOM element(s), text node(s), or jQuery object to insert +- * after each element in the set of matched elements. Receives the index position of the element in the +- * set and the old HTML value of the element as arguments. Within the function, `this` refers to the +- * current element in the set. +- * @see \`{@link https://api.jquery.com/after/ }\` +- * @since 1.4 +- * @since 1.10 +- */ +- after(function_functionーhtml: (this: TElement, index: number, html: string) => JQuery.htmlString | JQuery.TypeOrArray>): this; +- /** +- * Register a handler to be called when Ajax requests complete. This is an AjaxEvent. +- * @param handler The function to be invoked. +- * @see \`{@link https://api.jquery.com/ajaxComplete/ }\` +- * @since 1.0 +- * @example ​ ````Show a message when an Ajax request completes. +-```javascript +-$( document ).ajaxComplete(function( event, request, settings ) { +- $( "#msg" ).append( "
  • Request Complete.
  • " ); +-}); +-``` +- */ +- ajaxComplete(handler: (this: Document, +- event: JQuery.TriggeredEvent, +- jqXHR: JQuery.jqXHR, +- ajaxOptions: JQuery.AjaxSettings) => void | false): this; +- /** +- * Register a handler to be called when Ajax requests complete with an error. This is an Ajax Event. +- * @param handler The function to be invoked. +- * @see \`{@link https://api.jquery.com/ajaxError/ }\` +- * @since 1.0 +- * @example ​ ````Show a message when an Ajax request fails. +-```javascript +-$( document ).ajaxError(function( event, request, settings ) { +- $( "#msg" ).append( "
  • Error requesting page " + settings.url + "
  • " ); +-}); +-``` +- */ +- ajaxError(handler: (this: Document, +- event: JQuery.TriggeredEvent, +- jqXHR: JQuery.jqXHR, +- ajaxSettings: JQuery.AjaxSettings, +- thrownError: string) => void | false): this; +- /** +- * Attach a function to be executed before an Ajax request is sent. This is an Ajax Event. +- * @param handler The function to be invoked. +- * @see \`{@link https://api.jquery.com/ajaxSend/ }\` +- * @since 1.0 +- * @example ​ ````Show a message before an Ajax request is sent. +-```javascript +-$( document ).ajaxSend(function( event, request, settings ) { +- $( "#msg" ).append( "
  • Starting request at " + settings.url + "
  • " ); +-}); +-``` +- */ +- ajaxSend(handler: (this: Document, +- event: JQuery.TriggeredEvent, +- jqXHR: JQuery.jqXHR, +- ajaxOptions: JQuery.AjaxSettings) => void | false): this; +- /** +- * Register a handler to be called when the first Ajax request begins. This is an Ajax Event. +- * @param handler The function to be invoked. +- * @see \`{@link https://api.jquery.com/ajaxStart/ }\` +- * @since 1.0 +- * @example ​ ````Show a loading message whenever an Ajax request starts (and none is already active). +-```javascript +-$( document ).ajaxStart(function() { +- $( "#loading" ).show(); +-}); +-``` +- */ +- ajaxStart(handler: (this: Document) => void | false): this; +- /** +- * Register a handler to be called when all Ajax requests have completed. This is an Ajax Event. +- * @param handler The function to be invoked. +- * @see \`{@link https://api.jquery.com/ajaxStop/ }\` +- * @since 1.0 +- * @example ​ ````Hide a loading message after all the Ajax requests have stopped. +-```javascript +-$( document ).ajaxStop(function() { +- $( "#loading" ).hide(); +-}); +-``` +- */ +- ajaxStop(handler: (this: Document) => void | false): this; +- /** +- * Attach a function to be executed whenever an Ajax request completes successfully. This is an Ajax Event. +- * @param handler The function to be invoked. +- * @see \`{@link https://api.jquery.com/ajaxSuccess/ }\` +- * @since 1.0 +- * @example ​ ````Show a message when an Ajax request completes successfully. +-```javascript +-$( document ).ajaxSuccess(function( event, request, settings ) { +- $( "#msg" ).append( "
  • Successful Request!
  • " ); +-}); +-``` +- */ +- ajaxSuccess(handler: (this: Document, +- event: JQuery.TriggeredEvent, +- jqXHR: JQuery.jqXHR, +- ajaxOptions: JQuery.AjaxSettings, +- data: JQuery.PlainObject) => void | false): this; +- /** +- * Perform a custom animation of a set of CSS properties. +- * @param properties An object of CSS properties and values that the animation will move toward. +- * @param duration A string or number determining how long the animation will run. +- * @param easing A string indicating which easing function to use for the transition. +- * @param complete A function to call once the animation is complete, called once per matched element. +- * @see \`{@link https://api.jquery.com/animate/ }\` +- * @since 1.0 +- * @example ​ ````An example of using an 'easing' function to provide a different style of animation. This will only work if you have a plugin that provides this easing function. Note, this code will do nothing unless the paragraph element is hidden. +-```javascript +-$( "p" ).animate({ +- opacity: "show" +-}, "slow", "easein" ); +-``` +- * @example ​ ````Animate all paragraphs and execute a callback function when the animation is complete. The first argument is an object of CSS properties, the second specifies that the animation should take 1000 milliseconds to complete, the third states the easing type, and the fourth argument is an anonymous callback function. +-```javascript +-$( "p" ).animate({ +- height: 200, +- width: 400, +- opacity: 0.5 +-}, 1000, "linear", function() { +- alert( "all done" ); +-}); +-``` +- */ +- animate(properties: JQuery.PlainObject, +- duration: JQuery.Duration, +- easing: string, +- complete?: (this: TElement) => void): this; +- /** +- * Perform a custom animation of a set of CSS properties. +- * @param properties An object of CSS properties and values that the animation will move toward. +- * @param duration_easing _@param_ `duration_easing` +- *
    +- * * `duration` — A string or number determining how long the animation will run.
    +- * * `easing` — A string indicating which easing function to use for the transition. +- * @param complete A function to call once the animation is complete, called once per matched element. +- * @see \`{@link https://api.jquery.com/animate/ }\` +- * @since 1.0 +- * @example ​ ````Click the button to animate the div with a number of different properties. +-```html +- +- +- +- +- animate demo +- +- +- +- +-​ +- +-
    Hello!
    +-​ +- +-​ +- +- +-``` +- * @example ​ ````Animates a div's left property with a relative value. Click several times on the buttons to see the relative animations queued up. +-```html +- +- +- +- +- animate demo +- +- +- +- +-​ +- +- +-
    +-​ +- +-​ +- +- +-``` +- * @example ​ ````Animate all paragraphs to toggle both height and opacity, completing the animation within 600 milliseconds. +-```javascript +-$( "p" ).animate({ +- height: "toggle", +- opacity: "toggle" +-}, "slow" ); +-``` +- * @example ​ ````Animate all paragraphs to a left style of 50 and opacity of 1 (opaque, visible), completing the animation within 500 milliseconds. +-```javascript +-$( "p" ).animate({ +- left: 50, +- opacity: 1 +-}, 500 ); +-``` +- */ +- animate(properties: JQuery.PlainObject, +- duration_easing: JQuery.Duration | string, +- complete?: (this: TElement) => void): this; +- /** +- * Perform a custom animation of a set of CSS properties. +- * @param properties An object of CSS properties and values that the animation will move toward. +- * @param options A map of additional options to pass to the method. +- * @see \`{@link https://api.jquery.com/animate/ }\` +- * @since 1.0 +- * @example ​ ````The first button shows how an unqueued animation works. It expands the div out to 90% width while the font-size is increasing. Once the font-size change is complete, the border animation will begin. ++// interface JQuery extends Iterable { ++// /** ++// * A string containing the jQuery version number. ++// * @see \`{@link https://api.jquery.com/jquery-2/#jquery1 }\` ++// * @since 1.0 ++// * @example ​ ````Determine if an object is a jQuery object ++// ```javascript ++// var a = { what: "A regular JS object" }, ++// b = $( "body" ); ++// ​ ++// if ( a.jquery ) { // Falsy, since it's undefined ++// alert( "a is a jQuery object!" ); ++// } ++// ​ ++// if ( b.jquery ) { // Truthy, since it's a string ++// alert( "b is a jQuery object!" ); ++// } ++// ``` ++// * @example ​ ````Get the current version of jQuery running on the page ++// ```javascript ++// alert( "You are running jQuery version: " + $.fn.jquery ); ++// ``` ++// */ ++// jquery: string; ++// /** ++// * The number of elements in the jQuery object. ++// * @see \`{@link https://api.jquery.com/length/ }\` ++// * @since 1.0 ++// * @example ​ ````Count the divs. Click to add more. ++// ```html ++// ++// ++// ++// ++// length demo ++// ++// ++// ++// ++// ​ ++//
    ​ ++// ++// ​ ++// ++// ++// ``` ++// */ ++// length: number; ++// /** ++// * Create a new jQuery object with elements added to the set of matched elements. ++// * @param selector A string representing a selector expression to find additional elements to add to the set of matched elements. ++// * @param context The point in the document at which the selector should begin matching; similar to the context ++// * argument of the $(selector, context) method. ++// * @see \`{@link https://api.jquery.com/add/ }\` ++// * @since 1.4 ++// */ ++// add(selector: JQuery.Selector, context: Element): this; ++// // TODO: The return type should reflect newly selected types. ++// /** ++// * Create a new jQuery object with elements added to the set of matched elements. ++// * @param selector_elements_html_selection _@param_ `selector_elements_html_selection` ++// *
    ++// * * `selector` — A string representing a selector expression to find additional elements to add to the set of matched elements.
    ++// * * `elements` — One or more elements to add to the set of matched elements.
    ++// * * `html` — An HTML fragment to add to the set of matched elements.
    ++// * * `selection` — An existing jQuery object to add to the set of matched elements. ++// * @see \`{@link https://api.jquery.com/add/ }\` ++// * @since 1.0 ++// * @since 1.3.2 ++// * @example ​ ````Finds all divs and makes a border. Then adds all paragraphs to the jQuery object to set their backgrounds yellow. ++// ```html ++// ++// ++// ++// ++// add demo ++// ++// ++// ++// ++// ​ ++//
    ++//
    ++//
    ++//
    ++//
    ++//
    ++// ​ ++//

    Added this... (notice no border)

    ++// ​ ++// ++// ​ ++// ++// ++// ``` ++// * @example ​ ````Adds more elements, matched by the given expression, to the set of matched elements. ++// ```html ++// ++// ++// ++// ++// add demo ++// ++// ++// ++// ​ ++//

    Hello

    ++// Hello Again ++// ​ ++// ++// ​ ++// ++// ++// ``` ++// * @example ​ ````Adds more elements, created on the fly, to the set of matched elements. ++// ```html ++// ++// ++// ++// ++// add demo ++// ++// ++// ++// ​ ++//

    Hello

    ++// ​ ++// ++// ​ ++// ++// ++// ``` ++// * @example ​ ````Adds one or more Elements to the set of matched elements. ++// ```html ++// ++// ++// ++// ++// add demo ++// ++// ++// ++// ​ ++//

    Hello

    ++// Hello Again ++// ​ ++// ++// ​ ++// ++// ++// ``` ++// * @example ​ ````Demonstrates how to add (or push) elements to an existing collection ++// ```html ++// ++// ++// ++// ++// add demo ++// ++// ++// ++// ​ ++//

    Hello

    ++// Hello Again ++// ​ ++// ++// ​ ++// ++// ++// ``` ++// */ ++// add(selector_elements_html_selection: JQuery.Selector | JQuery.TypeOrArray | JQuery.htmlString | JQuery | JQuery.Node): this; ++// /** ++// * Add the previous set of elements on the stack to the current set, optionally filtered by a selector. ++// * @param selector A string containing a selector expression to match the current set of elements against. ++// * @see \`{@link https://api.jquery.com/addBack/ }\` ++// * @since 1.8 ++// * @example ​ ````The .addBack() method causes the previous set of DOM elements in the traversal stack to be added to the current set. In the first example, the top stack contains the set resulting from .find("p"). In the second example, .addBack() adds the previous set of elements on the stack — in this case $("div.after-addback") — to the current set, selecting both the div and its enclosed paragraphs. ++// ```html ++// ++// ++// ++// ++// addBack demo ++// ++// ++// ++// ++// ​ ++//
    ++//

    Before addBack()

    ++//
    ++//

    First Paragraph

    ++//

    Second Paragraph

    ++//
    ++//
    ++//
    ++//

    After addBack()

    ++//
    ++//

    First Paragraph

    ++//

    Second Paragraph

    ++//
    ++//
    ++// ​ ++// ++// ​ ++// ++// ++// ``` ++// */ ++// addBack(selector?: JQuery.Selector): this; ++// /** ++// * Adds the specified class(es) to each element in the set of matched elements. ++// * @param className_function _@param_ `className_function` ++// *
    ++// * * `className` — One or more space-separated classes to be added to the class attribute of each matched element.
    ++// * * `function` — A function returning one or more space-separated class names to be added to the existing class ++// * name(s). Receives the index position of the element in the set and the existing class name(s) as ++// * arguments. Within the function, `this` refers to the current element in the set. ++// * @see \`{@link https://api.jquery.com/addClass/ }\` ++// * @since 1.0 ++// * @since 1.4 ++// * @since 3.3 ++// * @example ​ ````Add the class "selected" to the matched elements. ++// ```html ++// ++// ++// ++// ++// addClass demo ++// ++// ++// ++// ++// ​ ++//

    Hello

    ++//

    and

    ++//

    Goodbye

    ++// ​ ++// ++// ​ ++// ++// ++// ``` ++// * @example ​ ````Add the classes "selected" and "highlight" to the matched elements. ++// ```html ++// ++// ++// ++// ++// addClass demo ++// ++// ++// ++// ++// ​ ++//

    Hello

    ++//

    and

    ++//

    Goodbye

    ++// ​ ++// ++// ​ ++// ++// ++// ``` ++// * @example ​ ````Pass in a function to .addClass() to add the "green" class to a div that already has a "red" class. ++// ```html ++// ++// ++// ++// ++// addClass demo ++// ++// ++// ++// ++// ​ ++//
    This div should be white
    ++//
    This div will be green because it now has the "green" and "red" classes. ++// It would be red if the addClass function failed.
    ++//
    This div should be white
    ++//

    There are zero green divs

    ++// ​ ++// ++// ​ ++// ++// ++// ``` ++// */ ++// addClass(className_function: JQuery.TypeOrArray | ((this: TElement, index: number, currentClassName: string) => string)): this; ++// /** ++// * Insert content, specified by the parameter, after each element in the set of matched elements. ++// * @param contents One or more additional DOM elements, text nodes, arrays of elements and text nodes, HTML strings, or ++// * jQuery objects to insert after each element in the set of matched elements. ++// * @see \`{@link https://api.jquery.com/after/ }\` ++// * @since 1.0 ++// * @example ​ ````Inserts some HTML after all paragraphs. ++// ```html ++// ++// ++// ++// ++// after demo ++// ++// ++// ++// ++// ​ ++//

    I would like to say:

    ++// ​ ++// ++// ​ ++// ++// ++// ``` ++// * @example ​ ````Inserts a DOM element after all paragraphs. ++// ```html ++// ++// ++// ++// ++// after demo ++// ++// ++// ++// ++// ​ ++//

    I would like to say:

    ++// ​ ++// ++// ​ ++// ++// ++// ``` ++// * @example ​ ````Inserts a jQuery object (similar to an Array of DOM Elements) after all paragraphs. ++// ```html ++// ++// ++// ++// ++// after demo ++// ++// ++// ++// ++// ​ ++// Hello ++//

    I would like to say:

    ++// ​ ++// ++// ​ ++// ++// ++// ``` ++// */ ++// after(...contents: Array>>): this; ++// /** ++// * Insert content, specified by the parameter, after each element in the set of matched elements. ++// * @param function_functionーhtml _@param_ `function_functionーhtml` ++// *
    ++// * * `function` — A function that returns an HTML string, DOM element(s), text node(s), or jQuery object to insert ++// * after each element in the set of matched elements. Receives the index position of the element in the ++// * set as an argument. Within the function, `this` refers to the current element in the set.
    ++// * * `functionーhtml` — A function that returns an HTML string, DOM element(s), text node(s), or jQuery object to insert ++// * after each element in the set of matched elements. Receives the index position of the element in the ++// * set and the old HTML value of the element as arguments. Within the function, `this` refers to the ++// * current element in the set. ++// * @see \`{@link https://api.jquery.com/after/ }\` ++// * @since 1.4 ++// * @since 1.10 ++// */ ++// after(function_functionーhtml: (this: TElement, index: number, html: string) => JQuery.htmlString | JQuery.TypeOrArray>): this; ++// /** ++// * Register a handler to be called when Ajax requests complete. This is an AjaxEvent. ++// * @param handler The function to be invoked. ++// * @see \`{@link https://api.jquery.com/ajaxComplete/ }\` ++// * @since 1.0 ++// * @example ​ ````Show a message when an Ajax request completes. ++// ```javascript ++// $( document ).ajaxComplete(function( event, request, settings ) { ++// $( "#msg" ).append( "
  • Request Complete.
  • " ); ++// }); ++// ``` ++// */ ++// ajaxComplete(handler: (this: Document, ++// event: JQuery.TriggeredEvent, ++// jqXHR: JQuery.jqXHR, ++// ajaxOptions: JQuery.AjaxSettings) => void | false): this; ++// /** ++// * Register a handler to be called when Ajax requests complete with an error. This is an Ajax Event. ++// * @param handler The function to be invoked. ++// * @see \`{@link https://api.jquery.com/ajaxError/ }\` ++// * @since 1.0 ++// * @example ​ ````Show a message when an Ajax request fails. ++// ```javascript ++// $( document ).ajaxError(function( event, request, settings ) { ++// $( "#msg" ).append( "
  • Error requesting page " + settings.url + "
  • " ); ++// }); ++// ``` ++// */ ++// ajaxError(handler: (this: Document, ++// event: JQuery.TriggeredEvent, ++// jqXHR: JQuery.jqXHR, ++// ajaxSettings: JQuery.AjaxSettings, ++// thrownError: string) => void | false): this; ++// /** ++// * Attach a function to be executed before an Ajax request is sent. This is an Ajax Event. ++// * @param handler The function to be invoked. ++// * @see \`{@link https://api.jquery.com/ajaxSend/ }\` ++// * @since 1.0 ++// * @example ​ ````Show a message before an Ajax request is sent. ++// ```javascript ++// $( document ).ajaxSend(function( event, request, settings ) { ++// $( "#msg" ).append( "
  • Starting request at " + settings.url + "
  • " ); ++// }); ++// ``` ++// */ ++// ajaxSend(handler: (this: Document, ++// event: JQuery.TriggeredEvent, ++// jqXHR: JQuery.jqXHR, ++// ajaxOptions: JQuery.AjaxSettings) => void | false): this; ++// /** ++// * Register a handler to be called when the first Ajax request begins. This is an Ajax Event. ++// * @param handler The function to be invoked. ++// * @see \`{@link https://api.jquery.com/ajaxStart/ }\` ++// * @since 1.0 ++// * @example ​ ````Show a loading message whenever an Ajax request starts (and none is already active). ++// ```javascript ++// $( document ).ajaxStart(function() { ++// $( "#loading" ).show(); ++// }); ++// ``` ++// */ ++// ajaxStart(handler: (this: Document) => void | false): this; ++// /** ++// * Register a handler to be called when all Ajax requests have completed. This is an Ajax Event. ++// * @param handler The function to be invoked. ++// * @see \`{@link https://api.jquery.com/ajaxStop/ }\` ++// * @since 1.0 ++// * @example ​ ````Hide a loading message after all the Ajax requests have stopped. ++// ```javascript ++// $( document ).ajaxStop(function() { ++// $( "#loading" ).hide(); ++// }); ++// ``` ++// */ ++// ajaxStop(handler: (this: Document) => void | false): this; ++// /** ++// * Attach a function to be executed whenever an Ajax request completes successfully. This is an Ajax Event. ++// * @param handler The function to be invoked. ++// * @see \`{@link https://api.jquery.com/ajaxSuccess/ }\` ++// * @since 1.0 ++// * @example ​ ````Show a message when an Ajax request completes successfully. ++// ```javascript ++// $( document ).ajaxSuccess(function( event, request, settings ) { ++// $( "#msg" ).append( "
  • Successful Request!
  • " ); ++// }); ++// ``` ++// */ ++// ajaxSuccess(handler: (this: Document, ++// event: JQuery.TriggeredEvent, ++// jqXHR: JQuery.jqXHR, ++// ajaxOptions: JQuery.AjaxSettings, ++// data: JQuery.PlainObject) => void | false): this; ++// /** ++// * Perform a custom animation of a set of CSS properties. ++// * @param properties An object of CSS properties and values that the animation will move toward. ++// * @param duration A string or number determining how long the animation will run. ++// * @param easing A string indicating which easing function to use for the transition. ++// * @param complete A function to call once the animation is complete, called once per matched element. ++// * @see \`{@link https://api.jquery.com/animate/ }\` ++// * @since 1.0 ++// * @example ​ ````An example of using an 'easing' function to provide a different style of animation. This will only work if you have a plugin that provides this easing function. Note, this code will do nothing unless the paragraph element is hidden. ++// ```javascript ++// $( "p" ).animate({ ++// opacity: "show" ++// }, "slow", "easein" ); ++// ``` ++// * @example ​ ````Animate all paragraphs and execute a callback function when the animation is complete. The first argument is an object of CSS properties, the second specifies that the animation should take 1000 milliseconds to complete, the third states the easing type, and the fourth argument is an anonymous callback function. ++// ```javascript ++// $( "p" ).animate({ ++// height: 200, ++// width: 400, ++// opacity: 0.5 ++// }, 1000, "linear", function() { ++// alert( "all done" ); ++// }); ++// ``` ++// */ ++// animate(properties: JQuery.PlainObject, ++// duration: JQuery.Duration, ++// easing: string, ++// complete?: (this: TElement) => void): this; ++// /** ++// * Perform a custom animation of a set of CSS properties. ++// * @param properties An object of CSS properties and values that the animation will move toward. ++// * @param duration_easing _@param_ `duration_easing` ++// *
    ++// * * `duration` — A string or number determining how long the animation will run.
    ++// * * `easing` — A string indicating which easing function to use for the transition. ++// * @param complete A function to call once the animation is complete, called once per matched element. ++// * @see \`{@link https://api.jquery.com/animate/ }\` ++// * @since 1.0 ++// * @example ​ ````Click the button to animate the div with a number of different properties. ++// ```html ++// ++// ++// ++// ++// animate demo ++// ++// ++// ++// ++// ​ ++// ++//
    Hello!
    ++// ​ ++// ++// ​ ++// ++// ++// ``` ++// * @example ​ ````Animates a div's left property with a relative value. Click several times on the buttons to see the relative animations queued up. ++// ```html ++// ++// ++// ++// ++// animate demo ++// ++// ++// ++// ++// ​ ++// ++// ++//
    ++// ​ ++// ++// ​ ++// ++// ++// ``` ++// * @example ​ ````Animate all paragraphs to toggle both height and opacity, completing the animation within 600 milliseconds. ++// ```javascript ++// $( "p" ).animate({ ++// height: "toggle", ++// opacity: "toggle" ++// }, "slow" ); ++// ``` ++// * @example ​ ````Animate all paragraphs to a left style of 50 and opacity of 1 (opaque, visible), completing the animation within 500 milliseconds. ++// ```javascript ++// $( "p" ).animate({ ++// left: 50, ++// opacity: 1 ++// }, 500 ); ++// ``` ++// */ ++// animate(properties: JQuery.PlainObject, ++// duration_easing: JQuery.Duration | string, ++// complete?: (this: TElement) => void): this; ++// /** ++// * Perform a custom animation of a set of CSS properties. ++// * @param properties An object of CSS properties and values that the animation will move toward. ++// * @param options A map of additional options to pass to the method. ++// * @see \`{@link https://api.jquery.com/animate/ }\` ++// * @since 1.0 ++// * @example ​ ````The first button shows how an unqueued animation works. It expands the div out to 90% width while the font-size is increasing. Once the font-size change is complete, the border animation will begin. + +-The second button starts a traditional chained animation, where each animation will start once the previous animation on the element has completed. +-```html +- +- +- +- +- animate demo +- +- +- +- +-​ +- +- +- +- +-
    Block1
    +-
    Block2
    +-​ +- +-​ +- +- +-``` +- * @example ​ ````Animates the first div's left property and synchronizes the remaining divs, using the step function to set their left properties at each stage of the animation. +-```html +- +- +- +- +- animate demo +- +- +- +- +-​ +-

    +-
    +-
    +-
    +-
    +-
    +-
    +-​ +- +-​ +- +- +-``` +- * @example ​ ````Animate the left and opacity style properties of all paragraphs; run the animation outside the queue, so that it will automatically start without waiting for its turn. +-```javascript +-$( "p" ).animate({ +- left: "50px", +- opacity: 1 +-}, { +- duration: 500, +- queue: false +-}); +-``` +- * @example ​ ````Animates all paragraphs to toggle both height and opacity, completing the animation within 600 milliseconds. +-```javascript +-$( "p" ).animate({ +- height: "toggle", +- opacity: "toggle" +-}, { +- duration: "slow" +-}); +-``` +- * @example ​ ````Use an easing function to provide a different style of animation. This will only work if you have a plugin that provides this easing function. +-```javascript +-$( "p" ).animate({ +- opacity: "show" +-}, { +- duration: "slow", +- easing: "easein" +-}); +-``` +- */ +- animate(properties: JQuery.PlainObject, +- options: JQuery.EffectsOptions): this; +- /** +- * Perform a custom animation of a set of CSS properties. +- * @param properties An object of CSS properties and values that the animation will move toward. +- * @param complete A function to call once the animation is complete, called once per matched element. +- * @see \`{@link https://api.jquery.com/animate/ }\` +- * @since 1.0 +- */ +- animate(properties: JQuery.PlainObject, +- complete?: (this: TElement) => void): this; +- /** +- * Insert content, specified by the parameter, to the end of each element in the set of matched elements. +- * @param contents One or more additional DOM elements, text nodes, arrays of elements and text nodes, HTML strings, or +- * jQuery objects to insert at the end of each element in the set of matched elements. +- * @see \`{@link https://api.jquery.com/append/ }\` +- * @since 1.0 +- * @example ​ ````Appends some HTML to all paragraphs. +-```html +- +- +- +- +- append demo +- +- +- +- +-​ +-

    I would like to say:

    +-​ +- +-​ +- +- +-``` +- * @example ​ ````Appends an Element to all paragraphs. +-```html +- +- +- +- +- append demo +- +- +- +- +-​ +-

    I would like to say:

    +-​ +- +-​ +- +- +-``` +- * @example ​ ````Appends a jQuery object (similar to an Array of DOM Elements) to all paragraphs. +-```html +- +- +- +- +- append demo +- +- +- +- +-​ +-Hello world!!! +-

    I would like to say:

    +-​ +- +-​ +- +- +-``` +- */ +- append(...contents: Array>>): this; +- /** +- * Insert content, specified by the parameter, to the end of each element in the set of matched elements. +- * @param funсtion A function that returns an HTML string, DOM element(s), text node(s), or jQuery object to insert at +- * the end of each element in the set of matched elements. Receives the index position of the element +- * in the set and the old HTML value of the element as arguments. Within the function, `this` refers to +- * the current element in the set. +- * @see \`{@link https://api.jquery.com/append/ }\` +- * @since 1.4 +- */ +- append(funсtion: (this: TElement, index: number, html: string) => JQuery.htmlString | JQuery.TypeOrArray>): this; +- /** +- * Insert every element in the set of matched elements to the end of the target. +- * @param target A selector, element, HTML string, array of elements, or jQuery object; the matched set of elements +- * will be inserted at the end of the element(s) specified by this parameter. +- * @see \`{@link https://api.jquery.com/appendTo/ }\` +- * @since 1.0 +- * @example ​ ````Append all spans to the element with the ID "foo" (Check append() documentation for more examples) +-```html +- +- +- +- +- appendTo demo +- +- +- +- +-​ +-I have nothing more to say... +-​ +-
    FOO!
    +-​ +- +-​ +- +- +-``` +- */ +- appendTo(target: JQuery.Selector | JQuery.htmlString | JQuery.TypeOrArray | JQuery): this; +- /** +- * Set one or more attributes for the set of matched elements. +- * @param attributeName The name of the attribute to set. +- * @param value_function _@param_ `value_function` +- *
    +- * * `value` — A value to set for the attribute. If `null`, the specified attribute will be removed (as in \`{@link removeAttr .removeAttr()}`).
    +- * * `function` — A function returning the value to set. `this` is the current element. Receives the index position of +- * the element in the set and the old attribute value as arguments. +- * @see \`{@link https://api.jquery.com/attr/ }\` +- * @since 1.0 +- * @since 1.1 +- * @example ​ ````Set the id for divs based on the position in the page. +-```html +- +- +- +- +- attr demo +- +- +- +- +-​ +-
    Zero-th
    +-
    First
    +-
    Second
    +-​ +- +-​ +- +- +-``` +- * @example ​ ````Set the src attribute from title attribute on the image. +-```html +- +- +- +- +- attr demo +- +- +- +-​ +- +-​ +- +-​ +- +- +-``` +- */ +- attr(attributeName: string, +- value_function: string | number | null | ((this: TElement, index: number, attr: string) => string | number | void | undefined)): this; +- /** +- * Set one or more attributes for the set of matched elements. +- * @param attributes An object of attribute-value pairs to set. +- * @see \`{@link https://api.jquery.com/attr/ }\` +- * @since 1.0 +- * @example ​ ````Set some attributes for all <img>s in the page. +-```html +- +- +- +- +- attr demo +- +- +- +- +-​ +- +- +- +-​ +-
    Attribute of Ajax
    +-​ +- +-​ +- +- +-``` +- */ +- attr(attributes: JQuery.PlainObject): this; +- /** +- * Get the value of an attribute for the first element in the set of matched elements. +- * @param attributeName The name of the attribute to get. +- * @see \`{@link https://api.jquery.com/attr/ }\` +- * @since 1.0 +- * @example ​ ````Display the checked attribute and property of a checkbox as it changes. +-```html +- +- +- +- +- attr demo +- +- +- +- +-​ +- +- +-

    +-​ +- +-​ +- +- +-``` +- * @example ​ ````Find the title attribute of the first <em> in the page. +-```html +- +- +- +- +- attr demo +- +- +- +- +-​ +-

    Once there was a large dinosaur...

    +-​ +-The title of the emphasis is:
    +-​ +- +-​ +- +- +-``` +- */ +- attr(attributeName: string): string | undefined; +- /** +- * Insert content, specified by the parameter, before each element in the set of matched elements. +- * @param contents One or more additional DOM elements, text nodes, arrays of elements and text nodes, HTML strings, or +- * jQuery objects to insert before each element in the set of matched elements. +- * @see \`{@link https://api.jquery.com/before/ }\` +- * @since 1.0 +- * @example ​ ````Inserts some HTML before all paragraphs. +-```html +- +- +- +- +- before demo +- +- +- +- +-​ +-

    is what I said...

    +-​ +- +-​ +- +- +-``` +- * @example ​ ````Inserts a DOM element before all paragraphs. +-```html +- +- +- +- +- before demo +- +- +- +- +-​ +-

    is what I said...

    +-​ +- +-​ +- +- +-``` +- * @example ​ ````Inserts a jQuery object (similar to an Array of DOM Elements) before all paragraphs. +-```html +- +- +- +- +- before demo +- +- +- +- +-​ +-

    is what I said...

    Hello +-​ +- +-​ +- +- +-``` +- */ +- before(...contents: Array>>): this; +- /** +- * Insert content, specified by the parameter, before each element in the set of matched elements. +- * @param function_functionーhtml _@param_ `function_functionーhtml` +- *
    +- * * `function` — A function that returns an HTML string, DOM element(s), text node(s), or jQuery object to insert +- * before each element in the set of matched elements. Receives the index position of the element in +- * the set as an argument. Within the function, `this` refers to the current element in the set.
    +- * * `functionーhtml` — A function that returns an HTML string, DOM element(s), text node(s), or jQuery object to insert +- * before each element in the set of matched elements. Receives the index position of the element in +- * the set and the old HTML value of the element as arguments. Within the function, `this` refers to the +- * current element in the set. +- * @see \`{@link https://api.jquery.com/before/ }\` +- * @since 1.4 +- * @since 1.10 +- */ +- before(function_functionーhtml: (this: TElement, index: number, html: string) => JQuery.htmlString | JQuery.TypeOrArray>): this; +- // [bind() overloads] https://github.com/jquery/api.jquery.com/issues/1048 +- /** +- * Attach a handler to an event for the elements. +- * @param eventType A string containing one or more DOM event types, such as "click" or "submit," or custom event names. +- * @param eventData An object containing data that will be passed to the event handler. +- * @param handler A function to execute each time the event is triggered. +- * @see \`{@link https://api.jquery.com/bind/ }\` +- * @since 1.0 +- * @since 1.4.3 +- * @deprecated ​ Deprecated since 3.0. Use \`{@link on }\`. +- * +- * **Cause**: These event binding methods have been deprecated in favor of the `.on()` and `.off()` methods which can handle both delegated and direct event binding. Although the older methods are still present in jQuery 3.0, they may be removed as early as the next major-version update. +- * +- * **Solution**: Change the method call to use `.on()` or `.off()`, the documentation for the old methods include specific instructions. In general, the `.bind()` and `.unbind()` methods can be renamed directly to `.on()` and `.off()` respectively since the argument orders are identical. +- */ +- bind( +- eventType: TType, +- eventData: TData, +- handler: JQuery.TypeEventHandler +- ): this; +- /** +- * Attach a handler to an event for the elements. +- * @param eventType A string containing one or more DOM event types, such as "click" or "submit," or custom event names. +- * @param handler_preventBubble _@param_ `handler_preventBubble` +- *
    +- * * `handler` — A function to execute each time the event is triggered.
    +- * * `preventBubble` — Setting the third argument to false will attach a function that prevents the default action from +- * occurring and stops the event from bubbling. The default is `true`. +- * @see \`{@link https://api.jquery.com/bind/ }\` +- * @since 1.0 +- * @since 1.4.3 +- * @deprecated ​ Deprecated since 3.0. Use \`{@link on }\`. +- * +- * **Cause**: These event binding methods have been deprecated in favor of the `.on()` and `.off()` methods which can handle both delegated and direct event binding. Although the older methods are still present in jQuery 3.0, they may be removed as early as the next major-version update. +- * +- * **Solution**: Change the method call to use `.on()` or `.off()`, the documentation for the old methods include specific instructions. In general, the `.bind()` and `.unbind()` methods can be renamed directly to `.on()` and `.off()` respectively since the argument orders are identical. +- * @example ​ ````Handle click and double-click for the paragraph. Note: the coordinates are window relative, so in this case relative to the demo iframe. +-```html +- +- +- +- +- bind demo +- +- +- +- +-​ +-

    Click or double click here.

    +- +-​ +- +-​ +- +- +-``` +- * @example ​ ````To display each paragraph's text in an alert box whenever it is clicked: +-```javascript +-$( "p" ).bind( "click", function() { +- alert( $( this ).text() ); +-}); +-``` +- * @example ​ ````Cancel a default action and prevent it from bubbling up by returning false: +-```javascript +-$( "form" ).bind( "submit", function() { +- return false; +-}) +-``` +- * @example ​ ````Cancel only the default action by using the .preventDefault() method. +-```javascript +-$( "form" ).bind( "submit", function( event ) { +- event.preventDefault(); +-}); +-``` +- * @example ​ ````Stop an event from bubbling without preventing the default action by using the .stopPropagation() method. +-```javascript +-$( "form" ).bind( "submit", function( event ) { +- event.stopPropagation(); +-}); +-``` +- * @example ​ ````Bind custom events. +-```html +- +- +- +- +- bind demo +- +- +- +- +-​ +-

    Has an attached custom event.

    +- +- +-​ +- +-​ +- +- +-``` +- */ +- bind( +- eventType: TType, +- handler_preventBubble: JQuery.TypeEventHandler | +- false | +- null | +- undefined +- ): this; +- /** +- * Attach a handler to an event for the elements. +- * @param events An object containing one or more DOM event types and functions to execute for them. +- * @see \`{@link https://api.jquery.com/bind/ }\` +- * @since 1.4 +- * @deprecated ​ Deprecated since 3.0. Use \`{@link on }\`. +- * +- * **Cause**: These event binding methods have been deprecated in favor of the `.on()` and `.off()` methods which can handle both delegated and direct event binding. Although the older methods are still present in jQuery 3.0, they may be removed as early as the next major-version update. +- * +- * **Solution**: Change the method call to use `.on()` or `.off()`, the documentation for the old methods include specific instructions. In general, the `.bind()` and `.unbind()` methods can be renamed directly to `.on()` and `.off()` respectively since the argument orders are identical. +- * @example ​ ````Bind multiple events simultaneously. +-```javascript +-$( "div.test" ).bind({ +- click: function() { +- $( this ).addClass( "active" ); +- }, +- mouseenter: function() { +- $( this ).addClass( "inside" ); +- }, +- mouseleave: function() { +- $( this ).removeClass( "inside" ); +- } +-}); +-``` +- */ +- bind(events: JQuery.TypeEventHandlers): this; +- /** +- * Bind an event handler to the "blur" JavaScript event, or trigger that event on an element. +- * @param eventData An object containing data that will be passed to the event handler. +- * @param handler A function to execute each time the event is triggered. +- * @see \`{@link https://api.jquery.com/blur/ }\` +- * @since 1.4.3 +- * @deprecated ​ Deprecated since 3.3. Use \`{@link on }\` or \`{@link trigger }\`. +- * +- * **Cause**: The `.on()` and `.trigger()` methods can set an event handler or generate an event for any event type, and should be used instead of the shortcut methods. This message also applies to the other event shorthands, including: blur, focus, focusin, focusout, resize, scroll, dblclick, mousedown, mouseup, mousemove, mouseover, mouseout, mouseenter, mouseleave, change, select, submit, keydown, keypress, keyup, and contextmenu. +- * +- * **Solution**: Instead of `.click(fn)` use `.on("click", fn)`. Instead of `.click()` use `.trigger("click")`. +- */ +- blur(eventData: TData, +- handler: JQuery.TypeEventHandler): this; +- /** +- * Bind an event handler to the "blur" JavaScript event, or trigger that event on an element. +- * @param handler A function to execute each time the event is triggered. +- * @see \`{@link https://api.jquery.com/blur/ }\` +- * @since 1.0 +- * @deprecated ​ Deprecated since 3.3. Use \`{@link on }\` or \`{@link trigger }\`. +- * +- * **Cause**: The `.on()` and `.trigger()` methods can set an event handler or generate an event for any event type, and should be used instead of the shortcut methods. This message also applies to the other event shorthands, including: blur, focus, focusin, focusout, resize, scroll, dblclick, mousedown, mouseup, mousemove, mouseover, mouseout, mouseenter, mouseleave, change, select, submit, keydown, keypress, keyup, and contextmenu. +- * +- * **Solution**: Instead of `.click(fn)` use `.on("click", fn)`. Instead of `.click()` use `.trigger("click")`. +- * @example ​ ````To trigger the blur event on all paragraphs: +-```javascript +-$( "p" ).blur(); +-``` +- */ +- blur(handler?: JQuery.TypeEventHandler | +- false): this; +- /** +- * Bind an event handler to the "change" JavaScript event, or trigger that event on an element. +- * @param eventData An object containing data that will be passed to the event handler. +- * @param handler A function to execute each time the event is triggered. +- * @see \`{@link https://api.jquery.com/change/ }\` +- * @since 1.4.3 +- * @deprecated ​ Deprecated since 3.3. Use \`{@link on }\` or \`{@link trigger }\`. +- * +- * **Cause**: The `.on()` and `.trigger()` methods can set an event handler or generate an event for any event type, and should be used instead of the shortcut methods. This message also applies to the other event shorthands, including: blur, focus, focusin, focusout, resize, scroll, dblclick, mousedown, mouseup, mousemove, mouseover, mouseout, mouseenter, mouseleave, change, select, submit, keydown, keypress, keyup, and contextmenu. +- * +- * **Solution**: Instead of `.click(fn)` use `.on("click", fn)`. Instead of `.click()` use `.trigger("click")`. +- */ +- change(eventData: TData, +- handler: JQuery.TypeEventHandler): this; +- /** +- * Bind an event handler to the "change" JavaScript event, or trigger that event on an element. +- * @param handler A function to execute each time the event is triggered. +- * @see \`{@link https://api.jquery.com/change/ }\` +- * @since 1.0 +- * @deprecated ​ Deprecated since 3.3. Use \`{@link on }\` or \`{@link trigger }\`. +- * +- * **Cause**: The `.on()` and `.trigger()` methods can set an event handler or generate an event for any event type, and should be used instead of the shortcut methods. This message also applies to the other event shorthands, including: blur, focus, focusin, focusout, resize, scroll, dblclick, mousedown, mouseup, mousemove, mouseover, mouseout, mouseenter, mouseleave, change, select, submit, keydown, keypress, keyup, and contextmenu. +- * +- * **Solution**: Instead of `.click(fn)` use `.on("click", fn)`. Instead of `.click()` use `.trigger("click")`. +- * @example ​ ````Attaches a change event to the select that gets the text for each selected option and writes them in the div. It then triggers the event for the initial text draw. +-```html +- +- +- +- +- change demo +- +- +- +- +-​ +- +-
    +-​ +- +-​ +- +- +-``` +- * @example ​ ````To add a validity test to all text input elements: +-```javascript +-$( "input[type='text']" ).change(function() { +- // Check input( $( this ).val() ) for validity here +-}); +-``` +- */ +- change(handler?: JQuery.TypeEventHandler | +- false): this; +- /** +- * Get the children of each element in the set of matched elements, optionally filtered by a selector. +- * @param selector A string containing a selector expression to match elements against. +- * @see \`{@link https://api.jquery.com/children/ }\` +- * @since 1.0 +- * @example ​ ````Find all children of the clicked element. +-```html +- +- +- +- +- children demo +- +- +- +- +-​ +-
    +-
    +-

    This is the way we +- write the demo,

    +-
    +-​ +-
    +- write the demo, demo, +-
    +-​ +-
    +- This the way we write the demo so +- in +-
    +-​ +-

    +- the morning. +- Found 0 children in TAG. +-

    +-
    +-​ +- +-​ +- +- +-``` +- * @example ​ ````Find all children of each div. +-```html +- +- +- +- +- children demo +- +- +- +- +-​ +-

    Hello (this is a paragraph)

    +-​ +-
    Hello Again (this span is a child of the a div)
    +-

    And Again (in another paragraph)

    +-​ +-
    And One Last Time (most text directly in a div)
    +-​ +- +-​ +- +- +-``` +- * @example ​ ````Find all children with a class "selected" of each div. +-```html +- +- +- +- +- children demo +- +- +- +- +-​ +-
    +- Hello +-

    Hello Again

    +-
    And Again
    +-

    And One Last Time

    +-
    +-​ +- +-​ +- +- +-``` +- */ +- children(selector?: JQuery.Selector): this; +- /** +- * Remove from the queue all items that have not yet been run. +- * @param queueName A string containing the name of the queue. Defaults to fx, the standard effects queue. +- * @see \`{@link https://api.jquery.com/clearQueue/ }\` +- * @since 1.4 +- * @example ​ ````Empty the queue. +-```html +- +- +- +- +- clearQueue demo +- +- +- +- +-​ +- +- +-
    +-​ +- +-​ +- +- +-``` +- */ +- clearQueue(queueName?: string): this; +- /** +- * Bind an event handler to the "click" JavaScript event, or trigger that event on an element. +- * @param eventData An object containing data that will be passed to the event handler. +- * @param handler A function to execute each time the event is triggered. +- * @see \`{@link https://api.jquery.com/click/ }\` +- * @since 1.4.3 +- * @deprecated ​ Deprecated since 3.3. Use \`{@link on }\` or \`{@link trigger }\`. +- * +- * **Cause**: The `.on()` and `.trigger()` methods can set an event handler or generate an event for any event type, and should be used instead of the shortcut methods. This message also applies to the other event shorthands, including: blur, focus, focusin, focusout, resize, scroll, dblclick, mousedown, mouseup, mousemove, mouseover, mouseout, mouseenter, mouseleave, change, select, submit, keydown, keypress, keyup, and contextmenu. +- * +- * **Solution**: Instead of `.click(fn)` use `.on("click", fn)`. Instead of `.click()` use `.trigger("click")`. +- */ +- click(eventData: TData, +- handler: JQuery.TypeEventHandler): this; +- /** +- * Bind an event handler to the "click" JavaScript event, or trigger that event on an element. +- * @param handler A function to execute each time the event is triggered. +- * @see \`{@link https://api.jquery.com/click/ }\` +- * @since 1.0 +- * @deprecated ​ Deprecated since 3.3. Use \`{@link on }\` or \`{@link trigger }\`. +- * +- * **Cause**: The `.on()` and `.trigger()` methods can set an event handler or generate an event for any event type, and should be used instead of the shortcut methods. This message also applies to the other event shorthands, including: blur, focus, focusin, focusout, resize, scroll, dblclick, mousedown, mouseup, mousemove, mouseover, mouseout, mouseenter, mouseleave, change, select, submit, keydown, keypress, keyup, and contextmenu. +- * +- * **Solution**: Instead of `.click(fn)` use `.on("click", fn)`. Instead of `.click()` use `.trigger("click")`. +- * @example ​ ````Hide paragraphs on a page when they are clicked: +-```html +- +- +- +- +- click demo +- +- +- +- +-​ +-

    First Paragraph

    +-

    Second Paragraph

    +-

    Yet one more Paragraph

    +-​ +- +-​ +- +- +-``` +- * @example ​ ````Trigger the click event on all of the paragraphs on the page: +-```javascript +-$( "p" ).click(); +-``` +- */ +- click(handler?: JQuery.TypeEventHandler | +- false): this; +- /** +- * Create a deep copy of the set of matched elements. +- * @param withDataAndEvents A Boolean indicating whether event handlers and data should be copied along with the elements. The +- * default value is false. *In jQuery 1.5.0 the default value was incorrectly true; it was changed back +- * to false in 1.5.1 and up. +- * @param deepWithDataAndEvents A Boolean indicating whether event handlers and data for all children of the cloned element should +- * be copied. By default its value matches the first argument's value (which defaults to false). +- * @see \`{@link https://api.jquery.com/clone/ }\` +- * @since 1.0 +- * @since 1.5 +- * @example ​ ````Clones all b elements (and selects the clones) and prepends them to all paragraphs. +-```html +- +- +- +- +- clone demo +- +- +- +-​ +-Hello

    , how are you?

    +-​ +- +-​ +- +- +-``` +- */ +- clone(withDataAndEvents?: boolean, deepWithDataAndEvents?: boolean): this; +- /** +- * For each element in the set, get the first element that matches the selector by testing the element itself and traversing up through its ancestors in the DOM tree. +- * @param selector A string containing a selector expression to match elements against. +- * @param context A DOM element within which a matching element may be found. +- * @see \`{@link https://api.jquery.com/closest/ }\` +- * @since 1.4 +- */ +- closest(selector: JQuery.Selector, context: Element): this; +- /** +- * For each element in the set, get the first element that matches the selector by testing the element itself and traversing up through its ancestors in the DOM tree. +- * @param selector_selection_element _@param_ `selector_selection_element` +- *
    +- * * `selector` — A string containing a selector expression to match elements against.
    +- * * `selection` — A jQuery object to match elements against.
    +- * * `element` — An element to match elements against. +- * @see \`{@link https://api.jquery.com/closest/ }\` +- * @since 1.3 +- * @since 1.6 +- * @example ​ ````Show how event delegation can be done with closest. The closest list element toggles a yellow background when it or its descendent is clicked. +-```html +- +- +- +- +- closest demo +- +- +- +- +-​ +-
      +-
    • Click me!
    • +-
    • You can also Click me!
    • +-
    +-​ +- +-​ +- +- +-``` +- * @example ​ ````Pass a jQuery object to closest. The closest list element toggles a yellow background when it or its descendent is clicked. +-```html +- +- +- +- +- closest demo +- +- +- +- +-​ +-
      +-
    • Click me!
    • +-
    • You can also Click me!
    • +-
    +-​ +- +-​ +- +- +-``` +- */ +- closest(selector_selection_element: JQuery.Selector | Element | JQuery): this; +- /** +- * Get the children of each element in the set of matched elements, including text and comment nodes. +- * @see \`{@link https://api.jquery.com/contents/ }\` +- * @since 1.2 +- * @example ​ ````Find all the text nodes inside a paragraph and wrap them with a bold tag. +-```html +- +- +- +- +- contents demo +- +- +- +-​ +-

    Hello John, how are you doing?

    +-​ +- +-​ +- +- +-``` +- * @example ​ ````Change the background color of links inside of an iframe. +-```html +- +- +- +- +- contents demo +- +- +- +-​ +- +-​ +- +-​ +- +- +-``` +- */ +- contents(): JQuery; +- /** +- * Bind an event handler to the "contextmenu" JavaScript event, or trigger that event on an element. +- * @param eventData An object containing data that will be passed to the event handler. +- * @param handler A function to execute each time the event is triggered. +- * @see \`{@link https://api.jquery.com/contextmenu/ }\` +- * @since 1.4.3 +- * @deprecated ​ Deprecated since 3.3. Use \`{@link on }\` or \`{@link trigger }\`. +- * +- * **Cause**: The `.on()` and `.trigger()` methods can set an event handler or generate an event for any event type, and should be used instead of the shortcut methods. This message also applies to the other event shorthands, including: blur, focus, focusin, focusout, resize, scroll, dblclick, mousedown, mouseup, mousemove, mouseover, mouseout, mouseenter, mouseleave, change, select, submit, keydown, keypress, keyup, and contextmenu. +- * +- * **Solution**: Instead of `.click(fn)` use `.on("click", fn)`. Instead of `.click()` use `.trigger("click")`. +- */ +- contextmenu(eventData: TData, +- handler: JQuery.TypeEventHandler): this; +- /** +- * Bind an event handler to the "contextmenu" JavaScript event, or trigger that event on an element. +- * @param handler A function to execute each time the event is triggered. +- * @see \`{@link https://api.jquery.com/contextmenu/ }\` +- * @since 1.0 +- * @deprecated ​ Deprecated since 3.3. Use \`{@link on }\` or \`{@link trigger }\`. +- * +- * **Cause**: The `.on()` and `.trigger()` methods can set an event handler or generate an event for any event type, and should be used instead of the shortcut methods. This message also applies to the other event shorthands, including: blur, focus, focusin, focusout, resize, scroll, dblclick, mousedown, mouseup, mousemove, mouseover, mouseout, mouseenter, mouseleave, change, select, submit, keydown, keypress, keyup, and contextmenu. +- * +- * **Solution**: Instead of `.click(fn)` use `.on("click", fn)`. Instead of `.click()` use `.trigger("click")`. +- * @example ​ ````To show a "Hello World!" alert box when the contextmenu event is triggered on a paragraph on the page: +-```javascript +-$( "p" ).contextmenu(function() { +- alert( "Hello World!" ); +-}); +-``` +- * @example ​ ````Right click to toggle background color. +-```html +- +- +- +- +- contextmenu demo +- +- +- +- +-​ +-
    +-Right click the block +-​ +- +-​ +- +- +-``` +- */ +- contextmenu(handler?: JQuery.TypeEventHandler | +- false): this; +- /** +- * Set one or more CSS properties for the set of matched elements. +- * @param propertyName A CSS property name. +- * @param value_function _@param_ `value_function` +- *
    +- * * `value` — A value to set for the property.
    +- * * `function` — A function returning the value to set. `this` is the current element. Receives the index position of +- * the element in the set and the old value as arguments. +- * @see \`{@link https://api.jquery.com/css/ }\` +- * @since 1.0 +- * @since 1.4 +- * @example ​ ````Change the color of any paragraph to red on mouseover event. +-```html +- +- +- +- +- css demo +- +- +- +- +-​ +-

    Just roll the mouse over me.

    +-​ +-

    Or me to see a color change.

    +-​ +- +-​ +- +- +-``` +- * @example ​ ````Increase the width of #box by 200 pixels the first time it is clicked. +-```html +- +- +- +- +- css demo +- +- +- +- +-​ +-
    Click me to grow
    +-​ +- +-​ +- +- +-``` +- * @example ​ ````Highlight a clicked word in the paragraph. +-```html +- +- +- +- +- css demo +- +- +- +- +-​ +-

    +- Once upon a time there was a man +- who lived in a pizza parlor. This +- man just loved pizza and ate it all +- the time. He went on to be the +- happiest man in the world. The end. +-

    +-​ +- +-​ +- +- +-``` +- */ +- css(propertyName: string, +- value_function: string | number | ((this: TElement, index: number, value: string) => string | number | void | undefined)): this; +- /** +- * Set one or more CSS properties for the set of matched elements. +- * @param properties An object of property-value pairs to set. +- * @see \`{@link https://api.jquery.com/css/ }\` +- * @since 1.0 +- * @example ​ ````Change the font weight and background color on mouseenter and mouseleave. +-```html +- +- +- +- +- css demo +- +- +- +- +-​ +-

    Move the mouse over a paragraph.

    +-

    Like this one or the one above.

    +-​ +- +-​ +- +- +-``` +- * @example ​ ````Increase the size of a div when you click it. +-```html +- +- +- +- +- css demo +- +- +- +- +-​ +-
    click
    +-
    click
    +-​ +- +-​ +- +- +-``` +- */ +- css(properties: JQuery.PlainObject string | number | void | undefined)>): this; +- /** +- * Get the computed style properties for the first element in the set of matched elements. +- * @param propertyName A CSS property. +- * @see \`{@link https://api.jquery.com/css/ }\` +- * @since 1.0 +- * @example ​ ````Get the background color of a clicked div. +-```html +- +- +- +- +- css demo +- +- +- +- +-​ +-  +-
    +-
    +-
    +-
    +-​ +- +-​ +- +- +-``` +- */ +- css(propertyName: string): string; +- /** +- * Get the computed style properties for the first element in the set of matched elements. +- * @param propertyNames An array of one or more CSS properties. +- * @see \`{@link https://api.jquery.com/css/ }\` +- * @since 1.9 +- * @example ​ ````Get the width, height, text color, and background color of a clicked div. +-```html +- +- +- +- +- css demo +- +- +- +- +-​ +-

     

    +-
    1
    +-
    2
    +-
    3
    +-
    4
    +-​ +- +-​ +- +- +-``` +- */ +- css(propertyNames: string[]): JQuery.PlainObject; +- /** +- * Store arbitrary data associated with the matched elements. +- * @param key A string naming the piece of data to set. +- * @param value The new data value; this can be any Javascript type except `undefined`. +- * @see \`{@link https://api.jquery.com/data/ }\` +- * @since 1.2.3 +- * @example ​ ````Store then retrieve a value from the div element. +-```html +- +- +- +- +- data demo +- +- +- +- +-​ +-
    +- The values stored were +- +- and +- +-
    +-​ +- +-​ +- +- +-``` +- */ +- data(key: string, value: string | number | boolean | symbol | object | null): this; +- /** +- * Store arbitrary data associated with the matched elements. +- * @param obj An object of key-value pairs of data to update. +- * @see \`{@link https://api.jquery.com/data/ }\` +- * @since 1.4.3 +- */ +- data(obj: JQuery.PlainObject): this; +- /** +- * Return the value at the named data store for the first element in the jQuery collection, as set by data(name, value) or by an HTML5 data-* attribute. +- * @param key Name of the data stored. +- * @param value `undefined` is not recognized as a data value. Calls such as `.data( "name", undefined )` +- * will return the jQuery object that it was called on, allowing for chaining. +- * @see \`{@link https://api.jquery.com/data/ }\` +- * @since 1.2.3 +- */ +- // `unified-signatures` is disabled so that behavior when passing `undefined` to `value` can be documented. Unifying the signatures +- // results in potential confusion for users from an unexpected parameter. +- // tslint:disable-next-line:unified-signatures +- data(key: string, value: undefined): any; +- /** +- * Return the value at the named data store for the first element in the jQuery collection, as set by data(name, value) or by an HTML5 data-* attribute. +- * @param key Name of the data stored. +- * @see \`{@link https://api.jquery.com/data/ }\` +- * @since 1.2.3 +- * @example ​ ````Get the data named "blah" stored at for an element. +-```html +- +- +- +- +- data demo +- +- +- +- +-​ +-
    A div
    +- +- +- +- +-

    The "blah" value of this div is ?

    +-​ +- +-​ +- +- +-``` +- */ +- data(key: string): any; +- /** +- * Return the value at the named data store for the first element in the jQuery collection, as set by data(name, value) or by an HTML5 data-* attribute. +- * @see \`{@link https://api.jquery.com/data/ }\` +- * @since 1.4 +- */ +- data(): JQuery.PlainObject; +- /** +- * Bind an event handler to the "dblclick" JavaScript event, or trigger that event on an element. +- * @param eventData An object containing data that will be passed to the event handler. +- * @param handler A function to execute each time the event is triggered. +- * @see \`{@link https://api.jquery.com/dblclick/ }\` +- * @since 1.4.3 +- * @deprecated ​ Deprecated since 3.3. Use \`{@link on }\` or \`{@link trigger }\`. +- * +- * **Cause**: The `.on()` and `.trigger()` methods can set an event handler or generate an event for any event type, and should be used instead of the shortcut methods. This message also applies to the other event shorthands, including: blur, focus, focusin, focusout, resize, scroll, dblclick, mousedown, mouseup, mousemove, mouseover, mouseout, mouseenter, mouseleave, change, select, submit, keydown, keypress, keyup, and contextmenu. +- * +- * **Solution**: Instead of `.click(fn)` use `.on("click", fn)`. Instead of `.click()` use `.trigger("click")`. +- */ +- dblclick(eventData: TData, +- handler: JQuery.TypeEventHandler): this; +- /** +- * Bind an event handler to the "dblclick" JavaScript event, or trigger that event on an element. +- * @param handler A function to execute each time the event is triggered. +- * @see \`{@link https://api.jquery.com/dblclick/ }\` +- * @since 1.0 +- * @deprecated ​ Deprecated since 3.3. Use \`{@link on }\` or \`{@link trigger }\`. +- * +- * **Cause**: The `.on()` and `.trigger()` methods can set an event handler or generate an event for any event type, and should be used instead of the shortcut methods. This message also applies to the other event shorthands, including: blur, focus, focusin, focusout, resize, scroll, dblclick, mousedown, mouseup, mousemove, mouseover, mouseout, mouseenter, mouseleave, change, select, submit, keydown, keypress, keyup, and contextmenu. +- * +- * **Solution**: Instead of `.click(fn)` use `.on("click", fn)`. Instead of `.click()` use `.trigger("click")`. +- * @example ​ ````To bind a "Hello World!" alert box to the dblclick event on every paragraph on the page: +-```javascript +-$( "p" ).dblclick(function() { +- alert( "Hello World!" ); +-}); +-``` +- * @example ​ ````Double click to toggle background color. +-```html +- +- +- +- +- dblclick demo +- +- +- +- +-​ +-
    +-Double click the block +-​ +- +-​ +- +- +-``` +- */ +- dblclick(handler?: JQuery.TypeEventHandler | +- false): this; +- /** +- * Set a timer to delay execution of subsequent items in the queue. +- * @param duration An integer indicating the number of milliseconds to delay execution of the next item in the queue. +- * @param queueName A string containing the name of the queue. Defaults to fx, the standard effects queue. +- * @see \`{@link https://api.jquery.com/delay/ }\` +- * @since 1.4 +- * @example ​ ````Animate the hiding and showing of two divs, delaying the first before showing it. +-```html +- +- +- +- +- delay demo +- +- +- +- +-​ +-

    +-
    +-
    +-​ +- +-​ +- +- +-``` +- */ +- delay(duration: JQuery.Duration, queueName?: string): this; +- /** +- * Attach a handler to one or more events for all elements that match the selector, now or in the future, based on a specific set of root elements. +- * @param selector A selector to filter the elements that trigger the event. +- * @param eventType A string containing one or more space-separated JavaScript event types, such as "click" or +- * "keydown," or custom event names. +- * @param eventData An object containing data that will be passed to the event handler. +- * @param handler A function to execute each time the event is triggered. +- * @see \`{@link https://api.jquery.com/delegate/ }\` +- * @since 1.4.2 +- * @deprecated ​ Deprecated since 3.0. Use \`{@link on }\`. +- * +- * **Cause**: These event binding methods have been deprecated in favor of the `.on()` and `.off()` methods which can handle both delegated and direct event binding. Although the older methods are still present in jQuery 3.0, they may be removed as early as the next major-version update. +- * +- * **Solution**: Change the method call to use `.on()` or `.off()`, the documentation for the old methods include specific instructions. In general, the `.bind()` and `.unbind()` methods can be renamed directly to `.on()` and `.off()` respectively since the argument orders are identical. +- */ +- delegate( +- selector: JQuery.Selector, +- eventType: TType, +- eventData: TData, +- handler: JQuery.TypeEventHandler +- ): this; +- /** +- * Attach a handler to one or more events for all elements that match the selector, now or in the future, based on a specific set of root elements. +- * @param selector A selector to filter the elements that trigger the event. +- * @param eventType A string containing one or more space-separated JavaScript event types, such as "click" or +- * "keydown," or custom event names. +- * @param handler A function to execute each time the event is triggered. +- * @see \`{@link https://api.jquery.com/delegate/ }\` +- * @since 1.4.2 +- * @deprecated ​ Deprecated since 3.0. Use \`{@link on }\`. +- * +- * **Cause**: These event binding methods have been deprecated in favor of the `.on()` and `.off()` methods which can handle both delegated and direct event binding. Although the older methods are still present in jQuery 3.0, they may be removed as early as the next major-version update. +- * +- * **Solution**: Change the method call to use `.on()` or `.off()`, the documentation for the old methods include specific instructions. In general, the `.bind()` and `.unbind()` methods can be renamed directly to `.on()` and `.off()` respectively since the argument orders are identical. +- * @example ​ ````Click a paragraph to add another. Note that .delegate() attaches a click event handler to all paragraphs - even new ones. +-```html +- +- +- +- +- delegate demo +- +- +- +- +-​ +-

    Click me!

    +-​ +- +-​ +- +-​ +- +- +-``` +- * @example ​ ````To display each paragraph's text in an alert box whenever it is clicked: +-```javascript +-$( "body" ).delegate( "p", "click", function() { +- alert( $( this ).text() ); +-}); +-``` +- * @example ​ ````To cancel a default action and prevent it from bubbling up, return false: +-```javascript +-$( "body" ).delegate( "a", "click", function() { +- return false; +-}); +-``` +- * @example ​ ````To cancel only the default action by using the preventDefault method. +-```javascript +-$( "body" ).delegate( "a", "click", function( event ) { +- event.preventDefault(); +-}); +-``` +- * @example ​ ````Can bind custom events too. +-```html +- +- +- +- +- delegate demo +- +- +- +- +-​ +-

    Has an attached custom event.

    +- +- +-​ +- +-​ +- +- +-``` +- */ +- delegate( +- selector: JQuery.Selector, +- eventType: TType, +- handler: JQuery.TypeEventHandler | +- false +- ): this; +- /** +- * Attach a handler to one or more events for all elements that match the selector, now or in the future, based on a specific set of root elements. +- * @param selector A selector to filter the elements that trigger the event. +- * @param events A plain object of one or more event types and functions to execute for them. +- * @see \`{@link https://api.jquery.com/delegate/ }\` +- * @since 1.4.3 +- * @deprecated ​ Deprecated since 3.0. Use \`{@link on }\`. +- * +- * **Cause**: These event binding methods have been deprecated in favor of the `.on()` and `.off()` methods which can handle both delegated and direct event binding. Although the older methods are still present in jQuery 3.0, they may be removed as early as the next major-version update. +- * +- * **Solution**: Change the method call to use `.on()` or `.off()`, the documentation for the old methods include specific instructions. In general, the `.bind()` and `.unbind()` methods can be renamed directly to `.on()` and `.off()` respectively since the argument orders are identical. +- */ +- delegate(selector: JQuery.Selector, +- events: JQuery.TypeEventHandlers +- ): this; +- /** +- * Execute the next function on the queue for the matched elements. +- * @param queueName A string containing the name of the queue. Defaults to fx, the standard effects queue. +- * @see \`{@link https://api.jquery.com/dequeue/ }\` +- * @since 1.2 +- * @example ​ ````Use dequeue to end a custom queue function which allows the queue to keep going. +-```html +- +- +- +- +- dequeue demo +- +- +- +- +-​ +- +-
    +-​ +- +-​ +- +- +-``` +- */ +- dequeue(queueName?: string): this; +- /** +- * Remove the set of matched elements from the DOM. +- * @param selector A selector expression that filters the set of matched elements to be removed. +- * @see \`{@link https://api.jquery.com/detach/ }\` +- * @since 1.4 +- * @example ​ ````Detach all paragraphs from the DOM +-```html +- +- +- +- +- detach demo +- +- +- +- +-​ +-

    Hello

    +-how are +-

    you?

    +- +-​ +- +-​ +- +- +-``` +- */ +- detach(selector?: JQuery.Selector): this; +- /** +- * Iterate over a jQuery object, executing a function for each matched element. +- * @param funсtion A function to execute for each matched element. +- * @see \`{@link https://api.jquery.com/each/ }\` +- * @since 1.0 +- * @example ​ ````Iterate over three divs and sets their color property. +-```html +- +- +- +- +- each demo +- +- +- +- +-​ +-
    Click here
    +-
    to iterate through
    +-
    these divs.
    +-​ +- +-​ +- +- +-``` +- * @example ​ ````To access a jQuery object instead of the regular DOM element, use $( this ). For example: +-```html +- +- +- +- +- each demo +- +- +- +- +-​ +-To do list: (click here to change) +-
      +-
    • Eat
    • +-
    • Sleep
    • +-
    • Be merry
    • +-
    +-​ +- +-​ +- +- +-``` +- * @example ​ ````Use return false to break out of each() loops early. +-```html +- +- +- +- +- each demo +- +- +- +- +-​ +- +- +-
    +-
    +-
    +-
    +-
    Stop here
    +-
    +-
    +-
    +-​ +- +-​ +- +- +-``` +- */ +- each(funсtion: (this: TElement, index: number, element: TElement) => void | false): this; +- /** +- * Remove all child nodes of the set of matched elements from the DOM. +- * @see \`{@link https://api.jquery.com/empty/ }\` +- * @since 1.0 +- * @example ​ ````Removes all child nodes (including text nodes) from all paragraphs +-```html +- +- +- +- +- empty demo +- +- +- +- +-​ +-

    +- Hello, Person and person. +-

    +-​ +- +-​ +- +-​ +- +- +-``` +- */ +- empty(): this; +- /** +- * End the most recent filtering operation in the current chain and return the set of matched elements to its previous state. +- * @see \`{@link https://api.jquery.com/end/ }\` +- * @since 1.0 +- * @example ​ ````Selects all paragraphs, finds span elements inside these, and reverts the selection back to the paragraphs. +-```html +- +- +- +- +- end demo +- +- +- +- +-​ +-

    +- Hi there how are you doing? +-

    +-​ +-

    +- This span is one of +- several spans in this +- sentence. +-

    +-​ +-
    +- Tags in jQuery object initially: +-
    +-​ +-
    +- Tags in jQuery object after find: +-
    +-​ +-
    +- Tags in jQuery object after end: +-
    +-​ +- +-​ +- +- +-``` +- * @example ​ ````Selects all paragraphs, finds span elements inside these, and reverts the selection back to the paragraphs. +-```html +- +- +- +- +- end demo +- +- +- +- +-​ +-

    Hello, how are you?

    +-​ +- +-​ +- +- +-``` +- */ +- end(): this; +- /** +- * Reduce the set of matched elements to the one at the specified index. +- * @param index An integer indicating the 0-based position of the element. +- * An integer indicating the position of the element, counting backwards from the last element in the set. +- * @see \`{@link https://api.jquery.com/eq/ }\` +- * @since 1.1.2 +- * @since 1.4 +- * @example ​ ````Turn the div with index 2 blue by adding an appropriate class. +-```html +- +- +- +- +- eq demo +- +- +- +- +-​ +-
    +-
    +-
    +-
    +-
    +-
    +-​ +- +-​ +- +- +-``` +- */ +- eq(index: number): this; +- /** +- * Merge the contents of an object onto the jQuery prototype to provide new jQuery instance methods. +- * @param obj An object to merge onto the jQuery prototype. +- * @see \`{@link https://api.jquery.com/jQuery.fn.extend/ }\` +- * @since 1.0 +- * @example ​ ````Add two methods to the jQuery prototype ($.fn) object and then use one of them. +-```html +- +- +- +- +- jQuery.fn.extend demo +- +- +- +- +-​ +- +- +-​ +- +-​ +- +- +-``` +- */ +- extend(obj: object): this; +- /** +- * Display the matched elements by fading them to opaque. +- * @param duration A string or number determining how long the animation will run. +- * @param easing A string indicating which easing function to use for the transition. +- * @param complete A function to call once the animation is complete, called once per matched element. +- * @see \`{@link https://api.jquery.com/fadeIn/ }\` +- * @since 1.4.3 +- */ +- fadeIn(duration: JQuery.Duration, easing: string, complete?: (this: TElement) => void): this; +- /** +- * Display the matched elements by fading them to opaque. +- * @param duration_easing _@param_ `duration_easing` +- *
    +- * * `duration` — A string or number determining how long the animation will run.
    +- * * `easing` — A string indicating which easing function to use for the transition. +- * @param complete A function to call once the animation is complete, called once per matched element. +- * @see \`{@link https://api.jquery.com/fadeIn/ }\` +- * @since 1.0 +- * @since 1.4.3 +- * @example ​ ````Fades a red block in over the text. Once the animation is done, it quickly fades in more text on top. +-```html +- +- +- +- +- fadeIn demo +- +- +- +- +-​ +-

    +- Let it be known that the party of the first part +- and the party of the second part are henceforth +- and hereto directed to assess the allegations +- for factual correctness... (click!) +-

    CENSORED!
    +-

    +-​ +- +-​ +- +- +-``` +- */ +- fadeIn(duration_easing: JQuery.Duration | string, complete: (this: TElement) => void): this; +- /** +- * Display the matched elements by fading them to opaque. +- * @param duration_easing_complete_options _@param_ `duration_easing_complete_options` +- *
    +- * * `duration` — A string or number determining how long the animation will run.
    +- * * `easing` — A string indicating which easing function to use for the transition.
    +- * * `complete` — A function to call once the animation is complete, called once per matched element.
    +- * * `options` — A map of additional options to pass to the method. +- * @see \`{@link https://api.jquery.com/fadeIn/ }\` +- * @since 1.0 +- * @since 1.4.3 +- * @example ​ ````Animates hidden divs to fade in one by one, completing each animation within 600 milliseconds. +-```html +- +- +- +- +- fadeIn demo +- +- +- +- +-​ +-Click here... +-
    +-
    +-
    +-​ +- +-​ +- +- +-``` +- */ +- fadeIn(duration_easing_complete_options?: JQuery.Duration | string | ((this: TElement) => void) | JQuery.EffectsOptions): this; +- /** +- * Hide the matched elements by fading them to transparent. +- * @param duration A string or number determining how long the animation will run. +- * @param easing A string indicating which easing function to use for the transition. +- * @param complete A function to call once the animation is complete, called once per matched element. +- * @see \`{@link https://api.jquery.com/fadeOut/ }\` +- * @since 1.4.3 +- * @example ​ ````Fades out two divs, one with a "linear" easing and one with the default, "swing," easing. +-```html +- +- +- +- +- fadeOut demo +- +- +- +- +-​ +- +- +-​ +-
    +-​ +-
    linear
    +-
    swing
    +-​ +- +-​ +- +- +-``` +- */ +- fadeOut(duration: JQuery.Duration, easing: string, complete?: (this: TElement) => void): this; +- /** +- * Hide the matched elements by fading them to transparent. +- * @param duration_easing _@param_ `duration_easing` +- *
    +- * * `duration` — A string or number determining how long the animation will run.
    +- * * `easing` — A string indicating which easing function to use for the transition. +- * @param complete A function to call once the animation is complete, called once per matched element. +- * @see \`{@link https://api.jquery.com/fadeOut/ }\` +- * @since 1.0 +- * @since 1.4.3 +- * @example ​ ````Fades out spans in one section that you click on. +-```html +- +- +- +- +- fadeOut demo +- +- +- +- +-​ +-

    Find the modifiers -

    +-

    +- If you really want to go outside +- in the cold then make sure to wear +- your warm jacket given to you by +- your favorite teacher. +-

    +-​ +- +-​ +- +- +-``` +- */ +- fadeOut(duration_easing: JQuery.Duration | string, complete: (this: TElement) => void): this; +- /** +- * Hide the matched elements by fading them to transparent. +- * @param duration_easing_complete_options _@param_ `duration_easing_complete_options` +- *
    +- * * `duration` — A string or number determining how long the animation will run.
    +- * * `easing` — A string indicating which easing function to use for the transition.
    +- * * `complete` — A function to call once the animation is complete, called once per matched element.
    +- * * `options` — A map of additional options to pass to the method. +- * @see \`{@link https://api.jquery.com/fadeOut/ }\` +- * @since 1.0 +- * @since 1.4.3 +- * @example ​ ````Animates all paragraphs to fade out, completing the animation within 600 milliseconds. +-```html +- +- +- +- +- fadeOut demo +- +- +- +- +-​ +-

    +- If you click on this paragraph +- you'll see it just fade away. +-

    +-​ +- +-​ +- +- +-``` +- */ +- fadeOut(duration_easing_complete_options?: JQuery.Duration | string | ((this: TElement) => void) | JQuery.EffectsOptions): this; +- /** +- * Adjust the opacity of the matched elements. +- * @param duration A string or number determining how long the animation will run. +- * @param opacity A number between 0 and 1 denoting the target opacity. +- * @param easing A string indicating which easing function to use for the transition. +- * @param complete A function to call once the animation is complete, called once per matched element. +- * @see \`{@link https://api.jquery.com/fadeTo/ }\` +- * @since 1.4.3 +- */ +- fadeTo(duration: JQuery.Duration, opacity: number, easing: string, complete?: (this: TElement) => void): this; +- /** +- * Adjust the opacity of the matched elements. +- * @param duration A string or number determining how long the animation will run. +- * @param opacity A number between 0 and 1 denoting the target opacity. +- * @param complete A function to call once the animation is complete, called once per matched element. +- * @see \`{@link https://api.jquery.com/fadeTo/ }\` +- * @since 1.0 +- * @example ​ ````Animates first paragraph to fade to an opacity of 0.33 (33%, about one third visible), completing the animation within 600 milliseconds. +-```html +- +- +- +- +- fadeTo demo +- +- +- +-​ +-

    +-Click this paragraph to see it fade. +-

    +-​ +-

    +-Compare to this one that won't fade. +-

    +-​ +- +-​ +- +- +-``` +- * @example ​ ````Fade div to a random opacity on each click, completing the animation within 200 milliseconds. +-```html +- +- +- +- +- fadeTo demo +- +- +- +- +-​ +-

    And this is the library that John built...

    +-​ +-
    +-
    +-
    +-​ +- +-​ +- +- +-``` +- * @example ​ ````Find the right answer! The fade will take 250 milliseconds and change various styles when it completes. +-```html +- +- +- +- +- fadeTo demo +- +- +- +- +-​ +-

    Wrong

    +-
    +-

    Wrong

    +-
    +-

    Right!

    +-
    +-​ +- +-​ +- +- +-``` +- */ +- fadeTo(duration: JQuery.Duration, opacity: number, complete?: (this: TElement) => void): this; +- /** +- * Display or hide the matched elements by animating their opacity. +- * @param duration A string or number determining how long the animation will run. +- * @param easing A string indicating which easing function to use for the transition. +- * @param complete A function to call once the animation is complete, called once per matched element. +- * @see \`{@link https://api.jquery.com/fadeToggle/ }\` +- * @since 1.4.4 +- * @example ​ ````Fades first paragraph in or out, completing the animation within 600 milliseconds and using a linear easing. Fades last paragraph in or out for 200 milliseconds, inserting a "finished" message upon completion. +-```html +- +- +- +- +- fadeToggle demo +- +- +- +-​ +- +- +-

    This paragraph has a slow, linear fade.

    +-

    This paragraph has a fast animation.

    +-
    +-​ +- +-​ +- +- +-``` +- */ +- fadeToggle(duration: JQuery.Duration, easing: string, complete?: (this: TElement) => void): this; +- /** +- * Display or hide the matched elements by animating their opacity. +- * @param duration_easing _@param_ `duration_easing` +- *
    +- * * `duration` — A string or number determining how long the animation will run.
    +- * * `easing` — A string indicating which easing function to use for the transition. +- * @param complete A function to call once the animation is complete, called once per matched element. +- * @see \`{@link https://api.jquery.com/fadeToggle/ }\` +- * @since 1.0 +- * @since 1.4.3 +- * @example ​ ````Fades first paragraph in or out, completing the animation within 600 milliseconds and using a linear easing. Fades last paragraph in or out for 200 milliseconds, inserting a "finished" message upon completion. +-```html +- +- +- +- +- fadeToggle demo +- +- +- +-​ +- +- +-

    This paragraph has a slow, linear fade.

    +-

    This paragraph has a fast animation.

    +-
    +-​ +- +-​ +- +- +-``` +- */ +- fadeToggle(duration_easing: JQuery.Duration | string, complete: (this: TElement) => void): this; +- /** +- * Display or hide the matched elements by animating their opacity. +- * @param duration_easing_complete_options _@param_ `duration_easing_complete_options` +- *
    +- * * `duration` — A string or number determining how long the animation will run.
    +- * * `easing` — A string indicating which easing function to use for the transition.
    +- * * `complete` — A function to call once the animation is complete, called once per matched element.
    +- * * `options` — A map of additional options to pass to the method. +- * @see \`{@link https://api.jquery.com/fadeToggle/ }\` +- * @since 1.0 +- * @since 1.4.3 +- */ +- fadeToggle(duration_easing_complete_options?: JQuery.Duration | string | ((this: TElement) => void) | JQuery.EffectsOptions): this; +- /** +- * Reduce the set of matched elements to those that match the selector or pass the function's test. +- * @param selector_elements_selection_function _@param_ `selector_elements_selection_function` +- *
    +- * * `selector` — A string containing a selector expression to match the current set of elements against.
    +- * * `elements` — One or more DOM elements to match the current set of elements against.
    +- * * `selection` — An existing jQuery object to match the current set of elements against.
    +- * * `function` — A function used as a test for each element in the set. this is the current DOM element. +- * @see \`{@link https://api.jquery.com/filter/ }\` +- * @since 1.0 +- * @since 1.4 +- * @example ​ ````Change the color of all divs; then add a border to those with a "middle" class. +-```html +- +- +- +- +- filter demo +- +- +- +- +-​ +-
    +-
    +-
    +-
    +-
    +-
    +-​ +- +-​ +- +- +-``` +- * @example ​ ````Change the color of all divs; then add a border to the second one (index == 1) and the div with an id of "fourth." +-```html +- +- +- +- +- filter demo +- +- +- +- +-​ +-
    +-
    +-
    +-
    +-
    +-
    +-​ +- +-​ +- +- +-``` +- * @example ​ ````Select all divs and filter the selection with a DOM element, keeping only the one with an id of "unique". +-```javascript +-$( "div" ).filter( document.getElementById( "unique" ) ); +-``` +- * @example ​ ````Select all divs and filter the selection with a jQuery object, keeping only the one with an id of "unique". +-```javascript +-$( "div" ).filter( $( "#unique" ) ); +-``` +- */ +- filter(selector_elements_selection_function: +- JQuery.Selector | +- JQuery.TypeOrArray | +- JQuery | +- ((this: TElement, index: number, element: TElement) => boolean) +- ): this; +- /** +- * Get the descendants of each element in the current set of matched elements, filtered by a selector, jQuery object, or element. +- * @param selector_element _@param_ `selector_element` +- *
    +- * * `selector` — A string containing a selector expression to match elements against.
    +- * * `element` — An element or a jQuery object to match elements against. +- * @see \`{@link https://api.jquery.com/find/ }\` +- * @since 1.0 +- * @since 1.6 +- * @example ​ ````Starts with all paragraphs and searches for descendant span elements, same as $( "p span" ) +-```html +- +- +- +- +- find demo +- +- +- +-​ +-

    Hello, how are you?

    +-

    Me? I'm good.

    +-​ +- +-​ +- +- +-``` +- * @example ​ ````A selection using a jQuery collection of all span tags. Only spans within p tags are changed to red while others are left blue. +-```html +- +- +- +- +- find demo +- +- +- +- +-​ +-

    Hello, how are you?

    +-

    Me? I'm good.

    +-
    Did you eat yet?
    +-​ +- +-​ +- +- +-``` +- * @example ​ ````Add spans around each word then add a hover and italicize words with the letter t. +-```html +- +- +- +- +- find demo +- +- +- +- +-​ +-

    +- When the day is short +- find that which matters to you +- or stop believing +-

    +-​ +- +-​ +- +- +-``` +- */ +- find(selector_element: JQuery.Selector | Element | JQuery): this; +- /** +- * Stop the currently-running animation, remove all queued animations, and complete all animations for the matched elements. +- * @param queue The name of the queue in which to stop animations. +- * @see \`{@link https://api.jquery.com/finish/ }\` +- * @since 1.9 +- * @example ​ ````Click the Go button once to start the animation, and then click the other buttons to see how they affect the current and queued animations. +-```html +- +- +- +- +- finish demo +- +- +- +- +-​ +-
    +-
    +- +-
    +- +- +-
    +- +- +-
    +- +- +-
    +- +-
    +- +-
    +-​ +- +-​ +- +- +-``` +- */ +- finish(queue?: string): this; +- /** +- * Reduce the set of matched elements to the first in the set. +- * @see \`{@link https://api.jquery.com/first/ }\` +- * @since 1.4 +- * @example ​ ````Highlight the first span in a paragraph. +-```html +- +- +- +- +- first demo +- +- +- +- +-​ +-

    +- Look: +- This is some text in a paragraph. +- This is a note about it. +-

    +-​ +- +-​ +- +- +-``` +- */ +- first(): this; +- /** +- * Bind an event handler to the "focus" JavaScript event, or trigger that event on an element. +- * @param eventData An object containing data that will be passed to the event handler. +- * @param handler A function to execute each time the event is triggered. +- * @see \`{@link https://api.jquery.com/focus/ }\` +- * @since 1.4.3 +- * @deprecated ​ Deprecated since 3.3. Use \`{@link on }\` or \`{@link trigger }\`. +- * +- * **Cause**: The `.on()` and `.trigger()` methods can set an event handler or generate an event for any event type, and should be used instead of the shortcut methods. This message also applies to the other event shorthands, including: blur, focus, focusin, focusout, resize, scroll, dblclick, mousedown, mouseup, mousemove, mouseover, mouseout, mouseenter, mouseleave, change, select, submit, keydown, keypress, keyup, and contextmenu. +- * +- * **Solution**: Instead of `.click(fn)` use `.on("click", fn)`. Instead of `.click()` use `.trigger("click")`. +- */ +- focus(eventData: TData, +- handler: JQuery.TypeEventHandler): this; +- /** +- * Bind an event handler to the "focus" JavaScript event, or trigger that event on an element. +- * @param handler A function to execute each time the event is triggered. +- * @see \`{@link https://api.jquery.com/focus/ }\` +- * @since 1.0 +- * @deprecated ​ Deprecated since 3.3. Use \`{@link on }\` or \`{@link trigger }\`. +- * +- * **Cause**: The `.on()` and `.trigger()` methods can set an event handler or generate an event for any event type, and should be used instead of the shortcut methods. This message also applies to the other event shorthands, including: blur, focus, focusin, focusout, resize, scroll, dblclick, mousedown, mouseup, mousemove, mouseover, mouseout, mouseenter, mouseleave, change, select, submit, keydown, keypress, keyup, and contextmenu. +- * +- * **Solution**: Instead of `.click(fn)` use `.on("click", fn)`. Instead of `.click()` use `.trigger("click")`. +- * @example ​ ````Fire focus. +-```html +- +- +- +- +- focus demo +- +- +- +- +-​ +-

    focus fire

    +-

    focus fire

    +-​ +- +-​ +- +- +-``` +- * @example ​ ````To stop people from writing in text input boxes, try: +-```javascript +-$( "input[type=text]" ).focus(function() { +- $( this ).blur(); +-}); +-``` +- * @example ​ ````To focus on a login input box with id 'login' on page startup, try: +-```javascript +-$( document ).ready(function() { +- $( "#login" ).focus(); +-}); +-``` +- */ +- focus(handler?: JQuery.TypeEventHandler | +- false): this; +- /** +- * Bind an event handler to the "focusin" event. +- * @param eventData An object containing data that will be passed to the event handler. +- * @param handler A function to execute each time the event is triggered. +- * @see \`{@link https://api.jquery.com/focusin/ }\` +- * @since 1.4.3 +- * @deprecated ​ Deprecated since 3.3. Use \`{@link on }\` or \`{@link trigger }\`. +- * +- * **Cause**: The `.on()` and `.trigger()` methods can set an event handler or generate an event for any event type, and should be used instead of the shortcut methods. This message also applies to the other event shorthands, including: blur, focus, focusin, focusout, resize, scroll, dblclick, mousedown, mouseup, mousemove, mouseover, mouseout, mouseenter, mouseleave, change, select, submit, keydown, keypress, keyup, and contextmenu. +- * +- * **Solution**: Instead of `.click(fn)` use `.on("click", fn)`. Instead of `.click()` use `.trigger("click")`. +- */ +- focusin(eventData: TData, +- handler: JQuery.TypeEventHandler): this; +- /** +- * Bind an event handler to the "focusin" event. +- * @param handler A function to execute each time the event is triggered. +- * @see \`{@link https://api.jquery.com/focusin/ }\` +- * @since 1.4 +- * @deprecated ​ Deprecated since 3.3. Use \`{@link on }\` or \`{@link trigger }\`. +- * +- * **Cause**: The `.on()` and `.trigger()` methods can set an event handler or generate an event for any event type, and should be used instead of the shortcut methods. This message also applies to the other event shorthands, including: blur, focus, focusin, focusout, resize, scroll, dblclick, mousedown, mouseup, mousemove, mouseover, mouseout, mouseenter, mouseleave, change, select, submit, keydown, keypress, keyup, and contextmenu. +- * +- * **Solution**: Instead of `.click(fn)` use `.on("click", fn)`. Instead of `.click()` use `.trigger("click")`. +- * @example ​ ````Watch for a focus to occur within the paragraphs on the page. +-```html +- +- +- +- +- focusin demo +- +- +- +- +-​ +-

    focusin fire

    +-

    focusin fire

    +-​ +- +-​ +- +- +-``` +- */ +- focusin(handler?: JQuery.TypeEventHandler | +- false): this; +- /** +- * Bind an event handler to the "focusout" JavaScript event. +- * @param eventData An object containing data that will be passed to the event handler. +- * @param handler A function to execute each time the event is triggered. +- * @see \`{@link https://api.jquery.com/focusout/ }\` +- * @since 1.4.3 +- * @deprecated ​ Deprecated since 3.3. Use \`{@link on }\` or \`{@link trigger }\`. +- * +- * **Cause**: The `.on()` and `.trigger()` methods can set an event handler or generate an event for any event type, and should be used instead of the shortcut methods. This message also applies to the other event shorthands, including: blur, focus, focusin, focusout, resize, scroll, dblclick, mousedown, mouseup, mousemove, mouseover, mouseout, mouseenter, mouseleave, change, select, submit, keydown, keypress, keyup, and contextmenu. +- * +- * **Solution**: Instead of `.click(fn)` use `.on("click", fn)`. Instead of `.click()` use `.trigger("click")`. +- */ +- focusout(eventData: TData, +- handler: JQuery.TypeEventHandler): this; +- /** +- * Bind an event handler to the "focusout" JavaScript event. +- * @param handler A function to execute each time the event is triggered. +- * @see \`{@link https://api.jquery.com/focusout/ }\` +- * @since 1.4 +- * @deprecated ​ Deprecated since 3.3. Use \`{@link on }\` or \`{@link trigger }\`. +- * +- * **Cause**: The `.on()` and `.trigger()` methods can set an event handler or generate an event for any event type, and should be used instead of the shortcut methods. This message also applies to the other event shorthands, including: blur, focus, focusin, focusout, resize, scroll, dblclick, mousedown, mouseup, mousemove, mouseover, mouseout, mouseenter, mouseleave, change, select, submit, keydown, keypress, keyup, and contextmenu. +- * +- * **Solution**: Instead of `.click(fn)` use `.on("click", fn)`. Instead of `.click()` use `.trigger("click")`. +- * @example ​ ````Watch for a loss of focus to occur inside paragraphs and note the difference between the focusout count and the blur count. (The blur count does not change because those events do not bubble.) +-```html +- +- +- +- +- focusout demo +- +- +- +- +-​ +-
    +-

    +-
    +- +-

    +-

    +- +-

    +-
    +-
    focusout fire
    +-
    blur fire
    +-​ +- +-​ +- +- +-``` +- */ +- focusout(handler?: JQuery.TypeEventHandler | +- false): this; +- /** +- * Retrieve one of the elements matched by the jQuery object. +- * @param index A zero-based integer indicating which element to retrieve. +- * @see \`{@link https://api.jquery.com/get/ }\` +- * @since 1.0 +- * @example ​ ````Display the tag name of the click element. +-```html +- +- +- +- +- get demo +- +- +- +- +-​ +-  +-

    In this paragraph is an important section

    +-
    +-​ +- +-​ +- +- +-``` +- */ +- get(index: number): TElement; +- /** +- * Retrieve the elements matched by the jQuery object. +- * @see \`{@link https://api.jquery.com/get/ }\` +- * @since 1.0 +- * @example ​ ````Select all divs in the document and return the DOM Elements as an Array; then use the built-in reverse() method to reverse that array. +-```html +- +- +- +- +- get demo +- +- +- +- +-​ +-Reversed - +-​ +-
    One
    +-
    Two
    +-
    Three
    +-​ +- +-​ +- +- +-``` +- */ +- get(): TElement[]; +- /** +- * Reduce the set of matched elements to those that have a descendant that matches the selector or DOM element. +- * @param selector_contained _@param_ `selector_contained` +- *
    +- * * `selector` — A string containing a selector expression to match elements against.
    +- * * `contained` — A DOM element to match elements against. +- * @see \`{@link https://api.jquery.com/has/ }\` +- * @since 1.4 +- * @example ​ ````Check if an element is inside another. +-```html +- +- +- +- +- has demo +- +- +- +- +-​ +-
    • Does the UL contain an LI?
    +-​ +- +-​ +- +- +-``` +- */ +- has(selector_contained: string | Element): this; +- /** +- * Determine whether any of the matched elements are assigned the given class. +- * @param className The class name to search for. +- * @see \`{@link https://api.jquery.com/hasClass/ }\` +- * @since 1.2 +- * @example ​ ````Looks for the paragraph that contains 'selected' as a class. +-```html +- +- +- +- +- hasClass demo +- +- +- +- +-​ +-

    This paragraph is black and is the first paragraph.

    +-

    This paragraph is red and is the second paragraph.

    +-
    First paragraph has selected class:
    +-
    Second paragraph has selected class:
    +-
    At least one paragraph has selected class:
    +-​ +- +-​ +- +- +-``` +- */ +- hasClass(className: string): boolean; +- /** +- * Set the CSS height of every matched element. +- * @param value_function _@param_ `value_function` +- *
    +- * * `value` — An integer representing the number of pixels, or an integer with an optional unit of measure +- * appended (as a string).
    +- * * `function` — A function returning the height to set. Receives the index position of the element in the set and +- * the old height as arguments. Within the function, `this` refers to the current element in the set. +- * @see \`{@link https://api.jquery.com/height/ }\` +- * @since 1.0 +- * @since 1.4.1 +- * @example ​ ````To set the height of each div on click to 30px plus a color change. +-```html +- +- +- +- +- height demo +- +- +- +- +-​ +-
    +-
    +-
    +-
    +-
    +-​ +- +-​ +- +- +-``` +- */ +- height(value_function: string | number | ((this: TElement, index: number, height: number) => string | number)): this; +- /** +- * Get the current computed height for the first element in the set of matched elements. +- * @see \`{@link https://api.jquery.com/height/ }\` +- * @since 1.0 +- * @example ​ ````Show various heights. Note the values are from the iframe so might be smaller than you expected. The yellow highlight shows the iframe body. +-```html +- +- +- +- +- height demo +- +- +- +- +-​ +- +- +- +-​ +-
     
    +-

    +- Sample paragraph to test height +-

    +-​ +- +-​ +- +- +-``` +- */ +- height(): number | undefined; +- /** +- * Hide the matched elements. +- * @param duration A string or number determining how long the animation will run. +- * @param easing A string indicating which easing function to use for the transition. +- * @param complete A function to call once the animation is complete, called once per matched element. +- * @see \`{@link https://api.jquery.com/hide/ }\` +- * @since 1.4.3 +- */ +- hide(duration: JQuery.Duration, easing: string, complete: (this: TElement) => void): this; +- /** +- * Hide the matched elements. +- * @param duration A string or number determining how long the animation will run. +- * @param easing_complete _@param_ `easing_complete` +- *
    +- * * `easing` — A string indicating which easing function to use for the transition.
    +- * * `complete` — A function to call once the animation is complete, called once per matched element. +- * @see \`{@link https://api.jquery.com/hide/ }\` +- * @since 1.0 +- * @since 1.4.3 +- * @example ​ ````Animates all spans (words in this case) to hide fastly, completing each animation within 200 milliseconds. Once each animation is done, it starts the next one. +-```html +- +- +- +- +- hide demo +- +- +- +- +-​ +- +- +-
    +- Once upon a +- time there were +- three programmers... +-
    +-​ +- +-​ +- +- +-``` +- * @example ​ ````Hides the divs when clicked over 2 seconds, then removes the div element when its hidden. Try clicking on more than one box at a time. +-```html +- +- +- +- +- hide demo +- +- +- +- +-​ +-
    +-​ +- +-​ +- +- +-``` +- */ +- hide(duration: JQuery.Duration, easing_complete: string | ((this: TElement) => void)): this; +- /** +- * Hide the matched elements. +- * @param duration_complete_options _@param_ `duration_complete_options` +- *
    +- * * `duration` — A string or number determining how long the animation will run.
    +- * * `complete` — A function to call once the animation is complete, called once per matched element.
    +- * * `options` — A map of additional options to pass to the method. +- * @see \`{@link https://api.jquery.com/hide/ }\` +- * @since 1.0 +- * @example ​ ````Hides all paragraphs then the link on click. +-```html +- +- +- +- +- hide demo +- +- +- +-​ +-

    Hello

    +-Click to hide me too +-

    Here is another paragraph

    +-​ +- +-​ +- +- +-``` +- * @example ​ ````Animates all shown paragraphs to hide slowly, completing the animation within 600 milliseconds. +-```html +- +- +- +- +- hide demo +- +- +- +- +-​ +- +-

    Hiya

    +-

    Such interesting text, eh?

    +-​ +- +-​ +- +- +-``` +- */ +- hide(duration_complete_options?: JQuery.Duration | ((this: TElement) => void) | JQuery.EffectsOptions): this; +- /** +- * Bind two handlers to the matched elements, to be executed when the mouse pointer enters and leaves the elements. +- * @param handlerIn A function to execute when the mouse pointer enters the element. +- * @param handlerOut A function to execute when the mouse pointer leaves the element. +- * @see \`{@link https://api.jquery.com/hover/ }\` +- * @since 1.0 +- * @deprecated ​ Deprecated. +- * +- * **Cause**: The `.hover()` method is a shorthand for the use of the `mouseover`/`mouseout` events. It is often a poor user interface choice because it does not allow for any small amounts of delay between when the mouse enters or exits an area and when the event fires. This can make it quite difficult to use with UI widgets such as drop-down menus. For more information on the problems of hovering, see the \`{@link http://cherne.net/brian/resources/jquery.hoverIntent.html hoverIntent plugin}\`. +- * +- * **Solution**: Review uses of `.hover()` to determine if they are appropriate, and consider use of plugins such as `hoverIntent` as an alternative. The direct replacement for `.hover(fn1, fn2)`, is `.on("mouseenter", fn1).on("mouseleave", fn2)`. +- * @example ​ ````To add a special style to list items that are being hovered over, try: +-```html +- +- +- +- +- hover demo +- +- +- +- +-​ +-
      +-
    • Milk
    • +-
    • Bread
    • +-
    • Chips
    • +-
    • Socks
    • +-
    +-​ +- +-​ +- +- +-``` +- * @example ​ ````To add a special style to table cells that are being hovered over, try: +-```javascript +-$( "td" ).hover( +- function() { +- $( this ).addClass( "hover" ); +- }, function() { +- $( this ).removeClass( "hover" ); +- } +-); +-``` +- * @example ​ ````To unbind the above example use: +-```javascript +-$( "td" ).off( "mouseenter mouseleave" ); +-``` +- */ +- hover(handlerIn: JQuery.TypeEventHandler | +- false, +- handlerOut: JQuery.TypeEventHandler | +- false): this; +- /** +- * Bind a single handler to the matched elements, to be executed when the mouse pointer enters or leaves the elements. +- * @param handlerInOut A function to execute when the mouse pointer enters or leaves the element. +- * @see \`{@link https://api.jquery.com/hover/ }\` +- * @since 1.4 +- * @deprecated ​ Deprecated. +- * +- * **Cause**: The `.hover()` method is a shorthand for the use of the `mouseover`/`mouseout` events. It is often a poor user interface choice because it does not allow for any small amounts of delay between when the mouse enters or exits an area and when the event fires. This can make it quite difficult to use with UI widgets such as drop-down menus. For more information on the problems of hovering, see the \`{@link http://cherne.net/brian/resources/jquery.hoverIntent.html hoverIntent plugin}\`. +- * +- * **Solution**: Review uses of `.hover()` to determine if they are appropriate, and consider use of plugins such as `hoverIntent` as an alternative. The direct replacement for `.hover(fn1, fn2)`, is `.on("mouseenter", fn1).on("mouseleave", fn2)`. +- * @example ​ ````Slide the next sibling LI up or down on hover, and toggle a class. +-```html +- +- +- +- +- hover demo +- +- +- +- +-​ +-
      +-
    • Milk
    • +-
    • White
    • +-
    • Carrots
    • +-
    • Orange
    • +-
    • Broccoli
    • +-
    • Green
    • +-
    +-​ +- +-​ +- +- +-``` +- */ +- hover(handlerInOut: JQuery.TypeEventHandler | +- false): this; +- /** +- * Set the HTML contents of each element in the set of matched elements. +- * @param htmlString_function _@param_ `htmlString_function` +- *
    +- * * `htmlString` — A string of HTML to set as the content of each matched element.
    +- * * `function` — A function returning the HTML content to set. Receives the index position of the element in the set +- * and the old HTML value as arguments. jQuery empties the element before calling the function; use the +- * oldhtml argument to reference the previous content. Within the function, `this` refers to the current +- * element in the set. +- * @see \`{@link https://api.jquery.com/html/ }\` +- * @since 1.0 +- * @since 1.4 +- * @example ​ ````Add some html to each div. +-```html +- +- +- +- +- html demo +- +- +- +- +-​ +-Hello +-
    +-
    +-
    +-​ +- +-​ +- +- +-``` +- * @example ​ ````Add some html to each div then immediately do further manipulations to the inserted html. +-```html +- +- +- +- +- html demo +- +- +- +- +-​ +-
    +-
    +-
    +-​ +- +-​ +- +- +-``` +- */ +- html(htmlString_function: JQuery.htmlString | +- JQuery.Node | +- ((this: TElement, index: number, oldhtml: JQuery.htmlString) => JQuery.htmlString | JQuery.Node)): this; +- /** +- * Get the HTML contents of the first element in the set of matched elements. +- * @see \`{@link https://api.jquery.com/html/ }\` +- * @since 1.0 +- * @example ​ ````Click a paragraph to convert it from html to text. +-```html +- +- +- +- +- html demo +- +- +- +- +-​ +-

    +- Click to change the html +-

    +-

    +- to a text node. +-

    +-

    +- This does nothing. +-

    +-​ +- +-​ +- +- +-``` +- */ +- html(): string; +- /** +- * Search for a given element from among the matched elements. +- * @param selector_element _@param_ `selector_element` +- *
    +- * * `selector` — A selector representing a jQuery collection in which to look for an element.
    +- * * `element` — The DOM element or first element within the jQuery object to look for. +- * @see \`{@link https://api.jquery.com/index/ }\` +- * @since 1.0 +- * @since 1.4 +- * @example ​ ````On click, returns the index (zero-based) of that div in the page. +-```html +- +- +- +- +- index demo +- +- +- +- +-​ +-Click a div! +-
    First div
    +-
    Second div
    +-
    Third div
    +-​ +- +-​ +- +- +-``` +- * @example ​ ````Returns the index for the element with ID bar. +-```html +- +- +- +- +- index demo +- +- +- +- +-​ +-
      +-
    • foo
    • +-
    • bar
    • +-
    • baz
    • +-
    +-
    +-​ +- +-​ +- +- +-``` +- * @example ​ ````Returns the index for the first item in the jQuery collection. +-```html +- +- +- +- +- index demo +- +- +- +- +-​ +-
      +-
    • foo
    • +-
    • bar
    • +-
    • baz
    • +-
    +-
    +-​ +- +-​ +- +- +-``` +- * @example ​ ````Returns the index for the element with ID bar in relation to all <li> elements. +-```html +- +- +- +- +- index demo +- +- +- +- +-​ +-
      +-
    • foo
    • +-
    • bar
    • +-
    • baz
    • +-
    +-
    +-​ +- +-​ +- +- +-``` +- * @example ​ ````Returns the index for the element with ID bar in relation to its siblings. +-```html +- +- +- +- +- index demo +- +- +- +- +-​ +-
      +-
    • foo
    • +-
    • bar
    • +-
    • baz
    • +-
    +-
    +-​ +- +-​ +- +- +-``` +- * @example ​ ````Returns -1, as there is no element with ID foobar. +-```html +- +- +- +- +- index demo +- +- +- +- +-​ +-
      +-
    • foo
    • +-
    • bar
    • +-
    • baz
    • +-
    +-
    +-​ +- +-​ +- +- +-``` +- */ +- index(selector_element?: JQuery.Selector | Element | JQuery): number; +- /** +- * Set the CSS inner height of each element in the set of matched elements. +- * @param value_function _@param_ `value_function` +- *
    +- * * `value` — A number representing the number of pixels, or a number along with an optional unit of measure +- * appended (as a string).
    +- * * `function` — A function returning the inner height (including padding but not border) to set. Receives the index +- * position of the element in the set and the old inner height as arguments. Within the function, `this` +- * refers to the current element in the set. +- * @see \`{@link https://api.jquery.com/innerHeight/ }\` +- * @since 1.8.0 +- * @example ​ ````Change the inner height of each div the first time it is clicked (and change its color). +-```html +- +- +- +- +- innerHeight demo +- +- +- +- +-​ +-
    d
    +-
    d
    +-
    d
    +-
    d
    +-
    d
    +-​ +- +-​ +- +- +-``` +- */ +- innerHeight(value_function: string | number | ((this: TElement, index: number, height: number) => string | number)): this; +- /** +- * Get the current computed height for the first element in the set of matched elements, including padding but not border. +- * @see \`{@link https://api.jquery.com/innerHeight/ }\` +- * @since 1.2.6 +- * @example ​ ````Get the innerHeight of a paragraph. +-```html +- +- +- +- +- innerHeight demo +- +- +- +- +-​ +-

    Hello

    +-

    +-​ +- +-​ +- +- +-``` +- */ +- innerHeight(): number | undefined; +- /** +- * Set the CSS inner width of each element in the set of matched elements. +- * @param value_function _@param_ `value_function` +- *
    +- * * `value` — A number representing the number of pixels, or a number along with an optional unit of measure +- * appended (as a string).
    +- * * `function` — A function returning the inner width (including padding but not border) to set. Receives the index +- * position of the element in the set and the old inner width as arguments. Within the function, `this` +- * refers to the current element in the set. +- * @see \`{@link https://api.jquery.com/innerWidth/ }\` +- * @since 1.8.0 +- * @example ​ ````Change the inner width of each div the first time it is clicked (and change its color). +-```html +- +- +- +- +- innerWidth demo +- +- +- +- +-​ +-
    d
    +-
    d
    +-
    d
    +-
    d
    +-
    d
    +-​ +- +-​ +- +- +-``` +- */ +- innerWidth(value_function: string | number | ((this: TElement, index: number, width: number) => string | number)): this; +- /** +- * Get the current computed inner width for the first element in the set of matched elements, including padding but not border. +- * @see \`{@link https://api.jquery.com/innerWidth/ }\` +- * @since 1.2.6 +- * @example ​ ````Get the innerWidth of a paragraph. +-```html +- +- +- +- +- innerWidth demo +- +- +- +- +-​ +-

    Hello

    +-

    +-​ +- +-​ +- +- +-``` +- */ +- innerWidth(): number | undefined; +- /** +- * Insert every element in the set of matched elements after the target. +- * @param target A selector, element, array of elements, HTML string, or jQuery object; the matched set of elements +- * will be inserted after the element(s) specified by this parameter. +- * @see \`{@link https://api.jquery.com/insertAfter/ }\` +- * @since 1.0 +- * @example ​ ````Insert all paragraphs after an element with id of "foo". Same as $( "#foo" ).after( "p" ) +-```html +- +- +- +- +- insertAfter demo +- +- +- +- +-​ +-

    is what I said...

    +-
    FOO!
    +-​ +- +-​ +- +- +-``` +- */ +- insertAfter(target: JQuery.Selector | JQuery.htmlString | JQuery.TypeOrArray | JQuery): this; +- /** +- * Insert every element in the set of matched elements before the target. +- * @param target A selector, element, array of elements, HTML string, or jQuery object; the matched set of elements +- * will be inserted before the element(s) specified by this parameter. +- * @see \`{@link https://api.jquery.com/insertBefore/ }\` +- * @since 1.0 +- * @example ​ ````Insert all paragraphs before an element with id of "foo". Same as $( "#foo" ).before( "p" ) +-```html +- +- +- +- +- insertBefore demo +- +- +- +- +-​ +-
    FOO!
    +-

    I would like to say:

    +-​ +- +-​ +- +- +-``` +- */ +- insertBefore(target: JQuery.Selector | JQuery.htmlString | JQuery.TypeOrArray | JQuery): this; +- /** +- * Check the current matched set of elements against a selector, element, or jQuery object and return true if at least one of these elements matches the given arguments. +- * @param selector_function_selection_elements _@param_ `selector_function_selection_elements` +- *
    +- * * `selector` — A string containing a selector expression to match elements against.
    +- * * `function` — A function used as a test for every element in the set. It accepts two arguments, `index`, which is +- * the element's index in the jQuery collection, and `element`, which is the DOM element. Within the +- * function, `this` refers to the current DOM element.
    +- * * `selection` — An existing jQuery object to match the current set of elements against.
    +- * * `elements` — One or more elements to match the current set of elements against. +- * @see \`{@link https://api.jquery.com/is/ }\` +- * @since 1.0 +- * @since 1.6 +- * @example ​ ````Shows a few ways is() can be used inside an event handler. +-```html +- +- +- +- +- is demo +- +- +- +- +-​ +-
    +-
    +-
    +-
    +-

    Peter
    +-
    +-

     

    +-​ +- +-​ +- +- +-``` +- * @example ​ ````Returns true, because the parent of the input is a form element. +-```html +- +- +- +- +- is demo +- +- +- +- +-​ +-
    +- +-
    +-
    +-​ +- +-​ +- +- +-``` +- * @example ​ ````Returns false, because the parent of the input is a p element. +-```html +- +- +- +- +- is demo +- +- +- +- +-​ +-
    +-

    +-
    +-
    +-​ +- +-​ +- +- +-``` +- * @example ​ ````Checks against an existing collection of alternating list elements. Blue, alternating list elements slide up while others turn red. +-```html +- +- +- +- +- is demo +- +- +- +- +-​ +-
      +-
    • Chrome
    • +-
    • Safari
    • +-
    • Firefox
    • +-
    • Opera
    • +-
    +-​ +- +-​ +- +- +-``` +- * @example ​ ````An alternate way to achieve the above example using an element rather than a jQuery object. Checks against an existing collection of alternating list elements. Blue, alternating list elements slide up while others turn red. +-```html +- +- +- +- +- is demo +- +- +- +- +-​ +-
      +-
    • Chrome
    • +-
    • Safari
    • +-
    • Firefox
    • +-
    • Opera
    • +-
    +-​ +- +-​ +- +- +-``` +- */ +- is(selector_function_selection_elements: JQuery.Selector | JQuery.TypeOrArray | JQuery | ((this: TElement, index: number, element: TElement) => boolean)): boolean; +- /** +- * Bind an event handler to the "keydown" JavaScript event, or trigger that event on an element. +- * @param eventData An object containing data that will be passed to the event handler. +- * @param handler A function to execute each time the event is triggered. +- * @see \`{@link https://api.jquery.com/keydown/ }\` +- * @since 1.4.3 +- * @deprecated ​ Deprecated since 3.3. Use \`{@link on }\` or \`{@link trigger }\`. +- * +- * **Cause**: The `.on()` and `.trigger()` methods can set an event handler or generate an event for any event type, and should be used instead of the shortcut methods. This message also applies to the other event shorthands, including: blur, focus, focusin, focusout, resize, scroll, dblclick, mousedown, mouseup, mousemove, mouseover, mouseout, mouseenter, mouseleave, change, select, submit, keydown, keypress, keyup, and contextmenu. +- * +- * **Solution**: Instead of `.click(fn)` use `.on("click", fn)`. Instead of `.click()` use `.trigger("click")`. +- */ +- keydown(eventData: TData, +- handler: JQuery.TypeEventHandler): this; +- /** +- * Bind an event handler to the "keydown" JavaScript event, or trigger that event on an element. +- * @param handler A function to execute each time the event is triggered. +- * @see \`{@link https://api.jquery.com/keydown/ }\` +- * @since 1.0 +- * @deprecated ​ Deprecated since 3.3. Use \`{@link on }\` or \`{@link trigger }\`. +- * +- * **Cause**: The `.on()` and `.trigger()` methods can set an event handler or generate an event for any event type, and should be used instead of the shortcut methods. This message also applies to the other event shorthands, including: blur, focus, focusin, focusout, resize, scroll, dblclick, mousedown, mouseup, mousemove, mouseover, mouseout, mouseenter, mouseleave, change, select, submit, keydown, keypress, keyup, and contextmenu. +- * +- * **Solution**: Instead of `.click(fn)` use `.on("click", fn)`. Instead of `.click()` use `.trigger("click")`. +- * @example ​ ````Show the event object for the keydown handler when a key is pressed in the input. +-```html +- +- +- +- +- keydown demo +- +- +- +- +-​ +-
    +-
    +- +- +-
    +-
    +- +- +-​ +- +-​ +- +- +-``` +- */ +- keydown(handler?: JQuery.TypeEventHandler | +- false): this; +- /** +- * Bind an event handler to the "keypress" JavaScript event, or trigger that event on an element. +- * @param eventData An object containing data that will be passed to the event handler. +- * @param handler A function to execute each time the event is triggered. +- * @see \`{@link https://api.jquery.com/keypress/ }\` +- * @since 1.4.3 +- * @deprecated ​ Deprecated since 3.3. Use \`{@link on }\` or \`{@link trigger }\`. +- * +- * **Cause**: The `.on()` and `.trigger()` methods can set an event handler or generate an event for any event type, and should be used instead of the shortcut methods. This message also applies to the other event shorthands, including: blur, focus, focusin, focusout, resize, scroll, dblclick, mousedown, mouseup, mousemove, mouseover, mouseout, mouseenter, mouseleave, change, select, submit, keydown, keypress, keyup, and contextmenu. +- * +- * **Solution**: Instead of `.click(fn)` use `.on("click", fn)`. Instead of `.click()` use `.trigger("click")`. +- */ +- keypress(eventData: TData, +- handler: JQuery.TypeEventHandler): this; +- /** +- * Bind an event handler to the "keypress" JavaScript event, or trigger that event on an element. +- * @param handler A function to execute each time the event is triggered. +- * @see \`{@link https://api.jquery.com/keypress/ }\` +- * @since 1.0 +- * @deprecated ​ Deprecated since 3.3. Use \`{@link on }\` or \`{@link trigger }\`. +- * +- * **Cause**: The `.on()` and `.trigger()` methods can set an event handler or generate an event for any event type, and should be used instead of the shortcut methods. This message also applies to the other event shorthands, including: blur, focus, focusin, focusout, resize, scroll, dblclick, mousedown, mouseup, mousemove, mouseover, mouseout, mouseenter, mouseleave, change, select, submit, keydown, keypress, keyup, and contextmenu. +- * +- * **Solution**: Instead of `.click(fn)` use `.on("click", fn)`. Instead of `.click()` use `.trigger("click")`. +- * @example ​ ````Show the event object when a key is pressed in the input. Note: This demo relies on a simple $.print() plugin (https://api.jquery.com/resources/events.js) for the event object's output. +-```html +- +- +- +- +- keypress demo +- +- +- +- +-​ +-
    +-
    +- +- +-
    +-
    +- +- +-​ +- +-​ +- +- +-``` +- */ +- keypress(handler?: JQuery.TypeEventHandler | +- false): this; +- /** +- * Bind an event handler to the "keyup" JavaScript event, or trigger that event on an element. +- * @param eventData An object containing data that will be passed to the event handler. +- * @param handler A function to execute each time the event is triggered. +- * @see \`{@link https://api.jquery.com/keyup/ }\` +- * @since 1.4.3 +- * @deprecated ​ Deprecated since 3.3. Use \`{@link on }\` or \`{@link trigger }\`. +- * +- * **Cause**: The `.on()` and `.trigger()` methods can set an event handler or generate an event for any event type, and should be used instead of the shortcut methods. This message also applies to the other event shorthands, including: blur, focus, focusin, focusout, resize, scroll, dblclick, mousedown, mouseup, mousemove, mouseover, mouseout, mouseenter, mouseleave, change, select, submit, keydown, keypress, keyup, and contextmenu. +- * +- * **Solution**: Instead of `.click(fn)` use `.on("click", fn)`. Instead of `.click()` use `.trigger("click")`. +- */ +- keyup(eventData: TData, +- handler: JQuery.TypeEventHandler): this; +- /** +- * Bind an event handler to the "keyup" JavaScript event, or trigger that event on an element. +- * @param handler A function to execute each time the event is triggered. +- * @see \`{@link https://api.jquery.com/keyup/ }\` +- * @since 1.0 +- * @deprecated ​ Deprecated since 3.3. Use \`{@link on }\` or \`{@link trigger }\`. +- * +- * **Cause**: The `.on()` and `.trigger()` methods can set an event handler or generate an event for any event type, and should be used instead of the shortcut methods. This message also applies to the other event shorthands, including: blur, focus, focusin, focusout, resize, scroll, dblclick, mousedown, mouseup, mousemove, mouseover, mouseout, mouseenter, mouseleave, change, select, submit, keydown, keypress, keyup, and contextmenu. +- * +- * **Solution**: Instead of `.click(fn)` use `.on("click", fn)`. Instead of `.click()` use `.trigger("click")`. +- * @example ​ ````Show the event object for the keyup handler (using a simple $.print plugin) when a key is released in the input. +-```html +- +- +- +- +- keyup demo +- +- +- +- +-​ +-
    +-
    +- +- +-
    +-
    +- +- +-​ +- +-​ +- +- +-``` +- */ +- keyup(handler?: JQuery.TypeEventHandler | +- false): this; +- /** +- * Reduce the set of matched elements to the final one in the set. +- * @see \`{@link https://api.jquery.com/last/ }\` +- * @since 1.4 +- * @example ​ ````Highlight the last span in a paragraph. +-```html +- +- +- +- +- last demo +- +- +- +- +-​ +-

    Look: This is some text in a paragraph. This is a note about it.

    +-​ +- +-​ +- +- +-``` +- */ +- last(): this; +- /** +- * Load data from the server and place the returned HTML into the matched element. +- * @param url A string containing the URL to which the request is sent. +- * @param data A plain object or string that is sent to the server with the request. +- * @param complete A callback function that is executed when the request completes. +- * @see \`{@link https://api.jquery.com/load/ }\` +- * @since 1.0 +- * @example ​ ````Same as above, but will POST the additional parameters to the server and a callback that is executed when the server is finished responding. +-```javascript +-$( "#feeds" ).load( "feeds.php", { limit: 25 }, function() { +- alert( "The last 25 entries in the feed have been loaded" ); +-}); +-``` +- */ +- load(url: string, +- data: string | JQuery.PlainObject, +- complete: (this: TElement, responseText: string, textStatus: JQuery.Ajax.TextStatus, jqXHR: JQuery.jqXHR) => void): this; +- /** +- * Load data from the server and place the returned HTML into the matched element. +- * @param url A string containing the URL to which the request is sent. +- * @param complete_data _@param_ `complete_data` +- *
    +- * * `complete` — A callback function that is executed when the request completes.
    +- * * `data` — A plain object or string that is sent to the server with the request. +- * @see \`{@link https://api.jquery.com/load/ }\` +- * @since 1.0 +- * @example ​ ````Load another page's list items into an ordered list. +-```html +- +- +- +- +- load demo +- +- +- +- +-​ +-Projects: +-
      +-​ +- +-​ +- +- +-``` +- * @example ​ ````Display a notice if the Ajax request encounters an error. +-```html +- +- +- +- +- load demo +- +- +- +- +-​ +-Successful Response (should be blank): +-
      +-Error Response: +-
      +-​ +- +-​ +- +- +-``` +- * @example ​ ````Load the feeds.html file into the div with the ID of feeds. +-```javascript +-$( "#feeds" ).load( "feeds.html" ); +-``` +- * @example ​ ````pass arrays of data to the server. +-```javascript +-$( "#objectID" ).load( "test.php", { "choices[]": [ "Jon", "Susan" ] } ); +-``` +- */ +- load(url: string, +- complete_data?: ((this: TElement, responseText: string, textStatus: JQuery.Ajax.TextStatus, jqXHR: JQuery.jqXHR) => void) | string | JQuery.PlainObject): this; +- /** +- * Pass each element in the current matched set through a function, producing a new jQuery object containing the return values. +- * @param callback A function object that will be invoked for each element in the current set. +- * @see \`{@link https://api.jquery.com/map/ }\` +- * @since 1.2 +- * @example ​ ````Build a list of all the values within a form. +-```html +- +- +- +- +- map demo +- +- +- +- +-​ +-

      Values:

      +-
      +- +- +- +-
      +-​ +- +-​ +- +- +-``` +- * @example ​ ````A contrived example to show some functionality. +-```html +- +- +- +- +- map demo +- +- +- +- +-​ +-
        +-
      • First
      • +-
      • Second
      • +-
      • Third
      • +-
      • Fourth
      • +-
      • Fifth
      • +-
      +-
        +-
      +-​ +- +-​ +- +- +-``` +- * @example ​ ````Equalize the heights of the divs. +-```html +- +- +- +- +- map demo +- +- +- +- +-​ +- +-
      +-
      +-
      +-​ +- +-​ +- +- +-``` +- */ +- map(callback: (this: TElement, index: number, domElement: TElement) => JQuery.TypeOrArray | null | undefined): JQuery; +- /** +- * Bind an event handler to the "mousedown" JavaScript event, or trigger that event on an element. +- * @param eventData An object containing data that will be passed to the event handler. +- * @param handler A function to execute each time the event is triggered. +- * @see \`{@link https://api.jquery.com/mousedown/ }\` +- * @since 1.4.3 +- * @deprecated ​ Deprecated since 3.3. Use \`{@link on }\` or \`{@link trigger }\`. +- * +- * **Cause**: The `.on()` and `.trigger()` methods can set an event handler or generate an event for any event type, and should be used instead of the shortcut methods. This message also applies to the other event shorthands, including: blur, focus, focusin, focusout, resize, scroll, dblclick, mousedown, mouseup, mousemove, mouseover, mouseout, mouseenter, mouseleave, change, select, submit, keydown, keypress, keyup, and contextmenu. +- * +- * **Solution**: Instead of `.click(fn)` use `.on("click", fn)`. Instead of `.click()` use `.trigger("click")`. +- */ +- mousedown(eventData: TData, +- handler: JQuery.TypeEventHandler): this; +- /** +- * Bind an event handler to the "mousedown" JavaScript event, or trigger that event on an element. +- * @param handler A function to execute each time the event is triggered. +- * @see \`{@link https://api.jquery.com/mousedown/ }\` +- * @since 1.0 +- * @deprecated ​ Deprecated since 3.3. Use \`{@link on }\` or \`{@link trigger }\`. +- * +- * **Cause**: The `.on()` and `.trigger()` methods can set an event handler or generate an event for any event type, and should be used instead of the shortcut methods. This message also applies to the other event shorthands, including: blur, focus, focusin, focusout, resize, scroll, dblclick, mousedown, mouseup, mousemove, mouseover, mouseout, mouseenter, mouseleave, change, select, submit, keydown, keypress, keyup, and contextmenu. +- * +- * **Solution**: Instead of `.click(fn)` use `.on("click", fn)`. Instead of `.click()` use `.trigger("click")`. +- * @example ​ ````Show texts when mouseup and mousedown event triggering. +-```html +- +- +- +- +- mousedown demo +- +- +- +-​ +-

      Press mouse and release here.

      +-​ +- +-​ +- +- +-``` +- */ +- mousedown(handler?: JQuery.TypeEventHandler | +- false): this; +- /** +- * Bind an event handler to be fired when the mouse enters an element, or trigger that handler on an element. +- * @param eventData An object containing data that will be passed to the event handler. +- * @param handler A function to execute each time the event is triggered. +- * @see \`{@link https://api.jquery.com/mouseenter/ }\` +- * @since 1.4.3 +- * @deprecated ​ Deprecated since 3.3. Use \`{@link on }\` or \`{@link trigger }\`. +- * +- * **Cause**: The `.on()` and `.trigger()` methods can set an event handler or generate an event for any event type, and should be used instead of the shortcut methods. This message also applies to the other event shorthands, including: blur, focus, focusin, focusout, resize, scroll, dblclick, mousedown, mouseup, mousemove, mouseover, mouseout, mouseenter, mouseleave, change, select, submit, keydown, keypress, keyup, and contextmenu. +- * +- * **Solution**: Instead of `.click(fn)` use `.on("click", fn)`. Instead of `.click()` use `.trigger("click")`. +- */ +- mouseenter(eventData: TData, +- handler: JQuery.TypeEventHandler): this; +- /** +- * Bind an event handler to be fired when the mouse enters an element, or trigger that handler on an element. +- * @param handler A function to execute each time the event is triggered. +- * @see \`{@link https://api.jquery.com/mouseenter/ }\` +- * @since 1.0 +- * @deprecated ​ Deprecated since 3.3. Use \`{@link on }\` or \`{@link trigger }\`. +- * +- * **Cause**: The `.on()` and `.trigger()` methods can set an event handler or generate an event for any event type, and should be used instead of the shortcut methods. This message also applies to the other event shorthands, including: blur, focus, focusin, focusout, resize, scroll, dblclick, mousedown, mouseup, mousemove, mouseover, mouseout, mouseenter, mouseleave, change, select, submit, keydown, keypress, keyup, and contextmenu. +- * +- * **Solution**: Instead of `.click(fn)` use `.on("click", fn)`. Instead of `.click()` use `.trigger("click")`. +- * @example ​ ````Show texts when mouseenter and mouseout event triggering. +- mouseover fires when the pointer moves into the child element as well, while mouseenter fires only when the pointer moves into the bound element. +-```html +- +- +- +- +- mouseenter demo +- +- +- +- +-​ +-
      +-

      move your mouse

      +-

      move your mouse

      0

      +-

      0

      +-
      +-​ +-
      +-

      move your mouse

      +-

      move your mouse

      0

      +-

      0

      +-
      +-​ +- +-​ +- +- +-``` +- */ +- mouseenter(handler?: JQuery.TypeEventHandler | +- false): this; +- /** +- * Bind an event handler to be fired when the mouse leaves an element, or trigger that handler on an element. +- * @param eventData An object containing data that will be passed to the event handler. +- * @param handler A function to execute each time the event is triggered. +- * @see \`{@link https://api.jquery.com/mouseleave/ }\` +- * @since 1.4.3 +- * @deprecated ​ Deprecated since 3.3. Use \`{@link on }\` or \`{@link trigger }\`. +- * +- * **Cause**: The `.on()` and `.trigger()` methods can set an event handler or generate an event for any event type, and should be used instead of the shortcut methods. This message also applies to the other event shorthands, including: blur, focus, focusin, focusout, resize, scroll, dblclick, mousedown, mouseup, mousemove, mouseover, mouseout, mouseenter, mouseleave, change, select, submit, keydown, keypress, keyup, and contextmenu. +- * +- * **Solution**: Instead of `.click(fn)` use `.on("click", fn)`. Instead of `.click()` use `.trigger("click")`. +- */ +- mouseleave(eventData: TData, +- handler: JQuery.TypeEventHandler): this; +- /** +- * Bind an event handler to be fired when the mouse leaves an element, or trigger that handler on an element. +- * @param handler A function to execute each time the event is triggered. +- * @see \`{@link https://api.jquery.com/mouseleave/ }\` +- * @since 1.0 +- * @deprecated ​ Deprecated since 3.3. Use \`{@link on }\` or \`{@link trigger }\`. +- * +- * **Cause**: The `.on()` and `.trigger()` methods can set an event handler or generate an event for any event type, and should be used instead of the shortcut methods. This message also applies to the other event shorthands, including: blur, focus, focusin, focusout, resize, scroll, dblclick, mousedown, mouseup, mousemove, mouseover, mouseout, mouseenter, mouseleave, change, select, submit, keydown, keypress, keyup, and contextmenu. +- * +- * **Solution**: Instead of `.click(fn)` use `.on("click", fn)`. Instead of `.click()` use `.trigger("click")`. +- * @example ​ ````Show number of times mouseout and mouseleave events are triggered. mouseout fires when the pointer moves out of child element as well, while mouseleave fires only when the pointer moves out of the bound element. +-```html +- +- +- +- +- mouseleave demo +- +- +- +- +-​ +-
      +-

      move your mouse

      +-

      move your mouse

      0

      +-

      0

      +-
      +-
      +-

      move your mouse

      +-

      move your mouse

      0

      +-

      0

      +-
      +-​ +- +-​ +- +- +-``` +- */ +- mouseleave(handler?: JQuery.TypeEventHandler | +- false): this; +- /** +- * Bind an event handler to the "mousemove" JavaScript event, or trigger that event on an element. +- * @param eventData An object containing data that will be passed to the event handler. +- * @param handler A function to execute each time the event is triggered. +- * @see \`{@link https://api.jquery.com/mousemove/ }\` +- * @since 1.4.3 +- * @deprecated ​ Deprecated since 3.3. Use \`{@link on }\` or \`{@link trigger }\`. +- * +- * **Cause**: The `.on()` and `.trigger()` methods can set an event handler or generate an event for any event type, and should be used instead of the shortcut methods. This message also applies to the other event shorthands, including: blur, focus, focusin, focusout, resize, scroll, dblclick, mousedown, mouseup, mousemove, mouseover, mouseout, mouseenter, mouseleave, change, select, submit, keydown, keypress, keyup, and contextmenu. +- * +- * **Solution**: Instead of `.click(fn)` use `.on("click", fn)`. Instead of `.click()` use `.trigger("click")`. +- */ +- mousemove(eventData: TData, +- handler: JQuery.TypeEventHandler): this; +- /** +- * Bind an event handler to the "mousemove" JavaScript event, or trigger that event on an element. +- * @param handler A function to execute each time the event is triggered. +- * @see \`{@link https://api.jquery.com/mousemove/ }\` +- * @since 1.0 +- * @deprecated ​ Deprecated since 3.3. Use \`{@link on }\` or \`{@link trigger }\`. +- * +- * **Cause**: The `.on()` and `.trigger()` methods can set an event handler or generate an event for any event type, and should be used instead of the shortcut methods. This message also applies to the other event shorthands, including: blur, focus, focusin, focusout, resize, scroll, dblclick, mousedown, mouseup, mousemove, mouseover, mouseout, mouseenter, mouseleave, change, select, submit, keydown, keypress, keyup, and contextmenu. +- * +- * **Solution**: Instead of `.click(fn)` use `.on("click", fn)`. Instead of `.click()` use `.trigger("click")`. +- * @example ​ ````Show the mouse coordinates when the mouse is moved over the yellow div. Coordinates are relative to the window, which in this case is the iframe. +-```html +- +- +- +- +- mousemove demo +- +- +- +- +-​ +-

      +- Move the mouse over the div. +-   +-

      +-
      +-​ +- +-​ +- +- +-``` +- */ +- mousemove(handler?: JQuery.TypeEventHandler | +- false): this; +- /** +- * Bind an event handler to the "mouseout" JavaScript event, or trigger that event on an element. +- * @param eventData An object containing data that will be passed to the event handler. +- * @param handler A function to execute each time the event is triggered. +- * @see \`{@link https://api.jquery.com/mouseout/ }\` +- * @since 1.4.3 +- * @deprecated ​ Deprecated since 3.3. Use \`{@link on }\` or \`{@link trigger }\`. +- * +- * **Cause**: The `.on()` and `.trigger()` methods can set an event handler or generate an event for any event type, and should be used instead of the shortcut methods. This message also applies to the other event shorthands, including: blur, focus, focusin, focusout, resize, scroll, dblclick, mousedown, mouseup, mousemove, mouseover, mouseout, mouseenter, mouseleave, change, select, submit, keydown, keypress, keyup, and contextmenu. +- * +- * **Solution**: Instead of `.click(fn)` use `.on("click", fn)`. Instead of `.click()` use `.trigger("click")`. +- */ +- mouseout(eventData: TData, +- handler: JQuery.TypeEventHandler): this; +- /** +- * Bind an event handler to the "mouseout" JavaScript event, or trigger that event on an element. +- * @param handler A function to execute each time the event is triggered. +- * @see \`{@link https://api.jquery.com/mouseout/ }\` +- * @since 1.0 +- * @deprecated ​ Deprecated since 3.3. Use \`{@link on }\` or \`{@link trigger }\`. +- * +- * **Cause**: The `.on()` and `.trigger()` methods can set an event handler or generate an event for any event type, and should be used instead of the shortcut methods. This message also applies to the other event shorthands, including: blur, focus, focusin, focusout, resize, scroll, dblclick, mousedown, mouseup, mousemove, mouseover, mouseout, mouseenter, mouseleave, change, select, submit, keydown, keypress, keyup, and contextmenu. +- * +- * **Solution**: Instead of `.click(fn)` use `.on("click", fn)`. Instead of `.click()` use `.trigger("click")`. +- * @example ​ ````Show the number of times mouseout and mouseleave events are triggered. +- mouseout fires when the pointer moves out of the child element as well, while mouseleave fires only when the pointer moves out of the bound element. +-```html +- +- +- +- +- mouseout demo +- +- +- +- +-​ +-
      +-

      move your mouse

      +-

      move your mouse

      0

      +-

      0

      +-
      +-​ +-
      +-

      move your mouse

      +-

      move your mouse

      0

      +-

      0

      +-
      +-​ +- +-​ +- +- +-``` +- */ +- mouseout(handler?: JQuery.TypeEventHandler | +- false): this; +- /** +- * Bind an event handler to the "mouseover" JavaScript event, or trigger that event on an element. +- * @param eventData An object containing data that will be passed to the event handler. +- * @param handler A function to execute each time the event is triggered. +- * @see \`{@link https://api.jquery.com/mouseover/ }\` +- * @since 1.4.3 +- * @deprecated ​ Deprecated since 3.3. Use \`{@link on }\` or \`{@link trigger }\`. +- * +- * **Cause**: The `.on()` and `.trigger()` methods can set an event handler or generate an event for any event type, and should be used instead of the shortcut methods. This message also applies to the other event shorthands, including: blur, focus, focusin, focusout, resize, scroll, dblclick, mousedown, mouseup, mousemove, mouseover, mouseout, mouseenter, mouseleave, change, select, submit, keydown, keypress, keyup, and contextmenu. +- * +- * **Solution**: Instead of `.click(fn)` use `.on("click", fn)`. Instead of `.click()` use `.trigger("click")`. +- */ +- mouseover(eventData: TData, +- handler: JQuery.TypeEventHandler): this; +- /** +- * Bind an event handler to the "mouseover" JavaScript event, or trigger that event on an element. +- * @param handler A function to execute each time the event is triggered. +- * @see \`{@link https://api.jquery.com/mouseover/ }\` +- * @since 1.0 +- * @deprecated ​ Deprecated since 3.3. Use \`{@link on }\` or \`{@link trigger }\`. +- * +- * **Cause**: The `.on()` and `.trigger()` methods can set an event handler or generate an event for any event type, and should be used instead of the shortcut methods. This message also applies to the other event shorthands, including: blur, focus, focusin, focusout, resize, scroll, dblclick, mousedown, mouseup, mousemove, mouseover, mouseout, mouseenter, mouseleave, change, select, submit, keydown, keypress, keyup, and contextmenu. +- * +- * **Solution**: Instead of `.click(fn)` use `.on("click", fn)`. Instead of `.click()` use `.trigger("click")`. +- * @example ​ ````Show the number of times mouseover and mouseenter events are triggered. +-mouseover fires when the pointer moves into the child element as well, while mouseenter fires only when the pointer moves into the bound element. +-```html +- +- +- +- +- mouseover demo +- +- +- +- +-​ +-
      +- move your mouse +-
      +-
      +-
      +-​ +-
      +- move your mouse +-
      +-
      +-
      +-​ +- +-​ +- +- +-``` +- */ +- mouseover(handler?: JQuery.TypeEventHandler | +- false): this; +- /** +- * Bind an event handler to the "mouseup" JavaScript event, or trigger that event on an element. +- * @param eventData An object containing data that will be passed to the event handler. +- * @param handler A function to execute each time the event is triggered. +- * @see \`{@link https://api.jquery.com/mouseup/ }\` +- * @since 1.4.3 +- * @deprecated ​ Deprecated since 3.3. Use \`{@link on }\` or \`{@link trigger }\`. +- * +- * **Cause**: The `.on()` and `.trigger()` methods can set an event handler or generate an event for any event type, and should be used instead of the shortcut methods. This message also applies to the other event shorthands, including: blur, focus, focusin, focusout, resize, scroll, dblclick, mousedown, mouseup, mousemove, mouseover, mouseout, mouseenter, mouseleave, change, select, submit, keydown, keypress, keyup, and contextmenu. +- * +- * **Solution**: Instead of `.click(fn)` use `.on("click", fn)`. Instead of `.click()` use `.trigger("click")`. +- */ +- mouseup(eventData: TData, +- handler: JQuery.TypeEventHandler): this; +- /** +- * Bind an event handler to the "mouseup" JavaScript event, or trigger that event on an element. +- * @param handler A function to execute each time the event is triggered. +- * @see \`{@link https://api.jquery.com/mouseup/ }\` +- * @since 1.0 +- * @deprecated ​ Deprecated since 3.3. Use \`{@link on }\` or \`{@link trigger }\`. +- * +- * **Cause**: The `.on()` and `.trigger()` methods can set an event handler or generate an event for any event type, and should be used instead of the shortcut methods. This message also applies to the other event shorthands, including: blur, focus, focusin, focusout, resize, scroll, dblclick, mousedown, mouseup, mousemove, mouseover, mouseout, mouseenter, mouseleave, change, select, submit, keydown, keypress, keyup, and contextmenu. +- * +- * **Solution**: Instead of `.click(fn)` use `.on("click", fn)`. Instead of `.click()` use `.trigger("click")`. +- * @example ​ ````Show texts when mouseup and mousedown event triggering. +-```html +- +- +- +- +- mouseup demo +- +- +- +-​ +-

      Press mouse and release here.

      +-​ +- +-​ +- +- +-``` +- */ +- mouseup(handler?: JQuery.TypeEventHandler | +- false): this; +- /** +- * Get the immediately following sibling of each element in the set of matched elements. If a selector is provided, it retrieves the next sibling only if it matches that selector. +- * @param selector A string containing a selector expression to match elements against. +- * @see \`{@link https://api.jquery.com/next/ }\` +- * @since 1.0 +- * @example ​ ````Find the very next sibling of each disabled button and change its text "this button is disabled". +-```html +- +- +- +- +- next demo +- +- +- +- +-​ +-
      -
      +-
      -
      +-
      -
      +-​ +- +-​ +- +- +-``` +- * @example ​ ````Find the very next sibling of each paragraph. Keep only the ones with a class "selected". +-```html +- +- +- +- +- next demo +- +- +- +-​ +-

      Hello

      +-

      Hello Again

      +-
      And Again
      +-​ +- +-​ +- +- +-``` +- */ +- next(selector?: JQuery.Selector): this; +- /** +- * Get all following siblings of each element in the set of matched elements, optionally filtered by a selector. +- * @param selector A string containing a selector expression to match elements against. +- * @see \`{@link https://api.jquery.com/nextAll/ }\` +- * @since 1.2 +- * @example ​ ````Locate all the divs after the first and give them a class. +-```html +- +- +- +- +- nextAll demo +- +- +- +- +-​ +-
      first
      +-
      sibling
      child
      +-
      sibling
      +-
      sibling
      ​ +- +-​ +- +- +-``` +- * @example ​ ````Locate all the paragraphs after the second child in the body and give them a class. +-```html +- +- +- +- +- nextAll demo +- +- +- +- +-​ +-

      p

      +-
      div
      +-

      p

      +-

      p

      +-
      div
      +-

      p

      +-
      div
      +-​ +- +-​ +- +- +-``` +- */ +- nextAll(selector?: string): this; +- /** +- * Get all following siblings of each element up to but not including the element matched by the selector, DOM node, or jQuery object passed. +- * @param selector_element _@param_ `selector_element` +- *
      +- * * `selector` — A string containing a selector expression to indicate where to stop matching following sibling elements.
      +- * * `element` — A DOM node or jQuery object indicating where to stop matching following sibling elements. +- * @param filter A string containing a selector expression to match elements against. +- * @see \`{@link https://api.jquery.com/nextUntil/ }\` +- * @since 1.4 +- * @since 1.6 +- * @example ​ ````Find the siblings that follow <dt id="term-2"> up to the next <dt> and give them a red background color. Also, find <dd> siblings that follow <dt id="term-1"> up to <dt id="term-3"> and give them a green text color. +-```html +- +- +- +- +- nextUntil demo +- +- +- +-​ +-
      +-
      term 1
      +-
      definition 1-a
      +-
      definition 1-b
      +-
      definition 1-c
      +-
      definition 1-d
      +-
      term 2
      +-
      definition 2-a
      +-
      definition 2-b
      +-
      definition 2-c
      +-
      term 3
      +-
      definition 3-a
      +-
      definition 3-b
      +-
      +-​ +- +-​ +- +- +-``` +- */ +- nextUntil(selector_element?: JQuery.Selector | Element | JQuery, filter?: JQuery.Selector): this; +- /** +- * Remove elements from the set of matched elements. +- * @param selector_function_selection _@param_ `selector_function_selection` +- *
      +- * * `selector` — A string containing a selector expression, a DOM element, or an array of elements to match against the set.
      +- * * `function` — A function used as a test for each element in the set. It accepts two arguments, `index`, which is +- * the element's index in the jQuery collection, and `element`, which is the DOM element. Within the +- * function, `this` refers to the current DOM element.
      +- * * `selection` — An existing jQuery object to match the current set of elements against. +- * @see \`{@link https://api.jquery.com/not/ }\` +- * @since 1.0 +- * @since 1.4 +- * @example ​ ````Adds a border to divs that are not green or blue. +-```html +- +- +- +- +- not demo +- +- +- +- +-​ +-
      +-
      +-
      +-
      +-
      +-
      +-
      +-​ +- +-​ +- +- +-``` +- * @example ​ ````Removes the element with the ID "selected" from the set of all paragraphs. +-```javascript +-$( "p" ).not( $( "#selected" )[ 0 ] ); +-``` +- * @example ​ ````Removes the element with the ID "selected" from the set of all paragraphs. +-```javascript +-$( "p" ).not( "#selected" ); +-``` +- * @example ​ ````Removes all elements that match "div p.selected" from the total set of all paragraphs. +-```javascript +-$( "p" ).not( $( "div p.selected" ) ); +-``` +- */ +- not(selector_function_selection: JQuery.Selector | JQuery.TypeOrArray | JQuery | ((this: TElement, index: number, element: TElement) => boolean)): this; +- /** +- * Remove an event handler. +- * @param events One or more space-separated event types and optional namespaces, or just namespaces, such as +- * "click", "keydown.myPlugin", or ".myPlugin". +- * @param selector A selector which should match the one originally passed to .on() when attaching event handlers. +- * @param handler A function to execute each time the event is triggered. +- * @see \`{@link https://api.jquery.com/off/ }\` +- * @since 1.7 +- * @example ​ ````Add and remove event handlers on the colored button. +-```html +- +- +- +- +- off demo +- +- +- +- +-​ +- +- +- +-
      Click!
      +-​ +- +-​ +- +- +-``` +- * @example ​ ````Remove just one previously bound handler by passing it as the third argument: +-```javascript +-var foo = function() { +- // Code to handle some kind of event +-}; +-​ +-// ... Now foo will be called when paragraphs are clicked ... +-$( "body" ).on( "click", "p", foo ); +-​ +-// ... Foo will no longer be called. +-$( "body" ).off( "click", "p", foo ); +-``` +- */ +- off( +- events: TType, +- selector: JQuery.Selector, +- handler: JQuery.TypeEventHandler | +- false +- ): this; +- /** +- * Remove an event handler. +- * @param events One or more space-separated event types and optional namespaces, or just namespaces, such as +- * "click", "keydown.myPlugin", or ".myPlugin". +- * @param selector_handler _@param_ `selector_handler` +- *
      +- * * `selector` — A selector which should match the one originally passed to `.on()` when attaching event handlers.
      +- * * `handler` — A handler function previously attached for the event(s), or the special value `false`. +- * @see \`{@link https://api.jquery.com/off/ }\` +- * @since 1.7 +- * @example ​ ````Remove all delegated click handlers from all paragraphs: +-```javascript +-$( "p" ).off( "click", "**" ); +-``` +- * @example ​ ````Unbind all delegated event handlers by their namespace: +-```javascript +-var validate = function() { +- // Code to validate form entries +-}; +-​ +-// Delegate events under the ".validator" namespace +-$( "form" ).on( "click.validator", "button", validate ); +-​ +-$( "form" ).on( "keypress.validator", "input[type='text']", validate ); +-​ +-// Remove event handlers in the ".validator" namespace +-$( "form" ).off( ".validator" ); +-``` +- */ +- off( +- events: TType, +- selector_handler?: JQuery.Selector | +- JQuery.TypeEventHandler | +- false +- ): this; +- /** +- * Remove an event handler. +- * @param events An object where the string keys represent one or more space-separated event types and optional +- * namespaces, and the values represent handler functions previously attached for the event(s). +- * @param selector A selector which should match the one originally passed to .on() when attaching event handlers. +- * @see \`{@link https://api.jquery.com/off/ }\` +- * @since 1.7 +- */ +- off(events: JQuery.TypeEventHandlers, +- selector?: JQuery.Selector): this; +- /** +- * Remove an event handler. +- * @param event A jQuery.Event object. +- * @see \`{@link https://api.jquery.com/off/ }\` +- * @since 1.7 +- * @example ​ ````Remove all event handlers from all paragraphs: +-```javascript +-$( "p" ).off(); +-``` +- */ +- off(event?: JQuery.TriggeredEvent): this; +- /** +- * Set the current coordinates of every element in the set of matched elements, relative to the document. +- * @param coordinates_function _@param_ `coordinates_function` +- *
      +- * * `coordinates` — An object containing the properties `top` and `left`, which are numbers indicating the new top and +- * left coordinates for the elements.
      +- * * `function` — A function to return the coordinates to set. Receives the index of the element in the collection as +- * the first argument and the current coordinates as the second argument. The function should return an +- * object with the new `top` and `left` properties. +- * @see \`{@link https://api.jquery.com/offset/ }\` +- * @since 1.4 +- * @example ​ ````Set the offset of the second paragraph: +-```html +- +- +- +- +- offset demo +- +- +- +- +-​ +-

      Hello

      2nd Paragraph

      +-​ +- +-​ +- +- +-``` +- */ +- offset(coordinates_function: JQuery.CoordinatesPartial | ((this: TElement, index: number, coords: JQuery.Coordinates) => JQuery.CoordinatesPartial)): this; +- /** +- * Get the current coordinates of the first element in the set of matched elements, relative to the document. +- * @see \`{@link https://api.jquery.com/offset/ }\` +- * @since 1.2 +- * @example ​ ````Access the offset of the second paragraph: +-```html +- +- +- +- +- offset demo +- +- +- +- +-​ +-

      Hello

      2nd Paragraph

      +-​ +- +-​ +- +- +-``` +- * @example ​ ````Click to see the offset. +-```html +- +- +- +- +- offset demo +- +- +- +- +-​ +-
      Click an element.
      +-

      +- This is the best way to find an offset. +-

      +-
      +-
      +-​ +- +-​ +- +- +-``` +- */ +- offset(): JQuery.Coordinates | undefined; +- /** +- * Get the closest ancestor element that is positioned. +- * @see \`{@link https://api.jquery.com/offsetParent/ }\` +- * @since 1.2.6 +- * @example ​ ````Find the offsetParent of item "A." +-```html +- +- +- +- +- offsetParent demo +- +- +- +-​ +-
        +-
      • I
      • +-
      • II +-
          +-
        • A
        • +-
        • B +-
            +-
          • 1
          • +-
          • 2
          • +-
          • 3
          • +-
          +-
        • +-
        • C
        • +-
        +-
      • +-
      • III
      • +-
      +-​ +- +-​ +- +- +-``` +- */ +- offsetParent(): this; +- /** +- * Attach an event handler function for one or more events to the selected elements. +- * @param events One or more space-separated event types and optional namespaces, such as "click" or "keydown.myPlugin". +- * @param selector A selector string to filter the descendants of the selected elements that trigger the event. If the +- * selector is null or omitted, the event is always triggered when it reaches the selected element. +- * @param data Data to be passed to the handler in event.data when an event is triggered. +- * @param handler A function to execute when the event is triggered. +- * @see \`{@link https://api.jquery.com/on/ }\` +- * @since 1.7 +- */ +- on( +- events: TType, +- selector: JQuery.Selector, +- data: TData, +- handler: JQuery.TypeEventHandler +- ): this; +- /** +- * Attach an event handler function for one or more events to the selected elements. +- * @param events One or more space-separated event types and optional namespaces, such as "click" or "keydown.myPlugin". +- * @param selector A selector string to filter the descendants of the selected elements that trigger the event. If the +- * selector is null or omitted, the event is always triggered when it reaches the selected element. +- * @param data Data to be passed to the handler in event.data when an event is triggered. +- * @param handler A function to execute when the event is triggered. +- * @see \`{@link https://api.jquery.com/on/ }\` +- * @since 1.7 +- */ +- on( +- events: TType, +- selector: null | undefined, +- data: TData, +- handler: JQuery.TypeEventHandler +- ): this; +- /** +- * Attach an event handler function for one or more events to the selected elements. +- * @param events One or more space-separated event types and optional namespaces, such as "click" or "keydown.myPlugin". +- * @param selector A selector string to filter the descendants of the selected elements that trigger the event. If the +- * selector is null or omitted, the event is always triggered when it reaches the selected element. +- * @param data Data to be passed to the handler in event.data when an event is triggered. +- * @param handler A function to execute when the event is triggered. +- * @see \`{@link https://api.jquery.com/on/ }\` +- * @since 1.7 +- * @deprecated ​ Deprecated. Use \`{@link JQuery.Event }\` in place of \`{@link JQueryEventObject }\`. +- */ +- on(events: string, +- selector: JQuery.Selector | null | undefined, +- data: any, +- handler: ((event: JQueryEventObject) => void)): this; +- /** +- * Attach an event handler function for one or more events to the selected elements. +- * @param events One or more space-separated event types and optional namespaces, such as "click" or "keydown.myPlugin". +- * @param selector A selector string to filter the descendants of the selected elements that trigger the event. If the +- * selector is null or omitted, the event is always triggered when it reaches the selected element. +- * @param handler A function to execute when the event is triggered. The value false is also allowed as a shorthand +- * for a function that simply does return false. +- * @see \`{@link https://api.jquery.com/on/ }\` +- * @since 1.7 +- * @example ​ ````Click any paragraph to add another after it. Note that .on() allows a click event on any paragraph--even new ones--since the event is handled by the ever-present body element after it bubbles to there. +-```html +- +- +- +- +- on demo +- +- +- +- +-​ +-

      Click me!

      +- +-​ +- +-​ +- +- +-``` +- * @example ​ ````Display each paragraph's text in an alert box whenever it is clicked: +-```javascript +-$( "body" ).on( "click", "p", function() { +- alert( $( this ).text() ); +-}); +-``` +- * @example ​ ````Cancel a link's default action using the .preventDefault() method: +-```javascript +-$( "body" ).on( "click", "a", function( event ) { +- event.preventDefault(); +-}); +-``` +- */ +- on( +- events: TType, +- selector: JQuery.Selector, +- handler: JQuery.TypeEventHandler | +- false +- ): this; +- /** +- * Attach an event handler function for one or more events to the selected elements. +- * @param events One or more space-separated event types and optional namespaces, such as "click" or "keydown.myPlugin". +- * @param data Data to be passed to the handler in event.data when an event is triggered. +- * @param handler A function to execute when the event is triggered. +- * @see \`{@link https://api.jquery.com/on/ }\` +- * @since 1.7 +- * @example ​ ````Pass data to the event handler, which is specified here by name: +-```javascript +-function myHandler( event ) { +- alert( event.data.foo ); +-} +-$( "p" ).on( "click", { foo: "bar" }, myHandler ); +-``` +- */ +- on( +- events: TType, +- data: TData, +- handler: JQuery.TypeEventHandler +- ): this; +- /** +- * Attach an event handler function for one or more events to the selected elements. +- * @param events One or more space-separated event types and optional namespaces, such as "click" or "keydown.myPlugin". +- * @param selector_data _@param_ `selector_data` +- *
      +- * * `selector` — A selector string to filter the descendants of the selected elements that trigger the event. If the +- * selector is null or omitted, the event is always triggered when it reaches the selected element.
      +- * * `data` — Data to be passed to the handler in event.data when an event is triggered. +- * @param handler A function to execute when the event is triggered. +- * @see \`{@link https://api.jquery.com/on/ }\` +- * @since 1.7 +- * @deprecated ​ Deprecated. Use \`{@link JQuery.Event }\` in place of \`{@link JQueryEventObject }\`. +- * @example ​ ````Click any paragraph to add another after it. Note that .on() allows a click event on any paragraph--even new ones--since the event is handled by the ever-present body element after it bubbles to there. +-```html +- +- +- +- +- on demo +- +- +- +- +-​ +-

      Click me!

      +- +-​ +- +-​ +- +- +-``` +- * @example ​ ````Display each paragraph's text in an alert box whenever it is clicked: +-```javascript +-$( "body" ).on( "click", "p", function() { +- alert( $( this ).text() ); +-}); +-``` +- * @example ​ ````Cancel a link's default action using the .preventDefault() method: +-```javascript +-$( "body" ).on( "click", "a", function( event ) { +- event.preventDefault(); +-}); +-``` +- * @example ​ ````Pass data to the event handler, which is specified here by name: +-```javascript +-function myHandler( event ) { +- alert( event.data.foo ); +-} +-$( "p" ).on( "click", { foo: "bar" }, myHandler ); +-``` +- */ +- on(events: string, +- selector_data: any, +- handler: ((event: JQueryEventObject) => void)): this; +- /** +- * Attach an event handler function for one or more events to the selected elements. +- * @param events One or more space-separated event types and optional namespaces, such as "click" or "keydown.myPlugin". +- * @param handler A function to execute when the event is triggered. The value false is also allowed as a shorthand +- * for a function that simply does return false. +- * @see \`{@link https://api.jquery.com/on/ }\` +- * @since 1.7 +- * @example ​ ````Display a paragraph's text in an alert when it is clicked: +-```javascript +-$( "p" ).on( "click", function() { +- alert( $( this ).text() ); +-}); +-``` +- * @example ​ ````Cancel a form submit action and prevent the event from bubbling up by returning false: +-```javascript +-$( "form" ).on( "submit", false ); +-``` +- * @example ​ ````Cancel only the default action by using .preventDefault(). +-```javascript +-$( "form" ).on( "submit", function( event ) { +- event.preventDefault(); +-}); +-``` +- * @example ​ ````Stop submit events from bubbling without preventing form submit, using .stopPropagation(). +-```javascript +-$( "form" ).on( "submit", function( event ) { +- event.stopPropagation(); +-}); +-``` +- * @example ​ ````Pass data to the event handler using the second argument to .trigger() +-```javascript +-$( "div" ).on( "click", function( event, person ) { +- alert( "Hello, " + person.name ); +-}); +-$( "div" ).trigger( "click", { name: "Jim" } ); +-``` +- * @example ​ ````Use the the second argument of .trigger() to pass an array of data to the event handler +-```javascript +-$( "div" ).on( "click", function( event, salutation, name ) { +- alert( salutation + ", " + name ); +-}); +-$( "div" ).trigger( "click", [ "Goodbye", "Jim" ] ); +-``` +- * @example ​ ````Attach and trigger custom (non-browser) events. +-```html +- +- +- +- +- on demo +- +- +- +- +-​ +-

      Has an attached custom event.

      +- +- +-​ +- +-​ +- +- +-``` +- * @example ​ ````Attach multiple events—one on mouseenter and one on mouseleave to the same element: +-```javascript +-$( "#cart" ).on( "mouseenter mouseleave", function( event ) { +- $( this ).toggleClass( "active" ); +-}); +-``` +- */ +- on( +- events: TType, +- handler: JQuery.TypeEventHandler | +- false +- ): this; +- /** +- * Attach an event handler function for one or more events to the selected elements. +- * @param events One or more space-separated event types and optional namespaces, such as "click" or "keydown.myPlugin". +- * @param handler A function to execute when the event is triggered. +- * @see \`{@link https://api.jquery.com/on/ }\` +- * @since 1.7 +- * @deprecated ​ Deprecated. Use \`{@link JQuery.Event }\` in place of \`{@link JQueryEventObject }\`. +- * @example ​ ````Display a paragraph's text in an alert when it is clicked: +-```javascript +-$( "p" ).on( "click", function() { +- alert( $( this ).text() ); +-}); +-``` +- * @example ​ ````Cancel a form submit action and prevent the event from bubbling up by returning false: +-```javascript +-$( "form" ).on( "submit", false ); +-``` +- * @example ​ ````Cancel only the default action by using .preventDefault(). +-```javascript +-$( "form" ).on( "submit", function( event ) { +- event.preventDefault(); +-}); +-``` +- * @example ​ ````Stop submit events from bubbling without preventing form submit, using .stopPropagation(). +-```javascript +-$( "form" ).on( "submit", function( event ) { +- event.stopPropagation(); +-}); +-``` +- * @example ​ ````Pass data to the event handler using the second argument to .trigger() +-```javascript +-$( "div" ).on( "click", function( event, person ) { +- alert( "Hello, " + person.name ); +-}); +-$( "div" ).trigger( "click", { name: "Jim" } ); +-``` +- * @example ​ ````Use the the second argument of .trigger() to pass an array of data to the event handler +-```javascript +-$( "div" ).on( "click", function( event, salutation, name ) { +- alert( salutation + ", " + name ); +-}); +-$( "div" ).trigger( "click", [ "Goodbye", "Jim" ] ); +-``` +- * @example ​ ````Attach and trigger custom (non-browser) events. +-```html +- +- +- +- +- on demo +- +- +- +- +-​ +-

      Has an attached custom event.

      +- +- +-​ +- +-​ +- +- +-``` +- * @example ​ ````Attach multiple events—one on mouseenter and one on mouseleave to the same element: +-```javascript +-$( "#cart" ).on( "mouseenter mouseleave", function( event ) { +- $( this ).toggleClass( "active" ); +-}); +-``` +- */ +- on(events: string, +- handler: ((event: JQueryEventObject) => void)): this; +- /** +- * Attach an event handler function for one or more events to the selected elements. +- * @param events An object in which the string keys represent one or more space-separated event types and optional +- * namespaces, and the values represent a handler function to be called for the event(s). +- * @param selector A selector string to filter the descendants of the selected elements that will call the handler. If +- * the selector is null or omitted, the handler is always called when it reaches the selected element. +- * @param data Data to be passed to the handler in event.data when an event occurs. +- * @see \`{@link https://api.jquery.com/on/ }\` +- * @since 1.7 +- */ +- on( +- events: JQuery.TypeEventHandlers, +- selector: JQuery.Selector, +- data: TData +- ): this; +- /** +- * Attach an event handler function for one or more events to the selected elements. +- * @param events An object in which the string keys represent one or more space-separated event types and optional +- * namespaces, and the values represent a handler function to be called for the event(s). +- * @param selector A selector string to filter the descendants of the selected elements that will call the handler. If +- * the selector is null or omitted, the handler is always called when it reaches the selected element. +- * @param data Data to be passed to the handler in event.data when an event occurs. +- * @see \`{@link https://api.jquery.com/on/ }\` +- * @since 1.7 +- */ +- on( +- events: JQuery.TypeEventHandlers, +- selector: null | undefined, +- data: TData +- ): this; +- /** +- * Attach an event handler function for one or more events to the selected elements. +- * @param events An object in which the string keys represent one or more space-separated event types and optional +- * namespaces, and the values represent a handler function to be called for the event(s). +- * @param selector A selector string to filter the descendants of the selected elements that will call the handler. If +- * the selector is null or omitted, the handler is always called when it reaches the selected element. +- * @see \`{@link https://api.jquery.com/on/ }\` +- * @since 1.7 +- */ +- on(events: JQuery.TypeEventHandlers, +- selector: JQuery.Selector +- ): this; +- /** +- * Attach an event handler function for one or more events to the selected elements. +- * @param events An object in which the string keys represent one or more space-separated event types and optional +- * namespaces, and the values represent a handler function to be called for the event(s). +- * @param data Data to be passed to the handler in event.data when an event occurs. +- * @see \`{@link https://api.jquery.com/on/ }\` +- * @since 1.7 +- */ +- on( +- events: JQuery.TypeEventHandlers, +- data: TData +- ): this; +- /** +- * Attach an event handler function for one or more events to the selected elements. +- * @param events An object in which the string keys represent one or more space-separated event types and optional +- * namespaces, and the values represent a handler function to be called for the event(s). +- * @see \`{@link https://api.jquery.com/on/ }\` +- * @since 1.7 +- * @example ​ ````Attach multiple event handlers simultaneously using a plain object. +-```html +- +- +- +- +- on demo +- +- +- +- +-​ +-
      test div
      +-​ +- +-​ +- +- +-``` +- */ +- on(events: JQuery.TypeEventHandlers): this; +- /** +- * Attach a handler to an event for the elements. The handler is executed at most once per element per event type. +- * @param events One or more space-separated event types and optional namespaces, such as "click" or "keydown.myPlugin". +- * @param selector A selector string to filter the descendants of the selected elements that trigger the event. If the +- * selector is null or omitted, the event is always triggered when it reaches the selected element. +- * @param data Data to be passed to the handler in event.data when an event is triggered. +- * @param handler A function to execute when the event is triggered. +- * @see \`{@link https://api.jquery.com/one/ }\` +- * @since 1.7 +- */ +- one( +- events: TType, +- selector: JQuery.Selector, +- data: TData, +- handler: JQuery.TypeEventHandler +- ): this; +- /** +- * Attach a handler to an event for the elements. The handler is executed at most once per element per event type. +- * @param events One or more space-separated event types and optional namespaces, such as "click" or "keydown.myPlugin". +- * @param selector A selector string to filter the descendants of the selected elements that trigger the event. If the +- * selector is null or omitted, the event is always triggered when it reaches the selected element. +- * @param data Data to be passed to the handler in event.data when an event is triggered. +- * @param handler A function to execute when the event is triggered. +- * @see \`{@link https://api.jquery.com/one/ }\` +- * @since 1.7 +- */ +- one( +- events: TType, +- selector: null | undefined, +- data: TData, +- handler: JQuery.TypeEventHandler +- ): this; +- /** +- * Attach a handler to an event for the elements. The handler is executed at most once per element per event type. +- * @param events One or more space-separated event types and optional namespaces, such as "click" or "keydown.myPlugin". +- * @param selector A selector string to filter the descendants of the selected elements that trigger the event. If the +- * selector is null or omitted, the event is always triggered when it reaches the selected element. +- * @param handler A function to execute when the event is triggered. The value false is also allowed as a shorthand +- * for a function that simply does return false. +- * @see \`{@link https://api.jquery.com/one/ }\` +- * @since 1.7 +- */ +- one( +- events: TType, +- selector: JQuery.Selector, +- handler: JQuery.TypeEventHandler | +- false +- ): this; +- /** +- * Attach a handler to an event for the elements. The handler is executed at most once per element per event type. +- * @param events One or more space-separated event types and optional namespaces, such as "click" or "keydown.myPlugin". +- * @param data Data to be passed to the handler in event.data when an event is triggered. +- * @param handler A function to execute when the event is triggered. +- * @see \`{@link https://api.jquery.com/one/ }\` +- * @since 1.7 +- */ +- one( +- events: TType, +- data: TData, +- handler: JQuery.TypeEventHandler +- ): this; +- /** +- * Attach a handler to an event for the elements. The handler is executed at most once per element per event type. +- * @param events One or more space-separated event types and optional namespaces, such as "click" or "keydown.myPlugin". +- * @param handler A function to execute when the event is triggered. The value false is also allowed as a shorthand +- * for a function that simply does return false. +- * @see \`{@link https://api.jquery.com/one/ }\` +- * @since 1.7 +- * @example ​ ````Tie a one-time click to each div. +-```html +- +- +- +- +- one demo +- +- +- +- +-​ +-
      +-
      +-
      +-
      +-
      +-

      Click a green square...

      +-​ +- +-​ +- +- +-``` +- * @example ​ ````To display the text of all paragraphs in an alert box the first time each of them is clicked: +-```javascript +-$( "p" ).one( "click", function() { +- alert( $( this ).text() ); +-}); +-``` +- * @example ​ ````Event handlers will trigger once per element per event type +-```html +- +- +- +- +- one demo +- +- +- +-​ +-
      0
      +-
      Hover/click me
      +-​ +- +-​ +- +- +-``` +- */ +- one( +- events: TType, +- handler: JQuery.TypeEventHandler| +- false +- ): this; +- /** +- * Attach a handler to an event for the elements. The handler is executed at most once per element per event type. +- * @param events An object in which the string keys represent one or more space-separated event types and optional +- * namespaces, and the values represent a handler function to be called for the event(s). +- * @param selector A selector string to filter the descendants of the selected elements that will call the handler. If +- * the selector is null or omitted, the handler is always called when it reaches the selected element. +- * @param data Data to be passed to the handler in event.data when an event occurs. +- * @see \`{@link https://api.jquery.com/one/ }\` +- * @since 1.7 +- */ +- one( +- events: JQuery.TypeEventHandlers, +- selector: JQuery.Selector, +- data: TData +- ): this; +- /** +- * Attach a handler to an event for the elements. The handler is executed at most once per element per event type. +- * @param events An object in which the string keys represent one or more space-separated event types and optional +- * namespaces, and the values represent a handler function to be called for the event(s). +- * @param selector A selector string to filter the descendants of the selected elements that will call the handler. If +- * the selector is null or omitted, the handler is always called when it reaches the selected element. +- * @param data Data to be passed to the handler in event.data when an event occurs. +- * @see \`{@link https://api.jquery.com/one/ }\` +- * @since 1.7 +- */ +- one( +- events: JQuery.TypeEventHandlers, +- selector: null | undefined, +- data: TData +- ): this; +- /** +- * Attach a handler to an event for the elements. The handler is executed at most once per element per event type. +- * @param events An object in which the string keys represent one or more space-separated event types and optional +- * namespaces, and the values represent a handler function to be called for the event(s). +- * @param selector A selector string to filter the descendants of the selected elements that will call the handler. If +- * the selector is null or omitted, the handler is always called when it reaches the selected element. +- * @see \`{@link https://api.jquery.com/one/ }\` +- * @since 1.7 +- */ +- one(events: JQuery.TypeEventHandlers, +- selector: JQuery.Selector): this; +- /** +- * Attach a handler to an event for the elements. The handler is executed at most once per element per event type. +- * @param events An object in which the string keys represent one or more space-separated event types and optional +- * namespaces, and the values represent a handler function to be called for the event(s). +- * @param data Data to be passed to the handler in event.data when an event occurs. +- * @see \`{@link https://api.jquery.com/one/ }\` +- * @since 1.7 +- */ +- one( +- events: JQuery.TypeEventHandlers, +- data: TData +- ): this; +- /** +- * Attach a handler to an event for the elements. The handler is executed at most once per element per event type. +- * @param events An object in which the string keys represent one or more space-separated event types and optional +- * namespaces, and the values represent a handler function to be called for the event(s). +- * @see \`{@link https://api.jquery.com/one/ }\` +- * @since 1.7 +- */ +- one(events: JQuery.TypeEventHandlers): this; +- /** +- * Set the CSS outer height of each element in the set of matched elements. +- * @param value_function _@param_ `value_function` +- *
      +- * * `value` — A number representing the number of pixels, or a number along with an optional unit of measure +- * appended (as a string).
      +- * * `function` — A function returning the outer height to set. Receives the index position of the element in the set +- * and the old outer height as arguments. Within the function, `this` refers to the current element in +- * the set. +- * @see \`{@link https://api.jquery.com/outerHeight/ }\` +- * @since 1.8.0 +- * @example ​ ````Change the outer height of each div the first time it is clicked (and change its color). +-```html +- +- +- +- +- outerHeight demo +- +- +- +- +-​ +-
      d
      +-
      d
      +-
      d
      +-
      d
      +-
      d
      +-​ +- +-​ +- +- +-``` +- */ +- outerHeight(value_function: string | number | ((this: TElement, index: number, height: number) => string | number), +- includeMargin?: boolean): this; +- /** +- * Get the current computed outer height (including padding, border, and optionally margin) for the first element in the set of matched elements. +- * @param includeMargin A Boolean indicating whether to include the element's margin in the calculation. +- * @see \`{@link https://api.jquery.com/outerHeight/ }\` +- * @since 1.2.6 +- * @example ​ ````Get the outerHeight of a paragraph. +-```html +- +- +- +- +- outerHeight demo +- +- +- +- +-​ +-

      Hello

      +-​ +- +-​ +- +- +-``` +- */ +- outerHeight(includeMargin?: boolean): number | undefined; +- /** +- * Set the CSS outer width of each element in the set of matched elements. +- * @param value_function _@param_ `value_function` +- *
      +- * * `value` — A number representing the number of pixels, or a number along with an optional unit of measure +- * appended (as a string).
      +- * * `function` — A function returning the outer width to set. Receives the index position of the element in the set +- * and the old outer width as arguments. Within the function, `this` refers to the current element in +- * the set. +- * @see \`{@link https://api.jquery.com/outerWidth/ }\` +- * @since 1.8.0 +- * @example ​ ````Change the outer width of each div the first time it is clicked (and change its color). +-```html +- +- +- +- +- outerWidth demo +- +- +- +- +-​ +-
      d
      +-
      d
      +-
      d
      +-
      d
      +-
      d
      +-​ +- +-​ +- +- +-``` +- */ +- outerWidth(value_function: string | number | ((this: TElement, index: number, width: number) => string | number), +- includeMargin?: boolean): this; +- /** +- * Get the current computed outer width (including padding, border, and optionally margin) for the first element in the set of matched elements. +- * @param includeMargin A Boolean indicating whether to include the element's margin in the calculation. +- * @see \`{@link https://api.jquery.com/outerWidth/ }\` +- * @since 1.2.6 +- * @example ​ ````Get the outerWidth of a paragraph. +-```html +- +- +- +- +- outerWidth demo +- +- +- +- +-​ +-

      Hello

      +-​ +- +-​ +- +- +-``` +- */ +- outerWidth(includeMargin?: boolean): number | undefined; +- /** +- * Get the parent of each element in the current set of matched elements, optionally filtered by a selector. +- * @param selector A string containing a selector expression to match elements against. +- * @see \`{@link https://api.jquery.com/parent/ }\` +- * @since 1.0 +- * @example ​ ````Shows the parent of each element as (parent > child). Check the View Source to see the raw html. +-```html +- +- +- +- +- parent demo +- +- +- +- +-​ +-
      div, +- span, +- b +-
      +-​ +-

      p, +- span, +- em +- +-

      +-​ +-
      div, +- strong, +- span, +- em, +- b, +- +- +- b +-
      +-​ +- +-​ +- +- +-``` +- * @example ​ ````Find the parent element of each paragraph with a class "selected". +-```html +- +- +- +- +- parent demo +- +- +- +-​ +-

      Hello

      +-

      Hello Again

      +-​ +- +-​ +- +- +-``` +- */ +- parent(selector?: JQuery.Selector): this; +- /** +- * Get the ancestors of each element in the current set of matched elements, optionally filtered by a selector. +- * @param selector A string containing a selector expression to match elements against. +- * @see \`{@link https://api.jquery.com/parents/ }\` +- * @since 1.0 +- * @example ​ ````Find all parent elements of each b. +-```html +- +- +- +- +- parents demo +- +- +- +- +-​ +-
      +-

      +- +- My parents are: +- +-

      +-
      +-​ +- +-​ +- +- +-``` +- * @example ​ ````Click to find all unique div parent elements of each span. +-```html +- +- +- +- +- parents demo +- +- +- +- +-​ +-

      +-

      +-
      Hello
      +- Hello Again +-
      +-
      +- And Hello Again +-
      +-

      +- Click Hellos to toggle their parents. +-​ +- +-​ +- +- +-``` +- */ +- parents(selector?: JQuery.Selector): this; +- /** +- * Get the ancestors of each element in the current set of matched elements, up to but not including the element matched by the selector, DOM node, or jQuery object. +- * @param selector_element _@param_ `selector_element` +- *
      +- * * `selector` — A string containing a selector expression to indicate where to stop matching ancestor elements.
      +- * * `element` — A DOM node or jQuery object indicating where to stop matching ancestor elements. +- * @param filter A string containing a selector expression to match elements against. +- * @see \`{@link https://api.jquery.com/parentsUntil/ }\` +- * @since 1.4 +- * @since 1.6 +- * @example ​ ````Find the ancestors of <li class="item-a"> up to <ul class="level-1"> and give them a red background color. Also, find ancestors of <li class="item-2"> that have a class of "yes" up to <ul class="level-1"> and give them a green border. +-```html +- +- +- +- +- parentsUntil demo +- +- +- +-​ +-
        +-
      • I
      • +-
      • II +-
          +-
        • A
        • +-
        • B +-
            +-
          • 1
          • +-
          • 2
          • +-
          • 3
          • +-
          +-
        • +-
        • C
        • +-
        +-
      • +-
      • III
      • +-
      +-​ +- +-​ +- +- +-``` +- */ +- parentsUntil(selector_element?: JQuery.Selector | Element | JQuery, filter?: JQuery.Selector): this; +- /** +- * Get the current coordinates of the first element in the set of matched elements, relative to the offset parent. +- * @see \`{@link https://api.jquery.com/position/ }\` +- * @since 1.2 +- * @example ​ ````Access the position of the second paragraph: +-```html +- +- +- +- +- position demo +- +- +- +- +-​ +-
      +-

      Hello

      +-
      +-

      +-​ +- +-​ +- +- +-``` +- */ +- position(): JQuery.Coordinates; +- /** +- * Insert content, specified by the parameter, to the beginning of each element in the set of matched elements. +- * @param contents One or more additional DOM elements, text nodes, arrays of elements and text nodes, HTML strings, or +- * jQuery objects to insert at the beginning of each element in the set of matched elements. +- * @see \`{@link https://api.jquery.com/prepend/ }\` +- * @since 1.0 +- * @example ​ ````Prepends some HTML to all paragraphs. +-```html +- +- +- +- +- prepend demo +- +- +- +- +-​ +-

      there, friend!

      +-

      amigo!

      +-​ +- +-​ +- +- +-``` +- * @example ​ ````Prepends a DOM Element to all paragraphs. +-```html +- +- +- +- +- prepend demo +- +- +- +- +-​ +-

      is what I'd say

      +-

      is what I said

      +-​ +- +-​ +- +- +-``` +- * @example ​ ````Prepends a jQuery object (similar to an Array of DOM Elements) to all paragraphs. +-```html +- +- +- +- +- prepend demo +- +- +- +- +-​ +-

      is what was said.

      Hello +-​ +- +-​ +- +- +-``` +- */ +- prepend(...contents: Array>>): this; +- /** +- * Insert content, specified by the parameter, to the beginning of each element in the set of matched elements. +- * @param funсtion A function that returns an HTML string, DOM element(s), text node(s), or jQuery object to insert at +- * the beginning of each element in the set of matched elements. Receives the index position of the +- * element in the set and the old HTML value of the element as arguments. Within the function, `this` +- * refers to the current element in the set. +- * @see \`{@link https://api.jquery.com/prepend/ }\` +- * @since 1.4 +- */ +- prepend(funсtion: (this: TElement, index: number, html: string) => JQuery.htmlString | JQuery.TypeOrArray>): this; +- /** +- * Insert every element in the set of matched elements to the beginning of the target. +- * @param target A selector, element, HTML string, array of elements, or jQuery object; the matched set of elements +- * will be inserted at the beginning of the element(s) specified by this parameter. +- * @see \`{@link https://api.jquery.com/prependTo/ }\` +- * @since 1.0 +- * @example ​ ````Prepend all spans to the element with the ID "foo" (Check .prepend() documentation for more examples) +-```html +- +- +- +- +- prependTo demo +- +- +- +- +-​ +-
      FOO!
      +-I have something to say... +-​ +- +-​ +- +- +-``` +- */ +- prependTo(target: JQuery.Selector | JQuery.htmlString | JQuery.TypeOrArray | JQuery): this; +- /** +- * Get the immediately preceding sibling of each element in the set of matched elements. If a selector is provided, it retrieves the previous sibling only if it matches that selector. +- * @param selector A string containing a selector expression to match elements against. +- * @see \`{@link https://api.jquery.com/prev/ }\` +- * @since 1.0 +- * @example ​ ````Find the very previous sibling of each div. +-```html +- +- +- +- +- prev demo +- +- +- +- +-​ +-
      +-
      +-
      has child
      +-
      +-
      +-
      +-
      +-
      +-

      +-​ +- +-​ +- +- +-``` +- * @example ​ ````For each paragraph, find the very previous sibling that has a class "selected". +-```html +- +- +- +- +- prev demo +- +- +- +-​ +-
      Hello
      +-

      Hello Again

      +-

      And Again

      +-​ +- +-​ +- +- +-``` +- */ +- prev(selector?: JQuery.Selector): this; +- /** +- * Get all preceding siblings of each element in the set of matched elements, optionally filtered by a selector. +- * @param selector A string containing a selector expression to match elements against. +- * @see \`{@link https://api.jquery.com/prevAll/ }\` +- * @since 1.2 +- * @example ​ ````Locate all the divs preceding the last div and give them a class. +-```html +- +- +- +- +- prevAll demo +- +- +- +- +-​ +-
      +-
      +-
      +-
      +-​ +- +-​ +- +- +-``` +- */ +- prevAll(selector?: JQuery.Selector): this; +- /** +- * Get all preceding siblings of each element up to but not including the element matched by the selector, DOM node, or jQuery object. +- * @param selector_element _@param_ `selector_element` +- *
      +- * * `selector` — A string containing a selector expression to indicate where to stop matching preceding sibling elements.
      +- * * `element` — A DOM node or jQuery object indicating where to stop matching preceding sibling elements. +- * @param filter A string containing a selector expression to match elements against. +- * @see \`{@link https://api.jquery.com/prevUntil/ }\` +- * @since 1.4 +- * @since 1.6 +- * @example ​ ````Find the siblings that precede <dt id="term-2"> up to the preceding <dt> and give them a red background color. Also, find previous <dd> siblings of <dt id="term-3"> up to <dt id="term-1"> and give them a green text color. +-```html +- +- +- +- +- prevUntil demo +- +- +- +-​ +-
      +-
      term 1
      +-
      definition 1-a
      +-
      definition 1-b
      +-
      definition 1-c
      +-
      definition 1-d
      +-​ +-
      term 2
      +-
      definition 2-a
      +-
      definition 2-b
      +-
      definition 2-c
      +-​ +-
      term 3
      +-
      definition 3-a
      +-
      definition 3-b
      +-
      +-​ +- +-​ +- +- +-``` +- */ +- prevUntil(selector_element?: JQuery.Selector | Element | JQuery, filter?: JQuery.Selector): this; +- /** +- * Return a Promise object to observe when all actions of a certain type bound to the collection, queued or not, have finished. +- * @param type The type of queue that needs to be observed. +- * @param target Object onto which the promise methods have to be attached +- * @see \`{@link https://api.jquery.com/promise/ }\` +- * @since 1.6 +- */ +- promise(type: string, target: T): T & JQuery.Promise; +- /** +- * Return a Promise object to observe when all actions of a certain type bound to the collection, queued or not, have finished. +- * @param target Object onto which the promise methods have to be attached +- * @see \`{@link https://api.jquery.com/promise/ }\` +- * @since 1.6 +- */ +- promise(target: T): T & JQuery.Promise; +- /** +- * Return a Promise object to observe when all actions of a certain type bound to the collection, queued or not, have finished. +- * @param type The type of queue that needs to be observed. +- * @see \`{@link https://api.jquery.com/promise/ }\` +- * @since 1.6 +- * @example ​ ````Using .promise() on a collection with no active animation returns a resolved Promise: +-```javascript +-var div = $( "
      " ); +-​ +-div.promise().done(function( arg1 ) { +- // Will fire right away and alert "true" +- alert( this === div && arg1 === div ); +-}); +-``` +- * @example ​ ````Resolve the returned Promise when all animations have ended (including those initiated in the animation callback or added later on): +-```html +- +- +- +- +- promise demo +- +- +- +- +-​ +- +-

      Ready...

      +-
      +-
      +-
      +-
      +-​ +- +-​ +- +- +-``` +- * @example ​ ````Resolve the returned Promise using a $.when() statement (the .promise() method makes it possible to do this with jQuery collections): +-```html +- +- +- +- +- promise demo +- +- +- +- +-​ +- +-

      Ready...

      +-
      +-
      +-
      +-
      +-​ +- +-​ +- +- +-``` +- */ +- promise(type?: string): JQuery.Promise; +- /** +- * Set one or more properties for the set of matched elements. +- * @param propertyName The name of the property to set. +- * @param value_function _@param_ `value_function` +- *
      +- * * `value` — A value to set for the property.
      +- * * `function` — A function returning the value to set. Receives the index position of the element in the set and the +- * old property value as arguments. Within the function, the keyword `this` refers to the current element. +- * @see \`{@link https://api.jquery.com/prop/ }\` +- * @since 1.6 +- */ +- prop(propertyName: string, +- value_function: string | number | boolean | symbol | object | null | undefined | ((this: TElement, index: number, oldPropertyValue: any) => any)): this; +- /** +- * Set one or more properties for the set of matched elements. +- * @param properties An object of property-value pairs to set. +- * @see \`{@link https://api.jquery.com/prop/ }\` +- * @since 1.6 +- * @example ​ ````Disable all checkboxes on the page. +-```html +- +- +- +- +- prop demo +- +- +- +- +-​ +- +- +- +- +-​ +- +-​ +- +- +-``` +- */ +- prop(properties: JQuery.PlainObject): this; +- /** +- * Get the value of a property for the first element in the set of matched elements. +- * @param propertyName The name of the property to get. +- * @see \`{@link https://api.jquery.com/prop/ }\` +- * @since 1.6 +- * @example ​ ````Display the checked property and attribute of a checkbox as it changes. +-```html +- +- +- +- +- prop demo +- +- +- +- +-​ +- +- +-

      +-​ +- +-​ +- +- +-``` +- */ +- prop(propertyName: string): any; +- /** +- * Add a collection of DOM elements onto the jQuery stack. +- * @param elements An array of elements to push onto the stack and make into a new jQuery object. +- * @param name The name of a jQuery method that generated the array of elements. +- * @param args The arguments that were passed in to the jQuery method (for serialization). +- * @see \`{@link https://api.jquery.com/pushStack/ }\` +- * @since 1.3 +- */ +- pushStack(elements: ArrayLike, name: string, args: any[]): this; +- /** +- * Add a collection of DOM elements onto the jQuery stack. +- * @param elements An array of elements to push onto the stack and make into a new jQuery object. +- * @see \`{@link https://api.jquery.com/pushStack/ }\` +- * @since 1.0 +- * @example ​ ````Add some elements onto the jQuery stack, then pop back off again. +-```javascript +-jQuery([]) +- .pushStack( document.getElementsByTagName( "div" ) ) +- .remove() +- .end(); +-``` +- */ +- pushStack(elements: ArrayLike): this; +- /** +- * Manipulate the queue of functions to be executed, once for each matched element. +- * @param queueName A string containing the name of the queue. Defaults to fx, the standard effects queue. +- * @param newQueue The new function to add to the queue, with a function to call that will dequeue the next item. +- * An array of functions to replace the current queue contents. +- * @see \`{@link https://api.jquery.com/queue/ }\` +- * @since 1.2 +- * @example ​ ````Set a queue array to delete the queue. +-```html +- +- +- +- +- queue demo +- +- +- +- +-​ +- +- +-
      +-​ +- +-​ +- +- +-``` +- */ +- queue(queueName: string, newQueue: JQuery.TypeOrArray>): this; +- /** +- * Manipulate the queue of functions to be executed, once for each matched element. +- * @param newQueue The new function to add to the queue, with a function to call that will dequeue the next item. +- * An array of functions to replace the current queue contents. +- * @see \`{@link https://api.jquery.com/queue/ }\` +- * @since 1.2 +- * @example ​ ````Queue a custom function. +-```html +- +- +- +- +- queue demo +- +- +- +- +-​ +-Click here... +-
      +-​ +- +-​ +- +- +-``` +- */ +- queue(newQueue: JQuery.TypeOrArray>): this; +- /** +- * Show the queue of functions to be executed on the matched elements. +- * @param queueName A string containing the name of the queue. Defaults to fx, the standard effects queue. +- * @see \`{@link https://api.jquery.com/queue/ }\` +- * @since 1.2 +- * @example ​ ````Show the length of the queue. +-```html +- +- +- +- +- queue demo +- +- +- +- +-​ +-

      The queue length is:

      +-
      +-​ +- +-​ +- +- +-``` +- */ +- queue(queueName?: string): JQuery.Queue; +- /** +- * Specify a function to execute when the DOM is fully loaded. +- * @param handler A function to execute after the DOM is ready. +- * @see \`{@link https://api.jquery.com/ready/ }\` +- * @since 1.0 +- * @deprecated ​ Deprecated since 3.0. Use `jQuery(function() { })`. +- * @example ​ ````Display a message when the DOM is loaded. +-```html +- +- +- +- +- ready demo +- +- +- +- +- +-​ +-

      Not loaded yet.

      +-​ +- +- +-``` +- */ +- ready(handler: ($: JQueryStatic) => void): this; +- /** +- * Remove the set of matched elements from the DOM. +- * @param selector A selector expression that filters the set of matched elements to be removed. +- * @see \`{@link https://api.jquery.com/remove/ }\` +- * @since 1.0 +- * @example ​ ````Removes all paragraphs from the DOM +-```html +- +- +- +- +- remove demo +- +- +- +- +-​ +-

      Hello

      +-how are +-

      you?

      +- +-​ +- +-​ +- +- +-``` +- * @example ​ ````Removes all paragraphs that contain "Hello" from the DOM. Analogous to doing $("p").filter(":contains('Hello')").remove(). +-```html +- +- +- +- +- remove demo +- +- +- +- +-​ +-

      Hello

      +-how are +-

      you?

      +- +-​ +- +-​ +- +- +-``` +- */ +- remove(selector?: string): this; +- /** +- * Remove an attribute from each element in the set of matched elements. +- * @param attributeName An attribute to remove; as of version 1.7, it can be a space-separated list of attributes. +- * @see \`{@link https://api.jquery.com/removeAttr/ }\` +- * @since 1.0 +- * @example ​ ````Clicking the button changes the title of the input next to it. Move the mouse pointer over the text input to see the effect of adding and removing the title attribute. +-```html +- +- +- +- +- removeAttr demo +- +- +- +-​ +- +- +-
      +-​ +- +-​ +- +- +-``` +- */ +- removeAttr(attributeName: string): this; +- /** +- * Remove a single class, multiple classes, or all classes from each element in the set of matched elements. +- * @param className_function _@param_ `className_function` +- *
      +- * * `className` — One or more space-separated classes to be removed from the class attribute of each matched element.
      +- * * `function` — A function returning one or more space-separated class names to be removed. Receives the index +- * position of the element in the set and the old class value as arguments. +- * @see \`{@link https://api.jquery.com/removeClass/ }\` +- * @since 1.0 +- * @since 1.4 +- * @since 3.3 +- * @example ​ ````Remove the class 'blue' from the matched elements. +-```html +- +- +- +- +- removeClass demo +- +- +- +- +-​ +-

      Hello

      +-

      and

      +-

      then

      +-

      Goodbye

      +-​ +- +-​ +- +- +-``` +- * @example ​ ````Remove the class 'blue' and 'under' from the matched elements. +-```html +- +- +- +- +- removeClass demo +- +- +- +- +-​ +-

      Hello

      +-

      and

      +-

      then

      +-

      Goodbye

      +-​ +- +-​ +- +- +-``` +- * @example ​ ````Remove all the classes from the matched elements. +-```html +- +- +- +- +- removeClass demo +- +- +- +- +-​ +-

      Hello

      +-

      and

      +-

      then

      +-

      Goodbye

      +-​ +- +-​ +- +- +-``` +- */ +- removeClass(className_function?: JQuery.TypeOrArray | ((this: TElement, index: number, className: string) => string)): this; +- /** +- * Remove a previously-stored piece of data. +- * @param name A string naming the piece of data to delete. +- * An array or space-separated string naming the pieces of data to delete. +- * @see \`{@link https://api.jquery.com/removeData/ }\` +- * @since 1.2.3 +- * @since 1.7 +- * @example ​ ````Set a data store for 2 names then remove one of them. +-```html +- +- +- +- +- removeData demo +- +- +- +- +-​ +-
      value1 before creation:
      +-
      value1 after creation:
      +-
      value1 after removal:
      +-
      value2 after removal:
      +-​ +- +-​ +- +- +-``` +- */ +- removeData(name?: JQuery.TypeOrArray): this; +- /** +- * Remove a property for the set of matched elements. +- * @param propertyName The name of the property to remove. +- * @see \`{@link https://api.jquery.com/removeProp/ }\` +- * @since 1.6 +- * @example ​ ````Set a numeric property on a paragraph and then remove it. +-```html +- +- +- +- +- removeProp demo +- +- +- +- +-​ +-

      +-​ +- +-​ +- +- +-``` +- */ +- removeProp(propertyName: string): this; +- /** +- * Replace each target element with the set of matched elements. +- * @param target A selector string, jQuery object, DOM element, or array of elements indicating which element(s) to replace. +- * @see \`{@link https://api.jquery.com/replaceAll/ }\` +- * @since 1.2 +- * @example ​ ````Replace all the paragraphs with bold words. +-```html +- +- +- +- +- replaceAll demo +- +- +- +-​ +-

      Hello

      +-

      cruel

      +-

      World

      +-​ +- +-​ +- +- +-``` +- */ +- replaceAll(target: JQuery.Selector | JQuery | JQuery.TypeOrArray): this; +- /** +- * Replace each element in the set of matched elements with the provided new content and return the set of elements that was removed. +- * @param newContent_function _@param_ `newContent_function` +- *
      +- * * `newContent` — The content to insert. May be an HTML string, DOM element, array of DOM elements, or jQuery object.
      +- * * `function` — A function that returns content with which to replace the set of matched elements. +- * @see \`{@link https://api.jquery.com/replaceWith/ }\` +- * @since 1.2 +- * @since 1.4 +- * @example ​ ````On click, replace the button with a div containing the same word. +-```html +- +- +- +- +- replaceWith demo +- +- +- +- +-​ +- +- +- +-​ +- +-​ +- +- +-``` +- * @example ​ ````Replace all paragraphs with bold words. +-```html +- +- +- +- +- replaceWith demo +- +- +- +-​ +-

      Hello

      +-

      cruel

      +-

      World

      +-​ +- +-​ +- +- +-``` +- * @example ​ ````On click, replace each paragraph with a div that is already in the DOM and selected with the $() function. Notice it doesn't clone the object but rather moves it to replace the paragraph. +-```html +- +- +- +- +- replaceWith demo +- +- +- +- +-​ +-

      Hello

      +-

      cruel

      +-

      World

      +-
      Replaced!
      +-​ +- +-​ +- +- +-``` +- * @example ​ ````On button click, replace the containing div with its child divs and append the class name of the selected element to the paragraph. +-```html +- +- +- +- +- replaceWith demo +- +- +- +- +-​ +-

      +- +-

      +-
      +-
      Scooby
      +-
      Dooby
      +-
      Doo
      +-
      +-​ +- +-​ +- +- +-``` +- */ +- replaceWith(newContent_function: JQuery.htmlString | +- JQuery | +- JQuery.TypeOrArray | +- JQuery.Node | +- ((this: TElement, index: number, oldhtml: JQuery.htmlString) => JQuery.htmlString | +- JQuery | +- JQuery.TypeOrArray | +- JQuery.Node)): this; +- /** +- * Bind an event handler to the "resize" JavaScript event, or trigger that event on an element. +- * @param eventData An object containing data that will be passed to the event handler. +- * @param handler A function to execute each time the event is triggered. +- * @see \`{@link https://api.jquery.com/resize/ }\` +- * @since 1.4.3 +- * @deprecated ​ Deprecated since 3.3. Use \`{@link on }\` or \`{@link trigger }\`. +- * +- * **Cause**: The `.on()` and `.trigger()` methods can set an event handler or generate an event for any event type, and should be used instead of the shortcut methods. This message also applies to the other event shorthands, including: blur, focus, focusin, focusout, resize, scroll, dblclick, mousedown, mouseup, mousemove, mouseover, mouseout, mouseenter, mouseleave, change, select, submit, keydown, keypress, keyup, and contextmenu. +- * +- * **Solution**: Instead of `.click(fn)` use `.on("click", fn)`. Instead of `.click()` use `.trigger("click")`. +- */ +- resize(eventData: TData, +- handler: JQuery.TypeEventHandler): this; +- /** +- * Bind an event handler to the "resize" JavaScript event, or trigger that event on an element. +- * @param handler A function to execute each time the event is triggered. +- * @see \`{@link https://api.jquery.com/resize/ }\` +- * @since 1.0 +- * @deprecated ​ Deprecated since 3.3. Use \`{@link on }\` or \`{@link trigger }\`. +- * +- * **Cause**: The `.on()` and `.trigger()` methods can set an event handler or generate an event for any event type, and should be used instead of the shortcut methods. This message also applies to the other event shorthands, including: blur, focus, focusin, focusout, resize, scroll, dblclick, mousedown, mouseup, mousemove, mouseover, mouseout, mouseenter, mouseleave, change, select, submit, keydown, keypress, keyup, and contextmenu. +- * +- * **Solution**: Instead of `.click(fn)` use `.on("click", fn)`. Instead of `.click()` use `.trigger("click")`. +- * @example ​ ````To see the window width while (or after) it is resized, try: +-```javascript +-$( window ).resize(function() { +- $( "body" ).prepend( "
      " + $( window ).width() + "
      " ); +-}); +-``` +- */ +- resize(handler?: JQuery.TypeEventHandler | +- false): this; +- /** +- * Bind an event handler to the "scroll" JavaScript event, or trigger that event on an element. +- * @param eventData An object containing data that will be passed to the event handler. +- * @param handler A function to execute each time the event is triggered. +- * @see \`{@link https://api.jquery.com/scroll/ }\` +- * @since 1.4.3 +- * @deprecated ​ Deprecated since 3.3. Use \`{@link on }\` or \`{@link trigger }\`. +- * +- * **Cause**: The `.on()` and `.trigger()` methods can set an event handler or generate an event for any event type, and should be used instead of the shortcut methods. This message also applies to the other event shorthands, including: blur, focus, focusin, focusout, resize, scroll, dblclick, mousedown, mouseup, mousemove, mouseover, mouseout, mouseenter, mouseleave, change, select, submit, keydown, keypress, keyup, and contextmenu. +- * +- * **Solution**: Instead of `.click(fn)` use `.on("click", fn)`. Instead of `.click()` use `.trigger("click")`. +- */ +- scroll(eventData: TData, +- handler: JQuery.TypeEventHandler): this; +- /** +- * Bind an event handler to the "scroll" JavaScript event, or trigger that event on an element. +- * @param handler A function to execute each time the event is triggered. +- * @see \`{@link https://api.jquery.com/scroll/ }\` +- * @since 1.0 +- * @deprecated ​ Deprecated since 3.3. Use \`{@link on }\` or \`{@link trigger }\`. +- * +- * **Cause**: The `.on()` and `.trigger()` methods can set an event handler or generate an event for any event type, and should be used instead of the shortcut methods. This message also applies to the other event shorthands, including: blur, focus, focusin, focusout, resize, scroll, dblclick, mousedown, mouseup, mousemove, mouseover, mouseout, mouseenter, mouseleave, change, select, submit, keydown, keypress, keyup, and contextmenu. +- * +- * **Solution**: Instead of `.click(fn)` use `.on("click", fn)`. Instead of `.click()` use `.trigger("click")`. +- * @example ​ ````To do something when your page is scrolled: +-```html +- +- +- +- +- scroll demo +- +- +- +- +-​ +-
      Try scrolling the iframe.
      +-

      Paragraph - Scroll happened!

      +-​ +- +-​ +- +- +-``` +- */ +- scroll(handler?: JQuery.TypeEventHandler | +- false): this; +- /** +- * Set the current horizontal position of the scroll bar for each of the set of matched elements. +- * @param value An integer indicating the new position to set the scroll bar to. +- * @see \`{@link https://api.jquery.com/scrollLeft/ }\` +- * @since 1.2.6 +- * @example ​ ````Set the scrollLeft of a div. +-```html +- +- +- +- +- scrollLeft demo +- +- +- +- +-​ +-

      lalala

      Hello

      +-​ +- +-​ +- +- +-``` +- */ +- scrollLeft(value: number): this; +- /** +- * Get the current horizontal position of the scroll bar for the first element in the set of matched elements. +- * @see \`{@link https://api.jquery.com/scrollLeft/ }\` +- * @since 1.2.6 +- * @example ​ ````Get the scrollLeft of a paragraph. +-```html +- +- +- +- +- scrollLeft demo +- +- +- +- +-​ +-

      Hello

      +-​ +- +-​ +- +- +-``` +- */ +- scrollLeft(): number | undefined; +- /** +- * Set the current vertical position of the scroll bar for each of the set of matched elements. +- * @param value A number indicating the new position to set the scroll bar to. +- * @see \`{@link https://api.jquery.com/scrollTop/ }\` +- * @since 1.2.6 +- * @example ​ ````Set the scrollTop of a div. +-```html +- +- +- +- +- scrollTop demo +- +- +- +- +-​ +-

      lalala

      Hello

      +-​ +- +-​ +- +- +-``` +- */ +- scrollTop(value: number): this; +- /** +- * Get the current vertical position of the scroll bar for the first element in the set of matched elements or set the vertical position of the scroll bar for every matched element. +- * @see \`{@link https://api.jquery.com/scrollTop/ }\` +- * @since 1.2.6 +- * @example ​ ````Get the scrollTop of a paragraph. +-```html +- +- +- +- +- scrollTop demo +- +- +- +- +-​ +-

      Hello

      +-​ +- +-​ +- +- +-``` +- */ +- scrollTop(): number | undefined; +- /** +- * Bind an event handler to the "select" JavaScript event, or trigger that event on an element. +- * @param eventData An object containing data that will be passed to the event handler. +- * @param handler A function to execute each time the event is triggered. +- * @see \`{@link https://api.jquery.com/select/ }\` +- * @since 1.4.3 +- * @deprecated ​ Deprecated since 3.3. Use \`{@link on }\` or \`{@link trigger }\`. +- * +- * **Cause**: The `.on()` and `.trigger()` methods can set an event handler or generate an event for any event type, and should be used instead of the shortcut methods. This message also applies to the other event shorthands, including: blur, focus, focusin, focusout, resize, scroll, dblclick, mousedown, mouseup, mousemove, mouseover, mouseout, mouseenter, mouseleave, change, select, submit, keydown, keypress, keyup, and contextmenu. +- * +- * **Solution**: Instead of `.click(fn)` use `.on("click", fn)`. Instead of `.click()` use `.trigger("click")`. +- */ +- select(eventData: TData, +- handler: JQuery.TypeEventHandler): this; +- /** +- * Bind an event handler to the "select" JavaScript event, or trigger that event on an element. +- * @param handler A function to execute each time the event is triggered. +- * @see \`{@link https://api.jquery.com/select/ }\` +- * @since 1.0 +- * @deprecated ​ Deprecated since 3.3. Use \`{@link on }\` or \`{@link trigger }\`. +- * +- * **Cause**: The `.on()` and `.trigger()` methods can set an event handler or generate an event for any event type, and should be used instead of the shortcut methods. This message also applies to the other event shorthands, including: blur, focus, focusin, focusout, resize, scroll, dblclick, mousedown, mouseup, mousemove, mouseover, mouseout, mouseenter, mouseleave, change, select, submit, keydown, keypress, keyup, and contextmenu. +- * +- * **Solution**: Instead of `.click(fn)` use `.on("click", fn)`. Instead of `.click()` use `.trigger("click")`. +- * @example ​ ````To do something when text in input boxes is selected: +-```html +- +- +- +- +- select demo +- +- +- +- +-​ +-

      Click and drag the mouse to select text in the inputs.

      +- +- +-
      +- ​ +- +-​ +- +- +-``` +- * @example ​ ````To trigger the select event on all input elements, try: +-```javascript +-$( "input" ).select(); +-``` +- */ +- select(handler?: JQuery.TypeEventHandler | +- false): this; +- /** +- * Encode a set of form elements as a string for submission. +- * @see \`{@link https://api.jquery.com/serialize/ }\` +- * @since 1.0 +- * @example ​ ````Serialize a form to a query string that could be sent to a server in an Ajax request. +-```html +- +- +- +- +- serialize demo +- +- +- +- +-​ +-
      +- +-​ +-
      +- +-​ +-
      +- +- +- +- +-​ +-
      +- +- +- +- +-
      +-​ +-

      +-​ +- +-​ +- +- +-``` +- */ +- serialize(): string; +- /** +- * Encode a set of form elements as an array of names and values. +- * @see \`{@link https://api.jquery.com/serializeArray/ }\` +- * @since 1.2 +- * @example ​ ````Get the values from a form, iterate through them, and append them to a results display. +-```html +- +- +- +- +- serializeArray demo +- +- +- +- +-​ +-

      Results:

      +-
      +- +- +-
      +- +- +- +- +- +- +- +- +-
      +-​ +- +-​ +- +- +-``` +- */ +- serializeArray(): JQuery.NameValuePair[]; +- /** +- * Display the matched elements. +- * @param duration A string or number determining how long the animation will run. +- * @param easing A string indicating which easing function to use for the transition. +- * @param complete A function to call once the animation is complete, called once per matched element. +- * @see \`{@link https://api.jquery.com/show/ }\` +- * @since 1.4.3 +- */ +- show(duration: JQuery.Duration, easing: string, complete: (this: TElement) => void): this; +- /** +- * Display the matched elements. +- * @param duration A string or number determining how long the animation will run. +- * @param easing_complete _@param_ `easing_complete` +- *
      +- * * `easing` — A string indicating which easing function to use for the transition.
      +- * * `complete` — A function to call once the animation is complete, called once per matched element. +- * @see \`{@link https://api.jquery.com/show/ }\` +- * @since 1.0 +- * @since 1.4.3 +- * @example ​ ````Show the first div, followed by each next adjacent sibling div in order, with a 200ms animation. Each animation starts when the previous sibling div's animation ends. +-```html +- +- +- +- +- show demo +- +- +- +- +-​ +- +- +-
      Hello 3,
      +-
      how
      +-
      are
      +-
      you?
      +-​ +- +-​ +- +- +-``` +- * @example ​ ````Show all span and input elements with an animation. Change the text once the animation is done. +-```html +- +- +- +- +- show demo +- +- +- +- +-​ +- +-Are you sure? (type 'yes' if you are) +-
      +-
      +- +-
      +-
      +-

      I'm hidden...

      +-​ +- +-​ +- +- +-``` +- */ +- show(duration: JQuery.Duration, easing_complete: string | ((this: TElement) => void)): this; +- /** +- * Display the matched elements. +- * @param duration_complete_options _@param_ `duration_complete_options` +- *
      +- * * `duration` — A string or number determining how long the animation will run.
      +- * * `complete` — A function to call once the animation is complete, called once per matched element.
      +- * * `options` — A map of additional options to pass to the method. +- * @see \`{@link https://api.jquery.com/show/ }\` +- * @since 1.0 +- * @example ​ ````Animates all hidden paragraphs to show slowly, completing the animation within 600 milliseconds. +-```html +- +- +- +- +- show demo +- +- +- +- +-​ +- +-

      Hello 2

      +-​ +- +-​ +- +- +-``` +- */ +- show(duration_complete_options?: JQuery.Duration | ((this: TElement) => void) | JQuery.EffectsOptions): this; +- /** +- * Get the siblings of each element in the set of matched elements, optionally filtered by a selector. +- * @param selector A string containing a selector expression to match elements against. +- * @see \`{@link https://api.jquery.com/siblings/ }\` +- * @since 1.0 +- * @example ​ ````Find the unique siblings of all yellow li elements in the 3 lists (including other yellow li elements if appropriate). +-```html +- +- +- +- +- siblings demo +- +- +- +- +-​ +-
        +-
      • One
      • +-
      • Two
      • +-
      • Three
      • +-
      • Four
      • +-
      +-​ +-
        +-
      • Five
      • +-
      • Six
      • +-
      • Seven
      • +-
      +-​ +-
        +-
      • Eight
      • +-
      • Nine
      • +-
      • Ten
      • +-
      • Eleven
      • +-
      +-​ +-

      Unique siblings:

      +-​ +- +-​ +- +- +-``` +- * @example ​ ````Find all siblings with a class "selected" of each div. +-```html +- +- +- +- +- siblings demo +- +- +- +-​ +-
      Hello
      +-

      Hello Again

      +-

      And Again

      +-​ +- +-​ +- +- +-``` +- */ +- siblings(selector?: JQuery.Selector): this; +- /** +- * Reduce the set of matched elements to a subset specified by a range of indices. +- * @param start An integer indicating the 0-based position at which the elements begin to be selected. If negative, +- * it indicates an offset from the end of the set. +- * @param end An integer indicating the 0-based position at which the elements stop being selected. If negative, +- * it indicates an offset from the end of the set. If omitted, the range continues until the end of the set. +- * @see \`{@link https://api.jquery.com/slice/ }\` +- * @since 1.1.4 +- * @example ​ ````Turns divs yellow based on a random slice. +-```html +- +- +- +- +- slice demo +- +- +- +- +-​ +-

      +- Click the button!

      +-
      +-
      +-
      +-
      +-
      +-
      +-
      +-
      +-
      +- ​ +- +-​ +- +- +-``` +- * @example ​ ````Selects all paragraphs, then slices the selection to include only the first element. +-```javascript +-$( "p" ).slice( 0, 1 ).wrapInner( "" ); +-``` +- * @example ​ ````Selects all paragraphs, then slices the selection to include only the first and second element. +-```javascript +-$( "p" ).slice( 0, 2 ).wrapInner( "" ); +-``` +- * @example ​ ````Selects all paragraphs, then slices the selection to include only the second element. +-```javascript +-$( "p" ).slice( 1, 2 ).wrapInner( "" ); +-``` +- * @example ​ ````Selects all paragraphs, then slices the selection to include only the second and third element. +-```javascript +-$( "p" ).slice( 1 ).wrapInner( "" ); +-``` +- * @example ​ ````Selects all paragraphs, then slices the selection to include only the third element. +-```javascript +-$( "p" ).slice( -1 ).wrapInner( "" ); +-``` +- */ +- slice(start: number, end?: number): this; +- /** +- * Display the matched elements with a sliding motion. +- * @param duration A string or number determining how long the animation will run. +- * @param easing A string indicating which easing function to use for the transition. +- * @param complete A function to call once the animation is complete, called once per matched element. +- * @see \`{@link https://api.jquery.com/slideDown/ }\` +- * @since 1.4.3 +- */ +- slideDown(duration: JQuery.Duration, easing: string, complete?: (this: TElement) => void): this; +- /** +- * Display the matched elements with a sliding motion. +- * @param duration_easing _@param_ `duration_easing` +- *
      +- * * `duration` — A string or number determining how long the animation will run.
      +- * * `easing` — A string indicating which easing function to use for the transition. +- * @param complete A function to call once the animation is complete, called once per matched element. +- * @see \`{@link https://api.jquery.com/slideDown/ }\` +- * @since 1.0 +- * @since 1.4.3 +- * @example ​ ````Animates all inputs to slide down, completing the animation within 1000 milliseconds. Once the animation is done, the input look is changed especially if it is the middle input which gets the focus. +-```html +- +- +- +- +- slideDown demo +- +- +- +- +-​ +-
      Push!
      +- +- +- +- ​ +- +-​ +- +- +-``` +- */ +- slideDown(duration_easing: JQuery.Duration | string, complete: (this: TElement) => void): this; +- /** +- * Display the matched elements with a sliding motion. +- * @param duration_easing_complete_options _@param_ `duration_easing_complete_options` +- *
      +- * * `duration` — A string or number determining how long the animation will run.
      +- * * `easing` — A string indicating which easing function to use for the transition.
      +- * * `complete` — A function to call once the animation is complete, called once per matched element.
      +- * * `options` — A map of additional options to pass to the method. +- * @see \`{@link https://api.jquery.com/slideDown/ }\` +- * @since 1.0 +- * @since 1.4.3 +- * @example ​ ````Animates all divs to slide down and show themselves over 600 milliseconds. +-```html +- +- +- +- +- slideDown demo +- +- +- +- +-​ +-Click me! +-
      +-
      +-
      +-​ +- +-​ +- +- +-``` +- */ +- slideDown(duration_easing_complete_options?: JQuery.Duration | string | ((this: TElement) => void) | JQuery.EffectsOptions): this; +- /** +- * Display or hide the matched elements with a sliding motion. +- * @param duration A string or number determining how long the animation will run. +- * @param easing A string indicating which easing function to use for the transition. +- * @param complete A function to call once the animation is complete, called once per matched element. +- * @see \`{@link https://api.jquery.com/slideToggle/ }\` +- * @since 1.4.3 +- */ +- slideToggle(duration: JQuery.Duration, easing: string, complete?: (this: TElement) => void): this; +- /** +- * Display or hide the matched elements with a sliding motion. +- * @param duration_easing _@param_ `duration_easing` +- *
      +- * * `duration` — A string or number determining how long the animation will run.
      +- * * `easing` — A string indicating which easing function to use for the transition. +- * @param complete A function to call once the animation is complete, called once per matched element. +- * @see \`{@link https://api.jquery.com/slideToggle/ }\` +- * @since 1.0 +- * @since 1.4.3 +- * @example ​ ````Animates divs between dividers with a toggle that makes some appear and some disappear. +-```html +- +- +- +- +- slideToggle demo +- +- +- +- +-​ +-
      +-
      +-
      +-
      +-
      +-
      +-
      +-
      +-
      +-
      +-
      +-

      There have been 0 toggled divs.

      +-​ +- +-​ +- +- +-``` +- */ +- slideToggle(duration_easing: JQuery.Duration | string, complete: (this: TElement) => void): this; +- /** +- * Display or hide the matched elements with a sliding motion. +- * @param duration_easing_complete_options _@param_ `duration_easing_complete_options` +- *
      +- * * `duration` — A string or number determining how long the animation will run.
      +- * * `easing` — A string indicating which easing function to use for the transition.
      +- * * `complete` — A function to call once the animation is complete, called once per matched element.
      +- * * `options` — A map of additional options to pass to the method. +- * @see \`{@link https://api.jquery.com/slideToggle/ }\` +- * @since 1.0 +- * @since 1.4.3 +- * @example ​ ````Animates all paragraphs to slide up or down, completing the animation within 600 milliseconds. +-```html +- +- +- +- +- slideToggle demo +- +- +- +- +-​ +- +-

      +- This is the paragraph to end all paragraphs. You +- should feel lucky to have seen such a paragraph in +- your life. Congratulations! +-

      +-​ +- +-​ +- +- +-``` +- */ +- slideToggle(duration_easing_complete_options?: JQuery.Duration | string | ((this: TElement) => void) | JQuery.EffectsOptions): this; +- /** +- * Hide the matched elements with a sliding motion. +- * @param duration A string or number determining how long the animation will run. +- * @param easing A string indicating which easing function to use for the transition. +- * @param complete A function to call once the animation is complete, called once per matched element. +- * @see \`{@link https://api.jquery.com/slideUp/ }\` +- * @since 1.4.3 +- */ +- slideUp(duration: JQuery.Duration, easing: string, complete?: (this: TElement) => void): this; +- /** +- * Hide the matched elements with a sliding motion. +- * @param duration_easing _@param_ `duration_easing` +- *
      +- * * `duration` — A string or number determining how long the animation will run.
      +- * * `easing` — A string indicating which easing function to use for the transition. +- * @param complete A function to call once the animation is complete, called once per matched element. +- * @see \`{@link https://api.jquery.com/slideUp/ }\` +- * @since 1.0 +- * @since 1.4.3 +- * @example ​ ````Animates the parent paragraph to slide up, completing the animation within 200 milliseconds. Once the animation is done, it displays an alert. +-```html +- +- +- +- +- slideUp demo +- +- +- +- +-​ +-
      +- +- +-
      +-​ +-
      +- +- +-
      +-​ +-
      +- +- +-
      +-​ +-
      +-​ +- +-​ +- +- +-``` +- */ +- slideUp(duration_easing: JQuery.Duration | string, complete: (this: TElement) => void): this; +- /** +- * Hide the matched elements with a sliding motion. +- * @param duration_easing_complete_options _@param_ `duration_easing_complete_options` +- *
      +- * * `duration` — A string or number determining how long the animation will run.
      +- * * `easing` — A string indicating which easing function to use for the transition.
      +- * * `complete` — A function to call once the animation is complete, called once per matched element.
      +- * * `options` — A map of additional options to pass to the method. +- * @see \`{@link https://api.jquery.com/slideUp/ }\` +- * @since 1.0 +- * @since 1.4.3 +- * @example ​ ````Animates all divs to slide up, completing the animation within 400 milliseconds. +-```html +- +- +- +- +- slideUp demo +- +- +- +- +-​ +-Click me! +-
      +-
      +-
      +-
      +-
      +-​ +- +-​ +- +- +-``` +- */ +- slideUp(duration_easing_complete_options?: JQuery.Duration | string | ((this: TElement) => void) | JQuery.EffectsOptions): this; +- /** +- * Stop the currently-running animation on the matched elements. +- * @param queue The name of the queue in which to stop animations. +- * @param clearQueue A Boolean indicating whether to remove queued animation as well. Defaults to false. +- * @param jumpToEnd A Boolean indicating whether to complete the current animation immediately. Defaults to false. +- * @see \`{@link https://api.jquery.com/stop/ }\` +- * @since 1.7 +- */ +- stop(queue: string, clearQueue?: boolean, jumpToEnd?: boolean): this; +- /** +- * Stop the currently-running animation on the matched elements. +- * @param clearQueue A Boolean indicating whether to remove queued animation as well. Defaults to false. +- * @param jumpToEnd A Boolean indicating whether to complete the current animation immediately. Defaults to false. +- * @see \`{@link https://api.jquery.com/stop/ }\` +- * @since 1.2 +- * @example ​ ````Click the Go button once to start the animation, then click the STOP button to stop it where it's currently positioned. Another option is to click several buttons to queue them up and see that stop just kills the currently playing one. +-```html +- +- +- +- +- stop demo +- +- +- +- +-​ +- +- +- +-
      +-​ +- +-​ +- +- +-``` +- * @example ​ ````Click the slideToggle button to start the animation, then click again before the animation is completed. The animation will toggle the other direction from the saved starting point. +-```html +- +- +- +- +- stop demo +- +- +- +- +-​ +- +-
      +-​ +- +-​ +- +- +-``` +- */ +- stop(clearQueue?: boolean, jumpToEnd?: boolean): this; +- /** +- * Bind an event handler to the "submit" JavaScript event, or trigger that event on an element. +- * @param eventData An object containing data that will be passed to the event handler. +- * @param handler A function to execute each time the event is triggered. +- * @see \`{@link https://api.jquery.com/submit/ }\` +- * @since 1.4.3 +- * @deprecated ​ Deprecated since 3.3. Use \`{@link on }\` or \`{@link trigger }\`. +- * +- * **Cause**: The `.on()` and `.trigger()` methods can set an event handler or generate an event for any event type, and should be used instead of the shortcut methods. This message also applies to the other event shorthands, including: blur, focus, focusin, focusout, resize, scroll, dblclick, mousedown, mouseup, mousemove, mouseover, mouseout, mouseenter, mouseleave, change, select, submit, keydown, keypress, keyup, and contextmenu. +- * +- * **Solution**: Instead of `.click(fn)` use `.on("click", fn)`. Instead of `.click()` use `.trigger("click")`. +- */ +- submit(eventData: TData, +- handler: JQuery.TypeEventHandler): this; +- /** +- * Bind an event handler to the "submit" JavaScript event, or trigger that event on an element. +- * @param handler A function to execute each time the event is triggered. +- * @see \`{@link https://api.jquery.com/submit/ }\` +- * @since 1.0 +- * @deprecated ​ Deprecated since 3.3. Use \`{@link on }\` or \`{@link trigger }\`. +- * +- * **Cause**: The `.on()` and `.trigger()` methods can set an event handler or generate an event for any event type, and should be used instead of the shortcut methods. This message also applies to the other event shorthands, including: blur, focus, focusin, focusout, resize, scroll, dblclick, mousedown, mouseup, mousemove, mouseover, mouseout, mouseenter, mouseleave, change, select, submit, keydown, keypress, keyup, and contextmenu. +- * +- * **Solution**: Instead of `.click(fn)` use `.on("click", fn)`. Instead of `.click()` use `.trigger("click")`. +- * @example ​ ````If you'd like to prevent forms from being submitted unless a flag variable is set, try: +-```html +- +- +- +- +- submit demo +- +- +- +- +-​ +-

      Type 'correct' to validate.

      +-
      +-
      +- +- +-
      +-
      +- +-​ +- +-​ +- +- +-``` +- * @example ​ ````If you'd like to prevent forms from being submitted unless a flag variable is set, try: +-```javascript +-$( "form" ).submit(function() { +- return this.some_flag_variable; +-}); +-``` +- * @example ​ ````To trigger the submit event on the first form on the page, try: +-```javascript +-$( "form:first" ).submit(); +-``` +- */ +- submit(handler?: JQuery.TypeEventHandler | +- false): this; +- /** +- * Set the content of each element in the set of matched elements to the specified text. +- * @param text_function _@param_ `text_function` +- *
      +- * * `text` — The text to set as the content of each matched element. When Number or Boolean is supplied, it will +- * be converted to a String representation.
      +- * * `function` — A function returning the text content to set. Receives the index position of the element in the set +- * and the old text value as arguments. +- * @see \`{@link https://api.jquery.com/text/ }\` +- * @since 1.0 +- * @since 1.4 +- * @example ​ ````Add text to the paragraph (notice the bold tag is escaped). +-```html +- +- +- +- +- text demo +- +- +- +- +-​ +-

      Test Paragraph.

      +-​ +- +-​ +- +- +-``` +- */ +- text(text_function: string | number | boolean | ((this: TElement, index: number, text: string) => string | number | boolean)): this; +- /** +- * Get the combined text contents of each element in the set of matched elements, including their descendants. +- * @see \`{@link https://api.jquery.com/text/ }\` +- * @since 1.0 +- * @example ​ ````Find the text in the first paragraph (stripping out the html), then set the html of the last paragraph to show it is just text (the red bold is gone). +-```html +- +- +- +- +- text demo +- +- +- +- +-​ +-

      Test Paragraph.

      +-

      +-​ +- +-​ +- +- +-``` +- */ +- text(): string; +- /** +- * Retrieve all the elements contained in the jQuery set, as an array. +- * @see \`{@link https://api.jquery.com/toArray/ }\` +- * @since 1.4 +- * @example ​ ````Select all divs in the document and return the DOM Elements as an Array; then use the built-in reverse() method to reverse that array. +-```html +- +- +- +- +- toArray demo +- +- +- +- +-​ +-Reversed - +-​ +-
      One
      +-
      Two
      +-
      Three
      ​ +- +-​ +- +- +-``` +- */ +- toArray(): TElement[]; +- /** +- * Display or hide the matched elements. +- * @param duration A string or number determining how long the animation will run. +- * @param easing A string indicating which easing function to use for the transition. +- * @param complete A function to call once the animation is complete, called once per matched element. +- * @see \`{@link https://api.jquery.com/toggle/ }\` +- * @since 1.4.3 +- */ +- toggle(duration: JQuery.Duration, easing: string, complete?: (this: TElement) => void): this; +- /** +- * Display or hide the matched elements. +- * @param duration A string or number determining how long the animation will run. +- * @param complete A function to call once the animation is complete, called once per matched element. +- * @see \`{@link https://api.jquery.com/toggle/ }\` +- * @since 1.0 +- */ +- toggle(duration: JQuery.Duration, complete: (this: TElement) => void): this; +- /** +- * Display or hide the matched elements. +- * @param duration_complete_options_display _@param_ `duration_complete_options_display` +- *
      +- * * `duration` — A string or number determining how long the animation will run.
      +- * * `complete` — A function to call once the animation is complete, called once per matched element.
      +- * * `options` — A map of additional options to pass to the method.
      +- * * `display` — Use true to show the element or false to hide it. +- * @see \`{@link https://api.jquery.com/toggle/ }\` +- * @since 1.0 +- * @since 1.3 +- * @example ​ ````Toggles all paragraphs. +-```html +- +- +- +- +- toggle demo +- +- +- +-​ +- +-

      Hello

      +-

      Good Bye

      +-​ +- +-​ +- +- +-``` +- * @example ​ ````Animates all paragraphs to be shown if they are hidden and hidden if they are visible, completing the animation within 600 milliseconds. +-```html +- +- +- +- +- toggle demo +- +- +- +- +-​ +- +-

      Hiya

      +-

      Such interesting text, eh?

      +-​ +- +-​ +- +- +-``` +- * @example ​ ````Shows all paragraphs, then hides them all, back and forth. +-```html +- +- +- +- +- toggle demo +- +- +- +-​ +- +-

      Hello

      +-

      Good Bye

      +-​ +- +-​ +- +- +-``` +- */ +- toggle(duration_complete_options_display?: JQuery.Duration | ((this: TElement) => void) | JQuery.EffectsOptions | boolean): this; +- /** +- * Add or remove one or more classes from each element in the set of matched elements, depending on either the class's presence or the value of the state argument. +- * @param className_function _@param_ `className_function` +- *
      +- * * `className` — One or more class names (separated by spaces) to be toggled for each element in the matched set.
      +- * * `function` — A function that returns class names to be toggled in the class attribute of each element in the +- * matched set. Receives the index position of the element in the set, the old class value, and the state as arguments. +- * @param state A Boolean (not just truthy/falsy) value to determine whether the class should be added or removed. +- * @see \`{@link https://api.jquery.com/toggleClass/ }\` +- * @since 1.0 +- * @since 1.3 +- * @since 1.4 +- * @since 3.3 +- * @example ​ ````Toggle the class 'highlight' when a paragraph is clicked. +-```html +- +- +- +- +- toggleClass demo +- +- +- +- +-​ +-

      Click to toggle

      +-

      highlight

      +-

      on these

      +-

      paragraphs

      +-​ +- +-​ +- +- +-``` +- * @example ​ ````Add the "highlight" class to the clicked paragraph on every third click of that paragraph, remove it every first and second click. +-```html +- +- +- +- +- toggleClass demo +- +- +- +- +-​ +-

      Click to toggle (clicks: 0)

      +-

      highlight (clicks: 0)

      +-

      on these (clicks: 0)

      +-

      paragraphs (clicks: 0)

      +-​ +- +-​ +- +- +-``` +- * @example ​ ````Toggle the class name(s) indicated on the buttons for each div. +-```html +- +- +- +- +- toggleClass demo +- +- +- +- +-​ +-
      +- +- +- +- +- reset +-
      +-
      +-
      +-
      +-
      +-
      +-
      +-​ +- +-​ +- +- +-``` +- */ +- toggleClass(className_function: JQuery.TypeOrArray | ((this: TElement, index: number, className: string, state: TState) => string), +- state?: TState): this; +- /** +- * Add or remove one or more classes from each element in the set of matched elements, depending on either the class's presence or the value of the state argument. +- * @param state A boolean value to determine whether the class should be added or removed. +- * @see \`{@link https://api.jquery.com/toggleClass/ }\` +- * @since 1.4 +- * @deprecated ​ Deprecated since 3.0. See \`{@link https://github.com/jquery/jquery/pull/2618 }\`. +- * +- * **Cause**: Calling `.toggleClass()` with no arguments, or with a single Boolean `true` or `false` argument, has been deprecated. Its behavior was poorly documented, but essentially the method saved away the current class value in a data item when the class was removed and restored the saved value when it was toggled back. If you do not believe you are specificially trying to use this form of the method, it is possible you are accidentally doing so via an inadvertent undefined value, as `.toggleClass( undefined )` toggles all classes. +- * +- * **Solution**: If this functionality is still needed, save the current full `.attr( "class" )` value in a data item and restore it when required. +- */ +- toggleClass(state?: boolean): this; +- /** +- * Execute all handlers and behaviors attached to the matched elements for the given event type. +- * @param eventType_event _@param_ `eventType_event` +- *
      +- * * `eventType` — A string containing a JavaScript event type, such as `click` or `submit`.
      +- * * `event` — A \`{@link https://api.jquery.com/category/events/event-object/ jQuery.Event}\` object. +- * @param extraParameters Additional parameters to pass along to the event handler. +- * @see \`{@link https://api.jquery.com/trigger/ }\` +- * @since 1.0 +- * @since 1.3 +- * @example ​ ````Clicks to button #2 also trigger a click for button #1. +-```html +- +- +- +- +- trigger demo +- +- +- +- +-​ +- +- +-
      0 button #1 clicks.
      +-
      0 button #2 clicks.
      +-​ +- +-​ +- +- +-``` +- * @example ​ ````To submit the first form without using the submit() function, try: +-```javascript +-$( "form:first" ).trigger( "submit" ); +-``` +- * @example ​ ````To submit the first form without using the submit() function, try: +-```javascript +-var event = jQuery.Event( "submit" ); +-$( "form:first" ).trigger( event ); +-if ( event.isDefaultPrevented() ) { +- // Perform an action... +-} +-``` +- * @example ​ ````To pass arbitrary data to an event: +-```javascript +-$( "p" ) +- .click(function( event, a, b ) { +- // When a normal click fires, a and b are undefined +- // for a trigger like below a refers to "foo" and b refers to "bar" +- }) +- .trigger( "click", [ "foo", "bar" ] ); +-``` +- * @example ​ ````To pass arbitrary data through an event object: +-```javascript +-var event = jQuery.Event( "logged" ); +-event.user = "foo"; +-event.pass = "bar"; +-$( "body" ).trigger( event ); +-``` +- * @example ​ ````Alternative way to pass data through an event object: +-```javascript +-$( "body" ).trigger({ +- type:"logged", +- user:"foo", +- pass:"bar" +-}); +-``` +- */ +- trigger(eventType_event: string | JQuery.Event, extraParameters?: any[] | JQuery.PlainObject | string | number | boolean): this; +- /** +- * Execute all handlers attached to an element for an event. +- * @param eventType_event _@param_ `eventType_event` +- *
      +- * * `eventType` — A string containing a JavaScript event type, such as `click` or `submit`.
      +- * * `event` — A \`{@link https://api.jquery.com/category/events/event-object/ jQuery.Event}\` object. +- * @param extraParameters Additional parameters to pass along to the event handler. +- * @see \`{@link https://api.jquery.com/triggerHandler/ }\` +- * @since 1.2 +- * @since 1.3 +- * @example ​ ````If you called .triggerHandler() on a focus event - the browser's default focus action would not be triggered, only the event handlers bound to the focus event. +-```html +- +- +- +- +- triggerHandler demo +- +- +- +-​ +- +-

      +-​ +- +-​ +- +-​ +- +- +-``` +- */ +- triggerHandler(eventType_event: string | JQuery.Event, extraParameters?: any[] | JQuery.PlainObject | string | number | boolean): any; +- /** +- * Remove a previously-attached event handler from the elements. +- * @param event A string containing one or more DOM event types, such as "click" or "submit," or custom event names. +- * @param handler A function to execute each time the event is triggered. +- * @see \`{@link https://api.jquery.com/unbind/ }\` +- * @since 1.0 +- * @since 1.4.3 +- * @deprecated ​ Deprecated since 3.0. Use \`{@link off }\`. +- * +- * **Cause**: These event binding methods have been deprecated in favor of the `.on()` and `.off()` methods which can handle both delegated and direct event binding. Although the older methods are still present in jQuery 3.0, they may be removed as early as the next major-version update. +- * +- * **Solution**: Change the method call to use `.on()` or `.off()`, the documentation for the old methods include specific instructions. In general, the `.bind()` and `.unbind()` methods can be renamed directly to `.on()` and `.off()` respectively since the argument orders are identical. +- * @example ​ ````Can bind and unbind events to the colored button. +-```html +- +- +- +- +- unbind demo +- +- +- +- +-​ +- +- +- +-
      Click!
      +-​ +- +-​ +- +- +-``` +- * @example ​ ````To unbind just one previously bound handler, pass the function in as the second argument: +-```javascript +-var foo = function() { +- // Code to handle some kind of event +-}; +-​ +-$( "p" ).bind( "click", foo ); // ... Now foo will be called when paragraphs are clicked ... +-​ +-$( "p" ).unbind( "click", foo ); // ... foo will no longer be called. +-``` +- */ +- unbind( +- event: TType, +- handler: JQuery.TypeEventHandler | +- false +- ): this; +- /** +- * Remove a previously-attached event handler from the elements. +- * @param event A string containing one or more DOM event types, such as "click" or "submit," or custom event names. +- * A jQuery.Event object. +- * @see \`{@link https://api.jquery.com/unbind/ }\` +- * @since 1.0 +- * @deprecated ​ Deprecated since 3.0. Use \`{@link off }\`. +- * +- * **Cause**: These event binding methods have been deprecated in favor of the `.on()` and `.off()` methods which can handle both delegated and direct event binding. Although the older methods are still present in jQuery 3.0, they may be removed as early as the next major-version update. +- * +- * **Solution**: Change the method call to use `.on()` or `.off()`, the documentation for the old methods include specific instructions. In general, the `.bind()` and `.unbind()` methods can be renamed directly to `.on()` and `.off()` respectively since the argument orders are identical. +- * @example ​ ````To unbind all events from all paragraphs, write: +-```javascript +-$( "p" ).unbind(); +-``` +- * @example ​ ````To unbind all click events from all paragraphs, write: +-```javascript +-$( "p" ).unbind( "click" ); +-``` +- */ +- unbind(event?: string | JQuery.TriggeredEvent): this; +- /** +- * Remove a handler from the event for all elements which match the current selector, based upon a specific set of root elements. +- * @param selector A selector which will be used to filter the event results. +- * @param eventType A string containing a JavaScript event type, such as "click" or "keydown" +- * @param handler A function to execute each time the event is triggered. +- * @see \`{@link https://api.jquery.com/undelegate/ }\` +- * @since 1.4.2 +- * @deprecated ​ Deprecated since 3.0. Use \`{@link off }\`. +- * +- * **Cause**: These event binding methods have been deprecated in favor of the `.on()` and `.off()` methods which can handle both delegated and direct event binding. Although the older methods are still present in jQuery 3.0, they may be removed as early as the next major-version update. +- * +- * **Solution**: Change the method call to use `.on()` or `.off()`, the documentation for the old methods include specific instructions. In general, the `.bind()` and `.unbind()` methods can be renamed directly to `.on()` and `.off()` respectively since the argument orders are identical. +- * @example ​ ````Can bind and unbind events to the colored button. +-```html +- +- +- +- +- undelegate demo +- +- +- +- +-​ +- +- +- +-
      Click!
      +-​ +- +-​ +- +- +-``` +- * @example ​ ````To undelegate just one previously bound handler, pass the function in as the third argument: +-```javascript +-var foo = function () { +- // Code to handle some kind of event +-}; +-​ +-// ... Now foo will be called when paragraphs are clicked ... +-$( "body" ).delegate( "p", "click", foo ); +-​ +-// ... foo will no longer be called. +-$( "body" ).undelegate( "p", "click", foo ); +-``` +- */ +- undelegate( +- selector: JQuery.Selector, +- eventType: TType, +- handler: JQuery.TypeEventHandler | +- false +- ): this; +- /** +- * Remove a handler from the event for all elements which match the current selector, based upon a specific set of root elements. +- * @param selector A selector which will be used to filter the event results. +- * @param eventType_events _@param_ `eventType_events` +- *
      +- * * `eventType` — A string containing a JavaScript event type, such as "click" or "keydown"
      +- * * `events` — An object of one or more event types and previously bound functions to unbind from them. +- * @see \`{@link https://api.jquery.com/undelegate/ }\` +- * @since 1.4.2 +- * @since 1.4.3 +- * @deprecated ​ Deprecated since 3.0. Use \`{@link off }\`. +- * +- * **Cause**: These event binding methods have been deprecated in favor of the `.on()` and `.off()` methods which can handle both delegated and direct event binding. Although the older methods are still present in jQuery 3.0, they may be removed as early as the next major-version update. +- * +- * **Solution**: Change the method call to use `.on()` or `.off()`, the documentation for the old methods include specific instructions. In general, the `.bind()` and `.unbind()` methods can be renamed directly to `.on()` and `.off()` respectively since the argument orders are identical. +- */ +- undelegate(selector: JQuery.Selector, +- eventType_events: string | +- JQuery.TypeEventHandlers): this; +- /** +- * Remove a handler from the event for all elements which match the current selector, based upon a specific set of root elements. +- * @param namespace A selector which will be used to filter the event results. +- * @see \`{@link https://api.jquery.com/undelegate/ }\` +- * @since 1.4.2 +- * @since 1.6 +- * @deprecated ​ Deprecated since 3.0. Use \`{@link off }\`. +- * +- * **Cause**: These event binding methods have been deprecated in favor of the `.on()` and `.off()` methods which can handle both delegated and direct event binding. Although the older methods are still present in jQuery 3.0, they may be removed as early as the next major-version update. +- * +- * **Solution**: Change the method call to use `.on()` or `.off()`, the documentation for the old methods include specific instructions. In general, the `.bind()` and `.unbind()` methods can be renamed directly to `.on()` and `.off()` respectively since the argument orders are identical. +- * @example ​ ````To unbind all delegated events from all paragraphs, write: +-```javascript +-$( "p" ).undelegate(); +-``` +- * @example ​ ````To unbind all delegated click events from all paragraphs, write: +-```javascript +-$( "p" ).undelegate( "click" ); +-``` +- * @example ​ ````To unbind all delegated events by their namespace: +-```javascript +-var foo = function() { +- // Code to handle some kind of event +-}; +-​ +-// Delegate events under the ".whatever" namespace +-$( "form" ).delegate( ":button", "click.whatever", foo ); +-​ +-$( "form" ).delegate( "input[type='text'] ", "keypress.whatever", foo ); +-​ +-// Unbind all events delegated under the ".whatever" namespace +-$( "form" ).undelegate( ".whatever" ); +-``` +- */ +- undelegate(namespace?: string): this; +- /** +- * Remove the parents of the set of matched elements from the DOM, leaving the matched elements in their place. +- * @param selector A selector to check the parent element against. If an element's parent does not match the selector, +- * the element won't be unwrapped. +- * @see \`{@link https://api.jquery.com/unwrap/ }\` +- * @since 1.4 +- * @since 3.0 +- * @example ​ ````Wrap/unwrap a div around each of the paragraphs. +-```html +- +- +- +- +- unwrap demo +- +- +- +- +-​ +-

      Hello

      +-

      cruel

      +-

      World

      ​ +- +-​ +- +- +-``` +- */ +- unwrap(selector?: string): this; +- /** +- * Set the value of each element in the set of matched elements. +- * @param value_function _@param_ `value_function` +- *
      +- * * `value` — A string of text, a number, or an array of strings corresponding to the value of each matched +- * element to set as selected/checked.
      +- * * `function` — A function returning the value to set. `this` is the current element. Receives the index position of +- * the element in the set and the old value as arguments. +- * @see \`{@link https://api.jquery.com/val/ }\` +- * @since 1.0 +- * @since 1.4 +- * @example ​ ````Set the value of an input box. +-```html +- +- +- +- +- val demo +- +- +- +- +-​ +-
      +- +- +- +-
      +- +-​ +- +-​ +- +- +-``` +- * @example ​ ````Use the function argument to modify the value of an input box. +-```html +- +- +- +- +- val demo +- +- +- +-​ +-

      Type something and then click or tab out of the input.

      +- +-​ +- +-​ +- +- +-``` +- * @example ​ ````Set a single select, a multiple select, checkboxes and a radio button . +-```html +- +- +- +- +- val demo +- +- +- +- +-​ +- +-​ +- +-​ +-
      +- check1 +- check2 +- radio1 +- radio2 +-​ +- +-​ +- +- +-``` +- */ +- val(value_function: string | number | string[] | ((this: TElement, index: number, value: string) => string)): this; +- /** +- * Get the current value of the first element in the set of matched elements. +- * @see \`{@link https://api.jquery.com/val/ }\` +- * @since 1.0 +- * @example ​ ````Get the single value from a single select and an array of values from a multiple select and display their values. +-```html +- +- +- +- +- val demo +- +- +- +- +-​ +-

      +-​ +- +-​ +- +-​ +- +-​ +- +- +-``` +- * @example ​ ````Find the value of an input box. +-```html +- +- +- +- +- val demo +- +- +- +- +-​ +- +-

      +-​ +- +-​ +- +- +-``` +- */ +- val(): string | number | string[] | undefined; +- /** +- * Set the CSS width of each element in the set of matched elements. +- * @param value_function _@param_ `value_function` +- *
      +- * * `value` — An integer representing the number of pixels, or an integer along with an optional unit of measure +- * appended (as a string).
      +- * * `function` — A function returning the width to set. Receives the index position of the element in the set and the +- * old width as arguments. Within the function, `this` refers to the current element in the set. +- * @see \`{@link https://api.jquery.com/width/ }\` +- * @since 1.0 +- * @since 1.4.1 +- * @example ​ ````Change the width of each div the first time it is clicked (and change its color). +-```html +- +- +- +- +- width demo +- +- +- +- +-​ +-
      d
      +-
      d
      +-
      d
      +-
      d
      +-
      d
      +-​ +- +-​ +- +- +-``` +- */ +- width(value_function: string | number | ((this: TElement, index: number, value: number) => string | number)): this; +- /** +- * Get the current computed width for the first element in the set of matched elements. +- * @see \`{@link https://api.jquery.com/width/ }\` +- * @since 1.0 +- * @example ​ ````Show various widths. Note the values are from the iframe so might be smaller than you expected. The yellow highlight shows the iframe body. +-```html +- +- +- +- +- width demo +- +- +- +- +-​ +- +- +- +-
       
      +-

      +- Sample paragraph to test width +-

      +-​ +- +-​ +- +- +-``` +- */ +- width(): number | undefined; +- /** +- * Wrap an HTML structure around each element in the set of matched elements. +- * @param wrappingElement_function _@param_ `wrappingElement_function` +- *
      +- * * `wrappingElement` — A selector, element, HTML string, or jQuery object specifying the structure to wrap around the +- * matched elements. When you pass a jQuery collection containing more than one element, or a selector +- * matching more than one element, the first element will be used.
      +- * * `function` — A callback function returning the HTML content or jQuery object to wrap around the matched elements. +- * Receives the index position of the element in the set as an argument. Within the function, `this` +- * refers to the current element in the set. +- * @see \`{@link https://api.jquery.com/wrap/ }\` +- * @since 1.0 +- * @since 1.4 +- * @example ​ ````Wrap a new div around all of the paragraphs. +-```html +- +- +- +- +- wrap demo +- +- +- +- +-​ +-

      Hello

      +-

      cruel

      +-

      World

      +-​ +- +-​ +- +- +-``` +- * @example ​ ````Wraps a newly created tree of objects around the spans. Notice anything in between the spans gets left out like the <strong> (red text) in this example. Even the white space between spans is left out. Click View Source to see the original html.> +-```html +- +- +- +- +- wrap demo +- +- +- +- +-​ +-Span Text +-What about me? +-Another One +-​ +- +-​ +- +- +-``` +- * @example ​ ````Wrap a new div around all of the paragraphs. +-```html +- +- +- +- +- wrap demo +- +- +- +- +-​ +-

      Hello

      +-

      cruel

      +-

      World

      +-​ +- +-​ +- +- +-``` +- * @example ​ ````Wrap a jQuery object double depth div around all of the paragraphs. Notice it doesn't move the object but just clones it to wrap around its target. +-```html +- +- +- +- +- wrap demo +- +- +- +- +-​ +-

      Hello

      +-

      cruel

      +-

      World

      +-
      +-​ +- +-​ +- +- +-``` +- */ +- wrap(wrappingElement_function: JQuery.Selector | JQuery.htmlString | Element | JQuery | ((this: TElement, index: number) => string | JQuery)): this; +- /** +- * Wrap an HTML structure around all elements in the set of matched elements. +- * @param wrappingElement_function _@param_ `wrappingElement_function` +- *
      +- * * `wrappingElement` — A selector, element, HTML string, or jQuery object specifying the structure to wrap around the matched elements.
      +- * * `function` — A callback function returning the HTML content or jQuery object to wrap around all the matched +- * elements. Within the function, `this` refers to the first element in the set. **Prior to jQuery +- * 3.0**, the callback was incorrectly called for every element in the set and received the index +- * position of the element in the set as an argument. +- * @see \`{@link https://api.jquery.com/wrapAll/ }\` +- * @since 1.2 +- * @since 1.4 +- * @example ​ ````Wrap a new div around all of the paragraphs. +-```html +- +- +- +- +- wrapAll demo +- +- +- +- +-​ +-

      Hello

      +-

      cruel

      +-

      World

      +-​ +- +-​ +- +- +-``` +- * @example ​ ````Wraps a newly created tree of objects around the spans. Notice anything in between the spans gets left out like the <strong> (red text) in this example. Even the white space between spans is left out. Click View Source to see the original html. +-```html +- +- +- +- +- wrapAll demo +- +- +- +- +-​ +-Span Text +-What about me? +-Another One +-​ +- +-​ +- +- +-``` +- * @example ​ ````Wrap a new div around all of the paragraphs. +-```html +- +- +- +- +- wrapAll demo +- +- +- +- +-​ +-

      Hello

      +-

      cruel

      +-

      World

      +-​ +- +-​ +- +- +-``` +- * @example ​ ````Wrap a jQuery object double depth div around all of the paragraphs. Notice it doesn't move the object but just clones it to wrap around its target. +-```html +- +- +- +- +- wrapAll demo +- +- +- +- +-​ +-

      Hello

      +-

      cruel

      +-

      World

      +-
      +-​ +- +-​ +- +- +-``` +- */ +- wrapAll(wrappingElement_function: JQuery.Selector | JQuery.htmlString | Element | JQuery | ((this: TElement) => string | JQuery)): this; +- /** +- * Wrap an HTML structure around the content of each element in the set of matched elements. +- * @param wrappingElement_function _@param_ `wrappingElement_function` +- *
      +- * * `wrappingElement` — An HTML snippet, selector expression, jQuery object, or DOM element specifying the structure to wrap +- * around the content of the matched elements.
      +- * * `function` — A callback function which generates a structure to wrap around the content of the matched elements. +- * Receives the index position of the element in the set as an argument. Within the function, `this` +- * refers to the current element in the set. +- * @see \`{@link https://api.jquery.com/wrapInner/ }\` +- * @since 1.2 +- * @since 1.4 +- * @example ​ ````Selects all paragraphs and wraps a bold tag around each of its contents. +-```html +- +- +- +- +- wrapInner demo +- +- +- +- +-​ +-

      Hello

      +-

      cruel

      +-

      World

      +-​ +- +-​ +- +- +-``` +- * @example ​ ````Wraps a newly created tree of objects around the inside of the body. +-```html +- +- +- +- +- wrapInner demo +- +- +- +- +-​ +-Plain old text, or is it? +-​ +- +-​ +- +- +-``` +- * @example ​ ````Selects all paragraphs and wraps a bold tag around each of its contents. +-```html +- +- +- +- +- wrapInner demo +- +- +- +- +-​ +-

      Hello

      +-

      cruel

      +-

      World

      +-​ +- +-​ +- +- +-``` +- * @example ​ ````Selects all paragraphs and wraps a jQuery object around each of its contents. +-```html +- +- +- +- +- wrapInner demo +- +- +- +- +-​ +-

      Hello

      +-

      cruel

      +-

      World

      +-​ +- +-​ +- +- +-``` +- */ +- wrapInner(wrappingElement_function: JQuery.Selector | JQuery.htmlString | Element | JQuery | ((this: TElement, index: number) => string | JQuery | Element)): this; ++// The second button starts a traditional chained animation, where each animation will start once the previous animation on the element has completed. ++// ```html ++// ++// ++// ++// ++// animate demo ++// ++// ++// ++// ++// ​ ++// ++// ++// ++// ++//
      Block1
      ++//
      Block2
      ++// ​ ++// ++// ​ ++// ++// ++// ``` ++// * @example ​ ````Animates the first div's left property and synchronizes the remaining divs, using the step function to set their left properties at each stage of the animation. ++// ```html ++// ++// ++// ++// ++// animate demo ++// ++// ++// ++// ++// ​ ++//

      ++//
      ++//
      ++//
      ++//
      ++//
      ++//
      ++// ​ ++// ++// ​ ++// ++// ++// ``` ++// * @example ​ ````Animate the left and opacity style properties of all paragraphs; run the animation outside the queue, so that it will automatically start without waiting for its turn. ++// ```javascript ++// $( "p" ).animate({ ++// left: "50px", ++// opacity: 1 ++// }, { ++// duration: 500, ++// queue: false ++// }); ++// ``` ++// * @example ​ ````Animates all paragraphs to toggle both height and opacity, completing the animation within 600 milliseconds. ++// ```javascript ++// $( "p" ).animate({ ++// height: "toggle", ++// opacity: "toggle" ++// }, { ++// duration: "slow" ++// }); ++// ``` ++// * @example ​ ````Use an easing function to provide a different style of animation. This will only work if you have a plugin that provides this easing function. ++// ```javascript ++// $( "p" ).animate({ ++// opacity: "show" ++// }, { ++// duration: "slow", ++// easing: "easein" ++// }); ++// ``` ++// */ ++// animate(properties: JQuery.PlainObject, ++// options: JQuery.EffectsOptions): this; ++// /** ++// * Perform a custom animation of a set of CSS properties. ++// * @param properties An object of CSS properties and values that the animation will move toward. ++// * @param complete A function to call once the animation is complete, called once per matched element. ++// * @see \`{@link https://api.jquery.com/animate/ }\` ++// * @since 1.0 ++// */ ++// animate(properties: JQuery.PlainObject, ++// complete?: (this: TElement) => void): this; ++// /** ++// * Insert content, specified by the parameter, to the end of each element in the set of matched elements. ++// * @param contents One or more additional DOM elements, text nodes, arrays of elements and text nodes, HTML strings, or ++// * jQuery objects to insert at the end of each element in the set of matched elements. ++// * @see \`{@link https://api.jquery.com/append/ }\` ++// * @since 1.0 ++// * @example ​ ````Appends some HTML to all paragraphs. ++// ```html ++// ++// ++// ++// ++// append demo ++// ++// ++// ++// ++// ​ ++//

      I would like to say:

      ++// ​ ++// ++// ​ ++// ++// ++// ``` ++// * @example ​ ````Appends an Element to all paragraphs. ++// ```html ++// ++// ++// ++// ++// append demo ++// ++// ++// ++// ++// ​ ++//

      I would like to say:

      ++// ​ ++// ++// ​ ++// ++// ++// ``` ++// * @example ​ ````Appends a jQuery object (similar to an Array of DOM Elements) to all paragraphs. ++// ```html ++// ++// ++// ++// ++// append demo ++// ++// ++// ++// ++// ​ ++// Hello world!!! ++//

      I would like to say:

      ++// ​ ++// ++// ​ ++// ++// ++// ``` ++// */ ++// append(...contents: Array>>): this; ++// /** ++// * Insert content, specified by the parameter, to the end of each element in the set of matched elements. ++// * @param funсtion A function that returns an HTML string, DOM element(s), text node(s), or jQuery object to insert at ++// * the end of each element in the set of matched elements. Receives the index position of the element ++// * in the set and the old HTML value of the element as arguments. Within the function, `this` refers to ++// * the current element in the set. ++// * @see \`{@link https://api.jquery.com/append/ }\` ++// * @since 1.4 ++// */ ++// append(funсtion: (this: TElement, index: number, html: string) => JQuery.htmlString | JQuery.TypeOrArray>): this; ++// /** ++// * Insert every element in the set of matched elements to the end of the target. ++// * @param target A selector, element, HTML string, array of elements, or jQuery object; the matched set of elements ++// * will be inserted at the end of the element(s) specified by this parameter. ++// * @see \`{@link https://api.jquery.com/appendTo/ }\` ++// * @since 1.0 ++// * @example ​ ````Append all spans to the element with the ID "foo" (Check append() documentation for more examples) ++// ```html ++// ++// ++// ++// ++// appendTo demo ++// ++// ++// ++// ++// ​ ++// I have nothing more to say... ++// ​ ++//
      FOO!
      ++// ​ ++// ++// ​ ++// ++// ++// ``` ++// */ ++// appendTo(target: JQuery.Selector | JQuery.htmlString | JQuery.TypeOrArray | JQuery): this; ++// /** ++// * Set one or more attributes for the set of matched elements. ++// * @param attributeName The name of the attribute to set. ++// * @param value_function _@param_ `value_function` ++// *
      ++// * * `value` — A value to set for the attribute. If `null`, the specified attribute will be removed (as in \`{@link removeAttr .removeAttr()}`).
      ++// * * `function` — A function returning the value to set. `this` is the current element. Receives the index position of ++// * the element in the set and the old attribute value as arguments. ++// * @see \`{@link https://api.jquery.com/attr/ }\` ++// * @since 1.0 ++// * @since 1.1 ++// * @example ​ ````Set the id for divs based on the position in the page. ++// ```html ++// ++// ++// ++// ++// attr demo ++// ++// ++// ++// ++// ​ ++//
      Zero-th
      ++//
      First
      ++//
      Second
      ++// ​ ++// ++// ​ ++// ++// ++// ``` ++// * @example ​ ````Set the src attribute from title attribute on the image. ++// ```html ++// ++// ++// ++// ++// attr demo ++// ++// ++// ++// ​ ++// ++// ​ ++// ++// ​ ++// ++// ++// ``` ++// */ ++// attr(attributeName: string, ++// value_function: string | number | null | ((this: TElement, index: number, attr: string) => string | number | void | undefined)): this; ++// /** ++// * Set one or more attributes for the set of matched elements. ++// * @param attributes An object of attribute-value pairs to set. ++// * @see \`{@link https://api.jquery.com/attr/ }\` ++// * @since 1.0 ++// * @example ​ ````Set some attributes for all <img>s in the page. ++// ```html ++// ++// ++// ++// ++// attr demo ++// ++// ++// ++// ++// ​ ++// ++// ++// ++// ​ ++//
      Attribute of Ajax
      ++// ​ ++// ++// ​ ++// ++// ++// ``` ++// */ ++// attr(attributes: JQuery.PlainObject): this; ++// /** ++// * Get the value of an attribute for the first element in the set of matched elements. ++// * @param attributeName The name of the attribute to get. ++// * @see \`{@link https://api.jquery.com/attr/ }\` ++// * @since 1.0 ++// * @example ​ ````Display the checked attribute and property of a checkbox as it changes. ++// ```html ++// ++// ++// ++// ++// attr demo ++// ++// ++// ++// ++// ​ ++// ++// ++//

      ++// ​ ++// ++// ​ ++// ++// ++// ``` ++// * @example ​ ````Find the title attribute of the first <em> in the page. ++// ```html ++// ++// ++// ++// ++// attr demo ++// ++// ++// ++// ++// ​ ++//

      Once there was a large dinosaur...

      ++// ​ ++// The title of the emphasis is:
      ++// ​ ++// ++// ​ ++// ++// ++// ``` ++// */ ++// attr(attributeName: string): string | undefined; ++// /** ++// * Insert content, specified by the parameter, before each element in the set of matched elements. ++// * @param contents One or more additional DOM elements, text nodes, arrays of elements and text nodes, HTML strings, or ++// * jQuery objects to insert before each element in the set of matched elements. ++// * @see \`{@link https://api.jquery.com/before/ }\` ++// * @since 1.0 ++// * @example ​ ````Inserts some HTML before all paragraphs. ++// ```html ++// ++// ++// ++// ++// before demo ++// ++// ++// ++// ++// ​ ++//

      is what I said...

      ++// ​ ++// ++// ​ ++// ++// ++// ``` ++// * @example ​ ````Inserts a DOM element before all paragraphs. ++// ```html ++// ++// ++// ++// ++// before demo ++// ++// ++// ++// ++// ​ ++//

      is what I said...

      ++// ​ ++// ++// ​ ++// ++// ++// ``` ++// * @example ​ ````Inserts a jQuery object (similar to an Array of DOM Elements) before all paragraphs. ++// ```html ++// ++// ++// ++// ++// before demo ++// ++// ++// ++// ++// ​ ++//

      is what I said...

      Hello ++// ​ ++// ++// ​ ++// ++// ++// ``` ++// */ ++// before(...contents: Array>>): this; ++// /** ++// * Insert content, specified by the parameter, before each element in the set of matched elements. ++// * @param function_functionーhtml _@param_ `function_functionーhtml` ++// *
      ++// * * `function` — A function that returns an HTML string, DOM element(s), text node(s), or jQuery object to insert ++// * before each element in the set of matched elements. Receives the index position of the element in ++// * the set as an argument. Within the function, `this` refers to the current element in the set.
      ++// * * `functionーhtml` — A function that returns an HTML string, DOM element(s), text node(s), or jQuery object to insert ++// * before each element in the set of matched elements. Receives the index position of the element in ++// * the set and the old HTML value of the element as arguments. Within the function, `this` refers to the ++// * current element in the set. ++// * @see \`{@link https://api.jquery.com/before/ }\` ++// * @since 1.4 ++// * @since 1.10 ++// */ ++// before(function_functionーhtml: (this: TElement, index: number, html: string) => JQuery.htmlString | JQuery.TypeOrArray>): this; ++// // [bind() overloads] https://github.com/jquery/api.jquery.com/issues/1048 ++// /** ++// * Attach a handler to an event for the elements. ++// * @param eventType A string containing one or more DOM event types, such as "click" or "submit," or custom event names. ++// * @param eventData An object containing data that will be passed to the event handler. ++// * @param handler A function to execute each time the event is triggered. ++// * @see \`{@link https://api.jquery.com/bind/ }\` ++// * @since 1.0 ++// * @since 1.4.3 ++// * @deprecated ​ Deprecated since 3.0. Use \`{@link on }\`. ++// * ++// * **Cause**: These event binding methods have been deprecated in favor of the `.on()` and `.off()` methods which can handle both delegated and direct event binding. Although the older methods are still present in jQuery 3.0, they may be removed as early as the next major-version update. ++// * ++// * **Solution**: Change the method call to use `.on()` or `.off()`, the documentation for the old methods include specific instructions. In general, the `.bind()` and `.unbind()` methods can be renamed directly to `.on()` and `.off()` respectively since the argument orders are identical. ++// */ ++// bind( ++// eventType: TType, ++// eventData: TData, ++// handler: JQuery.TypeEventHandler ++// ): this; ++// /** ++// * Attach a handler to an event for the elements. ++// * @param eventType A string containing one or more DOM event types, such as "click" or "submit," or custom event names. ++// * @param handler_preventBubble _@param_ `handler_preventBubble` ++// *
      ++// * * `handler` — A function to execute each time the event is triggered.
      ++// * * `preventBubble` — Setting the third argument to false will attach a function that prevents the default action from ++// * occurring and stops the event from bubbling. The default is `true`. ++// * @see \`{@link https://api.jquery.com/bind/ }\` ++// * @since 1.0 ++// * @since 1.4.3 ++// * @deprecated ​ Deprecated since 3.0. Use \`{@link on }\`. ++// * ++// * **Cause**: These event binding methods have been deprecated in favor of the `.on()` and `.off()` methods which can handle both delegated and direct event binding. Although the older methods are still present in jQuery 3.0, they may be removed as early as the next major-version update. ++// * ++// * **Solution**: Change the method call to use `.on()` or `.off()`, the documentation for the old methods include specific instructions. In general, the `.bind()` and `.unbind()` methods can be renamed directly to `.on()` and `.off()` respectively since the argument orders are identical. ++// * @example ​ ````Handle click and double-click for the paragraph. Note: the coordinates are window relative, so in this case relative to the demo iframe. ++// ```html ++// ++// ++// ++// ++// bind demo ++// ++// ++// ++// ++// ​ ++//

      Click or double click here.

      ++// ++// ​ ++// ++// ​ ++// ++// ++// ``` ++// * @example ​ ````To display each paragraph's text in an alert box whenever it is clicked: ++// ```javascript ++// $( "p" ).bind( "click", function() { ++// alert( $( this ).text() ); ++// }); ++// ``` ++// * @example ​ ````Cancel a default action and prevent it from bubbling up by returning false: ++// ```javascript ++// $( "form" ).bind( "submit", function() { ++// return false; ++// }) ++// ``` ++// * @example ​ ````Cancel only the default action by using the .preventDefault() method. ++// ```javascript ++// $( "form" ).bind( "submit", function( event ) { ++// event.preventDefault(); ++// }); ++// ``` ++// * @example ​ ````Stop an event from bubbling without preventing the default action by using the .stopPropagation() method. ++// ```javascript ++// $( "form" ).bind( "submit", function( event ) { ++// event.stopPropagation(); ++// }); ++// ``` ++// * @example ​ ````Bind custom events. ++// ```html ++// ++// ++// ++// ++// bind demo ++// ++// ++// ++// ++// ​ ++//

      Has an attached custom event.

      ++// ++// ++// ​ ++// ++// ​ ++// ++// ++// ``` ++// */ ++// bind( ++// eventType: TType, ++// handler_preventBubble: JQuery.TypeEventHandler | ++// false | ++// null | ++// undefined ++// ): this; ++// /** ++// * Attach a handler to an event for the elements. ++// * @param events An object containing one or more DOM event types and functions to execute for them. ++// * @see \`{@link https://api.jquery.com/bind/ }\` ++// * @since 1.4 ++// * @deprecated ​ Deprecated since 3.0. Use \`{@link on }\`. ++// * ++// * **Cause**: These event binding methods have been deprecated in favor of the `.on()` and `.off()` methods which can handle both delegated and direct event binding. Although the older methods are still present in jQuery 3.0, they may be removed as early as the next major-version update. ++// * ++// * **Solution**: Change the method call to use `.on()` or `.off()`, the documentation for the old methods include specific instructions. In general, the `.bind()` and `.unbind()` methods can be renamed directly to `.on()` and `.off()` respectively since the argument orders are identical. ++// * @example ​ ````Bind multiple events simultaneously. ++// ```javascript ++// $( "div.test" ).bind({ ++// click: function() { ++// $( this ).addClass( "active" ); ++// }, ++// mouseenter: function() { ++// $( this ).addClass( "inside" ); ++// }, ++// mouseleave: function() { ++// $( this ).removeClass( "inside" ); ++// } ++// }); ++// ``` ++// */ ++// bind(events: JQuery.TypeEventHandlers): this; ++// /** ++// * Bind an event handler to the "blur" JavaScript event, or trigger that event on an element. ++// * @param eventData An object containing data that will be passed to the event handler. ++// * @param handler A function to execute each time the event is triggered. ++// * @see \`{@link https://api.jquery.com/blur/ }\` ++// * @since 1.4.3 ++// * @deprecated ​ Deprecated since 3.3. Use \`{@link on }\` or \`{@link trigger }\`. ++// * ++// * **Cause**: The `.on()` and `.trigger()` methods can set an event handler or generate an event for any event type, and should be used instead of the shortcut methods. This message also applies to the other event shorthands, including: blur, focus, focusin, focusout, resize, scroll, dblclick, mousedown, mouseup, mousemove, mouseover, mouseout, mouseenter, mouseleave, change, select, submit, keydown, keypress, keyup, and contextmenu. ++// * ++// * **Solution**: Instead of `.click(fn)` use `.on("click", fn)`. Instead of `.click()` use `.trigger("click")`. ++// */ ++// blur(eventData: TData, ++// handler: JQuery.TypeEventHandler): this; ++// /** ++// * Bind an event handler to the "blur" JavaScript event, or trigger that event on an element. ++// * @param handler A function to execute each time the event is triggered. ++// * @see \`{@link https://api.jquery.com/blur/ }\` ++// * @since 1.0 ++// * @deprecated ​ Deprecated since 3.3. Use \`{@link on }\` or \`{@link trigger }\`. ++// * ++// * **Cause**: The `.on()` and `.trigger()` methods can set an event handler or generate an event for any event type, and should be used instead of the shortcut methods. This message also applies to the other event shorthands, including: blur, focus, focusin, focusout, resize, scroll, dblclick, mousedown, mouseup, mousemove, mouseover, mouseout, mouseenter, mouseleave, change, select, submit, keydown, keypress, keyup, and contextmenu. ++// * ++// * **Solution**: Instead of `.click(fn)` use `.on("click", fn)`. Instead of `.click()` use `.trigger("click")`. ++// * @example ​ ````To trigger the blur event on all paragraphs: ++// ```javascript ++// $( "p" ).blur(); ++// ``` ++// */ ++// blur(handler?: JQuery.TypeEventHandler | ++// false): this; ++// /** ++// * Bind an event handler to the "change" JavaScript event, or trigger that event on an element. ++// * @param eventData An object containing data that will be passed to the event handler. ++// * @param handler A function to execute each time the event is triggered. ++// * @see \`{@link https://api.jquery.com/change/ }\` ++// * @since 1.4.3 ++// * @deprecated ​ Deprecated since 3.3. Use \`{@link on }\` or \`{@link trigger }\`. ++// * ++// * **Cause**: The `.on()` and `.trigger()` methods can set an event handler or generate an event for any event type, and should be used instead of the shortcut methods. This message also applies to the other event shorthands, including: blur, focus, focusin, focusout, resize, scroll, dblclick, mousedown, mouseup, mousemove, mouseover, mouseout, mouseenter, mouseleave, change, select, submit, keydown, keypress, keyup, and contextmenu. ++// * ++// * **Solution**: Instead of `.click(fn)` use `.on("click", fn)`. Instead of `.click()` use `.trigger("click")`. ++// */ ++// change(eventData: TData, ++// handler: JQuery.TypeEventHandler): this; ++// /** ++// * Bind an event handler to the "change" JavaScript event, or trigger that event on an element. ++// * @param handler A function to execute each time the event is triggered. ++// * @see \`{@link https://api.jquery.com/change/ }\` ++// * @since 1.0 ++// * @deprecated ​ Deprecated since 3.3. Use \`{@link on }\` or \`{@link trigger }\`. ++// * ++// * **Cause**: The `.on()` and `.trigger()` methods can set an event handler or generate an event for any event type, and should be used instead of the shortcut methods. This message also applies to the other event shorthands, including: blur, focus, focusin, focusout, resize, scroll, dblclick, mousedown, mouseup, mousemove, mouseover, mouseout, mouseenter, mouseleave, change, select, submit, keydown, keypress, keyup, and contextmenu. ++// * ++// * **Solution**: Instead of `.click(fn)` use `.on("click", fn)`. Instead of `.click()` use `.trigger("click")`. ++// * @example ​ ````Attaches a change event to the select that gets the text for each selected option and writes them in the div. It then triggers the event for the initial text draw. ++// ```html ++// ++// ++// ++// ++// change demo ++// ++// ++// ++// ++// ​ ++// ++//
      ++// ​ ++// ++// ​ ++// ++// ++// ``` ++// * @example ​ ````To add a validity test to all text input elements: ++// ```javascript ++// $( "input[type='text']" ).change(function() { ++// // Check input( $( this ).val() ) for validity here ++// }); ++// ``` ++// */ ++// change(handler?: JQuery.TypeEventHandler | ++// false): this; ++// /** ++// * Get the children of each element in the set of matched elements, optionally filtered by a selector. ++// * @param selector A string containing a selector expression to match elements against. ++// * @see \`{@link https://api.jquery.com/children/ }\` ++// * @since 1.0 ++// * @example ​ ````Find all children of the clicked element. ++// ```html ++// ++// ++// ++// ++// children demo ++// ++// ++// ++// ++// ​ ++//
      ++//
      ++//

      This is the way we ++// write the demo,

      ++//
      ++// ​ ++//
      ++// write the demo, demo, ++//
      ++// ​ ++//
      ++// This the way we write the demo so ++// in ++//
      ++// ​ ++//

      ++// the morning. ++// Found 0 children in TAG. ++//

      ++//
      ++// ​ ++// ++// ​ ++// ++// ++// ``` ++// * @example ​ ````Find all children of each div. ++// ```html ++// ++// ++// ++// ++// children demo ++// ++// ++// ++// ++// ​ ++//

      Hello (this is a paragraph)

      ++// ​ ++//
      Hello Again (this span is a child of the a div)
      ++//

      And Again (in another paragraph)

      ++// ​ ++//
      And One Last Time (most text directly in a div)
      ++// ​ ++// ++// ​ ++// ++// ++// ``` ++// * @example ​ ````Find all children with a class "selected" of each div. ++// ```html ++// ++// ++// ++// ++// children demo ++// ++// ++// ++// ++// ​ ++//
      ++// Hello ++//

      Hello Again

      ++//
      And Again
      ++//

      And One Last Time

      ++//
      ++// ​ ++// ++// ​ ++// ++// ++// ``` ++// */ ++// children(selector?: JQuery.Selector): this; ++// /** ++// * Remove from the queue all items that have not yet been run. ++// * @param queueName A string containing the name of the queue. Defaults to fx, the standard effects queue. ++// * @see \`{@link https://api.jquery.com/clearQueue/ }\` ++// * @since 1.4 ++// * @example ​ ````Empty the queue. ++// ```html ++// ++// ++// ++// ++// clearQueue demo ++// ++// ++// ++// ++// ​ ++// ++// ++//
      ++// ​ ++// ++// ​ ++// ++// ++// ``` ++// */ ++// clearQueue(queueName?: string): this; ++// /** ++// * Bind an event handler to the "click" JavaScript event, or trigger that event on an element. ++// * @param eventData An object containing data that will be passed to the event handler. ++// * @param handler A function to execute each time the event is triggered. ++// * @see \`{@link https://api.jquery.com/click/ }\` ++// * @since 1.4.3 ++// * @deprecated ​ Deprecated since 3.3. Use \`{@link on }\` or \`{@link trigger }\`. ++// * ++// * **Cause**: The `.on()` and `.trigger()` methods can set an event handler or generate an event for any event type, and should be used instead of the shortcut methods. This message also applies to the other event shorthands, including: blur, focus, focusin, focusout, resize, scroll, dblclick, mousedown, mouseup, mousemove, mouseover, mouseout, mouseenter, mouseleave, change, select, submit, keydown, keypress, keyup, and contextmenu. ++// * ++// * **Solution**: Instead of `.click(fn)` use `.on("click", fn)`. Instead of `.click()` use `.trigger("click")`. ++// */ ++// click(eventData: TData, ++// handler: JQuery.TypeEventHandler): this; ++// /** ++// * Bind an event handler to the "click" JavaScript event, or trigger that event on an element. ++// * @param handler A function to execute each time the event is triggered. ++// * @see \`{@link https://api.jquery.com/click/ }\` ++// * @since 1.0 ++// * @deprecated ​ Deprecated since 3.3. Use \`{@link on }\` or \`{@link trigger }\`. ++// * ++// * **Cause**: The `.on()` and `.trigger()` methods can set an event handler or generate an event for any event type, and should be used instead of the shortcut methods. This message also applies to the other event shorthands, including: blur, focus, focusin, focusout, resize, scroll, dblclick, mousedown, mouseup, mousemove, mouseover, mouseout, mouseenter, mouseleave, change, select, submit, keydown, keypress, keyup, and contextmenu. ++// * ++// * **Solution**: Instead of `.click(fn)` use `.on("click", fn)`. Instead of `.click()` use `.trigger("click")`. ++// * @example ​ ````Hide paragraphs on a page when they are clicked: ++// ```html ++// ++// ++// ++// ++// click demo ++// ++// ++// ++// ++// ​ ++//

      First Paragraph

      ++//

      Second Paragraph

      ++//

      Yet one more Paragraph

      ++// ​ ++// ++// ​ ++// ++// ++// ``` ++// * @example ​ ````Trigger the click event on all of the paragraphs on the page: ++// ```javascript ++// $( "p" ).click(); ++// ``` ++// */ ++// click(handler?: JQuery.TypeEventHandler | ++// false): this; ++// /** ++// * Create a deep copy of the set of matched elements. ++// * @param withDataAndEvents A Boolean indicating whether event handlers and data should be copied along with the elements. The ++// * default value is false. *In jQuery 1.5.0 the default value was incorrectly true; it was changed back ++// * to false in 1.5.1 and up. ++// * @param deepWithDataAndEvents A Boolean indicating whether event handlers and data for all children of the cloned element should ++// * be copied. By default its value matches the first argument's value (which defaults to false). ++// * @see \`{@link https://api.jquery.com/clone/ }\` ++// * @since 1.0 ++// * @since 1.5 ++// * @example ​ ````Clones all b elements (and selects the clones) and prepends them to all paragraphs. ++// ```html ++// ++// ++// ++// ++// clone demo ++// ++// ++// ++// ​ ++// Hello

      , how are you?

      ++// ​ ++// ++// ​ ++// ++// ++// ``` ++// */ ++// clone(withDataAndEvents?: boolean, deepWithDataAndEvents?: boolean): this; ++// /** ++// * For each element in the set, get the first element that matches the selector by testing the element itself and traversing up through its ancestors in the DOM tree. ++// * @param selector A string containing a selector expression to match elements against. ++// * @param context A DOM element within which a matching element may be found. ++// * @see \`{@link https://api.jquery.com/closest/ }\` ++// * @since 1.4 ++// */ ++// closest(selector: JQuery.Selector, context: Element): this; ++// /** ++// * For each element in the set, get the first element that matches the selector by testing the element itself and traversing up through its ancestors in the DOM tree. ++// * @param selector_selection_element _@param_ `selector_selection_element` ++// *
      ++// * * `selector` — A string containing a selector expression to match elements against.
      ++// * * `selection` — A jQuery object to match elements against.
      ++// * * `element` — An element to match elements against. ++// * @see \`{@link https://api.jquery.com/closest/ }\` ++// * @since 1.3 ++// * @since 1.6 ++// * @example ​ ````Show how event delegation can be done with closest. The closest list element toggles a yellow background when it or its descendent is clicked. ++// ```html ++// ++// ++// ++// ++// closest demo ++// ++// ++// ++// ++// ​ ++//
        ++//
      • Click me!
      • ++//
      • You can also Click me!
      • ++//
      ++// ​ ++// ++// ​ ++// ++// ++// ``` ++// * @example ​ ````Pass a jQuery object to closest. The closest list element toggles a yellow background when it or its descendent is clicked. ++// ```html ++// ++// ++// ++// ++// closest demo ++// ++// ++// ++// ++// ​ ++//
        ++//
      • Click me!
      • ++//
      • You can also Click me!
      • ++//
      ++// ​ ++// ++// ​ ++// ++// ++// ``` ++// */ ++// closest(selector_selection_element: JQuery.Selector | Element | JQuery): this; ++// /** ++// * Get the children of each element in the set of matched elements, including text and comment nodes. ++// * @see \`{@link https://api.jquery.com/contents/ }\` ++// * @since 1.2 ++// * @example ​ ````Find all the text nodes inside a paragraph and wrap them with a bold tag. ++// ```html ++// ++// ++// ++// ++// contents demo ++// ++// ++// ++// ​ ++//

      Hello John, how are you doing?

      ++// ​ ++// ++// ​ ++// ++// ++// ``` ++// * @example ​ ````Change the background color of links inside of an iframe. ++// ```html ++// ++// ++// ++// ++// contents demo ++// ++// ++// ++// ​ ++// ++// ​ ++// ++// ​ ++// ++// ++// ``` ++// */ ++// contents(): JQuery; ++// /** ++// * Bind an event handler to the "contextmenu" JavaScript event, or trigger that event on an element. ++// * @param eventData An object containing data that will be passed to the event handler. ++// * @param handler A function to execute each time the event is triggered. ++// * @see \`{@link https://api.jquery.com/contextmenu/ }\` ++// * @since 1.4.3 ++// * @deprecated ​ Deprecated since 3.3. Use \`{@link on }\` or \`{@link trigger }\`. ++// * ++// * **Cause**: The `.on()` and `.trigger()` methods can set an event handler or generate an event for any event type, and should be used instead of the shortcut methods. This message also applies to the other event shorthands, including: blur, focus, focusin, focusout, resize, scroll, dblclick, mousedown, mouseup, mousemove, mouseover, mouseout, mouseenter, mouseleave, change, select, submit, keydown, keypress, keyup, and contextmenu. ++// * ++// * **Solution**: Instead of `.click(fn)` use `.on("click", fn)`. Instead of `.click()` use `.trigger("click")`. ++// */ ++// contextmenu(eventData: TData, ++// handler: JQuery.TypeEventHandler): this; ++// /** ++// * Bind an event handler to the "contextmenu" JavaScript event, or trigger that event on an element. ++// * @param handler A function to execute each time the event is triggered. ++// * @see \`{@link https://api.jquery.com/contextmenu/ }\` ++// * @since 1.0 ++// * @deprecated ​ Deprecated since 3.3. Use \`{@link on }\` or \`{@link trigger }\`. ++// * ++// * **Cause**: The `.on()` and `.trigger()` methods can set an event handler or generate an event for any event type, and should be used instead of the shortcut methods. This message also applies to the other event shorthands, including: blur, focus, focusin, focusout, resize, scroll, dblclick, mousedown, mouseup, mousemove, mouseover, mouseout, mouseenter, mouseleave, change, select, submit, keydown, keypress, keyup, and contextmenu. ++// * ++// * **Solution**: Instead of `.click(fn)` use `.on("click", fn)`. Instead of `.click()` use `.trigger("click")`. ++// * @example ​ ````To show a "Hello World!" alert box when the contextmenu event is triggered on a paragraph on the page: ++// ```javascript ++// $( "p" ).contextmenu(function() { ++// alert( "Hello World!" ); ++// }); ++// ``` ++// * @example ​ ````Right click to toggle background color. ++// ```html ++// ++// ++// ++// ++// contextmenu demo ++// ++// ++// ++// ++// ​ ++//
      ++// Right click the block ++// ​ ++// ++// ​ ++// ++// ++// ``` ++// */ ++// contextmenu(handler?: JQuery.TypeEventHandler | ++// false): this; ++// /** ++// * Set one or more CSS properties for the set of matched elements. ++// * @param propertyName A CSS property name. ++// * @param value_function _@param_ `value_function` ++// *
      ++// * * `value` — A value to set for the property.
      ++// * * `function` — A function returning the value to set. `this` is the current element. Receives the index position of ++// * the element in the set and the old value as arguments. ++// * @see \`{@link https://api.jquery.com/css/ }\` ++// * @since 1.0 ++// * @since 1.4 ++// * @example ​ ````Change the color of any paragraph to red on mouseover event. ++// ```html ++// ++// ++// ++// ++// css demo ++// ++// ++// ++// ++// ​ ++//

      Just roll the mouse over me.

      ++// ​ ++//

      Or me to see a color change.

      ++// ​ ++// ++// ​ ++// ++// ++// ``` ++// * @example ​ ````Increase the width of #box by 200 pixels the first time it is clicked. ++// ```html ++// ++// ++// ++// ++// css demo ++// ++// ++// ++// ++// ​ ++//
      Click me to grow
      ++// ​ ++// ++// ​ ++// ++// ++// ``` ++// * @example ​ ````Highlight a clicked word in the paragraph. ++// ```html ++// ++// ++// ++// ++// css demo ++// ++// ++// ++// ++// ​ ++//

      ++// Once upon a time there was a man ++// who lived in a pizza parlor. This ++// man just loved pizza and ate it all ++// the time. He went on to be the ++// happiest man in the world. The end. ++//

      ++// ​ ++// ++// ​ ++// ++// ++// ``` ++// */ ++// css(propertyName: string, ++// value_function: string | number | ((this: TElement, index: number, value: string) => string | number | void | undefined)): this; ++// /** ++// * Set one or more CSS properties for the set of matched elements. ++// * @param properties An object of property-value pairs to set. ++// * @see \`{@link https://api.jquery.com/css/ }\` ++// * @since 1.0 ++// * @example ​ ````Change the font weight and background color on mouseenter and mouseleave. ++// ```html ++// ++// ++// ++// ++// css demo ++// ++// ++// ++// ++// ​ ++//

      Move the mouse over a paragraph.

      ++//

      Like this one or the one above.

      ++// ​ ++// ++// ​ ++// ++// ++// ``` ++// * @example ​ ````Increase the size of a div when you click it. ++// ```html ++// ++// ++// ++// ++// css demo ++// ++// ++// ++// ++// ​ ++//
      click
      ++//
      click
      ++// ​ ++// ++// ​ ++// ++// ++// ``` ++// */ ++// css(properties: JQuery.PlainObject string | number | void | undefined)>): this; ++// /** ++// * Get the computed style properties for the first element in the set of matched elements. ++// * @param propertyName A CSS property. ++// * @see \`{@link https://api.jquery.com/css/ }\` ++// * @since 1.0 ++// * @example ​ ````Get the background color of a clicked div. ++// ```html ++// ++// ++// ++// ++// css demo ++// ++// ++// ++// ++// ​ ++//   ++//
      ++//
      ++//
      ++//
      ++// ​ ++// ++// ​ ++// ++// ++// ``` ++// */ ++// css(propertyName: string): string; ++// /** ++// * Get the computed style properties for the first element in the set of matched elements. ++// * @param propertyNames An array of one or more CSS properties. ++// * @see \`{@link https://api.jquery.com/css/ }\` ++// * @since 1.9 ++// * @example ​ ````Get the width, height, text color, and background color of a clicked div. ++// ```html ++// ++// ++// ++// ++// css demo ++// ++// ++// ++// ++// ​ ++//

       

      ++//
      1
      ++//
      2
      ++//
      3
      ++//
      4
      ++// ​ ++// ++// ​ ++// ++// ++// ``` ++// */ ++// css(propertyNames: string[]): JQuery.PlainObject; ++// /** ++// * Store arbitrary data associated with the matched elements. ++// * @param key A string naming the piece of data to set. ++// * @param value The new data value; this can be any Javascript type except `undefined`. ++// * @see \`{@link https://api.jquery.com/data/ }\` ++// * @since 1.2.3 ++// * @example ​ ````Store then retrieve a value from the div element. ++// ```html ++// ++// ++// ++// ++// data demo ++// ++// ++// ++// ++// ​ ++//
      ++// The values stored were ++// ++// and ++// ++//
      ++// ​ ++// ++// ​ ++// ++// ++// ``` ++// */ ++// data(key: string, value: string | number | boolean | symbol | object | null): this; ++// /** ++// * Store arbitrary data associated with the matched elements. ++// * @param obj An object of key-value pairs of data to update. ++// * @see \`{@link https://api.jquery.com/data/ }\` ++// * @since 1.4.3 ++// */ ++// data(obj: JQuery.PlainObject): this; ++// /** ++// * Return the value at the named data store for the first element in the jQuery collection, as set by data(name, value) or by an HTML5 data-* attribute. ++// * @param key Name of the data stored. ++// * @param value `undefined` is not recognized as a data value. Calls such as `.data( "name", undefined )` ++// * will return the jQuery object that it was called on, allowing for chaining. ++// * @see \`{@link https://api.jquery.com/data/ }\` ++// * @since 1.2.3 ++// */ ++// // `unified-signatures` is disabled so that behavior when passing `undefined` to `value` can be documented. Unifying the signatures ++// // results in potential confusion for users from an unexpected parameter. ++// // tslint:disable-next-line:unified-signatures ++// data(key: string, value: undefined): any; ++// /** ++// * Return the value at the named data store for the first element in the jQuery collection, as set by data(name, value) or by an HTML5 data-* attribute. ++// * @param key Name of the data stored. ++// * @see \`{@link https://api.jquery.com/data/ }\` ++// * @since 1.2.3 ++// * @example ​ ````Get the data named "blah" stored at for an element. ++// ```html ++// ++// ++// ++// ++// data demo ++// ++// ++// ++// ++// ​ ++//
      A div
      ++// ++// ++// ++// ++//

      The "blah" value of this div is ?

      ++// ​ ++// ++// ​ ++// ++// ++// ``` ++// */ ++// data(key: string): any; ++// /** ++// * Return the value at the named data store for the first element in the jQuery collection, as set by data(name, value) or by an HTML5 data-* attribute. ++// * @see \`{@link https://api.jquery.com/data/ }\` ++// * @since 1.4 ++// */ ++// data(): JQuery.PlainObject; ++// /** ++// * Bind an event handler to the "dblclick" JavaScript event, or trigger that event on an element. ++// * @param eventData An object containing data that will be passed to the event handler. ++// * @param handler A function to execute each time the event is triggered. ++// * @see \`{@link https://api.jquery.com/dblclick/ }\` ++// * @since 1.4.3 ++// * @deprecated ​ Deprecated since 3.3. Use \`{@link on }\` or \`{@link trigger }\`. ++// * ++// * **Cause**: The `.on()` and `.trigger()` methods can set an event handler or generate an event for any event type, and should be used instead of the shortcut methods. This message also applies to the other event shorthands, including: blur, focus, focusin, focusout, resize, scroll, dblclick, mousedown, mouseup, mousemove, mouseover, mouseout, mouseenter, mouseleave, change, select, submit, keydown, keypress, keyup, and contextmenu. ++// * ++// * **Solution**: Instead of `.click(fn)` use `.on("click", fn)`. Instead of `.click()` use `.trigger("click")`. ++// */ ++// dblclick(eventData: TData, ++// handler: JQuery.TypeEventHandler): this; ++// /** ++// * Bind an event handler to the "dblclick" JavaScript event, or trigger that event on an element. ++// * @param handler A function to execute each time the event is triggered. ++// * @see \`{@link https://api.jquery.com/dblclick/ }\` ++// * @since 1.0 ++// * @deprecated ​ Deprecated since 3.3. Use \`{@link on }\` or \`{@link trigger }\`. ++// * ++// * **Cause**: The `.on()` and `.trigger()` methods can set an event handler or generate an event for any event type, and should be used instead of the shortcut methods. This message also applies to the other event shorthands, including: blur, focus, focusin, focusout, resize, scroll, dblclick, mousedown, mouseup, mousemove, mouseover, mouseout, mouseenter, mouseleave, change, select, submit, keydown, keypress, keyup, and contextmenu. ++// * ++// * **Solution**: Instead of `.click(fn)` use `.on("click", fn)`. Instead of `.click()` use `.trigger("click")`. ++// * @example ​ ````To bind a "Hello World!" alert box to the dblclick event on every paragraph on the page: ++// ```javascript ++// $( "p" ).dblclick(function() { ++// alert( "Hello World!" ); ++// }); ++// ``` ++// * @example ​ ````Double click to toggle background color. ++// ```html ++// ++// ++// ++// ++// dblclick demo ++// ++// ++// ++// ++// ​ ++//
      ++// Double click the block ++// ​ ++// ++// ​ ++// ++// ++// ``` ++// */ ++// dblclick(handler?: JQuery.TypeEventHandler | ++// false): this; ++// /** ++// * Set a timer to delay execution of subsequent items in the queue. ++// * @param duration An integer indicating the number of milliseconds to delay execution of the next item in the queue. ++// * @param queueName A string containing the name of the queue. Defaults to fx, the standard effects queue. ++// * @see \`{@link https://api.jquery.com/delay/ }\` ++// * @since 1.4 ++// * @example ​ ````Animate the hiding and showing of two divs, delaying the first before showing it. ++// ```html ++// ++// ++// ++// ++// delay demo ++// ++// ++// ++// ++// ​ ++//

      ++//
      ++//
      ++// ​ ++// ++// ​ ++// ++// ++// ``` ++// */ ++// delay(duration: JQuery.Duration, queueName?: string): this; ++// /** ++// * Attach a handler to one or more events for all elements that match the selector, now or in the future, based on a specific set of root elements. ++// * @param selector A selector to filter the elements that trigger the event. ++// * @param eventType A string containing one or more space-separated JavaScript event types, such as "click" or ++// * "keydown," or custom event names. ++// * @param eventData An object containing data that will be passed to the event handler. ++// * @param handler A function to execute each time the event is triggered. ++// * @see \`{@link https://api.jquery.com/delegate/ }\` ++// * @since 1.4.2 ++// * @deprecated ​ Deprecated since 3.0. Use \`{@link on }\`. ++// * ++// * **Cause**: These event binding methods have been deprecated in favor of the `.on()` and `.off()` methods which can handle both delegated and direct event binding. Although the older methods are still present in jQuery 3.0, they may be removed as early as the next major-version update. ++// * ++// * **Solution**: Change the method call to use `.on()` or `.off()`, the documentation for the old methods include specific instructions. In general, the `.bind()` and `.unbind()` methods can be renamed directly to `.on()` and `.off()` respectively since the argument orders are identical. ++// */ ++// delegate( ++// selector: JQuery.Selector, ++// eventType: TType, ++// eventData: TData, ++// handler: JQuery.TypeEventHandler ++// ): this; ++// /** ++// * Attach a handler to one or more events for all elements that match the selector, now or in the future, based on a specific set of root elements. ++// * @param selector A selector to filter the elements that trigger the event. ++// * @param eventType A string containing one or more space-separated JavaScript event types, such as "click" or ++// * "keydown," or custom event names. ++// * @param handler A function to execute each time the event is triggered. ++// * @see \`{@link https://api.jquery.com/delegate/ }\` ++// * @since 1.4.2 ++// * @deprecated ​ Deprecated since 3.0. Use \`{@link on }\`. ++// * ++// * **Cause**: These event binding methods have been deprecated in favor of the `.on()` and `.off()` methods which can handle both delegated and direct event binding. Although the older methods are still present in jQuery 3.0, they may be removed as early as the next major-version update. ++// * ++// * **Solution**: Change the method call to use `.on()` or `.off()`, the documentation for the old methods include specific instructions. In general, the `.bind()` and `.unbind()` methods can be renamed directly to `.on()` and `.off()` respectively since the argument orders are identical. ++// * @example ​ ````Click a paragraph to add another. Note that .delegate() attaches a click event handler to all paragraphs - even new ones. ++// ```html ++// ++// ++// ++// ++// delegate demo ++// ++// ++// ++// ++// ​ ++//

      Click me!

      ++// ​ ++// ++// ​ ++// ++// ​ ++// ++// ++// ``` ++// * @example ​ ````To display each paragraph's text in an alert box whenever it is clicked: ++// ```javascript ++// $( "body" ).delegate( "p", "click", function() { ++// alert( $( this ).text() ); ++// }); ++// ``` ++// * @example ​ ````To cancel a default action and prevent it from bubbling up, return false: ++// ```javascript ++// $( "body" ).delegate( "a", "click", function() { ++// return false; ++// }); ++// ``` ++// * @example ​ ````To cancel only the default action by using the preventDefault method. ++// ```javascript ++// $( "body" ).delegate( "a", "click", function( event ) { ++// event.preventDefault(); ++// }); ++// ``` ++// * @example ​ ````Can bind custom events too. ++// ```html ++// ++// ++// ++// ++// delegate demo ++// ++// ++// ++// ++// ​ ++//

      Has an attached custom event.

      ++// ++// ++// ​ ++// ++// ​ ++// ++// ++// ``` ++// */ ++// delegate( ++// selector: JQuery.Selector, ++// eventType: TType, ++// handler: JQuery.TypeEventHandler | ++// false ++// ): this; ++// /** ++// * Attach a handler to one or more events for all elements that match the selector, now or in the future, based on a specific set of root elements. ++// * @param selector A selector to filter the elements that trigger the event. ++// * @param events A plain object of one or more event types and functions to execute for them. ++// * @see \`{@link https://api.jquery.com/delegate/ }\` ++// * @since 1.4.3 ++// * @deprecated ​ Deprecated since 3.0. Use \`{@link on }\`. ++// * ++// * **Cause**: These event binding methods have been deprecated in favor of the `.on()` and `.off()` methods which can handle both delegated and direct event binding. Although the older methods are still present in jQuery 3.0, they may be removed as early as the next major-version update. ++// * ++// * **Solution**: Change the method call to use `.on()` or `.off()`, the documentation for the old methods include specific instructions. In general, the `.bind()` and `.unbind()` methods can be renamed directly to `.on()` and `.off()` respectively since the argument orders are identical. ++// */ ++// delegate(selector: JQuery.Selector, ++// events: JQuery.TypeEventHandlers ++// ): this; ++// /** ++// * Execute the next function on the queue for the matched elements. ++// * @param queueName A string containing the name of the queue. Defaults to fx, the standard effects queue. ++// * @see \`{@link https://api.jquery.com/dequeue/ }\` ++// * @since 1.2 ++// * @example ​ ````Use dequeue to end a custom queue function which allows the queue to keep going. ++// ```html ++// ++// ++// ++// ++// dequeue demo ++// ++// ++// ++// ++// ​ ++// ++//
      ++// ​ ++// ++// ​ ++// ++// ++// ``` ++// */ ++// dequeue(queueName?: string): this; ++// /** ++// * Remove the set of matched elements from the DOM. ++// * @param selector A selector expression that filters the set of matched elements to be removed. ++// * @see \`{@link https://api.jquery.com/detach/ }\` ++// * @since 1.4 ++// * @example ​ ````Detach all paragraphs from the DOM ++// ```html ++// ++// ++// ++// ++// detach demo ++// ++// ++// ++// ++// ​ ++//

      Hello

      ++// how are ++//

      you?

      ++// ++// ​ ++// ++// ​ ++// ++// ++// ``` ++// */ ++// detach(selector?: JQuery.Selector): this; ++// /** ++// * Iterate over a jQuery object, executing a function for each matched element. ++// * @param funсtion A function to execute for each matched element. ++// * @see \`{@link https://api.jquery.com/each/ }\` ++// * @since 1.0 ++// * @example ​ ````Iterate over three divs and sets their color property. ++// ```html ++// ++// ++// ++// ++// each demo ++// ++// ++// ++// ++// ​ ++//
      Click here
      ++//
      to iterate through
      ++//
      these divs.
      ++// ​ ++// ++// ​ ++// ++// ++// ``` ++// * @example ​ ````To access a jQuery object instead of the regular DOM element, use $( this ). For example: ++// ```html ++// ++// ++// ++// ++// each demo ++// ++// ++// ++// ++// ​ ++// To do list: (click here to change) ++//
        ++//
      • Eat
      • ++//
      • Sleep
      • ++//
      • Be merry
      • ++//
      ++// ​ ++// ++// ​ ++// ++// ++// ``` ++// * @example ​ ````Use return false to break out of each() loops early. ++// ```html ++// ++// ++// ++// ++// each demo ++// ++// ++// ++// ++// ​ ++// ++// ++//
      ++//
      ++//
      ++//
      ++//
      Stop here
      ++//
      ++//
      ++//
      ++// ​ ++// ++// ​ ++// ++// ++// ``` ++// */ ++// each(funсtion: (this: TElement, index: number, element: TElement) => void | false): this; ++// /** ++// * Remove all child nodes of the set of matched elements from the DOM. ++// * @see \`{@link https://api.jquery.com/empty/ }\` ++// * @since 1.0 ++// * @example ​ ````Removes all child nodes (including text nodes) from all paragraphs ++// ```html ++// ++// ++// ++// ++// empty demo ++// ++// ++// ++// ++// ​ ++//

      ++// Hello, Person and person. ++//

      ++// ​ ++// ++// ​ ++// ++// ​ ++// ++// ++// ``` ++// */ ++// empty(): this; ++// /** ++// * End the most recent filtering operation in the current chain and return the set of matched elements to its previous state. ++// * @see \`{@link https://api.jquery.com/end/ }\` ++// * @since 1.0 ++// * @example ​ ````Selects all paragraphs, finds span elements inside these, and reverts the selection back to the paragraphs. ++// ```html ++// ++// ++// ++// ++// end demo ++// ++// ++// ++// ++// ​ ++//

      ++// Hi there how are you doing? ++//

      ++// ​ ++//

      ++// This span is one of ++// several spans in this ++// sentence. ++//

      ++// ​ ++//
      ++// Tags in jQuery object initially: ++//
      ++// ​ ++//
      ++// Tags in jQuery object after find: ++//
      ++// ​ ++//
      ++// Tags in jQuery object after end: ++//
      ++// ​ ++// ++// ​ ++// ++// ++// ``` ++// * @example ​ ````Selects all paragraphs, finds span elements inside these, and reverts the selection back to the paragraphs. ++// ```html ++// ++// ++// ++// ++// end demo ++// ++// ++// ++// ++// ​ ++//

      Hello, how are you?

      ++// ​ ++// ++// ​ ++// ++// ++// ``` ++// */ ++// end(): this; ++// /** ++// * Reduce the set of matched elements to the one at the specified index. ++// * @param index An integer indicating the 0-based position of the element. ++// * An integer indicating the position of the element, counting backwards from the last element in the set. ++// * @see \`{@link https://api.jquery.com/eq/ }\` ++// * @since 1.1.2 ++// * @since 1.4 ++// * @example ​ ````Turn the div with index 2 blue by adding an appropriate class. ++// ```html ++// ++// ++// ++// ++// eq demo ++// ++// ++// ++// ++// ​ ++//
      ++//
      ++//
      ++//
      ++//
      ++//
      ++// ​ ++// ++// ​ ++// ++// ++// ``` ++// */ ++// eq(index: number): this; ++// /** ++// * Merge the contents of an object onto the jQuery prototype to provide new jQuery instance methods. ++// * @param obj An object to merge onto the jQuery prototype. ++// * @see \`{@link https://api.jquery.com/jQuery.fn.extend/ }\` ++// * @since 1.0 ++// * @example ​ ````Add two methods to the jQuery prototype ($.fn) object and then use one of them. ++// ```html ++// ++// ++// ++// ++// jQuery.fn.extend demo ++// ++// ++// ++// ++// ​ ++// ++// ++// ​ ++// ++// ​ ++// ++// ++// ``` ++// */ ++// extend(obj: object): this; ++// /** ++// * Display the matched elements by fading them to opaque. ++// * @param duration A string or number determining how long the animation will run. ++// * @param easing A string indicating which easing function to use for the transition. ++// * @param complete A function to call once the animation is complete, called once per matched element. ++// * @see \`{@link https://api.jquery.com/fadeIn/ }\` ++// * @since 1.4.3 ++// */ ++// fadeIn(duration: JQuery.Duration, easing: string, complete?: (this: TElement) => void): this; ++// /** ++// * Display the matched elements by fading them to opaque. ++// * @param duration_easing _@param_ `duration_easing` ++// *
      ++// * * `duration` — A string or number determining how long the animation will run.
      ++// * * `easing` — A string indicating which easing function to use for the transition. ++// * @param complete A function to call once the animation is complete, called once per matched element. ++// * @see \`{@link https://api.jquery.com/fadeIn/ }\` ++// * @since 1.0 ++// * @since 1.4.3 ++// * @example ​ ````Fades a red block in over the text. Once the animation is done, it quickly fades in more text on top. ++// ```html ++// ++// ++// ++// ++// fadeIn demo ++// ++// ++// ++// ++// ​ ++//

      ++// Let it be known that the party of the first part ++// and the party of the second part are henceforth ++// and hereto directed to assess the allegations ++// for factual correctness... (click!) ++//

      CENSORED!
      ++//

      ++// ​ ++// ++// ​ ++// ++// ++// ``` ++// */ ++// fadeIn(duration_easing: JQuery.Duration | string, complete: (this: TElement) => void): this; ++// /** ++// * Display the matched elements by fading them to opaque. ++// * @param duration_easing_complete_options _@param_ `duration_easing_complete_options` ++// *
      ++// * * `duration` — A string or number determining how long the animation will run.
      ++// * * `easing` — A string indicating which easing function to use for the transition.
      ++// * * `complete` — A function to call once the animation is complete, called once per matched element.
      ++// * * `options` — A map of additional options to pass to the method. ++// * @see \`{@link https://api.jquery.com/fadeIn/ }\` ++// * @since 1.0 ++// * @since 1.4.3 ++// * @example ​ ````Animates hidden divs to fade in one by one, completing each animation within 600 milliseconds. ++// ```html ++// ++// ++// ++// ++// fadeIn demo ++// ++// ++// ++// ++// ​ ++// Click here... ++//
      ++//
      ++//
      ++// ​ ++// ++// ​ ++// ++// ++// ``` ++// */ ++// fadeIn(duration_easing_complete_options?: JQuery.Duration | string | ((this: TElement) => void) | JQuery.EffectsOptions): this; ++// /** ++// * Hide the matched elements by fading them to transparent. ++// * @param duration A string or number determining how long the animation will run. ++// * @param easing A string indicating which easing function to use for the transition. ++// * @param complete A function to call once the animation is complete, called once per matched element. ++// * @see \`{@link https://api.jquery.com/fadeOut/ }\` ++// * @since 1.4.3 ++// * @example ​ ````Fades out two divs, one with a "linear" easing and one with the default, "swing," easing. ++// ```html ++// ++// ++// ++// ++// fadeOut demo ++// ++// ++// ++// ++// ​ ++// ++// ++// ​ ++//
      ++// ​ ++//
      linear
      ++//
      swing
      ++// ​ ++// ++// ​ ++// ++// ++// ``` ++// */ ++// fadeOut(duration: JQuery.Duration, easing: string, complete?: (this: TElement) => void): this; ++// /** ++// * Hide the matched elements by fading them to transparent. ++// * @param duration_easing _@param_ `duration_easing` ++// *
      ++// * * `duration` — A string or number determining how long the animation will run.
      ++// * * `easing` — A string indicating which easing function to use for the transition. ++// * @param complete A function to call once the animation is complete, called once per matched element. ++// * @see \`{@link https://api.jquery.com/fadeOut/ }\` ++// * @since 1.0 ++// * @since 1.4.3 ++// * @example ​ ````Fades out spans in one section that you click on. ++// ```html ++// ++// ++// ++// ++// fadeOut demo ++// ++// ++// ++// ++// ​ ++//

      Find the modifiers -

      ++//

      ++// If you really want to go outside ++// in the cold then make sure to wear ++// your warm jacket given to you by ++// your favorite teacher. ++//

      ++// ​ ++// ++// ​ ++// ++// ++// ``` ++// */ ++// fadeOut(duration_easing: JQuery.Duration | string, complete: (this: TElement) => void): this; ++// /** ++// * Hide the matched elements by fading them to transparent. ++// * @param duration_easing_complete_options _@param_ `duration_easing_complete_options` ++// *
      ++// * * `duration` — A string or number determining how long the animation will run.
      ++// * * `easing` — A string indicating which easing function to use for the transition.
      ++// * * `complete` — A function to call once the animation is complete, called once per matched element.
      ++// * * `options` — A map of additional options to pass to the method. ++// * @see \`{@link https://api.jquery.com/fadeOut/ }\` ++// * @since 1.0 ++// * @since 1.4.3 ++// * @example ​ ````Animates all paragraphs to fade out, completing the animation within 600 milliseconds. ++// ```html ++// ++// ++// ++// ++// fadeOut demo ++// ++// ++// ++// ++// ​ ++//

      ++// If you click on this paragraph ++// you'll see it just fade away. ++//

      ++// ​ ++// ++// ​ ++// ++// ++// ``` ++// */ ++// fadeOut(duration_easing_complete_options?: JQuery.Duration | string | ((this: TElement) => void) | JQuery.EffectsOptions): this; ++// /** ++// * Adjust the opacity of the matched elements. ++// * @param duration A string or number determining how long the animation will run. ++// * @param opacity A number between 0 and 1 denoting the target opacity. ++// * @param easing A string indicating which easing function to use for the transition. ++// * @param complete A function to call once the animation is complete, called once per matched element. ++// * @see \`{@link https://api.jquery.com/fadeTo/ }\` ++// * @since 1.4.3 ++// */ ++// fadeTo(duration: JQuery.Duration, opacity: number, easing: string, complete?: (this: TElement) => void): this; ++// /** ++// * Adjust the opacity of the matched elements. ++// * @param duration A string or number determining how long the animation will run. ++// * @param opacity A number between 0 and 1 denoting the target opacity. ++// * @param complete A function to call once the animation is complete, called once per matched element. ++// * @see \`{@link https://api.jquery.com/fadeTo/ }\` ++// * @since 1.0 ++// * @example ​ ````Animates first paragraph to fade to an opacity of 0.33 (33%, about one third visible), completing the animation within 600 milliseconds. ++// ```html ++// ++// ++// ++// ++// fadeTo demo ++// ++// ++// ++// ​ ++//

      ++// Click this paragraph to see it fade. ++//

      ++// ​ ++//

      ++// Compare to this one that won't fade. ++//

      ++// ​ ++// ++// ​ ++// ++// ++// ``` ++// * @example ​ ````Fade div to a random opacity on each click, completing the animation within 200 milliseconds. ++// ```html ++// ++// ++// ++// ++// fadeTo demo ++// ++// ++// ++// ++// ​ ++//

      And this is the library that John built...

      ++// ​ ++//
      ++//
      ++//
      ++// ​ ++// ++// ​ ++// ++// ++// ``` ++// * @example ​ ````Find the right answer! The fade will take 250 milliseconds and change various styles when it completes. ++// ```html ++// ++// ++// ++// ++// fadeTo demo ++// ++// ++// ++// ++// ​ ++//

      Wrong

      ++//
      ++//

      Wrong

      ++//
      ++//

      Right!

      ++//
      ++// ​ ++// ++// ​ ++// ++// ++// ``` ++// */ ++// fadeTo(duration: JQuery.Duration, opacity: number, complete?: (this: TElement) => void): this; ++// /** ++// * Display or hide the matched elements by animating their opacity. ++// * @param duration A string or number determining how long the animation will run. ++// * @param easing A string indicating which easing function to use for the transition. ++// * @param complete A function to call once the animation is complete, called once per matched element. ++// * @see \`{@link https://api.jquery.com/fadeToggle/ }\` ++// * @since 1.4.4 ++// * @example ​ ````Fades first paragraph in or out, completing the animation within 600 milliseconds and using a linear easing. Fades last paragraph in or out for 200 milliseconds, inserting a "finished" message upon completion. ++// ```html ++// ++// ++// ++// ++// fadeToggle demo ++// ++// ++// ++// ​ ++// ++// ++//

      This paragraph has a slow, linear fade.

      ++//

      This paragraph has a fast animation.

      ++//
      ++// ​ ++// ++// ​ ++// ++// ++// ``` ++// */ ++// fadeToggle(duration: JQuery.Duration, easing: string, complete?: (this: TElement) => void): this; ++// /** ++// * Display or hide the matched elements by animating their opacity. ++// * @param duration_easing _@param_ `duration_easing` ++// *
      ++// * * `duration` — A string or number determining how long the animation will run.
      ++// * * `easing` — A string indicating which easing function to use for the transition. ++// * @param complete A function to call once the animation is complete, called once per matched element. ++// * @see \`{@link https://api.jquery.com/fadeToggle/ }\` ++// * @since 1.0 ++// * @since 1.4.3 ++// * @example ​ ````Fades first paragraph in or out, completing the animation within 600 milliseconds and using a linear easing. Fades last paragraph in or out for 200 milliseconds, inserting a "finished" message upon completion. ++// ```html ++// ++// ++// ++// ++// fadeToggle demo ++// ++// ++// ++// ​ ++// ++// ++//

      This paragraph has a slow, linear fade.

      ++//

      This paragraph has a fast animation.

      ++//
      ++// ​ ++// ++// ​ ++// ++// ++// ``` ++// */ ++// fadeToggle(duration_easing: JQuery.Duration | string, complete: (this: TElement) => void): this; ++// /** ++// * Display or hide the matched elements by animating their opacity. ++// * @param duration_easing_complete_options _@param_ `duration_easing_complete_options` ++// *
      ++// * * `duration` — A string or number determining how long the animation will run.
      ++// * * `easing` — A string indicating which easing function to use for the transition.
      ++// * * `complete` — A function to call once the animation is complete, called once per matched element.
      ++// * * `options` — A map of additional options to pass to the method. ++// * @see \`{@link https://api.jquery.com/fadeToggle/ }\` ++// * @since 1.0 ++// * @since 1.4.3 ++// */ ++// fadeToggle(duration_easing_complete_options?: JQuery.Duration | string | ((this: TElement) => void) | JQuery.EffectsOptions): this; ++// /** ++// * Reduce the set of matched elements to those that match the selector or pass the function's test. ++// * @param selector_elements_selection_function _@param_ `selector_elements_selection_function` ++// *
      ++// * * `selector` — A string containing a selector expression to match the current set of elements against.
      ++// * * `elements` — One or more DOM elements to match the current set of elements against.
      ++// * * `selection` — An existing jQuery object to match the current set of elements against.
      ++// * * `function` — A function used as a test for each element in the set. this is the current DOM element. ++// * @see \`{@link https://api.jquery.com/filter/ }\` ++// * @since 1.0 ++// * @since 1.4 ++// * @example ​ ````Change the color of all divs; then add a border to those with a "middle" class. ++// ```html ++// ++// ++// ++// ++// filter demo ++// ++// ++// ++// ++// ​ ++//
      ++//
      ++//
      ++//
      ++//
      ++//
      ++// ​ ++// ++// ​ ++// ++// ++// ``` ++// * @example ​ ````Change the color of all divs; then add a border to the second one (index == 1) and the div with an id of "fourth." ++// ```html ++// ++// ++// ++// ++// filter demo ++// ++// ++// ++// ++// ​ ++//
      ++//
      ++//
      ++//
      ++//
      ++//
      ++// ​ ++// ++// ​ ++// ++// ++// ``` ++// * @example ​ ````Select all divs and filter the selection with a DOM element, keeping only the one with an id of "unique". ++// ```javascript ++// $( "div" ).filter( document.getElementById( "unique" ) ); ++// ``` ++// * @example ​ ````Select all divs and filter the selection with a jQuery object, keeping only the one with an id of "unique". ++// ```javascript ++// $( "div" ).filter( $( "#unique" ) ); ++// ``` ++// */ ++// filter(selector_elements_selection_function: ++// JQuery.Selector | ++// JQuery.TypeOrArray | ++// JQuery | ++// ((this: TElement, index: number, element: TElement) => boolean) ++// ): this; ++// /** ++// * Get the descendants of each element in the current set of matched elements, filtered by a selector, jQuery object, or element. ++// * @param selector_element _@param_ `selector_element` ++// *
      ++// * * `selector` — A string containing a selector expression to match elements against.
      ++// * * `element` — An element or a jQuery object to match elements against. ++// * @see \`{@link https://api.jquery.com/find/ }\` ++// * @since 1.0 ++// * @since 1.6 ++// * @example ​ ````Starts with all paragraphs and searches for descendant span elements, same as $( "p span" ) ++// ```html ++// ++// ++// ++// ++// find demo ++// ++// ++// ++// ​ ++//

      Hello, how are you?

      ++//

      Me? I'm good.

      ++// ​ ++// ++// ​ ++// ++// ++// ``` ++// * @example ​ ````A selection using a jQuery collection of all span tags. Only spans within p tags are changed to red while others are left blue. ++// ```html ++// ++// ++// ++// ++// find demo ++// ++// ++// ++// ++// ​ ++//

      Hello, how are you?

      ++//

      Me? I'm good.

      ++//
      Did you eat yet?
      ++// ​ ++// ++// ​ ++// ++// ++// ``` ++// * @example ​ ````Add spans around each word then add a hover and italicize words with the letter t. ++// ```html ++// ++// ++// ++// ++// find demo ++// ++// ++// ++// ++// ​ ++//

      ++// When the day is short ++// find that which matters to you ++// or stop believing ++//

      ++// ​ ++// ++// ​ ++// ++// ++// ``` ++// */ ++// find(selector_element: JQuery.Selector | Element | JQuery): this; ++// /** ++// * Stop the currently-running animation, remove all queued animations, and complete all animations for the matched elements. ++// * @param queue The name of the queue in which to stop animations. ++// * @see \`{@link https://api.jquery.com/finish/ }\` ++// * @since 1.9 ++// * @example ​ ````Click the Go button once to start the animation, and then click the other buttons to see how they affect the current and queued animations. ++// ```html ++// ++// ++// ++// ++// finish demo ++// ++// ++// ++// ++// ​ ++//
      ++//
      ++// ++//
      ++// ++// ++//
      ++// ++// ++//
      ++// ++// ++//
      ++// ++//
      ++// ++//
      ++// ​ ++// ++// ​ ++// ++// ++// ``` ++// */ ++// finish(queue?: string): this; ++// /** ++// * Reduce the set of matched elements to the first in the set. ++// * @see \`{@link https://api.jquery.com/first/ }\` ++// * @since 1.4 ++// * @example ​ ````Highlight the first span in a paragraph. ++// ```html ++// ++// ++// ++// ++// first demo ++// ++// ++// ++// ++// ​ ++//

      ++// Look: ++// This is some text in a paragraph. ++// This is a note about it. ++//

      ++// ​ ++// ++// ​ ++// ++// ++// ``` ++// */ ++// first(): this; ++// /** ++// * Bind an event handler to the "focus" JavaScript event, or trigger that event on an element. ++// * @param eventData An object containing data that will be passed to the event handler. ++// * @param handler A function to execute each time the event is triggered. ++// * @see \`{@link https://api.jquery.com/focus/ }\` ++// * @since 1.4.3 ++// * @deprecated ​ Deprecated since 3.3. Use \`{@link on }\` or \`{@link trigger }\`. ++// * ++// * **Cause**: The `.on()` and `.trigger()` methods can set an event handler or generate an event for any event type, and should be used instead of the shortcut methods. This message also applies to the other event shorthands, including: blur, focus, focusin, focusout, resize, scroll, dblclick, mousedown, mouseup, mousemove, mouseover, mouseout, mouseenter, mouseleave, change, select, submit, keydown, keypress, keyup, and contextmenu. ++// * ++// * **Solution**: Instead of `.click(fn)` use `.on("click", fn)`. Instead of `.click()` use `.trigger("click")`. ++// */ ++// focus(eventData: TData, ++// handler: JQuery.TypeEventHandler): this; ++// /** ++// * Bind an event handler to the "focus" JavaScript event, or trigger that event on an element. ++// * @param handler A function to execute each time the event is triggered. ++// * @see \`{@link https://api.jquery.com/focus/ }\` ++// * @since 1.0 ++// * @deprecated ​ Deprecated since 3.3. Use \`{@link on }\` or \`{@link trigger }\`. ++// * ++// * **Cause**: The `.on()` and `.trigger()` methods can set an event handler or generate an event for any event type, and should be used instead of the shortcut methods. This message also applies to the other event shorthands, including: blur, focus, focusin, focusout, resize, scroll, dblclick, mousedown, mouseup, mousemove, mouseover, mouseout, mouseenter, mouseleave, change, select, submit, keydown, keypress, keyup, and contextmenu. ++// * ++// * **Solution**: Instead of `.click(fn)` use `.on("click", fn)`. Instead of `.click()` use `.trigger("click")`. ++// * @example ​ ````Fire focus. ++// ```html ++// ++// ++// ++// ++// focus demo ++// ++// ++// ++// ++// ​ ++//

      focus fire

      ++//

      focus fire

      ++// ​ ++// ++// ​ ++// ++// ++// ``` ++// * @example ​ ````To stop people from writing in text input boxes, try: ++// ```javascript ++// $( "input[type=text]" ).focus(function() { ++// $( this ).blur(); ++// }); ++// ``` ++// * @example ​ ````To focus on a login input box with id 'login' on page startup, try: ++// ```javascript ++// $( document ).ready(function() { ++// $( "#login" ).focus(); ++// }); ++// ``` ++// */ ++// focus(handler?: JQuery.TypeEventHandler | ++// false): this; ++// /** ++// * Bind an event handler to the "focusin" event. ++// * @param eventData An object containing data that will be passed to the event handler. ++// * @param handler A function to execute each time the event is triggered. ++// * @see \`{@link https://api.jquery.com/focusin/ }\` ++// * @since 1.4.3 ++// * @deprecated ​ Deprecated since 3.3. Use \`{@link on }\` or \`{@link trigger }\`. ++// * ++// * **Cause**: The `.on()` and `.trigger()` methods can set an event handler or generate an event for any event type, and should be used instead of the shortcut methods. This message also applies to the other event shorthands, including: blur, focus, focusin, focusout, resize, scroll, dblclick, mousedown, mouseup, mousemove, mouseover, mouseout, mouseenter, mouseleave, change, select, submit, keydown, keypress, keyup, and contextmenu. ++// * ++// * **Solution**: Instead of `.click(fn)` use `.on("click", fn)`. Instead of `.click()` use `.trigger("click")`. ++// */ ++// focusin(eventData: TData, ++// handler: JQuery.TypeEventHandler): this; ++// /** ++// * Bind an event handler to the "focusin" event. ++// * @param handler A function to execute each time the event is triggered. ++// * @see \`{@link https://api.jquery.com/focusin/ }\` ++// * @since 1.4 ++// * @deprecated ​ Deprecated since 3.3. Use \`{@link on }\` or \`{@link trigger }\`. ++// * ++// * **Cause**: The `.on()` and `.trigger()` methods can set an event handler or generate an event for any event type, and should be used instead of the shortcut methods. This message also applies to the other event shorthands, including: blur, focus, focusin, focusout, resize, scroll, dblclick, mousedown, mouseup, mousemove, mouseover, mouseout, mouseenter, mouseleave, change, select, submit, keydown, keypress, keyup, and contextmenu. ++// * ++// * **Solution**: Instead of `.click(fn)` use `.on("click", fn)`. Instead of `.click()` use `.trigger("click")`. ++// * @example ​ ````Watch for a focus to occur within the paragraphs on the page. ++// ```html ++// ++// ++// ++// ++// focusin demo ++// ++// ++// ++// ++// ​ ++//

      focusin fire

      ++//

      focusin fire

      ++// ​ ++// ++// ​ ++// ++// ++// ``` ++// */ ++// focusin(handler?: JQuery.TypeEventHandler | ++// false): this; ++// /** ++// * Bind an event handler to the "focusout" JavaScript event. ++// * @param eventData An object containing data that will be passed to the event handler. ++// * @param handler A function to execute each time the event is triggered. ++// * @see \`{@link https://api.jquery.com/focusout/ }\` ++// * @since 1.4.3 ++// * @deprecated ​ Deprecated since 3.3. Use \`{@link on }\` or \`{@link trigger }\`. ++// * ++// * **Cause**: The `.on()` and `.trigger()` methods can set an event handler or generate an event for any event type, and should be used instead of the shortcut methods. This message also applies to the other event shorthands, including: blur, focus, focusin, focusout, resize, scroll, dblclick, mousedown, mouseup, mousemove, mouseover, mouseout, mouseenter, mouseleave, change, select, submit, keydown, keypress, keyup, and contextmenu. ++// * ++// * **Solution**: Instead of `.click(fn)` use `.on("click", fn)`. Instead of `.click()` use `.trigger("click")`. ++// */ ++// focusout(eventData: TData, ++// handler: JQuery.TypeEventHandler): this; ++// /** ++// * Bind an event handler to the "focusout" JavaScript event. ++// * @param handler A function to execute each time the event is triggered. ++// * @see \`{@link https://api.jquery.com/focusout/ }\` ++// * @since 1.4 ++// * @deprecated ​ Deprecated since 3.3. Use \`{@link on }\` or \`{@link trigger }\`. ++// * ++// * **Cause**: The `.on()` and `.trigger()` methods can set an event handler or generate an event for any event type, and should be used instead of the shortcut methods. This message also applies to the other event shorthands, including: blur, focus, focusin, focusout, resize, scroll, dblclick, mousedown, mouseup, mousemove, mouseover, mouseout, mouseenter, mouseleave, change, select, submit, keydown, keypress, keyup, and contextmenu. ++// * ++// * **Solution**: Instead of `.click(fn)` use `.on("click", fn)`. Instead of `.click()` use `.trigger("click")`. ++// * @example ​ ````Watch for a loss of focus to occur inside paragraphs and note the difference between the focusout count and the blur count. (The blur count does not change because those events do not bubble.) ++// ```html ++// ++// ++// ++// ++// focusout demo ++// ++// ++// ++// ++// ​ ++//
      ++//

      ++//
      ++// ++//

      ++//

      ++// ++//

      ++//
      ++//
      focusout fire
      ++//
      blur fire
      ++// ​ ++// ++// ​ ++// ++// ++// ``` ++// */ ++// focusout(handler?: JQuery.TypeEventHandler | ++// false): this; ++// /** ++// * Retrieve one of the elements matched by the jQuery object. ++// * @param index A zero-based integer indicating which element to retrieve. ++// * @see \`{@link https://api.jquery.com/get/ }\` ++// * @since 1.0 ++// * @example ​ ````Display the tag name of the click element. ++// ```html ++// ++// ++// ++// ++// get demo ++// ++// ++// ++// ++// ​ ++//   ++//

      In this paragraph is an important section

      ++//
      ++// ​ ++// ++// ​ ++// ++// ++// ``` ++// */ ++// get(index: number): TElement; ++// /** ++// * Retrieve the elements matched by the jQuery object. ++// * @see \`{@link https://api.jquery.com/get/ }\` ++// * @since 1.0 ++// * @example ​ ````Select all divs in the document and return the DOM Elements as an Array; then use the built-in reverse() method to reverse that array. ++// ```html ++// ++// ++// ++// ++// get demo ++// ++// ++// ++// ++// ​ ++// Reversed - ++// ​ ++//
      One
      ++//
      Two
      ++//
      Three
      ++// ​ ++// ++// ​ ++// ++// ++// ``` ++// */ ++// get(): TElement[]; ++// /** ++// * Reduce the set of matched elements to those that have a descendant that matches the selector or DOM element. ++// * @param selector_contained _@param_ `selector_contained` ++// *
      ++// * * `selector` — A string containing a selector expression to match elements against.
      ++// * * `contained` — A DOM element to match elements against. ++// * @see \`{@link https://api.jquery.com/has/ }\` ++// * @since 1.4 ++// * @example ​ ````Check if an element is inside another. ++// ```html ++// ++// ++// ++// ++// has demo ++// ++// ++// ++// ++// ​ ++//
      • Does the UL contain an LI?
      ++// ​ ++// ++// ​ ++// ++// ++// ``` ++// */ ++// has(selector_contained: string | Element): this; ++// /** ++// * Determine whether any of the matched elements are assigned the given class. ++// * @param className The class name to search for. ++// * @see \`{@link https://api.jquery.com/hasClass/ }\` ++// * @since 1.2 ++// * @example ​ ````Looks for the paragraph that contains 'selected' as a class. ++// ```html ++// ++// ++// ++// ++// hasClass demo ++// ++// ++// ++// ++// ​ ++//

      This paragraph is black and is the first paragraph.

      ++//

      This paragraph is red and is the second paragraph.

      ++//
      First paragraph has selected class:
      ++//
      Second paragraph has selected class:
      ++//
      At least one paragraph has selected class:
      ++// ​ ++// ++// ​ ++// ++// ++// ``` ++// */ ++// hasClass(className: string): boolean; ++// /** ++// * Set the CSS height of every matched element. ++// * @param value_function _@param_ `value_function` ++// *
      ++// * * `value` — An integer representing the number of pixels, or an integer with an optional unit of measure ++// * appended (as a string).
      ++// * * `function` — A function returning the height to set. Receives the index position of the element in the set and ++// * the old height as arguments. Within the function, `this` refers to the current element in the set. ++// * @see \`{@link https://api.jquery.com/height/ }\` ++// * @since 1.0 ++// * @since 1.4.1 ++// * @example ​ ````To set the height of each div on click to 30px plus a color change. ++// ```html ++// ++// ++// ++// ++// height demo ++// ++// ++// ++// ++// ​ ++//
      ++//
      ++//
      ++//
      ++//
      ++// ​ ++// ++// ​ ++// ++// ++// ``` ++// */ ++// height(value_function: string | number | ((this: TElement, index: number, height: number) => string | number)): this; ++// /** ++// * Get the current computed height for the first element in the set of matched elements. ++// * @see \`{@link https://api.jquery.com/height/ }\` ++// * @since 1.0 ++// * @example ​ ````Show various heights. Note the values are from the iframe so might be smaller than you expected. The yellow highlight shows the iframe body. ++// ```html ++// ++// ++// ++// ++// height demo ++// ++// ++// ++// ++// ​ ++// ++// ++// ++// ​ ++//
       
      ++//

      ++// Sample paragraph to test height ++//

      ++// ​ ++// ++// ​ ++// ++// ++// ``` ++// */ ++// height(): number | undefined; ++// /** ++// * Hide the matched elements. ++// * @param duration A string or number determining how long the animation will run. ++// * @param easing A string indicating which easing function to use for the transition. ++// * @param complete A function to call once the animation is complete, called once per matched element. ++// * @see \`{@link https://api.jquery.com/hide/ }\` ++// * @since 1.4.3 ++// */ ++// hide(duration: JQuery.Duration, easing: string, complete: (this: TElement) => void): this; ++// /** ++// * Hide the matched elements. ++// * @param duration A string or number determining how long the animation will run. ++// * @param easing_complete _@param_ `easing_complete` ++// *
      ++// * * `easing` — A string indicating which easing function to use for the transition.
      ++// * * `complete` — A function to call once the animation is complete, called once per matched element. ++// * @see \`{@link https://api.jquery.com/hide/ }\` ++// * @since 1.0 ++// * @since 1.4.3 ++// * @example ​ ````Animates all spans (words in this case) to hide fastly, completing each animation within 200 milliseconds. Once each animation is done, it starts the next one. ++// ```html ++// ++// ++// ++// ++// hide demo ++// ++// ++// ++// ++// ​ ++// ++// ++//
      ++// Once upon a ++// time there were ++// three programmers... ++//
      ++// ​ ++// ++// ​ ++// ++// ++// ``` ++// * @example ​ ````Hides the divs when clicked over 2 seconds, then removes the div element when its hidden. Try clicking on more than one box at a time. ++// ```html ++// ++// ++// ++// ++// hide demo ++// ++// ++// ++// ++// ​ ++//
      ++// ​ ++// ++// ​ ++// ++// ++// ``` ++// */ ++// hide(duration: JQuery.Duration, easing_complete: string | ((this: TElement) => void)): this; ++// /** ++// * Hide the matched elements. ++// * @param duration_complete_options _@param_ `duration_complete_options` ++// *
      ++// * * `duration` — A string or number determining how long the animation will run.
      ++// * * `complete` — A function to call once the animation is complete, called once per matched element.
      ++// * * `options` — A map of additional options to pass to the method. ++// * @see \`{@link https://api.jquery.com/hide/ }\` ++// * @since 1.0 ++// * @example ​ ````Hides all paragraphs then the link on click. ++// ```html ++// ++// ++// ++// ++// hide demo ++// ++// ++// ++// ​ ++//

      Hello

      ++// Click to hide me too ++//

      Here is another paragraph

      ++// ​ ++// ++// ​ ++// ++// ++// ``` ++// * @example ​ ````Animates all shown paragraphs to hide slowly, completing the animation within 600 milliseconds. ++// ```html ++// ++// ++// ++// ++// hide demo ++// ++// ++// ++// ++// ​ ++// ++//

      Hiya

      ++//

      Such interesting text, eh?

      ++// ​ ++// ++// ​ ++// ++// ++// ``` ++// */ ++// hide(duration_complete_options?: JQuery.Duration | ((this: TElement) => void) | JQuery.EffectsOptions): this; ++// /** ++// * Bind two handlers to the matched elements, to be executed when the mouse pointer enters and leaves the elements. ++// * @param handlerIn A function to execute when the mouse pointer enters the element. ++// * @param handlerOut A function to execute when the mouse pointer leaves the element. ++// * @see \`{@link https://api.jquery.com/hover/ }\` ++// * @since 1.0 ++// * @deprecated ​ Deprecated. ++// * ++// * **Cause**: The `.hover()` method is a shorthand for the use of the `mouseover`/`mouseout` events. It is often a poor user interface choice because it does not allow for any small amounts of delay between when the mouse enters or exits an area and when the event fires. This can make it quite difficult to use with UI widgets such as drop-down menus. For more information on the problems of hovering, see the \`{@link http://cherne.net/brian/resources/jquery.hoverIntent.html hoverIntent plugin}\`. ++// * ++// * **Solution**: Review uses of `.hover()` to determine if they are appropriate, and consider use of plugins such as `hoverIntent` as an alternative. The direct replacement for `.hover(fn1, fn2)`, is `.on("mouseenter", fn1).on("mouseleave", fn2)`. ++// * @example ​ ````To add a special style to list items that are being hovered over, try: ++// ```html ++// ++// ++// ++// ++// hover demo ++// ++// ++// ++// ++// ​ ++//
        ++//
      • Milk
      • ++//
      • Bread
      • ++//
      • Chips
      • ++//
      • Socks
      • ++//
      ++// ​ ++// ++// ​ ++// ++// ++// ``` ++// * @example ​ ````To add a special style to table cells that are being hovered over, try: ++// ```javascript ++// $( "td" ).hover( ++// function() { ++// $( this ).addClass( "hover" ); ++// }, function() { ++// $( this ).removeClass( "hover" ); ++// } ++// ); ++// ``` ++// * @example ​ ````To unbind the above example use: ++// ```javascript ++// $( "td" ).off( "mouseenter mouseleave" ); ++// ``` ++// */ ++// hover(handlerIn: JQuery.TypeEventHandler | ++// false, ++// handlerOut: JQuery.TypeEventHandler | ++// false): this; ++// /** ++// * Bind a single handler to the matched elements, to be executed when the mouse pointer enters or leaves the elements. ++// * @param handlerInOut A function to execute when the mouse pointer enters or leaves the element. ++// * @see \`{@link https://api.jquery.com/hover/ }\` ++// * @since 1.4 ++// * @deprecated ​ Deprecated. ++// * ++// * **Cause**: The `.hover()` method is a shorthand for the use of the `mouseover`/`mouseout` events. It is often a poor user interface choice because it does not allow for any small amounts of delay between when the mouse enters or exits an area and when the event fires. This can make it quite difficult to use with UI widgets such as drop-down menus. For more information on the problems of hovering, see the \`{@link http://cherne.net/brian/resources/jquery.hoverIntent.html hoverIntent plugin}\`. ++// * ++// * **Solution**: Review uses of `.hover()` to determine if they are appropriate, and consider use of plugins such as `hoverIntent` as an alternative. The direct replacement for `.hover(fn1, fn2)`, is `.on("mouseenter", fn1).on("mouseleave", fn2)`. ++// * @example ​ ````Slide the next sibling LI up or down on hover, and toggle a class. ++// ```html ++// ++// ++// ++// ++// hover demo ++// ++// ++// ++// ++// ​ ++//
        ++//
      • Milk
      • ++//
      • White
      • ++//
      • Carrots
      • ++//
      • Orange
      • ++//
      • Broccoli
      • ++//
      • Green
      • ++//
      ++// ​ ++// ++// ​ ++// ++// ++// ``` ++// */ ++// hover(handlerInOut: JQuery.TypeEventHandler | ++// false): this; ++// /** ++// * Set the HTML contents of each element in the set of matched elements. ++// * @param htmlString_function _@param_ `htmlString_function` ++// *
      ++// * * `htmlString` — A string of HTML to set as the content of each matched element.
      ++// * * `function` — A function returning the HTML content to set. Receives the index position of the element in the set ++// * and the old HTML value as arguments. jQuery empties the element before calling the function; use the ++// * oldhtml argument to reference the previous content. Within the function, `this` refers to the current ++// * element in the set. ++// * @see \`{@link https://api.jquery.com/html/ }\` ++// * @since 1.0 ++// * @since 1.4 ++// * @example ​ ````Add some html to each div. ++// ```html ++// ++// ++// ++// ++// html demo ++// ++// ++// ++// ++// ​ ++// Hello ++//
      ++//
      ++//
      ++// ​ ++// ++// ​ ++// ++// ++// ``` ++// * @example ​ ````Add some html to each div then immediately do further manipulations to the inserted html. ++// ```html ++// ++// ++// ++// ++// html demo ++// ++// ++// ++// ++// ​ ++//
      ++//
      ++//
      ++// ​ ++// ++// ​ ++// ++// ++// ``` ++// */ ++// html(htmlString_function: JQuery.htmlString | ++// JQuery.Node | ++// ((this: TElement, index: number, oldhtml: JQuery.htmlString) => JQuery.htmlString | JQuery.Node)): this; ++// /** ++// * Get the HTML contents of the first element in the set of matched elements. ++// * @see \`{@link https://api.jquery.com/html/ }\` ++// * @since 1.0 ++// * @example ​ ````Click a paragraph to convert it from html to text. ++// ```html ++// ++// ++// ++// ++// html demo ++// ++// ++// ++// ++// ​ ++//

      ++// Click to change the html ++//

      ++//

      ++// to a text node. ++//

      ++//

      ++// This does nothing. ++//

      ++// ​ ++// ++// ​ ++// ++// ++// ``` ++// */ ++// html(): string; ++// /** ++// * Search for a given element from among the matched elements. ++// * @param selector_element _@param_ `selector_element` ++// *
      ++// * * `selector` — A selector representing a jQuery collection in which to look for an element.
      ++// * * `element` — The DOM element or first element within the jQuery object to look for. ++// * @see \`{@link https://api.jquery.com/index/ }\` ++// * @since 1.0 ++// * @since 1.4 ++// * @example ​ ````On click, returns the index (zero-based) of that div in the page. ++// ```html ++// ++// ++// ++// ++// index demo ++// ++// ++// ++// ++// ​ ++// Click a div! ++//
      First div
      ++//
      Second div
      ++//
      Third div
      ++// ​ ++// ++// ​ ++// ++// ++// ``` ++// * @example ​ ````Returns the index for the element with ID bar. ++// ```html ++// ++// ++// ++// ++// index demo ++// ++// ++// ++// ++// ​ ++//
        ++//
      • foo
      • ++//
      • bar
      • ++//
      • baz
      • ++//
      ++//
      ++// ​ ++// ++// ​ ++// ++// ++// ``` ++// * @example ​ ````Returns the index for the first item in the jQuery collection. ++// ```html ++// ++// ++// ++// ++// index demo ++// ++// ++// ++// ++// ​ ++//
        ++//
      • foo
      • ++//
      • bar
      • ++//
      • baz
      • ++//
      ++//
      ++// ​ ++// ++// ​ ++// ++// ++// ``` ++// * @example ​ ````Returns the index for the element with ID bar in relation to all <li> elements. ++// ```html ++// ++// ++// ++// ++// index demo ++// ++// ++// ++// ++// ​ ++//
        ++//
      • foo
      • ++//
      • bar
      • ++//
      • baz
      • ++//
      ++//
      ++// ​ ++// ++// ​ ++// ++// ++// ``` ++// * @example ​ ````Returns the index for the element with ID bar in relation to its siblings. ++// ```html ++// ++// ++// ++// ++// index demo ++// ++// ++// ++// ++// ​ ++//
        ++//
      • foo
      • ++//
      • bar
      • ++//
      • baz
      • ++//
      ++//
      ++// ​ ++// ++// ​ ++// ++// ++// ``` ++// * @example ​ ````Returns -1, as there is no element with ID foobar. ++// ```html ++// ++// ++// ++// ++// index demo ++// ++// ++// ++// ++// ​ ++//
        ++//
      • foo
      • ++//
      • bar
      • ++//
      • baz
      • ++//
      ++//
      ++// ​ ++// ++// ​ ++// ++// ++// ``` ++// */ ++// index(selector_element?: JQuery.Selector | Element | JQuery): number; ++// /** ++// * Set the CSS inner height of each element in the set of matched elements. ++// * @param value_function _@param_ `value_function` ++// *
      ++// * * `value` — A number representing the number of pixels, or a number along with an optional unit of measure ++// * appended (as a string).
      ++// * * `function` — A function returning the inner height (including padding but not border) to set. Receives the index ++// * position of the element in the set and the old inner height as arguments. Within the function, `this` ++// * refers to the current element in the set. ++// * @see \`{@link https://api.jquery.com/innerHeight/ }\` ++// * @since 1.8.0 ++// * @example ​ ````Change the inner height of each div the first time it is clicked (and change its color). ++// ```html ++// ++// ++// ++// ++// innerHeight demo ++// ++// ++// ++// ++// ​ ++//
      d
      ++//
      d
      ++//
      d
      ++//
      d
      ++//
      d
      ++// ​ ++// ++// ​ ++// ++// ++// ``` ++// */ ++// innerHeight(value_function: string | number | ((this: TElement, index: number, height: number) => string | number)): this; ++// /** ++// * Get the current computed height for the first element in the set of matched elements, including padding but not border. ++// * @see \`{@link https://api.jquery.com/innerHeight/ }\` ++// * @since 1.2.6 ++// * @example ​ ````Get the innerHeight of a paragraph. ++// ```html ++// ++// ++// ++// ++// innerHeight demo ++// ++// ++// ++// ++// ​ ++//

      Hello

      ++//

      ++// ​ ++// ++// ​ ++// ++// ++// ``` ++// */ ++// innerHeight(): number | undefined; ++// /** ++// * Set the CSS inner width of each element in the set of matched elements. ++// * @param value_function _@param_ `value_function` ++// *
      ++// * * `value` — A number representing the number of pixels, or a number along with an optional unit of measure ++// * appended (as a string).
      ++// * * `function` — A function returning the inner width (including padding but not border) to set. Receives the index ++// * position of the element in the set and the old inner width as arguments. Within the function, `this` ++// * refers to the current element in the set. ++// * @see \`{@link https://api.jquery.com/innerWidth/ }\` ++// * @since 1.8.0 ++// * @example ​ ````Change the inner width of each div the first time it is clicked (and change its color). ++// ```html ++// ++// ++// ++// ++// innerWidth demo ++// ++// ++// ++// ++// ​ ++//
      d
      ++//
      d
      ++//
      d
      ++//
      d
      ++//
      d
      ++// ​ ++// ++// ​ ++// ++// ++// ``` ++// */ ++// innerWidth(value_function: string | number | ((this: TElement, index: number, width: number) => string | number)): this; ++// /** ++// * Get the current computed inner width for the first element in the set of matched elements, including padding but not border. ++// * @see \`{@link https://api.jquery.com/innerWidth/ }\` ++// * @since 1.2.6 ++// * @example ​ ````Get the innerWidth of a paragraph. ++// ```html ++// ++// ++// ++// ++// innerWidth demo ++// ++// ++// ++// ++// ​ ++//

      Hello

      ++//

      ++// ​ ++// ++// ​ ++// ++// ++// ``` ++// */ ++// innerWidth(): number | undefined; ++// /** ++// * Insert every element in the set of matched elements after the target. ++// * @param target A selector, element, array of elements, HTML string, or jQuery object; the matched set of elements ++// * will be inserted after the element(s) specified by this parameter. ++// * @see \`{@link https://api.jquery.com/insertAfter/ }\` ++// * @since 1.0 ++// * @example ​ ````Insert all paragraphs after an element with id of "foo". Same as $( "#foo" ).after( "p" ) ++// ```html ++// ++// ++// ++// ++// insertAfter demo ++// ++// ++// ++// ++// ​ ++//

      is what I said...

      ++//
      FOO!
      ++// ​ ++// ++// ​ ++// ++// ++// ``` ++// */ ++// insertAfter(target: JQuery.Selector | JQuery.htmlString | JQuery.TypeOrArray | JQuery): this; ++// /** ++// * Insert every element in the set of matched elements before the target. ++// * @param target A selector, element, array of elements, HTML string, or jQuery object; the matched set of elements ++// * will be inserted before the element(s) specified by this parameter. ++// * @see \`{@link https://api.jquery.com/insertBefore/ }\` ++// * @since 1.0 ++// * @example ​ ````Insert all paragraphs before an element with id of "foo". Same as $( "#foo" ).before( "p" ) ++// ```html ++// ++// ++// ++// ++// insertBefore demo ++// ++// ++// ++// ++// ​ ++//
      FOO!
      ++//

      I would like to say:

      ++// ​ ++// ++// ​ ++// ++// ++// ``` ++// */ ++// insertBefore(target: JQuery.Selector | JQuery.htmlString | JQuery.TypeOrArray | JQuery): this; ++// /** ++// * Check the current matched set of elements against a selector, element, or jQuery object and return true if at least one of these elements matches the given arguments. ++// * @param selector_function_selection_elements _@param_ `selector_function_selection_elements` ++// *
      ++// * * `selector` — A string containing a selector expression to match elements against.
      ++// * * `function` — A function used as a test for every element in the set. It accepts two arguments, `index`, which is ++// * the element's index in the jQuery collection, and `element`, which is the DOM element. Within the ++// * function, `this` refers to the current DOM element.
      ++// * * `selection` — An existing jQuery object to match the current set of elements against.
      ++// * * `elements` — One or more elements to match the current set of elements against. ++// * @see \`{@link https://api.jquery.com/is/ }\` ++// * @since 1.0 ++// * @since 1.6 ++// * @example ​ ````Shows a few ways is() can be used inside an event handler. ++// ```html ++// ++// ++// ++// ++// is demo ++// ++// ++// ++// ++// ​ ++//
      ++//
      ++//
      ++//
      ++//

      Peter
      ++//
      ++//

       

      ++// ​ ++// ++// ​ ++// ++// ++// ``` ++// * @example ​ ````Returns true, because the parent of the input is a form element. ++// ```html ++// ++// ++// ++// ++// is demo ++// ++// ++// ++// ++// ​ ++//
      ++// ++//
      ++//
      ++// ​ ++// ++// ​ ++// ++// ++// ``` ++// * @example ​ ````Returns false, because the parent of the input is a p element. ++// ```html ++// ++// ++// ++// ++// is demo ++// ++// ++// ++// ++// ​ ++//
      ++//

      ++//
      ++//
      ++// ​ ++// ++// ​ ++// ++// ++// ``` ++// * @example ​ ````Checks against an existing collection of alternating list elements. Blue, alternating list elements slide up while others turn red. ++// ```html ++// ++// ++// ++// ++// is demo ++// ++// ++// ++// ++// ​ ++//
        ++//
      • Chrome
      • ++//
      • Safari
      • ++//
      • Firefox
      • ++//
      • Opera
      • ++//
      ++// ​ ++// ++// ​ ++// ++// ++// ``` ++// * @example ​ ````An alternate way to achieve the above example using an element rather than a jQuery object. Checks against an existing collection of alternating list elements. Blue, alternating list elements slide up while others turn red. ++// ```html ++// ++// ++// ++// ++// is demo ++// ++// ++// ++// ++// ​ ++//
        ++//
      • Chrome
      • ++//
      • Safari
      • ++//
      • Firefox
      • ++//
      • Opera
      • ++//
      ++// ​ ++// ++// ​ ++// ++// ++// ``` ++// */ ++// is(selector_function_selection_elements: JQuery.Selector | JQuery.TypeOrArray | JQuery | ((this: TElement, index: number, element: TElement) => boolean)): boolean; ++// /** ++// * Bind an event handler to the "keydown" JavaScript event, or trigger that event on an element. ++// * @param eventData An object containing data that will be passed to the event handler. ++// * @param handler A function to execute each time the event is triggered. ++// * @see \`{@link https://api.jquery.com/keydown/ }\` ++// * @since 1.4.3 ++// * @deprecated ​ Deprecated since 3.3. Use \`{@link on }\` or \`{@link trigger }\`. ++// * ++// * **Cause**: The `.on()` and `.trigger()` methods can set an event handler or generate an event for any event type, and should be used instead of the shortcut methods. This message also applies to the other event shorthands, including: blur, focus, focusin, focusout, resize, scroll, dblclick, mousedown, mouseup, mousemove, mouseover, mouseout, mouseenter, mouseleave, change, select, submit, keydown, keypress, keyup, and contextmenu. ++// * ++// * **Solution**: Instead of `.click(fn)` use `.on("click", fn)`. Instead of `.click()` use `.trigger("click")`. ++// */ ++// keydown(eventData: TData, ++// handler: JQuery.TypeEventHandler): this; ++// /** ++// * Bind an event handler to the "keydown" JavaScript event, or trigger that event on an element. ++// * @param handler A function to execute each time the event is triggered. ++// * @see \`{@link https://api.jquery.com/keydown/ }\` ++// * @since 1.0 ++// * @deprecated ​ Deprecated since 3.3. Use \`{@link on }\` or \`{@link trigger }\`. ++// * ++// * **Cause**: The `.on()` and `.trigger()` methods can set an event handler or generate an event for any event type, and should be used instead of the shortcut methods. This message also applies to the other event shorthands, including: blur, focus, focusin, focusout, resize, scroll, dblclick, mousedown, mouseup, mousemove, mouseover, mouseout, mouseenter, mouseleave, change, select, submit, keydown, keypress, keyup, and contextmenu. ++// * ++// * **Solution**: Instead of `.click(fn)` use `.on("click", fn)`. Instead of `.click()` use `.trigger("click")`. ++// * @example ​ ````Show the event object for the keydown handler when a key is pressed in the input. ++// ```html ++// ++// ++// ++// ++// keydown demo ++// ++// ++// ++// ++// ​ ++//
      ++//
      ++// ++// ++//
      ++//
      ++// ++// ++// ​ ++// ++// ​ ++// ++// ++// ``` ++// */ ++// keydown(handler?: JQuery.TypeEventHandler | ++// false): this; ++// /** ++// * Bind an event handler to the "keypress" JavaScript event, or trigger that event on an element. ++// * @param eventData An object containing data that will be passed to the event handler. ++// * @param handler A function to execute each time the event is triggered. ++// * @see \`{@link https://api.jquery.com/keypress/ }\` ++// * @since 1.4.3 ++// * @deprecated ​ Deprecated since 3.3. Use \`{@link on }\` or \`{@link trigger }\`. ++// * ++// * **Cause**: The `.on()` and `.trigger()` methods can set an event handler or generate an event for any event type, and should be used instead of the shortcut methods. This message also applies to the other event shorthands, including: blur, focus, focusin, focusout, resize, scroll, dblclick, mousedown, mouseup, mousemove, mouseover, mouseout, mouseenter, mouseleave, change, select, submit, keydown, keypress, keyup, and contextmenu. ++// * ++// * **Solution**: Instead of `.click(fn)` use `.on("click", fn)`. Instead of `.click()` use `.trigger("click")`. ++// */ ++// keypress(eventData: TData, ++// handler: JQuery.TypeEventHandler): this; ++// /** ++// * Bind an event handler to the "keypress" JavaScript event, or trigger that event on an element. ++// * @param handler A function to execute each time the event is triggered. ++// * @see \`{@link https://api.jquery.com/keypress/ }\` ++// * @since 1.0 ++// * @deprecated ​ Deprecated since 3.3. Use \`{@link on }\` or \`{@link trigger }\`. ++// * ++// * **Cause**: The `.on()` and `.trigger()` methods can set an event handler or generate an event for any event type, and should be used instead of the shortcut methods. This message also applies to the other event shorthands, including: blur, focus, focusin, focusout, resize, scroll, dblclick, mousedown, mouseup, mousemove, mouseover, mouseout, mouseenter, mouseleave, change, select, submit, keydown, keypress, keyup, and contextmenu. ++// * ++// * **Solution**: Instead of `.click(fn)` use `.on("click", fn)`. Instead of `.click()` use `.trigger("click")`. ++// * @example ​ ````Show the event object when a key is pressed in the input. Note: This demo relies on a simple $.print() plugin (https://api.jquery.com/resources/events.js) for the event object's output. ++// ```html ++// ++// ++// ++// ++// keypress demo ++// ++// ++// ++// ++// ​ ++//
      ++//
      ++// ++// ++//
      ++//
      ++// ++// ++// ​ ++// ++// ​ ++// ++// ++// ``` ++// */ ++// keypress(handler?: JQuery.TypeEventHandler | ++// false): this; ++// /** ++// * Bind an event handler to the "keyup" JavaScript event, or trigger that event on an element. ++// * @param eventData An object containing data that will be passed to the event handler. ++// * @param handler A function to execute each time the event is triggered. ++// * @see \`{@link https://api.jquery.com/keyup/ }\` ++// * @since 1.4.3 ++// * @deprecated ​ Deprecated since 3.3. Use \`{@link on }\` or \`{@link trigger }\`. ++// * ++// * **Cause**: The `.on()` and `.trigger()` methods can set an event handler or generate an event for any event type, and should be used instead of the shortcut methods. This message also applies to the other event shorthands, including: blur, focus, focusin, focusout, resize, scroll, dblclick, mousedown, mouseup, mousemove, mouseover, mouseout, mouseenter, mouseleave, change, select, submit, keydown, keypress, keyup, and contextmenu. ++// * ++// * **Solution**: Instead of `.click(fn)` use `.on("click", fn)`. Instead of `.click()` use `.trigger("click")`. ++// */ ++// keyup(eventData: TData, ++// handler: JQuery.TypeEventHandler): this; ++// /** ++// * Bind an event handler to the "keyup" JavaScript event, or trigger that event on an element. ++// * @param handler A function to execute each time the event is triggered. ++// * @see \`{@link https://api.jquery.com/keyup/ }\` ++// * @since 1.0 ++// * @deprecated ​ Deprecated since 3.3. Use \`{@link on }\` or \`{@link trigger }\`. ++// * ++// * **Cause**: The `.on()` and `.trigger()` methods can set an event handler or generate an event for any event type, and should be used instead of the shortcut methods. This message also applies to the other event shorthands, including: blur, focus, focusin, focusout, resize, scroll, dblclick, mousedown, mouseup, mousemove, mouseover, mouseout, mouseenter, mouseleave, change, select, submit, keydown, keypress, keyup, and contextmenu. ++// * ++// * **Solution**: Instead of `.click(fn)` use `.on("click", fn)`. Instead of `.click()` use `.trigger("click")`. ++// * @example ​ ````Show the event object for the keyup handler (using a simple $.print plugin) when a key is released in the input. ++// ```html ++// ++// ++// ++// ++// keyup demo ++// ++// ++// ++// ++// ​ ++//
      ++//
      ++// ++// ++//
      ++//
      ++// ++// ++// ​ ++// ++// ​ ++// ++// ++// ``` ++// */ ++// keyup(handler?: JQuery.TypeEventHandler | ++// false): this; ++// /** ++// * Reduce the set of matched elements to the final one in the set. ++// * @see \`{@link https://api.jquery.com/last/ }\` ++// * @since 1.4 ++// * @example ​ ````Highlight the last span in a paragraph. ++// ```html ++// ++// ++// ++// ++// last demo ++// ++// ++// ++// ++// ​ ++//

      Look: This is some text in a paragraph. This is a note about it.

      ++// ​ ++// ++// ​ ++// ++// ++// ``` ++// */ ++// last(): this; ++// /** ++// * Load data from the server and place the returned HTML into the matched element. ++// * @param url A string containing the URL to which the request is sent. ++// * @param data A plain object or string that is sent to the server with the request. ++// * @param complete A callback function that is executed when the request completes. ++// * @see \`{@link https://api.jquery.com/load/ }\` ++// * @since 1.0 ++// * @example ​ ````Same as above, but will POST the additional parameters to the server and a callback that is executed when the server is finished responding. ++// ```javascript ++// $( "#feeds" ).load( "feeds.php", { limit: 25 }, function() { ++// alert( "The last 25 entries in the feed have been loaded" ); ++// }); ++// ``` ++// */ ++// load(url: string, ++// data: string | JQuery.PlainObject, ++// complete: (this: TElement, responseText: string, textStatus: JQuery.Ajax.TextStatus, jqXHR: JQuery.jqXHR) => void): this; ++// /** ++// * Load data from the server and place the returned HTML into the matched element. ++// * @param url A string containing the URL to which the request is sent. ++// * @param complete_data _@param_ `complete_data` ++// *
      ++// * * `complete` — A callback function that is executed when the request completes.
      ++// * * `data` — A plain object or string that is sent to the server with the request. ++// * @see \`{@link https://api.jquery.com/load/ }\` ++// * @since 1.0 ++// * @example ​ ````Load another page's list items into an ordered list. ++// ```html ++// ++// ++// ++// ++// load demo ++// ++// ++// ++// ++// ​ ++// Projects: ++//
        ++// ​ ++// ++// ​ ++// ++// ++// ``` ++// * @example ​ ````Display a notice if the Ajax request encounters an error. ++// ```html ++// ++// ++// ++// ++// load demo ++// ++// ++// ++// ++// ​ ++// Successful Response (should be blank): ++//
        ++// Error Response: ++//
        ++// ​ ++// ++// ​ ++// ++// ++// ``` ++// * @example ​ ````Load the feeds.html file into the div with the ID of feeds. ++// ```javascript ++// $( "#feeds" ).load( "feeds.html" ); ++// ``` ++// * @example ​ ````pass arrays of data to the server. ++// ```javascript ++// $( "#objectID" ).load( "test.php", { "choices[]": [ "Jon", "Susan" ] } ); ++// ``` ++// */ ++// load(url: string, ++// complete_data?: ((this: TElement, responseText: string, textStatus: JQuery.Ajax.TextStatus, jqXHR: JQuery.jqXHR) => void) | string | JQuery.PlainObject): this; ++// /** ++// * Pass each element in the current matched set through a function, producing a new jQuery object containing the return values. ++// * @param callback A function object that will be invoked for each element in the current set. ++// * @see \`{@link https://api.jquery.com/map/ }\` ++// * @since 1.2 ++// * @example ​ ````Build a list of all the values within a form. ++// ```html ++// ++// ++// ++// ++// map demo ++// ++// ++// ++// ++// ​ ++//

        Values:

        ++//
        ++// ++// ++// ++//
        ++// ​ ++// ++// ​ ++// ++// ++// ``` ++// * @example ​ ````A contrived example to show some functionality. ++// ```html ++// ++// ++// ++// ++// map demo ++// ++// ++// ++// ++// ​ ++//
          ++//
        • First
        • ++//
        • Second
        • ++//
        • Third
        • ++//
        • Fourth
        • ++//
        • Fifth
        • ++//
        ++//
          ++//
        ++// ​ ++// ++// ​ ++// ++// ++// ``` ++// * @example ​ ````Equalize the heights of the divs. ++// ```html ++// ++// ++// ++// ++// map demo ++// ++// ++// ++// ++// ​ ++// ++//
        ++//
        ++//
        ++// ​ ++// ++// ​ ++// ++// ++// ``` ++// */ ++// map(callback: (this: TElement, index: number, domElement: TElement) => JQuery.TypeOrArray | null | undefined): JQuery; ++// /** ++// * Bind an event handler to the "mousedown" JavaScript event, or trigger that event on an element. ++// * @param eventData An object containing data that will be passed to the event handler. ++// * @param handler A function to execute each time the event is triggered. ++// * @see \`{@link https://api.jquery.com/mousedown/ }\` ++// * @since 1.4.3 ++// * @deprecated ​ Deprecated since 3.3. Use \`{@link on }\` or \`{@link trigger }\`. ++// * ++// * **Cause**: The `.on()` and `.trigger()` methods can set an event handler or generate an event for any event type, and should be used instead of the shortcut methods. This message also applies to the other event shorthands, including: blur, focus, focusin, focusout, resize, scroll, dblclick, mousedown, mouseup, mousemove, mouseover, mouseout, mouseenter, mouseleave, change, select, submit, keydown, keypress, keyup, and contextmenu. ++// * ++// * **Solution**: Instead of `.click(fn)` use `.on("click", fn)`. Instead of `.click()` use `.trigger("click")`. ++// */ ++// mousedown(eventData: TData, ++// handler: JQuery.TypeEventHandler): this; ++// /** ++// * Bind an event handler to the "mousedown" JavaScript event, or trigger that event on an element. ++// * @param handler A function to execute each time the event is triggered. ++// * @see \`{@link https://api.jquery.com/mousedown/ }\` ++// * @since 1.0 ++// * @deprecated ​ Deprecated since 3.3. Use \`{@link on }\` or \`{@link trigger }\`. ++// * ++// * **Cause**: The `.on()` and `.trigger()` methods can set an event handler or generate an event for any event type, and should be used instead of the shortcut methods. This message also applies to the other event shorthands, including: blur, focus, focusin, focusout, resize, scroll, dblclick, mousedown, mouseup, mousemove, mouseover, mouseout, mouseenter, mouseleave, change, select, submit, keydown, keypress, keyup, and contextmenu. ++// * ++// * **Solution**: Instead of `.click(fn)` use `.on("click", fn)`. Instead of `.click()` use `.trigger("click")`. ++// * @example ​ ````Show texts when mouseup and mousedown event triggering. ++// ```html ++// ++// ++// ++// ++// mousedown demo ++// ++// ++// ++// ​ ++//

        Press mouse and release here.

        ++// ​ ++// ++// ​ ++// ++// ++// ``` ++// */ ++// mousedown(handler?: JQuery.TypeEventHandler | ++// false): this; ++// /** ++// * Bind an event handler to be fired when the mouse enters an element, or trigger that handler on an element. ++// * @param eventData An object containing data that will be passed to the event handler. ++// * @param handler A function to execute each time the event is triggered. ++// * @see \`{@link https://api.jquery.com/mouseenter/ }\` ++// * @since 1.4.3 ++// * @deprecated ​ Deprecated since 3.3. Use \`{@link on }\` or \`{@link trigger }\`. ++// * ++// * **Cause**: The `.on()` and `.trigger()` methods can set an event handler or generate an event for any event type, and should be used instead of the shortcut methods. This message also applies to the other event shorthands, including: blur, focus, focusin, focusout, resize, scroll, dblclick, mousedown, mouseup, mousemove, mouseover, mouseout, mouseenter, mouseleave, change, select, submit, keydown, keypress, keyup, and contextmenu. ++// * ++// * **Solution**: Instead of `.click(fn)` use `.on("click", fn)`. Instead of `.click()` use `.trigger("click")`. ++// */ ++// mouseenter(eventData: TData, ++// handler: JQuery.TypeEventHandler): this; ++// /** ++// * Bind an event handler to be fired when the mouse enters an element, or trigger that handler on an element. ++// * @param handler A function to execute each time the event is triggered. ++// * @see \`{@link https://api.jquery.com/mouseenter/ }\` ++// * @since 1.0 ++// * @deprecated ​ Deprecated since 3.3. Use \`{@link on }\` or \`{@link trigger }\`. ++// * ++// * **Cause**: The `.on()` and `.trigger()` methods can set an event handler or generate an event for any event type, and should be used instead of the shortcut methods. This message also applies to the other event shorthands, including: blur, focus, focusin, focusout, resize, scroll, dblclick, mousedown, mouseup, mousemove, mouseover, mouseout, mouseenter, mouseleave, change, select, submit, keydown, keypress, keyup, and contextmenu. ++// * ++// * **Solution**: Instead of `.click(fn)` use `.on("click", fn)`. Instead of `.click()` use `.trigger("click")`. ++// * @example ​ ````Show texts when mouseenter and mouseout event triggering. ++// mouseover fires when the pointer moves into the child element as well, while mouseenter fires only when the pointer moves into the bound element. ++// ```html ++// ++// ++// ++// ++// mouseenter demo ++// ++// ++// ++// ++// ​ ++//
        ++//

        move your mouse

        ++//

        move your mouse

        0

        ++//

        0

        ++//
        ++// ​ ++//
        ++//

        move your mouse

        ++//

        move your mouse

        0

        ++//

        0

        ++//
        ++// ​ ++// ++// ​ ++// ++// ++// ``` ++// */ ++// mouseenter(handler?: JQuery.TypeEventHandler | ++// false): this; ++// /** ++// * Bind an event handler to be fired when the mouse leaves an element, or trigger that handler on an element. ++// * @param eventData An object containing data that will be passed to the event handler. ++// * @param handler A function to execute each time the event is triggered. ++// * @see \`{@link https://api.jquery.com/mouseleave/ }\` ++// * @since 1.4.3 ++// * @deprecated ​ Deprecated since 3.3. Use \`{@link on }\` or \`{@link trigger }\`. ++// * ++// * **Cause**: The `.on()` and `.trigger()` methods can set an event handler or generate an event for any event type, and should be used instead of the shortcut methods. This message also applies to the other event shorthands, including: blur, focus, focusin, focusout, resize, scroll, dblclick, mousedown, mouseup, mousemove, mouseover, mouseout, mouseenter, mouseleave, change, select, submit, keydown, keypress, keyup, and contextmenu. ++// * ++// * **Solution**: Instead of `.click(fn)` use `.on("click", fn)`. Instead of `.click()` use `.trigger("click")`. ++// */ ++// mouseleave(eventData: TData, ++// handler: JQuery.TypeEventHandler): this; ++// /** ++// * Bind an event handler to be fired when the mouse leaves an element, or trigger that handler on an element. ++// * @param handler A function to execute each time the event is triggered. ++// * @see \`{@link https://api.jquery.com/mouseleave/ }\` ++// * @since 1.0 ++// * @deprecated ​ Deprecated since 3.3. Use \`{@link on }\` or \`{@link trigger }\`. ++// * ++// * **Cause**: The `.on()` and `.trigger()` methods can set an event handler or generate an event for any event type, and should be used instead of the shortcut methods. This message also applies to the other event shorthands, including: blur, focus, focusin, focusout, resize, scroll, dblclick, mousedown, mouseup, mousemove, mouseover, mouseout, mouseenter, mouseleave, change, select, submit, keydown, keypress, keyup, and contextmenu. ++// * ++// * **Solution**: Instead of `.click(fn)` use `.on("click", fn)`. Instead of `.click()` use `.trigger("click")`. ++// * @example ​ ````Show number of times mouseout and mouseleave events are triggered. mouseout fires when the pointer moves out of child element as well, while mouseleave fires only when the pointer moves out of the bound element. ++// ```html ++// ++// ++// ++// ++// mouseleave demo ++// ++// ++// ++// ++// ​ ++//
        ++//

        move your mouse

        ++//

        move your mouse

        0

        ++//

        0

        ++//
        ++//
        ++//

        move your mouse

        ++//

        move your mouse

        0

        ++//

        0

        ++//
        ++// ​ ++// ++// ​ ++// ++// ++// ``` ++// */ ++// mouseleave(handler?: JQuery.TypeEventHandler | ++// false): this; ++// /** ++// * Bind an event handler to the "mousemove" JavaScript event, or trigger that event on an element. ++// * @param eventData An object containing data that will be passed to the event handler. ++// * @param handler A function to execute each time the event is triggered. ++// * @see \`{@link https://api.jquery.com/mousemove/ }\` ++// * @since 1.4.3 ++// * @deprecated ​ Deprecated since 3.3. Use \`{@link on }\` or \`{@link trigger }\`. ++// * ++// * **Cause**: The `.on()` and `.trigger()` methods can set an event handler or generate an event for any event type, and should be used instead of the shortcut methods. This message also applies to the other event shorthands, including: blur, focus, focusin, focusout, resize, scroll, dblclick, mousedown, mouseup, mousemove, mouseover, mouseout, mouseenter, mouseleave, change, select, submit, keydown, keypress, keyup, and contextmenu. ++// * ++// * **Solution**: Instead of `.click(fn)` use `.on("click", fn)`. Instead of `.click()` use `.trigger("click")`. ++// */ ++// mousemove(eventData: TData, ++// handler: JQuery.TypeEventHandler): this; ++// /** ++// * Bind an event handler to the "mousemove" JavaScript event, or trigger that event on an element. ++// * @param handler A function to execute each time the event is triggered. ++// * @see \`{@link https://api.jquery.com/mousemove/ }\` ++// * @since 1.0 ++// * @deprecated ​ Deprecated since 3.3. Use \`{@link on }\` or \`{@link trigger }\`. ++// * ++// * **Cause**: The `.on()` and `.trigger()` methods can set an event handler or generate an event for any event type, and should be used instead of the shortcut methods. This message also applies to the other event shorthands, including: blur, focus, focusin, focusout, resize, scroll, dblclick, mousedown, mouseup, mousemove, mouseover, mouseout, mouseenter, mouseleave, change, select, submit, keydown, keypress, keyup, and contextmenu. ++// * ++// * **Solution**: Instead of `.click(fn)` use `.on("click", fn)`. Instead of `.click()` use `.trigger("click")`. ++// * @example ​ ````Show the mouse coordinates when the mouse is moved over the yellow div. Coordinates are relative to the window, which in this case is the iframe. ++// ```html ++// ++// ++// ++// ++// mousemove demo ++// ++// ++// ++// ++// ​ ++//

        ++// Move the mouse over the div. ++//   ++//

        ++//
        ++// ​ ++// ++// ​ ++// ++// ++// ``` ++// */ ++// mousemove(handler?: JQuery.TypeEventHandler | ++// false): this; ++// /** ++// * Bind an event handler to the "mouseout" JavaScript event, or trigger that event on an element. ++// * @param eventData An object containing data that will be passed to the event handler. ++// * @param handler A function to execute each time the event is triggered. ++// * @see \`{@link https://api.jquery.com/mouseout/ }\` ++// * @since 1.4.3 ++// * @deprecated ​ Deprecated since 3.3. Use \`{@link on }\` or \`{@link trigger }\`. ++// * ++// * **Cause**: The `.on()` and `.trigger()` methods can set an event handler or generate an event for any event type, and should be used instead of the shortcut methods. This message also applies to the other event shorthands, including: blur, focus, focusin, focusout, resize, scroll, dblclick, mousedown, mouseup, mousemove, mouseover, mouseout, mouseenter, mouseleave, change, select, submit, keydown, keypress, keyup, and contextmenu. ++// * ++// * **Solution**: Instead of `.click(fn)` use `.on("click", fn)`. Instead of `.click()` use `.trigger("click")`. ++// */ ++// mouseout(eventData: TData, ++// handler: JQuery.TypeEventHandler): this; ++// /** ++// * Bind an event handler to the "mouseout" JavaScript event, or trigger that event on an element. ++// * @param handler A function to execute each time the event is triggered. ++// * @see \`{@link https://api.jquery.com/mouseout/ }\` ++// * @since 1.0 ++// * @deprecated ​ Deprecated since 3.3. Use \`{@link on }\` or \`{@link trigger }\`. ++// * ++// * **Cause**: The `.on()` and `.trigger()` methods can set an event handler or generate an event for any event type, and should be used instead of the shortcut methods. This message also applies to the other event shorthands, including: blur, focus, focusin, focusout, resize, scroll, dblclick, mousedown, mouseup, mousemove, mouseover, mouseout, mouseenter, mouseleave, change, select, submit, keydown, keypress, keyup, and contextmenu. ++// * ++// * **Solution**: Instead of `.click(fn)` use `.on("click", fn)`. Instead of `.click()` use `.trigger("click")`. ++// * @example ​ ````Show the number of times mouseout and mouseleave events are triggered. ++// mouseout fires when the pointer moves out of the child element as well, while mouseleave fires only when the pointer moves out of the bound element. ++// ```html ++// ++// ++// ++// ++// mouseout demo ++// ++// ++// ++// ++// ​ ++//
        ++//

        move your mouse

        ++//

        move your mouse

        0

        ++//

        0

        ++//
        ++// ​ ++//
        ++//

        move your mouse

        ++//

        move your mouse

        0

        ++//

        0

        ++//
        ++// ​ ++// ++// ​ ++// ++// ++// ``` ++// */ ++// mouseout(handler?: JQuery.TypeEventHandler | ++// false): this; ++// /** ++// * Bind an event handler to the "mouseover" JavaScript event, or trigger that event on an element. ++// * @param eventData An object containing data that will be passed to the event handler. ++// * @param handler A function to execute each time the event is triggered. ++// * @see \`{@link https://api.jquery.com/mouseover/ }\` ++// * @since 1.4.3 ++// * @deprecated ​ Deprecated since 3.3. Use \`{@link on }\` or \`{@link trigger }\`. ++// * ++// * **Cause**: The `.on()` and `.trigger()` methods can set an event handler or generate an event for any event type, and should be used instead of the shortcut methods. This message also applies to the other event shorthands, including: blur, focus, focusin, focusout, resize, scroll, dblclick, mousedown, mouseup, mousemove, mouseover, mouseout, mouseenter, mouseleave, change, select, submit, keydown, keypress, keyup, and contextmenu. ++// * ++// * **Solution**: Instead of `.click(fn)` use `.on("click", fn)`. Instead of `.click()` use `.trigger("click")`. ++// */ ++// mouseover(eventData: TData, ++// handler: JQuery.TypeEventHandler): this; ++// /** ++// * Bind an event handler to the "mouseover" JavaScript event, or trigger that event on an element. ++// * @param handler A function to execute each time the event is triggered. ++// * @see \`{@link https://api.jquery.com/mouseover/ }\` ++// * @since 1.0 ++// * @deprecated ​ Deprecated since 3.3. Use \`{@link on }\` or \`{@link trigger }\`. ++// * ++// * **Cause**: The `.on()` and `.trigger()` methods can set an event handler or generate an event for any event type, and should be used instead of the shortcut methods. This message also applies to the other event shorthands, including: blur, focus, focusin, focusout, resize, scroll, dblclick, mousedown, mouseup, mousemove, mouseover, mouseout, mouseenter, mouseleave, change, select, submit, keydown, keypress, keyup, and contextmenu. ++// * ++// * **Solution**: Instead of `.click(fn)` use `.on("click", fn)`. Instead of `.click()` use `.trigger("click")`. ++// * @example ​ ````Show the number of times mouseover and mouseenter events are triggered. ++// mouseover fires when the pointer moves into the child element as well, while mouseenter fires only when the pointer moves into the bound element. ++// ```html ++// ++// ++// ++// ++// mouseover demo ++// ++// ++// ++// ++// ​ ++//
        ++// move your mouse ++//
        ++//
        ++//
        ++// ​ ++//
        ++// move your mouse ++//
        ++//
        ++//
        ++// ​ ++// ++// ​ ++// ++// ++// ``` ++// */ ++// mouseover(handler?: JQuery.TypeEventHandler | ++// false): this; ++// /** ++// * Bind an event handler to the "mouseup" JavaScript event, or trigger that event on an element. ++// * @param eventData An object containing data that will be passed to the event handler. ++// * @param handler A function to execute each time the event is triggered. ++// * @see \`{@link https://api.jquery.com/mouseup/ }\` ++// * @since 1.4.3 ++// * @deprecated ​ Deprecated since 3.3. Use \`{@link on }\` or \`{@link trigger }\`. ++// * ++// * **Cause**: The `.on()` and `.trigger()` methods can set an event handler or generate an event for any event type, and should be used instead of the shortcut methods. This message also applies to the other event shorthands, including: blur, focus, focusin, focusout, resize, scroll, dblclick, mousedown, mouseup, mousemove, mouseover, mouseout, mouseenter, mouseleave, change, select, submit, keydown, keypress, keyup, and contextmenu. ++// * ++// * **Solution**: Instead of `.click(fn)` use `.on("click", fn)`. Instead of `.click()` use `.trigger("click")`. ++// */ ++// mouseup(eventData: TData, ++// handler: JQuery.TypeEventHandler): this; ++// /** ++// * Bind an event handler to the "mouseup" JavaScript event, or trigger that event on an element. ++// * @param handler A function to execute each time the event is triggered. ++// * @see \`{@link https://api.jquery.com/mouseup/ }\` ++// * @since 1.0 ++// * @deprecated ​ Deprecated since 3.3. Use \`{@link on }\` or \`{@link trigger }\`. ++// * ++// * **Cause**: The `.on()` and `.trigger()` methods can set an event handler or generate an event for any event type, and should be used instead of the shortcut methods. This message also applies to the other event shorthands, including: blur, focus, focusin, focusout, resize, scroll, dblclick, mousedown, mouseup, mousemove, mouseover, mouseout, mouseenter, mouseleave, change, select, submit, keydown, keypress, keyup, and contextmenu. ++// * ++// * **Solution**: Instead of `.click(fn)` use `.on("click", fn)`. Instead of `.click()` use `.trigger("click")`. ++// * @example ​ ````Show texts when mouseup and mousedown event triggering. ++// ```html ++// ++// ++// ++// ++// mouseup demo ++// ++// ++// ++// ​ ++//

        Press mouse and release here.

        ++// ​ ++// ++// ​ ++// ++// ++// ``` ++// */ ++// mouseup(handler?: JQuery.TypeEventHandler | ++// false): this; ++// /** ++// * Get the immediately following sibling of each element in the set of matched elements. If a selector is provided, it retrieves the next sibling only if it matches that selector. ++// * @param selector A string containing a selector expression to match elements against. ++// * @see \`{@link https://api.jquery.com/next/ }\` ++// * @since 1.0 ++// * @example ​ ````Find the very next sibling of each disabled button and change its text "this button is disabled". ++// ```html ++// ++// ++// ++// ++// next demo ++// ++// ++// ++// ++// ​ ++//
        -
        ++//
        -
        ++//
        -
        ++// ​ ++// ++// ​ ++// ++// ++// ``` ++// * @example ​ ````Find the very next sibling of each paragraph. Keep only the ones with a class "selected". ++// ```html ++// ++// ++// ++// ++// next demo ++// ++// ++// ++// ​ ++//

        Hello

        ++//

        Hello Again

        ++//
        And Again
        ++// ​ ++// ++// ​ ++// ++// ++// ``` ++// */ ++// next(selector?: JQuery.Selector): this; ++// /** ++// * Get all following siblings of each element in the set of matched elements, optionally filtered by a selector. ++// * @param selector A string containing a selector expression to match elements against. ++// * @see \`{@link https://api.jquery.com/nextAll/ }\` ++// * @since 1.2 ++// * @example ​ ````Locate all the divs after the first and give them a class. ++// ```html ++// ++// ++// ++// ++// nextAll demo ++// ++// ++// ++// ++// ​ ++//
        first
        ++//
        sibling
        child
        ++//
        sibling
        ++//
        sibling
        ​ ++// ++// ​ ++// ++// ++// ``` ++// * @example ​ ````Locate all the paragraphs after the second child in the body and give them a class. ++// ```html ++// ++// ++// ++// ++// nextAll demo ++// ++// ++// ++// ++// ​ ++//

        p

        ++//
        div
        ++//

        p

        ++//

        p

        ++//
        div
        ++//

        p

        ++//
        div
        ++// ​ ++// ++// ​ ++// ++// ++// ``` ++// */ ++// nextAll(selector?: string): this; ++// /** ++// * Get all following siblings of each element up to but not including the element matched by the selector, DOM node, or jQuery object passed. ++// * @param selector_element _@param_ `selector_element` ++// *
        ++// * * `selector` — A string containing a selector expression to indicate where to stop matching following sibling elements.
        ++// * * `element` — A DOM node or jQuery object indicating where to stop matching following sibling elements. ++// * @param filter A string containing a selector expression to match elements against. ++// * @see \`{@link https://api.jquery.com/nextUntil/ }\` ++// * @since 1.4 ++// * @since 1.6 ++// * @example ​ ````Find the siblings that follow <dt id="term-2"> up to the next <dt> and give them a red background color. Also, find <dd> siblings that follow <dt id="term-1"> up to <dt id="term-3"> and give them a green text color. ++// ```html ++// ++// ++// ++// ++// nextUntil demo ++// ++// ++// ++// ​ ++//
        ++//
        term 1
        ++//
        definition 1-a
        ++//
        definition 1-b
        ++//
        definition 1-c
        ++//
        definition 1-d
        ++//
        term 2
        ++//
        definition 2-a
        ++//
        definition 2-b
        ++//
        definition 2-c
        ++//
        term 3
        ++//
        definition 3-a
        ++//
        definition 3-b
        ++//
        ++// ​ ++// ++// ​ ++// ++// ++// ``` ++// */ ++// nextUntil(selector_element?: JQuery.Selector | Element | JQuery, filter?: JQuery.Selector): this; ++// /** ++// * Remove elements from the set of matched elements. ++// * @param selector_function_selection _@param_ `selector_function_selection` ++// *
        ++// * * `selector` — A string containing a selector expression, a DOM element, or an array of elements to match against the set.
        ++// * * `function` — A function used as a test for each element in the set. It accepts two arguments, `index`, which is ++// * the element's index in the jQuery collection, and `element`, which is the DOM element. Within the ++// * function, `this` refers to the current DOM element.
        ++// * * `selection` — An existing jQuery object to match the current set of elements against. ++// * @see \`{@link https://api.jquery.com/not/ }\` ++// * @since 1.0 ++// * @since 1.4 ++// * @example ​ ````Adds a border to divs that are not green or blue. ++// ```html ++// ++// ++// ++// ++// not demo ++// ++// ++// ++// ++// ​ ++//
        ++//
        ++//
        ++//
        ++//
        ++//
        ++//
        ++// ​ ++// ++// ​ ++// ++// ++// ``` ++// * @example ​ ````Removes the element with the ID "selected" from the set of all paragraphs. ++// ```javascript ++// $( "p" ).not( $( "#selected" )[ 0 ] ); ++// ``` ++// * @example ​ ````Removes the element with the ID "selected" from the set of all paragraphs. ++// ```javascript ++// $( "p" ).not( "#selected" ); ++// ``` ++// * @example ​ ````Removes all elements that match "div p.selected" from the total set of all paragraphs. ++// ```javascript ++// $( "p" ).not( $( "div p.selected" ) ); ++// ``` ++// */ ++// not(selector_function_selection: JQuery.Selector | JQuery.TypeOrArray | JQuery | ((this: TElement, index: number, element: TElement) => boolean)): this; ++// /** ++// * Remove an event handler. ++// * @param events One or more space-separated event types and optional namespaces, or just namespaces, such as ++// * "click", "keydown.myPlugin", or ".myPlugin". ++// * @param selector A selector which should match the one originally passed to .on() when attaching event handlers. ++// * @param handler A function to execute each time the event is triggered. ++// * @see \`{@link https://api.jquery.com/off/ }\` ++// * @since 1.7 ++// * @example ​ ````Add and remove event handlers on the colored button. ++// ```html ++// ++// ++// ++// ++// off demo ++// ++// ++// ++// ++// ​ ++// ++// ++// ++//
        Click!
        ++// ​ ++// ++// ​ ++// ++// ++// ``` ++// * @example ​ ````Remove just one previously bound handler by passing it as the third argument: ++// ```javascript ++// var foo = function() { ++// // Code to handle some kind of event ++// }; ++// ​ ++// // ... Now foo will be called when paragraphs are clicked ... ++// $( "body" ).on( "click", "p", foo ); ++// ​ ++// // ... Foo will no longer be called. ++// $( "body" ).off( "click", "p", foo ); ++// ``` ++// */ ++// off( ++// events: TType, ++// selector: JQuery.Selector, ++// handler: JQuery.TypeEventHandler | ++// false ++// ): this; ++// /** ++// * Remove an event handler. ++// * @param events One or more space-separated event types and optional namespaces, or just namespaces, such as ++// * "click", "keydown.myPlugin", or ".myPlugin". ++// * @param selector_handler _@param_ `selector_handler` ++// *
        ++// * * `selector` — A selector which should match the one originally passed to `.on()` when attaching event handlers.
        ++// * * `handler` — A handler function previously attached for the event(s), or the special value `false`. ++// * @see \`{@link https://api.jquery.com/off/ }\` ++// * @since 1.7 ++// * @example ​ ````Remove all delegated click handlers from all paragraphs: ++// ```javascript ++// $( "p" ).off( "click", "**" ); ++// ``` ++// * @example ​ ````Unbind all delegated event handlers by their namespace: ++// ```javascript ++// var validate = function() { ++// // Code to validate form entries ++// }; ++// ​ ++// // Delegate events under the ".validator" namespace ++// $( "form" ).on( "click.validator", "button", validate ); ++// ​ ++// $( "form" ).on( "keypress.validator", "input[type='text']", validate ); ++// ​ ++// // Remove event handlers in the ".validator" namespace ++// $( "form" ).off( ".validator" ); ++// ``` ++// */ ++// off( ++// events: TType, ++// selector_handler?: JQuery.Selector | ++// JQuery.TypeEventHandler | ++// false ++// ): this; ++// /** ++// * Remove an event handler. ++// * @param events An object where the string keys represent one or more space-separated event types and optional ++// * namespaces, and the values represent handler functions previously attached for the event(s). ++// * @param selector A selector which should match the one originally passed to .on() when attaching event handlers. ++// * @see \`{@link https://api.jquery.com/off/ }\` ++// * @since 1.7 ++// */ ++// off(events: JQuery.TypeEventHandlers, ++// selector?: JQuery.Selector): this; ++// /** ++// * Remove an event handler. ++// * @param event A jQuery.Event object. ++// * @see \`{@link https://api.jquery.com/off/ }\` ++// * @since 1.7 ++// * @example ​ ````Remove all event handlers from all paragraphs: ++// ```javascript ++// $( "p" ).off(); ++// ``` ++// */ ++// off(event?: JQuery.TriggeredEvent): this; ++// /** ++// * Set the current coordinates of every element in the set of matched elements, relative to the document. ++// * @param coordinates_function _@param_ `coordinates_function` ++// *
        ++// * * `coordinates` — An object containing the properties `top` and `left`, which are numbers indicating the new top and ++// * left coordinates for the elements.
        ++// * * `function` — A function to return the coordinates to set. Receives the index of the element in the collection as ++// * the first argument and the current coordinates as the second argument. The function should return an ++// * object with the new `top` and `left` properties. ++// * @see \`{@link https://api.jquery.com/offset/ }\` ++// * @since 1.4 ++// * @example ​ ````Set the offset of the second paragraph: ++// ```html ++// ++// ++// ++// ++// offset demo ++// ++// ++// ++// ++// ​ ++//

        Hello

        2nd Paragraph

        ++// ​ ++// ++// ​ ++// ++// ++// ``` ++// */ ++// offset(coordinates_function: JQuery.CoordinatesPartial | ((this: TElement, index: number, coords: JQuery.Coordinates) => JQuery.CoordinatesPartial)): this; ++// /** ++// * Get the current coordinates of the first element in the set of matched elements, relative to the document. ++// * @see \`{@link https://api.jquery.com/offset/ }\` ++// * @since 1.2 ++// * @example ​ ````Access the offset of the second paragraph: ++// ```html ++// ++// ++// ++// ++// offset demo ++// ++// ++// ++// ++// ​ ++//

        Hello

        2nd Paragraph

        ++// ​ ++// ++// ​ ++// ++// ++// ``` ++// * @example ​ ````Click to see the offset. ++// ```html ++// ++// ++// ++// ++// offset demo ++// ++// ++// ++// ++// ​ ++//
        Click an element.
        ++//

        ++// This is the best way to find an offset. ++//

        ++//
        ++//
        ++// ​ ++// ++// ​ ++// ++// ++// ``` ++// */ ++// offset(): JQuery.Coordinates | undefined; ++// /** ++// * Get the closest ancestor element that is positioned. ++// * @see \`{@link https://api.jquery.com/offsetParent/ }\` ++// * @since 1.2.6 ++// * @example ​ ````Find the offsetParent of item "A." ++// ```html ++// ++// ++// ++// ++// offsetParent demo ++// ++// ++// ++// ​ ++//
          ++//
        • I
        • ++//
        • II ++//
            ++//
          • A
          • ++//
          • B ++//
              ++//
            • 1
            • ++//
            • 2
            • ++//
            • 3
            • ++//
            ++//
          • ++//
          • C
          • ++//
          ++//
        • ++//
        • III
        • ++//
        ++// ​ ++// ++// ​ ++// ++// ++// ``` ++// */ ++// offsetParent(): this; ++// /** ++// * Attach an event handler function for one or more events to the selected elements. ++// * @param events One or more space-separated event types and optional namespaces, such as "click" or "keydown.myPlugin". ++// * @param selector A selector string to filter the descendants of the selected elements that trigger the event. If the ++// * selector is null or omitted, the event is always triggered when it reaches the selected element. ++// * @param data Data to be passed to the handler in event.data when an event is triggered. ++// * @param handler A function to execute when the event is triggered. ++// * @see \`{@link https://api.jquery.com/on/ }\` ++// * @since 1.7 ++// */ ++// on( ++// events: TType, ++// selector: JQuery.Selector, ++// data: TData, ++// handler: JQuery.TypeEventHandler ++// ): this; ++// /** ++// * Attach an event handler function for one or more events to the selected elements. ++// * @param events One or more space-separated event types and optional namespaces, such as "click" or "keydown.myPlugin". ++// * @param selector A selector string to filter the descendants of the selected elements that trigger the event. If the ++// * selector is null or omitted, the event is always triggered when it reaches the selected element. ++// * @param data Data to be passed to the handler in event.data when an event is triggered. ++// * @param handler A function to execute when the event is triggered. ++// * @see \`{@link https://api.jquery.com/on/ }\` ++// * @since 1.7 ++// */ ++// on( ++// events: TType, ++// selector: null | undefined, ++// data: TData, ++// handler: JQuery.TypeEventHandler ++// ): this; ++// /** ++// * Attach an event handler function for one or more events to the selected elements. ++// * @param events One or more space-separated event types and optional namespaces, such as "click" or "keydown.myPlugin". ++// * @param selector A selector string to filter the descendants of the selected elements that trigger the event. If the ++// * selector is null or omitted, the event is always triggered when it reaches the selected element. ++// * @param data Data to be passed to the handler in event.data when an event is triggered. ++// * @param handler A function to execute when the event is triggered. ++// * @see \`{@link https://api.jquery.com/on/ }\` ++// * @since 1.7 ++// * @deprecated ​ Deprecated. Use \`{@link JQuery.Event }\` in place of \`{@link JQueryEventObject }\`. ++// */ ++// on(events: string, ++// selector: JQuery.Selector | null | undefined, ++// data: any, ++// handler: ((event: JQueryEventObject) => void)): this; ++// /** ++// * Attach an event handler function for one or more events to the selected elements. ++// * @param events One or more space-separated event types and optional namespaces, such as "click" or "keydown.myPlugin". ++// * @param selector A selector string to filter the descendants of the selected elements that trigger the event. If the ++// * selector is null or omitted, the event is always triggered when it reaches the selected element. ++// * @param handler A function to execute when the event is triggered. The value false is also allowed as a shorthand ++// * for a function that simply does return false. ++// * @see \`{@link https://api.jquery.com/on/ }\` ++// * @since 1.7 ++// * @example ​ ````Click any paragraph to add another after it. Note that .on() allows a click event on any paragraph--even new ones--since the event is handled by the ever-present body element after it bubbles to there. ++// ```html ++// ++// ++// ++// ++// on demo ++// ++// ++// ++// ++// ​ ++//

        Click me!

        ++// ++// ​ ++// ++// ​ ++// ++// ++// ``` ++// * @example ​ ````Display each paragraph's text in an alert box whenever it is clicked: ++// ```javascript ++// $( "body" ).on( "click", "p", function() { ++// alert( $( this ).text() ); ++// }); ++// ``` ++// * @example ​ ````Cancel a link's default action using the .preventDefault() method: ++// ```javascript ++// $( "body" ).on( "click", "a", function( event ) { ++// event.preventDefault(); ++// }); ++// ``` ++// */ ++// on( ++// events: TType, ++// selector: JQuery.Selector, ++// handler: JQuery.TypeEventHandler | ++// false ++// ): this; ++// /** ++// * Attach an event handler function for one or more events to the selected elements. ++// * @param events One or more space-separated event types and optional namespaces, such as "click" or "keydown.myPlugin". ++// * @param data Data to be passed to the handler in event.data when an event is triggered. ++// * @param handler A function to execute when the event is triggered. ++// * @see \`{@link https://api.jquery.com/on/ }\` ++// * @since 1.7 ++// * @example ​ ````Pass data to the event handler, which is specified here by name: ++// ```javascript ++// function myHandler( event ) { ++// alert( event.data.foo ); ++// } ++// $( "p" ).on( "click", { foo: "bar" }, myHandler ); ++// ``` ++// */ ++// on( ++// events: TType, ++// data: TData, ++// handler: JQuery.TypeEventHandler ++// ): this; ++// /** ++// * Attach an event handler function for one or more events to the selected elements. ++// * @param events One or more space-separated event types and optional namespaces, such as "click" or "keydown.myPlugin". ++// * @param selector_data _@param_ `selector_data` ++// *
        ++// * * `selector` — A selector string to filter the descendants of the selected elements that trigger the event. If the ++// * selector is null or omitted, the event is always triggered when it reaches the selected element.
        ++// * * `data` — Data to be passed to the handler in event.data when an event is triggered. ++// * @param handler A function to execute when the event is triggered. ++// * @see \`{@link https://api.jquery.com/on/ }\` ++// * @since 1.7 ++// * @deprecated ​ Deprecated. Use \`{@link JQuery.Event }\` in place of \`{@link JQueryEventObject }\`. ++// * @example ​ ````Click any paragraph to add another after it. Note that .on() allows a click event on any paragraph--even new ones--since the event is handled by the ever-present body element after it bubbles to there. ++// ```html ++// ++// ++// ++// ++// on demo ++// ++// ++// ++// ++// ​ ++//

        Click me!

        ++// ++// ​ ++// ++// ​ ++// ++// ++// ``` ++// * @example ​ ````Display each paragraph's text in an alert box whenever it is clicked: ++// ```javascript ++// $( "body" ).on( "click", "p", function() { ++// alert( $( this ).text() ); ++// }); ++// ``` ++// * @example ​ ````Cancel a link's default action using the .preventDefault() method: ++// ```javascript ++// $( "body" ).on( "click", "a", function( event ) { ++// event.preventDefault(); ++// }); ++// ``` ++// * @example ​ ````Pass data to the event handler, which is specified here by name: ++// ```javascript ++// function myHandler( event ) { ++// alert( event.data.foo ); ++// } ++// $( "p" ).on( "click", { foo: "bar" }, myHandler ); ++// ``` ++// */ ++// on(events: string, ++// selector_data: any, ++// handler: ((event: JQueryEventObject) => void)): this; ++// /** ++// * Attach an event handler function for one or more events to the selected elements. ++// * @param events One or more space-separated event types and optional namespaces, such as "click" or "keydown.myPlugin". ++// * @param handler A function to execute when the event is triggered. The value false is also allowed as a shorthand ++// * for a function that simply does return false. ++// * @see \`{@link https://api.jquery.com/on/ }\` ++// * @since 1.7 ++// * @example ​ ````Display a paragraph's text in an alert when it is clicked: ++// ```javascript ++// $( "p" ).on( "click", function() { ++// alert( $( this ).text() ); ++// }); ++// ``` ++// * @example ​ ````Cancel a form submit action and prevent the event from bubbling up by returning false: ++// ```javascript ++// $( "form" ).on( "submit", false ); ++// ``` ++// * @example ​ ````Cancel only the default action by using .preventDefault(). ++// ```javascript ++// $( "form" ).on( "submit", function( event ) { ++// event.preventDefault(); ++// }); ++// ``` ++// * @example ​ ````Stop submit events from bubbling without preventing form submit, using .stopPropagation(). ++// ```javascript ++// $( "form" ).on( "submit", function( event ) { ++// event.stopPropagation(); ++// }); ++// ``` ++// * @example ​ ````Pass data to the event handler using the second argument to .trigger() ++// ```javascript ++// $( "div" ).on( "click", function( event, person ) { ++// alert( "Hello, " + person.name ); ++// }); ++// $( "div" ).trigger( "click", { name: "Jim" } ); ++// ``` ++// * @example ​ ````Use the the second argument of .trigger() to pass an array of data to the event handler ++// ```javascript ++// $( "div" ).on( "click", function( event, salutation, name ) { ++// alert( salutation + ", " + name ); ++// }); ++// $( "div" ).trigger( "click", [ "Goodbye", "Jim" ] ); ++// ``` ++// * @example ​ ````Attach and trigger custom (non-browser) events. ++// ```html ++// ++// ++// ++// ++// on demo ++// ++// ++// ++// ++// ​ ++//

        Has an attached custom event.

        ++// ++// ++// ​ ++// ++// ​ ++// ++// ++// ``` ++// * @example ​ ````Attach multiple events—one on mouseenter and one on mouseleave to the same element: ++// ```javascript ++// $( "#cart" ).on( "mouseenter mouseleave", function( event ) { ++// $( this ).toggleClass( "active" ); ++// }); ++// ``` ++// */ ++// on( ++// events: TType, ++// handler: JQuery.TypeEventHandler | ++// false ++// ): this; ++// /** ++// * Attach an event handler function for one or more events to the selected elements. ++// * @param events One or more space-separated event types and optional namespaces, such as "click" or "keydown.myPlugin". ++// * @param handler A function to execute when the event is triggered. ++// * @see \`{@link https://api.jquery.com/on/ }\` ++// * @since 1.7 ++// * @deprecated ​ Deprecated. Use \`{@link JQuery.Event }\` in place of \`{@link JQueryEventObject }\`. ++// * @example ​ ````Display a paragraph's text in an alert when it is clicked: ++// ```javascript ++// $( "p" ).on( "click", function() { ++// alert( $( this ).text() ); ++// }); ++// ``` ++// * @example ​ ````Cancel a form submit action and prevent the event from bubbling up by returning false: ++// ```javascript ++// $( "form" ).on( "submit", false ); ++// ``` ++// * @example ​ ````Cancel only the default action by using .preventDefault(). ++// ```javascript ++// $( "form" ).on( "submit", function( event ) { ++// event.preventDefault(); ++// }); ++// ``` ++// * @example ​ ````Stop submit events from bubbling without preventing form submit, using .stopPropagation(). ++// ```javascript ++// $( "form" ).on( "submit", function( event ) { ++// event.stopPropagation(); ++// }); ++// ``` ++// * @example ​ ````Pass data to the event handler using the second argument to .trigger() ++// ```javascript ++// $( "div" ).on( "click", function( event, person ) { ++// alert( "Hello, " + person.name ); ++// }); ++// $( "div" ).trigger( "click", { name: "Jim" } ); ++// ``` ++// * @example ​ ````Use the the second argument of .trigger() to pass an array of data to the event handler ++// ```javascript ++// $( "div" ).on( "click", function( event, salutation, name ) { ++// alert( salutation + ", " + name ); ++// }); ++// $( "div" ).trigger( "click", [ "Goodbye", "Jim" ] ); ++// ``` ++// * @example ​ ````Attach and trigger custom (non-browser) events. ++// ```html ++// ++// ++// ++// ++// on demo ++// ++// ++// ++// ++// ​ ++//

        Has an attached custom event.

        ++// ++// ++// ​ ++// ++// ​ ++// ++// ++// ``` ++// * @example ​ ````Attach multiple events—one on mouseenter and one on mouseleave to the same element: ++// ```javascript ++// $( "#cart" ).on( "mouseenter mouseleave", function( event ) { ++// $( this ).toggleClass( "active" ); ++// }); ++// ``` ++// */ ++// on(events: string, ++// handler: ((event: JQueryEventObject) => void)): this; ++// /** ++// * Attach an event handler function for one or more events to the selected elements. ++// * @param events An object in which the string keys represent one or more space-separated event types and optional ++// * namespaces, and the values represent a handler function to be called for the event(s). ++// * @param selector A selector string to filter the descendants of the selected elements that will call the handler. If ++// * the selector is null or omitted, the handler is always called when it reaches the selected element. ++// * @param data Data to be passed to the handler in event.data when an event occurs. ++// * @see \`{@link https://api.jquery.com/on/ }\` ++// * @since 1.7 ++// */ ++// on( ++// events: JQuery.TypeEventHandlers, ++// selector: JQuery.Selector, ++// data: TData ++// ): this; ++// /** ++// * Attach an event handler function for one or more events to the selected elements. ++// * @param events An object in which the string keys represent one or more space-separated event types and optional ++// * namespaces, and the values represent a handler function to be called for the event(s). ++// * @param selector A selector string to filter the descendants of the selected elements that will call the handler. If ++// * the selector is null or omitted, the handler is always called when it reaches the selected element. ++// * @param data Data to be passed to the handler in event.data when an event occurs. ++// * @see \`{@link https://api.jquery.com/on/ }\` ++// * @since 1.7 ++// */ ++// on( ++// events: JQuery.TypeEventHandlers, ++// selector: null | undefined, ++// data: TData ++// ): this; ++// /** ++// * Attach an event handler function for one or more events to the selected elements. ++// * @param events An object in which the string keys represent one or more space-separated event types and optional ++// * namespaces, and the values represent a handler function to be called for the event(s). ++// * @param selector A selector string to filter the descendants of the selected elements that will call the handler. If ++// * the selector is null or omitted, the handler is always called when it reaches the selected element. ++// * @see \`{@link https://api.jquery.com/on/ }\` ++// * @since 1.7 ++// */ ++// on(events: JQuery.TypeEventHandlers, ++// selector: JQuery.Selector ++// ): this; ++// /** ++// * Attach an event handler function for one or more events to the selected elements. ++// * @param events An object in which the string keys represent one or more space-separated event types and optional ++// * namespaces, and the values represent a handler function to be called for the event(s). ++// * @param data Data to be passed to the handler in event.data when an event occurs. ++// * @see \`{@link https://api.jquery.com/on/ }\` ++// * @since 1.7 ++// */ ++// on( ++// events: JQuery.TypeEventHandlers, ++// data: TData ++// ): this; ++// /** ++// * Attach an event handler function for one or more events to the selected elements. ++// * @param events An object in which the string keys represent one or more space-separated event types and optional ++// * namespaces, and the values represent a handler function to be called for the event(s). ++// * @see \`{@link https://api.jquery.com/on/ }\` ++// * @since 1.7 ++// * @example ​ ````Attach multiple event handlers simultaneously using a plain object. ++// ```html ++// ++// ++// ++// ++// on demo ++// ++// ++// ++// ++// ​ ++//
        test div
        ++// ​ ++// ++// ​ ++// ++// ++// ``` ++// */ ++// on(events: JQuery.TypeEventHandlers): this; ++// /** ++// * Attach a handler to an event for the elements. The handler is executed at most once per element per event type. ++// * @param events One or more space-separated event types and optional namespaces, such as "click" or "keydown.myPlugin". ++// * @param selector A selector string to filter the descendants of the selected elements that trigger the event. If the ++// * selector is null or omitted, the event is always triggered when it reaches the selected element. ++// * @param data Data to be passed to the handler in event.data when an event is triggered. ++// * @param handler A function to execute when the event is triggered. ++// * @see \`{@link https://api.jquery.com/one/ }\` ++// * @since 1.7 ++// */ ++// one( ++// events: TType, ++// selector: JQuery.Selector, ++// data: TData, ++// handler: JQuery.TypeEventHandler ++// ): this; ++// /** ++// * Attach a handler to an event for the elements. The handler is executed at most once per element per event type. ++// * @param events One or more space-separated event types and optional namespaces, such as "click" or "keydown.myPlugin". ++// * @param selector A selector string to filter the descendants of the selected elements that trigger the event. If the ++// * selector is null or omitted, the event is always triggered when it reaches the selected element. ++// * @param data Data to be passed to the handler in event.data when an event is triggered. ++// * @param handler A function to execute when the event is triggered. ++// * @see \`{@link https://api.jquery.com/one/ }\` ++// * @since 1.7 ++// */ ++// one( ++// events: TType, ++// selector: null | undefined, ++// data: TData, ++// handler: JQuery.TypeEventHandler ++// ): this; ++// /** ++// * Attach a handler to an event for the elements. The handler is executed at most once per element per event type. ++// * @param events One or more space-separated event types and optional namespaces, such as "click" or "keydown.myPlugin". ++// * @param selector A selector string to filter the descendants of the selected elements that trigger the event. If the ++// * selector is null or omitted, the event is always triggered when it reaches the selected element. ++// * @param handler A function to execute when the event is triggered. The value false is also allowed as a shorthand ++// * for a function that simply does return false. ++// * @see \`{@link https://api.jquery.com/one/ }\` ++// * @since 1.7 ++// */ ++// one( ++// events: TType, ++// selector: JQuery.Selector, ++// handler: JQuery.TypeEventHandler | ++// false ++// ): this; ++// /** ++// * Attach a handler to an event for the elements. The handler is executed at most once per element per event type. ++// * @param events One or more space-separated event types and optional namespaces, such as "click" or "keydown.myPlugin". ++// * @param data Data to be passed to the handler in event.data when an event is triggered. ++// * @param handler A function to execute when the event is triggered. ++// * @see \`{@link https://api.jquery.com/one/ }\` ++// * @since 1.7 ++// */ ++// one( ++// events: TType, ++// data: TData, ++// handler: JQuery.TypeEventHandler ++// ): this; ++// /** ++// * Attach a handler to an event for the elements. The handler is executed at most once per element per event type. ++// * @param events One or more space-separated event types and optional namespaces, such as "click" or "keydown.myPlugin". ++// * @param handler A function to execute when the event is triggered. The value false is also allowed as a shorthand ++// * for a function that simply does return false. ++// * @see \`{@link https://api.jquery.com/one/ }\` ++// * @since 1.7 ++// * @example ​ ````Tie a one-time click to each div. ++// ```html ++// ++// ++// ++// ++// one demo ++// ++// ++// ++// ++// ​ ++//
        ++//
        ++//
        ++//
        ++//
        ++//

        Click a green square...

        ++// ​ ++// ++// ​ ++// ++// ++// ``` ++// * @example ​ ````To display the text of all paragraphs in an alert box the first time each of them is clicked: ++// ```javascript ++// $( "p" ).one( "click", function() { ++// alert( $( this ).text() ); ++// }); ++// ``` ++// * @example ​ ````Event handlers will trigger once per element per event type ++// ```html ++// ++// ++// ++// ++// one demo ++// ++// ++// ++// ​ ++//
        0
        ++//
        Hover/click me
        ++// ​ ++// ++// ​ ++// ++// ++// ``` ++// */ ++// one( ++// events: TType, ++// handler: JQuery.TypeEventHandler| ++// false ++// ): this; ++// /** ++// * Attach a handler to an event for the elements. The handler is executed at most once per element per event type. ++// * @param events An object in which the string keys represent one or more space-separated event types and optional ++// * namespaces, and the values represent a handler function to be called for the event(s). ++// * @param selector A selector string to filter the descendants of the selected elements that will call the handler. If ++// * the selector is null or omitted, the handler is always called when it reaches the selected element. ++// * @param data Data to be passed to the handler in event.data when an event occurs. ++// * @see \`{@link https://api.jquery.com/one/ }\` ++// * @since 1.7 ++// */ ++// one( ++// events: JQuery.TypeEventHandlers, ++// selector: JQuery.Selector, ++// data: TData ++// ): this; ++// /** ++// * Attach a handler to an event for the elements. The handler is executed at most once per element per event type. ++// * @param events An object in which the string keys represent one or more space-separated event types and optional ++// * namespaces, and the values represent a handler function to be called for the event(s). ++// * @param selector A selector string to filter the descendants of the selected elements that will call the handler. If ++// * the selector is null or omitted, the handler is always called when it reaches the selected element. ++// * @param data Data to be passed to the handler in event.data when an event occurs. ++// * @see \`{@link https://api.jquery.com/one/ }\` ++// * @since 1.7 ++// */ ++// one( ++// events: JQuery.TypeEventHandlers, ++// selector: null | undefined, ++// data: TData ++// ): this; ++// /** ++// * Attach a handler to an event for the elements. The handler is executed at most once per element per event type. ++// * @param events An object in which the string keys represent one or more space-separated event types and optional ++// * namespaces, and the values represent a handler function to be called for the event(s). ++// * @param selector A selector string to filter the descendants of the selected elements that will call the handler. If ++// * the selector is null or omitted, the handler is always called when it reaches the selected element. ++// * @see \`{@link https://api.jquery.com/one/ }\` ++// * @since 1.7 ++// */ ++// one(events: JQuery.TypeEventHandlers, ++// selector: JQuery.Selector): this; ++// /** ++// * Attach a handler to an event for the elements. The handler is executed at most once per element per event type. ++// * @param events An object in which the string keys represent one or more space-separated event types and optional ++// * namespaces, and the values represent a handler function to be called for the event(s). ++// * @param data Data to be passed to the handler in event.data when an event occurs. ++// * @see \`{@link https://api.jquery.com/one/ }\` ++// * @since 1.7 ++// */ ++// one( ++// events: JQuery.TypeEventHandlers, ++// data: TData ++// ): this; ++// /** ++// * Attach a handler to an event for the elements. The handler is executed at most once per element per event type. ++// * @param events An object in which the string keys represent one or more space-separated event types and optional ++// * namespaces, and the values represent a handler function to be called for the event(s). ++// * @see \`{@link https://api.jquery.com/one/ }\` ++// * @since 1.7 ++// */ ++// one(events: JQuery.TypeEventHandlers): this; ++// /** ++// * Set the CSS outer height of each element in the set of matched elements. ++// * @param value_function _@param_ `value_function` ++// *
        ++// * * `value` — A number representing the number of pixels, or a number along with an optional unit of measure ++// * appended (as a string).
        ++// * * `function` — A function returning the outer height to set. Receives the index position of the element in the set ++// * and the old outer height as arguments. Within the function, `this` refers to the current element in ++// * the set. ++// * @see \`{@link https://api.jquery.com/outerHeight/ }\` ++// * @since 1.8.0 ++// * @example ​ ````Change the outer height of each div the first time it is clicked (and change its color). ++// ```html ++// ++// ++// ++// ++// outerHeight demo ++// ++// ++// ++// ++// ​ ++//
        d
        ++//
        d
        ++//
        d
        ++//
        d
        ++//
        d
        ++// ​ ++// ++// ​ ++// ++// ++// ``` ++// */ ++// outerHeight(value_function: string | number | ((this: TElement, index: number, height: number) => string | number), ++// includeMargin?: boolean): this; ++// /** ++// * Get the current computed outer height (including padding, border, and optionally margin) for the first element in the set of matched elements. ++// * @param includeMargin A Boolean indicating whether to include the element's margin in the calculation. ++// * @see \`{@link https://api.jquery.com/outerHeight/ }\` ++// * @since 1.2.6 ++// * @example ​ ````Get the outerHeight of a paragraph. ++// ```html ++// ++// ++// ++// ++// outerHeight demo ++// ++// ++// ++// ++// ​ ++//

        Hello

        ++// ​ ++// ++// ​ ++// ++// ++// ``` ++// */ ++// outerHeight(includeMargin?: boolean): number | undefined; ++// /** ++// * Set the CSS outer width of each element in the set of matched elements. ++// * @param value_function _@param_ `value_function` ++// *
        ++// * * `value` — A number representing the number of pixels, or a number along with an optional unit of measure ++// * appended (as a string).
        ++// * * `function` — A function returning the outer width to set. Receives the index position of the element in the set ++// * and the old outer width as arguments. Within the function, `this` refers to the current element in ++// * the set. ++// * @see \`{@link https://api.jquery.com/outerWidth/ }\` ++// * @since 1.8.0 ++// * @example ​ ````Change the outer width of each div the first time it is clicked (and change its color). ++// ```html ++// ++// ++// ++// ++// outerWidth demo ++// ++// ++// ++// ++// ​ ++//
        d
        ++//
        d
        ++//
        d
        ++//
        d
        ++//
        d
        ++// ​ ++// ++// ​ ++// ++// ++// ``` ++// */ ++// outerWidth(value_function: string | number | ((this: TElement, index: number, width: number) => string | number), ++// includeMargin?: boolean): this; ++// /** ++// * Get the current computed outer width (including padding, border, and optionally margin) for the first element in the set of matched elements. ++// * @param includeMargin A Boolean indicating whether to include the element's margin in the calculation. ++// * @see \`{@link https://api.jquery.com/outerWidth/ }\` ++// * @since 1.2.6 ++// * @example ​ ````Get the outerWidth of a paragraph. ++// ```html ++// ++// ++// ++// ++// outerWidth demo ++// ++// ++// ++// ++// ​ ++//

        Hello

        ++// ​ ++// ++// ​ ++// ++// ++// ``` ++// */ ++// outerWidth(includeMargin?: boolean): number | undefined; ++// /** ++// * Get the parent of each element in the current set of matched elements, optionally filtered by a selector. ++// * @param selector A string containing a selector expression to match elements against. ++// * @see \`{@link https://api.jquery.com/parent/ }\` ++// * @since 1.0 ++// * @example ​ ````Shows the parent of each element as (parent > child). Check the View Source to see the raw html. ++// ```html ++// ++// ++// ++// ++// parent demo ++// ++// ++// ++// ++// ​ ++//
        div, ++// span, ++// b ++//
        ++// ​ ++//

        p, ++// span, ++// em ++// ++//

        ++// ​ ++//
        div, ++// strong, ++// span, ++// em, ++// b, ++// ++// ++// b ++//
        ++// ​ ++// ++// ​ ++// ++// ++// ``` ++// * @example ​ ````Find the parent element of each paragraph with a class "selected". ++// ```html ++// ++// ++// ++// ++// parent demo ++// ++// ++// ++// ​ ++//

        Hello

        ++//

        Hello Again

        ++// ​ ++// ++// ​ ++// ++// ++// ``` ++// */ ++// parent(selector?: JQuery.Selector): this; ++// /** ++// * Get the ancestors of each element in the current set of matched elements, optionally filtered by a selector. ++// * @param selector A string containing a selector expression to match elements against. ++// * @see \`{@link https://api.jquery.com/parents/ }\` ++// * @since 1.0 ++// * @example ​ ````Find all parent elements of each b. ++// ```html ++// ++// ++// ++// ++// parents demo ++// ++// ++// ++// ++// ​ ++//
        ++//

        ++// ++// My parents are: ++// ++//

        ++//
        ++// ​ ++// ++// ​ ++// ++// ++// ``` ++// * @example ​ ````Click to find all unique div parent elements of each span. ++// ```html ++// ++// ++// ++// ++// parents demo ++// ++// ++// ++// ++// ​ ++//

        ++//

        ++//
        Hello
        ++// Hello Again ++//
        ++//
        ++// And Hello Again ++//
        ++//

        ++// Click Hellos to toggle their parents. ++// ​ ++// ++// ​ ++// ++// ++// ``` ++// */ ++// parents(selector?: JQuery.Selector): this; ++// /** ++// * Get the ancestors of each element in the current set of matched elements, up to but not including the element matched by the selector, DOM node, or jQuery object. ++// * @param selector_element _@param_ `selector_element` ++// *
        ++// * * `selector` — A string containing a selector expression to indicate where to stop matching ancestor elements.
        ++// * * `element` — A DOM node or jQuery object indicating where to stop matching ancestor elements. ++// * @param filter A string containing a selector expression to match elements against. ++// * @see \`{@link https://api.jquery.com/parentsUntil/ }\` ++// * @since 1.4 ++// * @since 1.6 ++// * @example ​ ````Find the ancestors of <li class="item-a"> up to <ul class="level-1"> and give them a red background color. Also, find ancestors of <li class="item-2"> that have a class of "yes" up to <ul class="level-1"> and give them a green border. ++// ```html ++// ++// ++// ++// ++// parentsUntil demo ++// ++// ++// ++// ​ ++//
          ++//
        • I
        • ++//
        • II ++//
            ++//
          • A
          • ++//
          • B ++//
              ++//
            • 1
            • ++//
            • 2
            • ++//
            • 3
            • ++//
            ++//
          • ++//
          • C
          • ++//
          ++//
        • ++//
        • III
        • ++//
        ++// ​ ++// ++// ​ ++// ++// ++// ``` ++// */ ++// parentsUntil(selector_element?: JQuery.Selector | Element | JQuery, filter?: JQuery.Selector): this; ++// /** ++// * Get the current coordinates of the first element in the set of matched elements, relative to the offset parent. ++// * @see \`{@link https://api.jquery.com/position/ }\` ++// * @since 1.2 ++// * @example ​ ````Access the position of the second paragraph: ++// ```html ++// ++// ++// ++// ++// position demo ++// ++// ++// ++// ++// ​ ++//
        ++//

        Hello

        ++//
        ++//

        ++// ​ ++// ++// ​ ++// ++// ++// ``` ++// */ ++// position(): JQuery.Coordinates; ++// /** ++// * Insert content, specified by the parameter, to the beginning of each element in the set of matched elements. ++// * @param contents One or more additional DOM elements, text nodes, arrays of elements and text nodes, HTML strings, or ++// * jQuery objects to insert at the beginning of each element in the set of matched elements. ++// * @see \`{@link https://api.jquery.com/prepend/ }\` ++// * @since 1.0 ++// * @example ​ ````Prepends some HTML to all paragraphs. ++// ```html ++// ++// ++// ++// ++// prepend demo ++// ++// ++// ++// ++// ​ ++//

        there, friend!

        ++//

        amigo!

        ++// ​ ++// ++// ​ ++// ++// ++// ``` ++// * @example ​ ````Prepends a DOM Element to all paragraphs. ++// ```html ++// ++// ++// ++// ++// prepend demo ++// ++// ++// ++// ++// ​ ++//

        is what I'd say

        ++//

        is what I said

        ++// ​ ++// ++// ​ ++// ++// ++// ``` ++// * @example ​ ````Prepends a jQuery object (similar to an Array of DOM Elements) to all paragraphs. ++// ```html ++// ++// ++// ++// ++// prepend demo ++// ++// ++// ++// ++// ​ ++//

        is what was said.

        Hello ++// ​ ++// ++// ​ ++// ++// ++// ``` ++// */ ++// prepend(...contents: Array>>): this; ++// /** ++// * Insert content, specified by the parameter, to the beginning of each element in the set of matched elements. ++// * @param funсtion A function that returns an HTML string, DOM element(s), text node(s), or jQuery object to insert at ++// * the beginning of each element in the set of matched elements. Receives the index position of the ++// * element in the set and the old HTML value of the element as arguments. Within the function, `this` ++// * refers to the current element in the set. ++// * @see \`{@link https://api.jquery.com/prepend/ }\` ++// * @since 1.4 ++// */ ++// prepend(funсtion: (this: TElement, index: number, html: string) => JQuery.htmlString | JQuery.TypeOrArray>): this; ++// /** ++// * Insert every element in the set of matched elements to the beginning of the target. ++// * @param target A selector, element, HTML string, array of elements, or jQuery object; the matched set of elements ++// * will be inserted at the beginning of the element(s) specified by this parameter. ++// * @see \`{@link https://api.jquery.com/prependTo/ }\` ++// * @since 1.0 ++// * @example ​ ````Prepend all spans to the element with the ID "foo" (Check .prepend() documentation for more examples) ++// ```html ++// ++// ++// ++// ++// prependTo demo ++// ++// ++// ++// ++// ​ ++//
        FOO!
        ++// I have something to say... ++// ​ ++// ++// ​ ++// ++// ++// ``` ++// */ ++// prependTo(target: JQuery.Selector | JQuery.htmlString | JQuery.TypeOrArray | JQuery): this; ++// /** ++// * Get the immediately preceding sibling of each element in the set of matched elements. If a selector is provided, it retrieves the previous sibling only if it matches that selector. ++// * @param selector A string containing a selector expression to match elements against. ++// * @see \`{@link https://api.jquery.com/prev/ }\` ++// * @since 1.0 ++// * @example ​ ````Find the very previous sibling of each div. ++// ```html ++// ++// ++// ++// ++// prev demo ++// ++// ++// ++// ++// ​ ++//
        ++//
        ++//
        has child
        ++//
        ++//
        ++//
        ++//
        ++//
        ++//

        ++// ​ ++// ++// ​ ++// ++// ++// ``` ++// * @example ​ ````For each paragraph, find the very previous sibling that has a class "selected". ++// ```html ++// ++// ++// ++// ++// prev demo ++// ++// ++// ++// ​ ++//
        Hello
        ++//

        Hello Again

        ++//

        And Again

        ++// ​ ++// ++// ​ ++// ++// ++// ``` ++// */ ++// prev(selector?: JQuery.Selector): this; ++// /** ++// * Get all preceding siblings of each element in the set of matched elements, optionally filtered by a selector. ++// * @param selector A string containing a selector expression to match elements against. ++// * @see \`{@link https://api.jquery.com/prevAll/ }\` ++// * @since 1.2 ++// * @example ​ ````Locate all the divs preceding the last div and give them a class. ++// ```html ++// ++// ++// ++// ++// prevAll demo ++// ++// ++// ++// ++// ​ ++//
        ++//
        ++//
        ++//
        ++// ​ ++// ++// ​ ++// ++// ++// ``` ++// */ ++// prevAll(selector?: JQuery.Selector): this; ++// /** ++// * Get all preceding siblings of each element up to but not including the element matched by the selector, DOM node, or jQuery object. ++// * @param selector_element _@param_ `selector_element` ++// *
        ++// * * `selector` — A string containing a selector expression to indicate where to stop matching preceding sibling elements.
        ++// * * `element` — A DOM node or jQuery object indicating where to stop matching preceding sibling elements. ++// * @param filter A string containing a selector expression to match elements against. ++// * @see \`{@link https://api.jquery.com/prevUntil/ }\` ++// * @since 1.4 ++// * @since 1.6 ++// * @example ​ ````Find the siblings that precede <dt id="term-2"> up to the preceding <dt> and give them a red background color. Also, find previous <dd> siblings of <dt id="term-3"> up to <dt id="term-1"> and give them a green text color. ++// ```html ++// ++// ++// ++// ++// prevUntil demo ++// ++// ++// ++// ​ ++//
        ++//
        term 1
        ++//
        definition 1-a
        ++//
        definition 1-b
        ++//
        definition 1-c
        ++//
        definition 1-d
        ++// ​ ++//
        term 2
        ++//
        definition 2-a
        ++//
        definition 2-b
        ++//
        definition 2-c
        ++// ​ ++//
        term 3
        ++//
        definition 3-a
        ++//
        definition 3-b
        ++//
        ++// ​ ++// ++// ​ ++// ++// ++// ``` ++// */ ++// prevUntil(selector_element?: JQuery.Selector | Element | JQuery, filter?: JQuery.Selector): this; ++// /** ++// * Return a Promise object to observe when all actions of a certain type bound to the collection, queued or not, have finished. ++// * @param type The type of queue that needs to be observed. ++// * @param target Object onto which the promise methods have to be attached ++// * @see \`{@link https://api.jquery.com/promise/ }\` ++// * @since 1.6 ++// */ ++// promise(type: string, target: T): T & JQuery.Promise; ++// /** ++// * Return a Promise object to observe when all actions of a certain type bound to the collection, queued or not, have finished. ++// * @param target Object onto which the promise methods have to be attached ++// * @see \`{@link https://api.jquery.com/promise/ }\` ++// * @since 1.6 ++// */ ++// promise(target: T): T & JQuery.Promise; ++// /** ++// * Return a Promise object to observe when all actions of a certain type bound to the collection, queued or not, have finished. ++// * @param type The type of queue that needs to be observed. ++// * @see \`{@link https://api.jquery.com/promise/ }\` ++// * @since 1.6 ++// * @example ​ ````Using .promise() on a collection with no active animation returns a resolved Promise: ++// ```javascript ++// var div = $( "
        " ); ++// ​ ++// div.promise().done(function( arg1 ) { ++// // Will fire right away and alert "true" ++// alert( this === div && arg1 === div ); ++// }); ++// ``` ++// * @example ​ ````Resolve the returned Promise when all animations have ended (including those initiated in the animation callback or added later on): ++// ```html ++// ++// ++// ++// ++// promise demo ++// ++// ++// ++// ++// ​ ++// ++//

        Ready...

        ++//
        ++//
        ++//
        ++//
        ++// ​ ++// ++// ​ ++// ++// ++// ``` ++// * @example ​ ````Resolve the returned Promise using a $.when() statement (the .promise() method makes it possible to do this with jQuery collections): ++// ```html ++// ++// ++// ++// ++// promise demo ++// ++// ++// ++// ++// ​ ++// ++//

        Ready...

        ++//
        ++//
        ++//
        ++//
        ++// ​ ++// ++// ​ ++// ++// ++// ``` ++// */ ++// promise(type?: string): JQuery.Promise; ++// /** ++// * Set one or more properties for the set of matched elements. ++// * @param propertyName The name of the property to set. ++// * @param value_function _@param_ `value_function` ++// *
        ++// * * `value` — A value to set for the property.
        ++// * * `function` — A function returning the value to set. Receives the index position of the element in the set and the ++// * old property value as arguments. Within the function, the keyword `this` refers to the current element. ++// * @see \`{@link https://api.jquery.com/prop/ }\` ++// * @since 1.6 ++// */ ++// prop(propertyName: string, ++// value_function: string | number | boolean | symbol | object | null | undefined | ((this: TElement, index: number, oldPropertyValue: any) => any)): this; ++// /** ++// * Set one or more properties for the set of matched elements. ++// * @param properties An object of property-value pairs to set. ++// * @see \`{@link https://api.jquery.com/prop/ }\` ++// * @since 1.6 ++// * @example ​ ````Disable all checkboxes on the page. ++// ```html ++// ++// ++// ++// ++// prop demo ++// ++// ++// ++// ++// ​ ++// ++// ++// ++// ++// ​ ++// ++// ​ ++// ++// ++// ``` ++// */ ++// prop(properties: JQuery.PlainObject): this; ++// /** ++// * Get the value of a property for the first element in the set of matched elements. ++// * @param propertyName The name of the property to get. ++// * @see \`{@link https://api.jquery.com/prop/ }\` ++// * @since 1.6 ++// * @example ​ ````Display the checked property and attribute of a checkbox as it changes. ++// ```html ++// ++// ++// ++// ++// prop demo ++// ++// ++// ++// ++// ​ ++// ++// ++//

        ++// ​ ++// ++// ​ ++// ++// ++// ``` ++// */ ++// prop(propertyName: string): any; ++// /** ++// * Add a collection of DOM elements onto the jQuery stack. ++// * @param elements An array of elements to push onto the stack and make into a new jQuery object. ++// * @param name The name of a jQuery method that generated the array of elements. ++// * @param args The arguments that were passed in to the jQuery method (for serialization). ++// * @see \`{@link https://api.jquery.com/pushStack/ }\` ++// * @since 1.3 ++// */ ++// pushStack(elements: ArrayLike, name: string, args: any[]): this; ++// /** ++// * Add a collection of DOM elements onto the jQuery stack. ++// * @param elements An array of elements to push onto the stack and make into a new jQuery object. ++// * @see \`{@link https://api.jquery.com/pushStack/ }\` ++// * @since 1.0 ++// * @example ​ ````Add some elements onto the jQuery stack, then pop back off again. ++// ```javascript ++// jQuery([]) ++// .pushStack( document.getElementsByTagName( "div" ) ) ++// .remove() ++// .end(); ++// ``` ++// */ ++// pushStack(elements: ArrayLike): this; ++// /** ++// * Manipulate the queue of functions to be executed, once for each matched element. ++// * @param queueName A string containing the name of the queue. Defaults to fx, the standard effects queue. ++// * @param newQueue The new function to add to the queue, with a function to call that will dequeue the next item. ++// * An array of functions to replace the current queue contents. ++// * @see \`{@link https://api.jquery.com/queue/ }\` ++// * @since 1.2 ++// * @example ​ ````Set a queue array to delete the queue. ++// ```html ++// ++// ++// ++// ++// queue demo ++// ++// ++// ++// ++// ​ ++// ++// ++//
        ++// ​ ++// ++// ​ ++// ++// ++// ``` ++// */ ++// queue(queueName: string, newQueue: JQuery.TypeOrArray>): this; ++// /** ++// * Manipulate the queue of functions to be executed, once for each matched element. ++// * @param newQueue The new function to add to the queue, with a function to call that will dequeue the next item. ++// * An array of functions to replace the current queue contents. ++// * @see \`{@link https://api.jquery.com/queue/ }\` ++// * @since 1.2 ++// * @example ​ ````Queue a custom function. ++// ```html ++// ++// ++// ++// ++// queue demo ++// ++// ++// ++// ++// ​ ++// Click here... ++//
        ++// ​ ++// ++// ​ ++// ++// ++// ``` ++// */ ++// queue(newQueue: JQuery.TypeOrArray>): this; ++// /** ++// * Show the queue of functions to be executed on the matched elements. ++// * @param queueName A string containing the name of the queue. Defaults to fx, the standard effects queue. ++// * @see \`{@link https://api.jquery.com/queue/ }\` ++// * @since 1.2 ++// * @example ​ ````Show the length of the queue. ++// ```html ++// ++// ++// ++// ++// queue demo ++// ++// ++// ++// ++// ​ ++//

        The queue length is:

        ++//
        ++// ​ ++// ++// ​ ++// ++// ++// ``` ++// */ ++// queue(queueName?: string): JQuery.Queue; ++// /** ++// * Specify a function to execute when the DOM is fully loaded. ++// * @param handler A function to execute after the DOM is ready. ++// * @see \`{@link https://api.jquery.com/ready/ }\` ++// * @since 1.0 ++// * @deprecated ​ Deprecated since 3.0. Use `jQuery(function() { })`. ++// * @example ​ ````Display a message when the DOM is loaded. ++// ```html ++// ++// ++// ++// ++// ready demo ++// ++// ++// ++// ++// ++// ​ ++//

        Not loaded yet.

        ++// ​ ++// ++// ++// ``` ++// */ ++// ready(handler: ($: JQueryStatic) => void): this; ++// /** ++// * Remove the set of matched elements from the DOM. ++// * @param selector A selector expression that filters the set of matched elements to be removed. ++// * @see \`{@link https://api.jquery.com/remove/ }\` ++// * @since 1.0 ++// * @example ​ ````Removes all paragraphs from the DOM ++// ```html ++// ++// ++// ++// ++// remove demo ++// ++// ++// ++// ++// ​ ++//

        Hello

        ++// how are ++//

        you?

        ++// ++// ​ ++// ++// ​ ++// ++// ++// ``` ++// * @example ​ ````Removes all paragraphs that contain "Hello" from the DOM. Analogous to doing $("p").filter(":contains('Hello')").remove(). ++// ```html ++// ++// ++// ++// ++// remove demo ++// ++// ++// ++// ++// ​ ++//

        Hello

        ++// how are ++//

        you?

        ++// ++// ​ ++// ++// ​ ++// ++// ++// ``` ++// */ ++// remove(selector?: string): this; ++// /** ++// * Remove an attribute from each element in the set of matched elements. ++// * @param attributeName An attribute to remove; as of version 1.7, it can be a space-separated list of attributes. ++// * @see \`{@link https://api.jquery.com/removeAttr/ }\` ++// * @since 1.0 ++// * @example ​ ````Clicking the button changes the title of the input next to it. Move the mouse pointer over the text input to see the effect of adding and removing the title attribute. ++// ```html ++// ++// ++// ++// ++// removeAttr demo ++// ++// ++// ++// ​ ++// ++// ++//
        ++// ​ ++// ++// ​ ++// ++// ++// ``` ++// */ ++// removeAttr(attributeName: string): this; ++// /** ++// * Remove a single class, multiple classes, or all classes from each element in the set of matched elements. ++// * @param className_function _@param_ `className_function` ++// *
        ++// * * `className` — One or more space-separated classes to be removed from the class attribute of each matched element.
        ++// * * `function` — A function returning one or more space-separated class names to be removed. Receives the index ++// * position of the element in the set and the old class value as arguments. ++// * @see \`{@link https://api.jquery.com/removeClass/ }\` ++// * @since 1.0 ++// * @since 1.4 ++// * @since 3.3 ++// * @example ​ ````Remove the class 'blue' from the matched elements. ++// ```html ++// ++// ++// ++// ++// removeClass demo ++// ++// ++// ++// ++// ​ ++//

        Hello

        ++//

        and

        ++//

        then

        ++//

        Goodbye

        ++// ​ ++// ++// ​ ++// ++// ++// ``` ++// * @example ​ ````Remove the class 'blue' and 'under' from the matched elements. ++// ```html ++// ++// ++// ++// ++// removeClass demo ++// ++// ++// ++// ++// ​ ++//

        Hello

        ++//

        and

        ++//

        then

        ++//

        Goodbye

        ++// ​ ++// ++// ​ ++// ++// ++// ``` ++// * @example ​ ````Remove all the classes from the matched elements. ++// ```html ++// ++// ++// ++// ++// removeClass demo ++// ++// ++// ++// ++// ​ ++//

        Hello

        ++//

        and

        ++//

        then

        ++//

        Goodbye

        ++// ​ ++// ++// ​ ++// ++// ++// ``` ++// */ ++// removeClass(className_function?: JQuery.TypeOrArray | ((this: TElement, index: number, className: string) => string)): this; ++// /** ++// * Remove a previously-stored piece of data. ++// * @param name A string naming the piece of data to delete. ++// * An array or space-separated string naming the pieces of data to delete. ++// * @see \`{@link https://api.jquery.com/removeData/ }\` ++// * @since 1.2.3 ++// * @since 1.7 ++// * @example ​ ````Set a data store for 2 names then remove one of them. ++// ```html ++// ++// ++// ++// ++// removeData demo ++// ++// ++// ++// ++// ​ ++//
        value1 before creation:
        ++//
        value1 after creation:
        ++//
        value1 after removal:
        ++//
        value2 after removal:
        ++// ​ ++// ++// ​ ++// ++// ++// ``` ++// */ ++// removeData(name?: JQuery.TypeOrArray): this; ++// /** ++// * Remove a property for the set of matched elements. ++// * @param propertyName The name of the property to remove. ++// * @see \`{@link https://api.jquery.com/removeProp/ }\` ++// * @since 1.6 ++// * @example ​ ````Set a numeric property on a paragraph and then remove it. ++// ```html ++// ++// ++// ++// ++// removeProp demo ++// ++// ++// ++// ++// ​ ++//

        ++// ​ ++// ++// ​ ++// ++// ++// ``` ++// */ ++// removeProp(propertyName: string): this; ++// /** ++// * Replace each target element with the set of matched elements. ++// * @param target A selector string, jQuery object, DOM element, or array of elements indicating which element(s) to replace. ++// * @see \`{@link https://api.jquery.com/replaceAll/ }\` ++// * @since 1.2 ++// * @example ​ ````Replace all the paragraphs with bold words. ++// ```html ++// ++// ++// ++// ++// replaceAll demo ++// ++// ++// ++// ​ ++//

        Hello

        ++//

        cruel

        ++//

        World

        ++// ​ ++// ++// ​ ++// ++// ++// ``` ++// */ ++// replaceAll(target: JQuery.Selector | JQuery | JQuery.TypeOrArray): this; ++// /** ++// * Replace each element in the set of matched elements with the provided new content and return the set of elements that was removed. ++// * @param newContent_function _@param_ `newContent_function` ++// *
        ++// * * `newContent` — The content to insert. May be an HTML string, DOM element, array of DOM elements, or jQuery object.
        ++// * * `function` — A function that returns content with which to replace the set of matched elements. ++// * @see \`{@link https://api.jquery.com/replaceWith/ }\` ++// * @since 1.2 ++// * @since 1.4 ++// * @example ​ ````On click, replace the button with a div containing the same word. ++// ```html ++// ++// ++// ++// ++// replaceWith demo ++// ++// ++// ++// ++// ​ ++// ++// ++// ++// ​ ++// ++// ​ ++// ++// ++// ``` ++// * @example ​ ````Replace all paragraphs with bold words. ++// ```html ++// ++// ++// ++// ++// replaceWith demo ++// ++// ++// ++// ​ ++//

        Hello

        ++//

        cruel

        ++//

        World

        ++// ​ ++// ++// ​ ++// ++// ++// ``` ++// * @example ​ ````On click, replace each paragraph with a div that is already in the DOM and selected with the $() function. Notice it doesn't clone the object but rather moves it to replace the paragraph. ++// ```html ++// ++// ++// ++// ++// replaceWith demo ++// ++// ++// ++// ++// ​ ++//

        Hello

        ++//

        cruel

        ++//

        World

        ++//
        Replaced!
        ++// ​ ++// ++// ​ ++// ++// ++// ``` ++// * @example ​ ````On button click, replace the containing div with its child divs and append the class name of the selected element to the paragraph. ++// ```html ++// ++// ++// ++// ++// replaceWith demo ++// ++// ++// ++// ++// ​ ++//

        ++// ++//

        ++//
        ++//
        Scooby
        ++//
        Dooby
        ++//
        Doo
        ++//
        ++// ​ ++// ++// ​ ++// ++// ++// ``` ++// */ ++// replaceWith(newContent_function: JQuery.htmlString | ++// JQuery | ++// JQuery.TypeOrArray | ++// JQuery.Node | ++// ((this: TElement, index: number, oldhtml: JQuery.htmlString) => JQuery.htmlString | ++// JQuery | ++// JQuery.TypeOrArray | ++// JQuery.Node)): this; ++// /** ++// * Bind an event handler to the "resize" JavaScript event, or trigger that event on an element. ++// * @param eventData An object containing data that will be passed to the event handler. ++// * @param handler A function to execute each time the event is triggered. ++// * @see \`{@link https://api.jquery.com/resize/ }\` ++// * @since 1.4.3 ++// * @deprecated ​ Deprecated since 3.3. Use \`{@link on }\` or \`{@link trigger }\`. ++// * ++// * **Cause**: The `.on()` and `.trigger()` methods can set an event handler or generate an event for any event type, and should be used instead of the shortcut methods. This message also applies to the other event shorthands, including: blur, focus, focusin, focusout, resize, scroll, dblclick, mousedown, mouseup, mousemove, mouseover, mouseout, mouseenter, mouseleave, change, select, submit, keydown, keypress, keyup, and contextmenu. ++// * ++// * **Solution**: Instead of `.click(fn)` use `.on("click", fn)`. Instead of `.click()` use `.trigger("click")`. ++// */ ++// resize(eventData: TData, ++// handler: JQuery.TypeEventHandler): this; ++// /** ++// * Bind an event handler to the "resize" JavaScript event, or trigger that event on an element. ++// * @param handler A function to execute each time the event is triggered. ++// * @see \`{@link https://api.jquery.com/resize/ }\` ++// * @since 1.0 ++// * @deprecated ​ Deprecated since 3.3. Use \`{@link on }\` or \`{@link trigger }\`. ++// * ++// * **Cause**: The `.on()` and `.trigger()` methods can set an event handler or generate an event for any event type, and should be used instead of the shortcut methods. This message also applies to the other event shorthands, including: blur, focus, focusin, focusout, resize, scroll, dblclick, mousedown, mouseup, mousemove, mouseover, mouseout, mouseenter, mouseleave, change, select, submit, keydown, keypress, keyup, and contextmenu. ++// * ++// * **Solution**: Instead of `.click(fn)` use `.on("click", fn)`. Instead of `.click()` use `.trigger("click")`. ++// * @example ​ ````To see the window width while (or after) it is resized, try: ++// ```javascript ++// $( window ).resize(function() { ++// $( "body" ).prepend( "
        " + $( window ).width() + "
        " ); ++// }); ++// ``` ++// */ ++// resize(handler?: JQuery.TypeEventHandler | ++// false): this; ++// /** ++// * Bind an event handler to the "scroll" JavaScript event, or trigger that event on an element. ++// * @param eventData An object containing data that will be passed to the event handler. ++// * @param handler A function to execute each time the event is triggered. ++// * @see \`{@link https://api.jquery.com/scroll/ }\` ++// * @since 1.4.3 ++// * @deprecated ​ Deprecated since 3.3. Use \`{@link on }\` or \`{@link trigger }\`. ++// * ++// * **Cause**: The `.on()` and `.trigger()` methods can set an event handler or generate an event for any event type, and should be used instead of the shortcut methods. This message also applies to the other event shorthands, including: blur, focus, focusin, focusout, resize, scroll, dblclick, mousedown, mouseup, mousemove, mouseover, mouseout, mouseenter, mouseleave, change, select, submit, keydown, keypress, keyup, and contextmenu. ++// * ++// * **Solution**: Instead of `.click(fn)` use `.on("click", fn)`. Instead of `.click()` use `.trigger("click")`. ++// */ ++// scroll(eventData: TData, ++// handler: JQuery.TypeEventHandler): this; ++// /** ++// * Bind an event handler to the "scroll" JavaScript event, or trigger that event on an element. ++// * @param handler A function to execute each time the event is triggered. ++// * @see \`{@link https://api.jquery.com/scroll/ }\` ++// * @since 1.0 ++// * @deprecated ​ Deprecated since 3.3. Use \`{@link on }\` or \`{@link trigger }\`. ++// * ++// * **Cause**: The `.on()` and `.trigger()` methods can set an event handler or generate an event for any event type, and should be used instead of the shortcut methods. This message also applies to the other event shorthands, including: blur, focus, focusin, focusout, resize, scroll, dblclick, mousedown, mouseup, mousemove, mouseover, mouseout, mouseenter, mouseleave, change, select, submit, keydown, keypress, keyup, and contextmenu. ++// * ++// * **Solution**: Instead of `.click(fn)` use `.on("click", fn)`. Instead of `.click()` use `.trigger("click")`. ++// * @example ​ ````To do something when your page is scrolled: ++// ```html ++// ++// ++// ++// ++// scroll demo ++// ++// ++// ++// ++// ​ ++//
        Try scrolling the iframe.
        ++//

        Paragraph - Scroll happened!

        ++// ​ ++// ++// ​ ++// ++// ++// ``` ++// */ ++// scroll(handler?: JQuery.TypeEventHandler | ++// false): this; ++// /** ++// * Set the current horizontal position of the scroll bar for each of the set of matched elements. ++// * @param value An integer indicating the new position to set the scroll bar to. ++// * @see \`{@link https://api.jquery.com/scrollLeft/ }\` ++// * @since 1.2.6 ++// * @example ​ ````Set the scrollLeft of a div. ++// ```html ++// ++// ++// ++// ++// scrollLeft demo ++// ++// ++// ++// ++// ​ ++//

        lalala

        Hello

        ++// ​ ++// ++// ​ ++// ++// ++// ``` ++// */ ++// scrollLeft(value: number): this; ++// /** ++// * Get the current horizontal position of the scroll bar for the first element in the set of matched elements. ++// * @see \`{@link https://api.jquery.com/scrollLeft/ }\` ++// * @since 1.2.6 ++// * @example ​ ````Get the scrollLeft of a paragraph. ++// ```html ++// ++// ++// ++// ++// scrollLeft demo ++// ++// ++// ++// ++// ​ ++//

        Hello

        ++// ​ ++// ++// ​ ++// ++// ++// ``` ++// */ ++// scrollLeft(): number | undefined; ++// /** ++// * Set the current vertical position of the scroll bar for each of the set of matched elements. ++// * @param value A number indicating the new position to set the scroll bar to. ++// * @see \`{@link https://api.jquery.com/scrollTop/ }\` ++// * @since 1.2.6 ++// * @example ​ ````Set the scrollTop of a div. ++// ```html ++// ++// ++// ++// ++// scrollTop demo ++// ++// ++// ++// ++// ​ ++//

        lalala

        Hello

        ++// ​ ++// ++// ​ ++// ++// ++// ``` ++// */ ++// scrollTop(value: number): this; ++// /** ++// * Get the current vertical position of the scroll bar for the first element in the set of matched elements or set the vertical position of the scroll bar for every matched element. ++// * @see \`{@link https://api.jquery.com/scrollTop/ }\` ++// * @since 1.2.6 ++// * @example ​ ````Get the scrollTop of a paragraph. ++// ```html ++// ++// ++// ++// ++// scrollTop demo ++// ++// ++// ++// ++// ​ ++//

        Hello

        ++// ​ ++// ++// ​ ++// ++// ++// ``` ++// */ ++// scrollTop(): number | undefined; ++// /** ++// * Bind an event handler to the "select" JavaScript event, or trigger that event on an element. ++// * @param eventData An object containing data that will be passed to the event handler. ++// * @param handler A function to execute each time the event is triggered. ++// * @see \`{@link https://api.jquery.com/select/ }\` ++// * @since 1.4.3 ++// * @deprecated ​ Deprecated since 3.3. Use \`{@link on }\` or \`{@link trigger }\`. ++// * ++// * **Cause**: The `.on()` and `.trigger()` methods can set an event handler or generate an event for any event type, and should be used instead of the shortcut methods. This message also applies to the other event shorthands, including: blur, focus, focusin, focusout, resize, scroll, dblclick, mousedown, mouseup, mousemove, mouseover, mouseout, mouseenter, mouseleave, change, select, submit, keydown, keypress, keyup, and contextmenu. ++// * ++// * **Solution**: Instead of `.click(fn)` use `.on("click", fn)`. Instead of `.click()` use `.trigger("click")`. ++// */ ++// select(eventData: TData, ++// handler: JQuery.TypeEventHandler): this; ++// /** ++// * Bind an event handler to the "select" JavaScript event, or trigger that event on an element. ++// * @param handler A function to execute each time the event is triggered. ++// * @see \`{@link https://api.jquery.com/select/ }\` ++// * @since 1.0 ++// * @deprecated ​ Deprecated since 3.3. Use \`{@link on }\` or \`{@link trigger }\`. ++// * ++// * **Cause**: The `.on()` and `.trigger()` methods can set an event handler or generate an event for any event type, and should be used instead of the shortcut methods. This message also applies to the other event shorthands, including: blur, focus, focusin, focusout, resize, scroll, dblclick, mousedown, mouseup, mousemove, mouseover, mouseout, mouseenter, mouseleave, change, select, submit, keydown, keypress, keyup, and contextmenu. ++// * ++// * **Solution**: Instead of `.click(fn)` use `.on("click", fn)`. Instead of `.click()` use `.trigger("click")`. ++// * @example ​ ````To do something when text in input boxes is selected: ++// ```html ++// ++// ++// ++// ++// select demo ++// ++// ++// ++// ++// ​ ++//

        Click and drag the mouse to select text in the inputs.

        ++// ++// ++//
        ++// ​ ++// ++// ​ ++// ++// ++// ``` ++// * @example ​ ````To trigger the select event on all input elements, try: ++// ```javascript ++// $( "input" ).select(); ++// ``` ++// */ ++// select(handler?: JQuery.TypeEventHandler | ++// false): this; ++// /** ++// * Encode a set of form elements as a string for submission. ++// * @see \`{@link https://api.jquery.com/serialize/ }\` ++// * @since 1.0 ++// * @example ​ ````Serialize a form to a query string that could be sent to a server in an Ajax request. ++// ```html ++// ++// ++// ++// ++// serialize demo ++// ++// ++// ++// ++// ​ ++//
        ++// ++// ​ ++//
        ++// ++// ​ ++//
        ++// ++// ++// ++// ++// ​ ++//
        ++// ++// ++// ++// ++//
        ++// ​ ++//

        ++// ​ ++// ++// ​ ++// ++// ++// ``` ++// */ ++// serialize(): string; ++// /** ++// * Encode a set of form elements as an array of names and values. ++// * @see \`{@link https://api.jquery.com/serializeArray/ }\` ++// * @since 1.2 ++// * @example ​ ````Get the values from a form, iterate through them, and append them to a results display. ++// ```html ++// ++// ++// ++// ++// serializeArray demo ++// ++// ++// ++// ++// ​ ++//

        Results:

        ++//
        ++// ++// ++//
        ++// ++// ++// ++// ++// ++// ++// ++// ++//
        ++// ​ ++// ++// ​ ++// ++// ++// ``` ++// */ ++// serializeArray(): JQuery.NameValuePair[]; ++// /** ++// * Display the matched elements. ++// * @param duration A string or number determining how long the animation will run. ++// * @param easing A string indicating which easing function to use for the transition. ++// * @param complete A function to call once the animation is complete, called once per matched element. ++// * @see \`{@link https://api.jquery.com/show/ }\` ++// * @since 1.4.3 ++// */ ++// show(duration: JQuery.Duration, easing: string, complete: (this: TElement) => void): this; ++// /** ++// * Display the matched elements. ++// * @param duration A string or number determining how long the animation will run. ++// * @param easing_complete _@param_ `easing_complete` ++// *
        ++// * * `easing` — A string indicating which easing function to use for the transition.
        ++// * * `complete` — A function to call once the animation is complete, called once per matched element. ++// * @see \`{@link https://api.jquery.com/show/ }\` ++// * @since 1.0 ++// * @since 1.4.3 ++// * @example ​ ````Show the first div, followed by each next adjacent sibling div in order, with a 200ms animation. Each animation starts when the previous sibling div's animation ends. ++// ```html ++// ++// ++// ++// ++// show demo ++// ++// ++// ++// ++// ​ ++// ++// ++//
        Hello 3,
        ++//
        how
        ++//
        are
        ++//
        you?
        ++// ​ ++// ++// ​ ++// ++// ++// ``` ++// * @example ​ ````Show all span and input elements with an animation. Change the text once the animation is done. ++// ```html ++// ++// ++// ++// ++// show demo ++// ++// ++// ++// ++// ​ ++// ++// Are you sure? (type 'yes' if you are) ++//
        ++//
        ++// ++//
        ++//
        ++//

        I'm hidden...

        ++// ​ ++// ++// ​ ++// ++// ++// ``` ++// */ ++// show(duration: JQuery.Duration, easing_complete: string | ((this: TElement) => void)): this; ++// /** ++// * Display the matched elements. ++// * @param duration_complete_options _@param_ `duration_complete_options` ++// *
        ++// * * `duration` — A string or number determining how long the animation will run.
        ++// * * `complete` — A function to call once the animation is complete, called once per matched element.
        ++// * * `options` — A map of additional options to pass to the method. ++// * @see \`{@link https://api.jquery.com/show/ }\` ++// * @since 1.0 ++// * @example ​ ````Animates all hidden paragraphs to show slowly, completing the animation within 600 milliseconds. ++// ```html ++// ++// ++// ++// ++// show demo ++// ++// ++// ++// ++// ​ ++// ++//

        Hello 2

        ++// ​ ++// ++// ​ ++// ++// ++// ``` ++// */ ++// show(duration_complete_options?: JQuery.Duration | ((this: TElement) => void) | JQuery.EffectsOptions): this; ++// /** ++// * Get the siblings of each element in the set of matched elements, optionally filtered by a selector. ++// * @param selector A string containing a selector expression to match elements against. ++// * @see \`{@link https://api.jquery.com/siblings/ }\` ++// * @since 1.0 ++// * @example ​ ````Find the unique siblings of all yellow li elements in the 3 lists (including other yellow li elements if appropriate). ++// ```html ++// ++// ++// ++// ++// siblings demo ++// ++// ++// ++// ++// ​ ++//
          ++//
        • One
        • ++//
        • Two
        • ++//
        • Three
        • ++//
        • Four
        • ++//
        ++// ​ ++//
          ++//
        • Five
        • ++//
        • Six
        • ++//
        • Seven
        • ++//
        ++// ​ ++//
          ++//
        • Eight
        • ++//
        • Nine
        • ++//
        • Ten
        • ++//
        • Eleven
        • ++//
        ++// ​ ++//

        Unique siblings:

        ++// ​ ++// ++// ​ ++// ++// ++// ``` ++// * @example ​ ````Find all siblings with a class "selected" of each div. ++// ```html ++// ++// ++// ++// ++// siblings demo ++// ++// ++// ++// ​ ++//
        Hello
        ++//

        Hello Again

        ++//

        And Again

        ++// ​ ++// ++// ​ ++// ++// ++// ``` ++// */ ++// siblings(selector?: JQuery.Selector): this; ++// /** ++// * Reduce the set of matched elements to a subset specified by a range of indices. ++// * @param start An integer indicating the 0-based position at which the elements begin to be selected. If negative, ++// * it indicates an offset from the end of the set. ++// * @param end An integer indicating the 0-based position at which the elements stop being selected. If negative, ++// * it indicates an offset from the end of the set. If omitted, the range continues until the end of the set. ++// * @see \`{@link https://api.jquery.com/slice/ }\` ++// * @since 1.1.4 ++// * @example ​ ````Turns divs yellow based on a random slice. ++// ```html ++// ++// ++// ++// ++// slice demo ++// ++// ++// ++// ++// ​ ++//

        ++// Click the button!

        ++//
        ++//
        ++//
        ++//
        ++//
        ++//
        ++//
        ++//
        ++//
        ++// ​ ++// ++// ​ ++// ++// ++// ``` ++// * @example ​ ````Selects all paragraphs, then slices the selection to include only the first element. ++// ```javascript ++// $( "p" ).slice( 0, 1 ).wrapInner( "" ); ++// ``` ++// * @example ​ ````Selects all paragraphs, then slices the selection to include only the first and second element. ++// ```javascript ++// $( "p" ).slice( 0, 2 ).wrapInner( "" ); ++// ``` ++// * @example ​ ````Selects all paragraphs, then slices the selection to include only the second element. ++// ```javascript ++// $( "p" ).slice( 1, 2 ).wrapInner( "" ); ++// ``` ++// * @example ​ ````Selects all paragraphs, then slices the selection to include only the second and third element. ++// ```javascript ++// $( "p" ).slice( 1 ).wrapInner( "" ); ++// ``` ++// * @example ​ ````Selects all paragraphs, then slices the selection to include only the third element. ++// ```javascript ++// $( "p" ).slice( -1 ).wrapInner( "" ); ++// ``` ++// */ ++// slice(start: number, end?: number): this; ++// /** ++// * Display the matched elements with a sliding motion. ++// * @param duration A string or number determining how long the animation will run. ++// * @param easing A string indicating which easing function to use for the transition. ++// * @param complete A function to call once the animation is complete, called once per matched element. ++// * @see \`{@link https://api.jquery.com/slideDown/ }\` ++// * @since 1.4.3 ++// */ ++// slideDown(duration: JQuery.Duration, easing: string, complete?: (this: TElement) => void): this; ++// /** ++// * Display the matched elements with a sliding motion. ++// * @param duration_easing _@param_ `duration_easing` ++// *
        ++// * * `duration` — A string or number determining how long the animation will run.
        ++// * * `easing` — A string indicating which easing function to use for the transition. ++// * @param complete A function to call once the animation is complete, called once per matched element. ++// * @see \`{@link https://api.jquery.com/slideDown/ }\` ++// * @since 1.0 ++// * @since 1.4.3 ++// * @example ​ ````Animates all inputs to slide down, completing the animation within 1000 milliseconds. Once the animation is done, the input look is changed especially if it is the middle input which gets the focus. ++// ```html ++// ++// ++// ++// ++// slideDown demo ++// ++// ++// ++// ++// ​ ++//
        Push!
        ++// ++// ++// ++// ​ ++// ++// ​ ++// ++// ++// ``` ++// */ ++// slideDown(duration_easing: JQuery.Duration | string, complete: (this: TElement) => void): this; ++// /** ++// * Display the matched elements with a sliding motion. ++// * @param duration_easing_complete_options _@param_ `duration_easing_complete_options` ++// *
        ++// * * `duration` — A string or number determining how long the animation will run.
        ++// * * `easing` — A string indicating which easing function to use for the transition.
        ++// * * `complete` — A function to call once the animation is complete, called once per matched element.
        ++// * * `options` — A map of additional options to pass to the method. ++// * @see \`{@link https://api.jquery.com/slideDown/ }\` ++// * @since 1.0 ++// * @since 1.4.3 ++// * @example ​ ````Animates all divs to slide down and show themselves over 600 milliseconds. ++// ```html ++// ++// ++// ++// ++// slideDown demo ++// ++// ++// ++// ++// ​ ++// Click me! ++//
        ++//
        ++//
        ++// ​ ++// ++// ​ ++// ++// ++// ``` ++// */ ++// slideDown(duration_easing_complete_options?: JQuery.Duration | string | ((this: TElement) => void) | JQuery.EffectsOptions): this; ++// /** ++// * Display or hide the matched elements with a sliding motion. ++// * @param duration A string or number determining how long the animation will run. ++// * @param easing A string indicating which easing function to use for the transition. ++// * @param complete A function to call once the animation is complete, called once per matched element. ++// * @see \`{@link https://api.jquery.com/slideToggle/ }\` ++// * @since 1.4.3 ++// */ ++// slideToggle(duration: JQuery.Duration, easing: string, complete?: (this: TElement) => void): this; ++// /** ++// * Display or hide the matched elements with a sliding motion. ++// * @param duration_easing _@param_ `duration_easing` ++// *
        ++// * * `duration` — A string or number determining how long the animation will run.
        ++// * * `easing` — A string indicating which easing function to use for the transition. ++// * @param complete A function to call once the animation is complete, called once per matched element. ++// * @see \`{@link https://api.jquery.com/slideToggle/ }\` ++// * @since 1.0 ++// * @since 1.4.3 ++// * @example ​ ````Animates divs between dividers with a toggle that makes some appear and some disappear. ++// ```html ++// ++// ++// ++// ++// slideToggle demo ++// ++// ++// ++// ++// ​ ++//
        ++//
        ++//
        ++//
        ++//
        ++//
        ++//
        ++//
        ++//
        ++//
        ++//
        ++//

        There have been 0 toggled divs.

        ++// ​ ++// ++// ​ ++// ++// ++// ``` ++// */ ++// slideToggle(duration_easing: JQuery.Duration | string, complete: (this: TElement) => void): this; ++// /** ++// * Display or hide the matched elements with a sliding motion. ++// * @param duration_easing_complete_options _@param_ `duration_easing_complete_options` ++// *
        ++// * * `duration` — A string or number determining how long the animation will run.
        ++// * * `easing` — A string indicating which easing function to use for the transition.
        ++// * * `complete` — A function to call once the animation is complete, called once per matched element.
        ++// * * `options` — A map of additional options to pass to the method. ++// * @see \`{@link https://api.jquery.com/slideToggle/ }\` ++// * @since 1.0 ++// * @since 1.4.3 ++// * @example ​ ````Animates all paragraphs to slide up or down, completing the animation within 600 milliseconds. ++// ```html ++// ++// ++// ++// ++// slideToggle demo ++// ++// ++// ++// ++// ​ ++// ++//

        ++// This is the paragraph to end all paragraphs. You ++// should feel lucky to have seen such a paragraph in ++// your life. Congratulations! ++//

        ++// ​ ++// ++// ​ ++// ++// ++// ``` ++// */ ++// slideToggle(duration_easing_complete_options?: JQuery.Duration | string | ((this: TElement) => void) | JQuery.EffectsOptions): this; ++// /** ++// * Hide the matched elements with a sliding motion. ++// * @param duration A string or number determining how long the animation will run. ++// * @param easing A string indicating which easing function to use for the transition. ++// * @param complete A function to call once the animation is complete, called once per matched element. ++// * @see \`{@link https://api.jquery.com/slideUp/ }\` ++// * @since 1.4.3 ++// */ ++// slideUp(duration: JQuery.Duration, easing: string, complete?: (this: TElement) => void): this; ++// /** ++// * Hide the matched elements with a sliding motion. ++// * @param duration_easing _@param_ `duration_easing` ++// *
        ++// * * `duration` — A string or number determining how long the animation will run.
        ++// * * `easing` — A string indicating which easing function to use for the transition. ++// * @param complete A function to call once the animation is complete, called once per matched element. ++// * @see \`{@link https://api.jquery.com/slideUp/ }\` ++// * @since 1.0 ++// * @since 1.4.3 ++// * @example ​ ````Animates the parent paragraph to slide up, completing the animation within 200 milliseconds. Once the animation is done, it displays an alert. ++// ```html ++// ++// ++// ++// ++// slideUp demo ++// ++// ++// ++// ++// ​ ++//
        ++// ++// ++//
        ++// ​ ++//
        ++// ++// ++//
        ++// ​ ++//
        ++// ++// ++//
        ++// ​ ++//
        ++// ​ ++// ++// ​ ++// ++// ++// ``` ++// */ ++// slideUp(duration_easing: JQuery.Duration | string, complete: (this: TElement) => void): this; ++// /** ++// * Hide the matched elements with a sliding motion. ++// * @param duration_easing_complete_options _@param_ `duration_easing_complete_options` ++// *
        ++// * * `duration` — A string or number determining how long the animation will run.
        ++// * * `easing` — A string indicating which easing function to use for the transition.
        ++// * * `complete` — A function to call once the animation is complete, called once per matched element.
        ++// * * `options` — A map of additional options to pass to the method. ++// * @see \`{@link https://api.jquery.com/slideUp/ }\` ++// * @since 1.0 ++// * @since 1.4.3 ++// * @example ​ ````Animates all divs to slide up, completing the animation within 400 milliseconds. ++// ```html ++// ++// ++// ++// ++// slideUp demo ++// ++// ++// ++// ++// ​ ++// Click me! ++//
        ++//
        ++//
        ++//
        ++//
        ++// ​ ++// ++// ​ ++// ++// ++// ``` ++// */ ++// slideUp(duration_easing_complete_options?: JQuery.Duration | string | ((this: TElement) => void) | JQuery.EffectsOptions): this; ++// /** ++// * Stop the currently-running animation on the matched elements. ++// * @param queue The name of the queue in which to stop animations. ++// * @param clearQueue A Boolean indicating whether to remove queued animation as well. Defaults to false. ++// * @param jumpToEnd A Boolean indicating whether to complete the current animation immediately. Defaults to false. ++// * @see \`{@link https://api.jquery.com/stop/ }\` ++// * @since 1.7 ++// */ ++// stop(queue: string, clearQueue?: boolean, jumpToEnd?: boolean): this; ++// /** ++// * Stop the currently-running animation on the matched elements. ++// * @param clearQueue A Boolean indicating whether to remove queued animation as well. Defaults to false. ++// * @param jumpToEnd A Boolean indicating whether to complete the current animation immediately. Defaults to false. ++// * @see \`{@link https://api.jquery.com/stop/ }\` ++// * @since 1.2 ++// * @example ​ ````Click the Go button once to start the animation, then click the STOP button to stop it where it's currently positioned. Another option is to click several buttons to queue them up and see that stop just kills the currently playing one. ++// ```html ++// ++// ++// ++// ++// stop demo ++// ++// ++// ++// ++// ​ ++// ++// ++// ++//
        ++// ​ ++// ++// ​ ++// ++// ++// ``` ++// * @example ​ ````Click the slideToggle button to start the animation, then click again before the animation is completed. The animation will toggle the other direction from the saved starting point. ++// ```html ++// ++// ++// ++// ++// stop demo ++// ++// ++// ++// ++// ​ ++// ++//
        ++// ​ ++// ++// ​ ++// ++// ++// ``` ++// */ ++// stop(clearQueue?: boolean, jumpToEnd?: boolean): this; ++// /** ++// * Bind an event handler to the "submit" JavaScript event, or trigger that event on an element. ++// * @param eventData An object containing data that will be passed to the event handler. ++// * @param handler A function to execute each time the event is triggered. ++// * @see \`{@link https://api.jquery.com/submit/ }\` ++// * @since 1.4.3 ++// * @deprecated ​ Deprecated since 3.3. Use \`{@link on }\` or \`{@link trigger }\`. ++// * ++// * **Cause**: The `.on()` and `.trigger()` methods can set an event handler or generate an event for any event type, and should be used instead of the shortcut methods. This message also applies to the other event shorthands, including: blur, focus, focusin, focusout, resize, scroll, dblclick, mousedown, mouseup, mousemove, mouseover, mouseout, mouseenter, mouseleave, change, select, submit, keydown, keypress, keyup, and contextmenu. ++// * ++// * **Solution**: Instead of `.click(fn)` use `.on("click", fn)`. Instead of `.click()` use `.trigger("click")`. ++// */ ++// submit(eventData: TData, ++// handler: JQuery.TypeEventHandler): this; ++// /** ++// * Bind an event handler to the "submit" JavaScript event, or trigger that event on an element. ++// * @param handler A function to execute each time the event is triggered. ++// * @see \`{@link https://api.jquery.com/submit/ }\` ++// * @since 1.0 ++// * @deprecated ​ Deprecated since 3.3. Use \`{@link on }\` or \`{@link trigger }\`. ++// * ++// * **Cause**: The `.on()` and `.trigger()` methods can set an event handler or generate an event for any event type, and should be used instead of the shortcut methods. This message also applies to the other event shorthands, including: blur, focus, focusin, focusout, resize, scroll, dblclick, mousedown, mouseup, mousemove, mouseover, mouseout, mouseenter, mouseleave, change, select, submit, keydown, keypress, keyup, and contextmenu. ++// * ++// * **Solution**: Instead of `.click(fn)` use `.on("click", fn)`. Instead of `.click()` use `.trigger("click")`. ++// * @example ​ ````If you'd like to prevent forms from being submitted unless a flag variable is set, try: ++// ```html ++// ++// ++// ++// ++// submit demo ++// ++// ++// ++// ++// ​ ++//

        Type 'correct' to validate.

        ++//
        ++//
        ++// ++// ++//
        ++//
        ++// ++// ​ ++// ++// ​ ++// ++// ++// ``` ++// * @example ​ ````If you'd like to prevent forms from being submitted unless a flag variable is set, try: ++// ```javascript ++// $( "form" ).submit(function() { ++// return this.some_flag_variable; ++// }); ++// ``` ++// * @example ​ ````To trigger the submit event on the first form on the page, try: ++// ```javascript ++// $( "form:first" ).submit(); ++// ``` ++// */ ++// submit(handler?: JQuery.TypeEventHandler | ++// false): this; ++// /** ++// * Set the content of each element in the set of matched elements to the specified text. ++// * @param text_function _@param_ `text_function` ++// *
        ++// * * `text` — The text to set as the content of each matched element. When Number or Boolean is supplied, it will ++// * be converted to a String representation.
        ++// * * `function` — A function returning the text content to set. Receives the index position of the element in the set ++// * and the old text value as arguments. ++// * @see \`{@link https://api.jquery.com/text/ }\` ++// * @since 1.0 ++// * @since 1.4 ++// * @example ​ ````Add text to the paragraph (notice the bold tag is escaped). ++// ```html ++// ++// ++// ++// ++// text demo ++// ++// ++// ++// ++// ​ ++//

        Test Paragraph.

        ++// ​ ++// ++// ​ ++// ++// ++// ``` ++// */ ++// text(text_function: string | number | boolean | ((this: TElement, index: number, text: string) => string | number | boolean)): this; ++// /** ++// * Get the combined text contents of each element in the set of matched elements, including their descendants. ++// * @see \`{@link https://api.jquery.com/text/ }\` ++// * @since 1.0 ++// * @example ​ ````Find the text in the first paragraph (stripping out the html), then set the html of the last paragraph to show it is just text (the red bold is gone). ++// ```html ++// ++// ++// ++// ++// text demo ++// ++// ++// ++// ++// ​ ++//

        Test Paragraph.

        ++//

        ++// ​ ++// ++// ​ ++// ++// ++// ``` ++// */ ++// text(): string; ++// /** ++// * Retrieve all the elements contained in the jQuery set, as an array. ++// * @see \`{@link https://api.jquery.com/toArray/ }\` ++// * @since 1.4 ++// * @example ​ ````Select all divs in the document and return the DOM Elements as an Array; then use the built-in reverse() method to reverse that array. ++// ```html ++// ++// ++// ++// ++// toArray demo ++// ++// ++// ++// ++// ​ ++// Reversed - ++// ​ ++//
        One
        ++//
        Two
        ++//
        Three
        ​ ++// ++// ​ ++// ++// ++// ``` ++// */ ++// toArray(): TElement[]; ++// /** ++// * Display or hide the matched elements. ++// * @param duration A string or number determining how long the animation will run. ++// * @param easing A string indicating which easing function to use for the transition. ++// * @param complete A function to call once the animation is complete, called once per matched element. ++// * @see \`{@link https://api.jquery.com/toggle/ }\` ++// * @since 1.4.3 ++// */ ++// toggle(duration: JQuery.Duration, easing: string, complete?: (this: TElement) => void): this; ++// /** ++// * Display or hide the matched elements. ++// * @param duration A string or number determining how long the animation will run. ++// * @param complete A function to call once the animation is complete, called once per matched element. ++// * @see \`{@link https://api.jquery.com/toggle/ }\` ++// * @since 1.0 ++// */ ++// toggle(duration: JQuery.Duration, complete: (this: TElement) => void): this; ++// /** ++// * Display or hide the matched elements. ++// * @param duration_complete_options_display _@param_ `duration_complete_options_display` ++// *
        ++// * * `duration` — A string or number determining how long the animation will run.
        ++// * * `complete` — A function to call once the animation is complete, called once per matched element.
        ++// * * `options` — A map of additional options to pass to the method.
        ++// * * `display` — Use true to show the element or false to hide it. ++// * @see \`{@link https://api.jquery.com/toggle/ }\` ++// * @since 1.0 ++// * @since 1.3 ++// * @example ​ ````Toggles all paragraphs. ++// ```html ++// ++// ++// ++// ++// toggle demo ++// ++// ++// ++// ​ ++// ++//

        Hello

        ++//

        Good Bye

        ++// ​ ++// ++// ​ ++// ++// ++// ``` ++// * @example ​ ````Animates all paragraphs to be shown if they are hidden and hidden if they are visible, completing the animation within 600 milliseconds. ++// ```html ++// ++// ++// ++// ++// toggle demo ++// ++// ++// ++// ++// ​ ++// ++//

        Hiya

        ++//

        Such interesting text, eh?

        ++// ​ ++// ++// ​ ++// ++// ++// ``` ++// * @example ​ ````Shows all paragraphs, then hides them all, back and forth. ++// ```html ++// ++// ++// ++// ++// toggle demo ++// ++// ++// ++// ​ ++// ++//

        Hello

        ++//

        Good Bye

        ++// ​ ++// ++// ​ ++// ++// ++// ``` ++// */ ++// toggle(duration_complete_options_display?: JQuery.Duration | ((this: TElement) => void) | JQuery.EffectsOptions | boolean): this; ++// /** ++// * Add or remove one or more classes from each element in the set of matched elements, depending on either the class's presence or the value of the state argument. ++// * @param className_function _@param_ `className_function` ++// *
        ++// * * `className` — One or more class names (separated by spaces) to be toggled for each element in the matched set.
        ++// * * `function` — A function that returns class names to be toggled in the class attribute of each element in the ++// * matched set. Receives the index position of the element in the set, the old class value, and the state as arguments. ++// * @param state A Boolean (not just truthy/falsy) value to determine whether the class should be added or removed. ++// * @see \`{@link https://api.jquery.com/toggleClass/ }\` ++// * @since 1.0 ++// * @since 1.3 ++// * @since 1.4 ++// * @since 3.3 ++// * @example ​ ````Toggle the class 'highlight' when a paragraph is clicked. ++// ```html ++// ++// ++// ++// ++// toggleClass demo ++// ++// ++// ++// ++// ​ ++//

        Click to toggle

        ++//

        highlight

        ++//

        on these

        ++//

        paragraphs

        ++// ​ ++// ++// ​ ++// ++// ++// ``` ++// * @example ​ ````Add the "highlight" class to the clicked paragraph on every third click of that paragraph, remove it every first and second click. ++// ```html ++// ++// ++// ++// ++// toggleClass demo ++// ++// ++// ++// ++// ​ ++//

        Click to toggle (clicks: 0)

        ++//

        highlight (clicks: 0)

        ++//

        on these (clicks: 0)

        ++//

        paragraphs (clicks: 0)

        ++// ​ ++// ++// ​ ++// ++// ++// ``` ++// * @example ​ ````Toggle the class name(s) indicated on the buttons for each div. ++// ```html ++// ++// ++// ++// ++// toggleClass demo ++// ++// ++// ++// ++// ​ ++//
        ++// ++// ++// ++// ++// reset ++//
        ++//
        ++//
        ++//
        ++//
        ++//
        ++//
        ++// ​ ++// ++// ​ ++// ++// ++// ``` ++// */ ++// toggleClass(className_function: JQuery.TypeOrArray | ((this: TElement, index: number, className: string, state: TState) => string), ++// state?: TState): this; ++// /** ++// * Add or remove one or more classes from each element in the set of matched elements, depending on either the class's presence or the value of the state argument. ++// * @param state A boolean value to determine whether the class should be added or removed. ++// * @see \`{@link https://api.jquery.com/toggleClass/ }\` ++// * @since 1.4 ++// * @deprecated ​ Deprecated since 3.0. See \`{@link https://github.com/jquery/jquery/pull/2618 }\`. ++// * ++// * **Cause**: Calling `.toggleClass()` with no arguments, or with a single Boolean `true` or `false` argument, has been deprecated. Its behavior was poorly documented, but essentially the method saved away the current class value in a data item when the class was removed and restored the saved value when it was toggled back. If you do not believe you are specificially trying to use this form of the method, it is possible you are accidentally doing so via an inadvertent undefined value, as `.toggleClass( undefined )` toggles all classes. ++// * ++// * **Solution**: If this functionality is still needed, save the current full `.attr( "class" )` value in a data item and restore it when required. ++// */ ++// toggleClass(state?: boolean): this; ++// /** ++// * Execute all handlers and behaviors attached to the matched elements for the given event type. ++// * @param eventType_event _@param_ `eventType_event` ++// *
        ++// * * `eventType` — A string containing a JavaScript event type, such as `click` or `submit`.
        ++// * * `event` — A \`{@link https://api.jquery.com/category/events/event-object/ jQuery.Event}\` object. ++// * @param extraParameters Additional parameters to pass along to the event handler. ++// * @see \`{@link https://api.jquery.com/trigger/ }\` ++// * @since 1.0 ++// * @since 1.3 ++// * @example ​ ````Clicks to button #2 also trigger a click for button #1. ++// ```html ++// ++// ++// ++// ++// trigger demo ++// ++// ++// ++// ++// ​ ++// ++// ++//
        0 button #1 clicks.
        ++//
        0 button #2 clicks.
        ++// ​ ++// ++// ​ ++// ++// ++// ``` ++// * @example ​ ````To submit the first form without using the submit() function, try: ++// ```javascript ++// $( "form:first" ).trigger( "submit" ); ++// ``` ++// * @example ​ ````To submit the first form without using the submit() function, try: ++// ```javascript ++// var event = jQuery.Event( "submit" ); ++// $( "form:first" ).trigger( event ); ++// if ( event.isDefaultPrevented() ) { ++// // Perform an action... ++// } ++// ``` ++// * @example ​ ````To pass arbitrary data to an event: ++// ```javascript ++// $( "p" ) ++// .click(function( event, a, b ) { ++// // When a normal click fires, a and b are undefined ++// // for a trigger like below a refers to "foo" and b refers to "bar" ++// }) ++// .trigger( "click", [ "foo", "bar" ] ); ++// ``` ++// * @example ​ ````To pass arbitrary data through an event object: ++// ```javascript ++// var event = jQuery.Event( "logged" ); ++// event.user = "foo"; ++// event.pass = "bar"; ++// $( "body" ).trigger( event ); ++// ``` ++// * @example ​ ````Alternative way to pass data through an event object: ++// ```javascript ++// $( "body" ).trigger({ ++// type:"logged", ++// user:"foo", ++// pass:"bar" ++// }); ++// ``` ++// */ ++// trigger(eventType_event: string | JQuery.Event, extraParameters?: any[] | JQuery.PlainObject | string | number | boolean): this; ++// /** ++// * Execute all handlers attached to an element for an event. ++// * @param eventType_event _@param_ `eventType_event` ++// *
        ++// * * `eventType` — A string containing a JavaScript event type, such as `click` or `submit`.
        ++// * * `event` — A \`{@link https://api.jquery.com/category/events/event-object/ jQuery.Event}\` object. ++// * @param extraParameters Additional parameters to pass along to the event handler. ++// * @see \`{@link https://api.jquery.com/triggerHandler/ }\` ++// * @since 1.2 ++// * @since 1.3 ++// * @example ​ ````If you called .triggerHandler() on a focus event - the browser's default focus action would not be triggered, only the event handlers bound to the focus event. ++// ```html ++// ++// ++// ++// ++// triggerHandler demo ++// ++// ++// ++// ​ ++// ++//

        ++// ​ ++// ++// ​ ++// ++// ​ ++// ++// ++// ``` ++// */ ++// triggerHandler(eventType_event: string | JQuery.Event, extraParameters?: any[] | JQuery.PlainObject | string | number | boolean): any; ++// /** ++// * Remove a previously-attached event handler from the elements. ++// * @param event A string containing one or more DOM event types, such as "click" or "submit," or custom event names. ++// * @param handler A function to execute each time the event is triggered. ++// * @see \`{@link https://api.jquery.com/unbind/ }\` ++// * @since 1.0 ++// * @since 1.4.3 ++// * @deprecated ​ Deprecated since 3.0. Use \`{@link off }\`. ++// * ++// * **Cause**: These event binding methods have been deprecated in favor of the `.on()` and `.off()` methods which can handle both delegated and direct event binding. Although the older methods are still present in jQuery 3.0, they may be removed as early as the next major-version update. ++// * ++// * **Solution**: Change the method call to use `.on()` or `.off()`, the documentation for the old methods include specific instructions. In general, the `.bind()` and `.unbind()` methods can be renamed directly to `.on()` and `.off()` respectively since the argument orders are identical. ++// * @example ​ ````Can bind and unbind events to the colored button. ++// ```html ++// ++// ++// ++// ++// unbind demo ++// ++// ++// ++// ++// ​ ++// ++// ++// ++//
        Click!
        ++// ​ ++// ++// ​ ++// ++// ++// ``` ++// * @example ​ ````To unbind just one previously bound handler, pass the function in as the second argument: ++// ```javascript ++// var foo = function() { ++// // Code to handle some kind of event ++// }; ++// ​ ++// $( "p" ).bind( "click", foo ); // ... Now foo will be called when paragraphs are clicked ... ++// ​ ++// $( "p" ).unbind( "click", foo ); // ... foo will no longer be called. ++// ``` ++// */ ++// unbind( ++// event: TType, ++// handler: JQuery.TypeEventHandler | ++// false ++// ): this; ++// /** ++// * Remove a previously-attached event handler from the elements. ++// * @param event A string containing one or more DOM event types, such as "click" or "submit," or custom event names. ++// * A jQuery.Event object. ++// * @see \`{@link https://api.jquery.com/unbind/ }\` ++// * @since 1.0 ++// * @deprecated ​ Deprecated since 3.0. Use \`{@link off }\`. ++// * ++// * **Cause**: These event binding methods have been deprecated in favor of the `.on()` and `.off()` methods which can handle both delegated and direct event binding. Although the older methods are still present in jQuery 3.0, they may be removed as early as the next major-version update. ++// * ++// * **Solution**: Change the method call to use `.on()` or `.off()`, the documentation for the old methods include specific instructions. In general, the `.bind()` and `.unbind()` methods can be renamed directly to `.on()` and `.off()` respectively since the argument orders are identical. ++// * @example ​ ````To unbind all events from all paragraphs, write: ++// ```javascript ++// $( "p" ).unbind(); ++// ``` ++// * @example ​ ````To unbind all click events from all paragraphs, write: ++// ```javascript ++// $( "p" ).unbind( "click" ); ++// ``` ++// */ ++// unbind(event?: string | JQuery.TriggeredEvent): this; ++// /** ++// * Remove a handler from the event for all elements which match the current selector, based upon a specific set of root elements. ++// * @param selector A selector which will be used to filter the event results. ++// * @param eventType A string containing a JavaScript event type, such as "click" or "keydown" ++// * @param handler A function to execute each time the event is triggered. ++// * @see \`{@link https://api.jquery.com/undelegate/ }\` ++// * @since 1.4.2 ++// * @deprecated ​ Deprecated since 3.0. Use \`{@link off }\`. ++// * ++// * **Cause**: These event binding methods have been deprecated in favor of the `.on()` and `.off()` methods which can handle both delegated and direct event binding. Although the older methods are still present in jQuery 3.0, they may be removed as early as the next major-version update. ++// * ++// * **Solution**: Change the method call to use `.on()` or `.off()`, the documentation for the old methods include specific instructions. In general, the `.bind()` and `.unbind()` methods can be renamed directly to `.on()` and `.off()` respectively since the argument orders are identical. ++// * @example ​ ````Can bind and unbind events to the colored button. ++// ```html ++// ++// ++// ++// ++// undelegate demo ++// ++// ++// ++// ++// ​ ++// ++// ++// ++//
        Click!
        ++// ​ ++// ++// ​ ++// ++// ++// ``` ++// * @example ​ ````To undelegate just one previously bound handler, pass the function in as the third argument: ++// ```javascript ++// var foo = function () { ++// // Code to handle some kind of event ++// }; ++// ​ ++// // ... Now foo will be called when paragraphs are clicked ... ++// $( "body" ).delegate( "p", "click", foo ); ++// ​ ++// // ... foo will no longer be called. ++// $( "body" ).undelegate( "p", "click", foo ); ++// ``` ++// */ ++// undelegate( ++// selector: JQuery.Selector, ++// eventType: TType, ++// handler: JQuery.TypeEventHandler | ++// false ++// ): this; ++// /** ++// * Remove a handler from the event for all elements which match the current selector, based upon a specific set of root elements. ++// * @param selector A selector which will be used to filter the event results. ++// * @param eventType_events _@param_ `eventType_events` ++// *
        ++// * * `eventType` — A string containing a JavaScript event type, such as "click" or "keydown"
        ++// * * `events` — An object of one or more event types and previously bound functions to unbind from them. ++// * @see \`{@link https://api.jquery.com/undelegate/ }\` ++// * @since 1.4.2 ++// * @since 1.4.3 ++// * @deprecated ​ Deprecated since 3.0. Use \`{@link off }\`. ++// * ++// * **Cause**: These event binding methods have been deprecated in favor of the `.on()` and `.off()` methods which can handle both delegated and direct event binding. Although the older methods are still present in jQuery 3.0, they may be removed as early as the next major-version update. ++// * ++// * **Solution**: Change the method call to use `.on()` or `.off()`, the documentation for the old methods include specific instructions. In general, the `.bind()` and `.unbind()` methods can be renamed directly to `.on()` and `.off()` respectively since the argument orders are identical. ++// */ ++// undelegate(selector: JQuery.Selector, ++// eventType_events: string | ++// JQuery.TypeEventHandlers): this; ++// /** ++// * Remove a handler from the event for all elements which match the current selector, based upon a specific set of root elements. ++// * @param namespace A selector which will be used to filter the event results. ++// * @see \`{@link https://api.jquery.com/undelegate/ }\` ++// * @since 1.4.2 ++// * @since 1.6 ++// * @deprecated ​ Deprecated since 3.0. Use \`{@link off }\`. ++// * ++// * **Cause**: These event binding methods have been deprecated in favor of the `.on()` and `.off()` methods which can handle both delegated and direct event binding. Although the older methods are still present in jQuery 3.0, they may be removed as early as the next major-version update. ++// * ++// * **Solution**: Change the method call to use `.on()` or `.off()`, the documentation for the old methods include specific instructions. In general, the `.bind()` and `.unbind()` methods can be renamed directly to `.on()` and `.off()` respectively since the argument orders are identical. ++// * @example ​ ````To unbind all delegated events from all paragraphs, write: ++// ```javascript ++// $( "p" ).undelegate(); ++// ``` ++// * @example ​ ````To unbind all delegated click events from all paragraphs, write: ++// ```javascript ++// $( "p" ).undelegate( "click" ); ++// ``` ++// * @example ​ ````To unbind all delegated events by their namespace: ++// ```javascript ++// var foo = function() { ++// // Code to handle some kind of event ++// }; ++// ​ ++// // Delegate events under the ".whatever" namespace ++// $( "form" ).delegate( ":button", "click.whatever", foo ); ++// ​ ++// $( "form" ).delegate( "input[type='text'] ", "keypress.whatever", foo ); ++// ​ ++// // Unbind all events delegated under the ".whatever" namespace ++// $( "form" ).undelegate( ".whatever" ); ++// ``` ++// */ ++// undelegate(namespace?: string): this; ++// /** ++// * Remove the parents of the set of matched elements from the DOM, leaving the matched elements in their place. ++// * @param selector A selector to check the parent element against. If an element's parent does not match the selector, ++// * the element won't be unwrapped. ++// * @see \`{@link https://api.jquery.com/unwrap/ }\` ++// * @since 1.4 ++// * @since 3.0 ++// * @example ​ ````Wrap/unwrap a div around each of the paragraphs. ++// ```html ++// ++// ++// ++// ++// unwrap demo ++// ++// ++// ++// ++// ​ ++//

        Hello

        ++//

        cruel

        ++//

        World

        ​ ++// ++// ​ ++// ++// ++// ``` ++// */ ++// unwrap(selector?: string): this; ++// /** ++// * Set the value of each element in the set of matched elements. ++// * @param value_function _@param_ `value_function` ++// *
        ++// * * `value` — A string of text, a number, or an array of strings corresponding to the value of each matched ++// * element to set as selected/checked.
        ++// * * `function` — A function returning the value to set. `this` is the current element. Receives the index position of ++// * the element in the set and the old value as arguments. ++// * @see \`{@link https://api.jquery.com/val/ }\` ++// * @since 1.0 ++// * @since 1.4 ++// * @example ​ ````Set the value of an input box. ++// ```html ++// ++// ++// ++// ++// val demo ++// ++// ++// ++// ++// ​ ++//
        ++// ++// ++// ++//
        ++// ++// ​ ++// ++// ​ ++// ++// ++// ``` ++// * @example ​ ````Use the function argument to modify the value of an input box. ++// ```html ++// ++// ++// ++// ++// val demo ++// ++// ++// ++// ​ ++//

        Type something and then click or tab out of the input.

        ++// ++// ​ ++// ++// ​ ++// ++// ++// ``` ++// * @example ​ ````Set a single select, a multiple select, checkboxes and a radio button . ++// ```html ++// ++// ++// ++// ++// val demo ++// ++// ++// ++// ++// ​ ++// ++// ​ ++// ++// ​ ++//
        ++// check1 ++// check2 ++// radio1 ++// radio2 ++// ​ ++// ++// ​ ++// ++// ++// ``` ++// */ ++// val(value_function: string | number | string[] | ((this: TElement, index: number, value: string) => string)): this; ++// /** ++// * Get the current value of the first element in the set of matched elements. ++// * @see \`{@link https://api.jquery.com/val/ }\` ++// * @since 1.0 ++// * @example ​ ````Get the single value from a single select and an array of values from a multiple select and display their values. ++// ```html ++// ++// ++// ++// ++// val demo ++// ++// ++// ++// ++// ​ ++//

        ++// ​ ++// ++// ​ ++// ++// ​ ++// ++// ​ ++// ++// ++// ``` ++// * @example ​ ````Find the value of an input box. ++// ```html ++// ++// ++// ++// ++// val demo ++// ++// ++// ++// ++// ​ ++// ++//

        ++// ​ ++// ++// ​ ++// ++// ++// ``` ++// */ ++// val(): string | number | string[] | undefined; ++// /** ++// * Set the CSS width of each element in the set of matched elements. ++// * @param value_function _@param_ `value_function` ++// *
        ++// * * `value` — An integer representing the number of pixels, or an integer along with an optional unit of measure ++// * appended (as a string).
        ++// * * `function` — A function returning the width to set. Receives the index position of the element in the set and the ++// * old width as arguments. Within the function, `this` refers to the current element in the set. ++// * @see \`{@link https://api.jquery.com/width/ }\` ++// * @since 1.0 ++// * @since 1.4.1 ++// * @example ​ ````Change the width of each div the first time it is clicked (and change its color). ++// ```html ++// ++// ++// ++// ++// width demo ++// ++// ++// ++// ++// ​ ++//
        d
        ++//
        d
        ++//
        d
        ++//
        d
        ++//
        d
        ++// ​ ++// ++// ​ ++// ++// ++// ``` ++// */ ++// width(value_function: string | number | ((this: TElement, index: number, value: number) => string | number)): this; ++// /** ++// * Get the current computed width for the first element in the set of matched elements. ++// * @see \`{@link https://api.jquery.com/width/ }\` ++// * @since 1.0 ++// * @example ​ ````Show various widths. Note the values are from the iframe so might be smaller than you expected. The yellow highlight shows the iframe body. ++// ```html ++// ++// ++// ++// ++// width demo ++// ++// ++// ++// ++// ​ ++// ++// ++// ++//
         
        ++//

        ++// Sample paragraph to test width ++//

        ++// ​ ++// ++// ​ ++// ++// ++// ``` ++// */ ++// width(): number | undefined; ++// /** ++// * Wrap an HTML structure around each element in the set of matched elements. ++// * @param wrappingElement_function _@param_ `wrappingElement_function` ++// *
        ++// * * `wrappingElement` — A selector, element, HTML string, or jQuery object specifying the structure to wrap around the ++// * matched elements. When you pass a jQuery collection containing more than one element, or a selector ++// * matching more than one element, the first element will be used.
        ++// * * `function` — A callback function returning the HTML content or jQuery object to wrap around the matched elements. ++// * Receives the index position of the element in the set as an argument. Within the function, `this` ++// * refers to the current element in the set. ++// * @see \`{@link https://api.jquery.com/wrap/ }\` ++// * @since 1.0 ++// * @since 1.4 ++// * @example ​ ````Wrap a new div around all of the paragraphs. ++// ```html ++// ++// ++// ++// ++// wrap demo ++// ++// ++// ++// ++// ​ ++//

        Hello

        ++//

        cruel

        ++//

        World

        ++// ​ ++// ++// ​ ++// ++// ++// ``` ++// * @example ​ ````Wraps a newly created tree of objects around the spans. Notice anything in between the spans gets left out like the <strong> (red text) in this example. Even the white space between spans is left out. Click View Source to see the original html.> ++// ```html ++// ++// ++// ++// ++// wrap demo ++// ++// ++// ++// ++// ​ ++// Span Text ++// What about me? ++// Another One ++// ​ ++// ++// ​ ++// ++// ++// ``` ++// * @example ​ ````Wrap a new div around all of the paragraphs. ++// ```html ++// ++// ++// ++// ++// wrap demo ++// ++// ++// ++// ++// ​ ++//

        Hello

        ++//

        cruel

        ++//

        World

        ++// ​ ++// ++// ​ ++// ++// ++// ``` ++// * @example ​ ````Wrap a jQuery object double depth div around all of the paragraphs. Notice it doesn't move the object but just clones it to wrap around its target. ++// ```html ++// ++// ++// ++// ++// wrap demo ++// ++// ++// ++// ++// ​ ++//

        Hello

        ++//

        cruel

        ++//

        World

        ++//
        ++// ​ ++// ++// ​ ++// ++// ++// ``` ++// */ ++// wrap(wrappingElement_function: JQuery.Selector | JQuery.htmlString | Element | JQuery | ((this: TElement, index: number) => string | JQuery)): this; ++// /** ++// * Wrap an HTML structure around all elements in the set of matched elements. ++// * @param wrappingElement_function _@param_ `wrappingElement_function` ++// *
        ++// * * `wrappingElement` — A selector, element, HTML string, or jQuery object specifying the structure to wrap around the matched elements.
        ++// * * `function` — A callback function returning the HTML content or jQuery object to wrap around all the matched ++// * elements. Within the function, `this` refers to the first element in the set. **Prior to jQuery ++// * 3.0**, the callback was incorrectly called for every element in the set and received the index ++// * position of the element in the set as an argument. ++// * @see \`{@link https://api.jquery.com/wrapAll/ }\` ++// * @since 1.2 ++// * @since 1.4 ++// * @example ​ ````Wrap a new div around all of the paragraphs. ++// ```html ++// ++// ++// ++// ++// wrapAll demo ++// ++// ++// ++// ++// ​ ++//

        Hello

        ++//

        cruel

        ++//

        World

        ++// ​ ++// ++// ​ ++// ++// ++// ``` ++// * @example ​ ````Wraps a newly created tree of objects around the spans. Notice anything in between the spans gets left out like the <strong> (red text) in this example. Even the white space between spans is left out. Click View Source to see the original html. ++// ```html ++// ++// ++// ++// ++// wrapAll demo ++// ++// ++// ++// ++// ​ ++// Span Text ++// What about me? ++// Another One ++// ​ ++// ++// ​ ++// ++// ++// ``` ++// * @example ​ ````Wrap a new div around all of the paragraphs. ++// ```html ++// ++// ++// ++// ++// wrapAll demo ++// ++// ++// ++// ++// ​ ++//

        Hello

        ++//

        cruel

        ++//

        World

        ++// ​ ++// ++// ​ ++// ++// ++// ``` ++// * @example ​ ````Wrap a jQuery object double depth div around all of the paragraphs. Notice it doesn't move the object but just clones it to wrap around its target. ++// ```html ++// ++// ++// ++// ++// wrapAll demo ++// ++// ++// ++// ++// ​ ++//

        Hello

        ++//

        cruel

        ++//

        World

        ++//
        ++// ​ ++// ++// ​ ++// ++// ++// ``` ++// */ ++// wrapAll(wrappingElement_function: JQuery.Selector | JQuery.htmlString | Element | JQuery | ((this: TElement) => string | JQuery)): this; ++// /** ++// * Wrap an HTML structure around the content of each element in the set of matched elements. ++// * @param wrappingElement_function _@param_ `wrappingElement_function` ++// *
        ++// * * `wrappingElement` — An HTML snippet, selector expression, jQuery object, or DOM element specifying the structure to wrap ++// * around the content of the matched elements.
        ++// * * `function` — A callback function which generates a structure to wrap around the content of the matched elements. ++// * Receives the index position of the element in the set as an argument. Within the function, `this` ++// * refers to the current element in the set. ++// * @see \`{@link https://api.jquery.com/wrapInner/ }\` ++// * @since 1.2 ++// * @since 1.4 ++// * @example ​ ````Selects all paragraphs and wraps a bold tag around each of its contents. ++// ```html ++// ++// ++// ++// ++// wrapInner demo ++// ++// ++// ++// ++// ​ ++//

        Hello

        ++//

        cruel

        ++//

        World

        ++// ​ ++// ++// ​ ++// ++// ++// ``` ++// * @example ​ ````Wraps a newly created tree of objects around the inside of the body. ++// ```html ++// ++// ++// ++// ++// wrapInner demo ++// ++// ++// ++// ++// ​ ++// Plain old text, or is it? ++// ​ ++// ++// ​ ++// ++// ++// ``` ++// * @example ​ ````Selects all paragraphs and wraps a bold tag around each of its contents. ++// ```html ++// ++// ++// ++// ++// wrapInner demo ++// ++// ++// ++// ++// ​ ++//

        Hello

        ++//

        cruel

        ++//

        World

        ++// ​ ++// ++// ​ ++// ++// ++// ``` ++// * @example ​ ````Selects all paragraphs and wraps a jQuery object around each of its contents. ++// ```html ++// ++// ++// ++// ++// wrapInner demo ++// ++// ++// ++// ++// ​ ++//

        Hello

        ++//

        cruel

        ++//

        World

        ++// ​ ++// ++// ​ ++// ++// ++// ``` ++// */ ++// wrapInner(wrappingElement_function: JQuery.Selector | JQuery.htmlString | Element | JQuery | ((this: TElement, index: number) => string | JQuery | Element)): this; + +- [n: number]: TElement; +-} ++// [n: number]: TElement; ++// } +diff --git a/node_modules/@types/jquery/legacy.d.ts b/node_modules/@types/jquery/legacy.d.ts +index 08c8a40..6d9fbbf 100644 +--- a/node_modules/@types/jquery/legacy.d.ts ++++ b/node_modules/@types/jquery/legacy.d.ts +@@ -1,204 +1,204 @@ +-// tslint:disable:no-irregular-whitespace ++// // tslint:disable:no-irregular-whitespace + +-// tslint:disable-next-line:no-empty-interface +-interface JQueryCallback extends JQuery.Callbacks { } +-interface JQueryDeferred extends JQuery.Deferred { } +-// tslint:disable-next-line:no-empty-interface +-interface JQueryEventConstructor extends JQuery.EventStatic { } +-interface JQueryDeferred extends JQuery.Deferred { } +-// tslint:disable-next-line:no-empty-interface +-interface JQueryAjaxSettings extends JQuery.AjaxSettings { } +-interface JQueryAnimationOptions extends JQuery.EffectsOptions { } +-// tslint:disable-next-line:no-empty-interface +-interface JQueryCoordinates extends JQuery.Coordinates { } +-interface JQueryGenericPromise extends JQuery.Thenable { } +-// tslint:disable-next-line:no-empty-interface +-interface JQueryXHR extends JQuery.jqXHR { } +-interface JQueryPromise extends JQuery.Promise { } +-// tslint:disable-next-line:no-empty-interface +-interface JQuerySerializeArrayElement extends JQuery.NameValuePair { } ++// // tslint:disable-next-line:no-empty-interface ++// interface JQueryCallback extends JQuery.Callbacks { } ++// interface JQueryDeferred extends JQuery.Deferred { } ++// // tslint:disable-next-line:no-empty-interface ++// interface JQueryEventConstructor extends JQuery.EventStatic { } ++// interface JQueryDeferred extends JQuery.Deferred { } ++// // tslint:disable-next-line:no-empty-interface ++// interface JQueryAjaxSettings extends JQuery.AjaxSettings { } ++// interface JQueryAnimationOptions extends JQuery.EffectsOptions { } ++// // tslint:disable-next-line:no-empty-interface ++// interface JQueryCoordinates extends JQuery.Coordinates { } ++// interface JQueryGenericPromise extends JQuery.Thenable { } ++// // tslint:disable-next-line:no-empty-interface ++// interface JQueryXHR extends JQuery.jqXHR { } ++// interface JQueryPromise extends JQuery.Promise { } ++// // tslint:disable-next-line:no-empty-interface ++// interface JQuerySerializeArrayElement extends JQuery.NameValuePair { } + +-/** +- * @deprecated ​ Deprecated since 1.9. See \`{@link https://api.jquery.com/jQuery.support/ }\`. +- */ +-// tslint:disable-next-line:no-empty-interface +-interface JQuerySupport extends JQuery.PlainObject { } ++// /** ++// * @deprecated ​ Deprecated since 1.9. See \`{@link https://api.jquery.com/jQuery.support/ }\`. ++// */ ++// // tslint:disable-next-line:no-empty-interface ++// interface JQuerySupport extends JQuery.PlainObject { } + +-// Legacy types that are not represented in the current type definitions are marked deprecated. ++// // Legacy types that are not represented in the current type definitions are marked deprecated. + +-/** +- * @deprecated ​ Deprecated. Use \`{@link JQuery.Deferred.Callback }\` or \`{@link JQuery.Deferred.CallbackBase }\`. +- */ +-interface JQueryPromiseCallback { +- // tslint:disable-next-line:callable-types +- (value?: T, ...args: any[]): void; +-} +-/** +- * @deprecated ​ Deprecated. Use \`{@link JQueryStatic.param JQueryStatic['param']}\`. +- */ +-interface JQueryParam { +- /** +- * Create a serialized representation of an array or object, suitable for use in a URL query string or Ajax request. +- * @param obj An array or object to serialize. +- * @param traditional A Boolean indicating whether to perform a traditional "shallow" serialization. +- */ +- // tslint:disable-next-line:callable-types +- (obj: any, traditional?: boolean): string; +-} +-/** +- * @deprecated ​ Deprecated. Use \`{@link JQuery.Event }\`. +- */ +-interface BaseJQueryEventObject extends Event { +- /** +- * The current DOM element within the event bubbling phase. +- * @see \`{@link https://api.jquery.com/event.currentTarget/ }\` +- */ +- currentTarget: Element; +- /** +- * An optional object of data passed to an event method when the current executing handler is bound. +- * @see \`{@link https://api.jquery.com/event.data/ }\` +- */ +- data: any; +- /** +- * The element where the currently-called jQuery event handler was attached. +- * @see \`{@link https://api.jquery.com/event.delegateTarget/ }\` +- */ +- delegateTarget: Element; +- /** +- * Returns whether event.preventDefault() was ever called on this event object. +- * @see \`{@link https://api.jquery.com/event.isDefaultPrevented/ }\` +- */ +- isDefaultPrevented(): boolean; +- /** +- * Returns whether event.stopImmediatePropagation() was ever called on this event object. +- * @see \`{@link https://api.jquery.com/event.isImmediatePropagationStopped/ }\` +- */ +- isImmediatePropagationStopped(): boolean; +- /** +- * Returns whether event.stopPropagation() was ever called on this event object. +- * @see \`{@link https://api.jquery.com/event.isPropagationStopped/ }\` +- */ +- isPropagationStopped(): boolean; +- /** +- * The namespace specified when the event was triggered. +- * @see \`{@link https://api.jquery.com/event.namespace/ }\` +- */ +- namespace: string; +- /** +- * The browser's original Event object. +- * @see \`{@link https://api.jquery.com/category/events/event-object/ }\` +- */ +- originalEvent: Event; +- /** +- * If this method is called, the default action of the event will not be triggered. +- * @see \`{@link https://api.jquery.com/event.preventDefault/ }\` +- */ +- preventDefault(): any; +- /** +- * The other DOM element involved in the event, if any. +- * @see \`{@link https://api.jquery.com/event.relatedTarget/ }\` +- */ +- relatedTarget: Element; +- /** +- * The last value returned by an event handler that was triggered by this event, unless the value was undefined. +- * @see \`{@link https://api.jquery.com/event.result/ }\` +- */ +- result: any; +- /** +- * Keeps the rest of the handlers from being executed and prevents the event from bubbling up the DOM tree. +- * @see \`{@link https://api.jquery.com/event.stopImmediatePropagation/ }\` +- */ +- stopImmediatePropagation(): void; +- /** +- * Prevents the event from bubbling up the DOM tree, preventing any parent handlers from being notified of the event. +- * @see \`{@link https://api.jquery.com/event.stopPropagation/ }\` +- */ +- stopPropagation(): void; +- /** +- * The DOM element that initiated the event. +- * @see \`{@link https://api.jquery.com/event.target/ }\` +- */ +- target: Element; +- /** +- * The mouse position relative to the left edge of the document. +- * @see \`{@link https://api.jquery.com/event.pageX/ }\` +- */ +- pageX: number; +- /** +- * The mouse position relative to the top edge of the document. +- * @see \`{@link https://api.jquery.com/event.pageY/ }\` +- */ +- pageY: number; +- /** +- * For key or mouse events, this property indicates the specific key or button that was pressed. +- * @see \`{@link https://api.jquery.com/event.which/ }\` +- */ +- which: number; +- /** +- * Indicates whether the META key was pressed when the event fired. +- * @see \`{@link https://api.jquery.com/event.metaKey/ }\` +- */ +- metaKey: boolean; +-} +-/** +- * @deprecated ​ Deprecated. Use \`{@link JQuery.Event }\`. +- */ +-interface JQueryInputEventObject extends BaseJQueryEventObject { +- altKey: boolean; +- ctrlKey: boolean; +- metaKey: boolean; +- shiftKey: boolean; +-} +-/** +- * @deprecated ​ Deprecated. Use \`{@link JQuery.Event }\`. +- */ +-interface JQueryMouseEventObject extends JQueryInputEventObject { +- button: number; +- clientX: number; +- clientY: number; +- offsetX: number; +- offsetY: number; +- pageX: number; +- pageY: number; +- screenX: number; +- screenY: number; +-} +-/** +- * @deprecated ​ Deprecated. Use \`{@link JQuery.Event }\`. +- */ +-interface JQueryKeyEventObject extends JQueryInputEventObject { +- /** @deprecated */ +- char: string; +- /** @deprecated */ +- charCode: number; +- key: string; +- /** @deprecated */ +- keyCode: number; +-} +-/** +- * @deprecated ​ Deprecated. Use \`{@link JQuery.Event }\`. +- */ +-interface JQueryEventObject extends BaseJQueryEventObject, JQueryInputEventObject, JQueryMouseEventObject, JQueryKeyEventObject { } +-/** +- * @deprecated ​ Deprecated. +- */ +-interface JQueryPromiseOperator { +- // tslint:disable-next-line:callable-types +- (callback1: JQuery.TypeOrArray>, +- ...callbacksN: Array>>): JQueryPromise; +-} +-/** +- * @deprecated ​ Deprecated. Internal. See \`{@link https://github.com/jquery/api.jquery.com/issues/912 }\`. +- */ +-interface JQueryEasingFunction { +- // tslint:disable-next-line:callable-types +- (percent: number): number; +-} +-/** +- * @deprecated ​ Deprecated. Internal. See \`{@link https://github.com/jquery/api.jquery.com/issues/912 }\`. +- */ +-interface JQueryEasingFunctions { +- [name: string]: JQueryEasingFunction; +- linear: JQueryEasingFunction; +- swing: JQueryEasingFunction; +-} ++// /** ++// * @deprecated ​ Deprecated. Use \`{@link JQuery.Deferred.Callback }\` or \`{@link JQuery.Deferred.CallbackBase }\`. ++// */ ++// interface JQueryPromiseCallback { ++// // tslint:disable-next-line:callable-types ++// (value?: T, ...args: any[]): void; ++// } ++// /** ++// * @deprecated ​ Deprecated. Use \`{@link JQueryStatic.param JQueryStatic['param']}\`. ++// */ ++// interface JQueryParam { ++// /** ++// * Create a serialized representation of an array or object, suitable for use in a URL query string or Ajax request. ++// * @param obj An array or object to serialize. ++// * @param traditional A Boolean indicating whether to perform a traditional "shallow" serialization. ++// */ ++// // tslint:disable-next-line:callable-types ++// (obj: any, traditional?: boolean): string; ++// } ++// /** ++// * @deprecated ​ Deprecated. Use \`{@link JQuery.Event }\`. ++// */ ++// interface BaseJQueryEventObject extends Event { ++// /** ++// * The current DOM element within the event bubbling phase. ++// * @see \`{@link https://api.jquery.com/event.currentTarget/ }\` ++// */ ++// currentTarget: Element; ++// /** ++// * An optional object of data passed to an event method when the current executing handler is bound. ++// * @see \`{@link https://api.jquery.com/event.data/ }\` ++// */ ++// data: any; ++// /** ++// * The element where the currently-called jQuery event handler was attached. ++// * @see \`{@link https://api.jquery.com/event.delegateTarget/ }\` ++// */ ++// delegateTarget: Element; ++// /** ++// * Returns whether event.preventDefault() was ever called on this event object. ++// * @see \`{@link https://api.jquery.com/event.isDefaultPrevented/ }\` ++// */ ++// isDefaultPrevented(): boolean; ++// /** ++// * Returns whether event.stopImmediatePropagation() was ever called on this event object. ++// * @see \`{@link https://api.jquery.com/event.isImmediatePropagationStopped/ }\` ++// */ ++// isImmediatePropagationStopped(): boolean; ++// /** ++// * Returns whether event.stopPropagation() was ever called on this event object. ++// * @see \`{@link https://api.jquery.com/event.isPropagationStopped/ }\` ++// */ ++// isPropagationStopped(): boolean; ++// /** ++// * The namespace specified when the event was triggered. ++// * @see \`{@link https://api.jquery.com/event.namespace/ }\` ++// */ ++// namespace: string; ++// /** ++// * The browser's original Event object. ++// * @see \`{@link https://api.jquery.com/category/events/event-object/ }\` ++// */ ++// originalEvent: Event; ++// /** ++// * If this method is called, the default action of the event will not be triggered. ++// * @see \`{@link https://api.jquery.com/event.preventDefault/ }\` ++// */ ++// preventDefault(): any; ++// /** ++// * The other DOM element involved in the event, if any. ++// * @see \`{@link https://api.jquery.com/event.relatedTarget/ }\` ++// */ ++// relatedTarget: Element; ++// /** ++// * The last value returned by an event handler that was triggered by this event, unless the value was undefined. ++// * @see \`{@link https://api.jquery.com/event.result/ }\` ++// */ ++// result: any; ++// /** ++// * Keeps the rest of the handlers from being executed and prevents the event from bubbling up the DOM tree. ++// * @see \`{@link https://api.jquery.com/event.stopImmediatePropagation/ }\` ++// */ ++// stopImmediatePropagation(): void; ++// /** ++// * Prevents the event from bubbling up the DOM tree, preventing any parent handlers from being notified of the event. ++// * @see \`{@link https://api.jquery.com/event.stopPropagation/ }\` ++// */ ++// stopPropagation(): void; ++// /** ++// * The DOM element that initiated the event. ++// * @see \`{@link https://api.jquery.com/event.target/ }\` ++// */ ++// target: Element; ++// /** ++// * The mouse position relative to the left edge of the document. ++// * @see \`{@link https://api.jquery.com/event.pageX/ }\` ++// */ ++// pageX: number; ++// /** ++// * The mouse position relative to the top edge of the document. ++// * @see \`{@link https://api.jquery.com/event.pageY/ }\` ++// */ ++// pageY: number; ++// /** ++// * For key or mouse events, this property indicates the specific key or button that was pressed. ++// * @see \`{@link https://api.jquery.com/event.which/ }\` ++// */ ++// which: number; ++// /** ++// * Indicates whether the META key was pressed when the event fired. ++// * @see \`{@link https://api.jquery.com/event.metaKey/ }\` ++// */ ++// metaKey: boolean; ++// } ++// /** ++// * @deprecated ​ Deprecated. Use \`{@link JQuery.Event }\`. ++// */ ++// interface JQueryInputEventObject extends BaseJQueryEventObject { ++// altKey: boolean; ++// ctrlKey: boolean; ++// metaKey: boolean; ++// shiftKey: boolean; ++// } ++// /** ++// * @deprecated ​ Deprecated. Use \`{@link JQuery.Event }\`. ++// */ ++// interface JQueryMouseEventObject extends JQueryInputEventObject { ++// button: number; ++// clientX: number; ++// clientY: number; ++// offsetX: number; ++// offsetY: number; ++// pageX: number; ++// pageY: number; ++// screenX: number; ++// screenY: number; ++// } ++// /** ++// * @deprecated ​ Deprecated. Use \`{@link JQuery.Event }\`. ++// */ ++// interface JQueryKeyEventObject extends JQueryInputEventObject { ++// /** @deprecated */ ++// char: string; ++// /** @deprecated */ ++// charCode: number; ++// key: string; ++// /** @deprecated */ ++// keyCode: number; ++// } ++// /** ++// * @deprecated ​ Deprecated. Use \`{@link JQuery.Event }\`. ++// */ ++// interface JQueryEventObject extends BaseJQueryEventObject, JQueryInputEventObject, JQueryMouseEventObject, JQueryKeyEventObject { } ++// /** ++// * @deprecated ​ Deprecated. ++// */ ++// interface JQueryPromiseOperator { ++// // tslint:disable-next-line:callable-types ++// (callback1: JQuery.TypeOrArray>, ++// ...callbacksN: Array>>): JQueryPromise; ++// } ++// /** ++// * @deprecated ​ Deprecated. Internal. See \`{@link https://github.com/jquery/api.jquery.com/issues/912 }\`. ++// */ ++// interface JQueryEasingFunction { ++// // tslint:disable-next-line:callable-types ++// (percent: number): number; ++// } ++// /** ++// * @deprecated ​ Deprecated. Internal. See \`{@link https://github.com/jquery/api.jquery.com/issues/912 }\`. ++// */ ++// interface JQueryEasingFunctions { ++// [name: string]: JQueryEasingFunction; ++// linear: JQueryEasingFunction; ++// swing: JQueryEasingFunction; ++// } +diff --git a/node_modules/@types/jquery/misc.d.ts b/node_modules/@types/jquery/misc.d.ts +index 3955c6e..8972745 100644 +--- a/node_modules/@types/jquery/misc.d.ts ++++ b/node_modules/@types/jquery/misc.d.ts +@@ -1,6661 +1,6661 @@ +-// tslint:disable:jsdoc-format +-// tslint:disable:max-line-length +-// tslint:disable:no-irregular-whitespace +- +-declare namespace JQuery { +- type TypeOrArray = T | T[]; +- type Node = Element | Text | Comment | DocumentFragment; +- +- /** +- * A string is designated htmlString in jQuery documentation when it is used to represent one or more DOM elements, typically to be created and inserted in the document. When passed as an argument of the jQuery() function, the string is identified as HTML if it starts with ) and is parsed as such until the final > character. Prior to jQuery 1.9, a string was considered to be HTML if it contained anywhere within the string. +- */ +- type htmlString = string; +- /** +- * A selector is used in jQuery to select DOM elements from a DOM document. That document is, in most cases, the DOM document present in all browsers, but can also be an XML document received via Ajax. +- */ +- type Selector = string; +- +- /** +- * The PlainObject type is a JavaScript object containing zero or more key-value pairs. The plain object is, in other words, an Object object. It is designated "plain" in jQuery documentation to distinguish it from other kinds of JavaScript objects: for example, null, user-defined arrays, and host objects such as document, all of which have a typeof value of "object." +- * +- * **Note**: The type declaration of PlainObject is imprecise. It includes host objects and user-defined arrays which do not match jQuery's definition. +- */ +- interface PlainObject { +- [key: string]: T; +- } +- +- interface Selectors extends Sizzle.Selectors { +- /** +- * @deprecated ​ Deprecated since 3.0. Use \`{@link Selectors#pseudos }\`. +- * +- * **Cause**: The standard way to add new custom selectors through jQuery is `jQuery.expr.pseudos`. These two other aliases are deprecated, although they still work as of jQuery 3.0. +- * +- * **Solution**: Rename any of the older usage to `jQuery.expr.pseudos`. The functionality is identical. +- */ +- ':': Sizzle.Selectors.PseudoFunctions; +- /** +- * @deprecated ​ Deprecated since 3.0. Use \`{@link Selectors#pseudos }\`. +- * +- * **Cause**: The standard way to add new custom selectors through jQuery is `jQuery.expr.pseudos`. These two other aliases are deprecated, although they still work as of jQuery 3.0. +- * +- * **Solution**: Rename any of the older usage to `jQuery.expr.pseudos`. The functionality is identical. +- */ +- filter: Sizzle.Selectors.FilterFunctions; +- } +- +- // region Ajax +- // #region Ajax +- +- interface AjaxSettings extends Ajax.AjaxSettingsBase { +- /** +- * A string containing the URL to which the request is sent. +- */ +- url?: string; +- } +- +- interface UrlAjaxSettings extends Ajax.AjaxSettingsBase { +- /** +- * A string containing the URL to which the request is sent. +- */ +- url: string; +- } +- +- namespace Ajax { +- type SuccessTextStatus = 'success' | 'notmodified' | 'nocontent'; +- type ErrorTextStatus = 'timeout' | 'error' | 'abort' | 'parsererror'; +- type TextStatus = SuccessTextStatus | ErrorTextStatus; +- +- type SuccessCallback = (this: TContext, data: any, textStatus: SuccessTextStatus, jqXHR: jqXHR) => void; +- +- type ErrorCallback = (this: TContext, jqXHR: jqXHR, textStatus: ErrorTextStatus, errorThrown: string) => void; +- +- type CompleteCallback = (this: TContext, jqXHR: jqXHR, textStatus: TextStatus) => void; +- +- /** +- * @see \`{@link https://api.jquery.com/jquery.ajax/#jQuery-ajax-settings }\` +- */ +- interface AjaxSettingsBase { +- /** +- * A set of key/value pairs that map a given dataType to its MIME type, which gets sent in the Accept request header. This header tells the server what kind of response it will accept in return. +- */ +- accepts?: PlainObject; +- /** +- * By default, all requests are sent asynchronously (i.e. this is set to true by default). If you need synchronous requests, set this option to false. Cross-domain requests and dataType: "jsonp" requests do not support synchronous operation. Note that synchronous requests may temporarily lock the browser, disabling any actions while the request is active. As of jQuery 1.8, the use of async: false with jqXHR ($.Deferred) is deprecated; you must use the success/error/complete callback options instead of the corresponding methods of the jqXHR object such as jqXHR.done(). +- */ +- async?: boolean; +- /** +- * A pre-request callback function that can be used to modify the jqXHR (in jQuery 1.4.x, XMLHTTPRequest) object before it is sent. Use this to set custom headers, etc. The jqXHR and settings objects are passed as arguments. This is an Ajax Event. Returning false in the beforeSend function will cancel the request. As of jQuery 1.5, the beforeSend option will be called regardless of the type of request. +- */ +- beforeSend?(this: TContext, jqXHR: jqXHR, settings: this): false | void; +- /** +- * If set to false, it will force requested pages not to be cached by the browser. Note: Setting cache to false will only work correctly with HEAD and GET requests. It works by appending "_={timestamp}" to the GET parameters. The parameter is not needed for other types of requests, except in IE8 when a POST is made to a URL that has already been requested by a GET. +- */ +- cache?: boolean; +- /** +- * A function to be called when the request finishes (after success and error callbacks are executed). The function gets passed two arguments: The jqXHR (in jQuery 1.4.x, XMLHTTPRequest) object and a string categorizing the status of the request ("success", "notmodified", "nocontent", "error", "timeout", "abort", or "parsererror"). As of jQuery 1.5, the complete setting can accept an array of functions. Each function will be called in turn. This is an Ajax Event. +- */ +- complete?: TypeOrArray>; +- /** +- * An object of string/regular-expression pairs that determine how jQuery will parse the response, given its content type. +- */ +- contents?: PlainObject; +- /** +- * When sending data to the server, use this content type. Default is "application/x-www-form-urlencoded; charset=UTF-8", which is fine for most cases. If you explicitly pass in a content-type to $.ajax(), then it is always sent to the server (even if no data is sent). As of jQuery 1.6 you can pass false to tell jQuery to not set any content type header. Note: The W3C XMLHttpRequest specification dictates that the charset is always UTF-8; specifying another charset will not force the browser to change the encoding. Note: For cross-domain requests, setting the content type to anything other than application/x-www-form-urlencoded, multipart/form-data, or text/plain will trigger the browser to send a preflight OPTIONS request to the server. +- */ +- contentType?: string | false; +- /** +- * This object will be the context of all Ajax-related callbacks. By default, the context is an object that represents the Ajax settings used in the call ($.ajaxSettings merged with the settings passed to $.ajax). +- */ +- context?: TContext; +- /** +- * An object containing dataType-to-dataType converters. Each converter's value is a function that returns the transformed value of the response. +- */ +- converters?: PlainObject<((value: any) => any) | true>; +- /** +- * If you wish to force a crossDomain request (such as JSONP) on the same domain, set the value of crossDomain to true. This allows, for example, server-side redirection to another domain. +- */ +- crossDomain?: boolean; +- /** +- * Data to be sent to the server. It is converted to a query string, if not already a string. It's appended to the url for GET-requests. See processData option to prevent this automatic processing. Object must be Key/Value pairs. If value is an Array, jQuery serializes multiple values with same key based on the value of the traditional setting (described below). +- */ +- data?: PlainObject | string; +- /** +- * A function to be used to handle the raw response data of XMLHttpRequest. This is a pre-filtering function to sanitize the response. You should return the sanitized data. The function accepts two arguments: The raw data returned from the server and the 'dataType' parameter. +- */ +- dataFilter?(data: string, type: string): any; +- /** +- * The type of data that you're expecting back from the server. If none is specified, jQuery will try to infer it based on the MIME type of the response (an XML MIME type will yield XML, in 1.4 JSON will yield a JavaScript object, in 1.4 script will execute the script, and anything else will be returned as a string). The available types (and the result passed as the first argument to your success callback) are: +- * +- * "xml": Returns a XML document that can be processed via jQuery. +- * +- * "html": Returns HTML as plain text; included script tags are evaluated when inserted in the DOM. +- * +- * "script": Evaluates the response as JavaScript and returns it as plain text. Disables caching by appending a query string parameter, _=[TIMESTAMP], to the URL unless the cache option is set to true. Note: This will turn POSTs into GETs for remote-domain requests. +- * +- * "json": Evaluates the response as JSON and returns a JavaScript object. Cross-domain "json" requests are converted to "jsonp" unless the request includes jsonp: false in its request options. The JSON data is parsed in a strict manner; any malformed JSON is rejected and a parse error is thrown. As of jQuery 1.9, an empty response is also rejected; the server should return a response of null or {} instead. (See json.org for more information on proper JSON formatting.) +- * +- * "jsonp": Loads in a JSON block using JSONP. Adds an extra "?callback=?" to the end of your URL to specify the callback. Disables caching by appending a query string parameter, "_=[TIMESTAMP]", to the URL unless the cache option is set to true. +- * +- * "text": A plain text string. +- * +- * multiple, space-separated values: As of jQuery 1.5, jQuery can convert a dataType from what it received in the Content-Type header to what you require. For example, if you want a text response to be treated as XML, use "text xml" for the dataType. You can also make a JSONP request, have it received as text, and interpreted by jQuery as XML: "jsonp text xml". Similarly, a shorthand string such as "jsonp xml" will first attempt to convert from jsonp to xml, and, failing that, convert from jsonp to text, and then from text to xml. +- */ +- dataType?: 'xml' | 'html' | 'script' | 'json' | 'jsonp' | 'text' | string; +- /** +- * A function to be called if the request fails. The function receives three arguments: The jqXHR (in jQuery 1.4.x, XMLHttpRequest) object, a string describing the type of error that occurred and an optional exception object, if one occurred. Possible values for the second argument (besides null) are "timeout", "error", "abort", and "parsererror". When an HTTP error occurs, errorThrown receives the textual portion of the HTTP status, such as "Not Found" or "Internal Server Error." As of jQuery 1.5, the error setting can accept an array of functions. Each function will be called in turn. Note: This handler is not called for cross-domain script and cross-domain JSONP requests. This is an Ajax Event. +- */ +- error?: TypeOrArray>; +- /** +- * Whether to trigger global Ajax event handlers for this request. The default is true. Set to false to prevent the global handlers like ajaxStart or ajaxStop from being triggered. This can be used to control various Ajax Events. +- */ +- global?: boolean; +- /** +- * An object of additional header key/value pairs to send along with requests using the XMLHttpRequest transport. The header X-Requested-With: XMLHttpRequest is always added, but its default XMLHttpRequest value can be changed here. Values in the headers setting can also be overwritten from within the beforeSend function. +- */ +- headers?: PlainObject; +- /** +- * Allow the request to be successful only if the response has changed since the last request. This is done by checking the Last-Modified header. Default value is false, ignoring the header. In jQuery 1.4 this technique also checks the 'etag' specified by the server to catch unmodified data. +- */ +- ifModified?: boolean; +- /** +- * Allow the current environment to be recognized as "local," (e.g. the filesystem), even if jQuery does not recognize it as such by default. The following protocols are currently recognized as local: file, *-extension, and widget. If the isLocal setting needs modification, it is recommended to do so once in the $.ajaxSetup() method. +- */ +- isLocal?: boolean; +- /** +- * Override the callback function name in a JSONP request. This value will be used instead of 'callback' in the 'callback=?' part of the query string in the url. So {jsonp:'onJSONPLoad'} would result in 'onJSONPLoad=?' passed to the server. As of jQuery 1.5, setting the jsonp option to false prevents jQuery from adding the "?callback" string to the URL or attempting to use "=?" for transformation. In this case, you should also explicitly set the jsonpCallback setting. For example, { jsonp: false, jsonpCallback: "callbackName" }. If you don't trust the target of your Ajax requests, consider setting the jsonp property to false for security reasons. +- */ +- jsonp?: string | false; +- /** +- * Specify the callback function name for a JSONP request. This value will be used instead of the random name automatically generated by jQuery. It is preferable to let jQuery generate a unique name as it'll make it easier to manage the requests and provide callbacks and error handling. You may want to specify the callback when you want to enable better browser caching of GET requests. As of jQuery 1.5, you can also use a function for this setting, in which case the value of jsonpCallback is set to the return value of that function. +- */ +- jsonpCallback?: string | ((this: TContext) => string); +- /** +- * The HTTP method to use for the request (e.g. "POST", "GET", "PUT"). +- */ +- method?: string; +- /** +- * A mime type to override the XHR mime type. +- */ +- mimeType?: string; +- /** +- * A password to be used with XMLHttpRequest in response to an HTTP access authentication request. +- */ +- password?: string; +- /** +- * By default, data passed in to the data option as an object (technically, anything other than a string) will be processed and transformed into a query string, fitting to the default content-type "application/x-www-form-urlencoded". If you want to send a DOMDocument, or other non-processed data, set this option to false. +- */ +- processData?: boolean; +- /** +- * Only applies when the "script" transport is used (e.g., cross-domain requests with "jsonp" or "script" dataType and "GET" type). Sets the charset attribute on the script tag used in the request. Used when the character set on the local page is not the same as the one on the remote script. +- */ +- scriptCharset?: string; +- /** +- * An object of numeric HTTP codes and functions to be called when the response has the corresponding code. +- * +- * If the request is successful, the status code functions take the same parameters as the success callback; if it results in an error (including 3xx redirect), they take the same parameters as the error callback. +- */ +- statusCode?: StatusCodeCallbacks; +- /** +- * A function to be called if the request succeeds. The function gets passed three arguments: The data returned from the server, formatted according to the dataType parameter or the dataFilter callback function, if specified; a string describing the status; and the jqXHR (in jQuery 1.4.x, XMLHttpRequest) object. As of jQuery 1.5, the success setting can accept an array of functions. Each function will be called in turn. This is an Ajax Event. +- */ +- success?: TypeOrArray>; +- /** +- * Set a timeout (in milliseconds) for the request. A value of 0 means there will be no timeout. This will override any global timeout set with $.ajaxSetup(). The timeout period starts at the point the $.ajax call is made; if several other requests are in progress and the browser has no connections available, it is possible for a request to time out before it can be sent. In jQuery 1.4.x and below, the XMLHttpRequest object will be in an invalid state if the request times out; accessing any object members may throw an exception. In Firefox 3.0+ only, script and JSONP requests cannot be cancelled by a timeout; the script will run even if it arrives after the timeout period. +- */ +- timeout?: number; +- /** +- * Set this to true if you wish to use the traditional style of param serialization. +- */ +- traditional?: boolean; +- /** +- * An alias for method. You should use type if you're using versions of jQuery prior to 1.9.0. +- */ +- type?: string; +- /** +- * A username to be used with XMLHttpRequest in response to an HTTP access authentication request. +- */ +- username?: string; +- // ActiveXObject requires "lib": ["scripthost"] which consumers would also require +- /** +- * Callback for creating the XMLHttpRequest object. Defaults to the ActiveXObject when available (IE), the XMLHttpRequest otherwise. Override to provide your own implementation for XMLHttpRequest or enhancements to the factory. +- */ +- xhr?(): XMLHttpRequest; +- /** +- * An object of fieldName-fieldValue pairs to set on the native XHR object. +- * +- * In jQuery 1.5, the withCredentials property was not propagated to the native XHR and thus CORS requests requiring it would ignore this flag. For this reason, we recommend using jQuery 1.5.1+ should you require the use of it. +- */ +- xhrFields?: XHRFields; +- } +- +- // region StatusCodeCallbacks +- // #region StatusCodeCallbacks +- +- type StatusCodeCallbacks = { +- // region Success Status Codes +- // #region Success Status Codes +- +- // jQuery treats 2xx and 304 status codes as a success +- +- 200?: SuccessCallback; +- 201?: SuccessCallback; +- 202?: SuccessCallback; +- 203?: SuccessCallback; +- 204?: SuccessCallback; +- 205?: SuccessCallback; +- 206?: SuccessCallback; +- 207?: SuccessCallback; +- 208?: SuccessCallback; +- 209?: SuccessCallback; +- 210?: SuccessCallback; +- 211?: SuccessCallback; +- 212?: SuccessCallback; +- 213?: SuccessCallback; +- 214?: SuccessCallback; +- 215?: SuccessCallback; +- 216?: SuccessCallback; +- 217?: SuccessCallback; +- 218?: SuccessCallback; +- 219?: SuccessCallback; +- 220?: SuccessCallback; +- 221?: SuccessCallback; +- 222?: SuccessCallback; +- 223?: SuccessCallback; +- 224?: SuccessCallback; +- 225?: SuccessCallback; +- 226?: SuccessCallback; +- 227?: SuccessCallback; +- 228?: SuccessCallback; +- 229?: SuccessCallback; +- 230?: SuccessCallback; +- 231?: SuccessCallback; +- 232?: SuccessCallback; +- 233?: SuccessCallback; +- 234?: SuccessCallback; +- 235?: SuccessCallback; +- 236?: SuccessCallback; +- 237?: SuccessCallback; +- 238?: SuccessCallback; +- 239?: SuccessCallback; +- 240?: SuccessCallback; +- 241?: SuccessCallback; +- 242?: SuccessCallback; +- 243?: SuccessCallback; +- 244?: SuccessCallback; +- 245?: SuccessCallback; +- 246?: SuccessCallback; +- 247?: SuccessCallback; +- 248?: SuccessCallback; +- 249?: SuccessCallback; +- 250?: SuccessCallback; +- 251?: SuccessCallback; +- 252?: SuccessCallback; +- 253?: SuccessCallback; +- 254?: SuccessCallback; +- 255?: SuccessCallback; +- 256?: SuccessCallback; +- 257?: SuccessCallback; +- 258?: SuccessCallback; +- 259?: SuccessCallback; +- 260?: SuccessCallback; +- 261?: SuccessCallback; +- 262?: SuccessCallback; +- 263?: SuccessCallback; +- 264?: SuccessCallback; +- 265?: SuccessCallback; +- 266?: SuccessCallback; +- 267?: SuccessCallback; +- 268?: SuccessCallback; +- 269?: SuccessCallback; +- 270?: SuccessCallback; +- 271?: SuccessCallback; +- 272?: SuccessCallback; +- 273?: SuccessCallback; +- 274?: SuccessCallback; +- 275?: SuccessCallback; +- 276?: SuccessCallback; +- 277?: SuccessCallback; +- 278?: SuccessCallback; +- 279?: SuccessCallback; +- 280?: SuccessCallback; +- 281?: SuccessCallback; +- 282?: SuccessCallback; +- 283?: SuccessCallback; +- 284?: SuccessCallback; +- 285?: SuccessCallback; +- 286?: SuccessCallback; +- 287?: SuccessCallback; +- 288?: SuccessCallback; +- 289?: SuccessCallback; +- 290?: SuccessCallback; +- 291?: SuccessCallback; +- 292?: SuccessCallback; +- 293?: SuccessCallback; +- 294?: SuccessCallback; +- 295?: SuccessCallback; +- 296?: SuccessCallback; +- 297?: SuccessCallback; +- 298?: SuccessCallback; +- 299?: SuccessCallback; +- 304?: SuccessCallback; +- +- // #endregion +- +- // region Error Status Codes +- // #region Error Status Codes +- +- 300?: ErrorCallback; +- 301?: ErrorCallback; +- 302?: ErrorCallback; +- 303?: ErrorCallback; +- 305?: ErrorCallback; +- 306?: ErrorCallback; +- 307?: ErrorCallback; +- 308?: ErrorCallback; +- 309?: ErrorCallback; +- 310?: ErrorCallback; +- 311?: ErrorCallback; +- 312?: ErrorCallback; +- 313?: ErrorCallback; +- 314?: ErrorCallback; +- 315?: ErrorCallback; +- 316?: ErrorCallback; +- 317?: ErrorCallback; +- 318?: ErrorCallback; +- 319?: ErrorCallback; +- 320?: ErrorCallback; +- 321?: ErrorCallback; +- 322?: ErrorCallback; +- 323?: ErrorCallback; +- 324?: ErrorCallback; +- 325?: ErrorCallback; +- 326?: ErrorCallback; +- 327?: ErrorCallback; +- 328?: ErrorCallback; +- 329?: ErrorCallback; +- 330?: ErrorCallback; +- 331?: ErrorCallback; +- 332?: ErrorCallback; +- 333?: ErrorCallback; +- 334?: ErrorCallback; +- 335?: ErrorCallback; +- 336?: ErrorCallback; +- 337?: ErrorCallback; +- 338?: ErrorCallback; +- 339?: ErrorCallback; +- 340?: ErrorCallback; +- 341?: ErrorCallback; +- 342?: ErrorCallback; +- 343?: ErrorCallback; +- 344?: ErrorCallback; +- 345?: ErrorCallback; +- 346?: ErrorCallback; +- 347?: ErrorCallback; +- 348?: ErrorCallback; +- 349?: ErrorCallback; +- 350?: ErrorCallback; +- 351?: ErrorCallback; +- 352?: ErrorCallback; +- 353?: ErrorCallback; +- 354?: ErrorCallback; +- 355?: ErrorCallback; +- 356?: ErrorCallback; +- 357?: ErrorCallback; +- 358?: ErrorCallback; +- 359?: ErrorCallback; +- 360?: ErrorCallback; +- 361?: ErrorCallback; +- 362?: ErrorCallback; +- 363?: ErrorCallback; +- 364?: ErrorCallback; +- 365?: ErrorCallback; +- 366?: ErrorCallback; +- 367?: ErrorCallback; +- 368?: ErrorCallback; +- 369?: ErrorCallback; +- 370?: ErrorCallback; +- 371?: ErrorCallback; +- 372?: ErrorCallback; +- 373?: ErrorCallback; +- 374?: ErrorCallback; +- 375?: ErrorCallback; +- 376?: ErrorCallback; +- 377?: ErrorCallback; +- 378?: ErrorCallback; +- 379?: ErrorCallback; +- 380?: ErrorCallback; +- 381?: ErrorCallback; +- 382?: ErrorCallback; +- 383?: ErrorCallback; +- 384?: ErrorCallback; +- 385?: ErrorCallback; +- 386?: ErrorCallback; +- 387?: ErrorCallback; +- 388?: ErrorCallback; +- 389?: ErrorCallback; +- 390?: ErrorCallback; +- 391?: ErrorCallback; +- 392?: ErrorCallback; +- 393?: ErrorCallback; +- 394?: ErrorCallback; +- 395?: ErrorCallback; +- 396?: ErrorCallback; +- 397?: ErrorCallback; +- 398?: ErrorCallback; +- 399?: ErrorCallback; +- 400?: ErrorCallback; +- 401?: ErrorCallback; +- 402?: ErrorCallback; +- 403?: ErrorCallback; +- 404?: ErrorCallback; +- 405?: ErrorCallback; +- 406?: ErrorCallback; +- 407?: ErrorCallback; +- 408?: ErrorCallback; +- 409?: ErrorCallback; +- 410?: ErrorCallback; +- 411?: ErrorCallback; +- 412?: ErrorCallback; +- 413?: ErrorCallback; +- 414?: ErrorCallback; +- 415?: ErrorCallback; +- 416?: ErrorCallback; +- 417?: ErrorCallback; +- 418?: ErrorCallback; +- 419?: ErrorCallback; +- 420?: ErrorCallback; +- 421?: ErrorCallback; +- 422?: ErrorCallback; +- 423?: ErrorCallback; +- 424?: ErrorCallback; +- 425?: ErrorCallback; +- 426?: ErrorCallback; +- 427?: ErrorCallback; +- 428?: ErrorCallback; +- 429?: ErrorCallback; +- 430?: ErrorCallback; +- 431?: ErrorCallback; +- 432?: ErrorCallback; +- 433?: ErrorCallback; +- 434?: ErrorCallback; +- 435?: ErrorCallback; +- 436?: ErrorCallback; +- 437?: ErrorCallback; +- 438?: ErrorCallback; +- 439?: ErrorCallback; +- 440?: ErrorCallback; +- 441?: ErrorCallback; +- 442?: ErrorCallback; +- 443?: ErrorCallback; +- 444?: ErrorCallback; +- 445?: ErrorCallback; +- 446?: ErrorCallback; +- 447?: ErrorCallback; +- 448?: ErrorCallback; +- 449?: ErrorCallback; +- 450?: ErrorCallback; +- 451?: ErrorCallback; +- 452?: ErrorCallback; +- 453?: ErrorCallback; +- 454?: ErrorCallback; +- 455?: ErrorCallback; +- 456?: ErrorCallback; +- 457?: ErrorCallback; +- 458?: ErrorCallback; +- 459?: ErrorCallback; +- 460?: ErrorCallback; +- 461?: ErrorCallback; +- 462?: ErrorCallback; +- 463?: ErrorCallback; +- 464?: ErrorCallback; +- 465?: ErrorCallback; +- 466?: ErrorCallback; +- 467?: ErrorCallback; +- 468?: ErrorCallback; +- 469?: ErrorCallback; +- 470?: ErrorCallback; +- 471?: ErrorCallback; +- 472?: ErrorCallback; +- 473?: ErrorCallback; +- 474?: ErrorCallback; +- 475?: ErrorCallback; +- 476?: ErrorCallback; +- 477?: ErrorCallback; +- 478?: ErrorCallback; +- 479?: ErrorCallback; +- 480?: ErrorCallback; +- 481?: ErrorCallback; +- 482?: ErrorCallback; +- 483?: ErrorCallback; +- 484?: ErrorCallback; +- 485?: ErrorCallback; +- 486?: ErrorCallback; +- 487?: ErrorCallback; +- 488?: ErrorCallback; +- 489?: ErrorCallback; +- 490?: ErrorCallback; +- 491?: ErrorCallback; +- 492?: ErrorCallback; +- 493?: ErrorCallback; +- 494?: ErrorCallback; +- 495?: ErrorCallback; +- 496?: ErrorCallback; +- 497?: ErrorCallback; +- 498?: ErrorCallback; +- 499?: ErrorCallback; +- 500?: ErrorCallback; +- 501?: ErrorCallback; +- 502?: ErrorCallback; +- 503?: ErrorCallback; +- 504?: ErrorCallback; +- 505?: ErrorCallback; +- 506?: ErrorCallback; +- 507?: ErrorCallback; +- 508?: ErrorCallback; +- 509?: ErrorCallback; +- 510?: ErrorCallback; +- 511?: ErrorCallback; +- 512?: ErrorCallback; +- 513?: ErrorCallback; +- 514?: ErrorCallback; +- 515?: ErrorCallback; +- 516?: ErrorCallback; +- 517?: ErrorCallback; +- 518?: ErrorCallback; +- 519?: ErrorCallback; +- 520?: ErrorCallback; +- 521?: ErrorCallback; +- 522?: ErrorCallback; +- 523?: ErrorCallback; +- 524?: ErrorCallback; +- 525?: ErrorCallback; +- 526?: ErrorCallback; +- 527?: ErrorCallback; +- 528?: ErrorCallback; +- 529?: ErrorCallback; +- 530?: ErrorCallback; +- 531?: ErrorCallback; +- 532?: ErrorCallback; +- 533?: ErrorCallback; +- 534?: ErrorCallback; +- 535?: ErrorCallback; +- 536?: ErrorCallback; +- 537?: ErrorCallback; +- 538?: ErrorCallback; +- 539?: ErrorCallback; +- 540?: ErrorCallback; +- 541?: ErrorCallback; +- 542?: ErrorCallback; +- 543?: ErrorCallback; +- 544?: ErrorCallback; +- 545?: ErrorCallback; +- 546?: ErrorCallback; +- 547?: ErrorCallback; +- 548?: ErrorCallback; +- 549?: ErrorCallback; +- 550?: ErrorCallback; +- 551?: ErrorCallback; +- 552?: ErrorCallback; +- 553?: ErrorCallback; +- 554?: ErrorCallback; +- 555?: ErrorCallback; +- 556?: ErrorCallback; +- 557?: ErrorCallback; +- 558?: ErrorCallback; +- 559?: ErrorCallback; +- 560?: ErrorCallback; +- 561?: ErrorCallback; +- 562?: ErrorCallback; +- 563?: ErrorCallback; +- 564?: ErrorCallback; +- 565?: ErrorCallback; +- 566?: ErrorCallback; +- 567?: ErrorCallback; +- 568?: ErrorCallback; +- 569?: ErrorCallback; +- 570?: ErrorCallback; +- 571?: ErrorCallback; +- 572?: ErrorCallback; +- 573?: ErrorCallback; +- 574?: ErrorCallback; +- 575?: ErrorCallback; +- 576?: ErrorCallback; +- 577?: ErrorCallback; +- 578?: ErrorCallback; +- 579?: ErrorCallback; +- 580?: ErrorCallback; +- 581?: ErrorCallback; +- 582?: ErrorCallback; +- 583?: ErrorCallback; +- 584?: ErrorCallback; +- 585?: ErrorCallback; +- 586?: ErrorCallback; +- 587?: ErrorCallback; +- 588?: ErrorCallback; +- 589?: ErrorCallback; +- 590?: ErrorCallback; +- 591?: ErrorCallback; +- 592?: ErrorCallback; +- 593?: ErrorCallback; +- 594?: ErrorCallback; +- 595?: ErrorCallback; +- 596?: ErrorCallback; +- 597?: ErrorCallback; +- 598?: ErrorCallback; +- 599?: ErrorCallback; +- +- // #endregion +- } & { +- // Status codes not listed require type annotations when defining the callback +- [index: number]: SuccessCallback | ErrorCallback; +- }; +- +- // #endregion +- +- // Writable properties on XMLHttpRequest +- interface XHRFields extends Partial> { +- msCaching?: string; +- } +- } +- +- interface Transport { +- send(headers: PlainObject, completeCallback: Transport.SuccessCallback): void; +- abort(): void; +- } +- +- namespace Transport { +- type SuccessCallback = (status: number, statusText: Ajax.TextStatus, responses?: PlainObject, headers?: string) => void; +- } +- +- /** +- * @see \`{@link https://api.jquery.com/jquery.ajax/#jqXHR }\` +- */ +- interface jqXHR extends Promise3, never, +- Ajax.SuccessTextStatus, Ajax.ErrorTextStatus, never, +- jqXHR, string, never>, +- Pick, +- Partial> { +- responseJSON?: any; +- abort(statusText?: string): void; +- +- /** +- * Determine the current state of a Deferred object. +- * @see \`{@link https://api.jquery.com/deferred.state/ }\` +- * @since 1.7 +- */ +- state(): 'pending' | 'resolved' | 'rejected'; +- statusCode(map: Ajax.StatusCodeCallbacks): void; +- } +- +- namespace jqXHR { +- interface DoneCallback> extends Deferred.Callback3 { } +- +- interface FailCallback extends Deferred.Callback3 { } +- +- interface AlwaysCallback> extends Deferred.Callback3 { } +- } +- +- // #endregion +- +- // region Callbacks +- // #region Callbacks +- +- interface CallbacksStatic { +- /** +- * A multi-purpose callbacks list object that provides a powerful way to manage callback lists. +- * @param flags An optional list of space-separated flags that change how the callback list behaves. +- * @see \`{@link https://api.jquery.com/jQuery.Callbacks/ }\` +- * @since 1.7 +- */ +- // tslint:disable-next-line:ban-types callable-types no-unnecessary-generics +- (flags?: string): Callbacks; +- } +- +- // tslint:disable-next-line:ban-types +- interface Callbacks { +- /** +- * Add a callback or a collection of callbacks to a callback list. +- * @param callback A function, or array of functions, that are to be added to the callback list. +- * @param callbacks A function, or array of functions, that are to be added to the callback list. +- * @see \`{@link https://api.jquery.com/callbacks.add/ }\` +- * @since 1.7 +- * @example ​ ````Use callbacks.add() to add new callbacks to a callback list: +-```javascript +-// A sample logging function to be added to a callbacks list +-var foo = function( value ) { +- console.log( "foo: " + value ); +-}; +-​ +-// Another function to also be added to the list +-var bar = function( value ) { +- console.log( "bar: " + value ); +-}; +-​ +-var callbacks = $.Callbacks(); +-​ +-// Add the function "foo" to the list +-callbacks.add( foo ); +-​ +-// Fire the items on the list +-callbacks.fire( "hello" ); +-// Outputs: "foo: hello" +-​ +-// Add the function "bar" to the list +-callbacks.add( bar ); +-​ +-// Fire the items on the list again +-callbacks.fire( "world" ); +-​ +-// Outputs: +-// "foo: world" +-// "bar: world" +-``` +- */ +- add(callback: TypeOrArray, ...callbacks: Array>): this; +- /** +- * Disable a callback list from doing anything more. +- * @see \`{@link https://api.jquery.com/callbacks.disable/ }\` +- * @since 1.7 +- * @example ​ ````Use callbacks.disable() to disable further calls to a callback list: +-```javascript +-// A sample logging function to be added to a callbacks list +-var foo = function( value ) { +- console.log( value ); +-}; +-​ +-var callbacks = $.Callbacks(); +-​ +-// Add the above function to the list +-callbacks.add( foo ); +-​ +-// Fire the items on the list +-callbacks.fire( "foo" ); +-// Outputs: foo +-​ +-// Disable further calls being possible +-callbacks.disable(); +-​ +-// Attempt to fire with "foobar" as an argument +-callbacks.fire( "foobar" ); +-// foobar isn't output +-``` +- */ +- disable(): this; +- /** +- * Determine if the callbacks list has been disabled. +- * @see \`{@link https://api.jquery.com/callbacks.disabled/ }\` +- * @since 1.7 +- * @example ​ ````Use callbacks.disabled() to determine if the callbacks list has been disabled: +-```javascript +-// A sample logging function to be added to a callbacks list +-var foo = function( value ) { +- console.log( "foo:" + value ); +-}; +-​ +-var callbacks = $.Callbacks(); +-​ +-// Add the logging function to the callback list +-callbacks.add( foo ); +-​ +-// Fire the items on the list, passing an argument +-callbacks.fire( "hello" ); +-// Outputs "foo: hello" +-​ +-// Disable the callbacks list +-callbacks.disable(); +-​ +-// Test the disabled state of the list +-console.log ( callbacks.disabled() ); +-// Outputs: true +-``` +- */ +- disabled(): boolean; +- /** +- * Remove all of the callbacks from a list. +- * @see \`{@link https://api.jquery.com/callbacks.empty/ }\` +- * @since 1.7 +- * @example ​ ````Use callbacks.empty() to empty a list of callbacks: +-```javascript +-// A sample logging function to be added to a callbacks list +-var foo = function( value1, value2 ) { +- console.log( "foo: " + value1 + "," + value2 ); +-}; +-​ +-// Another function to also be added to the list +-var bar = function( value1, value2 ) { +- console.log( "bar: " + value1 + "," + value2 ); +-}; +-​ +-var callbacks = $.Callbacks(); +-​ +-// Add the two functions +-callbacks.add( foo ); +-callbacks.add( bar ); +-​ +-// Empty the callbacks list +-callbacks.empty(); +-​ +-// Check to ensure all callbacks have been removed +-console.log( callbacks.has( foo ) ); +-// false +-console.log( callbacks.has( bar ) ); +-// false +-``` +- */ +- empty(): this; +- /** +- * Call all of the callbacks with the given arguments. +- * @param args The argument or list of arguments to pass back to the callback list. +- * @see \`{@link https://api.jquery.com/callbacks.fire/ }\` +- * @since 1.7 +- * @example ​ ````Use callbacks.fire() to invoke the callbacks in a list with any arguments that have been passed: +-```javascript +-// A sample logging function to be added to a callbacks list +-var foo = function( value ) { +- console.log( "foo:" + value ); +-}; +-​ +-var callbacks = $.Callbacks(); +-​ +-// Add the function "foo" to the list +-callbacks.add( foo ); +-​ +-// Fire the items on the list +-callbacks.fire( "hello" ); // Outputs: "foo: hello" +-callbacks.fire( "world" ); // Outputs: "foo: world" +-​ +-// Add another function to the list +-var bar = function( value ){ +- console.log( "bar:" + value ); +-}; +-​ +-// Add this function to the list +-callbacks.add( bar ); +-​ +-// Fire the items on the list again +-callbacks.fire( "hello again" ); +-// Outputs: +-// "foo: hello again" +-// "bar: hello again" +-``` +- */ +- fire(...args: any[]): this; +- /** +- * Determine if the callbacks have already been called at least once. +- * @see \`{@link https://api.jquery.com/callbacks.fired/ }\` +- * @since 1.7 +- * @example ​ ````Use callbacks.fired() to determine if the callbacks in a list have been called at least once: +-```javascript +-// A sample logging function to be added to a callbacks list +-var foo = function( value ) { +- console.log( "foo:" + value ); +-}; +-​ +-var callbacks = $.Callbacks(); +-​ +-// Add the function "foo" to the list +-callbacks.add( foo ); +-​ +-// Fire the items on the list +-callbacks.fire( "hello" ); // Outputs: "foo: hello" +-callbacks.fire( "world" ); // Outputs: "foo: world" +-​ +-// Test to establish if the callbacks have been called +-console.log( callbacks.fired() ); +-``` +- */ +- fired(): boolean; +- /** +- * Call all callbacks in a list with the given context and arguments. +- * @param context A reference to the context in which the callbacks in the list should be fired. +- * @param args An argument, or array of arguments, to pass to the callbacks in the list. +- * @see \`{@link https://api.jquery.com/callbacks.fireWith/ }\` +- * @since 1.7 +- * @example ​ ````Use callbacks.fireWith() to fire a list of callbacks with a specific context and an array of arguments: +-```javascript +-// A sample logging function to be added to a callbacks list +-var log = function( value1, value2 ) { +- console.log( "Received: " + value1 + "," + value2 ); +-}; +-​ +-var callbacks = $.Callbacks(); +-​ +-// Add the log method to the callbacks list +-callbacks.add( log ); +-​ +-// Fire the callbacks on the list using the context "window" +-// and an arguments array +-​ +-callbacks.fireWith( window, [ "foo","bar" ] ); +-// Outputs: "Received: foo, bar" +-``` +- */ +- fireWith(context: object, args?: ArrayLike): this; +- /** +- * Determine whether or not the list has any callbacks attached. If a callback is provided as an argument, determine whether it is in a list. +- * @param callback The callback to search for. +- * @see \`{@link https://api.jquery.com/callbacks.has/ }\` +- * @since 1.7 +- * @example ​ ````Use callbacks.has() to check if a callback list contains a specific callback: +-```javascript +-// A sample logging function to be added to a callbacks list +-var foo = function( value1, value2 ) { +- console.log( "Received: " + value1 + "," + value2 ); +-}; +-​ +-// A second function which will not be added to the list +-var bar = function( value1, value2 ) { +- console.log( "foobar" ); +-}; +-​ +-var callbacks = $.Callbacks(); +-​ +-// Add the log method to the callbacks list +-callbacks.add( foo ); +-​ +-// Determine which callbacks are in the list +-console.log( callbacks.has( foo ) ); +-// true +-console.log( callbacks.has( bar ) ); +-// false +-``` +- */ +- has(callback?: T): boolean; +- /** +- * Lock a callback list in its current state. +- * @see \`{@link https://api.jquery.com/callbacks.lock/ }\` +- * @since 1.7 +- * @example ​ ````Use callbacks.lock() to lock a callback list to avoid further changes being made to the list state: +-```javascript +-// A sample logging function to be added to a callbacks list +-var foo = function( value ) { +- console.log( "foo:" + value ); +-}; +-​ +-var callbacks = $.Callbacks(); +-​ +-// Add the logging function to the callback list +-callbacks.add( foo ); +-​ +-// Fire the items on the list, passing an argument +-callbacks.fire( "hello" ); +-// Outputs "foo: hello" +-​ +-// Lock the callbacks list +-callbacks.lock(); +-​ +-// Try firing the items again +-callbacks.fire( "world" ); +-​ +-// As the list was locked, no items were called, +-// so "world" isn't logged +-``` +- * @example ​ ````Use callbacks.lock() to lock a callback list with "memory," and then resume using the list: +-```html +- +- +- +- +- callbacks.lock demo +- +- +- +-​ +-
        +-​ +- +-​ +- +- +-``` +- */ +- lock(): this; +- /** +- * Determine if the callbacks list has been locked. +- * @see \`{@link https://api.jquery.com/callbacks.locked/ }\` +- * @since 1.7 +- * @example ​ ````Use callbacks.locked() to determine the lock-state of a callback list: +-```javascript +-// A sample logging function to be added to a callbacks list +-var foo = function( value ) { +- console.log( "foo: " + value ); +-}; +-​ +-var callbacks = $.Callbacks(); +-​ +-// Add the logging function to the callback list +-callbacks.add( foo ); +-​ +-// Fire the items on the list, passing an argument +-callbacks.fire( "hello" ); +-// Outputs "foo: hello" +-​ +-// Lock the callbacks list +-callbacks.lock(); +-​ +-// Test the lock-state of the list +-console.log ( callbacks.locked() ); +-// true +-``` +- */ +- locked(): boolean; +- /** +- * Remove a callback or a collection of callbacks from a callback list. +- * @param callbacks A function, or array of functions, that are to be removed from the callback list. +- * @see \`{@link https://api.jquery.com/callbacks.remove/ }\` +- * @since 1.7 +- * @example ​ ````Use callbacks.remove() to remove callbacks from a callback list: +-```javascript +-// A sample logging function to be added to a callbacks list +-var foo = function( value ) { +- console.log( "foo: " + value ); +-}; +-​ +-var callbacks = $.Callbacks(); +-​ +-// Add the function "foo" to the list +-callbacks.add( foo ); +-​ +-// Fire the items on the list +-callbacks.fire( "hello" ); +-// Outputs: "foo: hello" +-​ +-// Remove "foo" from the callback list +-callbacks.remove( foo ); +-​ +-// Fire the items on the list again +-callbacks.fire( "world" ); +-​ +-// Nothing output as "foo" is no longer in the list +-``` +- */ +- remove(...callbacks: T[]): this; +- } +- +- // #endregion +- +- // region CSS hooks +- // #region CSS hooks +- +- // Workaround for TypeScript 2.3 which does not have support for weak types handling. +- type CSSHook = +- Partial<_CSSHook> & ( +- Pick<_CSSHook, 'get'> | +- Pick<_CSSHook, 'set'> +- ); +- +- interface _CSSHook { +- get(elem: TElement, computed: any, extra: any): any; +- set(elem: TElement, value: any): void; +- } +- +- interface CSSHooks { +- // Set to HTMLElement to minimize breaks but should probably be Element. +- [propertyName: string]: CSSHook; +- } +- +- // #endregion +- +- // region Deferred +- // #region Deferred +- +- /** +- * Any object that has a then method. +- */ +- interface Thenable extends PromiseLike { } +- +- // NOTE: This is a private copy of the global Promise interface. It is used by JQuery.PromiseBase to indicate compatibility with other Promise implementations. +- // The global Promise interface cannot be used directly as it may be modified, as in the case of @types/bluebird-global. +- /** +- * Represents the completion of an asynchronous operation +- */ +- interface _Promise { +- readonly [Symbol.toStringTag]: "Promise"; +- /** +- * Attaches callbacks for the resolution and/or rejection of the Promise. +- * @param onfulfilled The callback to execute when the Promise is resolved. +- * @param onrejected The callback to execute when the Promise is rejected. +- * @returns A Promise for the completion of which ever callback is executed. +- */ +- then(onfulfilled?: ((value: T) => TResult1 | PromiseLike) | null, +- onrejected?: ((reason: any) => TResult2 | PromiseLike) | null): _Promise; +- /** +- * Attaches a callback for only the rejection of the Promise. +- * @param onrejected The callback to execute when the Promise is rejected. +- * @returns A Promise for the completion of the callback. +- */ +- catch(onrejected?: ((reason: any) => TResult | PromiseLike) | null): _Promise; +- } +- +- // Type parameter guide +- // -------------------- +- // Each type parameter represents a parameter in one of the three possible callbacks. +- // +- // The first letter indicates which position the parameter is in. +- // +- // T = A = 1st position +- // U = B = 2nd position +- // V = C = 3rd position +- // S = R = rest position +- // +- // The second letter indicates which whether it is a [R]esolve, Re[J]ect, or [N]otify value. +- // +- // The third letter indicates whether the value is returned in the [D]one filter, [F]ail filter, or [P]rogress filter. +- +- /** +- * This object provides a subset of the methods of the Deferred object (then, done, fail, always, pipe, progress, state and promise) to prevent users from changing the state of the Deferred. +- * @see \`{@link https://api.jquery.com/Types/#Promise }\` +- */ +- interface PromiseBase extends _Promise, PromiseLike { +- /** +- * Add handlers to be called when the Deferred object is either resolved or rejected. +- * @param alwaysCallback A function, or array of functions, that is called when the Deferred is resolved or rejected. +- * @param alwaysCallbacks Optional additional functions, or arrays of functions, that are called when the Deferred is resolved or rejected. +- * @see \`{@link https://api.jquery.com/deferred.always/ }\` +- * @since 1.6 +- * @example ​ ````Since the jQuery.get() method returns a jqXHR object, which is derived from a Deferred object, we can attach a callback for both success and error using the deferred.always() method. +-```javascript +-$.get( "test.php" ).always(function() { +- alert( "$.get completed with success or error callback arguments" ); +-}); +-``` +- */ +- always(alwaysCallback: TypeOrArray>, +- ...alwaysCallbacks: Array>>): this; +- /** +- * Add handlers to be called when the Deferred object is resolved. +- * @param doneCallback A function, or array of functions, that are called when the Deferred is resolved. +- * @param doneCallbacks Optional additional functions, or arrays of functions, that are called when the Deferred is resolved. +- * @see \`{@link https://api.jquery.com/deferred.done/ }\` +- * @since 1.5 +- * @example ​ ````Since the jQuery.get method returns a jqXHR object, which is derived from a Deferred object, we can attach a success callback using the .done() method. +-```javascript +-$.get( "test.php" ).done(function() { +- alert( "$.get succeeded" ); +-}); +-``` +- * @example ​ ````Resolve a Deferred object when the user clicks a button, triggering a number of callback functions: +-```html +- +- +- +- +- deferred.done demo +- +- +- +-​ +- +-

        Ready...

        +-​ +- +-​ +- +- +-``` +- */ +- done(doneCallback: TypeOrArray>, +- ...doneCallbacks: Array>>): this; +- /** +- * Add handlers to be called when the Deferred object is rejected. +- * @param failCallback A function, or array of functions, that are called when the Deferred is rejected. +- * @param failCallbacks Optional additional functions, or arrays of functions, that are called when the Deferred is rejected. +- * @see \`{@link https://api.jquery.com/deferred.fail/ }\` +- * @since 1.5 +- * @example ​ ````Since the jQuery.get method returns a jqXHR object, which is derived from a Deferred, you can attach a success and failure callback using the deferred.done() and deferred.fail() methods. +-```javascript +-$.get( "test.php" ) +- .done(function() { +- alert( "$.get succeeded" ); +- }) +- .fail(function() { +- alert( "$.get failed!" ); +- }); +-``` +- */ +- fail(failCallback: TypeOrArray>, +- ...failCallbacks: Array>>): this; +- /** +- * Add handlers to be called when the Deferred object generates progress notifications. +- * @param progressCallback A function, or array of functions, to be called when the Deferred generates progress notifications. +- * @param progressCallbacks Optional additional functions, or arrays of functions, to be called when the Deferred generates +- * progress notifications. +- * @see \`{@link https://api.jquery.com/deferred.progress/ }\` +- * @since 1.7 +- */ +- progress(progressCallback: TypeOrArray>, +- ...progressCallbacks: Array>>): this; +- /** +- * Return a Deferred's Promise object. +- * @param target Object onto which the promise methods have to be attached +- * @see \`{@link https://api.jquery.com/deferred.promise/ }\` +- * @since 1.5 +- * @example ​ ````Create a Deferred and set two timer-based functions to either resolve or reject the Deferred after a random interval. Whichever one fires first "wins" and will call one of the callbacks. The second timeout has no effect since the Deferred is already complete (in a resolved or rejected state) from the first timeout action. Also set a timer-based progress notification function, and call a progress handler that adds "working..." to the document body. +-```javascript +-function asyncEvent() { +- var dfd = jQuery.Deferred(); +-​ +- // Resolve after a random interval +- setTimeout(function() { +- dfd.resolve( "hurray" ); +- }, Math.floor( 400 + Math.random() * 2000 ) ); +-​ +- // Reject after a random interval +- setTimeout(function() { +- dfd.reject( "sorry" ); +- }, Math.floor( 400 + Math.random() * 2000 ) ); +-​ +- // Show a "working..." message every half-second +- setTimeout(function working() { +- if ( dfd.state() === "pending" ) { +- dfd.notify( "working... " ); +- setTimeout( working, 500 ); +- } +- }, 1 ); +-​ +- // Return the Promise so caller can't change the Deferred +- return dfd.promise(); +-} +-​ +-// Attach a done, fail, and progress handler for the asyncEvent +-$.when( asyncEvent() ).then( +- function( status ) { +- alert( status + ", things are going well" ); +- }, +- function( status ) { +- alert( status + ", you fail this time" ); +- }, +- function( status ) { +- $( "body" ).append( status ); +- } +-); +-``` +- */ +- promise(target: TTarget): this & TTarget; +- /** +- * Return a Deferred's Promise object. +- * @see \`{@link https://api.jquery.com/deferred.promise/ }\` +- * @since 1.5 +- * @example ​ ````Use the target argument to promote an existing object to a Promise: +-```javascript +-// Existing object +-var obj = { +- hello: function( name ) { +- alert( "Hello " + name ); +- } +- }, +- // Create a Deferred +- defer = $.Deferred(); +-​ +-// Set object as a promise +-defer.promise( obj ); +-​ +-// Resolve the deferred +-defer.resolve( "John" ); +-​ +-// Use the object as a Promise +-obj.done(function( name ) { +- obj.hello( name ); // Will alert "Hello John" +-}).hello( "Karl" ); // Will alert "Hello Karl" +-``` +- */ +- promise(): this; +- /** +- * Determine the current state of a Deferred object. +- * @see \`{@link https://api.jquery.com/deferred.state/ }\` +- * @since 1.7 +- */ +- state(): 'pending' | 'resolved' | 'rejected'; +- +- // region pipe +- // #region pipe +- +- /** +- * Utility method to filter and/or chain Deferreds. +- * @param doneFilter An optional function that is called when the Deferred is resolved. +- * @param failFilter An optional function that is called when the Deferred is rejected. +- * @param progressFilter An optional function that is called when progress notifications are sent to the Deferred. +- * @see \`{@link https://api.jquery.com/deferred.pipe/ }\` +- * @since 1.6 +- * @since 1.7 +- * @deprecated ​ Deprecated since 1.8. Use \`{@link then }\`. +- * +- * **Cause**: The `.pipe()` method on a `jQuery.Deferred` object was deprecated as of jQuery 1.8, when the `.then()` method was changed to perform the same function. +- * +- * **Solution**: In most cases it is sufficient to change all occurrences of `.pipe()` to `.then()`. Ensure that you aren't relying on context/state propagation (e.g., using `this`) or synchronous callback invocation, which were dropped from `.then()` for Promises/A+ interoperability as of jQuery 3.0. +- * @example ​ ````Filter resolve value: +-```javascript +-var defer = $.Deferred(), +- filtered = defer.pipe(function( value ) { +- return value * 2; +- }); +-​ +-defer.resolve( 5 ); +-filtered.done(function( value ) { +- alert( "Value is ( 2*5 = ) 10: " + value ); +-}); +-``` +- * @example ​ ````Filter reject value: +-```javascript +-var defer = $.Deferred(), +- filtered = defer.pipe( null, function( value ) { +- return value * 3; +- }); +-​ +-defer.reject( 6 ); +-filtered.fail(function( value ) { +- alert( "Value is ( 3*6 = ) 18: " + value ); +-}); +-``` +- * @example ​ ````Chain tasks: +-```javascript +-var request = $.ajax( url, { dataType: "json" } ), +- chained = request.pipe(function( data ) { +- return $.ajax( url2, { data: { user: data.userId } } ); +- }); +-​ +-chained.done(function( data ) { +- // data retrieved from url2 as provided by the first request +-}); +-``` +- */ +- pipe( +- doneFilter: (t: TR, u: UR, v: VR, ...s: SR[]) => PromiseBase | Thenable | ARD, +- failFilter: (t: TJ, u: UJ, v: VJ, ...s: SJ[]) => PromiseBase | Thenable | AJF, +- progressFilter: (t: TN, u: UN, v: VN, ...s: SN[]) => PromiseBase | Thenable | ANP): PromiseBase; +- /** +- * Utility method to filter and/or chain Deferreds. +- * @param doneFilter An optional function that is called when the Deferred is resolved. +- * @param failFilter An optional function that is called when the Deferred is rejected. +- * @param progressFilter An optional function that is called when progress notifications are sent to the Deferred. +- * @see \`{@link https://api.jquery.com/deferred.pipe/ }\` +- * @since 1.6 +- * @since 1.7 +- * @deprecated ​ Deprecated since 1.8. Use \`{@link then }\`. +- * +- * **Cause**: The `.pipe()` method on a `jQuery.Deferred` object was deprecated as of jQuery 1.8, when the `.then()` method was changed to perform the same function. +- * +- * **Solution**: In most cases it is sufficient to change all occurrences of `.pipe()` to `.then()`. Ensure that you aren't relying on context/state propagation (e.g., using `this`) or synchronous callback invocation, which were dropped from `.then()` for Promises/A+ interoperability as of jQuery 3.0. +- * @example ​ ````Filter reject value: +-```javascript +-var defer = $.Deferred(), +- filtered = defer.pipe( null, function( value ) { +- return value * 3; +- }); +-​ +-defer.reject( 6 ); +-filtered.fail(function( value ) { +- alert( "Value is ( 3*6 = ) 18: " + value ); +-}); +-``` +- * @example ​ ````Chain tasks: +-```javascript +-var request = $.ajax( url, { dataType: "json" } ), +- chained = request.pipe(function( data ) { +- return $.ajax( url2, { data: { user: data.userId } } ); +- }); +-​ +-chained.done(function( data ) { +- // data retrieved from url2 as provided by the first request +-}); +-``` +- */ +- pipe( +- doneFilter: null, +- failFilter: (t: TJ, u: UJ, v: VJ, ...s: SJ[]) => PromiseBase | Thenable | AJF, +- progressFilter: (t: TN, u: UN, v: VN, ...s: SN[]) => PromiseBase | Thenable | ANP): PromiseBase; +- /** +- * Utility method to filter and/or chain Deferreds. +- * @param doneFilter An optional function that is called when the Deferred is resolved. +- * @param failFilter An optional function that is called when the Deferred is rejected. +- * @param progressFilter An optional function that is called when progress notifications are sent to the Deferred. +- * @see \`{@link https://api.jquery.com/deferred.pipe/ }\` +- * @since 1.6 +- * @since 1.7 +- * @deprecated ​ Deprecated since 1.8. Use \`{@link then }\`. +- * +- * **Cause**: The `.pipe()` method on a `jQuery.Deferred` object was deprecated as of jQuery 1.8, when the `.then()` method was changed to perform the same function. +- * +- * **Solution**: In most cases it is sufficient to change all occurrences of `.pipe()` to `.then()`. Ensure that you aren't relying on context/state propagation (e.g., using `this`) or synchronous callback invocation, which were dropped from `.then()` for Promises/A+ interoperability as of jQuery 3.0. +- * @example ​ ````Filter resolve value: +-```javascript +-var defer = $.Deferred(), +- filtered = defer.pipe(function( value ) { +- return value * 2; +- }); +-​ +-defer.resolve( 5 ); +-filtered.done(function( value ) { +- alert( "Value is ( 2*5 = ) 10: " + value ); +-}); +-``` +- * @example ​ ````Chain tasks: +-```javascript +-var request = $.ajax( url, { dataType: "json" } ), +- chained = request.pipe(function( data ) { +- return $.ajax( url2, { data: { user: data.userId } } ); +- }); +-​ +-chained.done(function( data ) { +- // data retrieved from url2 as provided by the first request +-}); +-``` +- */ +- pipe( +- doneFilter: (t: TR, u: UR, v: VR, ...s: SR[]) => PromiseBase | Thenable | ARD, +- failFilter: null, +- progressFilter: (t: TN, u: UN, v: VN, ...s: SN[]) => PromiseBase | Thenable | ANP): PromiseBase; +- /** +- * Utility method to filter and/or chain Deferreds. +- * @param doneFilter An optional function that is called when the Deferred is resolved. +- * @param failFilter An optional function that is called when the Deferred is rejected. +- * @param progressFilter An optional function that is called when progress notifications are sent to the Deferred. +- * @see \`{@link https://api.jquery.com/deferred.pipe/ }\` +- * @since 1.6 +- * @since 1.7 +- * @deprecated ​ Deprecated since 1.8. Use \`{@link then }\`. +- * +- * **Cause**: The `.pipe()` method on a `jQuery.Deferred` object was deprecated as of jQuery 1.8, when the `.then()` method was changed to perform the same function. +- * +- * **Solution**: In most cases it is sufficient to change all occurrences of `.pipe()` to `.then()`. Ensure that you aren't relying on context/state propagation (e.g., using `this`) or synchronous callback invocation, which were dropped from `.then()` for Promises/A+ interoperability as of jQuery 3.0. +- * @example ​ ````Chain tasks: +-```javascript +-var request = $.ajax( url, { dataType: "json" } ), +- chained = request.pipe(function( data ) { +- return $.ajax( url2, { data: { user: data.userId } } ); +- }); +-​ +-chained.done(function( data ) { +- // data retrieved from url2 as provided by the first request +-}); +-``` +- */ +- pipe( +- doneFilter: null, +- failFilter: null, +- progressFilter?: (t: TN, u: UN, v: VN, ...s: SN[]) => PromiseBase | Thenable | ANP): PromiseBase; +- /** +- * Utility method to filter and/or chain Deferreds. +- * @param doneFilter An optional function that is called when the Deferred is resolved. +- * @param failFilter An optional function that is called when the Deferred is rejected. +- * @param progressFilter An optional function that is called when progress notifications are sent to the Deferred. +- * @see \`{@link https://api.jquery.com/deferred.pipe/ }\` +- * @since 1.6 +- * @since 1.7 +- * @deprecated ​ Deprecated since 1.8. Use \`{@link then }\`. +- * +- * **Cause**: The `.pipe()` method on a `jQuery.Deferred` object was deprecated as of jQuery 1.8, when the `.then()` method was changed to perform the same function. +- * +- * **Solution**: In most cases it is sufficient to change all occurrences of `.pipe()` to `.then()`. Ensure that you aren't relying on context/state propagation (e.g., using `this`) or synchronous callback invocation, which were dropped from `.then()` for Promises/A+ interoperability as of jQuery 3.0. +- * @example ​ ````Filter resolve value: +-```javascript +-var defer = $.Deferred(), +- filtered = defer.pipe(function( value ) { +- return value * 2; +- }); +-​ +-defer.resolve( 5 ); +-filtered.done(function( value ) { +- alert( "Value is ( 2*5 = ) 10: " + value ); +-}); +-``` +- * @example ​ ````Filter reject value: +-```javascript +-var defer = $.Deferred(), +- filtered = defer.pipe( null, function( value ) { +- return value * 3; +- }); +-​ +-defer.reject( 6 ); +-filtered.fail(function( value ) { +- alert( "Value is ( 3*6 = ) 18: " + value ); +-}); +-``` +- * @example ​ ````Chain tasks: +-```javascript +-var request = $.ajax( url, { dataType: "json" } ), +- chained = request.pipe(function( data ) { +- return $.ajax( url2, { data: { user: data.userId } } ); +- }); +-​ +-chained.done(function( data ) { +- // data retrieved from url2 as provided by the first request +-}); +-``` +- */ +- pipe( +- doneFilter: (t: TR, u: UR, v: VR, ...s: SR[]) => PromiseBase | Thenable | ARD, +- failFilter: (t: TJ, u: UJ, v: VJ, ...s: SJ[]) => PromiseBase | Thenable | AJF, +- progressFilter?: null): PromiseBase; +- /** +- * Utility method to filter and/or chain Deferreds. +- * @param doneFilter An optional function that is called when the Deferred is resolved. +- * @param failFilter An optional function that is called when the Deferred is rejected. +- * @param progressFilter An optional function that is called when progress notifications are sent to the Deferred. +- * @see \`{@link https://api.jquery.com/deferred.pipe/ }\` +- * @since 1.6 +- * @since 1.7 +- * @deprecated ​ Deprecated since 1.8. Use \`{@link then }\`. +- * +- * **Cause**: The `.pipe()` method on a `jQuery.Deferred` object was deprecated as of jQuery 1.8, when the `.then()` method was changed to perform the same function. +- * +- * **Solution**: In most cases it is sufficient to change all occurrences of `.pipe()` to `.then()`. Ensure that you aren't relying on context/state propagation (e.g., using `this`) or synchronous callback invocation, which were dropped from `.then()` for Promises/A+ interoperability as of jQuery 3.0. +- * @example ​ ````Filter reject value: +-```javascript +-var defer = $.Deferred(), +- filtered = defer.pipe( null, function( value ) { +- return value * 3; +- }); +-​ +-defer.reject( 6 ); +-filtered.fail(function( value ) { +- alert( "Value is ( 3*6 = ) 18: " + value ); +-}); +-``` +- * @example ​ ````Chain tasks: +-```javascript +-var request = $.ajax( url, { dataType: "json" } ), +- chained = request.pipe(function( data ) { +- return $.ajax( url2, { data: { user: data.userId } } ); +- }); +-​ +-chained.done(function( data ) { +- // data retrieved from url2 as provided by the first request +-}); +-``` +- */ +- pipe( +- doneFilter: null, +- failFilter: (t: TJ, u: UJ, v: VJ, ...s: SJ[]) => PromiseBase | Thenable | AJF, +- progressFilter?: null): PromiseBase; +- /** +- * Utility method to filter and/or chain Deferreds. +- * @param doneFilter An optional function that is called when the Deferred is resolved. +- * @param failFilter An optional function that is called when the Deferred is rejected. +- * @param progressFilter An optional function that is called when progress notifications are sent to the Deferred. +- * @see \`{@link https://api.jquery.com/deferred.pipe/ }\` +- * @since 1.6 +- * @since 1.7 +- * @deprecated ​ Deprecated since 1.8. Use \`{@link then }\`. +- * +- * **Cause**: The `.pipe()` method on a `jQuery.Deferred` object was deprecated as of jQuery 1.8, when the `.then()` method was changed to perform the same function. +- * +- * **Solution**: In most cases it is sufficient to change all occurrences of `.pipe()` to `.then()`. Ensure that you aren't relying on context/state propagation (e.g., using `this`) or synchronous callback invocation, which were dropped from `.then()` for Promises/A+ interoperability as of jQuery 3.0. +- * @example ​ ````Filter resolve value: +-```javascript +-var defer = $.Deferred(), +- filtered = defer.pipe(function( value ) { +- return value * 2; +- }); +-​ +-defer.resolve( 5 ); +-filtered.done(function( value ) { +- alert( "Value is ( 2*5 = ) 10: " + value ); +-}); +-``` +- * @example ​ ````Chain tasks: +-```javascript +-var request = $.ajax( url, { dataType: "json" } ), +- chained = request.pipe(function( data ) { +- return $.ajax( url2, { data: { user: data.userId } } ); +- }); +-​ +-chained.done(function( data ) { +- // data retrieved from url2 as provided by the first request +-}); +-``` +- */ +- pipe( +- doneFilter: (t: TR, u: UR, v: VR, ...s: SR[]) => PromiseBase | Thenable | ARD, +- failFilter?: null, +- progressFilter?: null): PromiseBase; +- +- // #endregion +- +- // region then +- // #region then +- +- /** +- * Add handlers to be called when the Deferred object is resolved, rejected, or still in progress. +- * @param doneFilter An optional function that is called when the Deferred is resolved. +- * @param failFilter An optional function that is called when the Deferred is rejected. +- * @param progressFilter An optional function that is called when progress notifications are sent to the Deferred. +- * @see \`{@link https://api.jquery.com/deferred.then/ }\` +- * @since 1.8 +- * @example ​ ````Since the jQuery.get method returns a jqXHR object, which is derived from a Deferred object, we can attach handlers using the .then method. +-```javascript +-$.get( "test.php" ).then( +- function() { +- alert( "$.get succeeded" ); +- }, function() { +- alert( "$.get failed!" ); +- } +-); +-``` +- * @example ​ ````Filter the resolve value: +-```html +- +- +- +- +- deferred.then demo +- +- +- +-​ +- +-

        +-​ +- +-​ +- +- +-``` +- * @example ​ ````Filter reject value: +-```javascript +-var defer = $.Deferred(), +- filtered = defer.then( null, function( value ) { +- return value * 3; +- }); +-​ +-defer.reject( 6 ); +-filtered.fail(function( value ) { +- alert( "Value is ( 3*6 = ) 18: " + value ); +-}); +-``` +- * @example ​ ````Chain tasks: +-```javascript +-var request = $.ajax( url, { dataType: "json" } ), +- chained = request.then(function( data ) { +- return $.ajax( url2, { data: { user: data.userId } } ); +- }); +-​ +-chained.done(function( data ) { +- // data retrieved from url2 as provided by the first request +-}); +-``` +- */ +- then( +- doneFilter: (t: TR, u: UR, v: VR, ...s: SR[]) => PromiseBase | Thenable | ARD, +- failFilter: (t: TJ, u: UJ, v: VJ, ...s: SJ[]) => PromiseBase | Thenable | ARF, +- progressFilter: (t: TN, u: UN, v: VN, ...s: SN[]) => PromiseBase | Thenable | ANP): PromiseBase; +- /** +- * Add handlers to be called when the Deferred object is resolved, rejected, or still in progress. +- * @param doneFilter An optional function that is called when the Deferred is resolved. +- * @param failFilter An optional function that is called when the Deferred is rejected. +- * @param progressFilter An optional function that is called when progress notifications are sent to the Deferred. +- * @see \`{@link https://api.jquery.com/deferred.then/ }\` +- * @since 1.8 +- * @example ​ ````Filter reject value: +-```javascript +-var defer = $.Deferred(), +- filtered = defer.then( null, function( value ) { +- return value * 3; +- }); +-​ +-defer.reject( 6 ); +-filtered.fail(function( value ) { +- alert( "Value is ( 3*6 = ) 18: " + value ); +-}); +-``` +- * @example ​ ````Chain tasks: +-```javascript +-var request = $.ajax( url, { dataType: "json" } ), +- chained = request.then(function( data ) { +- return $.ajax( url2, { data: { user: data.userId } } ); +- }); +-​ +-chained.done(function( data ) { +- // data retrieved from url2 as provided by the first request +-}); +-``` +- */ +- then( +- doneFilter: null, +- failFilter: (t: TJ, u: UJ, v: VJ, ...s: SJ[]) => PromiseBase | Thenable | ARF, +- progressFilter: (t: TN, u: UN, v: VN, ...s: SN[]) => PromiseBase | Thenable | ANP): PromiseBase; +- /** +- * Add handlers to be called when the Deferred object is resolved, rejected, or still in progress. +- * @param doneFilter An optional function that is called when the Deferred is resolved. +- * @param failFilter An optional function that is called when the Deferred is rejected. +- * @param progressFilter An optional function that is called when progress notifications are sent to the Deferred. +- * @see \`{@link https://api.jquery.com/deferred.then/ }\` +- * @since 1.8 +- * @example ​ ````Filter the resolve value: +-```html +- +- +- +- +- deferred.then demo +- +- +- +-​ +- +-

        +-​ +- +-​ +- +- +-``` +- * @example ​ ````Chain tasks: +-```javascript +-var request = $.ajax( url, { dataType: "json" } ), +- chained = request.then(function( data ) { +- return $.ajax( url2, { data: { user: data.userId } } ); +- }); +-​ +-chained.done(function( data ) { +- // data retrieved from url2 as provided by the first request +-}); +-``` +- */ +- then( +- doneFilter: (t: TR, u: UR, v: VR, ...s: SR[]) => PromiseBase | Thenable | ARD, +- failFilter: null, +- progressFilter: (t: TN, u: UN, v: VN, ...s: SN[]) => PromiseBase | Thenable | ANP): PromiseBase; +- /** +- * Add handlers to be called when the Deferred object is resolved, rejected, or still in progress. +- * @param doneFilter An optional function that is called when the Deferred is resolved. +- * @param failFilter An optional function that is called when the Deferred is rejected. +- * @param progressFilter An optional function that is called when progress notifications are sent to the Deferred. +- * @see \`{@link https://api.jquery.com/deferred.then/ }\` +- * @since 1.8 +- * @example ​ ````Chain tasks: +-```javascript +-var request = $.ajax( url, { dataType: "json" } ), +- chained = request.then(function( data ) { +- return $.ajax( url2, { data: { user: data.userId } } ); +- }); +-​ +-chained.done(function( data ) { +- // data retrieved from url2 as provided by the first request +-}); +-``` +- */ +- then( +- doneFilter: null, +- failFilter: null, +- progressFilter?: (t: TN, u: UN, v: VN, ...s: SN[]) => PromiseBase | Thenable | ANP): PromiseBase; +- /** +- * Add handlers to be called when the Deferred object is resolved, rejected, or still in progress. +- * @param doneFilter An optional function that is called when the Deferred is resolved. +- * @param failFilter An optional function that is called when the Deferred is rejected. +- * @param progressFilter An optional function that is called when progress notifications are sent to the Deferred. +- * @see \`{@link https://api.jquery.com/deferred.then/ }\` +- * @since 1.8 +- * @example ​ ````Since the jQuery.get method returns a jqXHR object, which is derived from a Deferred object, we can attach handlers using the .then method. +-```javascript +-$.get( "test.php" ).then( +- function() { +- alert( "$.get succeeded" ); +- }, function() { +- alert( "$.get failed!" ); +- } +-); +-``` +- * @example ​ ````Filter the resolve value: +-```html +- +- +- +- +- deferred.then demo +- +- +- +-​ +- +-

        +-​ +- +-​ +- +- +-``` +- * @example ​ ````Filter reject value: +-```javascript +-var defer = $.Deferred(), +- filtered = defer.then( null, function( value ) { +- return value * 3; +- }); +-​ +-defer.reject( 6 ); +-filtered.fail(function( value ) { +- alert( "Value is ( 3*6 = ) 18: " + value ); +-}); +-``` +- * @example ​ ````Chain tasks: +-```javascript +-var request = $.ajax( url, { dataType: "json" } ), +- chained = request.then(function( data ) { +- return $.ajax( url2, { data: { user: data.userId } } ); +- }); +-​ +-chained.done(function( data ) { +- // data retrieved from url2 as provided by the first request +-}); +-``` +- */ +- then( +- doneFilter: (t: TR, u: UR, v: VR, ...s: SR[]) => PromiseBase | Thenable | ARD, +- failFilter: (t: TJ, u: UJ, v: VJ, ...s: SJ[]) => PromiseBase | Thenable | ARF, +- progressFilter?: null): PromiseBase; +- /** +- * Add handlers to be called when the Deferred object is resolved, rejected, or still in progress. +- * @param doneFilter An optional function that is called when the Deferred is resolved. +- * @param failFilter An optional function that is called when the Deferred is rejected. +- * @param progressFilter An optional function that is called when progress notifications are sent to the Deferred. +- * @see \`{@link https://api.jquery.com/deferred.then/ }\` +- * @since 1.8 +- * @example ​ ````Filter reject value: +-```javascript +-var defer = $.Deferred(), +- filtered = defer.then( null, function( value ) { +- return value * 3; +- }); +-​ +-defer.reject( 6 ); +-filtered.fail(function( value ) { +- alert( "Value is ( 3*6 = ) 18: " + value ); +-}); +-``` +- * @example ​ ````Chain tasks: +-```javascript +-var request = $.ajax( url, { dataType: "json" } ), +- chained = request.then(function( data ) { +- return $.ajax( url2, { data: { user: data.userId } } ); +- }); +-​ +-chained.done(function( data ) { +- // data retrieved from url2 as provided by the first request +-}); +-``` +- */ +- then( +- doneFilter: null, +- failFilter: (t: TJ, u: UJ, v: VJ, ...s: SJ[]) => PromiseBase | Thenable | ARF, +- progressFilter?: null): PromiseBase; +- /** +- * Add handlers to be called when the Deferred object is resolved, rejected, or still in progress. +- * @param doneFilter An optional function that is called when the Deferred is resolved. +- * @param failFilter An optional function that is called when the Deferred is rejected. +- * @param progressFilter An optional function that is called when progress notifications are sent to the Deferred. +- * @see \`{@link https://api.jquery.com/deferred.then/ }\` +- * @since 1.8 +- * @example ​ ````Filter the resolve value: +-```html +- +- +- +- +- deferred.then demo +- +- +- +-​ +- +-

        +-​ +- +-​ +- +- +-``` +- * @example ​ ````Chain tasks: +-```javascript +-var request = $.ajax( url, { dataType: "json" } ), +- chained = request.then(function( data ) { +- return $.ajax( url2, { data: { user: data.userId } } ); +- }); +-​ +-chained.done(function( data ) { +- // data retrieved from url2 as provided by the first request +-}); +-``` +- */ +- then( +- doneFilter: (t: TR, u: UR, v: VR, ...s: SR[]) => PromiseBase | Thenable | ARD, +- failFilter?: null, +- progressFilter?: null): PromiseBase; +- +- // #endregion +- +- /** +- * Add handlers to be called when the Deferred object is rejected. +- * @param failFilter A function that is called when the Deferred is rejected. +- * @see \`{@link https://api.jquery.com/deferred.catch/ }\` +- * @since 3.0 +- * @example ​ ````Since the jQuery.get method returns a jqXHR object, which is derived from a Deferred object, we can rejection handlers using the .catch method. +-```javascript +-$.get( "test.php" ) +- .then( function() { +- alert( "$.get succeeded" ); +- } ) +- .catch( function() { +- alert( "$.get failed!" ); +- } ); +-``` +- */ +- catch( +- failFilter?: ((t: TJ, u: UJ, v: VJ, ...s: SJ[]) => PromiseBase | Thenable | ARF) | null): PromiseBase; +- } +- +- /** +- * This object provides a subset of the methods of the Deferred object (then, done, fail, always, pipe, progress, state and promise) to prevent users from changing the state of the Deferred. +- * @see \`{@link https://api.jquery.com/Types/#Promise }\` +- */ +- interface Promise3 extends PromiseBase { } +- +- /** +- * This object provides a subset of the methods of the Deferred object (then, done, fail, always, pipe, progress, state and promise) to prevent users from changing the state of the Deferred. +- * @see \`{@link https://api.jquery.com/Types/#Promise }\` +- */ +- interface Promise2 extends PromiseBase { } +- +- /** +- * This object provides a subset of the methods of the Deferred object (then, done, fail, always, pipe, progress, state and promise) to prevent users from changing the state of the Deferred. +- * @see \`{@link https://api.jquery.com/Types/#Promise }\` +- */ +- interface Promise extends PromiseBase { } +- +- interface DeferredStatic { +- // https://jquery.com/upgrade-guide/3.0/#callback-exit +- exceptionHook: any; +- /** +- * A factory function that returns a chainable utility object with methods to register multiple callbacks into callback queues, invoke callback queues, and relay the success or failure state of any synchronous or asynchronous function. +- * @param beforeStart A function that is called just before the constructor returns. +- * @see \`{@link https://api.jquery.com/jQuery.Deferred/ }\` +- * @since 1.5 +- */ +- (beforeStart?: (this: Deferred, deferred: Deferred) => void): Deferred; +- } +- +- interface Deferred { +- /** +- * Call the progressCallbacks on a Deferred object with the given args. +- * @param args Optional arguments that are passed to the progressCallbacks. +- * @see \`{@link https://api.jquery.com/deferred.notify/ }\` +- * @since 1.7 +- */ +- notify(...args: TN[]): this; +- /** +- * Call the progressCallbacks on a Deferred object with the given context and args. +- * @param context Context passed to the progressCallbacks as the this object. +- * @param args An optional array of arguments that are passed to the progressCallbacks. +- * @see \`{@link https://api.jquery.com/deferred.notifyWith/ }\` +- * @since 1.7 +- */ +- notifyWith(context: object, args?: ArrayLike): this; +- /** +- * Reject a Deferred object and call any failCallbacks with the given args. +- * @param args Optional arguments that are passed to the failCallbacks. +- * @see \`{@link https://api.jquery.com/deferred.reject/ }\` +- * @since 1.5 +- */ +- reject(...args: TJ[]): this; +- /** +- * Reject a Deferred object and call any failCallbacks with the given context and args. +- * @param context Context passed to the failCallbacks as the this object. +- * @param args An optional array of arguments that are passed to the failCallbacks. +- * @see \`{@link https://api.jquery.com/deferred.rejectWith/ }\` +- * @since 1.5 +- */ +- rejectWith(context: object, args?: ArrayLike): this; +- /** +- * Resolve a Deferred object and call any doneCallbacks with the given args. +- * @param args Optional arguments that are passed to the doneCallbacks. +- * @see \`{@link https://api.jquery.com/deferred.resolve/ }\` +- * @since 1.5 +- */ +- resolve(...args: TR[]): this; +- /** +- * Resolve a Deferred object and call any doneCallbacks with the given context and args. +- * @param context Context passed to the doneCallbacks as the this object. +- * @param args An optional array of arguments that are passed to the doneCallbacks. +- * @see \`{@link https://api.jquery.com/deferred.resolveWith/ }\` +- * @since 1.5 +- */ +- resolveWith(context: object, args?: ArrayLike): this; +- +- /** +- * Add handlers to be called when the Deferred object is either resolved or rejected. +- * @param alwaysCallback A function, or array of functions, that is called when the Deferred is resolved or rejected. +- * @param alwaysCallbacks Optional additional functions, or arrays of functions, that are called when the Deferred is resolved or rejected. +- * @see \`{@link https://api.jquery.com/deferred.always/ }\` +- * @since 1.6 +- * @example ​ ````Since the jQuery.get() method returns a jqXHR object, which is derived from a Deferred object, we can attach a callback for both success and error using the deferred.always() method. +-```javascript +-$.get( "test.php" ).always(function() { +- alert( "$.get completed with success or error callback arguments" ); +-}); +-``` +- */ +- always(alwaysCallback: TypeOrArray>, +- ...alwaysCallbacks: Array>>): this; +- /** +- * Add handlers to be called when the Deferred object is resolved. +- * @param doneCallback A function, or array of functions, that are called when the Deferred is resolved. +- * @param doneCallbacks Optional additional functions, or arrays of functions, that are called when the Deferred is resolved. +- * @see \`{@link https://api.jquery.com/deferred.done/ }\` +- * @since 1.5 +- * @example ​ ````Since the jQuery.get method returns a jqXHR object, which is derived from a Deferred object, we can attach a success callback using the .done() method. +-```javascript +-$.get( "test.php" ).done(function() { +- alert( "$.get succeeded" ); +-}); +-``` +- * @example ​ ````Resolve a Deferred object when the user clicks a button, triggering a number of callback functions: +-```html +- +- +- +- +- deferred.done demo +- +- +- +-​ +- +-

        Ready...

        +-​ +- +-​ +- +- +-``` +- */ +- done(doneCallback: TypeOrArray>, +- ...doneCallbacks: Array>>): this; +- /** +- * Add handlers to be called when the Deferred object is rejected. +- * @param failCallback A function, or array of functions, that are called when the Deferred is rejected. +- * @param failCallbacks Optional additional functions, or arrays of functions, that are called when the Deferred is rejected. +- * @see \`{@link https://api.jquery.com/deferred.fail/ }\` +- * @since 1.5 +- * @example ​ ````Since the jQuery.get method returns a jqXHR object, which is derived from a Deferred, you can attach a success and failure callback using the deferred.done() and deferred.fail() methods. +-```javascript +-$.get( "test.php" ) +- .done(function() { +- alert( "$.get succeeded" ); +- }) +- .fail(function() { +- alert( "$.get failed!" ); +- }); +-``` +- */ +- fail(failCallback: TypeOrArray>, +- ...failCallbacks: Array>>): this; +- /** +- * Add handlers to be called when the Deferred object generates progress notifications. +- * @param progressCallback A function, or array of functions, to be called when the Deferred generates progress notifications. +- * @param progressCallbacks Optional additional functions, or arrays of functions, to be called when the Deferred generates +- * progress notifications. +- * @see \`{@link https://api.jquery.com/deferred.progress/ }\` +- * @since 1.7 +- */ +- progress(progressCallback: TypeOrArray>, +- ...progressCallbacks: Array>>): this; +- /** +- * Return a Deferred's Promise object. +- * @param target Object onto which the promise methods have to be attached +- * @see \`{@link https://api.jquery.com/deferred.promise/ }\` +- * @since 1.5 +- * @example ​ ````Use the target argument to promote an existing object to a Promise: +-```javascript +-// Existing object +-var obj = { +- hello: function( name ) { +- alert( "Hello " + name ); +- } +- }, +- // Create a Deferred +- defer = $.Deferred(); +-​ +-// Set object as a promise +-defer.promise( obj ); +-​ +-// Resolve the deferred +-defer.resolve( "John" ); +-​ +-// Use the object as a Promise +-obj.done(function( name ) { +- obj.hello( name ); // Will alert "Hello John" +-}).hello( "Karl" ); // Will alert "Hello Karl" +-``` +- */ +- promise(target: TTarget): Promise & TTarget; +- /** +- * Return a Deferred's Promise object. +- * @see \`{@link https://api.jquery.com/deferred.promise/ }\` +- * @since 1.5 +- * @example ​ ````Create a Deferred and set two timer-based functions to either resolve or reject the Deferred after a random interval. Whichever one fires first "wins" and will call one of the callbacks. The second timeout has no effect since the Deferred is already complete (in a resolved or rejected state) from the first timeout action. Also set a timer-based progress notification function, and call a progress handler that adds "working..." to the document body. +-```javascript +-function asyncEvent() { +- var dfd = jQuery.Deferred(); +-​ +- // Resolve after a random interval +- setTimeout(function() { +- dfd.resolve( "hurray" ); +- }, Math.floor( 400 + Math.random() * 2000 ) ); +-​ +- // Reject after a random interval +- setTimeout(function() { +- dfd.reject( "sorry" ); +- }, Math.floor( 400 + Math.random() * 2000 ) ); +-​ +- // Show a "working..." message every half-second +- setTimeout(function working() { +- if ( dfd.state() === "pending" ) { +- dfd.notify( "working... " ); +- setTimeout( working, 500 ); +- } +- }, 1 ); +-​ +- // Return the Promise so caller can't change the Deferred +- return dfd.promise(); +-} +-​ +-// Attach a done, fail, and progress handler for the asyncEvent +-$.when( asyncEvent() ).then( +- function( status ) { +- alert( status + ", things are going well" ); +- }, +- function( status ) { +- alert( status + ", you fail this time" ); +- }, +- function( status ) { +- $( "body" ).append( status ); +- } +-); +-``` +- */ +- promise(): Promise; +- /** +- * Determine the current state of a Deferred object. +- * @see \`{@link https://api.jquery.com/deferred.state/ }\` +- * @since 1.7 +- */ +- state(): 'pending' | 'resolved' | 'rejected'; +- +- // region pipe +- // #region pipe +- +- /** +- * Utility method to filter and/or chain Deferreds. +- * @param doneFilter An optional function that is called when the Deferred is resolved. +- * @param failFilter An optional function that is called when the Deferred is rejected. +- * @param progressFilter An optional function that is called when progress notifications are sent to the Deferred. +- * @see \`{@link https://api.jquery.com/deferred.pipe/ }\` +- * @since 1.6 +- * @since 1.7 +- * @deprecated ​ Deprecated since 1.8. Use \`{@link then }\`. +- * +- * **Cause**: The `.pipe()` method on a `jQuery.Deferred` object was deprecated as of jQuery 1.8, when the `.then()` method was changed to perform the same function. +- * +- * **Solution**: In most cases it is sufficient to change all occurrences of `.pipe()` to `.then()`. Ensure that you aren't relying on context/state propagation (e.g., using `this`) or synchronous callback invocation, which were dropped from `.then()` for Promises/A+ interoperability as of jQuery 3.0. +- * @example ​ ````Filter resolve value: +-```javascript +-var defer = $.Deferred(), +- filtered = defer.pipe(function( value ) { +- return value * 2; +- }); +-​ +-defer.resolve( 5 ); +-filtered.done(function( value ) { +- alert( "Value is ( 2*5 = ) 10: " + value ); +-}); +-``` +- * @example ​ ````Filter reject value: +-```javascript +-var defer = $.Deferred(), +- filtered = defer.pipe( null, function( value ) { +- return value * 3; +- }); +-​ +-defer.reject( 6 ); +-filtered.fail(function( value ) { +- alert( "Value is ( 3*6 = ) 18: " + value ); +-}); +-``` +- * @example ​ ````Chain tasks: +-```javascript +-var request = $.ajax( url, { dataType: "json" } ), +- chained = request.pipe(function( data ) { +- return $.ajax( url2, { data: { user: data.userId } } ); +- }); +-​ +-chained.done(function( data ) { +- // data retrieved from url2 as provided by the first request +-}); +-``` +- */ +- pipe( +- doneFilter: (...t: TR[]) => PromiseBase | Thenable | ARD, +- failFilter: (...t: TJ[]) => PromiseBase | Thenable | AJF, +- progressFilter: (...t: TN[]) => PromiseBase | Thenable | ANP): PromiseBase; +- /** +- * Utility method to filter and/or chain Deferreds. +- * @param doneFilter An optional function that is called when the Deferred is resolved. +- * @param failFilter An optional function that is called when the Deferred is rejected. +- * @param progressFilter An optional function that is called when progress notifications are sent to the Deferred. +- * @see \`{@link https://api.jquery.com/deferred.pipe/ }\` +- * @since 1.6 +- * @since 1.7 +- * @deprecated ​ Deprecated since 1.8. Use \`{@link then }\`. +- * +- * **Cause**: The `.pipe()` method on a `jQuery.Deferred` object was deprecated as of jQuery 1.8, when the `.then()` method was changed to perform the same function. +- * +- * **Solution**: In most cases it is sufficient to change all occurrences of `.pipe()` to `.then()`. Ensure that you aren't relying on context/state propagation (e.g., using `this`) or synchronous callback invocation, which were dropped from `.then()` for Promises/A+ interoperability as of jQuery 3.0. +- * @example ​ ````Filter reject value: +-```javascript +-var defer = $.Deferred(), +- filtered = defer.pipe( null, function( value ) { +- return value * 3; +- }); +-​ +-defer.reject( 6 ); +-filtered.fail(function( value ) { +- alert( "Value is ( 3*6 = ) 18: " + value ); +-}); +-``` +- * @example ​ ````Chain tasks: +-```javascript +-var request = $.ajax( url, { dataType: "json" } ), +- chained = request.pipe(function( data ) { +- return $.ajax( url2, { data: { user: data.userId } } ); +- }); +-​ +-chained.done(function( data ) { +- // data retrieved from url2 as provided by the first request +-}); +-``` +- */ +- pipe( +- doneFilter: null, +- failFilter: (...t: TJ[]) => PromiseBase | Thenable | AJF, +- progressFilter: (...t: TN[]) => PromiseBase | Thenable | ANP): PromiseBase; +- /** +- * Utility method to filter and/or chain Deferreds. +- * @param doneFilter An optional function that is called when the Deferred is resolved. +- * @param failFilter An optional function that is called when the Deferred is rejected. +- * @param progressFilter An optional function that is called when progress notifications are sent to the Deferred. +- * @see \`{@link https://api.jquery.com/deferred.pipe/ }\` +- * @since 1.6 +- * @since 1.7 +- * @deprecated ​ Deprecated since 1.8. Use \`{@link then }\`. +- * +- * **Cause**: The `.pipe()` method on a `jQuery.Deferred` object was deprecated as of jQuery 1.8, when the `.then()` method was changed to perform the same function. +- * +- * **Solution**: In most cases it is sufficient to change all occurrences of `.pipe()` to `.then()`. Ensure that you aren't relying on context/state propagation (e.g., using `this`) or synchronous callback invocation, which were dropped from `.then()` for Promises/A+ interoperability as of jQuery 3.0. +- * @example ​ ````Filter resolve value: +-```javascript +-var defer = $.Deferred(), +- filtered = defer.pipe(function( value ) { +- return value * 2; +- }); +-​ +-defer.resolve( 5 ); +-filtered.done(function( value ) { +- alert( "Value is ( 2*5 = ) 10: " + value ); +-}); +-``` +- * @example ​ ````Chain tasks: +-```javascript +-var request = $.ajax( url, { dataType: "json" } ), +- chained = request.pipe(function( data ) { +- return $.ajax( url2, { data: { user: data.userId } } ); +- }); +-​ +-chained.done(function( data ) { +- // data retrieved from url2 as provided by the first request +-}); +-``` +- */ +- pipe( +- doneFilter: (...t: TR[]) => PromiseBase | Thenable | ARD, +- failFilter: null, +- progressFilter: (...t: TN[]) => PromiseBase | Thenable | ANP): PromiseBase; +- /** +- * Utility method to filter and/or chain Deferreds. +- * @param doneFilter An optional function that is called when the Deferred is resolved. +- * @param failFilter An optional function that is called when the Deferred is rejected. +- * @param progressFilter An optional function that is called when progress notifications are sent to the Deferred. +- * @see \`{@link https://api.jquery.com/deferred.pipe/ }\` +- * @since 1.6 +- * @since 1.7 +- * @deprecated ​ Deprecated since 1.8. Use \`{@link then }\`. +- * +- * **Cause**: The `.pipe()` method on a `jQuery.Deferred` object was deprecated as of jQuery 1.8, when the `.then()` method was changed to perform the same function. +- * +- * **Solution**: In most cases it is sufficient to change all occurrences of `.pipe()` to `.then()`. Ensure that you aren't relying on context/state propagation (e.g., using `this`) or synchronous callback invocation, which were dropped from `.then()` for Promises/A+ interoperability as of jQuery 3.0. +- * @example ​ ````Chain tasks: +-```javascript +-var request = $.ajax( url, { dataType: "json" } ), +- chained = request.pipe(function( data ) { +- return $.ajax( url2, { data: { user: data.userId } } ); +- }); +-​ +-chained.done(function( data ) { +- // data retrieved from url2 as provided by the first request +-}); +-``` +- */ +- pipe( +- doneFilter: null, +- failFilter: null, +- progressFilter?: (...t: TN[]) => PromiseBase | Thenable | ANP): PromiseBase; +- /** +- * Utility method to filter and/or chain Deferreds. +- * @param doneFilter An optional function that is called when the Deferred is resolved. +- * @param failFilter An optional function that is called when the Deferred is rejected. +- * @param progressFilter An optional function that is called when progress notifications are sent to the Deferred. +- * @see \`{@link https://api.jquery.com/deferred.pipe/ }\` +- * @since 1.6 +- * @since 1.7 +- * @deprecated ​ Deprecated since 1.8. Use \`{@link then }\`. +- * +- * **Cause**: The `.pipe()` method on a `jQuery.Deferred` object was deprecated as of jQuery 1.8, when the `.then()` method was changed to perform the same function. +- * +- * **Solution**: In most cases it is sufficient to change all occurrences of `.pipe()` to `.then()`. Ensure that you aren't relying on context/state propagation (e.g., using `this`) or synchronous callback invocation, which were dropped from `.then()` for Promises/A+ interoperability as of jQuery 3.0. +- * @example ​ ````Filter resolve value: +-```javascript +-var defer = $.Deferred(), +- filtered = defer.pipe(function( value ) { +- return value * 2; +- }); +-​ +-defer.resolve( 5 ); +-filtered.done(function( value ) { +- alert( "Value is ( 2*5 = ) 10: " + value ); +-}); +-``` +- * @example ​ ````Filter reject value: +-```javascript +-var defer = $.Deferred(), +- filtered = defer.pipe( null, function( value ) { +- return value * 3; +- }); +-​ +-defer.reject( 6 ); +-filtered.fail(function( value ) { +- alert( "Value is ( 3*6 = ) 18: " + value ); +-}); +-``` +- * @example ​ ````Chain tasks: +-```javascript +-var request = $.ajax( url, { dataType: "json" } ), +- chained = request.pipe(function( data ) { +- return $.ajax( url2, { data: { user: data.userId } } ); +- }); +-​ +-chained.done(function( data ) { +- // data retrieved from url2 as provided by the first request +-}); +-``` +- */ +- pipe( +- doneFilter: (...t: TR[]) => PromiseBase | Thenable | ARD, +- failFilter: (...t: TJ[]) => PromiseBase | Thenable | AJF, +- progressFilter?: null): PromiseBase; +- /** +- * Utility method to filter and/or chain Deferreds. +- * @param doneFilter An optional function that is called when the Deferred is resolved. +- * @param failFilter An optional function that is called when the Deferred is rejected. +- * @param progressFilter An optional function that is called when progress notifications are sent to the Deferred. +- * @see \`{@link https://api.jquery.com/deferred.pipe/ }\` +- * @since 1.6 +- * @since 1.7 +- * @deprecated ​ Deprecated since 1.8. Use \`{@link then }\`. +- * +- * **Cause**: The `.pipe()` method on a `jQuery.Deferred` object was deprecated as of jQuery 1.8, when the `.then()` method was changed to perform the same function. +- * +- * **Solution**: In most cases it is sufficient to change all occurrences of `.pipe()` to `.then()`. Ensure that you aren't relying on context/state propagation (e.g., using `this`) or synchronous callback invocation, which were dropped from `.then()` for Promises/A+ interoperability as of jQuery 3.0. +- * @example ​ ````Filter reject value: +-```javascript +-var defer = $.Deferred(), +- filtered = defer.pipe( null, function( value ) { +- return value * 3; +- }); +-​ +-defer.reject( 6 ); +-filtered.fail(function( value ) { +- alert( "Value is ( 3*6 = ) 18: " + value ); +-}); +-``` +- * @example ​ ````Chain tasks: +-```javascript +-var request = $.ajax( url, { dataType: "json" } ), +- chained = request.pipe(function( data ) { +- return $.ajax( url2, { data: { user: data.userId } } ); +- }); +-​ +-chained.done(function( data ) { +- // data retrieved from url2 as provided by the first request +-}); +-``` +- */ +- pipe( +- doneFilter: null, +- failFilter: (...t: TJ[]) => PromiseBase | Thenable | AJF, +- progressFilter?: null): PromiseBase; +- /** +- * Utility method to filter and/or chain Deferreds. +- * @param doneFilter An optional function that is called when the Deferred is resolved. +- * @param failFilter An optional function that is called when the Deferred is rejected. +- * @param progressFilter An optional function that is called when progress notifications are sent to the Deferred. +- * @see \`{@link https://api.jquery.com/deferred.pipe/ }\` +- * @since 1.6 +- * @since 1.7 +- * @deprecated ​ Deprecated since 1.8. Use \`{@link then }\`. +- * +- * **Cause**: The `.pipe()` method on a `jQuery.Deferred` object was deprecated as of jQuery 1.8, when the `.then()` method was changed to perform the same function. +- * +- * **Solution**: In most cases it is sufficient to change all occurrences of `.pipe()` to `.then()`. Ensure that you aren't relying on context/state propagation (e.g., using `this`) or synchronous callback invocation, which were dropped from `.then()` for Promises/A+ interoperability as of jQuery 3.0. +- * @example ​ ````Filter resolve value: +-```javascript +-var defer = $.Deferred(), +- filtered = defer.pipe(function( value ) { +- return value * 2; +- }); +-​ +-defer.resolve( 5 ); +-filtered.done(function( value ) { +- alert( "Value is ( 2*5 = ) 10: " + value ); +-}); +-``` +- * @example ​ ````Chain tasks: +-```javascript +-var request = $.ajax( url, { dataType: "json" } ), +- chained = request.pipe(function( data ) { +- return $.ajax( url2, { data: { user: data.userId } } ); +- }); +-​ +-chained.done(function( data ) { +- // data retrieved from url2 as provided by the first request +-}); +-``` +- */ +- pipe( +- doneFilter: (...t: TR[]) => PromiseBase | Thenable | ARD, +- failFilter?: null, +- progressFilter?: null): PromiseBase; +- +- // #endregion +- +- // region then +- // #region then +- +- /** +- * Add handlers to be called when the Deferred object is resolved, rejected, or still in progress. +- * @param doneFilter A function that is called when the Deferred is resolved. +- * @param failFilter An optional function that is called when the Deferred is rejected. +- * @param progressFilter An optional function that is called when progress notifications are sent to the Deferred. +- * @see \`{@link https://api.jquery.com/deferred.then/ }\` +- * @since 1.8 +- * @example ​ ````Since the jQuery.get method returns a jqXHR object, which is derived from a Deferred object, we can attach handlers using the .then method. +-```javascript +-$.get( "test.php" ).then( +- function() { +- alert( "$.get succeeded" ); +- }, function() { +- alert( "$.get failed!" ); +- } +-); +-``` +- * @example ​ ````Filter the resolve value: +-```html +- +- +- +- +- deferred.then demo +- +- +- +-​ +- +-

        +-​ +- +-​ +- +- +-``` +- * @example ​ ````Filter reject value: +-```javascript +-var defer = $.Deferred(), +- filtered = defer.then( null, function( value ) { +- return value * 3; +- }); +-​ +-defer.reject( 6 ); +-filtered.fail(function( value ) { +- alert( "Value is ( 3*6 = ) 18: " + value ); +-}); +-``` +- * @example ​ ````Chain tasks: +-```javascript +-var request = $.ajax( url, { dataType: "json" } ), +- chained = request.then(function( data ) { +- return $.ajax( url2, { data: { user: data.userId } } ); +- }); +-​ +-chained.done(function( data ) { +- // data retrieved from url2 as provided by the first request +-}); +-``` +- */ +- then( +- doneFilter: (...t: TR[]) => PromiseBase | Thenable | ARD, +- failFilter: (...t: TJ[]) => PromiseBase | Thenable | ARF, +- progressFilter: (...t: TN[]) => PromiseBase | Thenable | ANP): PromiseBase; +- /** +- * Add handlers to be called when the Deferred object is resolved, rejected, or still in progress. +- * @param doneFilter A function that is called when the Deferred is resolved. +- * @param failFilter An optional function that is called when the Deferred is rejected. +- * @param progressFilter An optional function that is called when progress notifications are sent to the Deferred. +- * @see \`{@link https://api.jquery.com/deferred.then/ }\` +- * @since 1.8 +- * @example ​ ````Filter reject value: +-```javascript +-var defer = $.Deferred(), +- filtered = defer.then( null, function( value ) { +- return value * 3; +- }); +-​ +-defer.reject( 6 ); +-filtered.fail(function( value ) { +- alert( "Value is ( 3*6 = ) 18: " + value ); +-}); +-``` +- * @example ​ ````Chain tasks: +-```javascript +-var request = $.ajax( url, { dataType: "json" } ), +- chained = request.then(function( data ) { +- return $.ajax( url2, { data: { user: data.userId } } ); +- }); +-​ +-chained.done(function( data ) { +- // data retrieved from url2 as provided by the first request +-}); +-``` +- */ +- then( +- doneFilter: null, +- failFilter: (...t: TJ[]) => PromiseBase | Thenable | ARF, +- progressFilter: (...t: TN[]) => PromiseBase | Thenable | ANP): PromiseBase; +- /** +- * Add handlers to be called when the Deferred object is resolved, rejected, or still in progress. +- * @param doneFilter A function that is called when the Deferred is resolved. +- * @param failFilter An optional function that is called when the Deferred is rejected. +- * @param progressFilter An optional function that is called when progress notifications are sent to the Deferred. +- * @see \`{@link https://api.jquery.com/deferred.then/ }\` +- * @since 1.8 +- * @example ​ ````Filter the resolve value: +-```html +- +- +- +- +- deferred.then demo +- +- +- +-​ +- +-

        +-​ +- +-​ +- +- +-``` +- * @example ​ ````Chain tasks: +-```javascript +-var request = $.ajax( url, { dataType: "json" } ), +- chained = request.then(function( data ) { +- return $.ajax( url2, { data: { user: data.userId } } ); +- }); +-​ +-chained.done(function( data ) { +- // data retrieved from url2 as provided by the first request +-}); +-``` +- */ +- then( +- doneFilter: (...t: TR[]) => PromiseBase | Thenable | ARD, +- failFilter: null, +- progressFilter: (...t: TN[]) => PromiseBase | Thenable | ANP): PromiseBase; +- /** +- * Add handlers to be called when the Deferred object is resolved, rejected, or still in progress. +- * @param doneFilter A function that is called when the Deferred is resolved. +- * @param failFilter An optional function that is called when the Deferred is rejected. +- * @param progressFilter An optional function that is called when progress notifications are sent to the Deferred. +- * @see \`{@link https://api.jquery.com/deferred.then/ }\` +- * @since 1.8 +- * @example ​ ````Chain tasks: +-```javascript +-var request = $.ajax( url, { dataType: "json" } ), +- chained = request.then(function( data ) { +- return $.ajax( url2, { data: { user: data.userId } } ); +- }); +-​ +-chained.done(function( data ) { +- // data retrieved from url2 as provided by the first request +-}); +-``` +- */ +- then( +- doneFilter: null, +- failFilter: null, +- progressFilter?: (...t: TN[]) => PromiseBase | Thenable | ANP): PromiseBase; +- /** +- * Add handlers to be called when the Deferred object is resolved, rejected, or still in progress. +- * @param doneFilter An optional function that is called when the Deferred is resolved. +- * @param failFilter An optional function that is called when the Deferred is rejected. +- * @param progressFilter An optional function that is called when progress notifications are sent to the Deferred. +- * @see \`{@link https://api.jquery.com/deferred.then/ }\` +- * @since 1.8 +- * @example ​ ````Since the jQuery.get method returns a jqXHR object, which is derived from a Deferred object, we can attach handlers using the .then method. +-```javascript +-$.get( "test.php" ).then( +- function() { +- alert( "$.get succeeded" ); +- }, function() { +- alert( "$.get failed!" ); +- } +-); +-``` +- * @example ​ ````Filter the resolve value: +-```html +- +- +- +- +- deferred.then demo +- +- +- +-​ +- +-

        +-​ +- +-​ +- +- +-``` +- * @example ​ ````Filter reject value: +-```javascript +-var defer = $.Deferred(), +- filtered = defer.then( null, function( value ) { +- return value * 3; +- }); +-​ +-defer.reject( 6 ); +-filtered.fail(function( value ) { +- alert( "Value is ( 3*6 = ) 18: " + value ); +-}); +-``` +- * @example ​ ````Chain tasks: +-```javascript +-var request = $.ajax( url, { dataType: "json" } ), +- chained = request.then(function( data ) { +- return $.ajax( url2, { data: { user: data.userId } } ); +- }); +-​ +-chained.done(function( data ) { +- // data retrieved from url2 as provided by the first request +-}); +-``` +- */ +- then( +- doneFilter: (...t: TR[]) => PromiseBase | Thenable | ARD, +- failFilter: (...t: TJ[]) => PromiseBase | Thenable | ARF, +- progressFilter?: null): PromiseBase; +- /** +- * Add handlers to be called when the Deferred object is resolved, rejected, or still in progress. +- * @param doneFilter An optional function that is called when the Deferred is resolved. +- * @param failFilter An optional function that is called when the Deferred is rejected. +- * @param progressFilter An optional function that is called when progress notifications are sent to the Deferred. +- * @see \`{@link https://api.jquery.com/deferred.then/ }\` +- * @since 1.8 +- * @example ​ ````Filter reject value: +-```javascript +-var defer = $.Deferred(), +- filtered = defer.then( null, function( value ) { +- return value * 3; +- }); +-​ +-defer.reject( 6 ); +-filtered.fail(function( value ) { +- alert( "Value is ( 3*6 = ) 18: " + value ); +-}); +-``` +- * @example ​ ````Chain tasks: +-```javascript +-var request = $.ajax( url, { dataType: "json" } ), +- chained = request.then(function( data ) { +- return $.ajax( url2, { data: { user: data.userId } } ); +- }); +-​ +-chained.done(function( data ) { +- // data retrieved from url2 as provided by the first request +-}); +-``` +- */ +- then( +- doneFilter: null, +- failFilter: (...t: TJ[]) => PromiseBase | Thenable | ARF, +- progressFilter?: null): PromiseBase; +- /** +- * Add handlers to be called when the Deferred object is resolved, rejected, or still in progress. +- * @param doneFilter An optional function that is called when the Deferred is resolved. +- * @param failFilter An optional function that is called when the Deferred is rejected. +- * @param progressFilter An optional function that is called when progress notifications are sent to the Deferred. +- * @see \`{@link https://api.jquery.com/deferred.then/ }\` +- * @since 1.8 +- * @example ​ ````Filter the resolve value: +-```html +- +- +- +- +- deferred.then demo +- +- +- +-​ +- +-

        +-​ +- +-​ +- +- +-``` +- * @example ​ ````Chain tasks: +-```javascript +-var request = $.ajax( url, { dataType: "json" } ), +- chained = request.then(function( data ) { +- return $.ajax( url2, { data: { user: data.userId } } ); +- }); +-​ +-chained.done(function( data ) { +- // data retrieved from url2 as provided by the first request +-}); +-``` +- */ +- then( +- doneFilter: (...t: TR[]) => PromiseBase | Thenable | ARD, +- failFilter?: null, +- progressFilter?: null): PromiseBase; +- +- // #endregion +- +- /** +- * Add handlers to be called when the Deferred object is rejected. +- * @param failFilter A function that is called when the Deferred is rejected. +- * @see \`{@link https://api.jquery.com/deferred.catch/ }\` +- * @since 3.0 +- * @example ​ ````Since the jQuery.get method returns a jqXHR object, which is derived from a Deferred object, we can rejection handlers using the .catch method. +-```javascript +-$.get( "test.php" ) +- .then( function() { +- alert( "$.get succeeded" ); +- } ) +- .catch( function() { +- alert( "$.get failed!" ); +- } ); +-``` +- */ +- catch( +- failFilter?: ((...t: TJ[]) => PromiseBase | Thenable | ARF) | null): PromiseBase; +- } +- +- namespace Deferred { +- type CallbackBase = (t: T, u: U, v: V, ...r: R[]) => void; +- +- interface Callback3 extends CallbackBase { } +- +- type Callback = (...args: T[]) => void; +- +- /** +- * @deprecated ​ Deprecated. Use \`{@link Callback }\`. +- */ +- interface DoneCallback extends Callback { } +- +- /** +- * @deprecated ​ Deprecated. Use \`{@link Callback }\`. +- */ +- interface FailCallback extends Callback { } +- +- /** +- * @deprecated ​ Deprecated. Use \`{@link Callback }\`. +- */ +- interface AlwaysCallback extends Callback { } +- +- /** +- * @deprecated ​ Deprecated. Use \`{@link Callback }\`. +- */ +- interface ProgressCallback extends Callback { } +- } +- +- // #endregion +- +- // region Effects +- // #region Effects +- +- type Duration = number | 'fast' | 'slow'; +- +- /** +- * @see \`{@link https://api.jquery.com/animate/#animate-properties-options }\` +- */ +- interface EffectsOptions extends PlainObject { +- /** +- * A function to be called when the animation on an element completes or stops without completing (its Promise object is either resolved or rejected). +- */ +- always?(this: TElement, animation: Animation, jumpedToEnd: boolean): void; +- /** +- * A function that is called once the animation on an element is complete. +- */ +- complete?(this: TElement): void; +- /** +- * A function to be called when the animation on an element completes (its Promise object is resolved). +- */ +- done?(this: TElement, animation: Animation, jumpedToEnd: boolean): void; +- /** +- * A string or number determining how long the animation will run. +- */ +- duration?: Duration; +- /** +- * A string indicating which easing function to use for the transition. +- */ +- easing?: string; +- /** +- * A function to be called when the animation on an element fails to complete (its Promise object is rejected). +- */ +- fail?(this: TElement, animation: Animation, jumpedToEnd: boolean): void; +- /** +- * A function to be called after each step of the animation, only once per animated element regardless of the number of animated properties. +- */ +- progress?(this: TElement, animation: Animation, progress: number, remainingMs: number): void; +- /** +- * A Boolean indicating whether to place the animation in the effects queue. If false, the animation will begin immediately. As of jQuery 1.7, the queue option can also accept a string, in which case the animation is added to the queue represented by that string. When a custom queue name is used the animation does not automatically start; you must call .dequeue("queuename") to start it. +- */ +- queue?: boolean | string; +- /** +- * An object containing one or more of the CSS properties defined by the properties argument and their corresponding easing functions. +- */ +- specialEasing?: PlainObject; +- /** +- * A function to call when the animation on an element begins. +- */ +- start?(this: TElement, animation: Animation): void; +- /** +- * A function to be called for each animated property of each animated element. This function provides an opportunity to modify the Tween object to change the value of the property before it is set. +- */ +- step?(this: TElement, now: number, tween: Tween): void; +- } +- +- // region Animation +- // #region Animation +- +- /** +- * @see \`{@link https://gist.github.com/gnarf/54829d408993526fe475#animation-factory }\` +- * @since 1.8 +- */ +- interface AnimationStatic { +- /** +- * @see \`{@link https://gist.github.com/gnarf/54829d408993526fe475#animation-factory }\` +- * @since 1.8 +- */ +- (element: TElement, props: PlainObject, opts: EffectsOptions): Animation; +- /** +- * During the initial setup, `jQuery.Animation` will call any callbacks that have been registered through `jQuery.Animation.prefilter( function( element, props, opts ) )`. +- * @param callback The prefilter will have `this` set to an animation object, and you can modify any of the `props` or +- * `opts` however you need. The prefilter _may_ return its own promise which also implements `stop()`, +- * in which case, processing of prefilters stops. If the prefilter is not trying to override the animation +- * entirely, it should return `undefined` or some other falsy value. +- * @see \`{@link https://gist.github.com/gnarf/54829d408993526fe475#prefilters }\` +- * @since 1.8 +- */ +- prefilter( +- callback: (this: Animation, element: TElement, props: PlainObject, opts: EffectsOptions) => Animation | _Falsy | void, +- prepend?: boolean +- ): void; +- /** +- * A "Tweener" is a function responsible for creating a tween object, and you might want to override these if you want to implement complex values ( like a clip/transform array matrix ) in a single property. +- * +- * You can override the default process for creating a tween in order to provide your own tween object by using `jQuery.Animation.tweener( props, callback( prop, value ) )`. +- * @param props A space separated list of properties to be passed to your tweener, or `"*"` if it should be called +- * for all properties. +- * @param callback The callback will be called with `this` being an `Animation` object. The tweener function will +- * generally start with `var tween = this.createTween( prop, value );`, but doesn't nessecarily need to +- * use the `jQuery.Tween()` factory. +- * @see \`{@link https://gist.github.com/gnarf/54829d408993526fe475#tweeners }\` +- * @since 1.8 +- */ +- tweener(props: string, callback: Tweener): void; +- } +- +- /** +- * The promise will be resolved when the animation reaches its end, and rejected when terminated early. The context of callbacks attached to the promise will be the element, and the arguments will be the `Animation` object and a boolean `jumpedToEnd` which when true means the animation was stopped with `gotoEnd`, when `undefined` the animation completed naturally. +- * @see \`{@link https://gist.github.com/gnarf/54829d408993526fe475#animation-factory }\` +- * @since 1.8 +- */ +- interface Animation extends Promise3< +- Animation, Animation, Animation, +- true | undefined, false, number, +- never, never, number +- > { +- /** +- * The duration specified in ms +- * @see \`{@link https://gist.github.com/gnarf/54829d408993526fe475#animation-factory }\` +- * @since 1.8 +- */ +- duration: number; +- /** +- * The element being animatied +- * @see \`{@link https://gist.github.com/gnarf/54829d408993526fe475#animation-factory }\` +- * @since 1.8 +- */ +- elem: TElement; +- /** +- * The final value of each property animating +- * @see \`{@link https://gist.github.com/gnarf/54829d408993526fe475#animation-factory }\` +- * @since 1.8 +- */ +- props: PlainObject; +- /** +- * The animation options +- * @see \`{@link https://gist.github.com/gnarf/54829d408993526fe475#animation-factory }\` +- * @since 1.8 +- */ +- opts: EffectsOptions; +- /** +- * The original properties before being filtered +- * @see \`{@link https://gist.github.com/gnarf/54829d408993526fe475#animation-factory }\` +- * @since 1.8 +- */ +- originalProps: PlainObject; +- /** +- * The original options before being filtered +- * @see \`{@link https://gist.github.com/gnarf/54829d408993526fe475#animation-factory }\` +- * @since 1.8 +- */ +- originalOpts: EffectsOptions; +- /** +- * The numeric value of `new Date()` when the animation began +- * @see \`{@link https://gist.github.com/gnarf/54829d408993526fe475#animation-factory }\` +- * @since 1.8 +- */ +- startTime: number; +- /** +- * The animations tweens. +- * @see \`{@link https://gist.github.com/gnarf/54829d408993526fe475#animation-factory }\` +- * @since 1.8 +- */ +- tweens: Array>; +- /** +- * @see \`{@link https://gist.github.com/gnarf/54829d408993526fe475#animation-factory }\` +- * @since 1.8 +- */ +- createTween(propName: string, finalValue: number): Tween; +- /** +- * Stops the animation early, optionally going to the end. +- * @see \`{@link https://gist.github.com/gnarf/54829d408993526fe475#animation-factory }\` +- * @since 1.8 +- */ +- stop(gotoEnd: boolean): this; +- } +- +- /** +- * A "Tweener" is a function responsible for creating a tween object, and you might want to override these if you want to implement complex values ( like a clip/transform array matrix ) in a single property. +- * @see \`{@link https://gist.github.com/gnarf/54829d408993526fe475#tweeners }\` +- * @since 1.8 +- */ +- type Tweener = (this: Animation, propName: string, finalValue: number) => Tween; +- +- /** +- * @see \`{@link https://gist.github.com/gnarf/54829d408993526fe475#tweens }\` +- * @since 1.8 +- */ +- interface TweenStatic { +- /** +- * `jQuery.Tween.propHooks[ prop ]` is a hook point that replaces `jQuery.fx.step[ prop ]` (which is being deprecated.) These hooks are used by the tween to get and set values on elements. +- * @see \`{@link https://gist.github.com/gnarf/54829d408993526fe475#tween-hooks }\` +- * @since 1.8 +- * @example +-```javascript +-jQuery.Tween.propHooks[ property ] = { +- get: function( tween ) { +- // get tween.prop from tween.elem and return it +- }, +- set: function( tween ) { +- // set tween.prop on tween.elem to tween.now + tween.unit +- } +-} +-``` +- */ +- propHooks: PropHooks; +- /** +- * @see \`{@link https://gist.github.com/gnarf/54829d408993526fe475#tweens }\` +- * @since 1.8 +- */ +- (elem: TElement, options: EffectsOptions, prop: string, end: number, easing?: string, unit?: string): Tween; +- } +- +- /** +- * @see \`{@link https://gist.github.com/gnarf/54829d408993526fe475#tweens }\` +- * @since 1.8 +- */ +- // This should be a class but doesn't work correctly under the JQuery namespace. Tween should be an inner class of jQuery. +- interface Tween { +- /** +- * The easing used +- * @see \`{@link https://gist.github.com/gnarf/54829d408993526fe475#tweens }\` +- * @since 1.8 +- */ +- easing: string; +- /** +- * The element being animated +- * @see \`{@link https://gist.github.com/gnarf/54829d408993526fe475#tweens }\` +- * @since 1.8 +- */ +- elem: TElement; +- /** +- * The ending value of the tween +- * @see \`{@link https://gist.github.com/gnarf/54829d408993526fe475#tweens }\` +- * @since 1.8 +- */ +- end: number; +- /** +- * The current value of the tween +- * @see \`{@link https://gist.github.com/gnarf/54829d408993526fe475#tweens }\` +- * @since 1.8 +- */ +- now: number; +- /** +- * A reference to the animation options +- * @see \`{@link https://gist.github.com/gnarf/54829d408993526fe475#tweens }\` +- * @since 1.8 +- */ +- options: EffectsOptions; +- // Undocumented. Is this intended to be public? +- pos?: number; +- /** +- * The property being animated +- * @see \`{@link https://gist.github.com/gnarf/54829d408993526fe475#tweens }\` +- * @since 1.8 +- */ +- prop: string; +- /** +- * The starting value of the tween +- * @see \`{@link https://gist.github.com/gnarf/54829d408993526fe475#tweens }\` +- * @since 1.8 +- */ +- start: number; +- /** +- * The CSS unit for the tween +- * @see \`{@link https://gist.github.com/gnarf/54829d408993526fe475#tweens }\` +- * @since 1.8 +- */ +- unit: string; +- /** +- * Reads the current value for property from the element +- * @see \`{@link https://gist.github.com/gnarf/54829d408993526fe475#tweens }\` +- * @since 1.8 +- */ +- cur(): any; +- /** +- * Updates the value for the property on the animated elemd. +- * @param progress A number from 0 to 1. +- * @see \`{@link https://gist.github.com/gnarf/54829d408993526fe475#tweens }\` +- * @since 1.8 +- */ +- run(progress: number): this; +- } +- +- /** +- * @see \`{@link https://gist.github.com/gnarf/54829d408993526fe475#tween-hooks }\` +- * @since 1.8 +- */ +- // Workaround for TypeScript 2.3 which does not have support for weak types handling. +- type PropHook = { +- /** +- * @see \`{@link https://gist.github.com/gnarf/54829d408993526fe475#tween-hooks }\` +- * @since 1.8 +- */ +- get(tween: Tween): any; +- } | { +- /** +- * @see \`{@link https://gist.github.com/gnarf/54829d408993526fe475#tween-hooks }\` +- * @since 1.8 +- */ +- set(tween: Tween): void; +- } | { +- [key: string]: never; +- }; +- +- /** +- * @see \`{@link https://gist.github.com/gnarf/54829d408993526fe475#tween-hooks }\` +- * @since 1.8 +- */ +- interface PropHooks { +- [property: string]: PropHook; +- } +- +- // #endregion +- +- // region Easing +- // #region Easing +- +- type EasingMethod = (percent: number) => number; +- +- interface Easings { +- [name: string]: EasingMethod; +- } +- +- // #endregion +- +- // region Effects (fx) +- // #region Effects (fx) +- +- interface Effects { +- /** +- * The rate (in milliseconds) at which animations fire. +- * @see \`{@link https://api.jquery.com/jQuery.fx.interval/ }\` +- * @since 1.4.3 +- * @deprecated ​ Deprecated since 3.0. See \`{@link https://api.jquery.com/jQuery.fx.interval/ }\`. +- * +- * **Cause**: As of jQuery 3.0 the `jQuery.fx.interval` property can be used to change the animation interval only on browsers that do not support the `window.requestAnimationFrame()` method. That is currently only Internet Explorer 9 and the Android Browser. Once support is dropped for these browsers, the property will serve no purpose and it will be removed. +- * +- * **Solution**: Find and remove code that changes or uses `jQuery.fx.interval`. If the value is being used by code in your page or a plugin, the code may be making assumptions that are no longer valid. The default value of `jQuery.fx.interval` is `13` (milliseconds), which could be used instead of accessing this property. +- * @example ​ ````Cause all animations to run with less frames. +-```html +- +- +- +- +- jQuery.fx.interval demo +- +- +- +- +-​ +-

        +-
        +-​ +- +- +- +-``` +- */ +- interval: number; +- /** +- * Globally disable all animations. +- * @see \`{@link https://api.jquery.com/jQuery.fx.off/ }\` +- * @since 1.3 +- * @example ​ ````Toggle animation on and off +-```html +- +- +- +- +- jQuery.fx.off demo +- +- +- +- +-​ +- +- +-
        +-​ +- +- +- +-``` +- */ +- off: boolean; +- /** +- * @deprecated ​ Deprecated since 1.8. Use \`{@link Tween.propHooks jQuery.Tween.propHooks}\`. +- * +- * `jQuery.fx.step` functions are being replaced by `jQuery.Tween.propHooks` and may eventually be removed, but are still supported via the default tween propHook. +- */ +- step: PlainObject>; +- /** +- * _overridable_ Clears up the `setInterval` +- * @see \`{@link https://gist.github.com/gnarf/54829d408993526fe475#plugging-in-a-different-timer-loop }\` +- * @since 1.8 +- */ +- stop(): void; +- /** +- * Calls `.run()` on each object in the `jQuery.timers` array, removing it from the array if `.run()` returns a falsy value. Calls `jQuery.fx.stop()` whenever there are no timers remaining. +- * @see \`{@link https://gist.github.com/gnarf/54829d408993526fe475#plugging-in-a-different-timer-loop }\` +- * @since 1.8 +- */ +- tick(): void; +- /** +- * _overridable_ Creates a `setInterval` if one doesn't already exist, and pushes `tickFunction` to the `jQuery.timers` array. `tickFunction` should also have `anim`, `elem`, and `queue` properties that reference the animation object, animated element, and queue option to facilitate `jQuery.fn.stop()` +- * +- * By overriding `fx.timer` and `fx.stop` you should be able to implement any animation tick behaviour you desire. (like using `requestAnimationFrame` instead of `setTimeout`.) +- * +- * There is an example of overriding the timer loop in \`{@link https://github.com/gnarf37/jquery-requestAnimationFrame jquery.requestAnimationFrame}\` +- * @see \`{@link https://gist.github.com/gnarf/54829d408993526fe475#plugging-in-a-different-timer-loop }\` +- * @since 1.8 +- */ +- timer(tickFunction: TickFunction): void; +- } +- +- /** +- * @deprecated ​ Deprecated since 1.8. Use \`{@link Tween.propHooks jQuery.Tween.propHooks}\`. +- * +- * `jQuery.fx.step` functions are being replaced by `jQuery.Tween.propHooks` and may eventually be removed, but are still supported via the default tween propHook. +- */ +- type AnimationHook = (fx: Tween) => void; +- +- interface TickFunction { +- anim: Animation; +- elem: TElement; +- queue: boolean | string; +- (): any; +- } +- +- // #endregion +- +- // region Queue +- // #region Queue +- +- // TODO: Is the first element always a string or is that specific to the 'fx' queue? +- type Queue = { 0: string; } & Array>; +- +- type QueueFunction = (this: TElement, next: () => void) => void; +- +- // #endregion +- +- // region Speed +- // #region Speed +- +- // Workaround for TypeScript 2.3 which does not have support for weak types handling. +- type SpeedSettings = { +- /** +- * A string or number determining how long the animation will run. +- */ +- duration: Duration; +- } | { +- /** +- * A string indicating which easing function to use for the transition. +- */ +- easing: string; +- } | { +- /** +- * A function to call once the animation is complete. +- */ +- complete(this: TElement): void; +- } | { +- [key: string]: never; +- }; +- +- // #endregion +- +- // #endregion +- +- // region Events +- // #region Events +- +- // region Event +- // #region Event +- +- // This should be a class but doesn't work correctly under the JQuery namespace. Event should be an inner class of jQuery. +- +- /** +- * jQuery's event system normalizes the event object according to W3C standards. The event object is guaranteed to be passed to the event handler (no checks for window.event required). It normalizes the target, relatedTarget, which, metaKey and pageX/Y properties and provides both stopPropagation() and preventDefault() methods. +- * +- * Those properties are all documented, and accompanied by examples, on the \`{@link http://api.jquery.com/category/events/event-object/ Event object}\` page. +- * +- * The standard events in the Document Object Model are: `blur`, `focus`, `load`, `resize`, `scroll`, `unload`, `beforeunload`, `click`, `dblclick`, `mousedown`, `mouseup`, `mousemove`, `mouseover`, `mouseout`, `mouseenter`, `mouseleave`, `change`, `select`, `submit`, `keydown`, `keypress`, and `keyup`. Since the DOM event names have predefined meanings for some elements, using them for other purposes is not recommended. jQuery's event model can trigger an event by any name on an element, and it is propagated up the DOM tree to which that element belongs, if any. +- * @see \`{@link https://api.jquery.com/category/events/event-object/ }\` +- */ +- interface EventStatic { +- /** +- * The jQuery.Event constructor is exposed and can be used when calling trigger. The new operator is optional. +- * +- * Check \`{@link https://api.jquery.com/trigger/ trigger}\`'s documentation to see how to combine it with your own event object. +- * @see \`{@link https://api.jquery.com/category/events/event-object/ }\` +- * @since 1.6 +- * @example +-```javascript +-//Create a new jQuery.Event object without the "new" operator. +-var e = jQuery.Event( "click" ); +-​ +-// trigger an artificial click event +-jQuery( "body" ).trigger( e ); +-``` +- * @example +-```javascript +-// Create a new jQuery.Event object with specified event properties. +-var e = jQuery.Event( "keydown", { keyCode: 64 } ); +-​ +-// trigger an artificial keydown event with keyCode 64 +-jQuery( "body" ).trigger( e ); +-``` +- */ +- (event: string, properties?: T): Event & T; +- /** +- * The jQuery.Event constructor is exposed and can be used when calling trigger. The new operator is optional. +- * +- * Check \`{@link https://api.jquery.com/trigger/ trigger}\`'s documentation to see how to combine it with your own event object. +- * @see \`{@link https://api.jquery.com/category/events/event-object/ }\` +- * @since 1.6 +- * @example +-```javascript +-//Create a new jQuery.Event object without the "new" operator. +-var e = jQuery.Event( "click" ); +-​ +-// trigger an artificial click event +-jQuery( "body" ).trigger( e ); +-``` +- * @example +-```javascript +-// Create a new jQuery.Event object with specified event properties. +-var e = jQuery.Event( "keydown", { keyCode: 64 } ); +-​ +-// trigger an artificial keydown event with keyCode 64 +-jQuery( "body" ).trigger( e ); +-``` +- */ +- new (event: string, properties?: T): Event & T; +- } +- +- /** +- * jQuery's event system normalizes the event object according to W3C standards. The event object is guaranteed to be passed to the event handler (no checks for window.event required). It normalizes the target, relatedTarget, which, metaKey and pageX/Y properties and provides both stopPropagation() and preventDefault() methods. +- * +- * Those properties are all documented, and accompanied by examples, on the \`{@link http://api.jquery.com/category/events/event-object/ Event object}\` page. +- * +- * The standard events in the Document Object Model are: `blur`, `focus`, `load`, `resize`, `scroll`, `unload`, `beforeunload`, `click`, `dblclick`, `mousedown`, `mouseup`, `mousemove`, `mouseover`, `mouseout`, `mouseenter`, `mouseleave`, `change`, `select`, `submit`, `keydown`, `keypress`, and `keyup`. Since the DOM event names have predefined meanings for some elements, using them for other purposes is not recommended. jQuery's event model can trigger an event by any name on an element, and it is propagated up the DOM tree to which that element belongs, if any. +- * @see \`{@link https://api.jquery.com/category/events/event-object/ }\` +- * @see \`{@link TriggeredEvent }\` +- */ +- interface Event { +- // region Copied properties +- // #region Copied properties +- +- // Event +- +- bubbles: boolean | undefined; +- cancelable: boolean | undefined; +- eventPhase: number | undefined; +- +- // UIEvent +- +- detail: number | undefined; +- view: Window | undefined; +- +- // MouseEvent +- +- button: number | undefined; +- buttons: number | undefined; +- clientX: number | undefined; +- clientY: number | undefined; +- offsetX: number | undefined; +- offsetY: number | undefined; +- /** +- * The mouse position relative to the left edge of the document. +- * @see \`{@link https://api.jquery.com/event.pageX/ }\` +- * @since 1.0.4 +- * @example ​ ````Show the mouse position relative to the left and top edges of the document (within this iframe). +-```html +- +- +- +- +- event.pageX demo +- +- +- +- +-​ +-
        +-​ +- +-​ +- +- +-``` +- */ +- pageX: number | undefined; +- /** +- * The mouse position relative to the top edge of the document. +- * @see \`{@link https://api.jquery.com/event.pageY/ }\` +- * @since 1.0.4 +- * @example ​ ````Show the mouse position relative to the left and top edges of the document (within this iframe). +-```html +- +- +- +- +- event.pageY demo +- +- +- +- +-​ +-
        +-​ +- +-​ +- +- +-``` +- */ +- pageY: number | undefined; +- screenX: number | undefined; +- screenY: number | undefined; +- /** @deprecated */ +- toElement: Element | undefined; +- +- // PointerEvent +- +- pointerId: number | undefined; +- pointerType: string | undefined; +- +- // KeyboardEvent +- +- /** @deprecated */ +- char: string | undefined; +- /** @deprecated */ +- charCode: number | undefined; +- key: string | undefined; +- /** @deprecated */ +- keyCode: number | undefined; +- +- // TouchEvent +- +- changedTouches: TouchList | undefined; +- targetTouches: TouchList | undefined; +- touches: TouchList | undefined; +- +- // MouseEvent, KeyboardEvent +- +- /** +- * For key or mouse events, this property indicates the specific key or button that was pressed. +- * @see \`{@link https://api.jquery.com/event.which/ }\` +- * @since 1.1.3 +- * @deprecated ​ Deprecated since 3.3. See \`{@link https://github.com/jquery/api.jquery.com/issues/821 }\`. +- * @example ​ ````Log which key was depressed. +-```html +- +- +- +- +- event.which demo +- +- +- +-​ +- +-
        +-​ +- +-​ +- +- +-``` +- * @example ​ ````Log which mouse button was depressed. +-```html +- +- +- +- +- event.which demo +- +- +- +-​ +- +-
        +-​ +- +-​ +- +- +-``` +- */ +- which: number | undefined; +- +- // MouseEvent, KeyboardEvent, TouchEvent +- +- altKey: boolean | undefined; +- ctrlKey: boolean | undefined; +- /** +- * Indicates whether the META key was pressed when the event fired. +- * @see \`{@link https://api.jquery.com/event.metaKey/ }\` +- * @since 1.0.4 +- * @example ​ ````Determine whether the META key was pressed when the event fired. +-```html +- +- +- +- +- event.metaKey demo +- +- +- +- +-​ +- +-
        +-​ +- +-​ +- +- +-``` +- */ +- metaKey: boolean | undefined; +- shiftKey: boolean | undefined; +- +- // #endregion +- +- /** +- * The difference in milliseconds between the time the browser created the event and January 1, 1970. +- * @see \`{@link https://api.jquery.com/event.timeStamp/ }\` +- * @since 1.2.6 +- * @example ​ ````Display the time since the click handler last executed. +-```html +- +- +- +- +- event.timeStamp demo +- +- +- +- +-​ +-
        Click.
        +-​ +- +-​ +- +- +-``` +- */ +- timeStamp: number; +- /** +- * Describes the nature of the event. +- * @see \`{@link https://api.jquery.com/event.type/ }\` +- * @since 1.0 +- * @example ​ ````On all anchor clicks, alert the event type. +-```javascript +-$( "a" ).click(function( event ) { +- alert( event.type ); // "click" +-}); +-``` +- */ +- type: string; +- /** +- * Returns whether event.preventDefault() was ever called on this event object. +- * @see \`{@link https://api.jquery.com/event.isDefaultPrevented/ }\` +- * @since 1.3 +- * @example ​ ````Checks whether event.preventDefault() was called. +-```javascript +-$( "a" ).click(function( event ) { +- alert( event.isDefaultPrevented() ); // false +- event.preventDefault(); +- alert( event.isDefaultPrevented() ); // true +-}); +-``` +- */ +- isDefaultPrevented(): boolean; +- /** +- * Returns whether event.stopImmediatePropagation() was ever called on this event object. +- * @see \`{@link https://api.jquery.com/event.isImmediatePropagationStopped/ }\` +- * @since 1.3 +- * @example ​ ````Checks whether event.stopImmediatePropagation() was called. +-```html +- +- +- +- +- event.isImmediatePropagationStopped demo +- +- +- +-​ +- +-
        +- ​ +- +-​ +- +- +-``` +- */ +- isImmediatePropagationStopped(): boolean; +- /** +- * Returns whether event.stopPropagation() was ever called on this event object. +- * @see \`{@link https://api.jquery.com/event.isPropagationStopped/ }\` +- * @since 1.3 +- * @example ​ ````Checks whether event.stopPropagation() was called +-```html +- +- +- +- +- event.isPropagationStopped demo +- +- +- +-​ +- +-
        +- ​ +- +-​ +- +- +-``` +- */ +- isPropagationStopped(): boolean; +- /** +- * If this method is called, the default action of the event will not be triggered. +- * @see \`{@link https://api.jquery.com/event.preventDefault/ }\` +- * @since 1.0 +- * @example ​ ````Cancel the default action (navigation) of the click. +-```html +- +- +- +- +- event.preventDefault demo +- +- +- +-​ +-default click action is prevented +-
        +-​ +- +-​ +- +- +-``` +- */ +- preventDefault(): void; +- /** +- * Keeps the rest of the handlers from being executed and prevents the event from bubbling up the DOM tree. +- * @see \`{@link https://api.jquery.com/event.stopImmediatePropagation/ }\` +- * @since 1.3 +- * @example ​ ````Prevents other event handlers from being called. +-```html +- +- +- +- +- event.stopImmediatePropagation demo +- +- +- +- +-​ +-

        paragraph

        +-
        division
        +-​ +- +-​ +- +- +-``` +- */ +- stopImmediatePropagation(): void; +- /** +- * Prevents the event from bubbling up the DOM tree, preventing any parent handlers from being notified of the event. +- * @see \`{@link https://api.jquery.com/event.stopPropagation/ }\` +- * @since 1.0 +- * @example ​ ````Kill the bubbling on the click event. +-```javascript +-$( "p" ).click(function( event ) { +- event.stopPropagation(); +- // Do something +-}); +-``` +- */ +- stopPropagation(): void; +- } +- +- // #endregion +- +- /** +- * Base type for jQuery events that have been triggered (including events triggered on plain objects). +- */ +- interface TriggeredEvent< +- TDelegateTarget = any, +- TData = any, +- TCurrentTarget = any, +- TTarget = any +- > extends Event { +- /** +- * The current DOM element within the event bubbling phase. +- * @see \`{@link https://api.jquery.com/event.currentTarget/ }\` +- * @since 1.3 +- * @example ​ ````Alert that currentTarget matches the `this` keyword. +-```javascript +-$( "p" ).click(function( event ) { +- alert( event.currentTarget === this ); // true +-}); +-``` +- */ +- currentTarget: TCurrentTarget; +- /** +- * The element where the currently-called jQuery event handler was attached. +- * @see \`{@link https://api.jquery.com/event.delegateTarget/ }\` +- * @since 1.7 +- * @example ​ ````When a button in any box class is clicked, change the box's background color to red. +-```javascript +-$( ".box" ).on( "click", "button", function( event ) { +- $( event.delegateTarget ).css( "background-color", "red" ); +-}); +-``` +- */ +- delegateTarget: TDelegateTarget; +- /** +- * The DOM element that initiated the event. +- * @see \`{@link https://api.jquery.com/event.target/ }\` +- * @since 1.0 +- * @example ​ ````Display the tag's name on click +-```html +- +- +- +- +- event.target demo +- +- +- +- +-​ +-
        +-
        +-

        +- click +-

        +-
        +-​ +- +-​ +- +- +-``` +- * @example ​ ````Implements a simple event delegation: The click handler is added to an unordered list, and the children of its li children are hidden. Clicking one of the li children toggles (see toggle()) their children. +-```html +- +- +- +- +- event.target demo +- +- +- +-​ +-
          +-
        • item 1 +-
            +-
          • sub item 1-a
          • +-
          • sub item 1-b
          • +-
          +-
        • +-
        • item 2 +-
            +-
          • sub item 2-a
          • +-
          • sub item 2-b
          • +-
          +-
        • +-
        +-​ +- +-​ +- +- +-``` +- */ +- target: TTarget; +- +- /** +- * An optional object of data passed to an event method when the current executing handler is bound. +- * @see \`{@link https://api.jquery.com/event.data/ }\` +- * @since 1.1 +- * @example ​ ````Within a for loop, pass the value of i to the .on() method so that the current iteration's value is preserved. +-```html +- +- +- +- +- event.data demo +- +- +- +-​ +- +- +- +- +- +-​ +-
        +-​ +- +-​ +- +- +-``` +- */ +- data: TData; +- +- /** +- * The namespace specified when the event was triggered. +- * @see \`{@link https://api.jquery.com/event.namespace/ }\` +- * @since 1.4.3 +- * @example ​ ````Determine the event namespace used. +-```html +- +- +- +- +- event.namespace demo +- +- +- +-​ +- +-

        +-​ +- +-​ +- +- +-``` +- */ +- namespace?: string; +- originalEvent?: _Event; +- /** +- * The last value returned by an event handler that was triggered by this event, unless the value was undefined. +- * @see \`{@link https://api.jquery.com/event.result/ }\` +- * @since 1.3 +- * @example ​ ````Display previous handler's return value +-```html +- +- +- +- +- event.result demo +- +- +- +-​ +- +-

        +-​ +- +-​ +- +- +-``` +- */ +- result?: any; +- } +- +- // region Event +- // #region Event +- +- interface EventBase< +- TDelegateTarget = any, +- TData = any, +- TCurrentTarget = any, +- TTarget = any +- > extends TriggeredEvent { +- /** +- * The other DOM element involved in the event, if any. +- * @see \`{@link https://api.jquery.com/event.relatedTarget/ }\` +- * @since 1.1.4 +- * @example ​ ````On mouseout of anchors, alert the element type being entered. +-```javascript +-$( "a" ).mouseout(function( event ) { +- alert( event.relatedTarget.nodeName ); // "DIV" +-}); +-``` +- */ +- relatedTarget?: undefined; +- +- // Event +- +- bubbles: boolean; +- cancelable: boolean; +- eventPhase: number; +- +- // UIEvent +- +- detail: undefined; +- view: undefined; +- +- // MouseEvent +- +- button: undefined; +- buttons: undefined; +- clientX: undefined; +- clientY: undefined; +- offsetX: undefined; +- offsetY: undefined; +- /** +- * The mouse position relative to the left edge of the document. +- * @see \`{@link https://api.jquery.com/event.pageX/ }\` +- * @since 1.0.4 +- * @example ​ ````Show the mouse position relative to the left and top edges of the document (within this iframe). +-```html +- +- +- +- +- event.pageX demo +- +- +- +- +-​ +-
        +-​ +- +-​ +- +- +-``` +- */ +- pageX: undefined; +- /** +- * The mouse position relative to the top edge of the document. +- * @see \`{@link https://api.jquery.com/event.pageY/ }\` +- * @since 1.0.4 +- * @example ​ ````Show the mouse position relative to the left and top edges of the document (within this iframe). +-```html +- +- +- +- +- event.pageY demo +- +- +- +- +-​ +-
        +-​ +- +-​ +- +- +-``` +- */ +- pageY: undefined; +- screenX: undefined; +- screenY: undefined; +- /** @deprecated */ +- toElement: undefined; +- +- // PointerEvent +- +- pointerId: undefined; +- pointerType: undefined; +- +- // KeyboardEvent +- +- /** @deprecated */ +- char: undefined; +- /** @deprecated */ +- charCode: undefined; +- key: undefined; +- /** @deprecated */ +- keyCode: undefined; +- +- // TouchEvent +- +- changedTouches: undefined; +- targetTouches: undefined; +- touches: undefined; +- +- // MouseEvent, KeyboardEvent +- +- /** +- * For key or mouse events, this property indicates the specific key or button that was pressed. +- * @see \`{@link https://api.jquery.com/event.which/ }\` +- * @since 1.1.3 +- * @deprecated ​ Deprecated since 3.3. See \`{@link https://github.com/jquery/api.jquery.com/issues/821 }\`. +- * @example ​ ````Log which key was depressed. +-```html +- +- +- +- +- event.which demo +- +- +- +-​ +- +-
        +-​ +- +-​ +- +- +-``` +- * @example ​ ````Log which mouse button was depressed. +-```html +- +- +- +- +- event.which demo +- +- +- +-​ +- +-
        +-​ +- +-​ +- +- +-``` +- */ +- which: undefined; +- +- // MouseEvent, KeyboardEvent, TouchEvent +- +- altKey: undefined; +- ctrlKey: undefined; +- /** +- * Indicates whether the META key was pressed when the event fired. +- * @see \`{@link https://api.jquery.com/event.metaKey/ }\` +- * @since 1.0.4 +- * @example ​ ````Determine whether the META key was pressed when the event fired. +-```html +- +- +- +- +- event.metaKey demo +- +- +- +- +-​ +- +-
        +-​ +- +-​ +- +- +-``` +- */ +- metaKey: undefined; +- shiftKey: undefined; +- +- originalEvent?: _Event; +- } +- +- interface ChangeEvent< +- TDelegateTarget = any, +- TData = any, +- TCurrentTarget = any, +- TTarget = any +- > extends EventBase { +- type: 'change'; +- } +- +- interface ResizeEvent< +- TDelegateTarget = any, +- TData = any, +- TCurrentTarget = any, +- TTarget = any +- > extends EventBase { +- type: 'resize'; +- } +- +- interface ScrollEvent< +- TDelegateTarget = any, +- TData = any, +- TCurrentTarget = any, +- TTarget = any +- > extends EventBase { +- type: 'scroll'; +- } +- +- interface SelectEvent< +- TDelegateTarget = any, +- TData = any, +- TCurrentTarget = any, +- TTarget = any +- > extends EventBase { +- type: 'select'; +- } +- +- interface SubmitEvent< +- TDelegateTarget = any, +- TData = any, +- TCurrentTarget = any, +- TTarget = any +- > extends EventBase { +- type: 'submit'; +- } +- +- // #endregion +- +- // region UIEvent +- // #region UIEvent +- +- interface UIEventBase< +- TDelegateTarget = any, +- TData = any, +- TCurrentTarget = any, +- TTarget = any +- > extends TriggeredEvent { +- // Event +- +- bubbles: boolean; +- cancelable: boolean; +- eventPhase: number; +- +- // UIEvent +- +- detail: number; +- view: Window; +- +- originalEvent?: _UIEvent; +- } +- +- // region MouseEvent +- // #region MouseEvent +- +- interface MouseEventBase< +- TDelegateTarget = any, +- TData = any, +- TCurrentTarget = any, +- TTarget = any +- > extends UIEventBase { +- /** +- * The other DOM element involved in the event, if any. +- * @see \`{@link https://api.jquery.com/event.relatedTarget/ }\` +- * @since 1.1.4 +- * @example ​ ````On mouseout of anchors, alert the element type being entered. +-```javascript +-$( "a" ).mouseout(function( event ) { +- alert( event.relatedTarget.nodeName ); // "DIV" +-}); +-``` +- */ +- relatedTarget?: EventTarget | null; +- +- // MouseEvent +- +- button: number; +- buttons: number; +- clientX: number; +- clientY: number; +- offsetX: number; +- offsetY: number; +- /** +- * The mouse position relative to the left edge of the document. +- * @see \`{@link https://api.jquery.com/event.pageX/ }\` +- * @since 1.0.4 +- * @example ​ ````Show the mouse position relative to the left and top edges of the document (within this iframe). +-```html +- +- +- +- +- event.pageX demo +- +- +- +- +-​ +-
        +-​ +- +-​ +- +- +-``` +- */ +- pageX: number; +- /** +- * The mouse position relative to the top edge of the document. +- * @see \`{@link https://api.jquery.com/event.pageY/ }\` +- * @since 1.0.4 +- * @example ​ ````Show the mouse position relative to the left and top edges of the document (within this iframe). +-```html +- +- +- +- +- event.pageY demo +- +- +- +- +-​ +-
        +-​ +- +-​ +- +- +-``` +- */ +- pageY: number; +- screenX: number; +- screenY: number; +- /** @deprecated */ +- toElement: Element; +- +- // PointerEvent +- +- pointerId: undefined; +- pointerType: undefined; +- +- // KeyboardEvent +- +- /** @deprecated */ +- char: undefined; +- /** @deprecated */ +- charCode: undefined; +- key: undefined; +- /** @deprecated */ +- keyCode: undefined; +- +- // TouchEvent +- +- changedTouches: undefined; +- targetTouches: undefined; +- touches: undefined; +- +- // MouseEvent, KeyboardEvent +- +- /** +- * For key or mouse events, this property indicates the specific key or button that was pressed. +- * @see \`{@link https://api.jquery.com/event.which/ }\` +- * @since 1.1.3 +- * @deprecated ​ Deprecated since 3.3. See \`{@link https://github.com/jquery/api.jquery.com/issues/821 }\`. +- * @example ​ ````Log which key was depressed. +-```html +- +- +- +- +- event.which demo +- +- +- +-​ +- +-
        +-​ +- +-​ +- +- +-``` +- * @example ​ ````Log which mouse button was depressed. +-```html +- +- +- +- +- event.which demo +- +- +- +-​ +- +-
        +-​ +- +-​ +- +- +-``` +- */ +- which: number; +- +- // MouseEvent, KeyboardEvent, TouchEvent +- +- altKey: boolean; +- ctrlKey: boolean; +- /** +- * Indicates whether the META key was pressed when the event fired. +- * @see \`{@link https://api.jquery.com/event.metaKey/ }\` +- * @since 1.0.4 +- * @example ​ ````Determine whether the META key was pressed when the event fired. +-```html +- +- +- +- +- event.metaKey demo +- +- +- +- +-​ +- +-
        +-​ +- +-​ +- +- +-``` +- */ +- metaKey: boolean; +- shiftKey: boolean; +- +- originalEvent?: _MouseEvent; +- } +- +- interface ClickEvent< +- TDelegateTarget = any, +- TData = any, +- TCurrentTarget = any, +- TTarget = any +- > extends MouseEventBase { +- /** +- * The other DOM element involved in the event, if any. +- * @see \`{@link https://api.jquery.com/event.relatedTarget/ }\` +- * @since 1.1.4 +- * @example ​ ````On mouseout of anchors, alert the element type being entered. +- ```javascript +- $( "a" ).mouseout(function( event ) { +- alert( event.relatedTarget.nodeName ); // "DIV" +- }); +- ``` +- */ +- relatedTarget?: null; +- +- type: 'click'; +- } +- +- interface ContextMenuEvent< +- TDelegateTarget = any, +- TData = any, +- TCurrentTarget = any, +- TTarget = any +- > extends MouseEventBase { +- /** +- * The other DOM element involved in the event, if any. +- * @see \`{@link https://api.jquery.com/event.relatedTarget/ }\` +- * @since 1.1.4 +- * @example ​ ````On mouseout of anchors, alert the element type being entered. +- ```javascript +- $( "a" ).mouseout(function( event ) { +- alert( event.relatedTarget.nodeName ); // "DIV" +- }); +- ``` +- */ +- relatedTarget?: null; +- +- type: 'contextmenu'; +- } +- +- interface DoubleClickEvent< +- TDelegateTarget = any, +- TData = any, +- TCurrentTarget = any, +- TTarget = any +- > extends MouseEventBase { +- /** +- * The other DOM element involved in the event, if any. +- * @see \`{@link https://api.jquery.com/event.relatedTarget/ }\` +- * @since 1.1.4 +- * @example ​ ````On mouseout of anchors, alert the element type being entered. +- ```javascript +- $( "a" ).mouseout(function( event ) { +- alert( event.relatedTarget.nodeName ); // "DIV" +- }); +- ``` +- */ +- relatedTarget?: null; +- +- type: 'dblclick'; +- } +- +- interface MouseDownEvent< +- TDelegateTarget = any, +- TData = any, +- TCurrentTarget = any, +- TTarget = any +- > extends MouseEventBase { +- /** +- * The other DOM element involved in the event, if any. +- * @see \`{@link https://api.jquery.com/event.relatedTarget/ }\` +- * @since 1.1.4 +- * @example ​ ````On mouseout of anchors, alert the element type being entered. +- ```javascript +- $( "a" ).mouseout(function( event ) { +- alert( event.relatedTarget.nodeName ); // "DIV" +- }); +- ``` +- */ +- relatedTarget?: null; +- +- type: 'mousedown'; +- } +- +- interface MouseEnterEvent< +- TDelegateTarget = any, +- TData = any, +- TCurrentTarget = any, +- TTarget = any +- > extends MouseEventBase { +- // Special handling by jQuery. +- type: 'mouseover'; +- } +- +- interface MouseLeaveEvent< +- TDelegateTarget = any, +- TData = any, +- TCurrentTarget = any, +- TTarget = any +- > extends MouseEventBase { +- // Special handling by jQuery. +- type: 'mouseout'; +- } +- +- interface MouseMoveEvent< +- TDelegateTarget = any, +- TData = any, +- TCurrentTarget = any, +- TTarget = any +- > extends MouseEventBase { +- /** +- * The other DOM element involved in the event, if any. +- * @see \`{@link https://api.jquery.com/event.relatedTarget/ }\` +- * @since 1.1.4 +- * @example ​ ````On mouseout of anchors, alert the element type being entered. +- ```javascript +- $( "a" ).mouseout(function( event ) { +- alert( event.relatedTarget.nodeName ); // "DIV" +- }); +- ``` +- */ +- relatedTarget?: null; +- +- type: 'mousemove'; +- } +- +- interface MouseOutEvent< +- TDelegateTarget = any, +- TData = any, +- TCurrentTarget = any, +- TTarget = any +- > extends MouseEventBase { +- type: 'mouseout'; +- } +- +- interface MouseOverEvent< +- TDelegateTarget = any, +- TData = any, +- TCurrentTarget = any, +- TTarget = any +- > extends MouseEventBase { +- type: 'mouseover'; +- } +- +- interface MouseUpEvent< +- TDelegateTarget = any, +- TData = any, +- TCurrentTarget = any, +- TTarget = any +- > extends MouseEventBase { +- /** +- * The other DOM element involved in the event, if any. +- * @see \`{@link https://api.jquery.com/event.relatedTarget/ }\` +- * @since 1.1.4 +- * @example ​ ````On mouseout of anchors, alert the element type being entered. +- ```javascript +- $( "a" ).mouseout(function( event ) { +- alert( event.relatedTarget.nodeName ); // "DIV" +- }); +- ``` +- */ +- relatedTarget?: null; +- +- type: 'mouseup'; +- } +- +- // region DragEvent +- // #region DragEvent +- +- interface DragEventBase< +- TDelegateTarget = any, +- TData = any, +- TCurrentTarget = any, +- TTarget = any +- > extends UIEventBase { +- originalEvent?: _DragEvent; +- } +- +- interface DragEvent< +- TDelegateTarget = any, +- TData = any, +- TCurrentTarget = any, +- TTarget = any +- > extends DragEventBase { +- type: 'drag'; +- } +- +- interface DragEndEvent< +- TDelegateTarget = any, +- TData = any, +- TCurrentTarget = any, +- TTarget = any +- > extends DragEventBase { +- type: 'dragend'; +- } +- +- interface DragEnterEvent< +- TDelegateTarget = any, +- TData = any, +- TCurrentTarget = any, +- TTarget = any +- > extends DragEventBase { +- type: 'dragenter'; +- } +- +- interface DragExitEvent< +- TDelegateTarget = any, +- TData = any, +- TCurrentTarget = any, +- TTarget = any +- > extends DragEventBase { +- type: 'dragexit'; +- } +- +- interface DragLeaveEvent< +- TDelegateTarget = any, +- TData = any, +- TCurrentTarget = any, +- TTarget = any +- > extends DragEventBase { +- type: 'dragleave'; +- } +- +- interface DragOverEvent< +- TDelegateTarget = any, +- TData = any, +- TCurrentTarget = any, +- TTarget = any +- > extends DragEventBase { +- type: 'dragover'; +- } +- +- interface DragStartEvent< +- TDelegateTarget = any, +- TData = any, +- TCurrentTarget = any, +- TTarget = any +- > extends DragEventBase { +- type: 'dragstart'; +- } +- +- interface DropEvent< +- TDelegateTarget = any, +- TData = any, +- TCurrentTarget = any, +- TTarget = any +- > extends DragEventBase { +- type: 'drop'; +- } +- +- // #endregion +- +- // #endregion +- +- // region KeyboardEvent +- // #region KeyboardEvent +- +- interface KeyboardEventBase< +- TDelegateTarget = any, +- TData = any, +- TCurrentTarget = any, +- TTarget = any +- > extends UIEventBase { +- /** +- * The other DOM element involved in the event, if any. +- * @see \`{@link https://api.jquery.com/event.relatedTarget/ }\` +- * @since 1.1.4 +- * @example ​ ````On mouseout of anchors, alert the element type being entered. +-```javascript +-$( "a" ).mouseout(function( event ) { +- alert( event.relatedTarget.nodeName ); // "DIV" +-}); +-``` +- */ +- relatedTarget?: undefined; +- +- // MouseEvent +- +- button: undefined; +- buttons: undefined; +- clientX: undefined; +- clientY: undefined; +- offsetX: undefined; +- offsetY: undefined; +- /** +- * The mouse position relative to the left edge of the document. +- * @see \`{@link https://api.jquery.com/event.pageX/ }\` +- * @since 1.0.4 +- * @example ​ ````Show the mouse position relative to the left and top edges of the document (within this iframe). +-```html +- +- +- +- +- event.pageX demo +- +- +- +- +-​ +-
        +-​ +- +-​ +- +- +-``` +- */ +- pageX: undefined; +- /** +- * The mouse position relative to the top edge of the document. +- * @see \`{@link https://api.jquery.com/event.pageY/ }\` +- * @since 1.0.4 +- * @example ​ ````Show the mouse position relative to the left and top edges of the document (within this iframe). +-```html +- +- +- +- +- event.pageY demo +- +- +- +- +-​ +-
        +-​ +- +-​ +- +- +-``` +- */ +- pageY: undefined; +- screenX: undefined; +- screenY: undefined; +- /** @deprecated */ +- toElement: undefined; +- +- // PointerEvent +- +- pointerId: undefined; +- pointerType: undefined; +- +- // KeyboardEvent +- +- /** @deprecated */ +- char: string | undefined; +- /** @deprecated */ +- charCode: number; +- key: string; +- /** @deprecated */ +- keyCode: number; +- +- // TouchEvent +- +- changedTouches: undefined; +- targetTouches: undefined; +- touches: undefined; +- +- // MouseEvent, KeyboardEvent +- +- /** +- * For key or mouse events, this property indicates the specific key or button that was pressed. +- * @see \`{@link https://api.jquery.com/event.which/ }\` +- * @since 1.1.3 +- * @deprecated ​ Deprecated since 3.3. See \`{@link https://github.com/jquery/api.jquery.com/issues/821 }\`. +- * @example ​ ````Log which key was depressed. +-```html +- +- +- +- +- event.which demo +- +- +- +-​ +- +-
        +-​ +- +-​ +- +- +-``` +- * @example ​ ````Log which mouse button was depressed. +-```html +- +- +- +- +- event.which demo +- +- +- +-​ +- +-
        +-​ +- +-​ +- +- +-``` +- */ +- which: number; +- +- // MouseEvent, KeyboardEvent, TouchEvent +- +- altKey: boolean; +- ctrlKey: boolean; +- /** +- * Indicates whether the META key was pressed when the event fired. +- * @see \`{@link https://api.jquery.com/event.metaKey/ }\` +- * @since 1.0.4 +- * @example ​ ````Determine whether the META key was pressed when the event fired. +-```html +- +- +- +- +- event.metaKey demo +- +- +- +- +-​ +- +-
        +-​ +- +-​ +- +- +-``` +- */ +- metaKey: boolean; +- shiftKey: boolean; +- +- originalEvent?: _KeyboardEvent; +- } +- +- interface KeyDownEvent< +- TDelegateTarget = any, +- TData = any, +- TCurrentTarget = any, +- TTarget = any +- > extends KeyboardEventBase { +- type: 'keydown'; +- } +- +- interface KeyPressEvent< +- TDelegateTarget = any, +- TData = any, +- TCurrentTarget = any, +- TTarget = any +- > extends KeyboardEventBase { +- type: 'keypress'; +- } +- +- interface KeyUpEvent< +- TDelegateTarget = any, +- TData = any, +- TCurrentTarget = any, +- TTarget = any +- > extends KeyboardEventBase { +- type: 'keyup'; +- } +- +- // #endregion +- +- // region TouchEvent +- // #region TouchEvent +- +- interface TouchEventBase< +- TDelegateTarget = any, +- TData = any, +- TCurrentTarget = any, +- TTarget = any +- > extends UIEventBase { +- /** +- * The other DOM element involved in the event, if any. +- * @see \`{@link https://api.jquery.com/event.relatedTarget/ }\` +- * @since 1.1.4 +- * @example ​ ````On mouseout of anchors, alert the element type being entered. +-```javascript +-$( "a" ).mouseout(function( event ) { +- alert( event.relatedTarget.nodeName ); // "DIV" +-}); +-``` +- */ +- relatedTarget?: undefined; +- +- // MouseEvent +- +- button: undefined; +- buttons: undefined; +- clientX: undefined; +- clientY: undefined; +- offsetX: undefined; +- offsetY: undefined; +- /** +- * The mouse position relative to the left edge of the document. +- * @see \`{@link https://api.jquery.com/event.pageX/ }\` +- * @since 1.0.4 +- * @example ​ ````Show the mouse position relative to the left and top edges of the document (within this iframe). +-```html +- +- +- +- +- event.pageX demo +- +- +- +- +-​ +-
        +-​ +- +-​ +- +- +-``` +- */ +- pageX: undefined; +- /** +- * The mouse position relative to the top edge of the document. +- * @see \`{@link https://api.jquery.com/event.pageY/ }\` +- * @since 1.0.4 +- * @example ​ ````Show the mouse position relative to the left and top edges of the document (within this iframe). +-```html +- +- +- +- +- event.pageY demo +- +- +- +- +-​ +-
        +-​ +- +-​ +- +- +-``` +- */ +- pageY: undefined; +- screenX: undefined; +- screenY: undefined; +- /** @deprecated */ +- toElement: undefined; +- +- // PointerEvent +- +- pointerId: undefined; +- pointerType: undefined; +- +- // KeyboardEvent +- +- /** @deprecated */ +- char: undefined; +- /** @deprecated */ +- charCode: undefined; +- key: undefined; +- /** @deprecated */ +- keyCode: undefined; +- +- // TouchEvent +- +- changedTouches: TouchList; +- targetTouches: TouchList; +- touches: TouchList; +- +- // MouseEvent, KeyboardEvent +- +- /** +- * For key or mouse events, this property indicates the specific key or button that was pressed. +- * @see \`{@link https://api.jquery.com/event.which/ }\` +- * @since 1.1.3 +- * @deprecated ​ Deprecated since 3.3. See \`{@link https://github.com/jquery/api.jquery.com/issues/821 }\`. +- * @example ​ ````Log which key was depressed. +-```html +- +- +- +- +- event.which demo +- +- +- +-​ +- +-
        +-​ +- +-​ +- +- +-``` +- * @example ​ ````Log which mouse button was depressed. +-```html +- +- +- +- +- event.which demo +- +- +- +-​ +- +-
        +-​ +- +-​ +- +- +-``` +- */ +- which: undefined; +- +- // MouseEvent, KeyboardEvent, TouchEvent +- +- altKey: boolean; +- ctrlKey: boolean; +- /** +- * Indicates whether the META key was pressed when the event fired. +- * @see \`{@link https://api.jquery.com/event.metaKey/ }\` +- * @since 1.0.4 +- * @example ​ ````Determine whether the META key was pressed when the event fired. +-```html +- +- +- +- +- event.metaKey demo +- +- +- +- +-​ +- +-
        +-​ +- +-​ +- +- +-``` +- */ +- metaKey: boolean; +- shiftKey: boolean; +- +- originalEvent?: _TouchEvent; +- } +- +- interface TouchCancelEvent< +- TDelegateTarget = any, +- TData = any, +- TCurrentTarget = any, +- TTarget = any +- > extends TouchEventBase { +- type: 'touchcancel'; +- } +- +- interface TouchEndEvent< +- TDelegateTarget = any, +- TData = any, +- TCurrentTarget = any, +- TTarget = any +- > extends TouchEventBase { +- type: 'touchend'; +- } +- +- interface TouchMoveEvent< +- TDelegateTarget = any, +- TData = any, +- TCurrentTarget = any, +- TTarget = any +- > extends TouchEventBase { +- type: 'touchmove'; +- } +- +- interface TouchStartEvent< +- TDelegateTarget = any, +- TData = any, +- TCurrentTarget = any, +- TTarget = any +- > extends TouchEventBase { +- type: 'touchstart'; +- } +- +- // #endregion +- +- // region FocusEvent +- // #region FocusEvent +- +- interface FocusEventBase< +- TDelegateTarget = any, +- TData = any, +- TCurrentTarget = any, +- TTarget = any +- > extends UIEventBase { +- /** +- * The other DOM element involved in the event, if any. +- * @see \`{@link https://api.jquery.com/event.relatedTarget/ }\` +- * @since 1.1.4 +- * @example ​ ````On mouseout of anchors, alert the element type being entered. +-```javascript +-$( "a" ).mouseout(function( event ) { +- alert( event.relatedTarget.nodeName ); // "DIV" +-}); +-``` +- */ +- relatedTarget?: EventTarget | null; +- +- // MouseEvent +- +- button: undefined; +- buttons: undefined; +- clientX: undefined; +- clientY: undefined; +- offsetX: undefined; +- offsetY: undefined; +- /** +- * The mouse position relative to the left edge of the document. +- * @see \`{@link https://api.jquery.com/event.pageX/ }\` +- * @since 1.0.4 +- * @example ​ ````Show the mouse position relative to the left and top edges of the document (within this iframe). +-```html +- +- +- +- +- event.pageX demo +- +- +- +- +-​ +-
        +-​ +- +-​ +- +- +-``` +- */ +- pageX: undefined; +- /** +- * The mouse position relative to the top edge of the document. +- * @see \`{@link https://api.jquery.com/event.pageY/ }\` +- * @since 1.0.4 +- * @example ​ ````Show the mouse position relative to the left and top edges of the document (within this iframe). +-```html +- +- +- +- +- event.pageY demo +- +- +- +- +-​ +-
        +-​ +- +-​ +- +- +-``` +- */ +- pageY: undefined; +- screenX: undefined; +- screenY: undefined; +- /** @deprecated */ +- toElement: undefined; +- +- // PointerEvent +- +- pointerId: undefined; +- pointerType: undefined; +- +- // KeyboardEvent +- +- /** @deprecated */ +- char: undefined; +- /** @deprecated */ +- charCode: undefined; +- key: undefined; +- /** @deprecated */ +- keyCode: undefined; +- +- // TouchEvent +- +- changedTouches: undefined; +- targetTouches: undefined; +- touches: undefined; +- +- // MouseEvent, KeyboardEvent +- +- /** +- * For key or mouse events, this property indicates the specific key or button that was pressed. +- * @see \`{@link https://api.jquery.com/event.which/ }\` +- * @since 1.1.3 +- * @deprecated ​ Deprecated since 3.3. See \`{@link https://github.com/jquery/api.jquery.com/issues/821 }\`. +- * @example ​ ````Log which key was depressed. +-```html +- +- +- +- +- event.which demo +- +- +- +-​ +- +-
        +-​ +- +-​ +- +- +-``` +- * @example ​ ````Log which mouse button was depressed. +-```html +- +- +- +- +- event.which demo +- +- +- +-​ +- +-
        +-​ +- +-​ +- +- +-``` +- */ +- which: undefined; +- +- // MouseEvent, KeyboardEvent, TouchEvent +- +- altKey: undefined; +- ctrlKey: undefined; +- /** +- * Indicates whether the META key was pressed when the event fired. +- * @see \`{@link https://api.jquery.com/event.metaKey/ }\` +- * @since 1.0.4 +- * @example ​ ````Determine whether the META key was pressed when the event fired. +-```html +- +- +- +- +- event.metaKey demo +- +- +- +- +-​ +- +-
        +-​ +- +-​ +- +- +-``` +- */ +- metaKey: undefined; +- shiftKey: undefined; +- +- originalEvent?: _FocusEvent; +- } +- +- interface BlurEvent< +- TDelegateTarget = any, +- TData = any, +- TCurrentTarget = any, +- TTarget = any +- > extends FocusEventBase { +- type: 'blur'; +- } +- +- interface FocusEvent< +- TDelegateTarget = any, +- TData = any, +- TCurrentTarget = any, +- TTarget = any +- > extends FocusEventBase { +- type: 'focus'; +- } +- +- interface FocusInEvent< +- TDelegateTarget = any, +- TData = any, +- TCurrentTarget = any, +- TTarget = any +- > extends FocusEventBase { +- type: 'focusin'; +- } +- +- interface FocusOutEvent< +- TDelegateTarget = any, +- TData = any, +- TCurrentTarget = any, +- TTarget = any +- > extends FocusEventBase { +- type: 'focusout'; +- } +- +- // #endregion +- +- // #endregion +- +- interface TypeToTriggeredEventMap< +- TDelegateTarget, +- TData, +- TCurrentTarget, +- TTarget +- > { +- // Event +- +- change: ChangeEvent; +- resize: ResizeEvent; +- scroll: ScrollEvent; +- select: SelectEvent; +- submit: SubmitEvent; +- +- // UIEvent +- +- // MouseEvent +- +- click: ClickEvent; +- contextmenu: ContextMenuEvent; +- dblclick: DoubleClickEvent; +- mousedown: MouseDownEvent; +- mouseenter: MouseEnterEvent; +- mouseleave: MouseLeaveEvent; +- mousemove: MouseMoveEvent; +- mouseout: MouseOutEvent; +- mouseover: MouseOverEvent; +- mouseup: MouseUpEvent; +- +- // DragEvent +- +- drag: DragEvent; +- dragend: DragEndEvent; +- dragenter: DragEnterEvent; +- dragexit: DragExitEvent; +- dragleave: DragLeaveEvent; +- dragover: DragOverEvent; +- dragstart: DragStartEvent; +- drop: DropEvent; +- +- // KeyboardEvent +- +- keydown: KeyDownEvent; +- keypress: KeyPressEvent; +- keyup: KeyUpEvent; +- +- // TouchEvent +- +- touchcancel: TouchCancelEvent; +- touchend: TouchEndEvent; +- touchmove: TouchMoveEvent; +- touchstart: TouchStartEvent; +- +- // FocusEvent +- +- blur: BlurEvent; +- focus: FocusEvent; +- focusin: FocusInEvent; +- focusout: FocusOutEvent; +- +- [type: string]: TriggeredEvent; +- } +- +- // Extra parameters can be passed from trigger() +- type EventHandlerBase = (this: TContext, t: T, ...args: any[]) => any; +- +- type EventHandler< +- TCurrentTarget, +- TData = undefined +- > = EventHandlerBase>; +- +- type TypeEventHandler< +- TDelegateTarget, +- TData, +- TCurrentTarget, +- TTarget, +- TType extends keyof TypeToTriggeredEventMap +- > = EventHandlerBase[TType]>; +- +- interface TypeEventHandlers< +- TDelegateTarget, +- TData, +- TCurrentTarget, +- TTarget +- > extends _TypeEventHandlers { +- // No idea why it's necessary to include `object` in the union but otherwise TypeScript complains that +- // derived types of Event are not assignable to Event. +- [type: string]: TypeEventHandler | +- false | +- undefined | +- object; +- } +- +- type _TypeEventHandlers< +- TDelegateTarget, +- TData, +- TCurrentTarget, +- TTarget +- > = { +- [TType in keyof TypeToTriggeredEventMap]?: +- TypeEventHandler | +- false | +- object; +- }; +- +- // region Event extensions +- // #region Event extensions +- +- interface EventExtensions { +- /** +- * The jQuery special event hooks are a set of per-event-name functions and properties that allow code to control the behavior of event processing within jQuery. The mechanism is similar to `fixHooks` in that the special event information is stored in `jQuery.event.special.NAME`, where `NAME` is the name of the special event. Event names are case sensitive. +- * +- * As with `fixHooks`, the special event hooks design assumes it will be very rare that two unrelated pieces of code want to process the same event name. Special event authors who need to modify events with existing hooks will need to take precautions to avoid introducing unwanted side-effects by clobbering those hooks. +- * @see \`{@link https://learn.jquery.com/events/event-extensions/#special-event-hooks }\` +- */ +- special: SpecialEventHooks; +- } +- +- // region Special event hooks +- // #region Special event hooks +- +- /** +- * The jQuery special event hooks are a set of per-event-name functions and properties that allow code to control the behavior of event processing within jQuery. The mechanism is similar to `fixHooks` in that the special event information is stored in `jQuery.event.special.NAME`, where `NAME` is the name of the special event. Event names are case sensitive. +- * +- * As with `fixHooks`, the special event hooks design assumes it will be very rare that two unrelated pieces of code want to process the same event name. Special event authors who need to modify events with existing hooks will need to take precautions to avoid introducing unwanted side-effects by clobbering those hooks. +- * @see \`{@link https://learn.jquery.com/events/event-extensions/#special-event-hooks }\` +- */ +- // Workaround for TypeScript 2.3 which does not have support for weak types handling. +- type SpecialEventHook = { +- /** +- * Indicates whether this event type should be bubbled when the `.trigger()` method is called; by default it is `false`, meaning that a triggered event will bubble to the element's parents up to the document (if attached to a document) and then to the window. Note that defining `noBubble` on an event will effectively prevent that event from being used for delegated events with `.trigger()`. +- * @see \`{@link https://learn.jquery.com/events/event-extensions/#nobubble-boolean }\` +- */ +- noBubble: boolean; +- } | { +- /** +- * When defined, these string properties specify that a special event should be handled like another event type until the event is delivered. The `bindType` is used if the event is attached directly, and the `delegateType` is used for delegated events. These types are generally DOM event types, and _should not_ be a special event themselves. +- * @see \`{@link https://learn.jquery.com/events/event-extensions/#bindtype-string-delegatetype-string }\` +- */ +- bindType: string; +- } | { +- /** +- * When defined, these string properties specify that a special event should be handled like another event type until the event is delivered. The `bindType` is used if the event is attached directly, and the `delegateType` is used for delegated events. These types are generally DOM event types, and _should not_ be a special event themselves. +- * @see \`{@link https://learn.jquery.com/events/event-extensions/#bindtype-string-delegatetype-string }\` +- */ +- delegateType: string; +- } | { +- /** +- * The setup hook is called the first time an event of a particular type is attached to an element; this provides the hook an opportunity to do processing that will apply to all events of this type on this element. The `this` keyword will be a reference to the element where the event is being attached and `eventHandle` is jQuery's event handler function. In most cases the `namespaces` argument should not be used, since it only represents the namespaces of the _first_ event being attached; subsequent events may not have this same namespaces. +- * +- * This hook can perform whatever processing it desires, including attaching its own event handlers to the element or to other elements and recording setup information on the element using the `jQuery.data()` method. If the setup hook wants jQuery to add a browser event (via `addEventListener` or `attachEvent`, depending on browser) it should return `false`. In all other cases, jQuery will not add the browser event, but will continue all its other bookkeeping for the event. This would be appropriate, for example, if the event was never fired by the browser but invoked by `.trigger()`. To attach the jQuery event handler in the setup hook, use the `eventHandle` argument. +- * @see \`{@link https://learn.jquery.com/events/event-extensions/#setup-function-data-object-namespaces-eventhandle-function }\` +- */ +- setup(this: TTarget, data: TData, namespaces: string, eventHandle: EventHandler): void | false; +- } | { +- /** +- * The teardown hook is called when the final event of a particular type is removed from an element. The `this` keyword will be a reference to the element where the event is being cleaned up. This hook should return `false` if it wants jQuery to remove the event from the browser's event system (via `removeEventListener` or `detachEvent`). In most cases, the setup and teardown hooks should return the same value. +- * +- * If the setup hook attached event handlers or added data to an element through a mechanism such as `jQuery.data()`, the teardown hook should reverse the process and remove them. jQuery will generally remove the data and events when an element is totally removed from the document, but failing to remove data or events on teardown will cause a memory leak if the element stays in the document. +- * @see \`{@link https://learn.jquery.com/events/event-extensions/#teardown-function }\` +- */ +- teardown(this: TTarget): void | false; +- } | { +- /** +- * Each time an event handler is added to an element through an API such as `.on()`, jQuery calls this hook. The `this` keyword will be the element to which the event handler is being added, and the `handleObj` argument is as described in the section above. The return value of this hook is ignored. +- * @see \`{@link https://learn.jquery.com/events/event-extensions/#add-function-handleobj }\` +- */ +- add(this: TTarget, handleObj: HandleObject): void; +- } | { +- /** +- * When an event handler is removed from an element using an API such as `.off()`, this hook is called. The `this` keyword will be the element where the handler is being removed, and the `handleObj` argument is as described in the section above. The return value of this hook is ignored. +- * @see \`{@link https://learn.jquery.com/events/event-extensions/#remove-function-handleobj }\` +- */ +- remove(this: TTarget, handleObj: HandleObject): void; +- } | { +- /** +- * Called when the `.trigger()` or `.triggerHandler()` methods are used to trigger an event for the special type from code, as opposed to events that originate from within the browser. The `this` keyword will be the element being triggered, and the event argument will be a `jQuery.Event` object constructed from the caller's input. At minimum, the event type, data, namespace, and target properties are set on the event. The data argument represents additional data passed by `.trigger()` if present. +- * +- * The trigger hook is called early in the process of triggering an event, just after the `jQuery.Event` object is constructed and before any handlers have been called. It can process the triggered event in any way, for example by calling `event.stopPropagation()` or `event.preventDefault()` before returning. If the hook returns `false`, jQuery does not perform any further event triggering actions and returns immediately. Otherwise, it performs the normal trigger processing, calling any event handlers for the element and bubbling the event (unless propagation is stopped in advance or `noBubble` was specified for the special event) to call event handlers attached to parent elements. +- * @see \`{@link https://learn.jquery.com/events/event-extensions/#trigger-function-event-jquery-event-data-object }\` +- */ +- trigger(this: TTarget, event: Event, data: TData): void | false; +- } | { +- /** +- * When the `.trigger()` method finishes running all the event handlers for an event, it also looks for and runs any method on the target object by the same name unless of the handlers called `event.preventDefault()`. So, `.trigger( "submit" )` will execute the `submit()` method on the element if one exists. When a `_default` hook is specified, the hook is called just prior to checking for and executing the element's default method. If this hook returns the value `false` the element's default method will be called; otherwise it is not. +- * @see \`{@link https://learn.jquery.com/events/event-extensions/#_default-function-event-jquery-event-data-object }\` +- */ +- _default(event: TriggeredEvent, data: TData): void | false; +- } | { +- /** +- * jQuery calls a handle hook when the event has occurred and jQuery would normally call the user's event handler specified by `.on()` or another event binding method. If the hook exists, jQuery calls it _instead_ of that event handler, passing it the event and any data passed from `.trigger()` if it was not a native event. The `this` keyword is the DOM element being handled, and `event.handleObj` property has the detailed event information. +- * +- * Based in the information it has, the handle hook should decide whether to call the original handler function which is in `event.handleObj.handler`. It can modify information in the event object before calling the original handler, but _must restore_ that data before returning or subsequent unrelated event handlers may act unpredictably. In most cases, the handle hook should return the result of the original handler, but that is at the discretion of the hook. The handle hook is unique in that it is the only special event function hook that is called under its original special event name when the type is mapped using `bindType` and `delegateType`. For that reason, it is almost always an error to have anything other than a handle hook present if the special event defines a `bindType` and `delegateType`, since those other hooks will never be called. +- * @see \`{@link https://learn.jquery.com/events/event-extensions/#handle-function-event-jquery-event-data-object }\` +- */ +- handle(this: TTarget, event: TriggeredEvent & { handleObj: HandleObject; }, ...data: TData[]): void; +- } | { +- preDispatch(this: TTarget, event: Event): false | void; +- } | { +- postDispatch(this: TTarget, event: Event): void; +- } | { +- [key: string]: never; +- }; +- +- interface SpecialEventHooks { +- [event: string]: SpecialEventHook; +- } +- +- /** +- * Many of the special event hook functions below are passed a `handleObj` object that provides more information about the event, how it was attached, and its current state. This object and its contents should be treated as read-only data, and only the properties below are documented for use by special event handlers. +- * @see \`{@link https://learn.jquery.com/events/event-extensions/#the-handleobj-object }\` +- */ +- interface HandleObject { +- /** +- * The type of event, such as `"click"`. When special event mapping is used via `bindType` or `delegateType`, this will be the mapped type. +- */ +- readonly type: string; +- /** +- * The original type name regardless of whether it was mapped via `bindType` or `delegateType`. So when a "pushy" event is mapped to "click" its `origType` would be "pushy". +- */ +- readonly origType: string; +- /** +- * Namespace(s), if any, provided when the event was attached, such as `"myPlugin"`. When multiple namespaces are given, they are separated by periods and sorted in ascending alphabetical order. If no namespaces are provided, this property is an empty string. +- */ +- readonly namespace: string; +- /** +- * For delegated events, this is the selector used to filter descendant elements and determine if the handler should be called. For directly bound events, this property is `null`. +- */ +- readonly selector: string | undefined | null; +- /** +- * The data, if any, passed to jQuery during event binding, e.g. `{ myData: 42 }`. If the data argument was omitted or `undefined`, this property is `undefined` as well. +- */ +- readonly data: TData; +- /** +- * Event handler function passed to jQuery during event binding. If `false` was passed during event binding, the handler refers to a single shared function that simply returns `false`. +- */ +- readonly handler: EventHandler; +- } +- +- // #endregion +- +- // #endregion +- +- // #endregion +- +- interface NameValuePair { +- name: string; +- value: string; +- } +- +- // region Coordinates +- // #region Coordinates +- +- interface Coordinates { +- left: number; +- top: number; +- } +- +- // Workaround for TypeScript 2.3 which does not have support for weak types handling. +- type CoordinatesPartial = +- Pick | +- Pick | +- { [key: string]: never; }; +- +- // #endregion +- +- // region Val hooks +- // #region Val hooks +- +- // Workaround for TypeScript 2.3 which does not have support for weak types handling. +- type ValHook = { +- get(elem: TElement): any; +- } | { +- set(elem: TElement, value: any): any; +- } | { +- [key: string]: never; +- }; +- +- interface ValHooks { +- // Set to HTMLElement to minimize breaks but should probably be Element. +- [nodeName: string]: ValHook; +- } +- +- // #endregion +- +- type _Falsy = false | null | undefined | 0 | '' | typeof document.all; +-} +- +-declare const jQuery: JQueryStatic; +-declare const $: JQueryStatic; +- +-type _Event = Event; +-type _UIEvent = UIEvent; +-type _MouseEvent = MouseEvent; +-type _DragEvent = DragEvent; +-type _KeyboardEvent = KeyboardEvent; +-type _TouchEvent = TouchEvent; +-type _FocusEvent = FocusEvent; +- +-// region ES5 compatibility +-// #region ES5 compatibility +- +-// Forward declaration of `Iterable`. +-// tslint:disable-next-line:no-empty-interface +-interface Iterable { } +- +-interface SymbolConstructor { +- /** +- * A String value that is used in the creation of the default string description of an object. +- * Called by the built-in method Object.prototype.toString. +- */ +- readonly toStringTag: symbol; +-} +- +-declare var Symbol: SymbolConstructor; +- +-// #endregion ++// // tslint:disable:jsdoc-format ++// // tslint:disable:max-line-length ++// // tslint:disable:no-irregular-whitespace ++ ++// declare namespace JQuery { ++// type TypeOrArray = T | T[]; ++// type Node = Element | Text | Comment | DocumentFragment; ++ ++// /** ++// * A string is designated htmlString in jQuery documentation when it is used to represent one or more DOM elements, typically to be created and inserted in the document. When passed as an argument of the jQuery() function, the string is identified as HTML if it starts with ) and is parsed as such until the final > character. Prior to jQuery 1.9, a string was considered to be HTML if it contained anywhere within the string. ++// */ ++// type htmlString = string; ++// /** ++// * A selector is used in jQuery to select DOM elements from a DOM document. That document is, in most cases, the DOM document present in all browsers, but can also be an XML document received via Ajax. ++// */ ++// type Selector = string; ++ ++// /** ++// * The PlainObject type is a JavaScript object containing zero or more key-value pairs. The plain object is, in other words, an Object object. It is designated "plain" in jQuery documentation to distinguish it from other kinds of JavaScript objects: for example, null, user-defined arrays, and host objects such as document, all of which have a typeof value of "object." ++// * ++// * **Note**: The type declaration of PlainObject is imprecise. It includes host objects and user-defined arrays which do not match jQuery's definition. ++// */ ++// interface PlainObject { ++// [key: string]: T; ++// } ++ ++// interface Selectors extends Sizzle.Selectors { ++// /** ++// * @deprecated ​ Deprecated since 3.0. Use \`{@link Selectors#pseudos }\`. ++// * ++// * **Cause**: The standard way to add new custom selectors through jQuery is `jQuery.expr.pseudos`. These two other aliases are deprecated, although they still work as of jQuery 3.0. ++// * ++// * **Solution**: Rename any of the older usage to `jQuery.expr.pseudos`. The functionality is identical. ++// */ ++// ':': Sizzle.Selectors.PseudoFunctions; ++// /** ++// * @deprecated ​ Deprecated since 3.0. Use \`{@link Selectors#pseudos }\`. ++// * ++// * **Cause**: The standard way to add new custom selectors through jQuery is `jQuery.expr.pseudos`. These two other aliases are deprecated, although they still work as of jQuery 3.0. ++// * ++// * **Solution**: Rename any of the older usage to `jQuery.expr.pseudos`. The functionality is identical. ++// */ ++// filter: Sizzle.Selectors.FilterFunctions; ++// } ++ ++// // region Ajax ++// // #region Ajax ++ ++// interface AjaxSettings extends Ajax.AjaxSettingsBase { ++// /** ++// * A string containing the URL to which the request is sent. ++// */ ++// url?: string; ++// } ++ ++// interface UrlAjaxSettings extends Ajax.AjaxSettingsBase { ++// /** ++// * A string containing the URL to which the request is sent. ++// */ ++// url: string; ++// } ++ ++// namespace Ajax { ++// type SuccessTextStatus = 'success' | 'notmodified' | 'nocontent'; ++// type ErrorTextStatus = 'timeout' | 'error' | 'abort' | 'parsererror'; ++// type TextStatus = SuccessTextStatus | ErrorTextStatus; ++ ++// type SuccessCallback = (this: TContext, data: any, textStatus: SuccessTextStatus, jqXHR: jqXHR) => void; ++ ++// type ErrorCallback = (this: TContext, jqXHR: jqXHR, textStatus: ErrorTextStatus, errorThrown: string) => void; ++ ++// type CompleteCallback = (this: TContext, jqXHR: jqXHR, textStatus: TextStatus) => void; ++ ++// /** ++// * @see \`{@link https://api.jquery.com/jquery.ajax/#jQuery-ajax-settings }\` ++// */ ++// interface AjaxSettingsBase { ++// /** ++// * A set of key/value pairs that map a given dataType to its MIME type, which gets sent in the Accept request header. This header tells the server what kind of response it will accept in return. ++// */ ++// accepts?: PlainObject; ++// /** ++// * By default, all requests are sent asynchronously (i.e. this is set to true by default). If you need synchronous requests, set this option to false. Cross-domain requests and dataType: "jsonp" requests do not support synchronous operation. Note that synchronous requests may temporarily lock the browser, disabling any actions while the request is active. As of jQuery 1.8, the use of async: false with jqXHR ($.Deferred) is deprecated; you must use the success/error/complete callback options instead of the corresponding methods of the jqXHR object such as jqXHR.done(). ++// */ ++// async?: boolean; ++// /** ++// * A pre-request callback function that can be used to modify the jqXHR (in jQuery 1.4.x, XMLHTTPRequest) object before it is sent. Use this to set custom headers, etc. The jqXHR and settings objects are passed as arguments. This is an Ajax Event. Returning false in the beforeSend function will cancel the request. As of jQuery 1.5, the beforeSend option will be called regardless of the type of request. ++// */ ++// beforeSend?(this: TContext, jqXHR: jqXHR, settings: this): false | void; ++// /** ++// * If set to false, it will force requested pages not to be cached by the browser. Note: Setting cache to false will only work correctly with HEAD and GET requests. It works by appending "_={timestamp}" to the GET parameters. The parameter is not needed for other types of requests, except in IE8 when a POST is made to a URL that has already been requested by a GET. ++// */ ++// cache?: boolean; ++// /** ++// * A function to be called when the request finishes (after success and error callbacks are executed). The function gets passed two arguments: The jqXHR (in jQuery 1.4.x, XMLHTTPRequest) object and a string categorizing the status of the request ("success", "notmodified", "nocontent", "error", "timeout", "abort", or "parsererror"). As of jQuery 1.5, the complete setting can accept an array of functions. Each function will be called in turn. This is an Ajax Event. ++// */ ++// complete?: TypeOrArray>; ++// /** ++// * An object of string/regular-expression pairs that determine how jQuery will parse the response, given its content type. ++// */ ++// contents?: PlainObject; ++// /** ++// * When sending data to the server, use this content type. Default is "application/x-www-form-urlencoded; charset=UTF-8", which is fine for most cases. If you explicitly pass in a content-type to $.ajax(), then it is always sent to the server (even if no data is sent). As of jQuery 1.6 you can pass false to tell jQuery to not set any content type header. Note: The W3C XMLHttpRequest specification dictates that the charset is always UTF-8; specifying another charset will not force the browser to change the encoding. Note: For cross-domain requests, setting the content type to anything other than application/x-www-form-urlencoded, multipart/form-data, or text/plain will trigger the browser to send a preflight OPTIONS request to the server. ++// */ ++// contentType?: string | false; ++// /** ++// * This object will be the context of all Ajax-related callbacks. By default, the context is an object that represents the Ajax settings used in the call ($.ajaxSettings merged with the settings passed to $.ajax). ++// */ ++// context?: TContext; ++// /** ++// * An object containing dataType-to-dataType converters. Each converter's value is a function that returns the transformed value of the response. ++// */ ++// converters?: PlainObject<((value: any) => any) | true>; ++// /** ++// * If you wish to force a crossDomain request (such as JSONP) on the same domain, set the value of crossDomain to true. This allows, for example, server-side redirection to another domain. ++// */ ++// crossDomain?: boolean; ++// /** ++// * Data to be sent to the server. It is converted to a query string, if not already a string. It's appended to the url for GET-requests. See processData option to prevent this automatic processing. Object must be Key/Value pairs. If value is an Array, jQuery serializes multiple values with same key based on the value of the traditional setting (described below). ++// */ ++// data?: PlainObject | string; ++// /** ++// * A function to be used to handle the raw response data of XMLHttpRequest. This is a pre-filtering function to sanitize the response. You should return the sanitized data. The function accepts two arguments: The raw data returned from the server and the 'dataType' parameter. ++// */ ++// dataFilter?(data: string, type: string): any; ++// /** ++// * The type of data that you're expecting back from the server. If none is specified, jQuery will try to infer it based on the MIME type of the response (an XML MIME type will yield XML, in 1.4 JSON will yield a JavaScript object, in 1.4 script will execute the script, and anything else will be returned as a string). The available types (and the result passed as the first argument to your success callback) are: ++// * ++// * "xml": Returns a XML document that can be processed via jQuery. ++// * ++// * "html": Returns HTML as plain text; included script tags are evaluated when inserted in the DOM. ++// * ++// * "script": Evaluates the response as JavaScript and returns it as plain text. Disables caching by appending a query string parameter, _=[TIMESTAMP], to the URL unless the cache option is set to true. Note: This will turn POSTs into GETs for remote-domain requests. ++// * ++// * "json": Evaluates the response as JSON and returns a JavaScript object. Cross-domain "json" requests are converted to "jsonp" unless the request includes jsonp: false in its request options. The JSON data is parsed in a strict manner; any malformed JSON is rejected and a parse error is thrown. As of jQuery 1.9, an empty response is also rejected; the server should return a response of null or {} instead. (See json.org for more information on proper JSON formatting.) ++// * ++// * "jsonp": Loads in a JSON block using JSONP. Adds an extra "?callback=?" to the end of your URL to specify the callback. Disables caching by appending a query string parameter, "_=[TIMESTAMP]", to the URL unless the cache option is set to true. ++// * ++// * "text": A plain text string. ++// * ++// * multiple, space-separated values: As of jQuery 1.5, jQuery can convert a dataType from what it received in the Content-Type header to what you require. For example, if you want a text response to be treated as XML, use "text xml" for the dataType. You can also make a JSONP request, have it received as text, and interpreted by jQuery as XML: "jsonp text xml". Similarly, a shorthand string such as "jsonp xml" will first attempt to convert from jsonp to xml, and, failing that, convert from jsonp to text, and then from text to xml. ++// */ ++// dataType?: 'xml' | 'html' | 'script' | 'json' | 'jsonp' | 'text' | string; ++// /** ++// * A function to be called if the request fails. The function receives three arguments: The jqXHR (in jQuery 1.4.x, XMLHttpRequest) object, a string describing the type of error that occurred and an optional exception object, if one occurred. Possible values for the second argument (besides null) are "timeout", "error", "abort", and "parsererror". When an HTTP error occurs, errorThrown receives the textual portion of the HTTP status, such as "Not Found" or "Internal Server Error." As of jQuery 1.5, the error setting can accept an array of functions. Each function will be called in turn. Note: This handler is not called for cross-domain script and cross-domain JSONP requests. This is an Ajax Event. ++// */ ++// error?: TypeOrArray>; ++// /** ++// * Whether to trigger global Ajax event handlers for this request. The default is true. Set to false to prevent the global handlers like ajaxStart or ajaxStop from being triggered. This can be used to control various Ajax Events. ++// */ ++// global?: boolean; ++// /** ++// * An object of additional header key/value pairs to send along with requests using the XMLHttpRequest transport. The header X-Requested-With: XMLHttpRequest is always added, but its default XMLHttpRequest value can be changed here. Values in the headers setting can also be overwritten from within the beforeSend function. ++// */ ++// headers?: PlainObject; ++// /** ++// * Allow the request to be successful only if the response has changed since the last request. This is done by checking the Last-Modified header. Default value is false, ignoring the header. In jQuery 1.4 this technique also checks the 'etag' specified by the server to catch unmodified data. ++// */ ++// ifModified?: boolean; ++// /** ++// * Allow the current environment to be recognized as "local," (e.g. the filesystem), even if jQuery does not recognize it as such by default. The following protocols are currently recognized as local: file, *-extension, and widget. If the isLocal setting needs modification, it is recommended to do so once in the $.ajaxSetup() method. ++// */ ++// isLocal?: boolean; ++// /** ++// * Override the callback function name in a JSONP request. This value will be used instead of 'callback' in the 'callback=?' part of the query string in the url. So {jsonp:'onJSONPLoad'} would result in 'onJSONPLoad=?' passed to the server. As of jQuery 1.5, setting the jsonp option to false prevents jQuery from adding the "?callback" string to the URL or attempting to use "=?" for transformation. In this case, you should also explicitly set the jsonpCallback setting. For example, { jsonp: false, jsonpCallback: "callbackName" }. If you don't trust the target of your Ajax requests, consider setting the jsonp property to false for security reasons. ++// */ ++// jsonp?: string | false; ++// /** ++// * Specify the callback function name for a JSONP request. This value will be used instead of the random name automatically generated by jQuery. It is preferable to let jQuery generate a unique name as it'll make it easier to manage the requests and provide callbacks and error handling. You may want to specify the callback when you want to enable better browser caching of GET requests. As of jQuery 1.5, you can also use a function for this setting, in which case the value of jsonpCallback is set to the return value of that function. ++// */ ++// jsonpCallback?: string | ((this: TContext) => string); ++// /** ++// * The HTTP method to use for the request (e.g. "POST", "GET", "PUT"). ++// */ ++// method?: string; ++// /** ++// * A mime type to override the XHR mime type. ++// */ ++// mimeType?: string; ++// /** ++// * A password to be used with XMLHttpRequest in response to an HTTP access authentication request. ++// */ ++// password?: string; ++// /** ++// * By default, data passed in to the data option as an object (technically, anything other than a string) will be processed and transformed into a query string, fitting to the default content-type "application/x-www-form-urlencoded". If you want to send a DOMDocument, or other non-processed data, set this option to false. ++// */ ++// processData?: boolean; ++// /** ++// * Only applies when the "script" transport is used (e.g., cross-domain requests with "jsonp" or "script" dataType and "GET" type). Sets the charset attribute on the script tag used in the request. Used when the character set on the local page is not the same as the one on the remote script. ++// */ ++// scriptCharset?: string; ++// /** ++// * An object of numeric HTTP codes and functions to be called when the response has the corresponding code. ++// * ++// * If the request is successful, the status code functions take the same parameters as the success callback; if it results in an error (including 3xx redirect), they take the same parameters as the error callback. ++// */ ++// statusCode?: StatusCodeCallbacks; ++// /** ++// * A function to be called if the request succeeds. The function gets passed three arguments: The data returned from the server, formatted according to the dataType parameter or the dataFilter callback function, if specified; a string describing the status; and the jqXHR (in jQuery 1.4.x, XMLHttpRequest) object. As of jQuery 1.5, the success setting can accept an array of functions. Each function will be called in turn. This is an Ajax Event. ++// */ ++// success?: TypeOrArray>; ++// /** ++// * Set a timeout (in milliseconds) for the request. A value of 0 means there will be no timeout. This will override any global timeout set with $.ajaxSetup(). The timeout period starts at the point the $.ajax call is made; if several other requests are in progress and the browser has no connections available, it is possible for a request to time out before it can be sent. In jQuery 1.4.x and below, the XMLHttpRequest object will be in an invalid state if the request times out; accessing any object members may throw an exception. In Firefox 3.0+ only, script and JSONP requests cannot be cancelled by a timeout; the script will run even if it arrives after the timeout period. ++// */ ++// timeout?: number; ++// /** ++// * Set this to true if you wish to use the traditional style of param serialization. ++// */ ++// traditional?: boolean; ++// /** ++// * An alias for method. You should use type if you're using versions of jQuery prior to 1.9.0. ++// */ ++// type?: string; ++// /** ++// * A username to be used with XMLHttpRequest in response to an HTTP access authentication request. ++// */ ++// username?: string; ++// // ActiveXObject requires "lib": ["scripthost"] which consumers would also require ++// /** ++// * Callback for creating the XMLHttpRequest object. Defaults to the ActiveXObject when available (IE), the XMLHttpRequest otherwise. Override to provide your own implementation for XMLHttpRequest or enhancements to the factory. ++// */ ++// xhr?(): XMLHttpRequest; ++// /** ++// * An object of fieldName-fieldValue pairs to set on the native XHR object. ++// * ++// * In jQuery 1.5, the withCredentials property was not propagated to the native XHR and thus CORS requests requiring it would ignore this flag. For this reason, we recommend using jQuery 1.5.1+ should you require the use of it. ++// */ ++// xhrFields?: XHRFields; ++// } ++ ++// // region StatusCodeCallbacks ++// // #region StatusCodeCallbacks ++ ++// type StatusCodeCallbacks = { ++// // region Success Status Codes ++// // #region Success Status Codes ++ ++// // jQuery treats 2xx and 304 status codes as a success ++ ++// 200?: SuccessCallback; ++// 201?: SuccessCallback; ++// 202?: SuccessCallback; ++// 203?: SuccessCallback; ++// 204?: SuccessCallback; ++// 205?: SuccessCallback; ++// 206?: SuccessCallback; ++// 207?: SuccessCallback; ++// 208?: SuccessCallback; ++// 209?: SuccessCallback; ++// 210?: SuccessCallback; ++// 211?: SuccessCallback; ++// 212?: SuccessCallback; ++// 213?: SuccessCallback; ++// 214?: SuccessCallback; ++// 215?: SuccessCallback; ++// 216?: SuccessCallback; ++// 217?: SuccessCallback; ++// 218?: SuccessCallback; ++// 219?: SuccessCallback; ++// 220?: SuccessCallback; ++// 221?: SuccessCallback; ++// 222?: SuccessCallback; ++// 223?: SuccessCallback; ++// 224?: SuccessCallback; ++// 225?: SuccessCallback; ++// 226?: SuccessCallback; ++// 227?: SuccessCallback; ++// 228?: SuccessCallback; ++// 229?: SuccessCallback; ++// 230?: SuccessCallback; ++// 231?: SuccessCallback; ++// 232?: SuccessCallback; ++// 233?: SuccessCallback; ++// 234?: SuccessCallback; ++// 235?: SuccessCallback; ++// 236?: SuccessCallback; ++// 237?: SuccessCallback; ++// 238?: SuccessCallback; ++// 239?: SuccessCallback; ++// 240?: SuccessCallback; ++// 241?: SuccessCallback; ++// 242?: SuccessCallback; ++// 243?: SuccessCallback; ++// 244?: SuccessCallback; ++// 245?: SuccessCallback; ++// 246?: SuccessCallback; ++// 247?: SuccessCallback; ++// 248?: SuccessCallback; ++// 249?: SuccessCallback; ++// 250?: SuccessCallback; ++// 251?: SuccessCallback; ++// 252?: SuccessCallback; ++// 253?: SuccessCallback; ++// 254?: SuccessCallback; ++// 255?: SuccessCallback; ++// 256?: SuccessCallback; ++// 257?: SuccessCallback; ++// 258?: SuccessCallback; ++// 259?: SuccessCallback; ++// 260?: SuccessCallback; ++// 261?: SuccessCallback; ++// 262?: SuccessCallback; ++// 263?: SuccessCallback; ++// 264?: SuccessCallback; ++// 265?: SuccessCallback; ++// 266?: SuccessCallback; ++// 267?: SuccessCallback; ++// 268?: SuccessCallback; ++// 269?: SuccessCallback; ++// 270?: SuccessCallback; ++// 271?: SuccessCallback; ++// 272?: SuccessCallback; ++// 273?: SuccessCallback; ++// 274?: SuccessCallback; ++// 275?: SuccessCallback; ++// 276?: SuccessCallback; ++// 277?: SuccessCallback; ++// 278?: SuccessCallback; ++// 279?: SuccessCallback; ++// 280?: SuccessCallback; ++// 281?: SuccessCallback; ++// 282?: SuccessCallback; ++// 283?: SuccessCallback; ++// 284?: SuccessCallback; ++// 285?: SuccessCallback; ++// 286?: SuccessCallback; ++// 287?: SuccessCallback; ++// 288?: SuccessCallback; ++// 289?: SuccessCallback; ++// 290?: SuccessCallback; ++// 291?: SuccessCallback; ++// 292?: SuccessCallback; ++// 293?: SuccessCallback; ++// 294?: SuccessCallback; ++// 295?: SuccessCallback; ++// 296?: SuccessCallback; ++// 297?: SuccessCallback; ++// 298?: SuccessCallback; ++// 299?: SuccessCallback; ++// 304?: SuccessCallback; ++ ++// // #endregion ++ ++// // region Error Status Codes ++// // #region Error Status Codes ++ ++// 300?: ErrorCallback; ++// 301?: ErrorCallback; ++// 302?: ErrorCallback; ++// 303?: ErrorCallback; ++// 305?: ErrorCallback; ++// 306?: ErrorCallback; ++// 307?: ErrorCallback; ++// 308?: ErrorCallback; ++// 309?: ErrorCallback; ++// 310?: ErrorCallback; ++// 311?: ErrorCallback; ++// 312?: ErrorCallback; ++// 313?: ErrorCallback; ++// 314?: ErrorCallback; ++// 315?: ErrorCallback; ++// 316?: ErrorCallback; ++// 317?: ErrorCallback; ++// 318?: ErrorCallback; ++// 319?: ErrorCallback; ++// 320?: ErrorCallback; ++// 321?: ErrorCallback; ++// 322?: ErrorCallback; ++// 323?: ErrorCallback; ++// 324?: ErrorCallback; ++// 325?: ErrorCallback; ++// 326?: ErrorCallback; ++// 327?: ErrorCallback; ++// 328?: ErrorCallback; ++// 329?: ErrorCallback; ++// 330?: ErrorCallback; ++// 331?: ErrorCallback; ++// 332?: ErrorCallback; ++// 333?: ErrorCallback; ++// 334?: ErrorCallback; ++// 335?: ErrorCallback; ++// 336?: ErrorCallback; ++// 337?: ErrorCallback; ++// 338?: ErrorCallback; ++// 339?: ErrorCallback; ++// 340?: ErrorCallback; ++// 341?: ErrorCallback; ++// 342?: ErrorCallback; ++// 343?: ErrorCallback; ++// 344?: ErrorCallback; ++// 345?: ErrorCallback; ++// 346?: ErrorCallback; ++// 347?: ErrorCallback; ++// 348?: ErrorCallback; ++// 349?: ErrorCallback; ++// 350?: ErrorCallback; ++// 351?: ErrorCallback; ++// 352?: ErrorCallback; ++// 353?: ErrorCallback; ++// 354?: ErrorCallback; ++// 355?: ErrorCallback; ++// 356?: ErrorCallback; ++// 357?: ErrorCallback; ++// 358?: ErrorCallback; ++// 359?: ErrorCallback; ++// 360?: ErrorCallback; ++// 361?: ErrorCallback; ++// 362?: ErrorCallback; ++// 363?: ErrorCallback; ++// 364?: ErrorCallback; ++// 365?: ErrorCallback; ++// 366?: ErrorCallback; ++// 367?: ErrorCallback; ++// 368?: ErrorCallback; ++// 369?: ErrorCallback; ++// 370?: ErrorCallback; ++// 371?: ErrorCallback; ++// 372?: ErrorCallback; ++// 373?: ErrorCallback; ++// 374?: ErrorCallback; ++// 375?: ErrorCallback; ++// 376?: ErrorCallback; ++// 377?: ErrorCallback; ++// 378?: ErrorCallback; ++// 379?: ErrorCallback; ++// 380?: ErrorCallback; ++// 381?: ErrorCallback; ++// 382?: ErrorCallback; ++// 383?: ErrorCallback; ++// 384?: ErrorCallback; ++// 385?: ErrorCallback; ++// 386?: ErrorCallback; ++// 387?: ErrorCallback; ++// 388?: ErrorCallback; ++// 389?: ErrorCallback; ++// 390?: ErrorCallback; ++// 391?: ErrorCallback; ++// 392?: ErrorCallback; ++// 393?: ErrorCallback; ++// 394?: ErrorCallback; ++// 395?: ErrorCallback; ++// 396?: ErrorCallback; ++// 397?: ErrorCallback; ++// 398?: ErrorCallback; ++// 399?: ErrorCallback; ++// 400?: ErrorCallback; ++// 401?: ErrorCallback; ++// 402?: ErrorCallback; ++// 403?: ErrorCallback; ++// 404?: ErrorCallback; ++// 405?: ErrorCallback; ++// 406?: ErrorCallback; ++// 407?: ErrorCallback; ++// 408?: ErrorCallback; ++// 409?: ErrorCallback; ++// 410?: ErrorCallback; ++// 411?: ErrorCallback; ++// 412?: ErrorCallback; ++// 413?: ErrorCallback; ++// 414?: ErrorCallback; ++// 415?: ErrorCallback; ++// 416?: ErrorCallback; ++// 417?: ErrorCallback; ++// 418?: ErrorCallback; ++// 419?: ErrorCallback; ++// 420?: ErrorCallback; ++// 421?: ErrorCallback; ++// 422?: ErrorCallback; ++// 423?: ErrorCallback; ++// 424?: ErrorCallback; ++// 425?: ErrorCallback; ++// 426?: ErrorCallback; ++// 427?: ErrorCallback; ++// 428?: ErrorCallback; ++// 429?: ErrorCallback; ++// 430?: ErrorCallback; ++// 431?: ErrorCallback; ++// 432?: ErrorCallback; ++// 433?: ErrorCallback; ++// 434?: ErrorCallback; ++// 435?: ErrorCallback; ++// 436?: ErrorCallback; ++// 437?: ErrorCallback; ++// 438?: ErrorCallback; ++// 439?: ErrorCallback; ++// 440?: ErrorCallback; ++// 441?: ErrorCallback; ++// 442?: ErrorCallback; ++// 443?: ErrorCallback; ++// 444?: ErrorCallback; ++// 445?: ErrorCallback; ++// 446?: ErrorCallback; ++// 447?: ErrorCallback; ++// 448?: ErrorCallback; ++// 449?: ErrorCallback; ++// 450?: ErrorCallback; ++// 451?: ErrorCallback; ++// 452?: ErrorCallback; ++// 453?: ErrorCallback; ++// 454?: ErrorCallback; ++// 455?: ErrorCallback; ++// 456?: ErrorCallback; ++// 457?: ErrorCallback; ++// 458?: ErrorCallback; ++// 459?: ErrorCallback; ++// 460?: ErrorCallback; ++// 461?: ErrorCallback; ++// 462?: ErrorCallback; ++// 463?: ErrorCallback; ++// 464?: ErrorCallback; ++// 465?: ErrorCallback; ++// 466?: ErrorCallback; ++// 467?: ErrorCallback; ++// 468?: ErrorCallback; ++// 469?: ErrorCallback; ++// 470?: ErrorCallback; ++// 471?: ErrorCallback; ++// 472?: ErrorCallback; ++// 473?: ErrorCallback; ++// 474?: ErrorCallback; ++// 475?: ErrorCallback; ++// 476?: ErrorCallback; ++// 477?: ErrorCallback; ++// 478?: ErrorCallback; ++// 479?: ErrorCallback; ++// 480?: ErrorCallback; ++// 481?: ErrorCallback; ++// 482?: ErrorCallback; ++// 483?: ErrorCallback; ++// 484?: ErrorCallback; ++// 485?: ErrorCallback; ++// 486?: ErrorCallback; ++// 487?: ErrorCallback; ++// 488?: ErrorCallback; ++// 489?: ErrorCallback; ++// 490?: ErrorCallback; ++// 491?: ErrorCallback; ++// 492?: ErrorCallback; ++// 493?: ErrorCallback; ++// 494?: ErrorCallback; ++// 495?: ErrorCallback; ++// 496?: ErrorCallback; ++// 497?: ErrorCallback; ++// 498?: ErrorCallback; ++// 499?: ErrorCallback; ++// 500?: ErrorCallback; ++// 501?: ErrorCallback; ++// 502?: ErrorCallback; ++// 503?: ErrorCallback; ++// 504?: ErrorCallback; ++// 505?: ErrorCallback; ++// 506?: ErrorCallback; ++// 507?: ErrorCallback; ++// 508?: ErrorCallback; ++// 509?: ErrorCallback; ++// 510?: ErrorCallback; ++// 511?: ErrorCallback; ++// 512?: ErrorCallback; ++// 513?: ErrorCallback; ++// 514?: ErrorCallback; ++// 515?: ErrorCallback; ++// 516?: ErrorCallback; ++// 517?: ErrorCallback; ++// 518?: ErrorCallback; ++// 519?: ErrorCallback; ++// 520?: ErrorCallback; ++// 521?: ErrorCallback; ++// 522?: ErrorCallback; ++// 523?: ErrorCallback; ++// 524?: ErrorCallback; ++// 525?: ErrorCallback; ++// 526?: ErrorCallback; ++// 527?: ErrorCallback; ++// 528?: ErrorCallback; ++// 529?: ErrorCallback; ++// 530?: ErrorCallback; ++// 531?: ErrorCallback; ++// 532?: ErrorCallback; ++// 533?: ErrorCallback; ++// 534?: ErrorCallback; ++// 535?: ErrorCallback; ++// 536?: ErrorCallback; ++// 537?: ErrorCallback; ++// 538?: ErrorCallback; ++// 539?: ErrorCallback; ++// 540?: ErrorCallback; ++// 541?: ErrorCallback; ++// 542?: ErrorCallback; ++// 543?: ErrorCallback; ++// 544?: ErrorCallback; ++// 545?: ErrorCallback; ++// 546?: ErrorCallback; ++// 547?: ErrorCallback; ++// 548?: ErrorCallback; ++// 549?: ErrorCallback; ++// 550?: ErrorCallback; ++// 551?: ErrorCallback; ++// 552?: ErrorCallback; ++// 553?: ErrorCallback; ++// 554?: ErrorCallback; ++// 555?: ErrorCallback; ++// 556?: ErrorCallback; ++// 557?: ErrorCallback; ++// 558?: ErrorCallback; ++// 559?: ErrorCallback; ++// 560?: ErrorCallback; ++// 561?: ErrorCallback; ++// 562?: ErrorCallback; ++// 563?: ErrorCallback; ++// 564?: ErrorCallback; ++// 565?: ErrorCallback; ++// 566?: ErrorCallback; ++// 567?: ErrorCallback; ++// 568?: ErrorCallback; ++// 569?: ErrorCallback; ++// 570?: ErrorCallback; ++// 571?: ErrorCallback; ++// 572?: ErrorCallback; ++// 573?: ErrorCallback; ++// 574?: ErrorCallback; ++// 575?: ErrorCallback; ++// 576?: ErrorCallback; ++// 577?: ErrorCallback; ++// 578?: ErrorCallback; ++// 579?: ErrorCallback; ++// 580?: ErrorCallback; ++// 581?: ErrorCallback; ++// 582?: ErrorCallback; ++// 583?: ErrorCallback; ++// 584?: ErrorCallback; ++// 585?: ErrorCallback; ++// 586?: ErrorCallback; ++// 587?: ErrorCallback; ++// 588?: ErrorCallback; ++// 589?: ErrorCallback; ++// 590?: ErrorCallback; ++// 591?: ErrorCallback; ++// 592?: ErrorCallback; ++// 593?: ErrorCallback; ++// 594?: ErrorCallback; ++// 595?: ErrorCallback; ++// 596?: ErrorCallback; ++// 597?: ErrorCallback; ++// 598?: ErrorCallback; ++// 599?: ErrorCallback; ++ ++// // #endregion ++// } & { ++// // Status codes not listed require type annotations when defining the callback ++// [index: number]: SuccessCallback | ErrorCallback; ++// }; ++ ++// // #endregion ++ ++// // Writable properties on XMLHttpRequest ++// interface XHRFields extends Partial> { ++// msCaching?: string; ++// } ++// } ++ ++// interface Transport { ++// send(headers: PlainObject, completeCallback: Transport.SuccessCallback): void; ++// abort(): void; ++// } ++ ++// namespace Transport { ++// type SuccessCallback = (status: number, statusText: Ajax.TextStatus, responses?: PlainObject, headers?: string) => void; ++// } ++ ++// /** ++// * @see \`{@link https://api.jquery.com/jquery.ajax/#jqXHR }\` ++// */ ++// interface jqXHR extends Promise3, never, ++// Ajax.SuccessTextStatus, Ajax.ErrorTextStatus, never, ++// jqXHR, string, never>, ++// Pick, ++// Partial> { ++// responseJSON?: any; ++// abort(statusText?: string): void; ++ ++// /** ++// * Determine the current state of a Deferred object. ++// * @see \`{@link https://api.jquery.com/deferred.state/ }\` ++// * @since 1.7 ++// */ ++// state(): 'pending' | 'resolved' | 'rejected'; ++// statusCode(map: Ajax.StatusCodeCallbacks): void; ++// } ++ ++// namespace jqXHR { ++// interface DoneCallback> extends Deferred.Callback3 { } ++ ++// interface FailCallback extends Deferred.Callback3 { } ++ ++// interface AlwaysCallback> extends Deferred.Callback3 { } ++// } ++ ++// // #endregion ++ ++// // region Callbacks ++// // #region Callbacks ++ ++// interface CallbacksStatic { ++// /** ++// * A multi-purpose callbacks list object that provides a powerful way to manage callback lists. ++// * @param flags An optional list of space-separated flags that change how the callback list behaves. ++// * @see \`{@link https://api.jquery.com/jQuery.Callbacks/ }\` ++// * @since 1.7 ++// */ ++// // tslint:disable-next-line:ban-types callable-types no-unnecessary-generics ++// (flags?: string): Callbacks; ++// } ++ ++// // tslint:disable-next-line:ban-types ++// interface Callbacks { ++// /** ++// * Add a callback or a collection of callbacks to a callback list. ++// * @param callback A function, or array of functions, that are to be added to the callback list. ++// * @param callbacks A function, or array of functions, that are to be added to the callback list. ++// * @see \`{@link https://api.jquery.com/callbacks.add/ }\` ++// * @since 1.7 ++// * @example ​ ````Use callbacks.add() to add new callbacks to a callback list: ++// ```javascript ++// // A sample logging function to be added to a callbacks list ++// var foo = function( value ) { ++// console.log( "foo: " + value ); ++// }; ++// ​ ++// // Another function to also be added to the list ++// var bar = function( value ) { ++// console.log( "bar: " + value ); ++// }; ++// ​ ++// var callbacks = $.Callbacks(); ++// ​ ++// // Add the function "foo" to the list ++// callbacks.add( foo ); ++// ​ ++// // Fire the items on the list ++// callbacks.fire( "hello" ); ++// // Outputs: "foo: hello" ++// ​ ++// // Add the function "bar" to the list ++// callbacks.add( bar ); ++// ​ ++// // Fire the items on the list again ++// callbacks.fire( "world" ); ++// ​ ++// // Outputs: ++// // "foo: world" ++// // "bar: world" ++// ``` ++// */ ++// add(callback: TypeOrArray, ...callbacks: Array>): this; ++// /** ++// * Disable a callback list from doing anything more. ++// * @see \`{@link https://api.jquery.com/callbacks.disable/ }\` ++// * @since 1.7 ++// * @example ​ ````Use callbacks.disable() to disable further calls to a callback list: ++// ```javascript ++// // A sample logging function to be added to a callbacks list ++// var foo = function( value ) { ++// console.log( value ); ++// }; ++// ​ ++// var callbacks = $.Callbacks(); ++// ​ ++// // Add the above function to the list ++// callbacks.add( foo ); ++// ​ ++// // Fire the items on the list ++// callbacks.fire( "foo" ); ++// // Outputs: foo ++// ​ ++// // Disable further calls being possible ++// callbacks.disable(); ++// ​ ++// // Attempt to fire with "foobar" as an argument ++// callbacks.fire( "foobar" ); ++// // foobar isn't output ++// ``` ++// */ ++// disable(): this; ++// /** ++// * Determine if the callbacks list has been disabled. ++// * @see \`{@link https://api.jquery.com/callbacks.disabled/ }\` ++// * @since 1.7 ++// * @example ​ ````Use callbacks.disabled() to determine if the callbacks list has been disabled: ++// ```javascript ++// // A sample logging function to be added to a callbacks list ++// var foo = function( value ) { ++// console.log( "foo:" + value ); ++// }; ++// ​ ++// var callbacks = $.Callbacks(); ++// ​ ++// // Add the logging function to the callback list ++// callbacks.add( foo ); ++// ​ ++// // Fire the items on the list, passing an argument ++// callbacks.fire( "hello" ); ++// // Outputs "foo: hello" ++// ​ ++// // Disable the callbacks list ++// callbacks.disable(); ++// ​ ++// // Test the disabled state of the list ++// console.log ( callbacks.disabled() ); ++// // Outputs: true ++// ``` ++// */ ++// disabled(): boolean; ++// /** ++// * Remove all of the callbacks from a list. ++// * @see \`{@link https://api.jquery.com/callbacks.empty/ }\` ++// * @since 1.7 ++// * @example ​ ````Use callbacks.empty() to empty a list of callbacks: ++// ```javascript ++// // A sample logging function to be added to a callbacks list ++// var foo = function( value1, value2 ) { ++// console.log( "foo: " + value1 + "," + value2 ); ++// }; ++// ​ ++// // Another function to also be added to the list ++// var bar = function( value1, value2 ) { ++// console.log( "bar: " + value1 + "," + value2 ); ++// }; ++// ​ ++// var callbacks = $.Callbacks(); ++// ​ ++// // Add the two functions ++// callbacks.add( foo ); ++// callbacks.add( bar ); ++// ​ ++// // Empty the callbacks list ++// callbacks.empty(); ++// ​ ++// // Check to ensure all callbacks have been removed ++// console.log( callbacks.has( foo ) ); ++// // false ++// console.log( callbacks.has( bar ) ); ++// // false ++// ``` ++// */ ++// empty(): this; ++// /** ++// * Call all of the callbacks with the given arguments. ++// * @param args The argument or list of arguments to pass back to the callback list. ++// * @see \`{@link https://api.jquery.com/callbacks.fire/ }\` ++// * @since 1.7 ++// * @example ​ ````Use callbacks.fire() to invoke the callbacks in a list with any arguments that have been passed: ++// ```javascript ++// // A sample logging function to be added to a callbacks list ++// var foo = function( value ) { ++// console.log( "foo:" + value ); ++// }; ++// ​ ++// var callbacks = $.Callbacks(); ++// ​ ++// // Add the function "foo" to the list ++// callbacks.add( foo ); ++// ​ ++// // Fire the items on the list ++// callbacks.fire( "hello" ); // Outputs: "foo: hello" ++// callbacks.fire( "world" ); // Outputs: "foo: world" ++// ​ ++// // Add another function to the list ++// var bar = function( value ){ ++// console.log( "bar:" + value ); ++// }; ++// ​ ++// // Add this function to the list ++// callbacks.add( bar ); ++// ​ ++// // Fire the items on the list again ++// callbacks.fire( "hello again" ); ++// // Outputs: ++// // "foo: hello again" ++// // "bar: hello again" ++// ``` ++// */ ++// fire(...args: any[]): this; ++// /** ++// * Determine if the callbacks have already been called at least once. ++// * @see \`{@link https://api.jquery.com/callbacks.fired/ }\` ++// * @since 1.7 ++// * @example ​ ````Use callbacks.fired() to determine if the callbacks in a list have been called at least once: ++// ```javascript ++// // A sample logging function to be added to a callbacks list ++// var foo = function( value ) { ++// console.log( "foo:" + value ); ++// }; ++// ​ ++// var callbacks = $.Callbacks(); ++// ​ ++// // Add the function "foo" to the list ++// callbacks.add( foo ); ++// ​ ++// // Fire the items on the list ++// callbacks.fire( "hello" ); // Outputs: "foo: hello" ++// callbacks.fire( "world" ); // Outputs: "foo: world" ++// ​ ++// // Test to establish if the callbacks have been called ++// console.log( callbacks.fired() ); ++// ``` ++// */ ++// fired(): boolean; ++// /** ++// * Call all callbacks in a list with the given context and arguments. ++// * @param context A reference to the context in which the callbacks in the list should be fired. ++// * @param args An argument, or array of arguments, to pass to the callbacks in the list. ++// * @see \`{@link https://api.jquery.com/callbacks.fireWith/ }\` ++// * @since 1.7 ++// * @example ​ ````Use callbacks.fireWith() to fire a list of callbacks with a specific context and an array of arguments: ++// ```javascript ++// // A sample logging function to be added to a callbacks list ++// var log = function( value1, value2 ) { ++// console.log( "Received: " + value1 + "," + value2 ); ++// }; ++// ​ ++// var callbacks = $.Callbacks(); ++// ​ ++// // Add the log method to the callbacks list ++// callbacks.add( log ); ++// ​ ++// // Fire the callbacks on the list using the context "window" ++// // and an arguments array ++// ​ ++// callbacks.fireWith( window, [ "foo","bar" ] ); ++// // Outputs: "Received: foo, bar" ++// ``` ++// */ ++// fireWith(context: object, args?: ArrayLike): this; ++// /** ++// * Determine whether or not the list has any callbacks attached. If a callback is provided as an argument, determine whether it is in a list. ++// * @param callback The callback to search for. ++// * @see \`{@link https://api.jquery.com/callbacks.has/ }\` ++// * @since 1.7 ++// * @example ​ ````Use callbacks.has() to check if a callback list contains a specific callback: ++// ```javascript ++// // A sample logging function to be added to a callbacks list ++// var foo = function( value1, value2 ) { ++// console.log( "Received: " + value1 + "," + value2 ); ++// }; ++// ​ ++// // A second function which will not be added to the list ++// var bar = function( value1, value2 ) { ++// console.log( "foobar" ); ++// }; ++// ​ ++// var callbacks = $.Callbacks(); ++// ​ ++// // Add the log method to the callbacks list ++// callbacks.add( foo ); ++// ​ ++// // Determine which callbacks are in the list ++// console.log( callbacks.has( foo ) ); ++// // true ++// console.log( callbacks.has( bar ) ); ++// // false ++// ``` ++// */ ++// has(callback?: T): boolean; ++// /** ++// * Lock a callback list in its current state. ++// * @see \`{@link https://api.jquery.com/callbacks.lock/ }\` ++// * @since 1.7 ++// * @example ​ ````Use callbacks.lock() to lock a callback list to avoid further changes being made to the list state: ++// ```javascript ++// // A sample logging function to be added to a callbacks list ++// var foo = function( value ) { ++// console.log( "foo:" + value ); ++// }; ++// ​ ++// var callbacks = $.Callbacks(); ++// ​ ++// // Add the logging function to the callback list ++// callbacks.add( foo ); ++// ​ ++// // Fire the items on the list, passing an argument ++// callbacks.fire( "hello" ); ++// // Outputs "foo: hello" ++// ​ ++// // Lock the callbacks list ++// callbacks.lock(); ++// ​ ++// // Try firing the items again ++// callbacks.fire( "world" ); ++// ​ ++// // As the list was locked, no items were called, ++// // so "world" isn't logged ++// ``` ++// * @example ​ ````Use callbacks.lock() to lock a callback list with "memory," and then resume using the list: ++// ```html ++// ++// ++// ++// ++// callbacks.lock demo ++// ++// ++// ++// ​ ++//
        ++// ​ ++// ++// ​ ++// ++// ++// ``` ++// */ ++// lock(): this; ++// /** ++// * Determine if the callbacks list has been locked. ++// * @see \`{@link https://api.jquery.com/callbacks.locked/ }\` ++// * @since 1.7 ++// * @example ​ ````Use callbacks.locked() to determine the lock-state of a callback list: ++// ```javascript ++// // A sample logging function to be added to a callbacks list ++// var foo = function( value ) { ++// console.log( "foo: " + value ); ++// }; ++// ​ ++// var callbacks = $.Callbacks(); ++// ​ ++// // Add the logging function to the callback list ++// callbacks.add( foo ); ++// ​ ++// // Fire the items on the list, passing an argument ++// callbacks.fire( "hello" ); ++// // Outputs "foo: hello" ++// ​ ++// // Lock the callbacks list ++// callbacks.lock(); ++// ​ ++// // Test the lock-state of the list ++// console.log ( callbacks.locked() ); ++// // true ++// ``` ++// */ ++// locked(): boolean; ++// /** ++// * Remove a callback or a collection of callbacks from a callback list. ++// * @param callbacks A function, or array of functions, that are to be removed from the callback list. ++// * @see \`{@link https://api.jquery.com/callbacks.remove/ }\` ++// * @since 1.7 ++// * @example ​ ````Use callbacks.remove() to remove callbacks from a callback list: ++// ```javascript ++// // A sample logging function to be added to a callbacks list ++// var foo = function( value ) { ++// console.log( "foo: " + value ); ++// }; ++// ​ ++// var callbacks = $.Callbacks(); ++// ​ ++// // Add the function "foo" to the list ++// callbacks.add( foo ); ++// ​ ++// // Fire the items on the list ++// callbacks.fire( "hello" ); ++// // Outputs: "foo: hello" ++// ​ ++// // Remove "foo" from the callback list ++// callbacks.remove( foo ); ++// ​ ++// // Fire the items on the list again ++// callbacks.fire( "world" ); ++// ​ ++// // Nothing output as "foo" is no longer in the list ++// ``` ++// */ ++// remove(...callbacks: T[]): this; ++// } ++ ++// // #endregion ++ ++// // region CSS hooks ++// // #region CSS hooks ++ ++// // Workaround for TypeScript 2.3 which does not have support for weak types handling. ++// type CSSHook = ++// Partial<_CSSHook> & ( ++// Pick<_CSSHook, 'get'> | ++// Pick<_CSSHook, 'set'> ++// ); ++ ++// interface _CSSHook { ++// get(elem: TElement, computed: any, extra: any): any; ++// set(elem: TElement, value: any): void; ++// } ++ ++// interface CSSHooks { ++// // Set to HTMLElement to minimize breaks but should probably be Element. ++// [propertyName: string]: CSSHook; ++// } ++ ++// // #endregion ++ ++// // region Deferred ++// // #region Deferred ++ ++// /** ++// * Any object that has a then method. ++// */ ++// interface Thenable extends PromiseLike { } ++ ++// // NOTE: This is a private copy of the global Promise interface. It is used by JQuery.PromiseBase to indicate compatibility with other Promise implementations. ++// // The global Promise interface cannot be used directly as it may be modified, as in the case of @types/bluebird-global. ++// /** ++// * Represents the completion of an asynchronous operation ++// */ ++// interface _Promise { ++// readonly [Symbol.toStringTag]: "Promise"; ++// /** ++// * Attaches callbacks for the resolution and/or rejection of the Promise. ++// * @param onfulfilled The callback to execute when the Promise is resolved. ++// * @param onrejected The callback to execute when the Promise is rejected. ++// * @returns A Promise for the completion of which ever callback is executed. ++// */ ++// then(onfulfilled?: ((value: T) => TResult1 | PromiseLike) | null, ++// onrejected?: ((reason: any) => TResult2 | PromiseLike) | null): _Promise; ++// /** ++// * Attaches a callback for only the rejection of the Promise. ++// * @param onrejected The callback to execute when the Promise is rejected. ++// * @returns A Promise for the completion of the callback. ++// */ ++// catch(onrejected?: ((reason: any) => TResult | PromiseLike) | null): _Promise; ++// } ++ ++// // Type parameter guide ++// // -------------------- ++// // Each type parameter represents a parameter in one of the three possible callbacks. ++// // ++// // The first letter indicates which position the parameter is in. ++// // ++// // T = A = 1st position ++// // U = B = 2nd position ++// // V = C = 3rd position ++// // S = R = rest position ++// // ++// // The second letter indicates which whether it is a [R]esolve, Re[J]ect, or [N]otify value. ++// // ++// // The third letter indicates whether the value is returned in the [D]one filter, [F]ail filter, or [P]rogress filter. ++ ++// /** ++// * This object provides a subset of the methods of the Deferred object (then, done, fail, always, pipe, progress, state and promise) to prevent users from changing the state of the Deferred. ++// * @see \`{@link https://api.jquery.com/Types/#Promise }\` ++// */ ++// interface PromiseBase extends _Promise, PromiseLike { ++// /** ++// * Add handlers to be called when the Deferred object is either resolved or rejected. ++// * @param alwaysCallback A function, or array of functions, that is called when the Deferred is resolved or rejected. ++// * @param alwaysCallbacks Optional additional functions, or arrays of functions, that are called when the Deferred is resolved or rejected. ++// * @see \`{@link https://api.jquery.com/deferred.always/ }\` ++// * @since 1.6 ++// * @example ​ ````Since the jQuery.get() method returns a jqXHR object, which is derived from a Deferred object, we can attach a callback for both success and error using the deferred.always() method. ++// ```javascript ++// $.get( "test.php" ).always(function() { ++// alert( "$.get completed with success or error callback arguments" ); ++// }); ++// ``` ++// */ ++// always(alwaysCallback: TypeOrArray>, ++// ...alwaysCallbacks: Array>>): this; ++// /** ++// * Add handlers to be called when the Deferred object is resolved. ++// * @param doneCallback A function, or array of functions, that are called when the Deferred is resolved. ++// * @param doneCallbacks Optional additional functions, or arrays of functions, that are called when the Deferred is resolved. ++// * @see \`{@link https://api.jquery.com/deferred.done/ }\` ++// * @since 1.5 ++// * @example ​ ````Since the jQuery.get method returns a jqXHR object, which is derived from a Deferred object, we can attach a success callback using the .done() method. ++// ```javascript ++// $.get( "test.php" ).done(function() { ++// alert( "$.get succeeded" ); ++// }); ++// ``` ++// * @example ​ ````Resolve a Deferred object when the user clicks a button, triggering a number of callback functions: ++// ```html ++// ++// ++// ++// ++// deferred.done demo ++// ++// ++// ++// ​ ++// ++//

        Ready...

        ++// ​ ++// ++// ​ ++// ++// ++// ``` ++// */ ++// done(doneCallback: TypeOrArray>, ++// ...doneCallbacks: Array>>): this; ++// /** ++// * Add handlers to be called when the Deferred object is rejected. ++// * @param failCallback A function, or array of functions, that are called when the Deferred is rejected. ++// * @param failCallbacks Optional additional functions, or arrays of functions, that are called when the Deferred is rejected. ++// * @see \`{@link https://api.jquery.com/deferred.fail/ }\` ++// * @since 1.5 ++// * @example ​ ````Since the jQuery.get method returns a jqXHR object, which is derived from a Deferred, you can attach a success and failure callback using the deferred.done() and deferred.fail() methods. ++// ```javascript ++// $.get( "test.php" ) ++// .done(function() { ++// alert( "$.get succeeded" ); ++// }) ++// .fail(function() { ++// alert( "$.get failed!" ); ++// }); ++// ``` ++// */ ++// fail(failCallback: TypeOrArray>, ++// ...failCallbacks: Array>>): this; ++// /** ++// * Add handlers to be called when the Deferred object generates progress notifications. ++// * @param progressCallback A function, or array of functions, to be called when the Deferred generates progress notifications. ++// * @param progressCallbacks Optional additional functions, or arrays of functions, to be called when the Deferred generates ++// * progress notifications. ++// * @see \`{@link https://api.jquery.com/deferred.progress/ }\` ++// * @since 1.7 ++// */ ++// progress(progressCallback: TypeOrArray>, ++// ...progressCallbacks: Array>>): this; ++// /** ++// * Return a Deferred's Promise object. ++// * @param target Object onto which the promise methods have to be attached ++// * @see \`{@link https://api.jquery.com/deferred.promise/ }\` ++// * @since 1.5 ++// * @example ​ ````Create a Deferred and set two timer-based functions to either resolve or reject the Deferred after a random interval. Whichever one fires first "wins" and will call one of the callbacks. The second timeout has no effect since the Deferred is already complete (in a resolved or rejected state) from the first timeout action. Also set a timer-based progress notification function, and call a progress handler that adds "working..." to the document body. ++// ```javascript ++// function asyncEvent() { ++// var dfd = jQuery.Deferred(); ++// ​ ++// // Resolve after a random interval ++// setTimeout(function() { ++// dfd.resolve( "hurray" ); ++// }, Math.floor( 400 + Math.random() * 2000 ) ); ++// ​ ++// // Reject after a random interval ++// setTimeout(function() { ++// dfd.reject( "sorry" ); ++// }, Math.floor( 400 + Math.random() * 2000 ) ); ++// ​ ++// // Show a "working..." message every half-second ++// setTimeout(function working() { ++// if ( dfd.state() === "pending" ) { ++// dfd.notify( "working... " ); ++// setTimeout( working, 500 ); ++// } ++// }, 1 ); ++// ​ ++// // Return the Promise so caller can't change the Deferred ++// return dfd.promise(); ++// } ++// ​ ++// // Attach a done, fail, and progress handler for the asyncEvent ++// $.when( asyncEvent() ).then( ++// function( status ) { ++// alert( status + ", things are going well" ); ++// }, ++// function( status ) { ++// alert( status + ", you fail this time" ); ++// }, ++// function( status ) { ++// $( "body" ).append( status ); ++// } ++// ); ++// ``` ++// */ ++// promise(target: TTarget): this & TTarget; ++// /** ++// * Return a Deferred's Promise object. ++// * @see \`{@link https://api.jquery.com/deferred.promise/ }\` ++// * @since 1.5 ++// * @example ​ ````Use the target argument to promote an existing object to a Promise: ++// ```javascript ++// // Existing object ++// var obj = { ++// hello: function( name ) { ++// alert( "Hello " + name ); ++// } ++// }, ++// // Create a Deferred ++// defer = $.Deferred(); ++// ​ ++// // Set object as a promise ++// defer.promise( obj ); ++// ​ ++// // Resolve the deferred ++// defer.resolve( "John" ); ++// ​ ++// // Use the object as a Promise ++// obj.done(function( name ) { ++// obj.hello( name ); // Will alert "Hello John" ++// }).hello( "Karl" ); // Will alert "Hello Karl" ++// ``` ++// */ ++// promise(): this; ++// /** ++// * Determine the current state of a Deferred object. ++// * @see \`{@link https://api.jquery.com/deferred.state/ }\` ++// * @since 1.7 ++// */ ++// state(): 'pending' | 'resolved' | 'rejected'; ++ ++// // region pipe ++// // #region pipe ++ ++// /** ++// * Utility method to filter and/or chain Deferreds. ++// * @param doneFilter An optional function that is called when the Deferred is resolved. ++// * @param failFilter An optional function that is called when the Deferred is rejected. ++// * @param progressFilter An optional function that is called when progress notifications are sent to the Deferred. ++// * @see \`{@link https://api.jquery.com/deferred.pipe/ }\` ++// * @since 1.6 ++// * @since 1.7 ++// * @deprecated ​ Deprecated since 1.8. Use \`{@link then }\`. ++// * ++// * **Cause**: The `.pipe()` method on a `jQuery.Deferred` object was deprecated as of jQuery 1.8, when the `.then()` method was changed to perform the same function. ++// * ++// * **Solution**: In most cases it is sufficient to change all occurrences of `.pipe()` to `.then()`. Ensure that you aren't relying on context/state propagation (e.g., using `this`) or synchronous callback invocation, which were dropped from `.then()` for Promises/A+ interoperability as of jQuery 3.0. ++// * @example ​ ````Filter resolve value: ++// ```javascript ++// var defer = $.Deferred(), ++// filtered = defer.pipe(function( value ) { ++// return value * 2; ++// }); ++// ​ ++// defer.resolve( 5 ); ++// filtered.done(function( value ) { ++// alert( "Value is ( 2*5 = ) 10: " + value ); ++// }); ++// ``` ++// * @example ​ ````Filter reject value: ++// ```javascript ++// var defer = $.Deferred(), ++// filtered = defer.pipe( null, function( value ) { ++// return value * 3; ++// }); ++// ​ ++// defer.reject( 6 ); ++// filtered.fail(function( value ) { ++// alert( "Value is ( 3*6 = ) 18: " + value ); ++// }); ++// ``` ++// * @example ​ ````Chain tasks: ++// ```javascript ++// var request = $.ajax( url, { dataType: "json" } ), ++// chained = request.pipe(function( data ) { ++// return $.ajax( url2, { data: { user: data.userId } } ); ++// }); ++// ​ ++// chained.done(function( data ) { ++// // data retrieved from url2 as provided by the first request ++// }); ++// ``` ++// */ ++// pipe( ++// doneFilter: (t: TR, u: UR, v: VR, ...s: SR[]) => PromiseBase | Thenable | ARD, ++// failFilter: (t: TJ, u: UJ, v: VJ, ...s: SJ[]) => PromiseBase | Thenable | AJF, ++// progressFilter: (t: TN, u: UN, v: VN, ...s: SN[]) => PromiseBase | Thenable | ANP): PromiseBase; ++// /** ++// * Utility method to filter and/or chain Deferreds. ++// * @param doneFilter An optional function that is called when the Deferred is resolved. ++// * @param failFilter An optional function that is called when the Deferred is rejected. ++// * @param progressFilter An optional function that is called when progress notifications are sent to the Deferred. ++// * @see \`{@link https://api.jquery.com/deferred.pipe/ }\` ++// * @since 1.6 ++// * @since 1.7 ++// * @deprecated ​ Deprecated since 1.8. Use \`{@link then }\`. ++// * ++// * **Cause**: The `.pipe()` method on a `jQuery.Deferred` object was deprecated as of jQuery 1.8, when the `.then()` method was changed to perform the same function. ++// * ++// * **Solution**: In most cases it is sufficient to change all occurrences of `.pipe()` to `.then()`. Ensure that you aren't relying on context/state propagation (e.g., using `this`) or synchronous callback invocation, which were dropped from `.then()` for Promises/A+ interoperability as of jQuery 3.0. ++// * @example ​ ````Filter reject value: ++// ```javascript ++// var defer = $.Deferred(), ++// filtered = defer.pipe( null, function( value ) { ++// return value * 3; ++// }); ++// ​ ++// defer.reject( 6 ); ++// filtered.fail(function( value ) { ++// alert( "Value is ( 3*6 = ) 18: " + value ); ++// }); ++// ``` ++// * @example ​ ````Chain tasks: ++// ```javascript ++// var request = $.ajax( url, { dataType: "json" } ), ++// chained = request.pipe(function( data ) { ++// return $.ajax( url2, { data: { user: data.userId } } ); ++// }); ++// ​ ++// chained.done(function( data ) { ++// // data retrieved from url2 as provided by the first request ++// }); ++// ``` ++// */ ++// pipe( ++// doneFilter: null, ++// failFilter: (t: TJ, u: UJ, v: VJ, ...s: SJ[]) => PromiseBase | Thenable | AJF, ++// progressFilter: (t: TN, u: UN, v: VN, ...s: SN[]) => PromiseBase | Thenable | ANP): PromiseBase; ++// /** ++// * Utility method to filter and/or chain Deferreds. ++// * @param doneFilter An optional function that is called when the Deferred is resolved. ++// * @param failFilter An optional function that is called when the Deferred is rejected. ++// * @param progressFilter An optional function that is called when progress notifications are sent to the Deferred. ++// * @see \`{@link https://api.jquery.com/deferred.pipe/ }\` ++// * @since 1.6 ++// * @since 1.7 ++// * @deprecated ​ Deprecated since 1.8. Use \`{@link then }\`. ++// * ++// * **Cause**: The `.pipe()` method on a `jQuery.Deferred` object was deprecated as of jQuery 1.8, when the `.then()` method was changed to perform the same function. ++// * ++// * **Solution**: In most cases it is sufficient to change all occurrences of `.pipe()` to `.then()`. Ensure that you aren't relying on context/state propagation (e.g., using `this`) or synchronous callback invocation, which were dropped from `.then()` for Promises/A+ interoperability as of jQuery 3.0. ++// * @example ​ ````Filter resolve value: ++// ```javascript ++// var defer = $.Deferred(), ++// filtered = defer.pipe(function( value ) { ++// return value * 2; ++// }); ++// ​ ++// defer.resolve( 5 ); ++// filtered.done(function( value ) { ++// alert( "Value is ( 2*5 = ) 10: " + value ); ++// }); ++// ``` ++// * @example ​ ````Chain tasks: ++// ```javascript ++// var request = $.ajax( url, { dataType: "json" } ), ++// chained = request.pipe(function( data ) { ++// return $.ajax( url2, { data: { user: data.userId } } ); ++// }); ++// ​ ++// chained.done(function( data ) { ++// // data retrieved from url2 as provided by the first request ++// }); ++// ``` ++// */ ++// pipe( ++// doneFilter: (t: TR, u: UR, v: VR, ...s: SR[]) => PromiseBase | Thenable | ARD, ++// failFilter: null, ++// progressFilter: (t: TN, u: UN, v: VN, ...s: SN[]) => PromiseBase | Thenable | ANP): PromiseBase; ++// /** ++// * Utility method to filter and/or chain Deferreds. ++// * @param doneFilter An optional function that is called when the Deferred is resolved. ++// * @param failFilter An optional function that is called when the Deferred is rejected. ++// * @param progressFilter An optional function that is called when progress notifications are sent to the Deferred. ++// * @see \`{@link https://api.jquery.com/deferred.pipe/ }\` ++// * @since 1.6 ++// * @since 1.7 ++// * @deprecated ​ Deprecated since 1.8. Use \`{@link then }\`. ++// * ++// * **Cause**: The `.pipe()` method on a `jQuery.Deferred` object was deprecated as of jQuery 1.8, when the `.then()` method was changed to perform the same function. ++// * ++// * **Solution**: In most cases it is sufficient to change all occurrences of `.pipe()` to `.then()`. Ensure that you aren't relying on context/state propagation (e.g., using `this`) or synchronous callback invocation, which were dropped from `.then()` for Promises/A+ interoperability as of jQuery 3.0. ++// * @example ​ ````Chain tasks: ++// ```javascript ++// var request = $.ajax( url, { dataType: "json" } ), ++// chained = request.pipe(function( data ) { ++// return $.ajax( url2, { data: { user: data.userId } } ); ++// }); ++// ​ ++// chained.done(function( data ) { ++// // data retrieved from url2 as provided by the first request ++// }); ++// ``` ++// */ ++// pipe( ++// doneFilter: null, ++// failFilter: null, ++// progressFilter?: (t: TN, u: UN, v: VN, ...s: SN[]) => PromiseBase | Thenable | ANP): PromiseBase; ++// /** ++// * Utility method to filter and/or chain Deferreds. ++// * @param doneFilter An optional function that is called when the Deferred is resolved. ++// * @param failFilter An optional function that is called when the Deferred is rejected. ++// * @param progressFilter An optional function that is called when progress notifications are sent to the Deferred. ++// * @see \`{@link https://api.jquery.com/deferred.pipe/ }\` ++// * @since 1.6 ++// * @since 1.7 ++// * @deprecated ​ Deprecated since 1.8. Use \`{@link then }\`. ++// * ++// * **Cause**: The `.pipe()` method on a `jQuery.Deferred` object was deprecated as of jQuery 1.8, when the `.then()` method was changed to perform the same function. ++// * ++// * **Solution**: In most cases it is sufficient to change all occurrences of `.pipe()` to `.then()`. Ensure that you aren't relying on context/state propagation (e.g., using `this`) or synchronous callback invocation, which were dropped from `.then()` for Promises/A+ interoperability as of jQuery 3.0. ++// * @example ​ ````Filter resolve value: ++// ```javascript ++// var defer = $.Deferred(), ++// filtered = defer.pipe(function( value ) { ++// return value * 2; ++// }); ++// ​ ++// defer.resolve( 5 ); ++// filtered.done(function( value ) { ++// alert( "Value is ( 2*5 = ) 10: " + value ); ++// }); ++// ``` ++// * @example ​ ````Filter reject value: ++// ```javascript ++// var defer = $.Deferred(), ++// filtered = defer.pipe( null, function( value ) { ++// return value * 3; ++// }); ++// ​ ++// defer.reject( 6 ); ++// filtered.fail(function( value ) { ++// alert( "Value is ( 3*6 = ) 18: " + value ); ++// }); ++// ``` ++// * @example ​ ````Chain tasks: ++// ```javascript ++// var request = $.ajax( url, { dataType: "json" } ), ++// chained = request.pipe(function( data ) { ++// return $.ajax( url2, { data: { user: data.userId } } ); ++// }); ++// ​ ++// chained.done(function( data ) { ++// // data retrieved from url2 as provided by the first request ++// }); ++// ``` ++// */ ++// pipe( ++// doneFilter: (t: TR, u: UR, v: VR, ...s: SR[]) => PromiseBase | Thenable | ARD, ++// failFilter: (t: TJ, u: UJ, v: VJ, ...s: SJ[]) => PromiseBase | Thenable | AJF, ++// progressFilter?: null): PromiseBase; ++// /** ++// * Utility method to filter and/or chain Deferreds. ++// * @param doneFilter An optional function that is called when the Deferred is resolved. ++// * @param failFilter An optional function that is called when the Deferred is rejected. ++// * @param progressFilter An optional function that is called when progress notifications are sent to the Deferred. ++// * @see \`{@link https://api.jquery.com/deferred.pipe/ }\` ++// * @since 1.6 ++// * @since 1.7 ++// * @deprecated ​ Deprecated since 1.8. Use \`{@link then }\`. ++// * ++// * **Cause**: The `.pipe()` method on a `jQuery.Deferred` object was deprecated as of jQuery 1.8, when the `.then()` method was changed to perform the same function. ++// * ++// * **Solution**: In most cases it is sufficient to change all occurrences of `.pipe()` to `.then()`. Ensure that you aren't relying on context/state propagation (e.g., using `this`) or synchronous callback invocation, which were dropped from `.then()` for Promises/A+ interoperability as of jQuery 3.0. ++// * @example ​ ````Filter reject value: ++// ```javascript ++// var defer = $.Deferred(), ++// filtered = defer.pipe( null, function( value ) { ++// return value * 3; ++// }); ++// ​ ++// defer.reject( 6 ); ++// filtered.fail(function( value ) { ++// alert( "Value is ( 3*6 = ) 18: " + value ); ++// }); ++// ``` ++// * @example ​ ````Chain tasks: ++// ```javascript ++// var request = $.ajax( url, { dataType: "json" } ), ++// chained = request.pipe(function( data ) { ++// return $.ajax( url2, { data: { user: data.userId } } ); ++// }); ++// ​ ++// chained.done(function( data ) { ++// // data retrieved from url2 as provided by the first request ++// }); ++// ``` ++// */ ++// pipe( ++// doneFilter: null, ++// failFilter: (t: TJ, u: UJ, v: VJ, ...s: SJ[]) => PromiseBase | Thenable | AJF, ++// progressFilter?: null): PromiseBase; ++// /** ++// * Utility method to filter and/or chain Deferreds. ++// * @param doneFilter An optional function that is called when the Deferred is resolved. ++// * @param failFilter An optional function that is called when the Deferred is rejected. ++// * @param progressFilter An optional function that is called when progress notifications are sent to the Deferred. ++// * @see \`{@link https://api.jquery.com/deferred.pipe/ }\` ++// * @since 1.6 ++// * @since 1.7 ++// * @deprecated ​ Deprecated since 1.8. Use \`{@link then }\`. ++// * ++// * **Cause**: The `.pipe()` method on a `jQuery.Deferred` object was deprecated as of jQuery 1.8, when the `.then()` method was changed to perform the same function. ++// * ++// * **Solution**: In most cases it is sufficient to change all occurrences of `.pipe()` to `.then()`. Ensure that you aren't relying on context/state propagation (e.g., using `this`) or synchronous callback invocation, which were dropped from `.then()` for Promises/A+ interoperability as of jQuery 3.0. ++// * @example ​ ````Filter resolve value: ++// ```javascript ++// var defer = $.Deferred(), ++// filtered = defer.pipe(function( value ) { ++// return value * 2; ++// }); ++// ​ ++// defer.resolve( 5 ); ++// filtered.done(function( value ) { ++// alert( "Value is ( 2*5 = ) 10: " + value ); ++// }); ++// ``` ++// * @example ​ ````Chain tasks: ++// ```javascript ++// var request = $.ajax( url, { dataType: "json" } ), ++// chained = request.pipe(function( data ) { ++// return $.ajax( url2, { data: { user: data.userId } } ); ++// }); ++// ​ ++// chained.done(function( data ) { ++// // data retrieved from url2 as provided by the first request ++// }); ++// ``` ++// */ ++// pipe( ++// doneFilter: (t: TR, u: UR, v: VR, ...s: SR[]) => PromiseBase | Thenable | ARD, ++// failFilter?: null, ++// progressFilter?: null): PromiseBase; ++ ++// // #endregion ++ ++// // region then ++// // #region then ++ ++// /** ++// * Add handlers to be called when the Deferred object is resolved, rejected, or still in progress. ++// * @param doneFilter An optional function that is called when the Deferred is resolved. ++// * @param failFilter An optional function that is called when the Deferred is rejected. ++// * @param progressFilter An optional function that is called when progress notifications are sent to the Deferred. ++// * @see \`{@link https://api.jquery.com/deferred.then/ }\` ++// * @since 1.8 ++// * @example ​ ````Since the jQuery.get method returns a jqXHR object, which is derived from a Deferred object, we can attach handlers using the .then method. ++// ```javascript ++// $.get( "test.php" ).then( ++// function() { ++// alert( "$.get succeeded" ); ++// }, function() { ++// alert( "$.get failed!" ); ++// } ++// ); ++// ``` ++// * @example ​ ````Filter the resolve value: ++// ```html ++// ++// ++// ++// ++// deferred.then demo ++// ++// ++// ++// ​ ++// ++//

        ++// ​ ++// ++// ​ ++// ++// ++// ``` ++// * @example ​ ````Filter reject value: ++// ```javascript ++// var defer = $.Deferred(), ++// filtered = defer.then( null, function( value ) { ++// return value * 3; ++// }); ++// ​ ++// defer.reject( 6 ); ++// filtered.fail(function( value ) { ++// alert( "Value is ( 3*6 = ) 18: " + value ); ++// }); ++// ``` ++// * @example ​ ````Chain tasks: ++// ```javascript ++// var request = $.ajax( url, { dataType: "json" } ), ++// chained = request.then(function( data ) { ++// return $.ajax( url2, { data: { user: data.userId } } ); ++// }); ++// ​ ++// chained.done(function( data ) { ++// // data retrieved from url2 as provided by the first request ++// }); ++// ``` ++// */ ++// then( ++// doneFilter: (t: TR, u: UR, v: VR, ...s: SR[]) => PromiseBase | Thenable | ARD, ++// failFilter: (t: TJ, u: UJ, v: VJ, ...s: SJ[]) => PromiseBase | Thenable | ARF, ++// progressFilter: (t: TN, u: UN, v: VN, ...s: SN[]) => PromiseBase | Thenable | ANP): PromiseBase; ++// /** ++// * Add handlers to be called when the Deferred object is resolved, rejected, or still in progress. ++// * @param doneFilter An optional function that is called when the Deferred is resolved. ++// * @param failFilter An optional function that is called when the Deferred is rejected. ++// * @param progressFilter An optional function that is called when progress notifications are sent to the Deferred. ++// * @see \`{@link https://api.jquery.com/deferred.then/ }\` ++// * @since 1.8 ++// * @example ​ ````Filter reject value: ++// ```javascript ++// var defer = $.Deferred(), ++// filtered = defer.then( null, function( value ) { ++// return value * 3; ++// }); ++// ​ ++// defer.reject( 6 ); ++// filtered.fail(function( value ) { ++// alert( "Value is ( 3*6 = ) 18: " + value ); ++// }); ++// ``` ++// * @example ​ ````Chain tasks: ++// ```javascript ++// var request = $.ajax( url, { dataType: "json" } ), ++// chained = request.then(function( data ) { ++// return $.ajax( url2, { data: { user: data.userId } } ); ++// }); ++// ​ ++// chained.done(function( data ) { ++// // data retrieved from url2 as provided by the first request ++// }); ++// ``` ++// */ ++// then( ++// doneFilter: null, ++// failFilter: (t: TJ, u: UJ, v: VJ, ...s: SJ[]) => PromiseBase | Thenable | ARF, ++// progressFilter: (t: TN, u: UN, v: VN, ...s: SN[]) => PromiseBase | Thenable | ANP): PromiseBase; ++// /** ++// * Add handlers to be called when the Deferred object is resolved, rejected, or still in progress. ++// * @param doneFilter An optional function that is called when the Deferred is resolved. ++// * @param failFilter An optional function that is called when the Deferred is rejected. ++// * @param progressFilter An optional function that is called when progress notifications are sent to the Deferred. ++// * @see \`{@link https://api.jquery.com/deferred.then/ }\` ++// * @since 1.8 ++// * @example ​ ````Filter the resolve value: ++// ```html ++// ++// ++// ++// ++// deferred.then demo ++// ++// ++// ++// ​ ++// ++//

        ++// ​ ++// ++// ​ ++// ++// ++// ``` ++// * @example ​ ````Chain tasks: ++// ```javascript ++// var request = $.ajax( url, { dataType: "json" } ), ++// chained = request.then(function( data ) { ++// return $.ajax( url2, { data: { user: data.userId } } ); ++// }); ++// ​ ++// chained.done(function( data ) { ++// // data retrieved from url2 as provided by the first request ++// }); ++// ``` ++// */ ++// then( ++// doneFilter: (t: TR, u: UR, v: VR, ...s: SR[]) => PromiseBase | Thenable | ARD, ++// failFilter: null, ++// progressFilter: (t: TN, u: UN, v: VN, ...s: SN[]) => PromiseBase | Thenable | ANP): PromiseBase; ++// /** ++// * Add handlers to be called when the Deferred object is resolved, rejected, or still in progress. ++// * @param doneFilter An optional function that is called when the Deferred is resolved. ++// * @param failFilter An optional function that is called when the Deferred is rejected. ++// * @param progressFilter An optional function that is called when progress notifications are sent to the Deferred. ++// * @see \`{@link https://api.jquery.com/deferred.then/ }\` ++// * @since 1.8 ++// * @example ​ ````Chain tasks: ++// ```javascript ++// var request = $.ajax( url, { dataType: "json" } ), ++// chained = request.then(function( data ) { ++// return $.ajax( url2, { data: { user: data.userId } } ); ++// }); ++// ​ ++// chained.done(function( data ) { ++// // data retrieved from url2 as provided by the first request ++// }); ++// ``` ++// */ ++// then( ++// doneFilter: null, ++// failFilter: null, ++// progressFilter?: (t: TN, u: UN, v: VN, ...s: SN[]) => PromiseBase | Thenable | ANP): PromiseBase; ++// /** ++// * Add handlers to be called when the Deferred object is resolved, rejected, or still in progress. ++// * @param doneFilter An optional function that is called when the Deferred is resolved. ++// * @param failFilter An optional function that is called when the Deferred is rejected. ++// * @param progressFilter An optional function that is called when progress notifications are sent to the Deferred. ++// * @see \`{@link https://api.jquery.com/deferred.then/ }\` ++// * @since 1.8 ++// * @example ​ ````Since the jQuery.get method returns a jqXHR object, which is derived from a Deferred object, we can attach handlers using the .then method. ++// ```javascript ++// $.get( "test.php" ).then( ++// function() { ++// alert( "$.get succeeded" ); ++// }, function() { ++// alert( "$.get failed!" ); ++// } ++// ); ++// ``` ++// * @example ​ ````Filter the resolve value: ++// ```html ++// ++// ++// ++// ++// deferred.then demo ++// ++// ++// ++// ​ ++// ++//

        ++// ​ ++// ++// ​ ++// ++// ++// ``` ++// * @example ​ ````Filter reject value: ++// ```javascript ++// var defer = $.Deferred(), ++// filtered = defer.then( null, function( value ) { ++// return value * 3; ++// }); ++// ​ ++// defer.reject( 6 ); ++// filtered.fail(function( value ) { ++// alert( "Value is ( 3*6 = ) 18: " + value ); ++// }); ++// ``` ++// * @example ​ ````Chain tasks: ++// ```javascript ++// var request = $.ajax( url, { dataType: "json" } ), ++// chained = request.then(function( data ) { ++// return $.ajax( url2, { data: { user: data.userId } } ); ++// }); ++// ​ ++// chained.done(function( data ) { ++// // data retrieved from url2 as provided by the first request ++// }); ++// ``` ++// */ ++// then( ++// doneFilter: (t: TR, u: UR, v: VR, ...s: SR[]) => PromiseBase | Thenable | ARD, ++// failFilter: (t: TJ, u: UJ, v: VJ, ...s: SJ[]) => PromiseBase | Thenable | ARF, ++// progressFilter?: null): PromiseBase; ++// /** ++// * Add handlers to be called when the Deferred object is resolved, rejected, or still in progress. ++// * @param doneFilter An optional function that is called when the Deferred is resolved. ++// * @param failFilter An optional function that is called when the Deferred is rejected. ++// * @param progressFilter An optional function that is called when progress notifications are sent to the Deferred. ++// * @see \`{@link https://api.jquery.com/deferred.then/ }\` ++// * @since 1.8 ++// * @example ​ ````Filter reject value: ++// ```javascript ++// var defer = $.Deferred(), ++// filtered = defer.then( null, function( value ) { ++// return value * 3; ++// }); ++// ​ ++// defer.reject( 6 ); ++// filtered.fail(function( value ) { ++// alert( "Value is ( 3*6 = ) 18: " + value ); ++// }); ++// ``` ++// * @example ​ ````Chain tasks: ++// ```javascript ++// var request = $.ajax( url, { dataType: "json" } ), ++// chained = request.then(function( data ) { ++// return $.ajax( url2, { data: { user: data.userId } } ); ++// }); ++// ​ ++// chained.done(function( data ) { ++// // data retrieved from url2 as provided by the first request ++// }); ++// ``` ++// */ ++// then( ++// doneFilter: null, ++// failFilter: (t: TJ, u: UJ, v: VJ, ...s: SJ[]) => PromiseBase | Thenable | ARF, ++// progressFilter?: null): PromiseBase; ++// /** ++// * Add handlers to be called when the Deferred object is resolved, rejected, or still in progress. ++// * @param doneFilter An optional function that is called when the Deferred is resolved. ++// * @param failFilter An optional function that is called when the Deferred is rejected. ++// * @param progressFilter An optional function that is called when progress notifications are sent to the Deferred. ++// * @see \`{@link https://api.jquery.com/deferred.then/ }\` ++// * @since 1.8 ++// * @example ​ ````Filter the resolve value: ++// ```html ++// ++// ++// ++// ++// deferred.then demo ++// ++// ++// ++// ​ ++// ++//

        ++// ​ ++// ++// ​ ++// ++// ++// ``` ++// * @example ​ ````Chain tasks: ++// ```javascript ++// var request = $.ajax( url, { dataType: "json" } ), ++// chained = request.then(function( data ) { ++// return $.ajax( url2, { data: { user: data.userId } } ); ++// }); ++// ​ ++// chained.done(function( data ) { ++// // data retrieved from url2 as provided by the first request ++// }); ++// ``` ++// */ ++// then( ++// doneFilter: (t: TR, u: UR, v: VR, ...s: SR[]) => PromiseBase | Thenable | ARD, ++// failFilter?: null, ++// progressFilter?: null): PromiseBase; ++ ++// // #endregion ++ ++// /** ++// * Add handlers to be called when the Deferred object is rejected. ++// * @param failFilter A function that is called when the Deferred is rejected. ++// * @see \`{@link https://api.jquery.com/deferred.catch/ }\` ++// * @since 3.0 ++// * @example ​ ````Since the jQuery.get method returns a jqXHR object, which is derived from a Deferred object, we can rejection handlers using the .catch method. ++// ```javascript ++// $.get( "test.php" ) ++// .then( function() { ++// alert( "$.get succeeded" ); ++// } ) ++// .catch( function() { ++// alert( "$.get failed!" ); ++// } ); ++// ``` ++// */ ++// catch( ++// failFilter?: ((t: TJ, u: UJ, v: VJ, ...s: SJ[]) => PromiseBase | Thenable | ARF) | null): PromiseBase; ++// } ++ ++// /** ++// * This object provides a subset of the methods of the Deferred object (then, done, fail, always, pipe, progress, state and promise) to prevent users from changing the state of the Deferred. ++// * @see \`{@link https://api.jquery.com/Types/#Promise }\` ++// */ ++// interface Promise3 extends PromiseBase { } ++ ++// /** ++// * This object provides a subset of the methods of the Deferred object (then, done, fail, always, pipe, progress, state and promise) to prevent users from changing the state of the Deferred. ++// * @see \`{@link https://api.jquery.com/Types/#Promise }\` ++// */ ++// interface Promise2 extends PromiseBase { } ++ ++// /** ++// * This object provides a subset of the methods of the Deferred object (then, done, fail, always, pipe, progress, state and promise) to prevent users from changing the state of the Deferred. ++// * @see \`{@link https://api.jquery.com/Types/#Promise }\` ++// */ ++// interface Promise extends PromiseBase { } ++ ++// interface DeferredStatic { ++// // https://jquery.com/upgrade-guide/3.0/#callback-exit ++// exceptionHook: any; ++// /** ++// * A factory function that returns a chainable utility object with methods to register multiple callbacks into callback queues, invoke callback queues, and relay the success or failure state of any synchronous or asynchronous function. ++// * @param beforeStart A function that is called just before the constructor returns. ++// * @see \`{@link https://api.jquery.com/jQuery.Deferred/ }\` ++// * @since 1.5 ++// */ ++// (beforeStart?: (this: Deferred, deferred: Deferred) => void): Deferred; ++// } ++ ++// interface Deferred { ++// /** ++// * Call the progressCallbacks on a Deferred object with the given args. ++// * @param args Optional arguments that are passed to the progressCallbacks. ++// * @see \`{@link https://api.jquery.com/deferred.notify/ }\` ++// * @since 1.7 ++// */ ++// notify(...args: TN[]): this; ++// /** ++// * Call the progressCallbacks on a Deferred object with the given context and args. ++// * @param context Context passed to the progressCallbacks as the this object. ++// * @param args An optional array of arguments that are passed to the progressCallbacks. ++// * @see \`{@link https://api.jquery.com/deferred.notifyWith/ }\` ++// * @since 1.7 ++// */ ++// notifyWith(context: object, args?: ArrayLike): this; ++// /** ++// * Reject a Deferred object and call any failCallbacks with the given args. ++// * @param args Optional arguments that are passed to the failCallbacks. ++// * @see \`{@link https://api.jquery.com/deferred.reject/ }\` ++// * @since 1.5 ++// */ ++// reject(...args: TJ[]): this; ++// /** ++// * Reject a Deferred object and call any failCallbacks with the given context and args. ++// * @param context Context passed to the failCallbacks as the this object. ++// * @param args An optional array of arguments that are passed to the failCallbacks. ++// * @see \`{@link https://api.jquery.com/deferred.rejectWith/ }\` ++// * @since 1.5 ++// */ ++// rejectWith(context: object, args?: ArrayLike): this; ++// /** ++// * Resolve a Deferred object and call any doneCallbacks with the given args. ++// * @param args Optional arguments that are passed to the doneCallbacks. ++// * @see \`{@link https://api.jquery.com/deferred.resolve/ }\` ++// * @since 1.5 ++// */ ++// resolve(...args: TR[]): this; ++// /** ++// * Resolve a Deferred object and call any doneCallbacks with the given context and args. ++// * @param context Context passed to the doneCallbacks as the this object. ++// * @param args An optional array of arguments that are passed to the doneCallbacks. ++// * @see \`{@link https://api.jquery.com/deferred.resolveWith/ }\` ++// * @since 1.5 ++// */ ++// resolveWith(context: object, args?: ArrayLike): this; ++ ++// /** ++// * Add handlers to be called when the Deferred object is either resolved or rejected. ++// * @param alwaysCallback A function, or array of functions, that is called when the Deferred is resolved or rejected. ++// * @param alwaysCallbacks Optional additional functions, or arrays of functions, that are called when the Deferred is resolved or rejected. ++// * @see \`{@link https://api.jquery.com/deferred.always/ }\` ++// * @since 1.6 ++// * @example ​ ````Since the jQuery.get() method returns a jqXHR object, which is derived from a Deferred object, we can attach a callback for both success and error using the deferred.always() method. ++// ```javascript ++// $.get( "test.php" ).always(function() { ++// alert( "$.get completed with success or error callback arguments" ); ++// }); ++// ``` ++// */ ++// always(alwaysCallback: TypeOrArray>, ++// ...alwaysCallbacks: Array>>): this; ++// /** ++// * Add handlers to be called when the Deferred object is resolved. ++// * @param doneCallback A function, or array of functions, that are called when the Deferred is resolved. ++// * @param doneCallbacks Optional additional functions, or arrays of functions, that are called when the Deferred is resolved. ++// * @see \`{@link https://api.jquery.com/deferred.done/ }\` ++// * @since 1.5 ++// * @example ​ ````Since the jQuery.get method returns a jqXHR object, which is derived from a Deferred object, we can attach a success callback using the .done() method. ++// ```javascript ++// $.get( "test.php" ).done(function() { ++// alert( "$.get succeeded" ); ++// }); ++// ``` ++// * @example ​ ````Resolve a Deferred object when the user clicks a button, triggering a number of callback functions: ++// ```html ++// ++// ++// ++// ++// deferred.done demo ++// ++// ++// ++// ​ ++// ++//

        Ready...

        ++// ​ ++// ++// ​ ++// ++// ++// ``` ++// */ ++// done(doneCallback: TypeOrArray>, ++// ...doneCallbacks: Array>>): this; ++// /** ++// * Add handlers to be called when the Deferred object is rejected. ++// * @param failCallback A function, or array of functions, that are called when the Deferred is rejected. ++// * @param failCallbacks Optional additional functions, or arrays of functions, that are called when the Deferred is rejected. ++// * @see \`{@link https://api.jquery.com/deferred.fail/ }\` ++// * @since 1.5 ++// * @example ​ ````Since the jQuery.get method returns a jqXHR object, which is derived from a Deferred, you can attach a success and failure callback using the deferred.done() and deferred.fail() methods. ++// ```javascript ++// $.get( "test.php" ) ++// .done(function() { ++// alert( "$.get succeeded" ); ++// }) ++// .fail(function() { ++// alert( "$.get failed!" ); ++// }); ++// ``` ++// */ ++// fail(failCallback: TypeOrArray>, ++// ...failCallbacks: Array>>): this; ++// /** ++// * Add handlers to be called when the Deferred object generates progress notifications. ++// * @param progressCallback A function, or array of functions, to be called when the Deferred generates progress notifications. ++// * @param progressCallbacks Optional additional functions, or arrays of functions, to be called when the Deferred generates ++// * progress notifications. ++// * @see \`{@link https://api.jquery.com/deferred.progress/ }\` ++// * @since 1.7 ++// */ ++// progress(progressCallback: TypeOrArray>, ++// ...progressCallbacks: Array>>): this; ++// /** ++// * Return a Deferred's Promise object. ++// * @param target Object onto which the promise methods have to be attached ++// * @see \`{@link https://api.jquery.com/deferred.promise/ }\` ++// * @since 1.5 ++// * @example ​ ````Use the target argument to promote an existing object to a Promise: ++// ```javascript ++// // Existing object ++// var obj = { ++// hello: function( name ) { ++// alert( "Hello " + name ); ++// } ++// }, ++// // Create a Deferred ++// defer = $.Deferred(); ++// ​ ++// // Set object as a promise ++// defer.promise( obj ); ++// ​ ++// // Resolve the deferred ++// defer.resolve( "John" ); ++// ​ ++// // Use the object as a Promise ++// obj.done(function( name ) { ++// obj.hello( name ); // Will alert "Hello John" ++// }).hello( "Karl" ); // Will alert "Hello Karl" ++// ``` ++// */ ++// promise(target: TTarget): Promise & TTarget; ++// /** ++// * Return a Deferred's Promise object. ++// * @see \`{@link https://api.jquery.com/deferred.promise/ }\` ++// * @since 1.5 ++// * @example ​ ````Create a Deferred and set two timer-based functions to either resolve or reject the Deferred after a random interval. Whichever one fires first "wins" and will call one of the callbacks. The second timeout has no effect since the Deferred is already complete (in a resolved or rejected state) from the first timeout action. Also set a timer-based progress notification function, and call a progress handler that adds "working..." to the document body. ++// ```javascript ++// function asyncEvent() { ++// var dfd = jQuery.Deferred(); ++// ​ ++// // Resolve after a random interval ++// setTimeout(function() { ++// dfd.resolve( "hurray" ); ++// }, Math.floor( 400 + Math.random() * 2000 ) ); ++// ​ ++// // Reject after a random interval ++// setTimeout(function() { ++// dfd.reject( "sorry" ); ++// }, Math.floor( 400 + Math.random() * 2000 ) ); ++// ​ ++// // Show a "working..." message every half-second ++// setTimeout(function working() { ++// if ( dfd.state() === "pending" ) { ++// dfd.notify( "working... " ); ++// setTimeout( working, 500 ); ++// } ++// }, 1 ); ++// ​ ++// // Return the Promise so caller can't change the Deferred ++// return dfd.promise(); ++// } ++// ​ ++// // Attach a done, fail, and progress handler for the asyncEvent ++// $.when( asyncEvent() ).then( ++// function( status ) { ++// alert( status + ", things are going well" ); ++// }, ++// function( status ) { ++// alert( status + ", you fail this time" ); ++// }, ++// function( status ) { ++// $( "body" ).append( status ); ++// } ++// ); ++// ``` ++// */ ++// promise(): Promise; ++// /** ++// * Determine the current state of a Deferred object. ++// * @see \`{@link https://api.jquery.com/deferred.state/ }\` ++// * @since 1.7 ++// */ ++// state(): 'pending' | 'resolved' | 'rejected'; ++ ++// // region pipe ++// // #region pipe ++ ++// /** ++// * Utility method to filter and/or chain Deferreds. ++// * @param doneFilter An optional function that is called when the Deferred is resolved. ++// * @param failFilter An optional function that is called when the Deferred is rejected. ++// * @param progressFilter An optional function that is called when progress notifications are sent to the Deferred. ++// * @see \`{@link https://api.jquery.com/deferred.pipe/ }\` ++// * @since 1.6 ++// * @since 1.7 ++// * @deprecated ​ Deprecated since 1.8. Use \`{@link then }\`. ++// * ++// * **Cause**: The `.pipe()` method on a `jQuery.Deferred` object was deprecated as of jQuery 1.8, when the `.then()` method was changed to perform the same function. ++// * ++// * **Solution**: In most cases it is sufficient to change all occurrences of `.pipe()` to `.then()`. Ensure that you aren't relying on context/state propagation (e.g., using `this`) or synchronous callback invocation, which were dropped from `.then()` for Promises/A+ interoperability as of jQuery 3.0. ++// * @example ​ ````Filter resolve value: ++// ```javascript ++// var defer = $.Deferred(), ++// filtered = defer.pipe(function( value ) { ++// return value * 2; ++// }); ++// ​ ++// defer.resolve( 5 ); ++// filtered.done(function( value ) { ++// alert( "Value is ( 2*5 = ) 10: " + value ); ++// }); ++// ``` ++// * @example ​ ````Filter reject value: ++// ```javascript ++// var defer = $.Deferred(), ++// filtered = defer.pipe( null, function( value ) { ++// return value * 3; ++// }); ++// ​ ++// defer.reject( 6 ); ++// filtered.fail(function( value ) { ++// alert( "Value is ( 3*6 = ) 18: " + value ); ++// }); ++// ``` ++// * @example ​ ````Chain tasks: ++// ```javascript ++// var request = $.ajax( url, { dataType: "json" } ), ++// chained = request.pipe(function( data ) { ++// return $.ajax( url2, { data: { user: data.userId } } ); ++// }); ++// ​ ++// chained.done(function( data ) { ++// // data retrieved from url2 as provided by the first request ++// }); ++// ``` ++// */ ++// pipe( ++// doneFilter: (...t: TR[]) => PromiseBase | Thenable | ARD, ++// failFilter: (...t: TJ[]) => PromiseBase | Thenable | AJF, ++// progressFilter: (...t: TN[]) => PromiseBase | Thenable | ANP): PromiseBase; ++// /** ++// * Utility method to filter and/or chain Deferreds. ++// * @param doneFilter An optional function that is called when the Deferred is resolved. ++// * @param failFilter An optional function that is called when the Deferred is rejected. ++// * @param progressFilter An optional function that is called when progress notifications are sent to the Deferred. ++// * @see \`{@link https://api.jquery.com/deferred.pipe/ }\` ++// * @since 1.6 ++// * @since 1.7 ++// * @deprecated ​ Deprecated since 1.8. Use \`{@link then }\`. ++// * ++// * **Cause**: The `.pipe()` method on a `jQuery.Deferred` object was deprecated as of jQuery 1.8, when the `.then()` method was changed to perform the same function. ++// * ++// * **Solution**: In most cases it is sufficient to change all occurrences of `.pipe()` to `.then()`. Ensure that you aren't relying on context/state propagation (e.g., using `this`) or synchronous callback invocation, which were dropped from `.then()` for Promises/A+ interoperability as of jQuery 3.0. ++// * @example ​ ````Filter reject value: ++// ```javascript ++// var defer = $.Deferred(), ++// filtered = defer.pipe( null, function( value ) { ++// return value * 3; ++// }); ++// ​ ++// defer.reject( 6 ); ++// filtered.fail(function( value ) { ++// alert( "Value is ( 3*6 = ) 18: " + value ); ++// }); ++// ``` ++// * @example ​ ````Chain tasks: ++// ```javascript ++// var request = $.ajax( url, { dataType: "json" } ), ++// chained = request.pipe(function( data ) { ++// return $.ajax( url2, { data: { user: data.userId } } ); ++// }); ++// ​ ++// chained.done(function( data ) { ++// // data retrieved from url2 as provided by the first request ++// }); ++// ``` ++// */ ++// pipe( ++// doneFilter: null, ++// failFilter: (...t: TJ[]) => PromiseBase | Thenable | AJF, ++// progressFilter: (...t: TN[]) => PromiseBase | Thenable | ANP): PromiseBase; ++// /** ++// * Utility method to filter and/or chain Deferreds. ++// * @param doneFilter An optional function that is called when the Deferred is resolved. ++// * @param failFilter An optional function that is called when the Deferred is rejected. ++// * @param progressFilter An optional function that is called when progress notifications are sent to the Deferred. ++// * @see \`{@link https://api.jquery.com/deferred.pipe/ }\` ++// * @since 1.6 ++// * @since 1.7 ++// * @deprecated ​ Deprecated since 1.8. Use \`{@link then }\`. ++// * ++// * **Cause**: The `.pipe()` method on a `jQuery.Deferred` object was deprecated as of jQuery 1.8, when the `.then()` method was changed to perform the same function. ++// * ++// * **Solution**: In most cases it is sufficient to change all occurrences of `.pipe()` to `.then()`. Ensure that you aren't relying on context/state propagation (e.g., using `this`) or synchronous callback invocation, which were dropped from `.then()` for Promises/A+ interoperability as of jQuery 3.0. ++// * @example ​ ````Filter resolve value: ++// ```javascript ++// var defer = $.Deferred(), ++// filtered = defer.pipe(function( value ) { ++// return value * 2; ++// }); ++// ​ ++// defer.resolve( 5 ); ++// filtered.done(function( value ) { ++// alert( "Value is ( 2*5 = ) 10: " + value ); ++// }); ++// ``` ++// * @example ​ ````Chain tasks: ++// ```javascript ++// var request = $.ajax( url, { dataType: "json" } ), ++// chained = request.pipe(function( data ) { ++// return $.ajax( url2, { data: { user: data.userId } } ); ++// }); ++// ​ ++// chained.done(function( data ) { ++// // data retrieved from url2 as provided by the first request ++// }); ++// ``` ++// */ ++// pipe( ++// doneFilter: (...t: TR[]) => PromiseBase | Thenable | ARD, ++// failFilter: null, ++// progressFilter: (...t: TN[]) => PromiseBase | Thenable | ANP): PromiseBase; ++// /** ++// * Utility method to filter and/or chain Deferreds. ++// * @param doneFilter An optional function that is called when the Deferred is resolved. ++// * @param failFilter An optional function that is called when the Deferred is rejected. ++// * @param progressFilter An optional function that is called when progress notifications are sent to the Deferred. ++// * @see \`{@link https://api.jquery.com/deferred.pipe/ }\` ++// * @since 1.6 ++// * @since 1.7 ++// * @deprecated ​ Deprecated since 1.8. Use \`{@link then }\`. ++// * ++// * **Cause**: The `.pipe()` method on a `jQuery.Deferred` object was deprecated as of jQuery 1.8, when the `.then()` method was changed to perform the same function. ++// * ++// * **Solution**: In most cases it is sufficient to change all occurrences of `.pipe()` to `.then()`. Ensure that you aren't relying on context/state propagation (e.g., using `this`) or synchronous callback invocation, which were dropped from `.then()` for Promises/A+ interoperability as of jQuery 3.0. ++// * @example ​ ````Chain tasks: ++// ```javascript ++// var request = $.ajax( url, { dataType: "json" } ), ++// chained = request.pipe(function( data ) { ++// return $.ajax( url2, { data: { user: data.userId } } ); ++// }); ++// ​ ++// chained.done(function( data ) { ++// // data retrieved from url2 as provided by the first request ++// }); ++// ``` ++// */ ++// pipe( ++// doneFilter: null, ++// failFilter: null, ++// progressFilter?: (...t: TN[]) => PromiseBase | Thenable | ANP): PromiseBase; ++// /** ++// * Utility method to filter and/or chain Deferreds. ++// * @param doneFilter An optional function that is called when the Deferred is resolved. ++// * @param failFilter An optional function that is called when the Deferred is rejected. ++// * @param progressFilter An optional function that is called when progress notifications are sent to the Deferred. ++// * @see \`{@link https://api.jquery.com/deferred.pipe/ }\` ++// * @since 1.6 ++// * @since 1.7 ++// * @deprecated ​ Deprecated since 1.8. Use \`{@link then }\`. ++// * ++// * **Cause**: The `.pipe()` method on a `jQuery.Deferred` object was deprecated as of jQuery 1.8, when the `.then()` method was changed to perform the same function. ++// * ++// * **Solution**: In most cases it is sufficient to change all occurrences of `.pipe()` to `.then()`. Ensure that you aren't relying on context/state propagation (e.g., using `this`) or synchronous callback invocation, which were dropped from `.then()` for Promises/A+ interoperability as of jQuery 3.0. ++// * @example ​ ````Filter resolve value: ++// ```javascript ++// var defer = $.Deferred(), ++// filtered = defer.pipe(function( value ) { ++// return value * 2; ++// }); ++// ​ ++// defer.resolve( 5 ); ++// filtered.done(function( value ) { ++// alert( "Value is ( 2*5 = ) 10: " + value ); ++// }); ++// ``` ++// * @example ​ ````Filter reject value: ++// ```javascript ++// var defer = $.Deferred(), ++// filtered = defer.pipe( null, function( value ) { ++// return value * 3; ++// }); ++// ​ ++// defer.reject( 6 ); ++// filtered.fail(function( value ) { ++// alert( "Value is ( 3*6 = ) 18: " + value ); ++// }); ++// ``` ++// * @example ​ ````Chain tasks: ++// ```javascript ++// var request = $.ajax( url, { dataType: "json" } ), ++// chained = request.pipe(function( data ) { ++// return $.ajax( url2, { data: { user: data.userId } } ); ++// }); ++// ​ ++// chained.done(function( data ) { ++// // data retrieved from url2 as provided by the first request ++// }); ++// ``` ++// */ ++// pipe( ++// doneFilter: (...t: TR[]) => PromiseBase | Thenable | ARD, ++// failFilter: (...t: TJ[]) => PromiseBase | Thenable | AJF, ++// progressFilter?: null): PromiseBase; ++// /** ++// * Utility method to filter and/or chain Deferreds. ++// * @param doneFilter An optional function that is called when the Deferred is resolved. ++// * @param failFilter An optional function that is called when the Deferred is rejected. ++// * @param progressFilter An optional function that is called when progress notifications are sent to the Deferred. ++// * @see \`{@link https://api.jquery.com/deferred.pipe/ }\` ++// * @since 1.6 ++// * @since 1.7 ++// * @deprecated ​ Deprecated since 1.8. Use \`{@link then }\`. ++// * ++// * **Cause**: The `.pipe()` method on a `jQuery.Deferred` object was deprecated as of jQuery 1.8, when the `.then()` method was changed to perform the same function. ++// * ++// * **Solution**: In most cases it is sufficient to change all occurrences of `.pipe()` to `.then()`. Ensure that you aren't relying on context/state propagation (e.g., using `this`) or synchronous callback invocation, which were dropped from `.then()` for Promises/A+ interoperability as of jQuery 3.0. ++// * @example ​ ````Filter reject value: ++// ```javascript ++// var defer = $.Deferred(), ++// filtered = defer.pipe( null, function( value ) { ++// return value * 3; ++// }); ++// ​ ++// defer.reject( 6 ); ++// filtered.fail(function( value ) { ++// alert( "Value is ( 3*6 = ) 18: " + value ); ++// }); ++// ``` ++// * @example ​ ````Chain tasks: ++// ```javascript ++// var request = $.ajax( url, { dataType: "json" } ), ++// chained = request.pipe(function( data ) { ++// return $.ajax( url2, { data: { user: data.userId } } ); ++// }); ++// ​ ++// chained.done(function( data ) { ++// // data retrieved from url2 as provided by the first request ++// }); ++// ``` ++// */ ++// pipe( ++// doneFilter: null, ++// failFilter: (...t: TJ[]) => PromiseBase | Thenable | AJF, ++// progressFilter?: null): PromiseBase; ++// /** ++// * Utility method to filter and/or chain Deferreds. ++// * @param doneFilter An optional function that is called when the Deferred is resolved. ++// * @param failFilter An optional function that is called when the Deferred is rejected. ++// * @param progressFilter An optional function that is called when progress notifications are sent to the Deferred. ++// * @see \`{@link https://api.jquery.com/deferred.pipe/ }\` ++// * @since 1.6 ++// * @since 1.7 ++// * @deprecated ​ Deprecated since 1.8. Use \`{@link then }\`. ++// * ++// * **Cause**: The `.pipe()` method on a `jQuery.Deferred` object was deprecated as of jQuery 1.8, when the `.then()` method was changed to perform the same function. ++// * ++// * **Solution**: In most cases it is sufficient to change all occurrences of `.pipe()` to `.then()`. Ensure that you aren't relying on context/state propagation (e.g., using `this`) or synchronous callback invocation, which were dropped from `.then()` for Promises/A+ interoperability as of jQuery 3.0. ++// * @example ​ ````Filter resolve value: ++// ```javascript ++// var defer = $.Deferred(), ++// filtered = defer.pipe(function( value ) { ++// return value * 2; ++// }); ++// ​ ++// defer.resolve( 5 ); ++// filtered.done(function( value ) { ++// alert( "Value is ( 2*5 = ) 10: " + value ); ++// }); ++// ``` ++// * @example ​ ````Chain tasks: ++// ```javascript ++// var request = $.ajax( url, { dataType: "json" } ), ++// chained = request.pipe(function( data ) { ++// return $.ajax( url2, { data: { user: data.userId } } ); ++// }); ++// ​ ++// chained.done(function( data ) { ++// // data retrieved from url2 as provided by the first request ++// }); ++// ``` ++// */ ++// pipe( ++// doneFilter: (...t: TR[]) => PromiseBase | Thenable | ARD, ++// failFilter?: null, ++// progressFilter?: null): PromiseBase; ++ ++// // #endregion ++ ++// // region then ++// // #region then ++ ++// /** ++// * Add handlers to be called when the Deferred object is resolved, rejected, or still in progress. ++// * @param doneFilter A function that is called when the Deferred is resolved. ++// * @param failFilter An optional function that is called when the Deferred is rejected. ++// * @param progressFilter An optional function that is called when progress notifications are sent to the Deferred. ++// * @see \`{@link https://api.jquery.com/deferred.then/ }\` ++// * @since 1.8 ++// * @example ​ ````Since the jQuery.get method returns a jqXHR object, which is derived from a Deferred object, we can attach handlers using the .then method. ++// ```javascript ++// $.get( "test.php" ).then( ++// function() { ++// alert( "$.get succeeded" ); ++// }, function() { ++// alert( "$.get failed!" ); ++// } ++// ); ++// ``` ++// * @example ​ ````Filter the resolve value: ++// ```html ++// ++// ++// ++// ++// deferred.then demo ++// ++// ++// ++// ​ ++// ++//

        ++// ​ ++// ++// ​ ++// ++// ++// ``` ++// * @example ​ ````Filter reject value: ++// ```javascript ++// var defer = $.Deferred(), ++// filtered = defer.then( null, function( value ) { ++// return value * 3; ++// }); ++// ​ ++// defer.reject( 6 ); ++// filtered.fail(function( value ) { ++// alert( "Value is ( 3*6 = ) 18: " + value ); ++// }); ++// ``` ++// * @example ​ ````Chain tasks: ++// ```javascript ++// var request = $.ajax( url, { dataType: "json" } ), ++// chained = request.then(function( data ) { ++// return $.ajax( url2, { data: { user: data.userId } } ); ++// }); ++// ​ ++// chained.done(function( data ) { ++// // data retrieved from url2 as provided by the first request ++// }); ++// ``` ++// */ ++// then( ++// doneFilter: (...t: TR[]) => PromiseBase | Thenable | ARD, ++// failFilter: (...t: TJ[]) => PromiseBase | Thenable | ARF, ++// progressFilter: (...t: TN[]) => PromiseBase | Thenable | ANP): PromiseBase; ++// /** ++// * Add handlers to be called when the Deferred object is resolved, rejected, or still in progress. ++// * @param doneFilter A function that is called when the Deferred is resolved. ++// * @param failFilter An optional function that is called when the Deferred is rejected. ++// * @param progressFilter An optional function that is called when progress notifications are sent to the Deferred. ++// * @see \`{@link https://api.jquery.com/deferred.then/ }\` ++// * @since 1.8 ++// * @example ​ ````Filter reject value: ++// ```javascript ++// var defer = $.Deferred(), ++// filtered = defer.then( null, function( value ) { ++// return value * 3; ++// }); ++// ​ ++// defer.reject( 6 ); ++// filtered.fail(function( value ) { ++// alert( "Value is ( 3*6 = ) 18: " + value ); ++// }); ++// ``` ++// * @example ​ ````Chain tasks: ++// ```javascript ++// var request = $.ajax( url, { dataType: "json" } ), ++// chained = request.then(function( data ) { ++// return $.ajax( url2, { data: { user: data.userId } } ); ++// }); ++// ​ ++// chained.done(function( data ) { ++// // data retrieved from url2 as provided by the first request ++// }); ++// ``` ++// */ ++// then( ++// doneFilter: null, ++// failFilter: (...t: TJ[]) => PromiseBase | Thenable | ARF, ++// progressFilter: (...t: TN[]) => PromiseBase | Thenable | ANP): PromiseBase; ++// /** ++// * Add handlers to be called when the Deferred object is resolved, rejected, or still in progress. ++// * @param doneFilter A function that is called when the Deferred is resolved. ++// * @param failFilter An optional function that is called when the Deferred is rejected. ++// * @param progressFilter An optional function that is called when progress notifications are sent to the Deferred. ++// * @see \`{@link https://api.jquery.com/deferred.then/ }\` ++// * @since 1.8 ++// * @example ​ ````Filter the resolve value: ++// ```html ++// ++// ++// ++// ++// deferred.then demo ++// ++// ++// ++// ​ ++// ++//

        ++// ​ ++// ++// ​ ++// ++// ++// ``` ++// * @example ​ ````Chain tasks: ++// ```javascript ++// var request = $.ajax( url, { dataType: "json" } ), ++// chained = request.then(function( data ) { ++// return $.ajax( url2, { data: { user: data.userId } } ); ++// }); ++// ​ ++// chained.done(function( data ) { ++// // data retrieved from url2 as provided by the first request ++// }); ++// ``` ++// */ ++// then( ++// doneFilter: (...t: TR[]) => PromiseBase | Thenable | ARD, ++// failFilter: null, ++// progressFilter: (...t: TN[]) => PromiseBase | Thenable | ANP): PromiseBase; ++// /** ++// * Add handlers to be called when the Deferred object is resolved, rejected, or still in progress. ++// * @param doneFilter A function that is called when the Deferred is resolved. ++// * @param failFilter An optional function that is called when the Deferred is rejected. ++// * @param progressFilter An optional function that is called when progress notifications are sent to the Deferred. ++// * @see \`{@link https://api.jquery.com/deferred.then/ }\` ++// * @since 1.8 ++// * @example ​ ````Chain tasks: ++// ```javascript ++// var request = $.ajax( url, { dataType: "json" } ), ++// chained = request.then(function( data ) { ++// return $.ajax( url2, { data: { user: data.userId } } ); ++// }); ++// ​ ++// chained.done(function( data ) { ++// // data retrieved from url2 as provided by the first request ++// }); ++// ``` ++// */ ++// then( ++// doneFilter: null, ++// failFilter: null, ++// progressFilter?: (...t: TN[]) => PromiseBase | Thenable | ANP): PromiseBase; ++// /** ++// * Add handlers to be called when the Deferred object is resolved, rejected, or still in progress. ++// * @param doneFilter An optional function that is called when the Deferred is resolved. ++// * @param failFilter An optional function that is called when the Deferred is rejected. ++// * @param progressFilter An optional function that is called when progress notifications are sent to the Deferred. ++// * @see \`{@link https://api.jquery.com/deferred.then/ }\` ++// * @since 1.8 ++// * @example ​ ````Since the jQuery.get method returns a jqXHR object, which is derived from a Deferred object, we can attach handlers using the .then method. ++// ```javascript ++// $.get( "test.php" ).then( ++// function() { ++// alert( "$.get succeeded" ); ++// }, function() { ++// alert( "$.get failed!" ); ++// } ++// ); ++// ``` ++// * @example ​ ````Filter the resolve value: ++// ```html ++// ++// ++// ++// ++// deferred.then demo ++// ++// ++// ++// ​ ++// ++//

        ++// ​ ++// ++// ​ ++// ++// ++// ``` ++// * @example ​ ````Filter reject value: ++// ```javascript ++// var defer = $.Deferred(), ++// filtered = defer.then( null, function( value ) { ++// return value * 3; ++// }); ++// ​ ++// defer.reject( 6 ); ++// filtered.fail(function( value ) { ++// alert( "Value is ( 3*6 = ) 18: " + value ); ++// }); ++// ``` ++// * @example ​ ````Chain tasks: ++// ```javascript ++// var request = $.ajax( url, { dataType: "json" } ), ++// chained = request.then(function( data ) { ++// return $.ajax( url2, { data: { user: data.userId } } ); ++// }); ++// ​ ++// chained.done(function( data ) { ++// // data retrieved from url2 as provided by the first request ++// }); ++// ``` ++// */ ++// then( ++// doneFilter: (...t: TR[]) => PromiseBase | Thenable | ARD, ++// failFilter: (...t: TJ[]) => PromiseBase | Thenable | ARF, ++// progressFilter?: null): PromiseBase; ++// /** ++// * Add handlers to be called when the Deferred object is resolved, rejected, or still in progress. ++// * @param doneFilter An optional function that is called when the Deferred is resolved. ++// * @param failFilter An optional function that is called when the Deferred is rejected. ++// * @param progressFilter An optional function that is called when progress notifications are sent to the Deferred. ++// * @see \`{@link https://api.jquery.com/deferred.then/ }\` ++// * @since 1.8 ++// * @example ​ ````Filter reject value: ++// ```javascript ++// var defer = $.Deferred(), ++// filtered = defer.then( null, function( value ) { ++// return value * 3; ++// }); ++// ​ ++// defer.reject( 6 ); ++// filtered.fail(function( value ) { ++// alert( "Value is ( 3*6 = ) 18: " + value ); ++// }); ++// ``` ++// * @example ​ ````Chain tasks: ++// ```javascript ++// var request = $.ajax( url, { dataType: "json" } ), ++// chained = request.then(function( data ) { ++// return $.ajax( url2, { data: { user: data.userId } } ); ++// }); ++// ​ ++// chained.done(function( data ) { ++// // data retrieved from url2 as provided by the first request ++// }); ++// ``` ++// */ ++// then( ++// doneFilter: null, ++// failFilter: (...t: TJ[]) => PromiseBase | Thenable | ARF, ++// progressFilter?: null): PromiseBase; ++// /** ++// * Add handlers to be called when the Deferred object is resolved, rejected, or still in progress. ++// * @param doneFilter An optional function that is called when the Deferred is resolved. ++// * @param failFilter An optional function that is called when the Deferred is rejected. ++// * @param progressFilter An optional function that is called when progress notifications are sent to the Deferred. ++// * @see \`{@link https://api.jquery.com/deferred.then/ }\` ++// * @since 1.8 ++// * @example ​ ````Filter the resolve value: ++// ```html ++// ++// ++// ++// ++// deferred.then demo ++// ++// ++// ++// ​ ++// ++//

        ++// ​ ++// ++// ​ ++// ++// ++// ``` ++// * @example ​ ````Chain tasks: ++// ```javascript ++// var request = $.ajax( url, { dataType: "json" } ), ++// chained = request.then(function( data ) { ++// return $.ajax( url2, { data: { user: data.userId } } ); ++// }); ++// ​ ++// chained.done(function( data ) { ++// // data retrieved from url2 as provided by the first request ++// }); ++// ``` ++// */ ++// then( ++// doneFilter: (...t: TR[]) => PromiseBase | Thenable | ARD, ++// failFilter?: null, ++// progressFilter?: null): PromiseBase; ++ ++// // #endregion ++ ++// /** ++// * Add handlers to be called when the Deferred object is rejected. ++// * @param failFilter A function that is called when the Deferred is rejected. ++// * @see \`{@link https://api.jquery.com/deferred.catch/ }\` ++// * @since 3.0 ++// * @example ​ ````Since the jQuery.get method returns a jqXHR object, which is derived from a Deferred object, we can rejection handlers using the .catch method. ++// ```javascript ++// $.get( "test.php" ) ++// .then( function() { ++// alert( "$.get succeeded" ); ++// } ) ++// .catch( function() { ++// alert( "$.get failed!" ); ++// } ); ++// ``` ++// */ ++// catch( ++// failFilter?: ((...t: TJ[]) => PromiseBase | Thenable | ARF) | null): PromiseBase; ++// } ++ ++// namespace Deferred { ++// type CallbackBase = (t: T, u: U, v: V, ...r: R[]) => void; ++ ++// interface Callback3 extends CallbackBase { } ++ ++// type Callback = (...args: T[]) => void; ++ ++// /** ++// * @deprecated ​ Deprecated. Use \`{@link Callback }\`. ++// */ ++// interface DoneCallback extends Callback { } ++ ++// /** ++// * @deprecated ​ Deprecated. Use \`{@link Callback }\`. ++// */ ++// interface FailCallback extends Callback { } ++ ++// /** ++// * @deprecated ​ Deprecated. Use \`{@link Callback }\`. ++// */ ++// interface AlwaysCallback extends Callback { } ++ ++// /** ++// * @deprecated ​ Deprecated. Use \`{@link Callback }\`. ++// */ ++// interface ProgressCallback extends Callback { } ++// } ++ ++// // #endregion ++ ++// // region Effects ++// // #region Effects ++ ++// type Duration = number | 'fast' | 'slow'; ++ ++// /** ++// * @see \`{@link https://api.jquery.com/animate/#animate-properties-options }\` ++// */ ++// interface EffectsOptions extends PlainObject { ++// /** ++// * A function to be called when the animation on an element completes or stops without completing (its Promise object is either resolved or rejected). ++// */ ++// always?(this: TElement, animation: Animation, jumpedToEnd: boolean): void; ++// /** ++// * A function that is called once the animation on an element is complete. ++// */ ++// complete?(this: TElement): void; ++// /** ++// * A function to be called when the animation on an element completes (its Promise object is resolved). ++// */ ++// done?(this: TElement, animation: Animation, jumpedToEnd: boolean): void; ++// /** ++// * A string or number determining how long the animation will run. ++// */ ++// duration?: Duration; ++// /** ++// * A string indicating which easing function to use for the transition. ++// */ ++// easing?: string; ++// /** ++// * A function to be called when the animation on an element fails to complete (its Promise object is rejected). ++// */ ++// fail?(this: TElement, animation: Animation, jumpedToEnd: boolean): void; ++// /** ++// * A function to be called after each step of the animation, only once per animated element regardless of the number of animated properties. ++// */ ++// progress?(this: TElement, animation: Animation, progress: number, remainingMs: number): void; ++// /** ++// * A Boolean indicating whether to place the animation in the effects queue. If false, the animation will begin immediately. As of jQuery 1.7, the queue option can also accept a string, in which case the animation is added to the queue represented by that string. When a custom queue name is used the animation does not automatically start; you must call .dequeue("queuename") to start it. ++// */ ++// queue?: boolean | string; ++// /** ++// * An object containing one or more of the CSS properties defined by the properties argument and their corresponding easing functions. ++// */ ++// specialEasing?: PlainObject; ++// /** ++// * A function to call when the animation on an element begins. ++// */ ++// start?(this: TElement, animation: Animation): void; ++// /** ++// * A function to be called for each animated property of each animated element. This function provides an opportunity to modify the Tween object to change the value of the property before it is set. ++// */ ++// step?(this: TElement, now: number, tween: Tween): void; ++// } ++ ++// // region Animation ++// // #region Animation ++ ++// /** ++// * @see \`{@link https://gist.github.com/gnarf/54829d408993526fe475#animation-factory }\` ++// * @since 1.8 ++// */ ++// interface AnimationStatic { ++// /** ++// * @see \`{@link https://gist.github.com/gnarf/54829d408993526fe475#animation-factory }\` ++// * @since 1.8 ++// */ ++// (element: TElement, props: PlainObject, opts: EffectsOptions): Animation; ++// /** ++// * During the initial setup, `jQuery.Animation` will call any callbacks that have been registered through `jQuery.Animation.prefilter( function( element, props, opts ) )`. ++// * @param callback The prefilter will have `this` set to an animation object, and you can modify any of the `props` or ++// * `opts` however you need. The prefilter _may_ return its own promise which also implements `stop()`, ++// * in which case, processing of prefilters stops. If the prefilter is not trying to override the animation ++// * entirely, it should return `undefined` or some other falsy value. ++// * @see \`{@link https://gist.github.com/gnarf/54829d408993526fe475#prefilters }\` ++// * @since 1.8 ++// */ ++// prefilter( ++// callback: (this: Animation, element: TElement, props: PlainObject, opts: EffectsOptions) => Animation | _Falsy | void, ++// prepend?: boolean ++// ): void; ++// /** ++// * A "Tweener" is a function responsible for creating a tween object, and you might want to override these if you want to implement complex values ( like a clip/transform array matrix ) in a single property. ++// * ++// * You can override the default process for creating a tween in order to provide your own tween object by using `jQuery.Animation.tweener( props, callback( prop, value ) )`. ++// * @param props A space separated list of properties to be passed to your tweener, or `"*"` if it should be called ++// * for all properties. ++// * @param callback The callback will be called with `this` being an `Animation` object. The tweener function will ++// * generally start with `var tween = this.createTween( prop, value );`, but doesn't nessecarily need to ++// * use the `jQuery.Tween()` factory. ++// * @see \`{@link https://gist.github.com/gnarf/54829d408993526fe475#tweeners }\` ++// * @since 1.8 ++// */ ++// tweener(props: string, callback: Tweener): void; ++// } ++ ++// /** ++// * The promise will be resolved when the animation reaches its end, and rejected when terminated early. The context of callbacks attached to the promise will be the element, and the arguments will be the `Animation` object and a boolean `jumpedToEnd` which when true means the animation was stopped with `gotoEnd`, when `undefined` the animation completed naturally. ++// * @see \`{@link https://gist.github.com/gnarf/54829d408993526fe475#animation-factory }\` ++// * @since 1.8 ++// */ ++// interface Animation extends Promise3< ++// Animation, Animation, Animation, ++// true | undefined, false, number, ++// never, never, number ++// > { ++// /** ++// * The duration specified in ms ++// * @see \`{@link https://gist.github.com/gnarf/54829d408993526fe475#animation-factory }\` ++// * @since 1.8 ++// */ ++// duration: number; ++// /** ++// * The element being animatied ++// * @see \`{@link https://gist.github.com/gnarf/54829d408993526fe475#animation-factory }\` ++// * @since 1.8 ++// */ ++// elem: TElement; ++// /** ++// * The final value of each property animating ++// * @see \`{@link https://gist.github.com/gnarf/54829d408993526fe475#animation-factory }\` ++// * @since 1.8 ++// */ ++// props: PlainObject; ++// /** ++// * The animation options ++// * @see \`{@link https://gist.github.com/gnarf/54829d408993526fe475#animation-factory }\` ++// * @since 1.8 ++// */ ++// opts: EffectsOptions; ++// /** ++// * The original properties before being filtered ++// * @see \`{@link https://gist.github.com/gnarf/54829d408993526fe475#animation-factory }\` ++// * @since 1.8 ++// */ ++// originalProps: PlainObject; ++// /** ++// * The original options before being filtered ++// * @see \`{@link https://gist.github.com/gnarf/54829d408993526fe475#animation-factory }\` ++// * @since 1.8 ++// */ ++// originalOpts: EffectsOptions; ++// /** ++// * The numeric value of `new Date()` when the animation began ++// * @see \`{@link https://gist.github.com/gnarf/54829d408993526fe475#animation-factory }\` ++// * @since 1.8 ++// */ ++// startTime: number; ++// /** ++// * The animations tweens. ++// * @see \`{@link https://gist.github.com/gnarf/54829d408993526fe475#animation-factory }\` ++// * @since 1.8 ++// */ ++// tweens: Array>; ++// /** ++// * @see \`{@link https://gist.github.com/gnarf/54829d408993526fe475#animation-factory }\` ++// * @since 1.8 ++// */ ++// createTween(propName: string, finalValue: number): Tween; ++// /** ++// * Stops the animation early, optionally going to the end. ++// * @see \`{@link https://gist.github.com/gnarf/54829d408993526fe475#animation-factory }\` ++// * @since 1.8 ++// */ ++// stop(gotoEnd: boolean): this; ++// } ++ ++// /** ++// * A "Tweener" is a function responsible for creating a tween object, and you might want to override these if you want to implement complex values ( like a clip/transform array matrix ) in a single property. ++// * @see \`{@link https://gist.github.com/gnarf/54829d408993526fe475#tweeners }\` ++// * @since 1.8 ++// */ ++// type Tweener = (this: Animation, propName: string, finalValue: number) => Tween; ++ ++// /** ++// * @see \`{@link https://gist.github.com/gnarf/54829d408993526fe475#tweens }\` ++// * @since 1.8 ++// */ ++// interface TweenStatic { ++// /** ++// * `jQuery.Tween.propHooks[ prop ]` is a hook point that replaces `jQuery.fx.step[ prop ]` (which is being deprecated.) These hooks are used by the tween to get and set values on elements. ++// * @see \`{@link https://gist.github.com/gnarf/54829d408993526fe475#tween-hooks }\` ++// * @since 1.8 ++// * @example ++// ```javascript ++// jQuery.Tween.propHooks[ property ] = { ++// get: function( tween ) { ++// // get tween.prop from tween.elem and return it ++// }, ++// set: function( tween ) { ++// // set tween.prop on tween.elem to tween.now + tween.unit ++// } ++// } ++// ``` ++// */ ++// propHooks: PropHooks; ++// /** ++// * @see \`{@link https://gist.github.com/gnarf/54829d408993526fe475#tweens }\` ++// * @since 1.8 ++// */ ++// (elem: TElement, options: EffectsOptions, prop: string, end: number, easing?: string, unit?: string): Tween; ++// } ++ ++// /** ++// * @see \`{@link https://gist.github.com/gnarf/54829d408993526fe475#tweens }\` ++// * @since 1.8 ++// */ ++// // This should be a class but doesn't work correctly under the JQuery namespace. Tween should be an inner class of jQuery. ++// interface Tween { ++// /** ++// * The easing used ++// * @see \`{@link https://gist.github.com/gnarf/54829d408993526fe475#tweens }\` ++// * @since 1.8 ++// */ ++// easing: string; ++// /** ++// * The element being animated ++// * @see \`{@link https://gist.github.com/gnarf/54829d408993526fe475#tweens }\` ++// * @since 1.8 ++// */ ++// elem: TElement; ++// /** ++// * The ending value of the tween ++// * @see \`{@link https://gist.github.com/gnarf/54829d408993526fe475#tweens }\` ++// * @since 1.8 ++// */ ++// end: number; ++// /** ++// * The current value of the tween ++// * @see \`{@link https://gist.github.com/gnarf/54829d408993526fe475#tweens }\` ++// * @since 1.8 ++// */ ++// now: number; ++// /** ++// * A reference to the animation options ++// * @see \`{@link https://gist.github.com/gnarf/54829d408993526fe475#tweens }\` ++// * @since 1.8 ++// */ ++// options: EffectsOptions; ++// // Undocumented. Is this intended to be public? ++// pos?: number; ++// /** ++// * The property being animated ++// * @see \`{@link https://gist.github.com/gnarf/54829d408993526fe475#tweens }\` ++// * @since 1.8 ++// */ ++// prop: string; ++// /** ++// * The starting value of the tween ++// * @see \`{@link https://gist.github.com/gnarf/54829d408993526fe475#tweens }\` ++// * @since 1.8 ++// */ ++// start: number; ++// /** ++// * The CSS unit for the tween ++// * @see \`{@link https://gist.github.com/gnarf/54829d408993526fe475#tweens }\` ++// * @since 1.8 ++// */ ++// unit: string; ++// /** ++// * Reads the current value for property from the element ++// * @see \`{@link https://gist.github.com/gnarf/54829d408993526fe475#tweens }\` ++// * @since 1.8 ++// */ ++// cur(): any; ++// /** ++// * Updates the value for the property on the animated elemd. ++// * @param progress A number from 0 to 1. ++// * @see \`{@link https://gist.github.com/gnarf/54829d408993526fe475#tweens }\` ++// * @since 1.8 ++// */ ++// run(progress: number): this; ++// } ++ ++// /** ++// * @see \`{@link https://gist.github.com/gnarf/54829d408993526fe475#tween-hooks }\` ++// * @since 1.8 ++// */ ++// // Workaround for TypeScript 2.3 which does not have support for weak types handling. ++// type PropHook = { ++// /** ++// * @see \`{@link https://gist.github.com/gnarf/54829d408993526fe475#tween-hooks }\` ++// * @since 1.8 ++// */ ++// get(tween: Tween): any; ++// } | { ++// /** ++// * @see \`{@link https://gist.github.com/gnarf/54829d408993526fe475#tween-hooks }\` ++// * @since 1.8 ++// */ ++// set(tween: Tween): void; ++// } | { ++// [key: string]: never; ++// }; ++ ++// /** ++// * @see \`{@link https://gist.github.com/gnarf/54829d408993526fe475#tween-hooks }\` ++// * @since 1.8 ++// */ ++// interface PropHooks { ++// [property: string]: PropHook; ++// } ++ ++// // #endregion ++ ++// // region Easing ++// // #region Easing ++ ++// type EasingMethod = (percent: number) => number; ++ ++// interface Easings { ++// [name: string]: EasingMethod; ++// } ++ ++// // #endregion ++ ++// // region Effects (fx) ++// // #region Effects (fx) ++ ++// interface Effects { ++// /** ++// * The rate (in milliseconds) at which animations fire. ++// * @see \`{@link https://api.jquery.com/jQuery.fx.interval/ }\` ++// * @since 1.4.3 ++// * @deprecated ​ Deprecated since 3.0. See \`{@link https://api.jquery.com/jQuery.fx.interval/ }\`. ++// * ++// * **Cause**: As of jQuery 3.0 the `jQuery.fx.interval` property can be used to change the animation interval only on browsers that do not support the `window.requestAnimationFrame()` method. That is currently only Internet Explorer 9 and the Android Browser. Once support is dropped for these browsers, the property will serve no purpose and it will be removed. ++// * ++// * **Solution**: Find and remove code that changes or uses `jQuery.fx.interval`. If the value is being used by code in your page or a plugin, the code may be making assumptions that are no longer valid. The default value of `jQuery.fx.interval` is `13` (milliseconds), which could be used instead of accessing this property. ++// * @example ​ ````Cause all animations to run with less frames. ++// ```html ++// ++// ++// ++// ++// jQuery.fx.interval demo ++// ++// ++// ++// ++// ​ ++//

        ++//
        ++// ​ ++// ++// ++// ++// ``` ++// */ ++// interval: number; ++// /** ++// * Globally disable all animations. ++// * @see \`{@link https://api.jquery.com/jQuery.fx.off/ }\` ++// * @since 1.3 ++// * @example ​ ````Toggle animation on and off ++// ```html ++// ++// ++// ++// ++// jQuery.fx.off demo ++// ++// ++// ++// ++// ​ ++// ++// ++//
        ++// ​ ++// ++// ++// ++// ``` ++// */ ++// off: boolean; ++// /** ++// * @deprecated ​ Deprecated since 1.8. Use \`{@link Tween.propHooks jQuery.Tween.propHooks}\`. ++// * ++// * `jQuery.fx.step` functions are being replaced by `jQuery.Tween.propHooks` and may eventually be removed, but are still supported via the default tween propHook. ++// */ ++// step: PlainObject>; ++// /** ++// * _overridable_ Clears up the `setInterval` ++// * @see \`{@link https://gist.github.com/gnarf/54829d408993526fe475#plugging-in-a-different-timer-loop }\` ++// * @since 1.8 ++// */ ++// stop(): void; ++// /** ++// * Calls `.run()` on each object in the `jQuery.timers` array, removing it from the array if `.run()` returns a falsy value. Calls `jQuery.fx.stop()` whenever there are no timers remaining. ++// * @see \`{@link https://gist.github.com/gnarf/54829d408993526fe475#plugging-in-a-different-timer-loop }\` ++// * @since 1.8 ++// */ ++// tick(): void; ++// /** ++// * _overridable_ Creates a `setInterval` if one doesn't already exist, and pushes `tickFunction` to the `jQuery.timers` array. `tickFunction` should also have `anim`, `elem`, and `queue` properties that reference the animation object, animated element, and queue option to facilitate `jQuery.fn.stop()` ++// * ++// * By overriding `fx.timer` and `fx.stop` you should be able to implement any animation tick behaviour you desire. (like using `requestAnimationFrame` instead of `setTimeout`.) ++// * ++// * There is an example of overriding the timer loop in \`{@link https://github.com/gnarf37/jquery-requestAnimationFrame jquery.requestAnimationFrame}\` ++// * @see \`{@link https://gist.github.com/gnarf/54829d408993526fe475#plugging-in-a-different-timer-loop }\` ++// * @since 1.8 ++// */ ++// timer(tickFunction: TickFunction): void; ++// } ++ ++// /** ++// * @deprecated ​ Deprecated since 1.8. Use \`{@link Tween.propHooks jQuery.Tween.propHooks}\`. ++// * ++// * `jQuery.fx.step` functions are being replaced by `jQuery.Tween.propHooks` and may eventually be removed, but are still supported via the default tween propHook. ++// */ ++// type AnimationHook = (fx: Tween) => void; ++ ++// interface TickFunction { ++// anim: Animation; ++// elem: TElement; ++// queue: boolean | string; ++// (): any; ++// } ++ ++// // #endregion ++ ++// // region Queue ++// // #region Queue ++ ++// // TODO: Is the first element always a string or is that specific to the 'fx' queue? ++// type Queue = { 0: string; } & Array>; ++ ++// type QueueFunction = (this: TElement, next: () => void) => void; ++ ++// // #endregion ++ ++// // region Speed ++// // #region Speed ++ ++// // Workaround for TypeScript 2.3 which does not have support for weak types handling. ++// type SpeedSettings = { ++// /** ++// * A string or number determining how long the animation will run. ++// */ ++// duration: Duration; ++// } | { ++// /** ++// * A string indicating which easing function to use for the transition. ++// */ ++// easing: string; ++// } | { ++// /** ++// * A function to call once the animation is complete. ++// */ ++// complete(this: TElement): void; ++// } | { ++// [key: string]: never; ++// }; ++ ++// // #endregion ++ ++// // #endregion ++ ++// // region Events ++// // #region Events ++ ++// // region Event ++// // #region Event ++ ++// // This should be a class but doesn't work correctly under the JQuery namespace. Event should be an inner class of jQuery. ++ ++// /** ++// * jQuery's event system normalizes the event object according to W3C standards. The event object is guaranteed to be passed to the event handler (no checks for window.event required). It normalizes the target, relatedTarget, which, metaKey and pageX/Y properties and provides both stopPropagation() and preventDefault() methods. ++// * ++// * Those properties are all documented, and accompanied by examples, on the \`{@link http://api.jquery.com/category/events/event-object/ Event object}\` page. ++// * ++// * The standard events in the Document Object Model are: `blur`, `focus`, `load`, `resize`, `scroll`, `unload`, `beforeunload`, `click`, `dblclick`, `mousedown`, `mouseup`, `mousemove`, `mouseover`, `mouseout`, `mouseenter`, `mouseleave`, `change`, `select`, `submit`, `keydown`, `keypress`, and `keyup`. Since the DOM event names have predefined meanings for some elements, using them for other purposes is not recommended. jQuery's event model can trigger an event by any name on an element, and it is propagated up the DOM tree to which that element belongs, if any. ++// * @see \`{@link https://api.jquery.com/category/events/event-object/ }\` ++// */ ++// interface EventStatic { ++// /** ++// * The jQuery.Event constructor is exposed and can be used when calling trigger. The new operator is optional. ++// * ++// * Check \`{@link https://api.jquery.com/trigger/ trigger}\`'s documentation to see how to combine it with your own event object. ++// * @see \`{@link https://api.jquery.com/category/events/event-object/ }\` ++// * @since 1.6 ++// * @example ++// ```javascript ++// //Create a new jQuery.Event object without the "new" operator. ++// var e = jQuery.Event( "click" ); ++// ​ ++// // trigger an artificial click event ++// jQuery( "body" ).trigger( e ); ++// ``` ++// * @example ++// ```javascript ++// // Create a new jQuery.Event object with specified event properties. ++// var e = jQuery.Event( "keydown", { keyCode: 64 } ); ++// ​ ++// // trigger an artificial keydown event with keyCode 64 ++// jQuery( "body" ).trigger( e ); ++// ``` ++// */ ++// (event: string, properties?: T): Event & T; ++// /** ++// * The jQuery.Event constructor is exposed and can be used when calling trigger. The new operator is optional. ++// * ++// * Check \`{@link https://api.jquery.com/trigger/ trigger}\`'s documentation to see how to combine it with your own event object. ++// * @see \`{@link https://api.jquery.com/category/events/event-object/ }\` ++// * @since 1.6 ++// * @example ++// ```javascript ++// //Create a new jQuery.Event object without the "new" operator. ++// var e = jQuery.Event( "click" ); ++// ​ ++// // trigger an artificial click event ++// jQuery( "body" ).trigger( e ); ++// ``` ++// * @example ++// ```javascript ++// // Create a new jQuery.Event object with specified event properties. ++// var e = jQuery.Event( "keydown", { keyCode: 64 } ); ++// ​ ++// // trigger an artificial keydown event with keyCode 64 ++// jQuery( "body" ).trigger( e ); ++// ``` ++// */ ++// new (event: string, properties?: T): Event & T; ++// } ++ ++// /** ++// * jQuery's event system normalizes the event object according to W3C standards. The event object is guaranteed to be passed to the event handler (no checks for window.event required). It normalizes the target, relatedTarget, which, metaKey and pageX/Y properties and provides both stopPropagation() and preventDefault() methods. ++// * ++// * Those properties are all documented, and accompanied by examples, on the \`{@link http://api.jquery.com/category/events/event-object/ Event object}\` page. ++// * ++// * The standard events in the Document Object Model are: `blur`, `focus`, `load`, `resize`, `scroll`, `unload`, `beforeunload`, `click`, `dblclick`, `mousedown`, `mouseup`, `mousemove`, `mouseover`, `mouseout`, `mouseenter`, `mouseleave`, `change`, `select`, `submit`, `keydown`, `keypress`, and `keyup`. Since the DOM event names have predefined meanings for some elements, using them for other purposes is not recommended. jQuery's event model can trigger an event by any name on an element, and it is propagated up the DOM tree to which that element belongs, if any. ++// * @see \`{@link https://api.jquery.com/category/events/event-object/ }\` ++// * @see \`{@link TriggeredEvent }\` ++// */ ++// interface Event { ++// // region Copied properties ++// // #region Copied properties ++ ++// // Event ++ ++// bubbles: boolean | undefined; ++// cancelable: boolean | undefined; ++// eventPhase: number | undefined; ++ ++// // UIEvent ++ ++// detail: number | undefined; ++// view: Window | undefined; ++ ++// // MouseEvent ++ ++// button: number | undefined; ++// buttons: number | undefined; ++// clientX: number | undefined; ++// clientY: number | undefined; ++// offsetX: number | undefined; ++// offsetY: number | undefined; ++// /** ++// * The mouse position relative to the left edge of the document. ++// * @see \`{@link https://api.jquery.com/event.pageX/ }\` ++// * @since 1.0.4 ++// * @example ​ ````Show the mouse position relative to the left and top edges of the document (within this iframe). ++// ```html ++// ++// ++// ++// ++// event.pageX demo ++// ++// ++// ++// ++// ​ ++//
        ++// ​ ++// ++// ​ ++// ++// ++// ``` ++// */ ++// pageX: number | undefined; ++// /** ++// * The mouse position relative to the top edge of the document. ++// * @see \`{@link https://api.jquery.com/event.pageY/ }\` ++// * @since 1.0.4 ++// * @example ​ ````Show the mouse position relative to the left and top edges of the document (within this iframe). ++// ```html ++// ++// ++// ++// ++// event.pageY demo ++// ++// ++// ++// ++// ​ ++//
        ++// ​ ++// ++// ​ ++// ++// ++// ``` ++// */ ++// pageY: number | undefined; ++// screenX: number | undefined; ++// screenY: number | undefined; ++// /** @deprecated */ ++// toElement: Element | undefined; ++ ++// // PointerEvent ++ ++// pointerId: number | undefined; ++// pointerType: string | undefined; ++ ++// // KeyboardEvent ++ ++// /** @deprecated */ ++// char: string | undefined; ++// /** @deprecated */ ++// charCode: number | undefined; ++// key: string | undefined; ++// /** @deprecated */ ++// keyCode: number | undefined; ++ ++// // TouchEvent ++ ++// changedTouches: TouchList | undefined; ++// targetTouches: TouchList | undefined; ++// touches: TouchList | undefined; ++ ++// // MouseEvent, KeyboardEvent ++ ++// /** ++// * For key or mouse events, this property indicates the specific key or button that was pressed. ++// * @see \`{@link https://api.jquery.com/event.which/ }\` ++// * @since 1.1.3 ++// * @deprecated ​ Deprecated since 3.3. See \`{@link https://github.com/jquery/api.jquery.com/issues/821 }\`. ++// * @example ​ ````Log which key was depressed. ++// ```html ++// ++// ++// ++// ++// event.which demo ++// ++// ++// ++// ​ ++// ++//
        ++// ​ ++// ++// ​ ++// ++// ++// ``` ++// * @example ​ ````Log which mouse button was depressed. ++// ```html ++// ++// ++// ++// ++// event.which demo ++// ++// ++// ++// ​ ++// ++//
        ++// ​ ++// ++// ​ ++// ++// ++// ``` ++// */ ++// which: number | undefined; ++ ++// // MouseEvent, KeyboardEvent, TouchEvent ++ ++// altKey: boolean | undefined; ++// ctrlKey: boolean | undefined; ++// /** ++// * Indicates whether the META key was pressed when the event fired. ++// * @see \`{@link https://api.jquery.com/event.metaKey/ }\` ++// * @since 1.0.4 ++// * @example ​ ````Determine whether the META key was pressed when the event fired. ++// ```html ++// ++// ++// ++// ++// event.metaKey demo ++// ++// ++// ++// ++// ​ ++// ++//
        ++// ​ ++// ++// ​ ++// ++// ++// ``` ++// */ ++// metaKey: boolean | undefined; ++// shiftKey: boolean | undefined; ++ ++// // #endregion ++ ++// /** ++// * The difference in milliseconds between the time the browser created the event and January 1, 1970. ++// * @see \`{@link https://api.jquery.com/event.timeStamp/ }\` ++// * @since 1.2.6 ++// * @example ​ ````Display the time since the click handler last executed. ++// ```html ++// ++// ++// ++// ++// event.timeStamp demo ++// ++// ++// ++// ++// ​ ++//
        Click.
        ++// ​ ++// ++// ​ ++// ++// ++// ``` ++// */ ++// timeStamp: number; ++// /** ++// * Describes the nature of the event. ++// * @see \`{@link https://api.jquery.com/event.type/ }\` ++// * @since 1.0 ++// * @example ​ ````On all anchor clicks, alert the event type. ++// ```javascript ++// $( "a" ).click(function( event ) { ++// alert( event.type ); // "click" ++// }); ++// ``` ++// */ ++// type: string; ++// /** ++// * Returns whether event.preventDefault() was ever called on this event object. ++// * @see \`{@link https://api.jquery.com/event.isDefaultPrevented/ }\` ++// * @since 1.3 ++// * @example ​ ````Checks whether event.preventDefault() was called. ++// ```javascript ++// $( "a" ).click(function( event ) { ++// alert( event.isDefaultPrevented() ); // false ++// event.preventDefault(); ++// alert( event.isDefaultPrevented() ); // true ++// }); ++// ``` ++// */ ++// isDefaultPrevented(): boolean; ++// /** ++// * Returns whether event.stopImmediatePropagation() was ever called on this event object. ++// * @see \`{@link https://api.jquery.com/event.isImmediatePropagationStopped/ }\` ++// * @since 1.3 ++// * @example ​ ````Checks whether event.stopImmediatePropagation() was called. ++// ```html ++// ++// ++// ++// ++// event.isImmediatePropagationStopped demo ++// ++// ++// ++// ​ ++// ++//
        ++// ​ ++// ++// ​ ++// ++// ++// ``` ++// */ ++// isImmediatePropagationStopped(): boolean; ++// /** ++// * Returns whether event.stopPropagation() was ever called on this event object. ++// * @see \`{@link https://api.jquery.com/event.isPropagationStopped/ }\` ++// * @since 1.3 ++// * @example ​ ````Checks whether event.stopPropagation() was called ++// ```html ++// ++// ++// ++// ++// event.isPropagationStopped demo ++// ++// ++// ++// ​ ++// ++//
        ++// ​ ++// ++// ​ ++// ++// ++// ``` ++// */ ++// isPropagationStopped(): boolean; ++// /** ++// * If this method is called, the default action of the event will not be triggered. ++// * @see \`{@link https://api.jquery.com/event.preventDefault/ }\` ++// * @since 1.0 ++// * @example ​ ````Cancel the default action (navigation) of the click. ++// ```html ++// ++// ++// ++// ++// event.preventDefault demo ++// ++// ++// ++// ​ ++// default click action is prevented ++//
        ++// ​ ++// ++// ​ ++// ++// ++// ``` ++// */ ++// preventDefault(): void; ++// /** ++// * Keeps the rest of the handlers from being executed and prevents the event from bubbling up the DOM tree. ++// * @see \`{@link https://api.jquery.com/event.stopImmediatePropagation/ }\` ++// * @since 1.3 ++// * @example ​ ````Prevents other event handlers from being called. ++// ```html ++// ++// ++// ++// ++// event.stopImmediatePropagation demo ++// ++// ++// ++// ++// ​ ++//

        paragraph

        ++//
        division
        ++// ​ ++// ++// ​ ++// ++// ++// ``` ++// */ ++// stopImmediatePropagation(): void; ++// /** ++// * Prevents the event from bubbling up the DOM tree, preventing any parent handlers from being notified of the event. ++// * @see \`{@link https://api.jquery.com/event.stopPropagation/ }\` ++// * @since 1.0 ++// * @example ​ ````Kill the bubbling on the click event. ++// ```javascript ++// $( "p" ).click(function( event ) { ++// event.stopPropagation(); ++// // Do something ++// }); ++// ``` ++// */ ++// stopPropagation(): void; ++// } ++ ++// // #endregion ++ ++// /** ++// * Base type for jQuery events that have been triggered (including events triggered on plain objects). ++// */ ++// interface TriggeredEvent< ++// TDelegateTarget = any, ++// TData = any, ++// TCurrentTarget = any, ++// TTarget = any ++// > extends Event { ++// /** ++// * The current DOM element within the event bubbling phase. ++// * @see \`{@link https://api.jquery.com/event.currentTarget/ }\` ++// * @since 1.3 ++// * @example ​ ````Alert that currentTarget matches the `this` keyword. ++// ```javascript ++// $( "p" ).click(function( event ) { ++// alert( event.currentTarget === this ); // true ++// }); ++// ``` ++// */ ++// currentTarget: TCurrentTarget; ++// /** ++// * The element where the currently-called jQuery event handler was attached. ++// * @see \`{@link https://api.jquery.com/event.delegateTarget/ }\` ++// * @since 1.7 ++// * @example ​ ````When a button in any box class is clicked, change the box's background color to red. ++// ```javascript ++// $( ".box" ).on( "click", "button", function( event ) { ++// $( event.delegateTarget ).css( "background-color", "red" ); ++// }); ++// ``` ++// */ ++// delegateTarget: TDelegateTarget; ++// /** ++// * The DOM element that initiated the event. ++// * @see \`{@link https://api.jquery.com/event.target/ }\` ++// * @since 1.0 ++// * @example ​ ````Display the tag's name on click ++// ```html ++// ++// ++// ++// ++// event.target demo ++// ++// ++// ++// ++// ​ ++//
        ++//
        ++//

        ++// click ++//

        ++//
        ++// ​ ++// ++// ​ ++// ++// ++// ``` ++// * @example ​ ````Implements a simple event delegation: The click handler is added to an unordered list, and the children of its li children are hidden. Clicking one of the li children toggles (see toggle()) their children. ++// ```html ++// ++// ++// ++// ++// event.target demo ++// ++// ++// ++// ​ ++//
          ++//
        • item 1 ++//
            ++//
          • sub item 1-a
          • ++//
          • sub item 1-b
          • ++//
          ++//
        • ++//
        • item 2 ++//
            ++//
          • sub item 2-a
          • ++//
          • sub item 2-b
          • ++//
          ++//
        • ++//
        ++// ​ ++// ++// ​ ++// ++// ++// ``` ++// */ ++// target: TTarget; ++ ++// /** ++// * An optional object of data passed to an event method when the current executing handler is bound. ++// * @see \`{@link https://api.jquery.com/event.data/ }\` ++// * @since 1.1 ++// * @example ​ ````Within a for loop, pass the value of i to the .on() method so that the current iteration's value is preserved. ++// ```html ++// ++// ++// ++// ++// event.data demo ++// ++// ++// ++// ​ ++// ++// ++// ++// ++// ++// ​ ++//
        ++// ​ ++// ++// ​ ++// ++// ++// ``` ++// */ ++// data: TData; ++ ++// /** ++// * The namespace specified when the event was triggered. ++// * @see \`{@link https://api.jquery.com/event.namespace/ }\` ++// * @since 1.4.3 ++// * @example ​ ````Determine the event namespace used. ++// ```html ++// ++// ++// ++// ++// event.namespace demo ++// ++// ++// ++// ​ ++// ++//

        ++// ​ ++// ++// ​ ++// ++// ++// ``` ++// */ ++// namespace?: string; ++// originalEvent?: _Event; ++// /** ++// * The last value returned by an event handler that was triggered by this event, unless the value was undefined. ++// * @see \`{@link https://api.jquery.com/event.result/ }\` ++// * @since 1.3 ++// * @example ​ ````Display previous handler's return value ++// ```html ++// ++// ++// ++// ++// event.result demo ++// ++// ++// ++// ​ ++// ++//

        ++// ​ ++// ++// ​ ++// ++// ++// ``` ++// */ ++// result?: any; ++// } ++ ++// // region Event ++// // #region Event ++ ++// interface EventBase< ++// TDelegateTarget = any, ++// TData = any, ++// TCurrentTarget = any, ++// TTarget = any ++// > extends TriggeredEvent { ++// /** ++// * The other DOM element involved in the event, if any. ++// * @see \`{@link https://api.jquery.com/event.relatedTarget/ }\` ++// * @since 1.1.4 ++// * @example ​ ````On mouseout of anchors, alert the element type being entered. ++// ```javascript ++// $( "a" ).mouseout(function( event ) { ++// alert( event.relatedTarget.nodeName ); // "DIV" ++// }); ++// ``` ++// */ ++// relatedTarget?: undefined; ++ ++// // Event ++ ++// bubbles: boolean; ++// cancelable: boolean; ++// eventPhase: number; ++ ++// // UIEvent ++ ++// detail: undefined; ++// view: undefined; ++ ++// // MouseEvent ++ ++// button: undefined; ++// buttons: undefined; ++// clientX: undefined; ++// clientY: undefined; ++// offsetX: undefined; ++// offsetY: undefined; ++// /** ++// * The mouse position relative to the left edge of the document. ++// * @see \`{@link https://api.jquery.com/event.pageX/ }\` ++// * @since 1.0.4 ++// * @example ​ ````Show the mouse position relative to the left and top edges of the document (within this iframe). ++// ```html ++// ++// ++// ++// ++// event.pageX demo ++// ++// ++// ++// ++// ​ ++//
        ++// ​ ++// ++// ​ ++// ++// ++// ``` ++// */ ++// pageX: undefined; ++// /** ++// * The mouse position relative to the top edge of the document. ++// * @see \`{@link https://api.jquery.com/event.pageY/ }\` ++// * @since 1.0.4 ++// * @example ​ ````Show the mouse position relative to the left and top edges of the document (within this iframe). ++// ```html ++// ++// ++// ++// ++// event.pageY demo ++// ++// ++// ++// ++// ​ ++//
        ++// ​ ++// ++// ​ ++// ++// ++// ``` ++// */ ++// pageY: undefined; ++// screenX: undefined; ++// screenY: undefined; ++// /** @deprecated */ ++// toElement: undefined; ++ ++// // PointerEvent ++ ++// pointerId: undefined; ++// pointerType: undefined; ++ ++// // KeyboardEvent ++ ++// /** @deprecated */ ++// char: undefined; ++// /** @deprecated */ ++// charCode: undefined; ++// key: undefined; ++// /** @deprecated */ ++// keyCode: undefined; ++ ++// // TouchEvent ++ ++// changedTouches: undefined; ++// targetTouches: undefined; ++// touches: undefined; ++ ++// // MouseEvent, KeyboardEvent ++ ++// /** ++// * For key or mouse events, this property indicates the specific key or button that was pressed. ++// * @see \`{@link https://api.jquery.com/event.which/ }\` ++// * @since 1.1.3 ++// * @deprecated ​ Deprecated since 3.3. See \`{@link https://github.com/jquery/api.jquery.com/issues/821 }\`. ++// * @example ​ ````Log which key was depressed. ++// ```html ++// ++// ++// ++// ++// event.which demo ++// ++// ++// ++// ​ ++// ++//
        ++// ​ ++// ++// ​ ++// ++// ++// ``` ++// * @example ​ ````Log which mouse button was depressed. ++// ```html ++// ++// ++// ++// ++// event.which demo ++// ++// ++// ++// ​ ++// ++//
        ++// ​ ++// ++// ​ ++// ++// ++// ``` ++// */ ++// which: undefined; ++ ++// // MouseEvent, KeyboardEvent, TouchEvent ++ ++// altKey: undefined; ++// ctrlKey: undefined; ++// /** ++// * Indicates whether the META key was pressed when the event fired. ++// * @see \`{@link https://api.jquery.com/event.metaKey/ }\` ++// * @since 1.0.4 ++// * @example ​ ````Determine whether the META key was pressed when the event fired. ++// ```html ++// ++// ++// ++// ++// event.metaKey demo ++// ++// ++// ++// ++// ​ ++// ++//
        ++// ​ ++// ++// ​ ++// ++// ++// ``` ++// */ ++// metaKey: undefined; ++// shiftKey: undefined; ++ ++// originalEvent?: _Event; ++// } ++ ++// interface ChangeEvent< ++// TDelegateTarget = any, ++// TData = any, ++// TCurrentTarget = any, ++// TTarget = any ++// > extends EventBase { ++// type: 'change'; ++// } ++ ++// interface ResizeEvent< ++// TDelegateTarget = any, ++// TData = any, ++// TCurrentTarget = any, ++// TTarget = any ++// > extends EventBase { ++// type: 'resize'; ++// } ++ ++// interface ScrollEvent< ++// TDelegateTarget = any, ++// TData = any, ++// TCurrentTarget = any, ++// TTarget = any ++// > extends EventBase { ++// type: 'scroll'; ++// } ++ ++// interface SelectEvent< ++// TDelegateTarget = any, ++// TData = any, ++// TCurrentTarget = any, ++// TTarget = any ++// > extends EventBase { ++// type: 'select'; ++// } ++ ++// interface SubmitEvent< ++// TDelegateTarget = any, ++// TData = any, ++// TCurrentTarget = any, ++// TTarget = any ++// > extends EventBase { ++// type: 'submit'; ++// } ++ ++// // #endregion ++ ++// // region UIEvent ++// // #region UIEvent ++ ++// interface UIEventBase< ++// TDelegateTarget = any, ++// TData = any, ++// TCurrentTarget = any, ++// TTarget = any ++// > extends TriggeredEvent { ++// // Event ++ ++// bubbles: boolean; ++// cancelable: boolean; ++// eventPhase: number; ++ ++// // UIEvent ++ ++// detail: number; ++// view: Window; ++ ++// originalEvent?: _UIEvent; ++// } ++ ++// // region MouseEvent ++// // #region MouseEvent ++ ++// interface MouseEventBase< ++// TDelegateTarget = any, ++// TData = any, ++// TCurrentTarget = any, ++// TTarget = any ++// > extends UIEventBase { ++// /** ++// * The other DOM element involved in the event, if any. ++// * @see \`{@link https://api.jquery.com/event.relatedTarget/ }\` ++// * @since 1.1.4 ++// * @example ​ ````On mouseout of anchors, alert the element type being entered. ++// ```javascript ++// $( "a" ).mouseout(function( event ) { ++// alert( event.relatedTarget.nodeName ); // "DIV" ++// }); ++// ``` ++// */ ++// relatedTarget?: EventTarget | null; ++ ++// // MouseEvent ++ ++// button: number; ++// buttons: number; ++// clientX: number; ++// clientY: number; ++// offsetX: number; ++// offsetY: number; ++// /** ++// * The mouse position relative to the left edge of the document. ++// * @see \`{@link https://api.jquery.com/event.pageX/ }\` ++// * @since 1.0.4 ++// * @example ​ ````Show the mouse position relative to the left and top edges of the document (within this iframe). ++// ```html ++// ++// ++// ++// ++// event.pageX demo ++// ++// ++// ++// ++// ​ ++//
        ++// ​ ++// ++// ​ ++// ++// ++// ``` ++// */ ++// pageX: number; ++// /** ++// * The mouse position relative to the top edge of the document. ++// * @see \`{@link https://api.jquery.com/event.pageY/ }\` ++// * @since 1.0.4 ++// * @example ​ ````Show the mouse position relative to the left and top edges of the document (within this iframe). ++// ```html ++// ++// ++// ++// ++// event.pageY demo ++// ++// ++// ++// ++// ​ ++//
        ++// ​ ++// ++// ​ ++// ++// ++// ``` ++// */ ++// pageY: number; ++// screenX: number; ++// screenY: number; ++// /** @deprecated */ ++// toElement: Element; ++ ++// // PointerEvent ++ ++// pointerId: undefined; ++// pointerType: undefined; ++ ++// // KeyboardEvent ++ ++// /** @deprecated */ ++// char: undefined; ++// /** @deprecated */ ++// charCode: undefined; ++// key: undefined; ++// /** @deprecated */ ++// keyCode: undefined; ++ ++// // TouchEvent ++ ++// changedTouches: undefined; ++// targetTouches: undefined; ++// touches: undefined; ++ ++// // MouseEvent, KeyboardEvent ++ ++// /** ++// * For key or mouse events, this property indicates the specific key or button that was pressed. ++// * @see \`{@link https://api.jquery.com/event.which/ }\` ++// * @since 1.1.3 ++// * @deprecated ​ Deprecated since 3.3. See \`{@link https://github.com/jquery/api.jquery.com/issues/821 }\`. ++// * @example ​ ````Log which key was depressed. ++// ```html ++// ++// ++// ++// ++// event.which demo ++// ++// ++// ++// ​ ++// ++//
        ++// ​ ++// ++// ​ ++// ++// ++// ``` ++// * @example ​ ````Log which mouse button was depressed. ++// ```html ++// ++// ++// ++// ++// event.which demo ++// ++// ++// ++// ​ ++// ++//
        ++// ​ ++// ++// ​ ++// ++// ++// ``` ++// */ ++// which: number; ++ ++// // MouseEvent, KeyboardEvent, TouchEvent ++ ++// altKey: boolean; ++// ctrlKey: boolean; ++// /** ++// * Indicates whether the META key was pressed when the event fired. ++// * @see \`{@link https://api.jquery.com/event.metaKey/ }\` ++// * @since 1.0.4 ++// * @example ​ ````Determine whether the META key was pressed when the event fired. ++// ```html ++// ++// ++// ++// ++// event.metaKey demo ++// ++// ++// ++// ++// ​ ++// ++//
        ++// ​ ++// ++// ​ ++// ++// ++// ``` ++// */ ++// metaKey: boolean; ++// shiftKey: boolean; ++ ++// originalEvent?: _MouseEvent; ++// } ++ ++// interface ClickEvent< ++// TDelegateTarget = any, ++// TData = any, ++// TCurrentTarget = any, ++// TTarget = any ++// > extends MouseEventBase { ++// /** ++// * The other DOM element involved in the event, if any. ++// * @see \`{@link https://api.jquery.com/event.relatedTarget/ }\` ++// * @since 1.1.4 ++// * @example ​ ````On mouseout of anchors, alert the element type being entered. ++// ```javascript ++// $( "a" ).mouseout(function( event ) { ++// alert( event.relatedTarget.nodeName ); // "DIV" ++// }); ++// ``` ++// */ ++// relatedTarget?: null; ++ ++// type: 'click'; ++// } ++ ++// interface ContextMenuEvent< ++// TDelegateTarget = any, ++// TData = any, ++// TCurrentTarget = any, ++// TTarget = any ++// > extends MouseEventBase { ++// /** ++// * The other DOM element involved in the event, if any. ++// * @see \`{@link https://api.jquery.com/event.relatedTarget/ }\` ++// * @since 1.1.4 ++// * @example ​ ````On mouseout of anchors, alert the element type being entered. ++// ```javascript ++// $( "a" ).mouseout(function( event ) { ++// alert( event.relatedTarget.nodeName ); // "DIV" ++// }); ++// ``` ++// */ ++// relatedTarget?: null; ++ ++// type: 'contextmenu'; ++// } ++ ++// interface DoubleClickEvent< ++// TDelegateTarget = any, ++// TData = any, ++// TCurrentTarget = any, ++// TTarget = any ++// > extends MouseEventBase { ++// /** ++// * The other DOM element involved in the event, if any. ++// * @see \`{@link https://api.jquery.com/event.relatedTarget/ }\` ++// * @since 1.1.4 ++// * @example ​ ````On mouseout of anchors, alert the element type being entered. ++// ```javascript ++// $( "a" ).mouseout(function( event ) { ++// alert( event.relatedTarget.nodeName ); // "DIV" ++// }); ++// ``` ++// */ ++// relatedTarget?: null; ++ ++// type: 'dblclick'; ++// } ++ ++// interface MouseDownEvent< ++// TDelegateTarget = any, ++// TData = any, ++// TCurrentTarget = any, ++// TTarget = any ++// > extends MouseEventBase { ++// /** ++// * The other DOM element involved in the event, if any. ++// * @see \`{@link https://api.jquery.com/event.relatedTarget/ }\` ++// * @since 1.1.4 ++// * @example ​ ````On mouseout of anchors, alert the element type being entered. ++// ```javascript ++// $( "a" ).mouseout(function( event ) { ++// alert( event.relatedTarget.nodeName ); // "DIV" ++// }); ++// ``` ++// */ ++// relatedTarget?: null; ++ ++// type: 'mousedown'; ++// } ++ ++// interface MouseEnterEvent< ++// TDelegateTarget = any, ++// TData = any, ++// TCurrentTarget = any, ++// TTarget = any ++// > extends MouseEventBase { ++// // Special handling by jQuery. ++// type: 'mouseover'; ++// } ++ ++// interface MouseLeaveEvent< ++// TDelegateTarget = any, ++// TData = any, ++// TCurrentTarget = any, ++// TTarget = any ++// > extends MouseEventBase { ++// // Special handling by jQuery. ++// type: 'mouseout'; ++// } ++ ++// interface MouseMoveEvent< ++// TDelegateTarget = any, ++// TData = any, ++// TCurrentTarget = any, ++// TTarget = any ++// > extends MouseEventBase { ++// /** ++// * The other DOM element involved in the event, if any. ++// * @see \`{@link https://api.jquery.com/event.relatedTarget/ }\` ++// * @since 1.1.4 ++// * @example ​ ````On mouseout of anchors, alert the element type being entered. ++// ```javascript ++// $( "a" ).mouseout(function( event ) { ++// alert( event.relatedTarget.nodeName ); // "DIV" ++// }); ++// ``` ++// */ ++// relatedTarget?: null; ++ ++// type: 'mousemove'; ++// } ++ ++// interface MouseOutEvent< ++// TDelegateTarget = any, ++// TData = any, ++// TCurrentTarget = any, ++// TTarget = any ++// > extends MouseEventBase { ++// type: 'mouseout'; ++// } ++ ++// interface MouseOverEvent< ++// TDelegateTarget = any, ++// TData = any, ++// TCurrentTarget = any, ++// TTarget = any ++// > extends MouseEventBase { ++// type: 'mouseover'; ++// } ++ ++// interface MouseUpEvent< ++// TDelegateTarget = any, ++// TData = any, ++// TCurrentTarget = any, ++// TTarget = any ++// > extends MouseEventBase { ++// /** ++// * The other DOM element involved in the event, if any. ++// * @see \`{@link https://api.jquery.com/event.relatedTarget/ }\` ++// * @since 1.1.4 ++// * @example ​ ````On mouseout of anchors, alert the element type being entered. ++// ```javascript ++// $( "a" ).mouseout(function( event ) { ++// alert( event.relatedTarget.nodeName ); // "DIV" ++// }); ++// ``` ++// */ ++// relatedTarget?: null; ++ ++// type: 'mouseup'; ++// } ++ ++// // region DragEvent ++// // #region DragEvent ++ ++// interface DragEventBase< ++// TDelegateTarget = any, ++// TData = any, ++// TCurrentTarget = any, ++// TTarget = any ++// > extends UIEventBase { ++// originalEvent?: _DragEvent; ++// } ++ ++// interface DragEvent< ++// TDelegateTarget = any, ++// TData = any, ++// TCurrentTarget = any, ++// TTarget = any ++// > extends DragEventBase { ++// type: 'drag'; ++// } ++ ++// interface DragEndEvent< ++// TDelegateTarget = any, ++// TData = any, ++// TCurrentTarget = any, ++// TTarget = any ++// > extends DragEventBase { ++// type: 'dragend'; ++// } ++ ++// interface DragEnterEvent< ++// TDelegateTarget = any, ++// TData = any, ++// TCurrentTarget = any, ++// TTarget = any ++// > extends DragEventBase { ++// type: 'dragenter'; ++// } ++ ++// interface DragExitEvent< ++// TDelegateTarget = any, ++// TData = any, ++// TCurrentTarget = any, ++// TTarget = any ++// > extends DragEventBase { ++// type: 'dragexit'; ++// } ++ ++// interface DragLeaveEvent< ++// TDelegateTarget = any, ++// TData = any, ++// TCurrentTarget = any, ++// TTarget = any ++// > extends DragEventBase { ++// type: 'dragleave'; ++// } ++ ++// interface DragOverEvent< ++// TDelegateTarget = any, ++// TData = any, ++// TCurrentTarget = any, ++// TTarget = any ++// > extends DragEventBase { ++// type: 'dragover'; ++// } ++ ++// interface DragStartEvent< ++// TDelegateTarget = any, ++// TData = any, ++// TCurrentTarget = any, ++// TTarget = any ++// > extends DragEventBase { ++// type: 'dragstart'; ++// } ++ ++// interface DropEvent< ++// TDelegateTarget = any, ++// TData = any, ++// TCurrentTarget = any, ++// TTarget = any ++// > extends DragEventBase { ++// type: 'drop'; ++// } ++ ++// // #endregion ++ ++// // #endregion ++ ++// // region KeyboardEvent ++// // #region KeyboardEvent ++ ++// interface KeyboardEventBase< ++// TDelegateTarget = any, ++// TData = any, ++// TCurrentTarget = any, ++// TTarget = any ++// > extends UIEventBase { ++// /** ++// * The other DOM element involved in the event, if any. ++// * @see \`{@link https://api.jquery.com/event.relatedTarget/ }\` ++// * @since 1.1.4 ++// * @example ​ ````On mouseout of anchors, alert the element type being entered. ++// ```javascript ++// $( "a" ).mouseout(function( event ) { ++// alert( event.relatedTarget.nodeName ); // "DIV" ++// }); ++// ``` ++// */ ++// relatedTarget?: undefined; ++ ++// // MouseEvent ++ ++// button: undefined; ++// buttons: undefined; ++// clientX: undefined; ++// clientY: undefined; ++// offsetX: undefined; ++// offsetY: undefined; ++// /** ++// * The mouse position relative to the left edge of the document. ++// * @see \`{@link https://api.jquery.com/event.pageX/ }\` ++// * @since 1.0.4 ++// * @example ​ ````Show the mouse position relative to the left and top edges of the document (within this iframe). ++// ```html ++// ++// ++// ++// ++// event.pageX demo ++// ++// ++// ++// ++// ​ ++//
        ++// ​ ++// ++// ​ ++// ++// ++// ``` ++// */ ++// pageX: undefined; ++// /** ++// * The mouse position relative to the top edge of the document. ++// * @see \`{@link https://api.jquery.com/event.pageY/ }\` ++// * @since 1.0.4 ++// * @example ​ ````Show the mouse position relative to the left and top edges of the document (within this iframe). ++// ```html ++// ++// ++// ++// ++// event.pageY demo ++// ++// ++// ++// ++// ​ ++//
        ++// ​ ++// ++// ​ ++// ++// ++// ``` ++// */ ++// pageY: undefined; ++// screenX: undefined; ++// screenY: undefined; ++// /** @deprecated */ ++// toElement: undefined; ++ ++// // PointerEvent ++ ++// pointerId: undefined; ++// pointerType: undefined; ++ ++// // KeyboardEvent ++ ++// /** @deprecated */ ++// char: string | undefined; ++// /** @deprecated */ ++// charCode: number; ++// key: string; ++// /** @deprecated */ ++// keyCode: number; ++ ++// // TouchEvent ++ ++// changedTouches: undefined; ++// targetTouches: undefined; ++// touches: undefined; ++ ++// // MouseEvent, KeyboardEvent ++ ++// /** ++// * For key or mouse events, this property indicates the specific key or button that was pressed. ++// * @see \`{@link https://api.jquery.com/event.which/ }\` ++// * @since 1.1.3 ++// * @deprecated ​ Deprecated since 3.3. See \`{@link https://github.com/jquery/api.jquery.com/issues/821 }\`. ++// * @example ​ ````Log which key was depressed. ++// ```html ++// ++// ++// ++// ++// event.which demo ++// ++// ++// ++// ​ ++// ++//
        ++// ​ ++// ++// ​ ++// ++// ++// ``` ++// * @example ​ ````Log which mouse button was depressed. ++// ```html ++// ++// ++// ++// ++// event.which demo ++// ++// ++// ++// ​ ++// ++//
        ++// ​ ++// ++// ​ ++// ++// ++// ``` ++// */ ++// which: number; ++ ++// // MouseEvent, KeyboardEvent, TouchEvent ++ ++// altKey: boolean; ++// ctrlKey: boolean; ++// /** ++// * Indicates whether the META key was pressed when the event fired. ++// * @see \`{@link https://api.jquery.com/event.metaKey/ }\` ++// * @since 1.0.4 ++// * @example ​ ````Determine whether the META key was pressed when the event fired. ++// ```html ++// ++// ++// ++// ++// event.metaKey demo ++// ++// ++// ++// ++// ​ ++// ++//
        ++// ​ ++// ++// ​ ++// ++// ++// ``` ++// */ ++// metaKey: boolean; ++// shiftKey: boolean; ++ ++// originalEvent?: _KeyboardEvent; ++// } ++ ++// interface KeyDownEvent< ++// TDelegateTarget = any, ++// TData = any, ++// TCurrentTarget = any, ++// TTarget = any ++// > extends KeyboardEventBase { ++// type: 'keydown'; ++// } ++ ++// interface KeyPressEvent< ++// TDelegateTarget = any, ++// TData = any, ++// TCurrentTarget = any, ++// TTarget = any ++// > extends KeyboardEventBase { ++// type: 'keypress'; ++// } ++ ++// interface KeyUpEvent< ++// TDelegateTarget = any, ++// TData = any, ++// TCurrentTarget = any, ++// TTarget = any ++// > extends KeyboardEventBase { ++// type: 'keyup'; ++// } ++ ++// // #endregion ++ ++// // region TouchEvent ++// // #region TouchEvent ++ ++// interface TouchEventBase< ++// TDelegateTarget = any, ++// TData = any, ++// TCurrentTarget = any, ++// TTarget = any ++// > extends UIEventBase { ++// /** ++// * The other DOM element involved in the event, if any. ++// * @see \`{@link https://api.jquery.com/event.relatedTarget/ }\` ++// * @since 1.1.4 ++// * @example ​ ````On mouseout of anchors, alert the element type being entered. ++// ```javascript ++// $( "a" ).mouseout(function( event ) { ++// alert( event.relatedTarget.nodeName ); // "DIV" ++// }); ++// ``` ++// */ ++// relatedTarget?: undefined; ++ ++// // MouseEvent ++ ++// button: undefined; ++// buttons: undefined; ++// clientX: undefined; ++// clientY: undefined; ++// offsetX: undefined; ++// offsetY: undefined; ++// /** ++// * The mouse position relative to the left edge of the document. ++// * @see \`{@link https://api.jquery.com/event.pageX/ }\` ++// * @since 1.0.4 ++// * @example ​ ````Show the mouse position relative to the left and top edges of the document (within this iframe). ++// ```html ++// ++// ++// ++// ++// event.pageX demo ++// ++// ++// ++// ++// ​ ++//
        ++// ​ ++// ++// ​ ++// ++// ++// ``` ++// */ ++// pageX: undefined; ++// /** ++// * The mouse position relative to the top edge of the document. ++// * @see \`{@link https://api.jquery.com/event.pageY/ }\` ++// * @since 1.0.4 ++// * @example ​ ````Show the mouse position relative to the left and top edges of the document (within this iframe). ++// ```html ++// ++// ++// ++// ++// event.pageY demo ++// ++// ++// ++// ++// ​ ++//
        ++// ​ ++// ++// ​ ++// ++// ++// ``` ++// */ ++// pageY: undefined; ++// screenX: undefined; ++// screenY: undefined; ++// /** @deprecated */ ++// toElement: undefined; ++ ++// // PointerEvent ++ ++// pointerId: undefined; ++// pointerType: undefined; ++ ++// // KeyboardEvent ++ ++// /** @deprecated */ ++// char: undefined; ++// /** @deprecated */ ++// charCode: undefined; ++// key: undefined; ++// /** @deprecated */ ++// keyCode: undefined; ++ ++// // TouchEvent ++ ++// changedTouches: TouchList; ++// targetTouches: TouchList; ++// touches: TouchList; ++ ++// // MouseEvent, KeyboardEvent ++ ++// /** ++// * For key or mouse events, this property indicates the specific key or button that was pressed. ++// * @see \`{@link https://api.jquery.com/event.which/ }\` ++// * @since 1.1.3 ++// * @deprecated ​ Deprecated since 3.3. See \`{@link https://github.com/jquery/api.jquery.com/issues/821 }\`. ++// * @example ​ ````Log which key was depressed. ++// ```html ++// ++// ++// ++// ++// event.which demo ++// ++// ++// ++// ​ ++// ++//
        ++// ​ ++// ++// ​ ++// ++// ++// ``` ++// * @example ​ ````Log which mouse button was depressed. ++// ```html ++// ++// ++// ++// ++// event.which demo ++// ++// ++// ++// ​ ++// ++//
        ++// ​ ++// ++// ​ ++// ++// ++// ``` ++// */ ++// which: undefined; ++ ++// // MouseEvent, KeyboardEvent, TouchEvent ++ ++// altKey: boolean; ++// ctrlKey: boolean; ++// /** ++// * Indicates whether the META key was pressed when the event fired. ++// * @see \`{@link https://api.jquery.com/event.metaKey/ }\` ++// * @since 1.0.4 ++// * @example ​ ````Determine whether the META key was pressed when the event fired. ++// ```html ++// ++// ++// ++// ++// event.metaKey demo ++// ++// ++// ++// ++// ​ ++// ++//
        ++// ​ ++// ++// ​ ++// ++// ++// ``` ++// */ ++// metaKey: boolean; ++// shiftKey: boolean; ++ ++// originalEvent?: _TouchEvent; ++// } ++ ++// interface TouchCancelEvent< ++// TDelegateTarget = any, ++// TData = any, ++// TCurrentTarget = any, ++// TTarget = any ++// > extends TouchEventBase { ++// type: 'touchcancel'; ++// } ++ ++// interface TouchEndEvent< ++// TDelegateTarget = any, ++// TData = any, ++// TCurrentTarget = any, ++// TTarget = any ++// > extends TouchEventBase { ++// type: 'touchend'; ++// } ++ ++// interface TouchMoveEvent< ++// TDelegateTarget = any, ++// TData = any, ++// TCurrentTarget = any, ++// TTarget = any ++// > extends TouchEventBase { ++// type: 'touchmove'; ++// } ++ ++// interface TouchStartEvent< ++// TDelegateTarget = any, ++// TData = any, ++// TCurrentTarget = any, ++// TTarget = any ++// > extends TouchEventBase { ++// type: 'touchstart'; ++// } ++ ++// // #endregion ++ ++// // region FocusEvent ++// // #region FocusEvent ++ ++// interface FocusEventBase< ++// TDelegateTarget = any, ++// TData = any, ++// TCurrentTarget = any, ++// TTarget = any ++// > extends UIEventBase { ++// /** ++// * The other DOM element involved in the event, if any. ++// * @see \`{@link https://api.jquery.com/event.relatedTarget/ }\` ++// * @since 1.1.4 ++// * @example ​ ````On mouseout of anchors, alert the element type being entered. ++// ```javascript ++// $( "a" ).mouseout(function( event ) { ++// alert( event.relatedTarget.nodeName ); // "DIV" ++// }); ++// ``` ++// */ ++// relatedTarget?: EventTarget | null; ++ ++// // MouseEvent ++ ++// button: undefined; ++// buttons: undefined; ++// clientX: undefined; ++// clientY: undefined; ++// offsetX: undefined; ++// offsetY: undefined; ++// /** ++// * The mouse position relative to the left edge of the document. ++// * @see \`{@link https://api.jquery.com/event.pageX/ }\` ++// * @since 1.0.4 ++// * @example ​ ````Show the mouse position relative to the left and top edges of the document (within this iframe). ++// ```html ++// ++// ++// ++// ++// event.pageX demo ++// ++// ++// ++// ++// ​ ++//
        ++// ​ ++// ++// ​ ++// ++// ++// ``` ++// */ ++// pageX: undefined; ++// /** ++// * The mouse position relative to the top edge of the document. ++// * @see \`{@link https://api.jquery.com/event.pageY/ }\` ++// * @since 1.0.4 ++// * @example ​ ````Show the mouse position relative to the left and top edges of the document (within this iframe). ++// ```html ++// ++// ++// ++// ++// event.pageY demo ++// ++// ++// ++// ++// ​ ++//
        ++// ​ ++// ++// ​ ++// ++// ++// ``` ++// */ ++// pageY: undefined; ++// screenX: undefined; ++// screenY: undefined; ++// /** @deprecated */ ++// toElement: undefined; ++ ++// // PointerEvent ++ ++// pointerId: undefined; ++// pointerType: undefined; ++ ++// // KeyboardEvent ++ ++// /** @deprecated */ ++// char: undefined; ++// /** @deprecated */ ++// charCode: undefined; ++// key: undefined; ++// /** @deprecated */ ++// keyCode: undefined; ++ ++// // TouchEvent ++ ++// changedTouches: undefined; ++// targetTouches: undefined; ++// touches: undefined; ++ ++// // MouseEvent, KeyboardEvent ++ ++// /** ++// * For key or mouse events, this property indicates the specific key or button that was pressed. ++// * @see \`{@link https://api.jquery.com/event.which/ }\` ++// * @since 1.1.3 ++// * @deprecated ​ Deprecated since 3.3. See \`{@link https://github.com/jquery/api.jquery.com/issues/821 }\`. ++// * @example ​ ````Log which key was depressed. ++// ```html ++// ++// ++// ++// ++// event.which demo ++// ++// ++// ++// ​ ++// ++//
        ++// ​ ++// ++// ​ ++// ++// ++// ``` ++// * @example ​ ````Log which mouse button was depressed. ++// ```html ++// ++// ++// ++// ++// event.which demo ++// ++// ++// ++// ​ ++// ++//
        ++// ​ ++// ++// ​ ++// ++// ++// ``` ++// */ ++// which: undefined; ++ ++// // MouseEvent, KeyboardEvent, TouchEvent ++ ++// altKey: undefined; ++// ctrlKey: undefined; ++// /** ++// * Indicates whether the META key was pressed when the event fired. ++// * @see \`{@link https://api.jquery.com/event.metaKey/ }\` ++// * @since 1.0.4 ++// * @example ​ ````Determine whether the META key was pressed when the event fired. ++// ```html ++// ++// ++// ++// ++// event.metaKey demo ++// ++// ++// ++// ++// ​ ++// ++//
        ++// ​ ++// ++// ​ ++// ++// ++// ``` ++// */ ++// metaKey: undefined; ++// shiftKey: undefined; ++ ++// originalEvent?: _FocusEvent; ++// } ++ ++// interface BlurEvent< ++// TDelegateTarget = any, ++// TData = any, ++// TCurrentTarget = any, ++// TTarget = any ++// > extends FocusEventBase { ++// type: 'blur'; ++// } ++ ++// interface FocusEvent< ++// TDelegateTarget = any, ++// TData = any, ++// TCurrentTarget = any, ++// TTarget = any ++// > extends FocusEventBase { ++// type: 'focus'; ++// } ++ ++// interface FocusInEvent< ++// TDelegateTarget = any, ++// TData = any, ++// TCurrentTarget = any, ++// TTarget = any ++// > extends FocusEventBase { ++// type: 'focusin'; ++// } ++ ++// interface FocusOutEvent< ++// TDelegateTarget = any, ++// TData = any, ++// TCurrentTarget = any, ++// TTarget = any ++// > extends FocusEventBase { ++// type: 'focusout'; ++// } ++ ++// // #endregion ++ ++// // #endregion ++ ++// interface TypeToTriggeredEventMap< ++// TDelegateTarget, ++// TData, ++// TCurrentTarget, ++// TTarget ++// > { ++// // Event ++ ++// change: ChangeEvent; ++// resize: ResizeEvent; ++// scroll: ScrollEvent; ++// select: SelectEvent; ++// submit: SubmitEvent; ++ ++// // UIEvent ++ ++// // MouseEvent ++ ++// click: ClickEvent; ++// contextmenu: ContextMenuEvent; ++// dblclick: DoubleClickEvent; ++// mousedown: MouseDownEvent; ++// mouseenter: MouseEnterEvent; ++// mouseleave: MouseLeaveEvent; ++// mousemove: MouseMoveEvent; ++// mouseout: MouseOutEvent; ++// mouseover: MouseOverEvent; ++// mouseup: MouseUpEvent; ++ ++// // DragEvent ++ ++// drag: DragEvent; ++// dragend: DragEndEvent; ++// dragenter: DragEnterEvent; ++// dragexit: DragExitEvent; ++// dragleave: DragLeaveEvent; ++// dragover: DragOverEvent; ++// dragstart: DragStartEvent; ++// drop: DropEvent; ++ ++// // KeyboardEvent ++ ++// keydown: KeyDownEvent; ++// keypress: KeyPressEvent; ++// keyup: KeyUpEvent; ++ ++// // TouchEvent ++ ++// touchcancel: TouchCancelEvent; ++// touchend: TouchEndEvent; ++// touchmove: TouchMoveEvent; ++// touchstart: TouchStartEvent; ++ ++// // FocusEvent ++ ++// blur: BlurEvent; ++// focus: FocusEvent; ++// focusin: FocusInEvent; ++// focusout: FocusOutEvent; ++ ++// [type: string]: TriggeredEvent; ++// } ++ ++// // Extra parameters can be passed from trigger() ++// type EventHandlerBase = (this: TContext, t: T, ...args: any[]) => any; ++ ++// type EventHandler< ++// TCurrentTarget, ++// TData = undefined ++// > = EventHandlerBase>; ++ ++// type TypeEventHandler< ++// TDelegateTarget, ++// TData, ++// TCurrentTarget, ++// TTarget, ++// TType extends keyof TypeToTriggeredEventMap ++// > = EventHandlerBase[TType]>; ++ ++// interface TypeEventHandlers< ++// TDelegateTarget, ++// TData, ++// TCurrentTarget, ++// TTarget ++// > extends _TypeEventHandlers { ++// // No idea why it's necessary to include `object` in the union but otherwise TypeScript complains that ++// // derived types of Event are not assignable to Event. ++// [type: string]: TypeEventHandler | ++// false | ++// undefined | ++// object; ++// } ++ ++// type _TypeEventHandlers< ++// TDelegateTarget, ++// TData, ++// TCurrentTarget, ++// TTarget ++// > = { ++// [TType in keyof TypeToTriggeredEventMap]?: ++// TypeEventHandler | ++// false | ++// object; ++// }; ++ ++// // region Event extensions ++// // #region Event extensions ++ ++// interface EventExtensions { ++// /** ++// * The jQuery special event hooks are a set of per-event-name functions and properties that allow code to control the behavior of event processing within jQuery. The mechanism is similar to `fixHooks` in that the special event information is stored in `jQuery.event.special.NAME`, where `NAME` is the name of the special event. Event names are case sensitive. ++// * ++// * As with `fixHooks`, the special event hooks design assumes it will be very rare that two unrelated pieces of code want to process the same event name. Special event authors who need to modify events with existing hooks will need to take precautions to avoid introducing unwanted side-effects by clobbering those hooks. ++// * @see \`{@link https://learn.jquery.com/events/event-extensions/#special-event-hooks }\` ++// */ ++// special: SpecialEventHooks; ++// } ++ ++// // region Special event hooks ++// // #region Special event hooks ++ ++// /** ++// * The jQuery special event hooks are a set of per-event-name functions and properties that allow code to control the behavior of event processing within jQuery. The mechanism is similar to `fixHooks` in that the special event information is stored in `jQuery.event.special.NAME`, where `NAME` is the name of the special event. Event names are case sensitive. ++// * ++// * As with `fixHooks`, the special event hooks design assumes it will be very rare that two unrelated pieces of code want to process the same event name. Special event authors who need to modify events with existing hooks will need to take precautions to avoid introducing unwanted side-effects by clobbering those hooks. ++// * @see \`{@link https://learn.jquery.com/events/event-extensions/#special-event-hooks }\` ++// */ ++// // Workaround for TypeScript 2.3 which does not have support for weak types handling. ++// type SpecialEventHook = { ++// /** ++// * Indicates whether this event type should be bubbled when the `.trigger()` method is called; by default it is `false`, meaning that a triggered event will bubble to the element's parents up to the document (if attached to a document) and then to the window. Note that defining `noBubble` on an event will effectively prevent that event from being used for delegated events with `.trigger()`. ++// * @see \`{@link https://learn.jquery.com/events/event-extensions/#nobubble-boolean }\` ++// */ ++// noBubble: boolean; ++// } | { ++// /** ++// * When defined, these string properties specify that a special event should be handled like another event type until the event is delivered. The `bindType` is used if the event is attached directly, and the `delegateType` is used for delegated events. These types are generally DOM event types, and _should not_ be a special event themselves. ++// * @see \`{@link https://learn.jquery.com/events/event-extensions/#bindtype-string-delegatetype-string }\` ++// */ ++// bindType: string; ++// } | { ++// /** ++// * When defined, these string properties specify that a special event should be handled like another event type until the event is delivered. The `bindType` is used if the event is attached directly, and the `delegateType` is used for delegated events. These types are generally DOM event types, and _should not_ be a special event themselves. ++// * @see \`{@link https://learn.jquery.com/events/event-extensions/#bindtype-string-delegatetype-string }\` ++// */ ++// delegateType: string; ++// } | { ++// /** ++// * The setup hook is called the first time an event of a particular type is attached to an element; this provides the hook an opportunity to do processing that will apply to all events of this type on this element. The `this` keyword will be a reference to the element where the event is being attached and `eventHandle` is jQuery's event handler function. In most cases the `namespaces` argument should not be used, since it only represents the namespaces of the _first_ event being attached; subsequent events may not have this same namespaces. ++// * ++// * This hook can perform whatever processing it desires, including attaching its own event handlers to the element or to other elements and recording setup information on the element using the `jQuery.data()` method. If the setup hook wants jQuery to add a browser event (via `addEventListener` or `attachEvent`, depending on browser) it should return `false`. In all other cases, jQuery will not add the browser event, but will continue all its other bookkeeping for the event. This would be appropriate, for example, if the event was never fired by the browser but invoked by `.trigger()`. To attach the jQuery event handler in the setup hook, use the `eventHandle` argument. ++// * @see \`{@link https://learn.jquery.com/events/event-extensions/#setup-function-data-object-namespaces-eventhandle-function }\` ++// */ ++// setup(this: TTarget, data: TData, namespaces: string, eventHandle: EventHandler): void | false; ++// } | { ++// /** ++// * The teardown hook is called when the final event of a particular type is removed from an element. The `this` keyword will be a reference to the element where the event is being cleaned up. This hook should return `false` if it wants jQuery to remove the event from the browser's event system (via `removeEventListener` or `detachEvent`). In most cases, the setup and teardown hooks should return the same value. ++// * ++// * If the setup hook attached event handlers or added data to an element through a mechanism such as `jQuery.data()`, the teardown hook should reverse the process and remove them. jQuery will generally remove the data and events when an element is totally removed from the document, but failing to remove data or events on teardown will cause a memory leak if the element stays in the document. ++// * @see \`{@link https://learn.jquery.com/events/event-extensions/#teardown-function }\` ++// */ ++// teardown(this: TTarget): void | false; ++// } | { ++// /** ++// * Each time an event handler is added to an element through an API such as `.on()`, jQuery calls this hook. The `this` keyword will be the element to which the event handler is being added, and the `handleObj` argument is as described in the section above. The return value of this hook is ignored. ++// * @see \`{@link https://learn.jquery.com/events/event-extensions/#add-function-handleobj }\` ++// */ ++// add(this: TTarget, handleObj: HandleObject): void; ++// } | { ++// /** ++// * When an event handler is removed from an element using an API such as `.off()`, this hook is called. The `this` keyword will be the element where the handler is being removed, and the `handleObj` argument is as described in the section above. The return value of this hook is ignored. ++// * @see \`{@link https://learn.jquery.com/events/event-extensions/#remove-function-handleobj }\` ++// */ ++// remove(this: TTarget, handleObj: HandleObject): void; ++// } | { ++// /** ++// * Called when the `.trigger()` or `.triggerHandler()` methods are used to trigger an event for the special type from code, as opposed to events that originate from within the browser. The `this` keyword will be the element being triggered, and the event argument will be a `jQuery.Event` object constructed from the caller's input. At minimum, the event type, data, namespace, and target properties are set on the event. The data argument represents additional data passed by `.trigger()` if present. ++// * ++// * The trigger hook is called early in the process of triggering an event, just after the `jQuery.Event` object is constructed and before any handlers have been called. It can process the triggered event in any way, for example by calling `event.stopPropagation()` or `event.preventDefault()` before returning. If the hook returns `false`, jQuery does not perform any further event triggering actions and returns immediately. Otherwise, it performs the normal trigger processing, calling any event handlers for the element and bubbling the event (unless propagation is stopped in advance or `noBubble` was specified for the special event) to call event handlers attached to parent elements. ++// * @see \`{@link https://learn.jquery.com/events/event-extensions/#trigger-function-event-jquery-event-data-object }\` ++// */ ++// trigger(this: TTarget, event: Event, data: TData): void | false; ++// } | { ++// /** ++// * When the `.trigger()` method finishes running all the event handlers for an event, it also looks for and runs any method on the target object by the same name unless of the handlers called `event.preventDefault()`. So, `.trigger( "submit" )` will execute the `submit()` method on the element if one exists. When a `_default` hook is specified, the hook is called just prior to checking for and executing the element's default method. If this hook returns the value `false` the element's default method will be called; otherwise it is not. ++// * @see \`{@link https://learn.jquery.com/events/event-extensions/#_default-function-event-jquery-event-data-object }\` ++// */ ++// _default(event: TriggeredEvent, data: TData): void | false; ++// } | { ++// /** ++// * jQuery calls a handle hook when the event has occurred and jQuery would normally call the user's event handler specified by `.on()` or another event binding method. If the hook exists, jQuery calls it _instead_ of that event handler, passing it the event and any data passed from `.trigger()` if it was not a native event. The `this` keyword is the DOM element being handled, and `event.handleObj` property has the detailed event information. ++// * ++// * Based in the information it has, the handle hook should decide whether to call the original handler function which is in `event.handleObj.handler`. It can modify information in the event object before calling the original handler, but _must restore_ that data before returning or subsequent unrelated event handlers may act unpredictably. In most cases, the handle hook should return the result of the original handler, but that is at the discretion of the hook. The handle hook is unique in that it is the only special event function hook that is called under its original special event name when the type is mapped using `bindType` and `delegateType`. For that reason, it is almost always an error to have anything other than a handle hook present if the special event defines a `bindType` and `delegateType`, since those other hooks will never be called. ++// * @see \`{@link https://learn.jquery.com/events/event-extensions/#handle-function-event-jquery-event-data-object }\` ++// */ ++// handle(this: TTarget, event: TriggeredEvent & { handleObj: HandleObject; }, ...data: TData[]): void; ++// } | { ++// preDispatch(this: TTarget, event: Event): false | void; ++// } | { ++// postDispatch(this: TTarget, event: Event): void; ++// } | { ++// [key: string]: never; ++// }; ++ ++// interface SpecialEventHooks { ++// [event: string]: SpecialEventHook; ++// } ++ ++// /** ++// * Many of the special event hook functions below are passed a `handleObj` object that provides more information about the event, how it was attached, and its current state. This object and its contents should be treated as read-only data, and only the properties below are documented for use by special event handlers. ++// * @see \`{@link https://learn.jquery.com/events/event-extensions/#the-handleobj-object }\` ++// */ ++// interface HandleObject { ++// /** ++// * The type of event, such as `"click"`. When special event mapping is used via `bindType` or `delegateType`, this will be the mapped type. ++// */ ++// readonly type: string; ++// /** ++// * The original type name regardless of whether it was mapped via `bindType` or `delegateType`. So when a "pushy" event is mapped to "click" its `origType` would be "pushy". ++// */ ++// readonly origType: string; ++// /** ++// * Namespace(s), if any, provided when the event was attached, such as `"myPlugin"`. When multiple namespaces are given, they are separated by periods and sorted in ascending alphabetical order. If no namespaces are provided, this property is an empty string. ++// */ ++// readonly namespace: string; ++// /** ++// * For delegated events, this is the selector used to filter descendant elements and determine if the handler should be called. For directly bound events, this property is `null`. ++// */ ++// readonly selector: string | undefined | null; ++// /** ++// * The data, if any, passed to jQuery during event binding, e.g. `{ myData: 42 }`. If the data argument was omitted or `undefined`, this property is `undefined` as well. ++// */ ++// readonly data: TData; ++// /** ++// * Event handler function passed to jQuery during event binding. If `false` was passed during event binding, the handler refers to a single shared function that simply returns `false`. ++// */ ++// readonly handler: EventHandler; ++// } ++ ++// // #endregion ++ ++// // #endregion ++ ++// // #endregion ++ ++// interface NameValuePair { ++// name: string; ++// value: string; ++// } ++ ++// // region Coordinates ++// // #region Coordinates ++ ++// interface Coordinates { ++// left: number; ++// top: number; ++// } ++ ++// // Workaround for TypeScript 2.3 which does not have support for weak types handling. ++// type CoordinatesPartial = ++// Pick | ++// Pick | ++// { [key: string]: never; }; ++ ++// // #endregion ++ ++// // region Val hooks ++// // #region Val hooks ++ ++// // Workaround for TypeScript 2.3 which does not have support for weak types handling. ++// type ValHook = { ++// get(elem: TElement): any; ++// } | { ++// set(elem: TElement, value: any): any; ++// } | { ++// [key: string]: never; ++// }; ++ ++// interface ValHooks { ++// // Set to HTMLElement to minimize breaks but should probably be Element. ++// [nodeName: string]: ValHook; ++// } ++ ++// // #endregion ++ ++// type _Falsy = false | null | undefined | 0 | '' | typeof document.all; ++// } ++ ++// declare const jQuery: JQueryStatic; ++// declare const $: JQueryStatic; ++ ++// type _Event = Event; ++// type _UIEvent = UIEvent; ++// type _MouseEvent = MouseEvent; ++// type _DragEvent = DragEvent; ++// type _KeyboardEvent = KeyboardEvent; ++// type _TouchEvent = TouchEvent; ++// type _FocusEvent = FocusEvent; ++ ++// // region ES5 compatibility ++// // #region ES5 compatibility ++ ++// // Forward declaration of `Iterable`. ++// // tslint:disable-next-line:no-empty-interface ++// interface Iterable { } ++ ++// interface SymbolConstructor { ++// /** ++// * A String value that is used in the creation of the default string description of an object. ++// * Called by the built-in method Object.prototype.toString. ++// */ ++// readonly toStringTag: symbol; ++// } ++ ++// declare var Symbol: SymbolConstructor; ++ ++// // #endregion diff --git a/patches/@types+mocha+8.0.3.patch b/patches/@types+mocha+8.0.3.patch new file mode 100644 index 000000000000..af86658d6b77 --- /dev/null +++ b/patches/@types+mocha+8.0.3.patch @@ -0,0 +1,5607 @@ +diff --git a/node_modules/@types/mocha/index.d.ts b/node_modules/@types/mocha/index.d.ts +index 8d4c6db..307f232 100644 +--- a/node_modules/@types/mocha/index.d.ts ++++ b/node_modules/@types/mocha/index.d.ts +@@ -1,2801 +1,2801 @@ +-// Type definitions for mocha 8.0 +-// Project: https://mochajs.org +-// Definitions by: Kazi Manzur Rashid +-// otiai10 +-// Vadim Macagon +-// Andrew Bradley +-// Dmitrii Sorin +-// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped +-// TypeScript Version: 2.1 +- +-/** +- * Mocha API +- * +- * @see https://mochajs.org/api/mocha +- */ +-declare class Mocha { +- private _growl; +- private _reporter; +- private _ui; +- +- constructor(options?: Mocha.MochaOptions); +- +- suite: Mocha.Suite; +- files: string[]; +- options: Mocha.MochaInstanceOptions; +- +- /** +- * Enable or disable bailing on the first failure. +- * +- * @see https://mochajs.org/api/mocha#bail +- */ +- bail(bail?: boolean): this; +- +- /** +- * Add test `file`. +- * +- * @see https://mochajs.org/api/mocha#addFile +- */ +- addFile(file: string): this; +- +- /** +- * Set reporter to one of the built-in reporters. +- * +- * @see https://mochajs.org/api/mocha#reporter +- */ +- reporter(reporter: Mocha.Reporter, reporterOptions?: any): this; +- +- /** +- * Set reporter to the provided constructor, one of the built-in reporters, or loads a reporter +- * from a module path. Defaults to `"spec"`. +- * +- * @see https://mochajs.org/api/mocha#reporter +- */ +- reporter(reporter?: string | Mocha.ReporterConstructor, reporterOptions?: any): this; +- +- /** +- * Set test UI to one of the built-in test interfaces. +- * +- * @see https://mochajs.org/api/mocha#ui +- */ +- ui(name: Mocha.Interface): this; +- +- /** +- * Set test UI to one of the built-in test interfaces or loads a test interface from a module +- * path. Defaults to `"bdd"`. +- * +- * @see https://mochajs.org/api/mocha#ui +- */ +- ui(name?: string): this; +- +- /** +- * Escape string and add it to grep as a RegExp. +- * +- * @see https://mochajs.org/api/mocha#fgrep +- */ +- fgrep(str: string): this; +- +- /** +- * Add regexp to grep, if `re` is a string it is escaped. +- * +- * @see https://mochajs.org/api/mocha#grep +- */ +- grep(re: string | RegExp): this; +- +- /** +- * Invert `.grep()` matches. +- * +- * @see https://mochajs.org/api/mocha#invert +- */ +- invert(): this; +- +- /** +- * Enable global leak checking. +- * +- * @see https://mochajs.org/api/mocha#checkLeaks +- */ +- checkLeaks(): this; +- +- /** +- * Display long stack-trace on failing +- * +- * @see https://mochajs.org/api/mocha#fullTrace +- */ +- fullTrace(): this; +- +- /** +- * Enable growl support. +- * +- * @see https://mochajs.org/api/mocha#growl +- */ +- growl(): this; +- +- /** +- * Ignore `globals` array or string. +- * +- * @see https://mochajs.org/api/mocha#globals +- */ +- globals(globals: string | ReadonlyArray): this; +- +- /** +- * Set the timeout in milliseconds. +- * +- * @see https://mochajs.org/api/mocha#timeout +- */ +- timeout(timeout: string | number): this; +- +- /** +- * Set the number of times to retry failed tests. +- * +- * @see https://mochajs.org/api/mocha#retries +- */ +- retries(n: number): this; +- +- /** +- * Set slowness threshold in milliseconds. +- * +- * @see https://mochajs.org/api/mocha#slow +- */ +- slow(slow: string | number): this; +- +- /** +- * Makes all tests async (accepting a callback) +- * +- * @see https://mochajs.org/api/mocha#asyncOnly. +- */ +- asyncOnly(): this; +- +- /** +- * Disable syntax highlighting (in browser). +- * +- * @see https://mochajs.org/api/mocha#noHighlighting +- */ +- noHighlighting(): this; +- +- /** +- * Enable uncaught errors to propagate (in browser). +- * +- * @see https://mochajs.org/api/mocha#allowUncaught +- */ +- allowUncaught(): boolean; +- +- /** +- * Delay root suite execution. +- * +- * @see https://mochajs.org/api/mocha#delay +- */ +- delay(): boolean; +- +- /** +- * Tests marked only fail the suite +- * +- * @see https://mochajs.org/api/mocha#forbidOnly +- */ +- forbidOnly(): boolean; +- +- /** +- * Pending tests and tests marked skip fail the suite +- * +- * @see https://mochajs.org/api/mocha#forbidPending +- */ +- forbidPending(): boolean; +- +- /** +- * Run tests and invoke `fn()` when complete. +- * +- * Note that `run` relies on Node's `require` to execute +- * the test interface functions and will be subject to the +- * cache - if the files are already in the `require` cache, +- * they will effectively be skipped. Therefore, to run tests +- * multiple times or to run tests in files that are already +- * in the `require` cache, make sure to clear them from the +- * cache first in whichever manner best suits your needs. +- * +- * @see https://mochajs.org/api/mocha#run +- */ +- run(fn?: (failures: number) => void): Mocha.Runner; +- +- /** +- * Loads ESM (and CJS) test files asynchronously. +- * +- * @see https://mochajs.org/api/mocha#loadFilesAsync +- */ +- loadFilesAsync(): Promise; +- +- /** +- * Load registered files. +- * +- * @see https://mochajs.org/api/mocha#loadFiles +- */ +- protected loadFiles(fn?: () => void): void; +- +- /** +- * Unloads `files` from Node's `require` cache. +- * +- * This allows required files to be "freshly" reloaded, providing the ability +- * to reuse a Mocha instance programmatically. +- * Note: does not clear ESM module files from the cache +- */ +- unloadFiles(): this; +- +- /** +- * Toggles parallel mode. +- * +- * Must be run before calling `run`. Changes the `Runner` class to +- * use; also enables lazy file loading if not already done so. +- * +- * @see https://mochajs.org/api/mocha#parallelMode +- */ +- parallelMode(enabled?: boolean): this; +- +- /** +- * Assigns hooks to the root suite. +- * +- * @see https://mochajs.org/api/mocha#rootHooks +- */ +- rootHooks(hooks: Mocha.RootHookObject): this; +-} +- +-declare namespace Mocha { +- namespace utils { +- /** +- * Compute a slug from the given `str`. +- * +- * @see https://mochajs.org/api/module-utils.html#.slug +- */ +- function slug(str: string): string; +- +- /** +- * Strip the function definition from `str`, and re-indent for pre whitespace. +- * +- * @see https://mochajs.org/api/module-utils.html#.clean +- */ +- function clean(str: string): string; +- +- /** +- * Highlight the given string of `js`. +- */ +- function highlight(js: string): string; +- +- /** +- * Takes some variable and asks `Object.prototype.toString()` what it thinks it is. +- */ +- function type(value: any): string; +- +- /** +- * Stringify `value`. Different behavior depending on type of value: +- * +- * - If `value` is undefined or null, return `'[undefined]'` or `'[null]'`, respectively. +- * - If `value` is not an object, function or array, return result of `value.toString()` wrapped in double-quotes. +- * - If `value` is an *empty* object, function, or array, returns `'{}'`, `'[Function]'`, or `'[]'` respectively. +- * - If `value` has properties, call canonicalize} on it, then return result of `JSON.stringify()` +- * +- * @see https://mochajs.org/api/module-utils.html#.stringify +- */ +- function stringify(value: any): string; +- +- /** +- * Return a new Thing that has the keys in sorted order. Recursive. +- * +- * If the Thing... +- * - has already been seen, return string `'[Circular]'` +- * - is `undefined`, return string `'[undefined]'` +- * - is `null`, return value `null` +- * - is some other primitive, return the value +- * - is not a primitive or an `Array`, `Object`, or `Function`, return the value of the Thing's `toString()` method +- * - is a non-empty `Array`, `Object`, or `Function`, return the result of calling this function again. +- * - is an empty `Array`, `Object`, or `Function`, returns `'[]'`, `'{}'`, or `'[Function]'` respectively. +- * +- * @see https://mochajs.org/api/module-utils.html#.canonicalize +- */ +- function canonicalize(value: any, stack: any[], typeHint: string): any; +- +- /** +- * Lookup file names at the given `path`. +- * +- * @see https://mochajs.org/api/Mocha.utils.html#.exports.lookupFiles +- */ +- function lookupFiles(filepath: string, extensions?: string[], recursive?: boolean): string[]; +- +- /** +- * Generate an undefined error with a message warning the user. +- * +- * @see https://mochajs.org/api/module-utils.html#.undefinedError +- */ +- function undefinedError(): Error; +- +- /** +- * Generate an undefined error if `err` is not defined. +- * +- * @see https://mochajs.org/api/module-utils.html#.getError +- */ +- function getError(err: Error | undefined): Error; +- +- /** +- * When invoking this function you get a filter function that get the Error.stack as an +- * input, and return a prettify output. (i.e: strip Mocha and internal node functions from +- * stack trace). +- * +- * @see https://mochajs.org/api/module-utils.html#.stackTraceFilter +- */ +- function stackTraceFilter(): (stack: string) => string; +- } +- +- namespace interfaces { +- function bdd(suite: Suite): void; +- function tdd(suite: Suite): void; +- function qunit(suite: Suite): void; +- function exports(suite: Suite): void; +- } +- +- // #region Test interface augmentations +- +- interface HookFunction { +- /** +- * [bdd, qunit, tdd] Describe a "hook" to execute the given callback `fn`. The name of the +- * function is used as the name of the hook. +- * +- * - _Only available when invoked via the mocha CLI._ +- */ +- (fn: Func): void; +- +- /** +- * [bdd, qunit, tdd] Describe a "hook" to execute the given callback `fn`. The name of the +- * function is used as the name of the hook. +- * +- * - _Only available when invoked via the mocha CLI._ +- */ +- (fn: AsyncFunc): void; +- +- /** +- * [bdd, qunit, tdd] Describe a "hook" to execute the given `title` and callback `fn`. +- * +- * - _Only available when invoked via the mocha CLI._ +- */ +- (name: string, fn?: Func): void; +- +- /** +- * [bdd, qunit, tdd] Describe a "hook" to execute the given `title` and callback `fn`. +- * +- * - _Only available when invoked via the mocha CLI._ +- */ +- (name: string, fn?: AsyncFunc): void; +- } +- +- interface SuiteFunction { +- /** +- * [bdd, tdd] Describe a "suite" with the given `title` and callback `fn` containing +- * nested suites. +- * +- * - _Only available when invoked via the mocha CLI._ +- */ +- (title: string, fn: (this: Suite) => void): Suite; +- +- /** +- * [qunit] Describe a "suite" with the given `title`. +- * +- * - _Only available when invoked via the mocha CLI._ +- */ +- (title: string): Suite; +- +- /** +- * [bdd, tdd, qunit] Indicates this suite should be executed exclusively. +- * +- * - _Only available when invoked via the mocha CLI._ +- */ +- only: ExclusiveSuiteFunction; +- +- /** +- * [bdd, tdd] Indicates this suite should not be executed. +- * +- * - _Only available when invoked via the mocha CLI._ +- */ +- skip: PendingSuiteFunction; +- } +- +- interface ExclusiveSuiteFunction { +- /** +- * [bdd, tdd] Describe a "suite" with the given `title` and callback `fn` containing +- * nested suites. Indicates this suite should be executed exclusively. +- * +- * - _Only available when invoked via the mocha CLI._ +- */ +- (title: string, fn: (this: Suite) => void): Suite; +- +- /** +- * [qunit] Describe a "suite" with the given `title`. Indicates this suite should be executed +- * exclusively. +- * +- * - _Only available when invoked via the mocha CLI._ +- */ +- (title: string): Suite; +- } +- +- /** +- * [bdd, tdd] Describe a "suite" with the given `title` and callback `fn` containing +- * nested suites. Indicates this suite should not be executed. +- * +- * - _Only available when invoked via the mocha CLI._ +- * +- * @returns [bdd] `Suite` +- * @returns [tdd] `void` +- */ +- interface PendingSuiteFunction { +- (title: string, fn: (this: Suite) => void): Suite | void; +- } +- +- interface TestFunction { +- /** +- * Describe a specification or test-case with the given callback `fn` acting as a thunk. +- * The name of the function is used as the name of the test. +- * +- * - _Only available when invoked via the mocha CLI._ +- */ +- (fn: Func): Test; +- +- /** +- * Describe a specification or test-case with the given callback `fn` acting as a thunk. +- * The name of the function is used as the name of the test. +- * +- * - _Only available when invoked via the mocha CLI._ +- */ +- (fn: AsyncFunc): Test; +- +- /** +- * Describe a specification or test-case with the given `title` and callback `fn` acting +- * as a thunk. +- * +- * - _Only available when invoked via the mocha CLI._ +- */ +- (title: string, fn?: Func): Test; +- +- /** +- * Describe a specification or test-case with the given `title` and callback `fn` acting +- * as a thunk. +- * +- * - _Only available when invoked via the mocha CLI._ +- */ +- (title: string, fn?: AsyncFunc): Test; +- +- /** +- * Indicates this test should be executed exclusively. +- * +- * - _Only available when invoked via the mocha CLI._ +- */ +- only: ExclusiveTestFunction; +- +- /** +- * Indicates this test should not be executed. +- * +- * - _Only available when invoked via the mocha CLI._ +- */ +- skip: PendingTestFunction; +- +- /** +- * Number of attempts to retry. +- * +- * - _Only available when invoked via the mocha CLI._ +- */ +- retries(n: number): void; +- } +- +- interface ExclusiveTestFunction { +- /** +- * [bdd, tdd, qunit] Describe a specification or test-case with the given callback `fn` +- * acting as a thunk. The name of the function is used as the name of the test. Indicates +- * this test should be executed exclusively. +- * +- * - _Only available when invoked via the mocha CLI._ +- */ +- (fn: Func): Test; +- +- /** +- * [bdd, tdd, qunit] Describe a specification or test-case with the given callback `fn` +- * acting as a thunk. The name of the function is used as the name of the test. Indicates +- * this test should be executed exclusively. +- * +- * - _Only available when invoked via the mocha CLI._ +- */ +- (fn: AsyncFunc): Test; +- +- /** +- * [bdd, tdd, qunit] Describe a specification or test-case with the given `title` and +- * callback `fn` acting as a thunk. Indicates this test should be executed exclusively. +- * +- * - _Only available when invoked via the mocha CLI._ +- */ +- (title: string, fn?: Func): Test; +- +- /** +- * [bdd, tdd, qunit] Describe a specification or test-case with the given `title` and +- * callback `fn` acting as a thunk. Indicates this test should be executed exclusively. +- * +- * - _Only available when invoked via the mocha CLI._ +- */ +- (title: string, fn?: AsyncFunc): Test; +- } +- +- interface PendingTestFunction { +- /** +- * [bdd, tdd, qunit] Describe a specification or test-case with the given callback `fn` +- * acting as a thunk. The name of the function is used as the name of the test. Indicates +- * this test should not be executed. +- * +- * - _Only available when invoked via the mocha CLI._ +- */ +- (fn: Func): Test; +- +- /** +- * [bdd, tdd, qunit] Describe a specification or test-case with the given callback `fn` +- * acting as a thunk. The name of the function is used as the name of the test. Indicates +- * this test should not be executed. +- * +- * - _Only available when invoked via the mocha CLI._ +- */ +- (fn: AsyncFunc): Test; +- +- /** +- * [bdd, tdd, qunit] Describe a specification or test-case with the given `title` and +- * callback `fn` acting as a thunk. Indicates this test should not be executed. +- * +- * - _Only available when invoked via the mocha CLI._ +- */ +- (title: string, fn?: Func): Test; +- +- /** +- * [bdd, tdd, qunit] Describe a specification or test-case with the given `title` and +- * callback `fn` acting as a thunk. Indicates this test should not be executed. +- * +- * - _Only available when invoked via the mocha CLI._ +- */ +- (title: string, fn?: AsyncFunc): Test; +- } +- +- /** +- * Execute after each test case. +- * +- * - _Only available when invoked via the mocha CLI._ +- * +- * @see https://mochajs.org/api/global.html#afterEach +- */ +- let afterEach: HookFunction; +- +- /** +- * Execute after running tests. +- * +- * - _Only available when invoked via the mocha CLI._ +- * +- * @see https://mochajs.org/api/global.html#after +- */ +- let after: HookFunction; +- +- /** +- * Execute before each test case. +- * +- * - _Only available when invoked via the mocha CLI._ +- * +- * @see https://mochajs.org/api/global.html#beforeEach +- */ +- let beforeEach: HookFunction; +- +- /** +- * Execute before running tests. +- * +- * - _Only available when invoked via the mocha CLI._ +- * +- * @see https://mochajs.org/api/global.html#before +- */ +- let before: HookFunction; +- +- /** +- * Describe a "suite" containing nested suites and tests. +- * +- * - _Only available when invoked via the mocha CLI._ +- */ +- let describe: SuiteFunction; +- +- /** +- * Describes a test case. +- * +- * - _Only available when invoked via the mocha CLI._ +- */ +- let it: TestFunction; +- +- /** +- * Describes a pending test case. +- * +- * - _Only available when invoked via the mocha CLI._ +- */ +- let xit: PendingTestFunction; +- +- /** +- * Execute before each test case. +- * +- * - _Only available when invoked via the mocha CLI._ +- * +- * @see https://mochajs.org/api/global.html#beforeEach +- */ +- let setup: HookFunction; +- +- /** +- * Execute before running tests. +- * +- * - _Only available when invoked via the mocha CLI._ +- * +- * @see https://mochajs.org/api/global.html#before +- */ +- let suiteSetup: HookFunction; +- +- /** +- * Execute after running tests. +- * +- * - _Only available when invoked via the mocha CLI._ +- * +- * @see https://mochajs.org/api/global.html#after +- */ +- let suiteTeardown: HookFunction; +- +- /** +- * Describe a "suite" containing nested suites and tests. +- * +- * - _Only available when invoked via the mocha CLI._ +- */ +- let suite: SuiteFunction; +- +- /** +- * Execute after each test case. +- * +- * - _Only available when invoked via the mocha CLI._ +- * +- * @see https://mochajs.org/api/global.html#afterEach +- */ +- let teardown: HookFunction; +- +- /** +- * Describes a test case. +- * +- * - _Only available when invoked via the mocha CLI._ +- */ +- let test: TestFunction; +- +- /** +- * Triggers root suite execution. +- * +- * - _Only available if flag --delay is passed into Mocha._ +- * - _Only available when invoked via the mocha CLI._ +- * +- * @see https://mochajs.org/api/global.html#runWithSuite +- */ +- function run(): void; +- +- // #endregion Test interface augmentations +- +- namespace reporters { +- /** +- * Initialize a new `Base` reporter. +- * +- * All other reporters generally inherit from this reporter, providing stats such as test duration, +- * number of tests passed / failed, etc. +- * +- * @see https://mochajs.org/api/Mocha.reporters.Base.html +- */ +- class Base { +- constructor(runner: Runner, options?: MochaOptions); +- +- /** +- * Test run statistics +- */ +- stats: Stats; +- +- /** +- * Test failures +- */ +- failures: Test[]; +- +- /** +- * The configured runner +- */ +- runner: Runner; +- +- /** +- * Output common epilogue used by many of the bundled reporters. +- * +- * @see https://mochajs.org/api/Mocha.reporters.Base.html#.Base#epilogue +- */ +- epilogue(): void; +- +- done?(failures: number, fn?: (failures: number) => void): void; +- } +- +- namespace Base { +- /** +- * Enables coloring by default +- * +- * @see https://mochajs.org/api/module-base#.useColors +- */ +- let useColors: boolean; +- +- /** +- * Inline diffs instead of +/- +- * +- * @see https://mochajs.org/api/module-base#.inlineDiffs +- */ +- let inlineDiffs: boolean; +- +- /** +- * Default color map +- * +- * @see https://mochajs.org/api/module-base#.colors +- */ +- const colors: ColorMap; +- +- /** +- * Default color map +- * +- * @see https://mochajs.org/api/module-base#.colors +- */ +- interface ColorMap { +- // added by Base +- pass: number; +- fail: number; +- "bright pass": number; +- "bright fail": number; +- "bright yellow": number; +- pending: number; +- suite: number; +- "error title": number; +- "error message": number; +- "error stack": number; +- checkmark: number; +- fast: number; +- medium: number; +- slow: number; +- green: number; +- light: number; +- "diff gutter": number; +- "diff added": number; +- "diff removed": number; +- +- // added by Progress +- progress: number; +- +- // added by Landing +- plane: number; +- "plane crash": number; +- runway: number; +- +- [key: string]: number; +- } +- +- /** +- * Default symbol map +- * +- * @see https://mochajs.org/api/module-base#.symbols +- */ +- const symbols: SymbolMap; +- +- /** +- * Default symbol map +- * +- * @see https://mochajs.org/api/module-base#.symbols +- */ +- interface SymbolMap { +- ok: string; +- err: string; +- dot: string; +- comma: string; +- bang: string; +- [key: string]: string; +- } +- +- /** +- * Color `str` with the given `type` (from `colors`) +- * +- * @see https://mochajs.org/api/module-base#.color +- */ +- function color(type: string, str: string): string; +- +- /** +- * Expose terminal window size +- * +- * @see https://mochajs.org/api/module-base#.window +- */ +- const window: { +- width: number; +- }; +- +- /** +- * ANSI TTY control sequences common among reporters. +- * +- * @see https://mochajs.org/api/module-base#.cursor +- */ +- namespace cursor { +- /** +- * Hides the cursor +- */ +- function hide(): void; +- +- /** +- * Shows the cursor +- */ +- function show(): void; +- +- /** +- * Deletes the current line +- */ +- function deleteLine(): void; +- +- /** +- * Moves to the beginning of the line +- */ +- function beginningOfLine(): void; +- +- /** +- * Clears the line and moves to the beginning of the line. +- */ +- function CR(): void; +- } +- +- /** +- * Returns a diff between two strings with colored ANSI output. +- * +- * @see https://mochajs.org/api/module-base#.generateDiff +- */ +- function generateDiff(actual: string, expected: string): string; +- +- /** +- * Output the given `failures` as a list. +- * +- * @see https://mochajs.org/api/Mocha.reporters.Base.html#.exports.list1 +- */ +- function list(failures: Test[]): void; +- } +- +- /** +- * Initialize a new `Dot` matrix test reporter. +- * +- * @see https://mochajs.org/api/Mocha.reporters.Dot.html +- */ +- class Dot extends Base { +- } +- +- /** +- * Initialize a new `Doc` reporter. +- * +- * @see https://mochajs.org/api/Mocha.reporters.Doc.html +- */ +- class Doc extends Base { +- } +- +- /** +- * Initialize a new `TAP` test reporter. +- * +- * @see https://mochajs.org/api/Mocha.reporters.TAP.html +- */ +- class TAP extends Base { +- } +- +- /** +- * Initialize a new `JSON` reporter +- * +- * @see https://mochajs.org/api/Mocha.reporters.JSON.html +- */ +- class JSON extends Base { +- } +- +- /** +- * Initialize a new `HTML` reporter. +- * +- * - _This reporter cannot be used on the console._ +- * +- * @see https://mochajs.org/api/Mocha.reporters.HTML.html +- */ +- class HTML extends Base { +- /** +- * Provide suite URL. +- * +- * @see https://mochajs.org/api/Mocha.reporters.HTML.html#suiteURL +- */ +- suiteURL(suite: Suite): string; +- +- /** +- * Provide test URL. +- * +- * @see https://mochajs.org/api/Mocha.reporters.HTML.html#testURL +- */ +- testURL(test: Test): string; +- +- /** +- * Adds code toggle functionality for the provided test's list element. +- * +- * @see https://mochajs.org/api/Mocha.reporters.HTML.html#addCodeToggle +- */ +- addCodeToggle(el: HTMLLIElement, contents: string): void; +- } +- +- /** +- * Initialize a new `List` test reporter. +- * +- * @see https://mochajs.org/api/Mocha.reporters.List.html +- */ +- class List extends Base { +- } +- +- /** +- * Initialize a new `Min` minimal test reporter (best used with --watch). +- * +- * @see https://mochajs.org/api/Mocha.reporters.Min.html +- */ +- class Min extends Base { +- } +- +- /** +- * Initialize a new `Spec` test reporter. +- * +- * @see https://mochajs.org/api/Mocha.reporters.Spec.html +- */ +- class Spec extends Base { +- } +- +- /** +- * Initialize a new `NyanCat` test reporter. +- * +- * @see https://mochajs.org/api/Mocha.reporters.Nyan.html +- */ +- class Nyan extends Base { +- private colorIndex; +- private numberOfLines; +- private rainbowColors; +- private scoreboardWidth; +- private tick; +- private trajectories; +- private trajectoryWidthMax; +- private draw; +- private drawScoreboard; +- private appendRainbow; +- private drawRainbow; +- private drawNyanCat; +- private face; +- private cursorUp; +- private cursorDown; +- private generateColors; +- private rainbowify; +- } +- +- /** +- * Initialize a new `XUnit` test reporter. +- * +- * @see https://mochajs.org/api/Mocha.reporters.XUnit.html +- */ +- class XUnit extends Base { +- constructor(runner: Runner, options?: XUnit.MochaOptions); +- +- /** +- * Override done to close the stream (if it's a file). +- * +- * @see https://mochajs.org/api/Mocha.reporters.XUnit.html#done +- */ +- done(failures: number, fn: (failures: number) => void): void; +- +- /** +- * Write out the given line. +- * +- * @see https://mochajs.org/api/Mocha.reporters.XUnit.html#write +- */ +- write(line: string): void; +- +- /** +- * Output tag for the given `test.` +- * +- * @see https://mochajs.org/api/Mocha.reporters.XUnit.html#test +- */ +- test(test: Test): void; +- } +- +- namespace XUnit { +- interface MochaOptions extends Mocha.MochaOptions { +- reporterOptions?: ReporterOptions; +- } +- +- interface ReporterOptions { +- output?: string; +- suiteName?: string; +- } +- } +- +- /** +- * Initialize a new `Markdown` test reporter. +- * +- * @see https://mochajs.org/api/Mocha.reporters.Markdown.html +- */ +- class Markdown extends Base { +- } +- +- /** +- * Initialize a new `Progress` bar test reporter. +- * +- * @see https://mochajs.org/api/Mocha.reporters.Progress.html +- */ +- class Progress extends Base { +- constructor(runner: Runner, options?: Progress.MochaOptions); +- } +- +- namespace Progress { +- interface MochaOptions extends Mocha.MochaOptions { +- reporterOptions?: ReporterOptions; +- } +- +- interface ReporterOptions { +- open?: string; +- complete?: string; +- incomplete?: string; +- close?: string; +- verbose?: boolean; +- } +- } +- +- /** +- * Initialize a new `Landing` reporter. +- * +- * @see https://mochajs.org/api/Mocha.reporters.Landing.html +- */ +- class Landing extends Base { +- } +- +- /** +- * Initialize a new `JSONStream` test reporter. +- * +- * @see https://mochajs.org/api/Mocha.reporters.JSONStream.html +- */ +- class JSONStream extends Base { +- } +- +- // value-only aliases +- const base: typeof Base; +- const dot: typeof Dot; +- const doc: typeof Doc; +- const tap: typeof TAP; +- const json: typeof JSON; +- const html: typeof HTML; +- const list: typeof List; +- const spec: typeof Spec; +- const nyan: typeof Nyan; +- const xunit: typeof XUnit; +- const markdown: typeof Markdown; +- const progress: typeof Progress; +- const landing: typeof Landing; +- // NOTE: not possible to type this correctly: +- // const "json-stream": typeof JSONStream; +- } +- +- /** +- * Initialize a new `Runnable` with the given `title` and callback `fn`. +- * +- * @see https://mochajs.org/api/Runnable.html +- */ +- class Runnable { +- private _slow; +- private _retries; +- private _currentRetry; +- private _timeout; +- private _timeoutError; +- +- constructor(title: string, fn?: Func | AsyncFunc); +- +- title: string; +- fn: Func | AsyncFunc | undefined; +- body: string; +- async: boolean; +- sync: boolean; +- timedOut: boolean; +- pending: boolean; +- duration?: number; +- parent?: Suite; +- state?: "failed" | "passed"; +- timer?: any; +- ctx?: Context; +- callback?: Done; +- allowUncaught?: boolean; +- file?: string; +- +- /** +- * Get test timeout. +- * +- * @see https://mochajs.org/api/Runnable.html#timeout +- */ +- timeout(): number; +- +- /** +- * Set test timeout. +- * +- * @see https://mochajs.org/api/Runnable.html#timeout +- */ +- timeout(ms: string | number): this; +- +- /** +- * Get test slowness threshold. +- * +- * @see https://mochajs.org/api/Runnable.html#slow +- */ +- slow(): number; +- +- /** +- * Set test slowness threshold. +- * +- * @see https://mochajs.org/api/Runnable.html#slow +- */ +- slow(ms: string | number): this; +- +- /** +- * Halt and mark as pending. +- */ +- skip(): never; +- +- /** +- * Check if this runnable or its parent suite is marked as pending. +- * +- * @see https://mochajs.org/api/Runnable.html#isPending +- */ +- isPending(): boolean; +- +- /** +- * Return `true` if this Runnable has failed. +- */ +- isFailed(): boolean; +- +- /** +- * Return `true` if this Runnable has passed. +- */ +- isPassed(): boolean; +- +- /** +- * Set or get number of retries. +- * +- * @see https://mochajs.org/api/Runnable.html#retries +- */ +- retries(): number; +- +- /** +- * Set or get number of retries. +- * +- * @see https://mochajs.org/api/Runnable.html#retries +- */ +- retries(n: number): void; +- +- /** +- * Set or get current retry +- * +- * @see https://mochajs.org/api/Runnable.html#currentRetry +- */ +- protected currentRetry(): number; +- +- /** +- * Set or get current retry +- * +- * @see https://mochajs.org/api/Runnable.html#currentRetry +- */ +- protected currentRetry(n: number): void; +- +- /** +- * Return the full title generated by recursively concatenating the parent's full title. +- */ +- fullTitle(): string; +- +- /** +- * Return the title path generated by concatenating the parent's title path with the title. +- */ +- titlePath(): string[]; +- +- /** +- * Clear the timeout. +- * +- * @see https://mochajs.org/api/Runnable.html#clearTimeout +- */ +- clearTimeout(): void; +- +- /** +- * Inspect the runnable void of private properties. +- * +- * @see https://mochajs.org/api/Runnable.html#inspect +- */ +- inspect(): string; +- +- /** +- * Reset the timeout. +- * +- * @see https://mochajs.org/api/Runnable.html#resetTimeout +- */ +- resetTimeout(): void; +- +- /** +- * Get a list of whitelisted globals for this test run. +- * +- * @see https://mochajs.org/api/Runnable.html#globals +- */ +- globals(): string[]; +- +- /** +- * Set a list of whitelisted globals for this test run. +- * +- * @see https://mochajs.org/api/Runnable.html#globals +- */ +- globals(globals: ReadonlyArray): void; +- +- /** +- * Run the test and invoke `fn(err)`. +- * +- * @see https://mochajs.org/api/Runnable.html#run +- */ +- run(fn: Done): void; +- } +- +- // #region Runnable "error" event +- interface Runnable extends NodeJS.EventEmitter { +- on(event: "error", listener: (error: any) => void): this; +- once(event: "error", listener: (error: any) => void): this; +- addListener(event: "error", listener: (error: any) => void): this; +- removeListener(event: "error", listener: (error: any) => void): this; +- prependListener(event: "error", listener: (error: any) => void): this; +- prependOnceListener(event: "error", listener: (error: any) => void): this; +- emit(name: "error", error: any): boolean; +- } +- // #endregion Runnable "error" event +- // #region Runnable untyped events +- interface Runnable extends NodeJS.EventEmitter { +- on(event: string, listener: (...args: any[]) => void): this; +- once(event: string, listener: (...args: any[]) => void): this; +- addListener(event: string, listener: (...args: any[]) => void): this; +- removeListener(event: string, listener: (...args: any[]) => void): this; +- prependListener(event: string, listener: (...args: any[]) => void): this; +- prependOnceListener(event: string, listener: (...args: any[]) => void): this; +- emit(name: string, ...args: any[]): boolean; +- } +- // #endregion Runnable untyped events +- +- /** +- * Test context +- * +- * @see https://mochajs.org/api/module-Context.html#~Context +- */ +- class Context { +- private _runnable; +- +- test?: Runnable; +- currentTest?: Test; +- +- /** +- * Get the context `Runnable`. +- */ +- runnable(): Runnable; +- +- /** +- * Set the context `Runnable`. +- */ +- runnable(runnable: Runnable): this; +- +- /** +- * Get test timeout. +- */ +- timeout(): number; +- +- /** +- * Set test timeout. +- */ +- timeout(ms: string | number): this; +- +- /** +- * Get test slowness threshold. +- */ +- slow(): number; +- +- /** +- * Set test slowness threshold. +- */ +- slow(ms: string | number): this; +- +- /** +- * Mark a test as skipped. +- */ +- skip(): never; +- +- /** +- * Get the number of allowed retries on failed tests. +- */ +- retries(): number; +- +- /** +- * Set the number of allowed retries on failed tests. +- */ +- retries(n: number): this; +- +- [key: string]: any; +- } +- +- interface RunnerConstants { +- readonly EVENT_HOOK_BEGIN: 'hook'; +- readonly EVENT_HOOK_END: 'hook end'; +- readonly EVENT_RUN_BEGIN: 'start'; +- readonly EVENT_DELAY_BEGIN: 'waiting'; +- readonly EVENT_DELAY_END: 'ready'; +- readonly EVENT_RUN_END: 'end'; +- readonly EVENT_SUITE_BEGIN: 'suite'; +- readonly EVENT_SUITE_END: 'suite end'; +- readonly EVENT_TEST_BEGIN: 'test'; +- readonly EVENT_TEST_END: 'test end'; +- readonly EVENT_TEST_FAIL: 'fail'; +- readonly EVENT_TEST_PASS: 'pass'; +- readonly EVENT_TEST_PENDING: 'pending'; +- readonly EVENT_TEST_RETRY: 'retry'; +- } +- +- /** +- * Initialize a `Runner` for the given `suite`. +- * +- * @see https://mochajs.org/api/Mocha.Runner.html +- */ +- class Runner { +- private _globals; +- private _abort; +- private _delay; +- private _defaultGrep; +- private next; +- private hookErr; +- private prevGlobalsLength; +- private nextSuite; +- +- static readonly constants: RunnerConstants; +- +- constructor(suite: Suite, delay: boolean); +- +- suite: Suite; +- started: boolean; +- total: number; +- failures: number; +- asyncOnly?: boolean; +- allowUncaught?: boolean; +- fullStackTrace?: boolean; +- forbidOnly?: boolean; +- forbidPending?: boolean; +- checkLeaks?: boolean; +- test?: Test; +- currentRunnable?: Runnable; +- stats?: Stats; // added by reporters +- +- /** +- * Run tests with full titles matching `re`. Updates runner.total +- * with number of tests matched. +- * +- * @see https://mochajs.org/api/Mocha.Runner.html#.Runner#grep +- */ +- grep(re: RegExp, invert: boolean): this; +- +- /** +- * Returns the number of tests matching the grep search for the +- * given suite. +- * +- * @see https://mochajs.org/api/Mocha.Runner.html#.Runner#grepTotal +- */ +- grepTotal(suite: Suite): number; +- +- /** +- * Gets the allowed globals. +- * +- * @see https://mochajs.org/api/Mocha.Runner.html#.Runner#globals +- */ +- globals(): string[]; +- +- /** +- * Allow the given `arr` of globals. +- * +- * @see https://mochajs.org/api/Mocha.Runner.html#.Runner#globals +- */ +- globals(arr: ReadonlyArray): this; +- +- /** +- * Run the root suite and invoke `fn(failures)` on completion. +- * +- * @see https://mochajs.org/api/Mocha.Runner.html#.Runner#run +- */ +- run(fn?: (failures: number) => void): this; +- +- /** +- * Cleanly abort execution. +- * +- * @see https://mochajs.org/api/Mocha.Runner.html#.Runner#abort +- */ +- abort(): this; +- +- /** +- * Handle uncaught exceptions. +- * +- * @see https://mochajs.org/api/Mocha.Runner.html#uncaught +- */ +- uncaught(err: any): void; +- +- /** +- * Wrapper for setImmediate, process.nextTick, or browser polyfill. +- */ +- protected static immediately(callback: Function): void; +- +- /** +- * Return a list of global properties. +- * +- * @see https://mochajs.org/api/Mocha.Runner.html#globalProps +- */ +- protected globalProps(): string[]; +- +- /** +- * Check for global variable leaks. +- * +- * @see https://mochajs.org/api/Mocha.Runner.html#checkGlobals +- */ +- protected checkGlobals(test: Test): void; +- +- /** +- * Fail the given `test`. +- * +- * @see https://mochajs.org/api/Mocha.Runner.html#fail +- */ +- protected fail(test: Test, err: any): void; +- +- /** +- * Fail the given `hook` with `err`. +- * +- * Hook failures work in the following pattern: +- * - If bail, then exit +- * - Failed `before` hook skips all tests in a suite and subsuites, +- * but jumps to corresponding `after` hook +- * - Failed `before each` hook skips remaining tests in a +- * suite and jumps to corresponding `after each` hook, +- * which is run only once +- * - Failed `after` hook does not alter +- * execution order +- * - Failed `after each` hook skips remaining tests in a +- * suite and subsuites, but executes other `after each` +- * hooks +- * +- * @see https://mochajs.org/api/Mocha.Runner.html#failHook +- */ +- protected failHook(hook: Hook, err: any): void; +- +- /** +- * Run hook `name` callbacks and then invoke `fn()`. +- * +- * @see https://mochajs.org/api/Mocha.Runner.html#hook +- */ +- protected hook(name: string, fn: () => void): void; +- +- /** +- * Run hook `name` for the given array of `suites` +- * in order, and callback `fn(err, errSuite)`. +- * +- * @see https://mochajs.org/api/Mocha.Runner.html#hooks +- */ +- protected hooks(name: string, suites: Suite[], fn: (err?: any, errSuite?: Suite) => void): void; +- +- /** +- * Run hooks from the top level down. +- * +- * @see https://mochajs.org/api/Mocha.Runner.html#hookUp +- */ +- protected hookUp(name: string, fn: (err?: any, errSuite?: Suite) => void): void; +- +- /** +- * Run hooks from the bottom up. +- * +- * @see https://mochajs.org/api/Mocha.Runner.html#hookDown +- */ +- protected hookDown(name: string, fn: (err?: any, errSuite?: Suite) => void): void; +- +- /** +- * Return an array of parent Suites from closest to furthest. +- * +- * @see https://mochajs.org/api/Mocha.Runner.html#parents +- */ +- protected parents(): Suite[]; +- +- /** +- * Run the current test and callback `fn(err)`. +- * +- * @see https://mochajs.org/api/Mocha.Runner.html#runTest +- */ +- protected runTest(fn: Done): any; +- +- /** +- * Run tests in the given `suite` and invoke the callback `fn()` when complete. +- * +- * @see https://mochajs.org/api/Mocha.Runner.html#runTests +- */ +- protected runTests(suite: Suite, fn: (errSuite?: Suite) => void): void; +- +- /** +- * Run the given `suite` and invoke the callback `fn()` when complete. +- * +- * @see https://mochajs.org/api/Mocha.Runner.html#runSuite +- */ +- protected runSuite(suite: Suite, fn: (errSuite?: Suite) => void): void; +- } +- +- // #region Runner "waiting" event +- interface Runner { +- on(event: "waiting", listener: (rootSuite: Suite) => void): this; +- once(event: "waiting", listener: (rootSuite: Suite) => void): this; +- addListener(event: "waiting", listener: (rootSuite: Suite) => void): this; +- removeListener(event: "waiting", listener: (rootSuite: Suite) => void): this; +- prependListener(event: "waiting", listener: (rootSuite: Suite) => void): this; +- prependOnceListener(event: "waiting", listener: (rootSuite: Suite) => void): this; +- emit(name: "waiting", rootSuite: Suite): boolean; +- } +- // #endregion Runner "waiting" event +- // #region Runner "start" event +- interface Runner extends NodeJS.EventEmitter { +- on(event: "start", listener: () => void): this; +- once(event: "start", listener: () => void): this; +- addListener(event: "start", listener: () => void): this; +- removeListener(event: "start", listener: () => void): this; +- prependListener(event: "start", listener: () => void): this; +- prependOnceListener(event: "start", listener: () => void): this; +- emit(name: "start"): boolean; +- } +- // #endregion Runner "start" event +- // #region Runner "end" event +- interface Runner extends NodeJS.EventEmitter { +- on(event: "end", listener: () => void): this; +- once(event: "end", listener: () => void): this; +- addListener(event: "end", listener: () => void): this; +- removeListener(event: "end", listener: () => void): this; +- prependListener(event: "end", listener: () => void): this; +- prependOnceListener(event: "end", listener: () => void): this; +- emit(name: "end"): boolean; +- } +- // #endregion Runner "end" event +- // #region Runner "suite" event +- interface Runner extends NodeJS.EventEmitter { +- on(event: "suite", listener: (suite: Suite) => void): this; +- once(event: "suite", listener: (suite: Suite) => void): this; +- addListener(event: "suite", listener: (suite: Suite) => void): this; +- removeListener(event: "suite", listener: (suite: Suite) => void): this; +- prependListener(event: "suite", listener: (suite: Suite) => void): this; +- prependOnceListener(event: "suite", listener: (suite: Suite) => void): this; +- emit(name: "suite", suite: Suite): boolean; +- } +- // #endregion Runner "suite" event +- // #region Runner "suite end" event +- interface Runner extends NodeJS.EventEmitter { +- on(event: "suite end", listener: (suite: Suite) => void): this; +- once(event: "suite end", listener: (suite: Suite) => void): this; +- addListener(event: "suite end", listener: (suite: Suite) => void): this; +- removeListener(event: "suite end", listener: (suite: Suite) => void): this; +- prependListener(event: "suite end", listener: (suite: Suite) => void): this; +- prependOnceListener(event: "suite end", listener: (suite: Suite) => void): this; +- emit(name: "suite end", suite: Suite): boolean; +- } +- // #endregion Runner "suite end" event +- // #region Runner "test" event +- interface Runner extends NodeJS.EventEmitter { +- on(event: "test", listener: (test: Test) => void): this; +- once(event: "test", listener: (test: Test) => void): this; +- addListener(event: "test", listener: (test: Test) => void): this; +- removeListener(event: "test", listener: (test: Test) => void): this; +- prependListener(event: "test", listener: (test: Test) => void): this; +- prependOnceListener(event: "test", listener: (test: Test) => void): this; +- emit(name: "test", test: Test): boolean; +- } +- // #endregion Runner "test" event +- // #region Runner "test end" event +- interface Runner extends NodeJS.EventEmitter { +- on(event: "test end", listener: (test: Test) => void): this; +- once(event: "test end", listener: (test: Test) => void): this; +- addListener(event: "test end", listener: (test: Test) => void): this; +- removeListener(event: "test end", listener: (test: Test) => void): this; +- prependListener(event: "test end", listener: (test: Test) => void): this; +- prependOnceListener(event: "test end", listener: (test: Test) => void): this; +- emit(name: "test end", test: Test): boolean; +- } +- // #endregion Runner "test end" event +- // #region Runner "hook" event +- interface Runner extends NodeJS.EventEmitter { +- on(event: "hook", listener: (hook: Hook) => void): this; +- once(event: "hook", listener: (hook: Hook) => void): this; +- addListener(event: "hook", listener: (hook: Hook) => void): this; +- removeListener(event: "hook", listener: (hook: Hook) => void): this; +- prependListener(event: "hook", listener: (hook: Hook) => void): this; +- prependOnceListener(event: "hook", listener: (hook: Hook) => void): this; +- emit(name: "hook", hook: Hook): boolean; +- } +- // #endregion Runner "hook" event +- // #region Runner "hook end" event +- interface Runner extends NodeJS.EventEmitter { +- on(event: "hook end", listener: (hook: Hook) => void): this; +- once(event: "hook end", listener: (hook: Hook) => void): this; +- addListener(event: "hook end", listener: (hook: Hook) => void): this; +- removeListener(event: "hook end", listener: (hook: Hook) => void): this; +- prependListener(event: "hook end", listener: (hook: Hook) => void): this; +- prependOnceListener(event: "hook end", listener: (hook: Hook) => void): this; +- emit(name: "hook end", hook: Hook): boolean; +- } +- // #endregion Runner "hook end" event +- // #region Runner "pass" event +- interface Runner extends NodeJS.EventEmitter { +- on(event: "pass", listener: (test: Test) => void): this; +- once(event: "pass", listener: (test: Test) => void): this; +- addListener(event: "pass", listener: (test: Test) => void): this; +- removeListener(event: "pass", listener: (test: Test) => void): this; +- prependListener(event: "pass", listener: (test: Test) => void): this; +- prependOnceListener(event: "pass", listener: (test: Test) => void): this; +- emit(name: "pass", test: Test): boolean; +- } +- // #endregion Runner "pass" event +- // #region Runner "fail" event +- interface Runner extends NodeJS.EventEmitter { +- on(event: "fail", listener: (test: Test, err: any) => void): this; +- once(event: "fail", listener: (test: Test, err: any) => void): this; +- addListener(event: "fail", listener: (test: Test, err: any) => void): this; +- removeListener(event: "fail", listener: (test: Test, err: any) => void): this; +- prependListener(event: "fail", listener: (test: Test, err: any) => void): this; +- prependOnceListener(event: "fail", listener: (test: Test, err: any) => void): this; +- emit(name: "fail", test: Test, err: any): boolean; +- } +- // #endregion Runner "fail" event +- // #region Runner "pending" event +- interface Runner extends NodeJS.EventEmitter { +- on(event: "pending", listener: (test: Test) => void): this; +- once(event: "pending", listener: (test: Test) => void): this; +- addListener(event: "pending", listener: (test: Test) => void): this; +- removeListener(event: "pending", listener: (test: Test) => void): this; +- prependListener(event: "pending", listener: (test: Test) => void): this; +- prependOnceListener(event: "pending", listener: (test: Test) => void): this; +- emit(name: "pending", test: Test): boolean; +- } +- // #endregion Runner "pending" event +- // #region Runner untyped events +- interface Runner extends NodeJS.EventEmitter { +- on(event: string, listener: (...args: any[]) => void): this; +- once(event: string, listener: (...args: any[]) => void): this; +- addListener(event: string, listener: (...args: any[]) => void): this; +- removeListener(event: string, listener: (...args: any[]) => void): this; +- prependListener(event: string, listener: (...args: any[]) => void): this; +- prependOnceListener(event: string, listener: (...args: any[]) => void): this; +- emit(name: string, ...args: any[]): boolean; +- } +- // #endregion Runner untyped events +- +- interface SuiteConstants { +- readonly EVENT_FILE_POST_REQUIRE: 'post-require'; +- readonly EVENT_FILE_PRE_REQUIRE: 'pre-require'; +- readonly EVENT_FILE_REQUIRE: 'require'; +- readonly EVENT_ROOT_SUITE_RUN: 'run'; +- +- readonly HOOK_TYPE_AFTER_ALL: 'afterAll'; +- readonly HOOK_TYPE_AFTER_EACH: 'afterEach'; +- readonly HOOK_TYPE_BEFORE_ALL: 'beforeAll'; +- readonly HOOK_TYPE_BEFORE_EACH: 'beforeEach'; +- +- readonly EVENT_SUITE_ADD_HOOK_AFTER_ALL: 'afterAll'; +- readonly EVENT_SUITE_ADD_HOOK_AFTER_EACH: 'afterEach'; +- readonly EVENT_SUITE_ADD_HOOK_BEFORE_ALL: 'beforeAll'; +- readonly EVENT_SUITE_ADD_HOOK_BEFORE_EACH: 'beforeEach'; +- readonly EVENT_SUITE_ADD_SUITE: 'suite'; +- readonly EVENT_SUITE_ADD_TEST: 'test'; +- } +- +- /** +- * Initialize a new `Suite` with the given `title` and `ctx`. +- * +- * @see https://mochajs.org/api/Mocha.Suite.html +- */ +- class Suite { +- private _beforeEach; +- private _beforeAll; +- private _afterEach; +- private _afterAll; +- private _timeout; +- private _slow; +- private _bail; +- private _retries; +- private _onlyTests; +- private _onlySuites; +- +- static readonly constants: SuiteConstants; +- +- constructor(title: string, parentContext?: Context); +- +- ctx: Context; +- suites: Suite[]; +- tests: Test[]; +- pending: boolean; +- file?: string; +- root: boolean; +- delayed: boolean; +- parent: Suite | undefined; +- title: string; +- +- /** +- * Create a new `Suite` with the given `title` and parent `Suite`. When a suite +- * with the same title is already present, that suite is returned to provide +- * nicer reporter and more flexible meta-testing. +- * +- * @see https://mochajs.org/api/mocha#.exports.create +- */ +- static create(parent: Suite, title: string): Suite; +- +- /** +- * Return a clone of this `Suite`. +- * +- * @see https://mochajs.org/api/Mocha.Suite.html#clone +- */ +- clone(): Suite; +- +- /** +- * Get timeout `ms`. +- * +- * @see https://mochajs.org/api/Mocha.Suite.html#timeout +- */ +- timeout(): number; +- +- /** +- * Set timeout `ms` or short-hand such as "2s". +- * +- * @see https://mochajs.org/api/Mocha.Suite.html#timeout +- */ +- timeout(ms: string | number): this; +- +- /** +- * Get number of times to retry a failed test. +- * +- * @see https://mochajs.org/api/Mocha.Suite.html#retries +- */ +- retries(): number; +- +- /** +- * Set number of times to retry a failed test. +- * +- * @see https://mochajs.org/api/Mocha.Suite.html#retries +- */ +- retries(n: string | number): this; +- +- /** +- * Get slow `ms`. +- * +- * @see https://mochajs.org/api/Mocha.Suite.html#slow +- */ +- slow(): number; +- +- /** +- * Set slow `ms` or short-hand such as "2s". +- * +- * @see https://mochajs.org/api/Mocha.Suite.html#slow +- */ +- slow(ms: string | number): this; +- +- /** +- * Get whether to bail after first error. +- * +- * @see https://mochajs.org/api/Mocha.Suite.html#bail +- */ +- bail(): boolean; +- +- /** +- * Set whether to bail after first error. +- * +- * @see https://mochajs.org/api/Mocha.Suite.html#bail +- */ +- bail(bail: boolean): this; +- +- /** +- * Check if this suite or its parent suite is marked as pending. +- * +- * @see https://mochajs.org/api/Mocha.Suite.html#isPending +- */ +- isPending(): boolean; +- +- /** +- * Run `fn(test[, done])` before running tests. +- * +- * @see https://mochajs.org/api/Mocha.Suite.html#beforeAll +- */ +- beforeAll(fn?: Func): this; +- +- /** +- * Run `fn(test[, done])` before running tests. +- * +- * @see https://mochajs.org/api/Mocha.Suite.html#beforeAll +- */ +- beforeAll(fn?: AsyncFunc): this; +- +- /** +- * Run `fn(test[, done])` before running tests. +- * +- * @see https://mochajs.org/api/Mocha.Suite.html#beforeAll +- */ +- beforeAll(title: string, fn?: Func): this; +- +- /** +- * Run `fn(test[, done])` before running tests. +- * +- * @see https://mochajs.org/api/Mocha.Suite.html#beforeAll +- */ +- beforeAll(title: string, fn?: AsyncFunc): this; +- +- /** +- * Run `fn(test[, done])` after running tests. +- * +- * @see https://mochajs.org/api/Mocha.Suite.html#afterAll +- */ +- afterAll(fn?: Func): this; +- +- /** +- * Run `fn(test[, done])` after running tests. +- * +- * @see https://mochajs.org/api/Mocha.Suite.html#afterAll +- */ +- afterAll(fn?: AsyncFunc): this; +- +- /** +- * Run `fn(test[, done])` after running tests. +- * +- * @see https://mochajs.org/api/Mocha.Suite.html#afterAll +- */ +- afterAll(title: string, fn?: Func): this; +- +- /** +- * Run `fn(test[, done])` after running tests. +- * +- * @see https://mochajs.org/api/Mocha.Suite.html#afterAll +- */ +- afterAll(title: string, fn?: AsyncFunc): this; +- +- /** +- * Run `fn(test[, done])` before each test case. +- * +- * @see https://mochajs.org/api/Mocha.Suite.html#beforeEach +- */ +- beforeEach(fn?: Func): this; +- +- /** +- * Run `fn(test[, done])` before each test case. +- * +- * @see https://mochajs.org/api/Mocha.Suite.html#beforeEach +- */ +- beforeEach(fn?: AsyncFunc): this; +- +- /** +- * Run `fn(test[, done])` before each test case. +- * +- * @see https://mochajs.org/api/Mocha.Suite.html#beforeEach +- */ +- beforeEach(title: string, fn?: Func): this; +- +- /** +- * Run `fn(test[, done])` before each test case. +- * +- * @see https://mochajs.org/api/Mocha.Suite.html#beforeEach +- */ +- beforeEach(title: string, fn?: AsyncFunc): this; +- +- /** +- * Run `fn(test[, done])` after each test case. +- * +- * @see https://mochajs.org/api/Mocha.Suite.html#afterEach +- */ +- afterEach(fn?: Func): this; +- +- /** +- * Run `fn(test[, done])` after each test case. +- * +- * @see https://mochajs.org/api/Mocha.Suite.html#afterEach +- */ +- afterEach(fn?: AsyncFunc): this; +- +- /** +- * Run `fn(test[, done])` after each test case. +- * +- * @see https://mochajs.org/api/Mocha.Suite.html#afterEach +- */ +- afterEach(title: string, fn?: Func): this; +- +- /** +- * Run `fn(test[, done])` after each test case. +- * +- * @see https://mochajs.org/api/Mocha.Suite.html#afterEach +- */ +- afterEach(title: string, fn?: AsyncFunc): this; +- +- /** +- * Add a test `suite`. +- * +- * @see https://mochajs.org/api/Mocha.Suite.html#addSuite +- */ +- addSuite(suite: Suite): this; +- +- /** +- * Add a `test` to this suite. +- * +- * @see https://mochajs.org/api/Mocha.Suite.html#addTest +- */ +- addTest(test: Test): this; +- +- /** +- * Return the full title generated by recursively concatenating the parent's +- * full title. +- * +- * @see https://mochajs.org/api/Mocha.Suite.html#.Suite#fullTitle +- */ +- fullTitle(): string; +- +- /** +- * Return the title path generated by recursively concatenating the parent's +- * title path. +- * +- * @see https://mochajs.org/api/Mocha.Suite.html#.Suite#titlePath +- */ +- titlePath(): string[]; +- +- /** +- * Return the total number of tests. +- * +- * @see https://mochajs.org/api/Mocha.Suite.html#.Suite#total +- */ +- total(): number; +- +- /** +- * Iterates through each suite recursively to find all tests. Applies a +- * function in the format `fn(test)`. +- * +- * @see https://mochajs.org/api/Mocha.Suite.html#eachTest +- */ +- eachTest(fn: (test: Test) => void): this; +- +- /** +- * This will run the root suite if we happen to be running in delayed mode. +- * +- * @see https://mochajs.org/api/Mocha.Suite.html#run +- */ +- run(): void; +- +- /** +- * Generic hook-creator. +- */ +- protected _createHook(title: string, fn?: Func | AsyncFunc): Hook; +- } +- +- // #region Suite "beforeAll" event +- interface Suite extends NodeJS.EventEmitter { +- on(event: "beforeAll", listener: (hook: Hook) => void): this; +- once(event: "beforeAll", listener: (hook: Hook) => void): this; +- addListener(event: "beforeAll", listener: (hook: Hook) => void): this; +- removeListener(event: "beforeAll", listener: (hook: Hook) => void): this; +- prependListener(event: "beforeAll", listener: (hook: Hook) => void): this; +- prependOnceListener(event: "beforeAll", listener: (hook: Hook) => void): this; +- emit(name: "beforeAll", hook: Hook): boolean; +- } +- // #endregion Suite "beforeAll" event +- // #region Suite "afterAll" event +- interface Suite extends NodeJS.EventEmitter { +- on(event: "afterAll", listener: (hook: Hook) => void): this; +- once(event: "afterAll", listener: (hook: Hook) => void): this; +- addListener(event: "afterAll", listener: (hook: Hook) => void): this; +- removeListener(event: "afterAll", listener: (hook: Hook) => void): this; +- prependListener(event: "afterAll", listener: (hook: Hook) => void): this; +- prependOnceListener(event: "afterAll", listener: (hook: Hook) => void): this; +- emit(name: "afterAll", hook: Hook): boolean; +- } +- // #endregion Suite "afterAll" event +- // #region Suite "beforeEach" event +- interface Suite extends NodeJS.EventEmitter { +- on(event: "beforeEach", listener: (hook: Hook) => void): this; +- once(event: "beforeEach", listener: (hook: Hook) => void): this; +- addListener(event: "beforeEach", listener: (hook: Hook) => void): this; +- removeListener(event: "beforeEach", listener: (hook: Hook) => void): this; +- prependListener(event: "beforeEach", listener: (hook: Hook) => void): this; +- prependOnceListener(event: "beforeEach", listener: (hook: Hook) => void): this; +- emit(name: "beforeEach", hook: Hook): boolean; +- } +- // #endregion Suite "beforeEach" event +- // #region Suite "afterEach" event +- interface Suite extends NodeJS.EventEmitter { +- on(event: "afterEach", listener: (hook: Hook) => void): this; +- once(event: "afterEach", listener: (hook: Hook) => void): this; +- addListener(event: "afterEach", listener: (hook: Hook) => void): this; +- removeListener(event: "afterEach", listener: (hook: Hook) => void): this; +- prependListener(event: "afterEach", listener: (hook: Hook) => void): this; +- prependOnceListener(event: "afterEach", listener: (hook: Hook) => void): this; +- emit(name: "afterEach", hook: Hook): boolean; +- } +- // #endregion Suite "afterEach" event +- // #region Suite "suite" event +- interface Suite extends NodeJS.EventEmitter { +- on(event: "suite", listener: (suite: Suite) => void): this; +- once(event: "suite", listener: (suite: Suite) => void): this; +- addListener(event: "suite", listener: (suite: Suite) => void): this; +- removeListener(event: "suite", listener: (suite: Suite) => void): this; +- prependListener(event: "suite", listener: (suite: Suite) => void): this; +- prependOnceListener(event: "suite", listener: (suite: Suite) => void): this; +- emit(name: "suite", suite: Suite): boolean; +- } +- // #endregion Suite "suite" event +- // #region Suite "test" event +- interface Suite { +- on(event: "test", listener: (test: Test) => void): this; +- once(event: "test", listener: (test: Test) => void): this; +- addListener(event: "test", listener: (test: Test) => void): this; +- removeListener(event: "test", listener: (test: Test) => void): this; +- prependListener(event: "test", listener: (test: Test) => void): this; +- prependOnceListener(event: "test", listener: (test: Test) => void): this; +- emit(name: "test", test: Test): boolean; +- } +- // #endregion Suite "test" event +- // #region Suite "run" event +- interface Suite extends NodeJS.EventEmitter { +- on(event: "run", listener: () => void): this; +- once(event: "run", listener: () => void): this; +- addListener(event: "run", listener: () => void): this; +- removeListener(event: "run", listener: () => void): this; +- prependListener(event: "run", listener: () => void): this; +- prependOnceListener(event: "run", listener: () => void): this; +- emit(name: "run"): boolean; +- } +- // #endregion Suite "run" event +- // #region Suite "pre-require" event +- interface Suite extends NodeJS.EventEmitter { +- on(event: "pre-require", listener: (context: MochaGlobals, file: string, mocha: Mocha) => void): this; +- once(event: "pre-require", listener: (context: MochaGlobals, file: string, mocha: Mocha) => void): this; +- addListener(event: "pre-require", listener: (context: MochaGlobals, file: string, mocha: Mocha) => void): this; +- removeListener(event: "pre-require", listener: (context: MochaGlobals, file: string, mocha: Mocha) => void): this; +- prependListener(event: "pre-require", listener: (context: MochaGlobals, file: string, mocha: Mocha) => void): this; +- prependOnceListener(event: "pre-require", listener: (context: MochaGlobals, file: string, mocha: Mocha) => void): this; +- emit(name: "pre-require", context: MochaGlobals, file: string, mocha: Mocha): boolean; +- } +- // #endregion Suite "pre-require" event +- // #region Suite "require" event +- interface Suite extends NodeJS.EventEmitter { +- on(event: "require", listener: (module: any, file: string, mocha: Mocha) => void): this; +- once(event: "require", listener: (module: any, file: string, mocha: Mocha) => void): this; +- addListener(event: "require", listener: (module: any, file: string, mocha: Mocha) => void): this; +- removeListener(event: "require", listener: (module: any, file: string, mocha: Mocha) => void): this; +- prependListener(event: "require", listener: (module: any, file: string, mocha: Mocha) => void): this; +- prependOnceListener(event: "require", listener: (module: any, file: string, mocha: Mocha) => void): this; +- emit(name: "require", module: any, file: string, mocha: Mocha): boolean; +- } +- // #endregion Suite "require" event +- // #region Suite "post-require" event +- interface Suite extends NodeJS.EventEmitter { +- on(event: "post-require", listener: (context: MochaGlobals, file: string, mocha: Mocha) => void): this; +- once(event: "post-require", listener: (context: MochaGlobals, file: string, mocha: Mocha) => void): this; +- addListener(event: "post-require", listener: (context: MochaGlobals, file: string, mocha: Mocha) => void): this; +- removeListener(event: "post-require", listener: (context: MochaGlobals, file: string, mocha: Mocha) => void): this; +- prependListener(event: "post-require", listener: (context: MochaGlobals, file: string, mocha: Mocha) => void): this; +- prependOnceListener(event: "post-require", listener: (context: MochaGlobals, file: string, mocha: Mocha) => void): this; +- emit(name: "post-require", context: MochaGlobals, file: string, mocha: Mocha): boolean; +- } +- // #endregion Suite "post-require" event +- // #region Suite untyped events +- interface Suite extends NodeJS.EventEmitter { +- on(event: string, listener: (...args: any[]) => void): this; +- once(event: string, listener: (...args: any[]) => void): this; +- addListener(event: string, listener: (...args: any[]) => void): this; +- removeListener(event: string, listener: (...args: any[]) => void): this; +- prependListener(event: string, listener: (...args: any[]) => void): this; +- prependOnceListener(event: string, listener: (...args: any[]) => void): this; +- emit(name: string, ...args: any[]): boolean; +- } +- // #endregion Runner untyped events +- +- /** +- * Initialize a new `Hook` with the given `title` and callback `fn` +- * +- * @see https://mochajs.org/api/Hook.html +- */ +- class Hook extends Runnable { +- private _error; +- +- type: "hook"; +- originalTitle?: string; // added by Runner +- +- /** +- * Get the test `err`. +- * +- * @see https://mochajs.org/api/Hook.html#error +- */ +- error(): any; +- +- /** +- * Set the test `err`. +- * +- * @see https://mochajs.org/api/Hook.html#error +- */ +- error(err: any): void; +- } +- +- /** +- * An alternative way to define root hooks that works with parallel runs. +- * +- * Root hooks work with any interface, but the property names do not change. +- * In other words, if you are using the tdd interface, suiteSetup maps to beforeAll, and setup maps to beforeEach. +- * +- * As with other hooks, `this` refers to to the current context object. +- * +- * @see https://mochajs.org/#root-hook-plugins +- */ +- interface RootHookObject { +- /** +- * In serial mode, run after all tests end, once only. +- * In parallel mode, run after all tests end, for each file. +- */ +- afterAll?: Func | AsyncFunc | Func[] | AsyncFunc[]; +- /** +- * In serial mode (Mocha's default), before all tests begin, once only. +- * In parallel mode, run before all tests begin, for each file. +- */ +- beforeAll?: Func | AsyncFunc | Func[] | AsyncFunc[]; +- /** +- * In both modes, run after every test. +- */ +- afterEach?: Func | AsyncFunc | Func[] | AsyncFunc[]; +- /** +- * In both modes, run before each test. +- */ +- beforeEach?: Func | AsyncFunc | Func[] | AsyncFunc[]; +- } +- +- /** +- * Initialize a new `Test` with the given `title` and callback `fn`. +- * +- * @see https://mochajs.org/api/Test.html +- */ +- class Test extends Runnable { +- type: "test"; +- speed?: "slow" | "medium" | "fast"; // added by reporters +- err?: Error; // added by reporters +- clone(): Test; +- } +- +- /** +- * Test statistics +- */ +- interface Stats { +- suites: number; +- tests: number; +- passes: number; +- pending: number; +- failures: number; +- start?: Date; +- end?: Date; +- duration?: number; +- } +- +- type TestInterface = (suite: Suite) => void; +- +- interface ReporterConstructor { +- new (runner: Runner, options: MochaOptions): reporters.Base; +- } +- +- type Done = (err?: any) => void; +- +- /** +- * Callback function used for tests and hooks. +- */ +- type Func = (this: Context, done: Done) => void; +- +- /** +- * Async callback function used for tests and hooks. +- */ +- type AsyncFunc = (this: Context) => PromiseLike; +- +- /** +- * Options to pass to Mocha. +- */ +- interface MochaOptions { +- /** Test interfaces ("bdd", "tdd", "exports", etc.). */ +- ui?: Interface; +- +- /** +- * Reporter constructor, built-in reporter name, or reporter module path. Defaults to +- * `"spec"`. +- */ +- reporter?: string | ReporterConstructor; +- +- /** Options to pass to the reporter. */ +- reporterOptions?: any; +- +- /** Array of accepted globals. */ +- globals?: string[]; +- +- /** timeout in milliseconds or time string like '1s'. */ +- timeout?: number | string; +- +- /** number of times to retry failed tests. */ +- retries?: number; +- +- /** bail on the first test failure. */ +- bail?: boolean; +- +- /** milliseconds to wait before considering a test slow. */ +- slow?: number; +- +- /** check for global variable leaks. */ +- checkLeaks?: boolean; +- +- /** display the full stack trace on failure. */ +- fullStackTrace?: boolean; +- +- /** string or regexp to filter tests with. */ +- grep?: string | RegExp; +- +- /** Enable growl support. */ +- growl?: boolean; +- +- /** Color TTY output from reporter */ +- color?: boolean; +- +- /** Use inline diffs rather than +/-. */ +- inlineDiffs?: boolean; +- +- /** Do not show diffs at all. */ +- hideDiff?: boolean; +- +- /** Run job in parallel */ +- parallel?: boolean; +- +- /** Max number of worker processes for parallel runs */ +- jobs?: number; +- +- /** Assigns hooks to the root suite */ +- rootHooks?: RootHookObject; +- +- asyncOnly?: boolean; +- delay?: boolean; +- forbidOnly?: boolean; +- forbidPending?: boolean; +- noHighlighting?: boolean; +- allowUncaught?: boolean; +- fullTrace?: boolean; +- } +- +- interface MochaInstanceOptions extends MochaOptions { +- files?: string[]; +- } +- +- /** +- * Variables added to the global scope by Mocha when run in the CLI. +- */ +- interface MochaGlobals { +- /** +- * Execute before running tests. +- * +- * - _Only available when invoked via the mocha CLI._ +- * +- * @see https://mochajs.org/api/global.html#before +- */ +- before: HookFunction; +- +- /** +- * Execute after running tests. +- * +- * - _Only available when invoked via the mocha CLI._ +- * +- * @see https://mochajs.org/api/global.html#after +- */ +- after: HookFunction; +- +- /** +- * Execute before each test case. +- * +- * - _Only available when invoked via the mocha CLI._ +- * +- * @see https://mochajs.org/api/global.html#beforeEach +- */ +- beforeEach: HookFunction; +- +- /** +- * Execute after each test case. +- * +- * - _Only available when invoked via the mocha CLI._ +- * +- * @see https://mochajs.org/api/global.html#afterEach +- */ +- afterEach: HookFunction; +- +- /** +- * Describe a "suite" containing nested suites and tests. +- * +- * - _Only available when invoked via the mocha CLI._ +- */ +- describe: SuiteFunction; +- +- /** +- * Describe a "suite" containing nested suites and tests. +- * +- * - _Only available when invoked via the mocha CLI._ +- */ +- context: SuiteFunction; +- +- /** +- * Pending suite. +- * +- * - _Only available when invoked via the mocha CLI._ +- */ +- xdescribe: PendingSuiteFunction; +- +- /** +- * Pending suite. +- * +- * - _Only available when invoked via the mocha CLI._ +- */ +- xcontext: PendingSuiteFunction; +- +- /** +- * Describes a test case. +- * +- * - _Only available when invoked via the mocha CLI._ +- */ +- it: TestFunction; +- +- /** +- * Describes a test case. +- * +- * - _Only available when invoked via the mocha CLI._ +- */ +- specify: TestFunction; +- +- /** +- * Describes a pending test case. +- * +- * - _Only available when invoked via the mocha CLI._ +- */ +- xit: PendingTestFunction; +- +- /** +- * Describes a pending test case. +- * +- * - _Only available when invoked via the mocha CLI._ +- */ +- xspecify: PendingTestFunction; +- +- /** +- * Execute before running tests. +- * +- * - _Only available when invoked via the mocha CLI._ +- * +- * @see https://mochajs.org/api/global.html#before +- */ +- suiteSetup: HookFunction; +- +- /** +- * Execute after running tests. +- * +- * - _Only available when invoked via the mocha CLI._ +- * +- * @see https://mochajs.org/api/global.html#after +- */ +- suiteTeardown: HookFunction; +- +- /** +- * Execute before each test case. +- * +- * - _Only available when invoked via the mocha CLI._ +- * +- * @see https://mochajs.org/api/global.html#beforeEach +- */ +- setup: HookFunction; +- +- /** +- * Execute after each test case. +- * +- * - _Only available when invoked via the mocha CLI._ +- * +- * @see https://mochajs.org/api/global.html#afterEach +- */ +- teardown: HookFunction; +- +- /** +- * Describe a "suite" containing nested suites and tests. +- * +- * - _Only available when invoked via the mocha CLI._ +- */ +- suite: SuiteFunction; +- +- /** +- * Describes a test case. +- * +- * - _Only available when invoked via the mocha CLI._ +- */ +- test: TestFunction; +- +- run: typeof run; +- } +- +- /** +- * Third-party declarations that want to add new entries to the `Reporter` union can +- * contribute names here. +- */ +- interface ReporterContributions { +- Base: never; +- base: never; +- Dot: never; +- dot: never; +- TAP: never; +- tap: never; +- JSON: never; +- json: never; +- HTML: never; +- html: never; +- List: never; +- list: never; +- Min: never; +- min: never; +- Spec: never; +- spec: never; +- Nyan: never; +- nyan: never; +- XUnit: never; +- xunit: never; +- Markdown: never; +- markdown: never; +- Progress: never; +- progress: never; +- Landing: never; +- landing: never; +- JSONStream: never; +- "json-stream": never; +- } +- +- type Reporter = keyof ReporterContributions; +- +- /** +- * Third-party declarations that want to add new entries to the `Interface` union can +- * contribute names here. +- */ +- interface InterfaceContributions { +- bdd: never; +- tdd: never; +- qunit: never; +- exports: never; +- } +- +- type Interface = keyof InterfaceContributions; +-} +- +-// #region Test interface augmentations +- +-/** +- * Triggers root suite execution. +- * +- * - _Only available if flag --delay is passed into Mocha._ +- * - _Only available when invoked via the mocha CLI._ +- * +- * @see https://mochajs.org/api/global.html#runWithSuite +- */ +-declare function run(): void; +- +-/** +- * Execute before running tests. +- * +- * - _Only available when invoked via the mocha CLI._ +- * +- * @see https://mochajs.org/api/global.html#before +- */ +-declare var before: Mocha.HookFunction; +- +-/** +- * Execute before running tests. +- * +- * - _Only available when invoked via the mocha CLI._ +- * +- * @see https://mochajs.org/api/global.html#before +- */ +-declare var suiteSetup: Mocha.HookFunction; +- +-/** +- * Execute after running tests. +- * +- * - _Only available when invoked via the mocha CLI._ +- * +- * @see https://mochajs.org/api/global.html#after +- */ +-declare var after: Mocha.HookFunction; +- +-/** +- * Execute after running tests. +- * +- * - _Only available when invoked via the mocha CLI._ +- * +- * @see https://mochajs.org/api/global.html#after +- */ +-declare var suiteTeardown: Mocha.HookFunction; +- +-/** +- * Execute before each test case. +- * +- * - _Only available when invoked via the mocha CLI._ +- * +- * @see https://mochajs.org/api/global.html#beforeEach +- */ +-declare var beforeEach: Mocha.HookFunction; +- +-/** +- * Execute before each test case. +- * +- * - _Only available when invoked via the mocha CLI._ +- * +- * @see https://mochajs.org/api/global.html#beforeEach +- */ +-declare var setup: Mocha.HookFunction; +- +-/** +- * Execute after each test case. +- * +- * - _Only available when invoked via the mocha CLI._ +- * +- * @see https://mochajs.org/api/global.html#afterEach +- */ +-declare var afterEach: Mocha.HookFunction; +- +-/** +- * Execute after each test case. +- * +- * - _Only available when invoked via the mocha CLI._ +- * +- * @see https://mochajs.org/api/global.html#afterEach +- */ +-declare var teardown: Mocha.HookFunction; +- +-/** +- * Describe a "suite" containing nested suites and tests. +- * +- * - _Only available when invoked via the mocha CLI._ +- */ +-declare var describe: Mocha.SuiteFunction; +- +-/** +- * Describe a "suite" containing nested suites and tests. +- * +- * - _Only available when invoked via the mocha CLI._ +- */ +-declare var context: Mocha.SuiteFunction; +- +-/** +- * Describe a "suite" containing nested suites and tests. +- * +- * - _Only available when invoked via the mocha CLI._ +- */ +-declare var suite: Mocha.SuiteFunction; +- +-/** +- * Pending suite. +- * +- * - _Only available when invoked via the mocha CLI._ +- */ +-declare var xdescribe: Mocha.PendingSuiteFunction; +- +-/** +- * Pending suite. +- * +- * - _Only available when invoked via the mocha CLI._ +- */ +-declare var xcontext: Mocha.PendingSuiteFunction; +- +-/** +- * Describes a test case. +- * +- * - _Only available when invoked via the mocha CLI._ +- */ +-declare var it: Mocha.TestFunction; +- +-/** +- * Describes a test case. +- * +- * - _Only available when invoked via the mocha CLI._ +- */ +-declare var specify: Mocha.TestFunction; +- +-/** +- * Describes a test case. +- * +- * - _Only available when invoked via the mocha CLI._ +- */ +-declare var test: Mocha.TestFunction; +- +-/** +- * Describes a pending test case. +- * +- * - _Only available when invoked via the mocha CLI._ +- */ +-declare var xit: Mocha.PendingTestFunction; +- +-/** +- * Describes a pending test case. +- * +- * - _Only available when invoked via the mocha CLI._ +- */ +-declare var xspecify: Mocha.PendingTestFunction; +- +-// #endregion Test interface augmentations +- +-// #region Reporter augmentations +- +-// Forward declaration for `HTMLLIElement` from lib.dom.d.ts. +-// Required by Mocha.reporters.HTML. +-// NOTE: Mocha *must not* have a direct dependency on DOM types. +-// tslint:disable-next-line no-empty-interface +-interface HTMLLIElement { } +- +-// Augments the DOM `Window` object when lib.dom.d.ts is loaded. +-// tslint:disable-next-line no-empty-interface +-interface Window extends Mocha.MochaGlobals { } +- +-declare namespace NodeJS { +- // Forward declaration for `NodeJS.EventEmitter` from node.d.ts. +- // Required by Mocha.Runnable, Mocha.Runner, and Mocha.Suite. +- // NOTE: Mocha *must not* have a direct dependency on @types/node. +- // tslint:disable-next-line no-empty-interface +- interface EventEmitter { } +- +- // Augments NodeJS's `global` object when node.d.ts is loaded +- // tslint:disable-next-line no-empty-interface +- interface Global extends Mocha.MochaGlobals { } +-} +- +-// #endregion Reporter augmentations +- +-// #region Browser augmentations +- +-/** +- * Mocha global. +- * +- * - _Only supported in the browser._ +- */ +-declare const mocha: BrowserMocha; +- +-interface BrowserMocha extends Mocha { +- /** +- * Function to allow assertion libraries to throw errors directly into mocha. +- * This is useful when running tests in a browser because window.onerror will +- * only receive the 'message' attribute of the Error. +- * +- * - _Only supported in the browser._ +- */ +- throwError(err: any): never; +- +- /** +- * Setup mocha with the given settings options. +- * +- * - _Only supported in the browser._ +- */ +- setup(opts?: Mocha.Interface | Mocha.MochaOptions): this; +-} +- +-// #endregion Browser augmentations +- +-declare module "mocha" { +- export = Mocha; +-} +- +-declare module "mocha/lib/ms" { +- export = milliseconds; +- /** +- * Parse the given `str` and return milliseconds. +- * +- * @see {@link https://mochajs.org/api/module-milliseconds.html} +- * @see {@link https://mochajs.org/api/module-milliseconds.html#~parse} +- */ +- function milliseconds(val: string): number; +- +- /** +- * Format for `ms`. +- * +- * @see {@link https://mochajs.org/api/module-milliseconds.html} +- * @see {@link https://mochajs.org/api/module-milliseconds.html#~format} +- */ +- function milliseconds(val: number): string; +-} +- +-declare module "mocha/lib/interfaces/common" { +- export = common; +- +- function common(suites: Mocha.Suite[], context: Mocha.MochaGlobals, mocha: Mocha): common.CommonFunctions; +- +- namespace common { +- interface CommonFunctions { +- /** +- * This is only present if flag --delay is passed into Mocha. It triggers +- * root suite execution. +- */ +- runWithSuite(suite: Mocha.Suite): () => void; +- +- /** +- * Execute before running tests. +- */ +- before(fn?: Mocha.Func | Mocha.AsyncFunc): void; +- +- /** +- * Execute before running tests. +- */ +- before(name: string, fn?: Mocha.Func | Mocha.AsyncFunc): void; +- +- /** +- * Execute after running tests. +- */ +- after(fn?: Mocha.Func | Mocha.AsyncFunc): void; +- +- /** +- * Execute after running tests. +- */ +- after(name: string, fn?: Mocha.Func | Mocha.AsyncFunc): void; +- +- /** +- * Execute before each test case. +- */ +- beforeEach(fn?: Mocha.Func | Mocha.AsyncFunc): void; +- +- /** +- * Execute before each test case. +- */ +- beforeEach(name: string, fn?: Mocha.Func | Mocha.AsyncFunc): void; +- +- /** +- * Execute after each test case. +- */ +- afterEach(fn?: Mocha.Func | Mocha.AsyncFunc): void; +- +- /** +- * Execute after each test case. +- */ +- afterEach(name: string, fn?: Mocha.Func | Mocha.AsyncFunc): void; +- +- suite: SuiteFunctions; +- test: TestFunctions; +- } +- +- interface CreateOptions { +- /** Title of suite */ +- title: string; +- +- /** Suite function */ +- fn?: (this: Mocha.Suite) => void; +- +- /** Is suite pending? */ +- pending?: boolean; +- +- /** Filepath where this Suite resides */ +- file?: string; +- +- /** Is suite exclusive? */ +- isOnly?: boolean; +- } +- +- interface SuiteFunctions { +- /** +- * Create an exclusive Suite; convenience function +- */ +- only(opts: CreateOptions): Mocha.Suite; +- +- /** +- * Create a Suite, but skip it; convenience function +- */ +- skip(opts: CreateOptions): Mocha.Suite; +- +- /** +- * Creates a suite. +- */ +- create(opts: CreateOptions): Mocha.Suite; +- } +- +- interface TestFunctions { +- /** +- * Exclusive test-case. +- */ +- only(mocha: Mocha, test: Mocha.Test): Mocha.Test; +- +- /** +- * Pending test case. +- */ +- skip(title: string): void; +- +- /** +- * Number of retry attempts +- */ +- retries(n: number): void; +- } +- } +-} ++// // Type definitions for mocha 8.0 ++// // Project: https://mochajs.org ++// // Definitions by: Kazi Manzur Rashid ++// // otiai10 ++// // Vadim Macagon ++// // Andrew Bradley ++// // Dmitrii Sorin ++// // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped ++// // TypeScript Version: 2.1 ++ ++// /** ++// * Mocha API ++// * ++// * @see https://mochajs.org/api/mocha ++// */ ++// declare class Mocha { ++// private _growl; ++// private _reporter; ++// private _ui; ++ ++// constructor(options?: Mocha.MochaOptions); ++ ++// suite: Mocha.Suite; ++// files: string[]; ++// options: Mocha.MochaInstanceOptions; ++ ++// /** ++// * Enable or disable bailing on the first failure. ++// * ++// * @see https://mochajs.org/api/mocha#bail ++// */ ++// bail(bail?: boolean): this; ++ ++// /** ++// * Add test `file`. ++// * ++// * @see https://mochajs.org/api/mocha#addFile ++// */ ++// addFile(file: string): this; ++ ++// /** ++// * Set reporter to one of the built-in reporters. ++// * ++// * @see https://mochajs.org/api/mocha#reporter ++// */ ++// reporter(reporter: Mocha.Reporter, reporterOptions?: any): this; ++ ++// /** ++// * Set reporter to the provided constructor, one of the built-in reporters, or loads a reporter ++// * from a module path. Defaults to `"spec"`. ++// * ++// * @see https://mochajs.org/api/mocha#reporter ++// */ ++// reporter(reporter?: string | Mocha.ReporterConstructor, reporterOptions?: any): this; ++ ++// /** ++// * Set test UI to one of the built-in test interfaces. ++// * ++// * @see https://mochajs.org/api/mocha#ui ++// */ ++// ui(name: Mocha.Interface): this; ++ ++// /** ++// * Set test UI to one of the built-in test interfaces or loads a test interface from a module ++// * path. Defaults to `"bdd"`. ++// * ++// * @see https://mochajs.org/api/mocha#ui ++// */ ++// ui(name?: string): this; ++ ++// /** ++// * Escape string and add it to grep as a RegExp. ++// * ++// * @see https://mochajs.org/api/mocha#fgrep ++// */ ++// fgrep(str: string): this; ++ ++// /** ++// * Add regexp to grep, if `re` is a string it is escaped. ++// * ++// * @see https://mochajs.org/api/mocha#grep ++// */ ++// grep(re: string | RegExp): this; ++ ++// /** ++// * Invert `.grep()` matches. ++// * ++// * @see https://mochajs.org/api/mocha#invert ++// */ ++// invert(): this; ++ ++// /** ++// * Enable global leak checking. ++// * ++// * @see https://mochajs.org/api/mocha#checkLeaks ++// */ ++// checkLeaks(): this; ++ ++// /** ++// * Display long stack-trace on failing ++// * ++// * @see https://mochajs.org/api/mocha#fullTrace ++// */ ++// fullTrace(): this; ++ ++// /** ++// * Enable growl support. ++// * ++// * @see https://mochajs.org/api/mocha#growl ++// */ ++// growl(): this; ++ ++// /** ++// * Ignore `globals` array or string. ++// * ++// * @see https://mochajs.org/api/mocha#globals ++// */ ++// globals(globals: string | ReadonlyArray): this; ++ ++// /** ++// * Set the timeout in milliseconds. ++// * ++// * @see https://mochajs.org/api/mocha#timeout ++// */ ++// timeout(timeout: string | number): this; ++ ++// /** ++// * Set the number of times to retry failed tests. ++// * ++// * @see https://mochajs.org/api/mocha#retries ++// */ ++// retries(n: number): this; ++ ++// /** ++// * Set slowness threshold in milliseconds. ++// * ++// * @see https://mochajs.org/api/mocha#slow ++// */ ++// slow(slow: string | number): this; ++ ++// /** ++// * Makes all tests async (accepting a callback) ++// * ++// * @see https://mochajs.org/api/mocha#asyncOnly. ++// */ ++// asyncOnly(): this; ++ ++// /** ++// * Disable syntax highlighting (in browser). ++// * ++// * @see https://mochajs.org/api/mocha#noHighlighting ++// */ ++// noHighlighting(): this; ++ ++// /** ++// * Enable uncaught errors to propagate (in browser). ++// * ++// * @see https://mochajs.org/api/mocha#allowUncaught ++// */ ++// allowUncaught(): boolean; ++ ++// /** ++// * Delay root suite execution. ++// * ++// * @see https://mochajs.org/api/mocha#delay ++// */ ++// delay(): boolean; ++ ++// /** ++// * Tests marked only fail the suite ++// * ++// * @see https://mochajs.org/api/mocha#forbidOnly ++// */ ++// forbidOnly(): boolean; ++ ++// /** ++// * Pending tests and tests marked skip fail the suite ++// * ++// * @see https://mochajs.org/api/mocha#forbidPending ++// */ ++// forbidPending(): boolean; ++ ++// /** ++// * Run tests and invoke `fn()` when complete. ++// * ++// * Note that `run` relies on Node's `require` to execute ++// * the test interface functions and will be subject to the ++// * cache - if the files are already in the `require` cache, ++// * they will effectively be skipped. Therefore, to run tests ++// * multiple times or to run tests in files that are already ++// * in the `require` cache, make sure to clear them from the ++// * cache first in whichever manner best suits your needs. ++// * ++// * @see https://mochajs.org/api/mocha#run ++// */ ++// run(fn?: (failures: number) => void): Mocha.Runner; ++ ++// /** ++// * Loads ESM (and CJS) test files asynchronously. ++// * ++// * @see https://mochajs.org/api/mocha#loadFilesAsync ++// */ ++// loadFilesAsync(): Promise; ++ ++// /** ++// * Load registered files. ++// * ++// * @see https://mochajs.org/api/mocha#loadFiles ++// */ ++// protected loadFiles(fn?: () => void): void; ++ ++// /** ++// * Unloads `files` from Node's `require` cache. ++// * ++// * This allows required files to be "freshly" reloaded, providing the ability ++// * to reuse a Mocha instance programmatically. ++// * Note: does not clear ESM module files from the cache ++// */ ++// unloadFiles(): this; ++ ++// /** ++// * Toggles parallel mode. ++// * ++// * Must be run before calling `run`. Changes the `Runner` class to ++// * use; also enables lazy file loading if not already done so. ++// * ++// * @see https://mochajs.org/api/mocha#parallelMode ++// */ ++// parallelMode(enabled?: boolean): this; ++ ++// /** ++// * Assigns hooks to the root suite. ++// * ++// * @see https://mochajs.org/api/mocha#rootHooks ++// */ ++// rootHooks(hooks: Mocha.RootHookObject): this; ++// } ++ ++// declare namespace Mocha { ++// namespace utils { ++// /** ++// * Compute a slug from the given `str`. ++// * ++// * @see https://mochajs.org/api/module-utils.html#.slug ++// */ ++// function slug(str: string): string; ++ ++// /** ++// * Strip the function definition from `str`, and re-indent for pre whitespace. ++// * ++// * @see https://mochajs.org/api/module-utils.html#.clean ++// */ ++// function clean(str: string): string; ++ ++// /** ++// * Highlight the given string of `js`. ++// */ ++// function highlight(js: string): string; ++ ++// /** ++// * Takes some variable and asks `Object.prototype.toString()` what it thinks it is. ++// */ ++// function type(value: any): string; ++ ++// /** ++// * Stringify `value`. Different behavior depending on type of value: ++// * ++// * - If `value` is undefined or null, return `'[undefined]'` or `'[null]'`, respectively. ++// * - If `value` is not an object, function or array, return result of `value.toString()` wrapped in double-quotes. ++// * - If `value` is an *empty* object, function, or array, returns `'{}'`, `'[Function]'`, or `'[]'` respectively. ++// * - If `value` has properties, call canonicalize} on it, then return result of `JSON.stringify()` ++// * ++// * @see https://mochajs.org/api/module-utils.html#.stringify ++// */ ++// function stringify(value: any): string; ++ ++// /** ++// * Return a new Thing that has the keys in sorted order. Recursive. ++// * ++// * If the Thing... ++// * - has already been seen, return string `'[Circular]'` ++// * - is `undefined`, return string `'[undefined]'` ++// * - is `null`, return value `null` ++// * - is some other primitive, return the value ++// * - is not a primitive or an `Array`, `Object`, or `Function`, return the value of the Thing's `toString()` method ++// * - is a non-empty `Array`, `Object`, or `Function`, return the result of calling this function again. ++// * - is an empty `Array`, `Object`, or `Function`, returns `'[]'`, `'{}'`, or `'[Function]'` respectively. ++// * ++// * @see https://mochajs.org/api/module-utils.html#.canonicalize ++// */ ++// function canonicalize(value: any, stack: any[], typeHint: string): any; ++ ++// /** ++// * Lookup file names at the given `path`. ++// * ++// * @see https://mochajs.org/api/Mocha.utils.html#.exports.lookupFiles ++// */ ++// function lookupFiles(filepath: string, extensions?: string[], recursive?: boolean): string[]; ++ ++// /** ++// * Generate an undefined error with a message warning the user. ++// * ++// * @see https://mochajs.org/api/module-utils.html#.undefinedError ++// */ ++// function undefinedError(): Error; ++ ++// /** ++// * Generate an undefined error if `err` is not defined. ++// * ++// * @see https://mochajs.org/api/module-utils.html#.getError ++// */ ++// function getError(err: Error | undefined): Error; ++ ++// /** ++// * When invoking this function you get a filter function that get the Error.stack as an ++// * input, and return a prettify output. (i.e: strip Mocha and internal node functions from ++// * stack trace). ++// * ++// * @see https://mochajs.org/api/module-utils.html#.stackTraceFilter ++// */ ++// function stackTraceFilter(): (stack: string) => string; ++// } ++ ++// namespace interfaces { ++// function bdd(suite: Suite): void; ++// function tdd(suite: Suite): void; ++// function qunit(suite: Suite): void; ++// function exports(suite: Suite): void; ++// } ++ ++// // #region Test interface augmentations ++ ++// interface HookFunction { ++// /** ++// * [bdd, qunit, tdd] Describe a "hook" to execute the given callback `fn`. The name of the ++// * function is used as the name of the hook. ++// * ++// * - _Only available when invoked via the mocha CLI._ ++// */ ++// (fn: Func): void; ++ ++// /** ++// * [bdd, qunit, tdd] Describe a "hook" to execute the given callback `fn`. The name of the ++// * function is used as the name of the hook. ++// * ++// * - _Only available when invoked via the mocha CLI._ ++// */ ++// (fn: AsyncFunc): void; ++ ++// /** ++// * [bdd, qunit, tdd] Describe a "hook" to execute the given `title` and callback `fn`. ++// * ++// * - _Only available when invoked via the mocha CLI._ ++// */ ++// (name: string, fn?: Func): void; ++ ++// /** ++// * [bdd, qunit, tdd] Describe a "hook" to execute the given `title` and callback `fn`. ++// * ++// * - _Only available when invoked via the mocha CLI._ ++// */ ++// (name: string, fn?: AsyncFunc): void; ++// } ++ ++// interface SuiteFunction { ++// /** ++// * [bdd, tdd] Describe a "suite" with the given `title` and callback `fn` containing ++// * nested suites. ++// * ++// * - _Only available when invoked via the mocha CLI._ ++// */ ++// (title: string, fn: (this: Suite) => void): Suite; ++ ++// /** ++// * [qunit] Describe a "suite" with the given `title`. ++// * ++// * - _Only available when invoked via the mocha CLI._ ++// */ ++// (title: string): Suite; ++ ++// /** ++// * [bdd, tdd, qunit] Indicates this suite should be executed exclusively. ++// * ++// * - _Only available when invoked via the mocha CLI._ ++// */ ++// only: ExclusiveSuiteFunction; ++ ++// /** ++// * [bdd, tdd] Indicates this suite should not be executed. ++// * ++// * - _Only available when invoked via the mocha CLI._ ++// */ ++// skip: PendingSuiteFunction; ++// } ++ ++// interface ExclusiveSuiteFunction { ++// /** ++// * [bdd, tdd] Describe a "suite" with the given `title` and callback `fn` containing ++// * nested suites. Indicates this suite should be executed exclusively. ++// * ++// * - _Only available when invoked via the mocha CLI._ ++// */ ++// (title: string, fn: (this: Suite) => void): Suite; ++ ++// /** ++// * [qunit] Describe a "suite" with the given `title`. Indicates this suite should be executed ++// * exclusively. ++// * ++// * - _Only available when invoked via the mocha CLI._ ++// */ ++// (title: string): Suite; ++// } ++ ++// /** ++// * [bdd, tdd] Describe a "suite" with the given `title` and callback `fn` containing ++// * nested suites. Indicates this suite should not be executed. ++// * ++// * - _Only available when invoked via the mocha CLI._ ++// * ++// * @returns [bdd] `Suite` ++// * @returns [tdd] `void` ++// */ ++// interface PendingSuiteFunction { ++// (title: string, fn: (this: Suite) => void): Suite | void; ++// } ++ ++// interface TestFunction { ++// /** ++// * Describe a specification or test-case with the given callback `fn` acting as a thunk. ++// * The name of the function is used as the name of the test. ++// * ++// * - _Only available when invoked via the mocha CLI._ ++// */ ++// (fn: Func): Test; ++ ++// /** ++// * Describe a specification or test-case with the given callback `fn` acting as a thunk. ++// * The name of the function is used as the name of the test. ++// * ++// * - _Only available when invoked via the mocha CLI._ ++// */ ++// (fn: AsyncFunc): Test; ++ ++// /** ++// * Describe a specification or test-case with the given `title` and callback `fn` acting ++// * as a thunk. ++// * ++// * - _Only available when invoked via the mocha CLI._ ++// */ ++// (title: string, fn?: Func): Test; ++ ++// /** ++// * Describe a specification or test-case with the given `title` and callback `fn` acting ++// * as a thunk. ++// * ++// * - _Only available when invoked via the mocha CLI._ ++// */ ++// (title: string, fn?: AsyncFunc): Test; ++ ++// /** ++// * Indicates this test should be executed exclusively. ++// * ++// * - _Only available when invoked via the mocha CLI._ ++// */ ++// only: ExclusiveTestFunction; ++ ++// /** ++// * Indicates this test should not be executed. ++// * ++// * - _Only available when invoked via the mocha CLI._ ++// */ ++// skip: PendingTestFunction; ++ ++// /** ++// * Number of attempts to retry. ++// * ++// * - _Only available when invoked via the mocha CLI._ ++// */ ++// retries(n: number): void; ++// } ++ ++// interface ExclusiveTestFunction { ++// /** ++// * [bdd, tdd, qunit] Describe a specification or test-case with the given callback `fn` ++// * acting as a thunk. The name of the function is used as the name of the test. Indicates ++// * this test should be executed exclusively. ++// * ++// * - _Only available when invoked via the mocha CLI._ ++// */ ++// (fn: Func): Test; ++ ++// /** ++// * [bdd, tdd, qunit] Describe a specification or test-case with the given callback `fn` ++// * acting as a thunk. The name of the function is used as the name of the test. Indicates ++// * this test should be executed exclusively. ++// * ++// * - _Only available when invoked via the mocha CLI._ ++// */ ++// (fn: AsyncFunc): Test; ++ ++// /** ++// * [bdd, tdd, qunit] Describe a specification or test-case with the given `title` and ++// * callback `fn` acting as a thunk. Indicates this test should be executed exclusively. ++// * ++// * - _Only available when invoked via the mocha CLI._ ++// */ ++// (title: string, fn?: Func): Test; ++ ++// /** ++// * [bdd, tdd, qunit] Describe a specification or test-case with the given `title` and ++// * callback `fn` acting as a thunk. Indicates this test should be executed exclusively. ++// * ++// * - _Only available when invoked via the mocha CLI._ ++// */ ++// (title: string, fn?: AsyncFunc): Test; ++// } ++ ++// interface PendingTestFunction { ++// /** ++// * [bdd, tdd, qunit] Describe a specification or test-case with the given callback `fn` ++// * acting as a thunk. The name of the function is used as the name of the test. Indicates ++// * this test should not be executed. ++// * ++// * - _Only available when invoked via the mocha CLI._ ++// */ ++// (fn: Func): Test; ++ ++// /** ++// * [bdd, tdd, qunit] Describe a specification or test-case with the given callback `fn` ++// * acting as a thunk. The name of the function is used as the name of the test. Indicates ++// * this test should not be executed. ++// * ++// * - _Only available when invoked via the mocha CLI._ ++// */ ++// (fn: AsyncFunc): Test; ++ ++// /** ++// * [bdd, tdd, qunit] Describe a specification or test-case with the given `title` and ++// * callback `fn` acting as a thunk. Indicates this test should not be executed. ++// * ++// * - _Only available when invoked via the mocha CLI._ ++// */ ++// (title: string, fn?: Func): Test; ++ ++// /** ++// * [bdd, tdd, qunit] Describe a specification or test-case with the given `title` and ++// * callback `fn` acting as a thunk. Indicates this test should not be executed. ++// * ++// * - _Only available when invoked via the mocha CLI._ ++// */ ++// (title: string, fn?: AsyncFunc): Test; ++// } ++ ++// /** ++// * Execute after each test case. ++// * ++// * - _Only available when invoked via the mocha CLI._ ++// * ++// * @see https://mochajs.org/api/global.html#afterEach ++// */ ++// let afterEach: HookFunction; ++ ++// /** ++// * Execute after running tests. ++// * ++// * - _Only available when invoked via the mocha CLI._ ++// * ++// * @see https://mochajs.org/api/global.html#after ++// */ ++// let after: HookFunction; ++ ++// /** ++// * Execute before each test case. ++// * ++// * - _Only available when invoked via the mocha CLI._ ++// * ++// * @see https://mochajs.org/api/global.html#beforeEach ++// */ ++// let beforeEach: HookFunction; ++ ++// /** ++// * Execute before running tests. ++// * ++// * - _Only available when invoked via the mocha CLI._ ++// * ++// * @see https://mochajs.org/api/global.html#before ++// */ ++// let before: HookFunction; ++ ++// /** ++// * Describe a "suite" containing nested suites and tests. ++// * ++// * - _Only available when invoked via the mocha CLI._ ++// */ ++// let describe: SuiteFunction; ++ ++// /** ++// * Describes a test case. ++// * ++// * - _Only available when invoked via the mocha CLI._ ++// */ ++// let it: TestFunction; ++ ++// /** ++// * Describes a pending test case. ++// * ++// * - _Only available when invoked via the mocha CLI._ ++// */ ++// let xit: PendingTestFunction; ++ ++// /** ++// * Execute before each test case. ++// * ++// * - _Only available when invoked via the mocha CLI._ ++// * ++// * @see https://mochajs.org/api/global.html#beforeEach ++// */ ++// let setup: HookFunction; ++ ++// /** ++// * Execute before running tests. ++// * ++// * - _Only available when invoked via the mocha CLI._ ++// * ++// * @see https://mochajs.org/api/global.html#before ++// */ ++// let suiteSetup: HookFunction; ++ ++// /** ++// * Execute after running tests. ++// * ++// * - _Only available when invoked via the mocha CLI._ ++// * ++// * @see https://mochajs.org/api/global.html#after ++// */ ++// let suiteTeardown: HookFunction; ++ ++// /** ++// * Describe a "suite" containing nested suites and tests. ++// * ++// * - _Only available when invoked via the mocha CLI._ ++// */ ++// let suite: SuiteFunction; ++ ++// /** ++// * Execute after each test case. ++// * ++// * - _Only available when invoked via the mocha CLI._ ++// * ++// * @see https://mochajs.org/api/global.html#afterEach ++// */ ++// let teardown: HookFunction; ++ ++// /** ++// * Describes a test case. ++// * ++// * - _Only available when invoked via the mocha CLI._ ++// */ ++// let test: TestFunction; ++ ++// /** ++// * Triggers root suite execution. ++// * ++// * - _Only available if flag --delay is passed into Mocha._ ++// * - _Only available when invoked via the mocha CLI._ ++// * ++// * @see https://mochajs.org/api/global.html#runWithSuite ++// */ ++// function run(): void; ++ ++// // #endregion Test interface augmentations ++ ++// namespace reporters { ++// /** ++// * Initialize a new `Base` reporter. ++// * ++// * All other reporters generally inherit from this reporter, providing stats such as test duration, ++// * number of tests passed / failed, etc. ++// * ++// * @see https://mochajs.org/api/Mocha.reporters.Base.html ++// */ ++// class Base { ++// constructor(runner: Runner, options?: MochaOptions); ++ ++// /** ++// * Test run statistics ++// */ ++// stats: Stats; ++ ++// /** ++// * Test failures ++// */ ++// failures: Test[]; ++ ++// /** ++// * The configured runner ++// */ ++// runner: Runner; ++ ++// /** ++// * Output common epilogue used by many of the bundled reporters. ++// * ++// * @see https://mochajs.org/api/Mocha.reporters.Base.html#.Base#epilogue ++// */ ++// epilogue(): void; ++ ++// done?(failures: number, fn?: (failures: number) => void): void; ++// } ++ ++// namespace Base { ++// /** ++// * Enables coloring by default ++// * ++// * @see https://mochajs.org/api/module-base#.useColors ++// */ ++// let useColors: boolean; ++ ++// /** ++// * Inline diffs instead of +/- ++// * ++// * @see https://mochajs.org/api/module-base#.inlineDiffs ++// */ ++// let inlineDiffs: boolean; ++ ++// /** ++// * Default color map ++// * ++// * @see https://mochajs.org/api/module-base#.colors ++// */ ++// const colors: ColorMap; ++ ++// /** ++// * Default color map ++// * ++// * @see https://mochajs.org/api/module-base#.colors ++// */ ++// interface ColorMap { ++// // added by Base ++// pass: number; ++// fail: number; ++// "bright pass": number; ++// "bright fail": number; ++// "bright yellow": number; ++// pending: number; ++// suite: number; ++// "error title": number; ++// "error message": number; ++// "error stack": number; ++// checkmark: number; ++// fast: number; ++// medium: number; ++// slow: number; ++// green: number; ++// light: number; ++// "diff gutter": number; ++// "diff added": number; ++// "diff removed": number; ++ ++// // added by Progress ++// progress: number; ++ ++// // added by Landing ++// plane: number; ++// "plane crash": number; ++// runway: number; ++ ++// [key: string]: number; ++// } ++ ++// /** ++// * Default symbol map ++// * ++// * @see https://mochajs.org/api/module-base#.symbols ++// */ ++// const symbols: SymbolMap; ++ ++// /** ++// * Default symbol map ++// * ++// * @see https://mochajs.org/api/module-base#.symbols ++// */ ++// interface SymbolMap { ++// ok: string; ++// err: string; ++// dot: string; ++// comma: string; ++// bang: string; ++// [key: string]: string; ++// } ++ ++// /** ++// * Color `str` with the given `type` (from `colors`) ++// * ++// * @see https://mochajs.org/api/module-base#.color ++// */ ++// function color(type: string, str: string): string; ++ ++// /** ++// * Expose terminal window size ++// * ++// * @see https://mochajs.org/api/module-base#.window ++// */ ++// const window: { ++// width: number; ++// }; ++ ++// /** ++// * ANSI TTY control sequences common among reporters. ++// * ++// * @see https://mochajs.org/api/module-base#.cursor ++// */ ++// namespace cursor { ++// /** ++// * Hides the cursor ++// */ ++// function hide(): void; ++ ++// /** ++// * Shows the cursor ++// */ ++// function show(): void; ++ ++// /** ++// * Deletes the current line ++// */ ++// function deleteLine(): void; ++ ++// /** ++// * Moves to the beginning of the line ++// */ ++// function beginningOfLine(): void; ++ ++// /** ++// * Clears the line and moves to the beginning of the line. ++// */ ++// function CR(): void; ++// } ++ ++// /** ++// * Returns a diff between two strings with colored ANSI output. ++// * ++// * @see https://mochajs.org/api/module-base#.generateDiff ++// */ ++// function generateDiff(actual: string, expected: string): string; ++ ++// /** ++// * Output the given `failures` as a list. ++// * ++// * @see https://mochajs.org/api/Mocha.reporters.Base.html#.exports.list1 ++// */ ++// function list(failures: Test[]): void; ++// } ++ ++// /** ++// * Initialize a new `Dot` matrix test reporter. ++// * ++// * @see https://mochajs.org/api/Mocha.reporters.Dot.html ++// */ ++// class Dot extends Base { ++// } ++ ++// /** ++// * Initialize a new `Doc` reporter. ++// * ++// * @see https://mochajs.org/api/Mocha.reporters.Doc.html ++// */ ++// class Doc extends Base { ++// } ++ ++// /** ++// * Initialize a new `TAP` test reporter. ++// * ++// * @see https://mochajs.org/api/Mocha.reporters.TAP.html ++// */ ++// class TAP extends Base { ++// } ++ ++// /** ++// * Initialize a new `JSON` reporter ++// * ++// * @see https://mochajs.org/api/Mocha.reporters.JSON.html ++// */ ++// class JSON extends Base { ++// } ++ ++// /** ++// * Initialize a new `HTML` reporter. ++// * ++// * - _This reporter cannot be used on the console._ ++// * ++// * @see https://mochajs.org/api/Mocha.reporters.HTML.html ++// */ ++// class HTML extends Base { ++// /** ++// * Provide suite URL. ++// * ++// * @see https://mochajs.org/api/Mocha.reporters.HTML.html#suiteURL ++// */ ++// suiteURL(suite: Suite): string; ++ ++// /** ++// * Provide test URL. ++// * ++// * @see https://mochajs.org/api/Mocha.reporters.HTML.html#testURL ++// */ ++// testURL(test: Test): string; ++ ++// /** ++// * Adds code toggle functionality for the provided test's list element. ++// * ++// * @see https://mochajs.org/api/Mocha.reporters.HTML.html#addCodeToggle ++// */ ++// addCodeToggle(el: HTMLLIElement, contents: string): void; ++// } ++ ++// /** ++// * Initialize a new `List` test reporter. ++// * ++// * @see https://mochajs.org/api/Mocha.reporters.List.html ++// */ ++// class List extends Base { ++// } ++ ++// /** ++// * Initialize a new `Min` minimal test reporter (best used with --watch). ++// * ++// * @see https://mochajs.org/api/Mocha.reporters.Min.html ++// */ ++// class Min extends Base { ++// } ++ ++// /** ++// * Initialize a new `Spec` test reporter. ++// * ++// * @see https://mochajs.org/api/Mocha.reporters.Spec.html ++// */ ++// class Spec extends Base { ++// } ++ ++// /** ++// * Initialize a new `NyanCat` test reporter. ++// * ++// * @see https://mochajs.org/api/Mocha.reporters.Nyan.html ++// */ ++// class Nyan extends Base { ++// private colorIndex; ++// private numberOfLines; ++// private rainbowColors; ++// private scoreboardWidth; ++// private tick; ++// private trajectories; ++// private trajectoryWidthMax; ++// private draw; ++// private drawScoreboard; ++// private appendRainbow; ++// private drawRainbow; ++// private drawNyanCat; ++// private face; ++// private cursorUp; ++// private cursorDown; ++// private generateColors; ++// private rainbowify; ++// } ++ ++// /** ++// * Initialize a new `XUnit` test reporter. ++// * ++// * @see https://mochajs.org/api/Mocha.reporters.XUnit.html ++// */ ++// class XUnit extends Base { ++// constructor(runner: Runner, options?: XUnit.MochaOptions); ++ ++// /** ++// * Override done to close the stream (if it's a file). ++// * ++// * @see https://mochajs.org/api/Mocha.reporters.XUnit.html#done ++// */ ++// done(failures: number, fn: (failures: number) => void): void; ++ ++// /** ++// * Write out the given line. ++// * ++// * @see https://mochajs.org/api/Mocha.reporters.XUnit.html#write ++// */ ++// write(line: string): void; ++ ++// /** ++// * Output tag for the given `test.` ++// * ++// * @see https://mochajs.org/api/Mocha.reporters.XUnit.html#test ++// */ ++// test(test: Test): void; ++// } ++ ++// namespace XUnit { ++// interface MochaOptions extends Mocha.MochaOptions { ++// reporterOptions?: ReporterOptions; ++// } ++ ++// interface ReporterOptions { ++// output?: string; ++// suiteName?: string; ++// } ++// } ++ ++// /** ++// * Initialize a new `Markdown` test reporter. ++// * ++// * @see https://mochajs.org/api/Mocha.reporters.Markdown.html ++// */ ++// class Markdown extends Base { ++// } ++ ++// /** ++// * Initialize a new `Progress` bar test reporter. ++// * ++// * @see https://mochajs.org/api/Mocha.reporters.Progress.html ++// */ ++// class Progress extends Base { ++// constructor(runner: Runner, options?: Progress.MochaOptions); ++// } ++ ++// namespace Progress { ++// interface MochaOptions extends Mocha.MochaOptions { ++// reporterOptions?: ReporterOptions; ++// } ++ ++// interface ReporterOptions { ++// open?: string; ++// complete?: string; ++// incomplete?: string; ++// close?: string; ++// verbose?: boolean; ++// } ++// } ++ ++// /** ++// * Initialize a new `Landing` reporter. ++// * ++// * @see https://mochajs.org/api/Mocha.reporters.Landing.html ++// */ ++// class Landing extends Base { ++// } ++ ++// /** ++// * Initialize a new `JSONStream` test reporter. ++// * ++// * @see https://mochajs.org/api/Mocha.reporters.JSONStream.html ++// */ ++// class JSONStream extends Base { ++// } ++ ++// // value-only aliases ++// const base: typeof Base; ++// const dot: typeof Dot; ++// const doc: typeof Doc; ++// const tap: typeof TAP; ++// const json: typeof JSON; ++// const html: typeof HTML; ++// const list: typeof List; ++// const spec: typeof Spec; ++// const nyan: typeof Nyan; ++// const xunit: typeof XUnit; ++// const markdown: typeof Markdown; ++// const progress: typeof Progress; ++// const landing: typeof Landing; ++// // NOTE: not possible to type this correctly: ++// // const "json-stream": typeof JSONStream; ++// } ++ ++// /** ++// * Initialize a new `Runnable` with the given `title` and callback `fn`. ++// * ++// * @see https://mochajs.org/api/Runnable.html ++// */ ++// class Runnable { ++// private _slow; ++// private _retries; ++// private _currentRetry; ++// private _timeout; ++// private _timeoutError; ++ ++// constructor(title: string, fn?: Func | AsyncFunc); ++ ++// title: string; ++// fn: Func | AsyncFunc | undefined; ++// body: string; ++// async: boolean; ++// sync: boolean; ++// timedOut: boolean; ++// pending: boolean; ++// duration?: number; ++// parent?: Suite; ++// state?: "failed" | "passed"; ++// timer?: any; ++// ctx?: Context; ++// callback?: Done; ++// allowUncaught?: boolean; ++// file?: string; ++ ++// /** ++// * Get test timeout. ++// * ++// * @see https://mochajs.org/api/Runnable.html#timeout ++// */ ++// timeout(): number; ++ ++// /** ++// * Set test timeout. ++// * ++// * @see https://mochajs.org/api/Runnable.html#timeout ++// */ ++// timeout(ms: string | number): this; ++ ++// /** ++// * Get test slowness threshold. ++// * ++// * @see https://mochajs.org/api/Runnable.html#slow ++// */ ++// slow(): number; ++ ++// /** ++// * Set test slowness threshold. ++// * ++// * @see https://mochajs.org/api/Runnable.html#slow ++// */ ++// slow(ms: string | number): this; ++ ++// /** ++// * Halt and mark as pending. ++// */ ++// skip(): never; ++ ++// /** ++// * Check if this runnable or its parent suite is marked as pending. ++// * ++// * @see https://mochajs.org/api/Runnable.html#isPending ++// */ ++// isPending(): boolean; ++ ++// /** ++// * Return `true` if this Runnable has failed. ++// */ ++// isFailed(): boolean; ++ ++// /** ++// * Return `true` if this Runnable has passed. ++// */ ++// isPassed(): boolean; ++ ++// /** ++// * Set or get number of retries. ++// * ++// * @see https://mochajs.org/api/Runnable.html#retries ++// */ ++// retries(): number; ++ ++// /** ++// * Set or get number of retries. ++// * ++// * @see https://mochajs.org/api/Runnable.html#retries ++// */ ++// retries(n: number): void; ++ ++// /** ++// * Set or get current retry ++// * ++// * @see https://mochajs.org/api/Runnable.html#currentRetry ++// */ ++// protected currentRetry(): number; ++ ++// /** ++// * Set or get current retry ++// * ++// * @see https://mochajs.org/api/Runnable.html#currentRetry ++// */ ++// protected currentRetry(n: number): void; ++ ++// /** ++// * Return the full title generated by recursively concatenating the parent's full title. ++// */ ++// fullTitle(): string; ++ ++// /** ++// * Return the title path generated by concatenating the parent's title path with the title. ++// */ ++// titlePath(): string[]; ++ ++// /** ++// * Clear the timeout. ++// * ++// * @see https://mochajs.org/api/Runnable.html#clearTimeout ++// */ ++// clearTimeout(): void; ++ ++// /** ++// * Inspect the runnable void of private properties. ++// * ++// * @see https://mochajs.org/api/Runnable.html#inspect ++// */ ++// inspect(): string; ++ ++// /** ++// * Reset the timeout. ++// * ++// * @see https://mochajs.org/api/Runnable.html#resetTimeout ++// */ ++// resetTimeout(): void; ++ ++// /** ++// * Get a list of whitelisted globals for this test run. ++// * ++// * @see https://mochajs.org/api/Runnable.html#globals ++// */ ++// globals(): string[]; ++ ++// /** ++// * Set a list of whitelisted globals for this test run. ++// * ++// * @see https://mochajs.org/api/Runnable.html#globals ++// */ ++// globals(globals: ReadonlyArray): void; ++ ++// /** ++// * Run the test and invoke `fn(err)`. ++// * ++// * @see https://mochajs.org/api/Runnable.html#run ++// */ ++// run(fn: Done): void; ++// } ++ ++// // #region Runnable "error" event ++// interface Runnable extends NodeJS.EventEmitter { ++// on(event: "error", listener: (error: any) => void): this; ++// once(event: "error", listener: (error: any) => void): this; ++// addListener(event: "error", listener: (error: any) => void): this; ++// removeListener(event: "error", listener: (error: any) => void): this; ++// prependListener(event: "error", listener: (error: any) => void): this; ++// prependOnceListener(event: "error", listener: (error: any) => void): this; ++// emit(name: "error", error: any): boolean; ++// } ++// // #endregion Runnable "error" event ++// // #region Runnable untyped events ++// interface Runnable extends NodeJS.EventEmitter { ++// on(event: string, listener: (...args: any[]) => void): this; ++// once(event: string, listener: (...args: any[]) => void): this; ++// addListener(event: string, listener: (...args: any[]) => void): this; ++// removeListener(event: string, listener: (...args: any[]) => void): this; ++// prependListener(event: string, listener: (...args: any[]) => void): this; ++// prependOnceListener(event: string, listener: (...args: any[]) => void): this; ++// emit(name: string, ...args: any[]): boolean; ++// } ++// // #endregion Runnable untyped events ++ ++// /** ++// * Test context ++// * ++// * @see https://mochajs.org/api/module-Context.html#~Context ++// */ ++// class Context { ++// private _runnable; ++ ++// test?: Runnable; ++// currentTest?: Test; ++ ++// /** ++// * Get the context `Runnable`. ++// */ ++// runnable(): Runnable; ++ ++// /** ++// * Set the context `Runnable`. ++// */ ++// runnable(runnable: Runnable): this; ++ ++// /** ++// * Get test timeout. ++// */ ++// timeout(): number; ++ ++// /** ++// * Set test timeout. ++// */ ++// timeout(ms: string | number): this; ++ ++// /** ++// * Get test slowness threshold. ++// */ ++// slow(): number; ++ ++// /** ++// * Set test slowness threshold. ++// */ ++// slow(ms: string | number): this; ++ ++// /** ++// * Mark a test as skipped. ++// */ ++// skip(): never; ++ ++// /** ++// * Get the number of allowed retries on failed tests. ++// */ ++// retries(): number; ++ ++// /** ++// * Set the number of allowed retries on failed tests. ++// */ ++// retries(n: number): this; ++ ++// [key: string]: any; ++// } ++ ++// interface RunnerConstants { ++// readonly EVENT_HOOK_BEGIN: 'hook'; ++// readonly EVENT_HOOK_END: 'hook end'; ++// readonly EVENT_RUN_BEGIN: 'start'; ++// readonly EVENT_DELAY_BEGIN: 'waiting'; ++// readonly EVENT_DELAY_END: 'ready'; ++// readonly EVENT_RUN_END: 'end'; ++// readonly EVENT_SUITE_BEGIN: 'suite'; ++// readonly EVENT_SUITE_END: 'suite end'; ++// readonly EVENT_TEST_BEGIN: 'test'; ++// readonly EVENT_TEST_END: 'test end'; ++// readonly EVENT_TEST_FAIL: 'fail'; ++// readonly EVENT_TEST_PASS: 'pass'; ++// readonly EVENT_TEST_PENDING: 'pending'; ++// readonly EVENT_TEST_RETRY: 'retry'; ++// } ++ ++// /** ++// * Initialize a `Runner` for the given `suite`. ++// * ++// * @see https://mochajs.org/api/Mocha.Runner.html ++// */ ++// class Runner { ++// private _globals; ++// private _abort; ++// private _delay; ++// private _defaultGrep; ++// private next; ++// private hookErr; ++// private prevGlobalsLength; ++// private nextSuite; ++ ++// static readonly constants: RunnerConstants; ++ ++// constructor(suite: Suite, delay: boolean); ++ ++// suite: Suite; ++// started: boolean; ++// total: number; ++// failures: number; ++// asyncOnly?: boolean; ++// allowUncaught?: boolean; ++// fullStackTrace?: boolean; ++// forbidOnly?: boolean; ++// forbidPending?: boolean; ++// checkLeaks?: boolean; ++// test?: Test; ++// currentRunnable?: Runnable; ++// stats?: Stats; // added by reporters ++ ++// /** ++// * Run tests with full titles matching `re`. Updates runner.total ++// * with number of tests matched. ++// * ++// * @see https://mochajs.org/api/Mocha.Runner.html#.Runner#grep ++// */ ++// grep(re: RegExp, invert: boolean): this; ++ ++// /** ++// * Returns the number of tests matching the grep search for the ++// * given suite. ++// * ++// * @see https://mochajs.org/api/Mocha.Runner.html#.Runner#grepTotal ++// */ ++// grepTotal(suite: Suite): number; ++ ++// /** ++// * Gets the allowed globals. ++// * ++// * @see https://mochajs.org/api/Mocha.Runner.html#.Runner#globals ++// */ ++// globals(): string[]; ++ ++// /** ++// * Allow the given `arr` of globals. ++// * ++// * @see https://mochajs.org/api/Mocha.Runner.html#.Runner#globals ++// */ ++// globals(arr: ReadonlyArray): this; ++ ++// /** ++// * Run the root suite and invoke `fn(failures)` on completion. ++// * ++// * @see https://mochajs.org/api/Mocha.Runner.html#.Runner#run ++// */ ++// run(fn?: (failures: number) => void): this; ++ ++// /** ++// * Cleanly abort execution. ++// * ++// * @see https://mochajs.org/api/Mocha.Runner.html#.Runner#abort ++// */ ++// abort(): this; ++ ++// /** ++// * Handle uncaught exceptions. ++// * ++// * @see https://mochajs.org/api/Mocha.Runner.html#uncaught ++// */ ++// uncaught(err: any): void; ++ ++// /** ++// * Wrapper for setImmediate, process.nextTick, or browser polyfill. ++// */ ++// protected static immediately(callback: Function): void; ++ ++// /** ++// * Return a list of global properties. ++// * ++// * @see https://mochajs.org/api/Mocha.Runner.html#globalProps ++// */ ++// protected globalProps(): string[]; ++ ++// /** ++// * Check for global variable leaks. ++// * ++// * @see https://mochajs.org/api/Mocha.Runner.html#checkGlobals ++// */ ++// protected checkGlobals(test: Test): void; ++ ++// /** ++// * Fail the given `test`. ++// * ++// * @see https://mochajs.org/api/Mocha.Runner.html#fail ++// */ ++// protected fail(test: Test, err: any): void; ++ ++// /** ++// * Fail the given `hook` with `err`. ++// * ++// * Hook failures work in the following pattern: ++// * - If bail, then exit ++// * - Failed `before` hook skips all tests in a suite and subsuites, ++// * but jumps to corresponding `after` hook ++// * - Failed `before each` hook skips remaining tests in a ++// * suite and jumps to corresponding `after each` hook, ++// * which is run only once ++// * - Failed `after` hook does not alter ++// * execution order ++// * - Failed `after each` hook skips remaining tests in a ++// * suite and subsuites, but executes other `after each` ++// * hooks ++// * ++// * @see https://mochajs.org/api/Mocha.Runner.html#failHook ++// */ ++// protected failHook(hook: Hook, err: any): void; ++ ++// /** ++// * Run hook `name` callbacks and then invoke `fn()`. ++// * ++// * @see https://mochajs.org/api/Mocha.Runner.html#hook ++// */ ++// protected hook(name: string, fn: () => void): void; ++ ++// /** ++// * Run hook `name` for the given array of `suites` ++// * in order, and callback `fn(err, errSuite)`. ++// * ++// * @see https://mochajs.org/api/Mocha.Runner.html#hooks ++// */ ++// protected hooks(name: string, suites: Suite[], fn: (err?: any, errSuite?: Suite) => void): void; ++ ++// /** ++// * Run hooks from the top level down. ++// * ++// * @see https://mochajs.org/api/Mocha.Runner.html#hookUp ++// */ ++// protected hookUp(name: string, fn: (err?: any, errSuite?: Suite) => void): void; ++ ++// /** ++// * Run hooks from the bottom up. ++// * ++// * @see https://mochajs.org/api/Mocha.Runner.html#hookDown ++// */ ++// protected hookDown(name: string, fn: (err?: any, errSuite?: Suite) => void): void; ++ ++// /** ++// * Return an array of parent Suites from closest to furthest. ++// * ++// * @see https://mochajs.org/api/Mocha.Runner.html#parents ++// */ ++// protected parents(): Suite[]; ++ ++// /** ++// * Run the current test and callback `fn(err)`. ++// * ++// * @see https://mochajs.org/api/Mocha.Runner.html#runTest ++// */ ++// protected runTest(fn: Done): any; ++ ++// /** ++// * Run tests in the given `suite` and invoke the callback `fn()` when complete. ++// * ++// * @see https://mochajs.org/api/Mocha.Runner.html#runTests ++// */ ++// protected runTests(suite: Suite, fn: (errSuite?: Suite) => void): void; ++ ++// /** ++// * Run the given `suite` and invoke the callback `fn()` when complete. ++// * ++// * @see https://mochajs.org/api/Mocha.Runner.html#runSuite ++// */ ++// protected runSuite(suite: Suite, fn: (errSuite?: Suite) => void): void; ++// } ++ ++// // #region Runner "waiting" event ++// interface Runner { ++// on(event: "waiting", listener: (rootSuite: Suite) => void): this; ++// once(event: "waiting", listener: (rootSuite: Suite) => void): this; ++// addListener(event: "waiting", listener: (rootSuite: Suite) => void): this; ++// removeListener(event: "waiting", listener: (rootSuite: Suite) => void): this; ++// prependListener(event: "waiting", listener: (rootSuite: Suite) => void): this; ++// prependOnceListener(event: "waiting", listener: (rootSuite: Suite) => void): this; ++// emit(name: "waiting", rootSuite: Suite): boolean; ++// } ++// // #endregion Runner "waiting" event ++// // #region Runner "start" event ++// interface Runner extends NodeJS.EventEmitter { ++// on(event: "start", listener: () => void): this; ++// once(event: "start", listener: () => void): this; ++// addListener(event: "start", listener: () => void): this; ++// removeListener(event: "start", listener: () => void): this; ++// prependListener(event: "start", listener: () => void): this; ++// prependOnceListener(event: "start", listener: () => void): this; ++// emit(name: "start"): boolean; ++// } ++// // #endregion Runner "start" event ++// // #region Runner "end" event ++// interface Runner extends NodeJS.EventEmitter { ++// on(event: "end", listener: () => void): this; ++// once(event: "end", listener: () => void): this; ++// addListener(event: "end", listener: () => void): this; ++// removeListener(event: "end", listener: () => void): this; ++// prependListener(event: "end", listener: () => void): this; ++// prependOnceListener(event: "end", listener: () => void): this; ++// emit(name: "end"): boolean; ++// } ++// // #endregion Runner "end" event ++// // #region Runner "suite" event ++// interface Runner extends NodeJS.EventEmitter { ++// on(event: "suite", listener: (suite: Suite) => void): this; ++// once(event: "suite", listener: (suite: Suite) => void): this; ++// addListener(event: "suite", listener: (suite: Suite) => void): this; ++// removeListener(event: "suite", listener: (suite: Suite) => void): this; ++// prependListener(event: "suite", listener: (suite: Suite) => void): this; ++// prependOnceListener(event: "suite", listener: (suite: Suite) => void): this; ++// emit(name: "suite", suite: Suite): boolean; ++// } ++// // #endregion Runner "suite" event ++// // #region Runner "suite end" event ++// interface Runner extends NodeJS.EventEmitter { ++// on(event: "suite end", listener: (suite: Suite) => void): this; ++// once(event: "suite end", listener: (suite: Suite) => void): this; ++// addListener(event: "suite end", listener: (suite: Suite) => void): this; ++// removeListener(event: "suite end", listener: (suite: Suite) => void): this; ++// prependListener(event: "suite end", listener: (suite: Suite) => void): this; ++// prependOnceListener(event: "suite end", listener: (suite: Suite) => void): this; ++// emit(name: "suite end", suite: Suite): boolean; ++// } ++// // #endregion Runner "suite end" event ++// // #region Runner "test" event ++// interface Runner extends NodeJS.EventEmitter { ++// on(event: "test", listener: (test: Test) => void): this; ++// once(event: "test", listener: (test: Test) => void): this; ++// addListener(event: "test", listener: (test: Test) => void): this; ++// removeListener(event: "test", listener: (test: Test) => void): this; ++// prependListener(event: "test", listener: (test: Test) => void): this; ++// prependOnceListener(event: "test", listener: (test: Test) => void): this; ++// emit(name: "test", test: Test): boolean; ++// } ++// // #endregion Runner "test" event ++// // #region Runner "test end" event ++// interface Runner extends NodeJS.EventEmitter { ++// on(event: "test end", listener: (test: Test) => void): this; ++// once(event: "test end", listener: (test: Test) => void): this; ++// addListener(event: "test end", listener: (test: Test) => void): this; ++// removeListener(event: "test end", listener: (test: Test) => void): this; ++// prependListener(event: "test end", listener: (test: Test) => void): this; ++// prependOnceListener(event: "test end", listener: (test: Test) => void): this; ++// emit(name: "test end", test: Test): boolean; ++// } ++// // #endregion Runner "test end" event ++// // #region Runner "hook" event ++// interface Runner extends NodeJS.EventEmitter { ++// on(event: "hook", listener: (hook: Hook) => void): this; ++// once(event: "hook", listener: (hook: Hook) => void): this; ++// addListener(event: "hook", listener: (hook: Hook) => void): this; ++// removeListener(event: "hook", listener: (hook: Hook) => void): this; ++// prependListener(event: "hook", listener: (hook: Hook) => void): this; ++// prependOnceListener(event: "hook", listener: (hook: Hook) => void): this; ++// emit(name: "hook", hook: Hook): boolean; ++// } ++// // #endregion Runner "hook" event ++// // #region Runner "hook end" event ++// interface Runner extends NodeJS.EventEmitter { ++// on(event: "hook end", listener: (hook: Hook) => void): this; ++// once(event: "hook end", listener: (hook: Hook) => void): this; ++// addListener(event: "hook end", listener: (hook: Hook) => void): this; ++// removeListener(event: "hook end", listener: (hook: Hook) => void): this; ++// prependListener(event: "hook end", listener: (hook: Hook) => void): this; ++// prependOnceListener(event: "hook end", listener: (hook: Hook) => void): this; ++// emit(name: "hook end", hook: Hook): boolean; ++// } ++// // #endregion Runner "hook end" event ++// // #region Runner "pass" event ++// interface Runner extends NodeJS.EventEmitter { ++// on(event: "pass", listener: (test: Test) => void): this; ++// once(event: "pass", listener: (test: Test) => void): this; ++// addListener(event: "pass", listener: (test: Test) => void): this; ++// removeListener(event: "pass", listener: (test: Test) => void): this; ++// prependListener(event: "pass", listener: (test: Test) => void): this; ++// prependOnceListener(event: "pass", listener: (test: Test) => void): this; ++// emit(name: "pass", test: Test): boolean; ++// } ++// // #endregion Runner "pass" event ++// // #region Runner "fail" event ++// interface Runner extends NodeJS.EventEmitter { ++// on(event: "fail", listener: (test: Test, err: any) => void): this; ++// once(event: "fail", listener: (test: Test, err: any) => void): this; ++// addListener(event: "fail", listener: (test: Test, err: any) => void): this; ++// removeListener(event: "fail", listener: (test: Test, err: any) => void): this; ++// prependListener(event: "fail", listener: (test: Test, err: any) => void): this; ++// prependOnceListener(event: "fail", listener: (test: Test, err: any) => void): this; ++// emit(name: "fail", test: Test, err: any): boolean; ++// } ++// // #endregion Runner "fail" event ++// // #region Runner "pending" event ++// interface Runner extends NodeJS.EventEmitter { ++// on(event: "pending", listener: (test: Test) => void): this; ++// once(event: "pending", listener: (test: Test) => void): this; ++// addListener(event: "pending", listener: (test: Test) => void): this; ++// removeListener(event: "pending", listener: (test: Test) => void): this; ++// prependListener(event: "pending", listener: (test: Test) => void): this; ++// prependOnceListener(event: "pending", listener: (test: Test) => void): this; ++// emit(name: "pending", test: Test): boolean; ++// } ++// // #endregion Runner "pending" event ++// // #region Runner untyped events ++// interface Runner extends NodeJS.EventEmitter { ++// on(event: string, listener: (...args: any[]) => void): this; ++// once(event: string, listener: (...args: any[]) => void): this; ++// addListener(event: string, listener: (...args: any[]) => void): this; ++// removeListener(event: string, listener: (...args: any[]) => void): this; ++// prependListener(event: string, listener: (...args: any[]) => void): this; ++// prependOnceListener(event: string, listener: (...args: any[]) => void): this; ++// emit(name: string, ...args: any[]): boolean; ++// } ++// // #endregion Runner untyped events ++ ++// interface SuiteConstants { ++// readonly EVENT_FILE_POST_REQUIRE: 'post-require'; ++// readonly EVENT_FILE_PRE_REQUIRE: 'pre-require'; ++// readonly EVENT_FILE_REQUIRE: 'require'; ++// readonly EVENT_ROOT_SUITE_RUN: 'run'; ++ ++// readonly HOOK_TYPE_AFTER_ALL: 'afterAll'; ++// readonly HOOK_TYPE_AFTER_EACH: 'afterEach'; ++// readonly HOOK_TYPE_BEFORE_ALL: 'beforeAll'; ++// readonly HOOK_TYPE_BEFORE_EACH: 'beforeEach'; ++ ++// readonly EVENT_SUITE_ADD_HOOK_AFTER_ALL: 'afterAll'; ++// readonly EVENT_SUITE_ADD_HOOK_AFTER_EACH: 'afterEach'; ++// readonly EVENT_SUITE_ADD_HOOK_BEFORE_ALL: 'beforeAll'; ++// readonly EVENT_SUITE_ADD_HOOK_BEFORE_EACH: 'beforeEach'; ++// readonly EVENT_SUITE_ADD_SUITE: 'suite'; ++// readonly EVENT_SUITE_ADD_TEST: 'test'; ++// } ++ ++// /** ++// * Initialize a new `Suite` with the given `title` and `ctx`. ++// * ++// * @see https://mochajs.org/api/Mocha.Suite.html ++// */ ++// class Suite { ++// private _beforeEach; ++// private _beforeAll; ++// private _afterEach; ++// private _afterAll; ++// private _timeout; ++// private _slow; ++// private _bail; ++// private _retries; ++// private _onlyTests; ++// private _onlySuites; ++ ++// static readonly constants: SuiteConstants; ++ ++// constructor(title: string, parentContext?: Context); ++ ++// ctx: Context; ++// suites: Suite[]; ++// tests: Test[]; ++// pending: boolean; ++// file?: string; ++// root: boolean; ++// delayed: boolean; ++// parent: Suite | undefined; ++// title: string; ++ ++// /** ++// * Create a new `Suite` with the given `title` and parent `Suite`. When a suite ++// * with the same title is already present, that suite is returned to provide ++// * nicer reporter and more flexible meta-testing. ++// * ++// * @see https://mochajs.org/api/mocha#.exports.create ++// */ ++// static create(parent: Suite, title: string): Suite; ++ ++// /** ++// * Return a clone of this `Suite`. ++// * ++// * @see https://mochajs.org/api/Mocha.Suite.html#clone ++// */ ++// clone(): Suite; ++ ++// /** ++// * Get timeout `ms`. ++// * ++// * @see https://mochajs.org/api/Mocha.Suite.html#timeout ++// */ ++// timeout(): number; ++ ++// /** ++// * Set timeout `ms` or short-hand such as "2s". ++// * ++// * @see https://mochajs.org/api/Mocha.Suite.html#timeout ++// */ ++// timeout(ms: string | number): this; ++ ++// /** ++// * Get number of times to retry a failed test. ++// * ++// * @see https://mochajs.org/api/Mocha.Suite.html#retries ++// */ ++// retries(): number; ++ ++// /** ++// * Set number of times to retry a failed test. ++// * ++// * @see https://mochajs.org/api/Mocha.Suite.html#retries ++// */ ++// retries(n: string | number): this; ++ ++// /** ++// * Get slow `ms`. ++// * ++// * @see https://mochajs.org/api/Mocha.Suite.html#slow ++// */ ++// slow(): number; ++ ++// /** ++// * Set slow `ms` or short-hand such as "2s". ++// * ++// * @see https://mochajs.org/api/Mocha.Suite.html#slow ++// */ ++// slow(ms: string | number): this; ++ ++// /** ++// * Get whether to bail after first error. ++// * ++// * @see https://mochajs.org/api/Mocha.Suite.html#bail ++// */ ++// bail(): boolean; ++ ++// /** ++// * Set whether to bail after first error. ++// * ++// * @see https://mochajs.org/api/Mocha.Suite.html#bail ++// */ ++// bail(bail: boolean): this; ++ ++// /** ++// * Check if this suite or its parent suite is marked as pending. ++// * ++// * @see https://mochajs.org/api/Mocha.Suite.html#isPending ++// */ ++// isPending(): boolean; ++ ++// /** ++// * Run `fn(test[, done])` before running tests. ++// * ++// * @see https://mochajs.org/api/Mocha.Suite.html#beforeAll ++// */ ++// beforeAll(fn?: Func): this; ++ ++// /** ++// * Run `fn(test[, done])` before running tests. ++// * ++// * @see https://mochajs.org/api/Mocha.Suite.html#beforeAll ++// */ ++// beforeAll(fn?: AsyncFunc): this; ++ ++// /** ++// * Run `fn(test[, done])` before running tests. ++// * ++// * @see https://mochajs.org/api/Mocha.Suite.html#beforeAll ++// */ ++// beforeAll(title: string, fn?: Func): this; ++ ++// /** ++// * Run `fn(test[, done])` before running tests. ++// * ++// * @see https://mochajs.org/api/Mocha.Suite.html#beforeAll ++// */ ++// beforeAll(title: string, fn?: AsyncFunc): this; ++ ++// /** ++// * Run `fn(test[, done])` after running tests. ++// * ++// * @see https://mochajs.org/api/Mocha.Suite.html#afterAll ++// */ ++// afterAll(fn?: Func): this; ++ ++// /** ++// * Run `fn(test[, done])` after running tests. ++// * ++// * @see https://mochajs.org/api/Mocha.Suite.html#afterAll ++// */ ++// afterAll(fn?: AsyncFunc): this; ++ ++// /** ++// * Run `fn(test[, done])` after running tests. ++// * ++// * @see https://mochajs.org/api/Mocha.Suite.html#afterAll ++// */ ++// afterAll(title: string, fn?: Func): this; ++ ++// /** ++// * Run `fn(test[, done])` after running tests. ++// * ++// * @see https://mochajs.org/api/Mocha.Suite.html#afterAll ++// */ ++// afterAll(title: string, fn?: AsyncFunc): this; ++ ++// /** ++// * Run `fn(test[, done])` before each test case. ++// * ++// * @see https://mochajs.org/api/Mocha.Suite.html#beforeEach ++// */ ++// beforeEach(fn?: Func): this; ++ ++// /** ++// * Run `fn(test[, done])` before each test case. ++// * ++// * @see https://mochajs.org/api/Mocha.Suite.html#beforeEach ++// */ ++// beforeEach(fn?: AsyncFunc): this; ++ ++// /** ++// * Run `fn(test[, done])` before each test case. ++// * ++// * @see https://mochajs.org/api/Mocha.Suite.html#beforeEach ++// */ ++// beforeEach(title: string, fn?: Func): this; ++ ++// /** ++// * Run `fn(test[, done])` before each test case. ++// * ++// * @see https://mochajs.org/api/Mocha.Suite.html#beforeEach ++// */ ++// beforeEach(title: string, fn?: AsyncFunc): this; ++ ++// /** ++// * Run `fn(test[, done])` after each test case. ++// * ++// * @see https://mochajs.org/api/Mocha.Suite.html#afterEach ++// */ ++// afterEach(fn?: Func): this; ++ ++// /** ++// * Run `fn(test[, done])` after each test case. ++// * ++// * @see https://mochajs.org/api/Mocha.Suite.html#afterEach ++// */ ++// afterEach(fn?: AsyncFunc): this; ++ ++// /** ++// * Run `fn(test[, done])` after each test case. ++// * ++// * @see https://mochajs.org/api/Mocha.Suite.html#afterEach ++// */ ++// afterEach(title: string, fn?: Func): this; ++ ++// /** ++// * Run `fn(test[, done])` after each test case. ++// * ++// * @see https://mochajs.org/api/Mocha.Suite.html#afterEach ++// */ ++// afterEach(title: string, fn?: AsyncFunc): this; ++ ++// /** ++// * Add a test `suite`. ++// * ++// * @see https://mochajs.org/api/Mocha.Suite.html#addSuite ++// */ ++// addSuite(suite: Suite): this; ++ ++// /** ++// * Add a `test` to this suite. ++// * ++// * @see https://mochajs.org/api/Mocha.Suite.html#addTest ++// */ ++// addTest(test: Test): this; ++ ++// /** ++// * Return the full title generated by recursively concatenating the parent's ++// * full title. ++// * ++// * @see https://mochajs.org/api/Mocha.Suite.html#.Suite#fullTitle ++// */ ++// fullTitle(): string; ++ ++// /** ++// * Return the title path generated by recursively concatenating the parent's ++// * title path. ++// * ++// * @see https://mochajs.org/api/Mocha.Suite.html#.Suite#titlePath ++// */ ++// titlePath(): string[]; ++ ++// /** ++// * Return the total number of tests. ++// * ++// * @see https://mochajs.org/api/Mocha.Suite.html#.Suite#total ++// */ ++// total(): number; ++ ++// /** ++// * Iterates through each suite recursively to find all tests. Applies a ++// * function in the format `fn(test)`. ++// * ++// * @see https://mochajs.org/api/Mocha.Suite.html#eachTest ++// */ ++// eachTest(fn: (test: Test) => void): this; ++ ++// /** ++// * This will run the root suite if we happen to be running in delayed mode. ++// * ++// * @see https://mochajs.org/api/Mocha.Suite.html#run ++// */ ++// run(): void; ++ ++// /** ++// * Generic hook-creator. ++// */ ++// protected _createHook(title: string, fn?: Func | AsyncFunc): Hook; ++// } ++ ++// // #region Suite "beforeAll" event ++// interface Suite extends NodeJS.EventEmitter { ++// on(event: "beforeAll", listener: (hook: Hook) => void): this; ++// once(event: "beforeAll", listener: (hook: Hook) => void): this; ++// addListener(event: "beforeAll", listener: (hook: Hook) => void): this; ++// removeListener(event: "beforeAll", listener: (hook: Hook) => void): this; ++// prependListener(event: "beforeAll", listener: (hook: Hook) => void): this; ++// prependOnceListener(event: "beforeAll", listener: (hook: Hook) => void): this; ++// emit(name: "beforeAll", hook: Hook): boolean; ++// } ++// // #endregion Suite "beforeAll" event ++// // #region Suite "afterAll" event ++// interface Suite extends NodeJS.EventEmitter { ++// on(event: "afterAll", listener: (hook: Hook) => void): this; ++// once(event: "afterAll", listener: (hook: Hook) => void): this; ++// addListener(event: "afterAll", listener: (hook: Hook) => void): this; ++// removeListener(event: "afterAll", listener: (hook: Hook) => void): this; ++// prependListener(event: "afterAll", listener: (hook: Hook) => void): this; ++// prependOnceListener(event: "afterAll", listener: (hook: Hook) => void): this; ++// emit(name: "afterAll", hook: Hook): boolean; ++// } ++// // #endregion Suite "afterAll" event ++// // #region Suite "beforeEach" event ++// interface Suite extends NodeJS.EventEmitter { ++// on(event: "beforeEach", listener: (hook: Hook) => void): this; ++// once(event: "beforeEach", listener: (hook: Hook) => void): this; ++// addListener(event: "beforeEach", listener: (hook: Hook) => void): this; ++// removeListener(event: "beforeEach", listener: (hook: Hook) => void): this; ++// prependListener(event: "beforeEach", listener: (hook: Hook) => void): this; ++// prependOnceListener(event: "beforeEach", listener: (hook: Hook) => void): this; ++// emit(name: "beforeEach", hook: Hook): boolean; ++// } ++// // #endregion Suite "beforeEach" event ++// // #region Suite "afterEach" event ++// interface Suite extends NodeJS.EventEmitter { ++// on(event: "afterEach", listener: (hook: Hook) => void): this; ++// once(event: "afterEach", listener: (hook: Hook) => void): this; ++// addListener(event: "afterEach", listener: (hook: Hook) => void): this; ++// removeListener(event: "afterEach", listener: (hook: Hook) => void): this; ++// prependListener(event: "afterEach", listener: (hook: Hook) => void): this; ++// prependOnceListener(event: "afterEach", listener: (hook: Hook) => void): this; ++// emit(name: "afterEach", hook: Hook): boolean; ++// } ++// // #endregion Suite "afterEach" event ++// // #region Suite "suite" event ++// interface Suite extends NodeJS.EventEmitter { ++// on(event: "suite", listener: (suite: Suite) => void): this; ++// once(event: "suite", listener: (suite: Suite) => void): this; ++// addListener(event: "suite", listener: (suite: Suite) => void): this; ++// removeListener(event: "suite", listener: (suite: Suite) => void): this; ++// prependListener(event: "suite", listener: (suite: Suite) => void): this; ++// prependOnceListener(event: "suite", listener: (suite: Suite) => void): this; ++// emit(name: "suite", suite: Suite): boolean; ++// } ++// // #endregion Suite "suite" event ++// // #region Suite "test" event ++// interface Suite { ++// on(event: "test", listener: (test: Test) => void): this; ++// once(event: "test", listener: (test: Test) => void): this; ++// addListener(event: "test", listener: (test: Test) => void): this; ++// removeListener(event: "test", listener: (test: Test) => void): this; ++// prependListener(event: "test", listener: (test: Test) => void): this; ++// prependOnceListener(event: "test", listener: (test: Test) => void): this; ++// emit(name: "test", test: Test): boolean; ++// } ++// // #endregion Suite "test" event ++// // #region Suite "run" event ++// interface Suite extends NodeJS.EventEmitter { ++// on(event: "run", listener: () => void): this; ++// once(event: "run", listener: () => void): this; ++// addListener(event: "run", listener: () => void): this; ++// removeListener(event: "run", listener: () => void): this; ++// prependListener(event: "run", listener: () => void): this; ++// prependOnceListener(event: "run", listener: () => void): this; ++// emit(name: "run"): boolean; ++// } ++// // #endregion Suite "run" event ++// // #region Suite "pre-require" event ++// interface Suite extends NodeJS.EventEmitter { ++// on(event: "pre-require", listener: (context: MochaGlobals, file: string, mocha: Mocha) => void): this; ++// once(event: "pre-require", listener: (context: MochaGlobals, file: string, mocha: Mocha) => void): this; ++// addListener(event: "pre-require", listener: (context: MochaGlobals, file: string, mocha: Mocha) => void): this; ++// removeListener(event: "pre-require", listener: (context: MochaGlobals, file: string, mocha: Mocha) => void): this; ++// prependListener(event: "pre-require", listener: (context: MochaGlobals, file: string, mocha: Mocha) => void): this; ++// prependOnceListener(event: "pre-require", listener: (context: MochaGlobals, file: string, mocha: Mocha) => void): this; ++// emit(name: "pre-require", context: MochaGlobals, file: string, mocha: Mocha): boolean; ++// } ++// // #endregion Suite "pre-require" event ++// // #region Suite "require" event ++// interface Suite extends NodeJS.EventEmitter { ++// on(event: "require", listener: (module: any, file: string, mocha: Mocha) => void): this; ++// once(event: "require", listener: (module: any, file: string, mocha: Mocha) => void): this; ++// addListener(event: "require", listener: (module: any, file: string, mocha: Mocha) => void): this; ++// removeListener(event: "require", listener: (module: any, file: string, mocha: Mocha) => void): this; ++// prependListener(event: "require", listener: (module: any, file: string, mocha: Mocha) => void): this; ++// prependOnceListener(event: "require", listener: (module: any, file: string, mocha: Mocha) => void): this; ++// emit(name: "require", module: any, file: string, mocha: Mocha): boolean; ++// } ++// // #endregion Suite "require" event ++// // #region Suite "post-require" event ++// interface Suite extends NodeJS.EventEmitter { ++// on(event: "post-require", listener: (context: MochaGlobals, file: string, mocha: Mocha) => void): this; ++// once(event: "post-require", listener: (context: MochaGlobals, file: string, mocha: Mocha) => void): this; ++// addListener(event: "post-require", listener: (context: MochaGlobals, file: string, mocha: Mocha) => void): this; ++// removeListener(event: "post-require", listener: (context: MochaGlobals, file: string, mocha: Mocha) => void): this; ++// prependListener(event: "post-require", listener: (context: MochaGlobals, file: string, mocha: Mocha) => void): this; ++// prependOnceListener(event: "post-require", listener: (context: MochaGlobals, file: string, mocha: Mocha) => void): this; ++// emit(name: "post-require", context: MochaGlobals, file: string, mocha: Mocha): boolean; ++// } ++// // #endregion Suite "post-require" event ++// // #region Suite untyped events ++// interface Suite extends NodeJS.EventEmitter { ++// on(event: string, listener: (...args: any[]) => void): this; ++// once(event: string, listener: (...args: any[]) => void): this; ++// addListener(event: string, listener: (...args: any[]) => void): this; ++// removeListener(event: string, listener: (...args: any[]) => void): this; ++// prependListener(event: string, listener: (...args: any[]) => void): this; ++// prependOnceListener(event: string, listener: (...args: any[]) => void): this; ++// emit(name: string, ...args: any[]): boolean; ++// } ++// // #endregion Runner untyped events ++ ++// /** ++// * Initialize a new `Hook` with the given `title` and callback `fn` ++// * ++// * @see https://mochajs.org/api/Hook.html ++// */ ++// class Hook extends Runnable { ++// private _error; ++ ++// type: "hook"; ++// originalTitle?: string; // added by Runner ++ ++// /** ++// * Get the test `err`. ++// * ++// * @see https://mochajs.org/api/Hook.html#error ++// */ ++// error(): any; ++ ++// /** ++// * Set the test `err`. ++// * ++// * @see https://mochajs.org/api/Hook.html#error ++// */ ++// error(err: any): void; ++// } ++ ++// /** ++// * An alternative way to define root hooks that works with parallel runs. ++// * ++// * Root hooks work with any interface, but the property names do not change. ++// * In other words, if you are using the tdd interface, suiteSetup maps to beforeAll, and setup maps to beforeEach. ++// * ++// * As with other hooks, `this` refers to to the current context object. ++// * ++// * @see https://mochajs.org/#root-hook-plugins ++// */ ++// interface RootHookObject { ++// /** ++// * In serial mode, run after all tests end, once only. ++// * In parallel mode, run after all tests end, for each file. ++// */ ++// afterAll?: Func | AsyncFunc | Func[] | AsyncFunc[]; ++// /** ++// * In serial mode (Mocha's default), before all tests begin, once only. ++// * In parallel mode, run before all tests begin, for each file. ++// */ ++// beforeAll?: Func | AsyncFunc | Func[] | AsyncFunc[]; ++// /** ++// * In both modes, run after every test. ++// */ ++// afterEach?: Func | AsyncFunc | Func[] | AsyncFunc[]; ++// /** ++// * In both modes, run before each test. ++// */ ++// beforeEach?: Func | AsyncFunc | Func[] | AsyncFunc[]; ++// } ++ ++// /** ++// * Initialize a new `Test` with the given `title` and callback `fn`. ++// * ++// * @see https://mochajs.org/api/Test.html ++// */ ++// class Test extends Runnable { ++// type: "test"; ++// speed?: "slow" | "medium" | "fast"; // added by reporters ++// err?: Error; // added by reporters ++// clone(): Test; ++// } ++ ++// /** ++// * Test statistics ++// */ ++// interface Stats { ++// suites: number; ++// tests: number; ++// passes: number; ++// pending: number; ++// failures: number; ++// start?: Date; ++// end?: Date; ++// duration?: number; ++// } ++ ++// type TestInterface = (suite: Suite) => void; ++ ++// interface ReporterConstructor { ++// new (runner: Runner, options: MochaOptions): reporters.Base; ++// } ++ ++// type Done = (err?: any) => void; ++ ++// /** ++// * Callback function used for tests and hooks. ++// */ ++// type Func = (this: Context, done: Done) => void; ++ ++// /** ++// * Async callback function used for tests and hooks. ++// */ ++// type AsyncFunc = (this: Context) => PromiseLike; ++ ++// /** ++// * Options to pass to Mocha. ++// */ ++// interface MochaOptions { ++// /** Test interfaces ("bdd", "tdd", "exports", etc.). */ ++// ui?: Interface; ++ ++// /** ++// * Reporter constructor, built-in reporter name, or reporter module path. Defaults to ++// * `"spec"`. ++// */ ++// reporter?: string | ReporterConstructor; ++ ++// /** Options to pass to the reporter. */ ++// reporterOptions?: any; ++ ++// /** Array of accepted globals. */ ++// globals?: string[]; ++ ++// /** timeout in milliseconds or time string like '1s'. */ ++// timeout?: number | string; ++ ++// /** number of times to retry failed tests. */ ++// retries?: number; ++ ++// /** bail on the first test failure. */ ++// bail?: boolean; ++ ++// /** milliseconds to wait before considering a test slow. */ ++// slow?: number; ++ ++// /** check for global variable leaks. */ ++// checkLeaks?: boolean; ++ ++// /** display the full stack trace on failure. */ ++// fullStackTrace?: boolean; ++ ++// /** string or regexp to filter tests with. */ ++// grep?: string | RegExp; ++ ++// /** Enable growl support. */ ++// growl?: boolean; ++ ++// /** Color TTY output from reporter */ ++// color?: boolean; ++ ++// /** Use inline diffs rather than +/-. */ ++// inlineDiffs?: boolean; ++ ++// /** Do not show diffs at all. */ ++// hideDiff?: boolean; ++ ++// /** Run job in parallel */ ++// parallel?: boolean; ++ ++// /** Max number of worker processes for parallel runs */ ++// jobs?: number; ++ ++// /** Assigns hooks to the root suite */ ++// rootHooks?: RootHookObject; ++ ++// asyncOnly?: boolean; ++// delay?: boolean; ++// forbidOnly?: boolean; ++// forbidPending?: boolean; ++// noHighlighting?: boolean; ++// allowUncaught?: boolean; ++// fullTrace?: boolean; ++// } ++ ++// interface MochaInstanceOptions extends MochaOptions { ++// files?: string[]; ++// } ++ ++// /** ++// * Variables added to the global scope by Mocha when run in the CLI. ++// */ ++// interface MochaGlobals { ++// /** ++// * Execute before running tests. ++// * ++// * - _Only available when invoked via the mocha CLI._ ++// * ++// * @see https://mochajs.org/api/global.html#before ++// */ ++// before: HookFunction; ++ ++// /** ++// * Execute after running tests. ++// * ++// * - _Only available when invoked via the mocha CLI._ ++// * ++// * @see https://mochajs.org/api/global.html#after ++// */ ++// after: HookFunction; ++ ++// /** ++// * Execute before each test case. ++// * ++// * - _Only available when invoked via the mocha CLI._ ++// * ++// * @see https://mochajs.org/api/global.html#beforeEach ++// */ ++// beforeEach: HookFunction; ++ ++// /** ++// * Execute after each test case. ++// * ++// * - _Only available when invoked via the mocha CLI._ ++// * ++// * @see https://mochajs.org/api/global.html#afterEach ++// */ ++// afterEach: HookFunction; ++ ++// /** ++// * Describe a "suite" containing nested suites and tests. ++// * ++// * - _Only available when invoked via the mocha CLI._ ++// */ ++// describe: SuiteFunction; ++ ++// /** ++// * Describe a "suite" containing nested suites and tests. ++// * ++// * - _Only available when invoked via the mocha CLI._ ++// */ ++// context: SuiteFunction; ++ ++// /** ++// * Pending suite. ++// * ++// * - _Only available when invoked via the mocha CLI._ ++// */ ++// xdescribe: PendingSuiteFunction; ++ ++// /** ++// * Pending suite. ++// * ++// * - _Only available when invoked via the mocha CLI._ ++// */ ++// xcontext: PendingSuiteFunction; ++ ++// /** ++// * Describes a test case. ++// * ++// * - _Only available when invoked via the mocha CLI._ ++// */ ++// it: TestFunction; ++ ++// /** ++// * Describes a test case. ++// * ++// * - _Only available when invoked via the mocha CLI._ ++// */ ++// specify: TestFunction; ++ ++// /** ++// * Describes a pending test case. ++// * ++// * - _Only available when invoked via the mocha CLI._ ++// */ ++// xit: PendingTestFunction; ++ ++// /** ++// * Describes a pending test case. ++// * ++// * - _Only available when invoked via the mocha CLI._ ++// */ ++// xspecify: PendingTestFunction; ++ ++// /** ++// * Execute before running tests. ++// * ++// * - _Only available when invoked via the mocha CLI._ ++// * ++// * @see https://mochajs.org/api/global.html#before ++// */ ++// suiteSetup: HookFunction; ++ ++// /** ++// * Execute after running tests. ++// * ++// * - _Only available when invoked via the mocha CLI._ ++// * ++// * @see https://mochajs.org/api/global.html#after ++// */ ++// suiteTeardown: HookFunction; ++ ++// /** ++// * Execute before each test case. ++// * ++// * - _Only available when invoked via the mocha CLI._ ++// * ++// * @see https://mochajs.org/api/global.html#beforeEach ++// */ ++// setup: HookFunction; ++ ++// /** ++// * Execute after each test case. ++// * ++// * - _Only available when invoked via the mocha CLI._ ++// * ++// * @see https://mochajs.org/api/global.html#afterEach ++// */ ++// teardown: HookFunction; ++ ++// /** ++// * Describe a "suite" containing nested suites and tests. ++// * ++// * - _Only available when invoked via the mocha CLI._ ++// */ ++// suite: SuiteFunction; ++ ++// /** ++// * Describes a test case. ++// * ++// * - _Only available when invoked via the mocha CLI._ ++// */ ++// test: TestFunction; ++ ++// run: typeof run; ++// } ++ ++// /** ++// * Third-party declarations that want to add new entries to the `Reporter` union can ++// * contribute names here. ++// */ ++// interface ReporterContributions { ++// Base: never; ++// base: never; ++// Dot: never; ++// dot: never; ++// TAP: never; ++// tap: never; ++// JSON: never; ++// json: never; ++// HTML: never; ++// html: never; ++// List: never; ++// list: never; ++// Min: never; ++// min: never; ++// Spec: never; ++// spec: never; ++// Nyan: never; ++// nyan: never; ++// XUnit: never; ++// xunit: never; ++// Markdown: never; ++// markdown: never; ++// Progress: never; ++// progress: never; ++// Landing: never; ++// landing: never; ++// JSONStream: never; ++// "json-stream": never; ++// } ++ ++// type Reporter = keyof ReporterContributions; ++ ++// /** ++// * Third-party declarations that want to add new entries to the `Interface` union can ++// * contribute names here. ++// */ ++// interface InterfaceContributions { ++// bdd: never; ++// tdd: never; ++// qunit: never; ++// exports: never; ++// } ++ ++// type Interface = keyof InterfaceContributions; ++// } ++ ++// // #region Test interface augmentations ++ ++// /** ++// * Triggers root suite execution. ++// * ++// * - _Only available if flag --delay is passed into Mocha._ ++// * - _Only available when invoked via the mocha CLI._ ++// * ++// * @see https://mochajs.org/api/global.html#runWithSuite ++// */ ++// declare function run(): void; ++ ++// /** ++// * Execute before running tests. ++// * ++// * - _Only available when invoked via the mocha CLI._ ++// * ++// * @see https://mochajs.org/api/global.html#before ++// */ ++// declare var before: Mocha.HookFunction; ++ ++// /** ++// * Execute before running tests. ++// * ++// * - _Only available when invoked via the mocha CLI._ ++// * ++// * @see https://mochajs.org/api/global.html#before ++// */ ++// declare var suiteSetup: Mocha.HookFunction; ++ ++// /** ++// * Execute after running tests. ++// * ++// * - _Only available when invoked via the mocha CLI._ ++// * ++// * @see https://mochajs.org/api/global.html#after ++// */ ++// declare var after: Mocha.HookFunction; ++ ++// /** ++// * Execute after running tests. ++// * ++// * - _Only available when invoked via the mocha CLI._ ++// * ++// * @see https://mochajs.org/api/global.html#after ++// */ ++// declare var suiteTeardown: Mocha.HookFunction; ++ ++// /** ++// * Execute before each test case. ++// * ++// * - _Only available when invoked via the mocha CLI._ ++// * ++// * @see https://mochajs.org/api/global.html#beforeEach ++// */ ++// declare var beforeEach: Mocha.HookFunction; ++ ++// /** ++// * Execute before each test case. ++// * ++// * - _Only available when invoked via the mocha CLI._ ++// * ++// * @see https://mochajs.org/api/global.html#beforeEach ++// */ ++// declare var setup: Mocha.HookFunction; ++ ++// /** ++// * Execute after each test case. ++// * ++// * - _Only available when invoked via the mocha CLI._ ++// * ++// * @see https://mochajs.org/api/global.html#afterEach ++// */ ++// declare var afterEach: Mocha.HookFunction; ++ ++// /** ++// * Execute after each test case. ++// * ++// * - _Only available when invoked via the mocha CLI._ ++// * ++// * @see https://mochajs.org/api/global.html#afterEach ++// */ ++// declare var teardown: Mocha.HookFunction; ++ ++// /** ++// * Describe a "suite" containing nested suites and tests. ++// * ++// * - _Only available when invoked via the mocha CLI._ ++// */ ++// declare var describe: Mocha.SuiteFunction; ++ ++// /** ++// * Describe a "suite" containing nested suites and tests. ++// * ++// * - _Only available when invoked via the mocha CLI._ ++// */ ++// declare var context: Mocha.SuiteFunction; ++ ++// /** ++// * Describe a "suite" containing nested suites and tests. ++// * ++// * - _Only available when invoked via the mocha CLI._ ++// */ ++// declare var suite: Mocha.SuiteFunction; ++ ++// /** ++// * Pending suite. ++// * ++// * - _Only available when invoked via the mocha CLI._ ++// */ ++// declare var xdescribe: Mocha.PendingSuiteFunction; ++ ++// /** ++// * Pending suite. ++// * ++// * - _Only available when invoked via the mocha CLI._ ++// */ ++// declare var xcontext: Mocha.PendingSuiteFunction; ++ ++// /** ++// * Describes a test case. ++// * ++// * - _Only available when invoked via the mocha CLI._ ++// */ ++// declare var it: Mocha.TestFunction; ++ ++// /** ++// * Describes a test case. ++// * ++// * - _Only available when invoked via the mocha CLI._ ++// */ ++// declare var specify: Mocha.TestFunction; ++ ++// /** ++// * Describes a test case. ++// * ++// * - _Only available when invoked via the mocha CLI._ ++// */ ++// declare var test: Mocha.TestFunction; ++ ++// /** ++// * Describes a pending test case. ++// * ++// * - _Only available when invoked via the mocha CLI._ ++// */ ++// declare var xit: Mocha.PendingTestFunction; ++ ++// /** ++// * Describes a pending test case. ++// * ++// * - _Only available when invoked via the mocha CLI._ ++// */ ++// declare var xspecify: Mocha.PendingTestFunction; ++ ++// // #endregion Test interface augmentations ++ ++// // #region Reporter augmentations ++ ++// // Forward declaration for `HTMLLIElement` from lib.dom.d.ts. ++// // Required by Mocha.reporters.HTML. ++// // NOTE: Mocha *must not* have a direct dependency on DOM types. ++// // tslint:disable-next-line no-empty-interface ++// interface HTMLLIElement { } ++ ++// // Augments the DOM `Window` object when lib.dom.d.ts is loaded. ++// // tslint:disable-next-line no-empty-interface ++// interface Window extends Mocha.MochaGlobals { } ++ ++// declare namespace NodeJS { ++// // Forward declaration for `NodeJS.EventEmitter` from node.d.ts. ++// // Required by Mocha.Runnable, Mocha.Runner, and Mocha.Suite. ++// // NOTE: Mocha *must not* have a direct dependency on @types/node. ++// // tslint:disable-next-line no-empty-interface ++// interface EventEmitter { } ++ ++// // Augments NodeJS's `global` object when node.d.ts is loaded ++// // tslint:disable-next-line no-empty-interface ++// interface Global extends Mocha.MochaGlobals { } ++// } ++ ++// // #endregion Reporter augmentations ++ ++// // #region Browser augmentations ++ ++// /** ++// * Mocha global. ++// * ++// * - _Only supported in the browser._ ++// */ ++// declare const mocha: BrowserMocha; ++ ++// interface BrowserMocha extends Mocha { ++// /** ++// * Function to allow assertion libraries to throw errors directly into mocha. ++// * This is useful when running tests in a browser because window.onerror will ++// * only receive the 'message' attribute of the Error. ++// * ++// * - _Only supported in the browser._ ++// */ ++// throwError(err: any): never; ++ ++// /** ++// * Setup mocha with the given settings options. ++// * ++// * - _Only supported in the browser._ ++// */ ++// setup(opts?: Mocha.Interface | Mocha.MochaOptions): this; ++// } ++ ++// // #endregion Browser augmentations ++ ++// declare module "mocha" { ++// export = Mocha; ++// } ++ ++// declare module "mocha/lib/ms" { ++// export = milliseconds; ++// /** ++// * Parse the given `str` and return milliseconds. ++// * ++// * @see {@link https://mochajs.org/api/module-milliseconds.html} ++// * @see {@link https://mochajs.org/api/module-milliseconds.html#~parse} ++// */ ++// function milliseconds(val: string): number; ++ ++// /** ++// * Format for `ms`. ++// * ++// * @see {@link https://mochajs.org/api/module-milliseconds.html} ++// * @see {@link https://mochajs.org/api/module-milliseconds.html#~format} ++// */ ++// function milliseconds(val: number): string; ++// } ++ ++// declare module "mocha/lib/interfaces/common" { ++// export = common; ++ ++// function common(suites: Mocha.Suite[], context: Mocha.MochaGlobals, mocha: Mocha): common.CommonFunctions; ++ ++// namespace common { ++// interface CommonFunctions { ++// /** ++// * This is only present if flag --delay is passed into Mocha. It triggers ++// * root suite execution. ++// */ ++// runWithSuite(suite: Mocha.Suite): () => void; ++ ++// /** ++// * Execute before running tests. ++// */ ++// before(fn?: Mocha.Func | Mocha.AsyncFunc): void; ++ ++// /** ++// * Execute before running tests. ++// */ ++// before(name: string, fn?: Mocha.Func | Mocha.AsyncFunc): void; ++ ++// /** ++// * Execute after running tests. ++// */ ++// after(fn?: Mocha.Func | Mocha.AsyncFunc): void; ++ ++// /** ++// * Execute after running tests. ++// */ ++// after(name: string, fn?: Mocha.Func | Mocha.AsyncFunc): void; ++ ++// /** ++// * Execute before each test case. ++// */ ++// beforeEach(fn?: Mocha.Func | Mocha.AsyncFunc): void; ++ ++// /** ++// * Execute before each test case. ++// */ ++// beforeEach(name: string, fn?: Mocha.Func | Mocha.AsyncFunc): void; ++ ++// /** ++// * Execute after each test case. ++// */ ++// afterEach(fn?: Mocha.Func | Mocha.AsyncFunc): void; ++ ++// /** ++// * Execute after each test case. ++// */ ++// afterEach(name: string, fn?: Mocha.Func | Mocha.AsyncFunc): void; ++ ++// suite: SuiteFunctions; ++// test: TestFunctions; ++// } ++ ++// interface CreateOptions { ++// /** Title of suite */ ++// title: string; ++ ++// /** Suite function */ ++// fn?: (this: Mocha.Suite) => void; ++ ++// /** Is suite pending? */ ++// pending?: boolean; ++ ++// /** Filepath where this Suite resides */ ++// file?: string; ++ ++// /** Is suite exclusive? */ ++// isOnly?: boolean; ++// } ++ ++// interface SuiteFunctions { ++// /** ++// * Create an exclusive Suite; convenience function ++// */ ++// only(opts: CreateOptions): Mocha.Suite; ++ ++// /** ++// * Create a Suite, but skip it; convenience function ++// */ ++// skip(opts: CreateOptions): Mocha.Suite; ++ ++// /** ++// * Creates a suite. ++// */ ++// create(opts: CreateOptions): Mocha.Suite; ++// } ++ ++// interface TestFunctions { ++// /** ++// * Exclusive test-case. ++// */ ++// only(mocha: Mocha, test: Mocha.Test): Mocha.Test; ++ ++// /** ++// * Pending test case. ++// */ ++// skip(title: string): void; ++ ++// /** ++// * Number of retry attempts ++// */ ++// retries(n: number): void; ++// } ++// } ++// } diff --git a/patches/react-vtree+3.0.0-beta.1.patch b/patches/react-vtree+3.0.0-beta.1.patch new file mode 100644 index 000000000000..80da3c425a68 --- /dev/null +++ b/patches/react-vtree+3.0.0-beta.1.patch @@ -0,0 +1,102 @@ +diff --git a/node_modules/react-vtree/dist/es/Tree.d.ts b/node_modules/react-vtree/dist/es/Tree.d.ts +index 5e7f57e..5e764e9 100644 +--- a/node_modules/react-vtree/dist/es/Tree.d.ts ++++ b/node_modules/react-vtree/dist/es/Tree.d.ts +@@ -1,6 +1,9 @@ + import React, { Component, ComponentType, PropsWithChildren, PureComponent, ReactElement, ReactNode, Ref, RefCallback, RefObject } from 'react'; + import { Align, FixedSizeList, ListChildComponentProps, ListProps, VariableSizeList } from 'react-window'; +-import { DefaultTreeProps, DefaultTreeState } from './utils'; ++// import { DefaultTreeProps, DefaultTreeState } from './utils'; ++interface DefaultTreeProps {} ++interface DefaultTreeState {} ++ + export declare type NodeData = Readonly<{ + /** + * Unique ID of the current node. +diff --git a/node_modules/react-vtree/dist/es/utils.d.ts b/node_modules/react-vtree/dist/es/utils.d.ts +index bb27d60..a4f244f 100644 +--- a/node_modules/react-vtree/dist/es/utils.d.ts ++++ b/node_modules/react-vtree/dist/es/utils.d.ts +@@ -1,41 +1,41 @@ +-/// +-import { FixedSizeList } from 'react-window'; +-import type { NodeData, NodePublicState, NodeRecord, TreeCreatorOptions, TreeProps, TreeState, TypedListChildComponentData } from './Tree'; +-export declare type Mutable = { +- -readonly [P in keyof T]: T[P]; +-}; +-export declare type RequestIdleCallbackHandle = any; +-export declare type RequestIdleCallbackOptions = Readonly<{ +- timeout: number; +-}>; +-export declare type RequestIdleCallbackDeadline = Readonly<{ +- didTimeout: boolean; +- timeRemaining: () => number; +-}>; +-declare global { +- const requestIdleCallback: (callback: (deadline: RequestIdleCallbackDeadline) => void, opts?: RequestIdleCallbackOptions) => RequestIdleCallbackHandle; +- const cancelIdleCallback: (handle: RequestIdleCallbackHandle) => void; +- interface Window { +- requestIdleCallback: typeof requestIdleCallback; +- cancelIdleCallback: typeof cancelIdleCallback; +- } +-} +-export declare type DefaultTreeProps = TreeProps, FixedSizeList>; +-export declare type DefaultTreeState = TreeState, FixedSizeList>; +-export declare type DefaultTreeCreatorOptions = TreeCreatorOptions, DefaultTreeState>; +-export declare const noop: () => void; +-export declare const identity: (value: T) => T; +-export declare const createBasicRecord: , TNodePublicState extends NodePublicState>(pub: TNodePublicState, parent?: NodeRecord | null) => NodeRecord; +-export declare const getIdByIndex: , TNodePublicState extends NodePublicState>(index: number, { getRecordData }: Readonly<{ +- component: import("react").ComponentType & TNodePublicState & { +- treeData?: any; +- }>>; +- getRecordData: (index: number) => TNodePublicState; +- treeData: any; +-}>) => string; ++// /// ++// import { FixedSizeList } from 'react-window'; ++// import type { NodeData, NodePublicState, NodeRecord, TreeCreatorOptions, TreeProps, TreeState, TypedListChildComponentData } from './Tree'; ++// export declare type Mutable = { ++// -readonly [P in keyof T]: T[P]; ++// }; ++// export declare type RequestIdleCallbackHandle = any; ++// export declare type RequestIdleCallbackOptions = Readonly<{ ++// timeout: number; ++// }>; ++// export declare type RequestIdleCallbackDeadline = Readonly<{ ++// didTimeout: boolean; ++// timeRemaining: () => number; ++// }>; ++// declare global { ++// const requestIdleCallback: (callback: (deadline: RequestIdleCallbackDeadline) => void, opts?: RequestIdleCallbackOptions) => RequestIdleCallbackHandle; ++// const cancelIdleCallback: (handle: RequestIdleCallbackHandle) => void; ++// interface Window { ++// requestIdleCallback: typeof requestIdleCallback; ++// cancelIdleCallback: typeof cancelIdleCallback; ++// } ++// } ++// export declare type DefaultTreeProps = TreeProps, FixedSizeList>; ++// export declare type DefaultTreeState = TreeState, FixedSizeList>; ++// export declare type DefaultTreeCreatorOptions = TreeCreatorOptions, DefaultTreeState>; ++// export declare const noop: () => void; ++// export declare const identity: (value: T) => T; ++// export declare const createBasicRecord: , TNodePublicState extends NodePublicState>(pub: TNodePublicState, parent?: NodeRecord | null) => NodeRecord; ++// export declare const getIdByIndex: , TNodePublicState extends NodePublicState>(index: number, { getRecordData }: Readonly<{ ++// component: import("react").ComponentType & TNodePublicState & { ++// treeData?: any; ++// }>>; ++// getRecordData: (index: number) => TNodePublicState; ++// treeData: any; ++// }>) => string; diff --git a/scripts/type_check.js b/scripts/type_check.js index f97da61c2310..54bf027dd1ac 100644 --- a/scripts/type_check.js +++ b/scripts/type_check.js @@ -41,6 +41,7 @@ program }) } + const tsc = require.resolve('typescript/bin/tsc') const options = ['--noEmit', '--pretty'] if (program.skipLibCheck) { @@ -49,39 +50,28 @@ program const tasks = new Listr(projects.map((proj) => { return { - options: { title: proj.name }, + title: proj.name, task: () => { - const cwd = proj.path - const tsc = require.resolve('typescript/bin/tsc') - - return execa(tsc, options, { - cwd, - }).catch((err) => { - throw { - name: proj.name, - err, - } - }) + return execa(tsc, options, { cwd: proj.path }) }, } }), { - concurrent: 4, + concurrent: process.env.CI ? 4 : 1, + renderer: process.env.CI ? 'verbose' : 'default', exitOnError: false, - renderer: program.ignoreProgress ? 'silent' : 'default', }) tasks.run() .then(() => { - log('') - log('Type check passed successfully.') - }) - .catch((err) => { - process.exitCode = 1 + if (tasks.err[0] && tasks.err[0].errors.length > 0) { + process.exitCode = 1 - err.errors.forEach((e) => { log('') - log(`${e.name} failed\n${e.err.stdout}`) - }) + log('Type check failed.') + } else { + log('') + log('Type check passed successfully.') + } }) }) diff --git a/yarn.lock b/yarn.lock index c8af3f0fb3b7..5726d7032d60 100644 --- a/yarn.lock +++ b/yarn.lock @@ -7944,6 +7944,13 @@ dependencies: "@types/istanbul-lib-report" "*" +"@types/jquery.scrollto@1.4.29": + version "1.4.29" + resolved "https://registry.yarnpkg.com/@types/jquery.scrollto/-/jquery.scrollto-1.4.29.tgz#a3cdbe757249c08740dc4c36d83bf3c041e315cc" + integrity sha512-4AGdSgD6BDFcz53My+gtmsqbQFl72V7bc5YqhUw9jZTpx1w9ZiQqdvFyRU/DXSuBDG+pif8FL3geaKM7ZDGngw== + dependencies: + "@types/jquery" "*" + "@types/jquery@*", "@types/jquery@3.3.31": version "3.3.31" resolved "https://registry.yarnpkg.com/@types/jquery/-/jquery-3.3.31.tgz#27c706e4bf488474e1cb54a71d8303f37c93451b" @@ -8025,14 +8032,12 @@ resolved "https://registry.yarnpkg.com/@types/mime/-/mime-1.3.2.tgz#93e25bf9ee75fe0fd80b594bc4feb0e862111b5a" integrity sha512-YATxVxgRqNH6nHEIsvg6k2Boc1JHI9ZbH5iWFFv/MTkchz3b1ieGDa5T0a9RznNdI0KhVbdbWSN+KWWrQZRxTw== -"@types/mini-css-extract-plugin@1.4.2": - version "1.4.2" - resolved "https://registry.yarnpkg.com/@types/mini-css-extract-plugin/-/mini-css-extract-plugin-1.4.2.tgz#79b562f6977d8d692190d81c4ba890826a0761e1" - integrity sha512-jAE5X6kO8+0ByUqzqUaOz9z/dilUKOBNcmNXAETJM9Ak9VopBqWZo+ISqILJnxh6/E/Ci6i2xAUydq2w6vE69g== +"@types/mini-css-extract-plugin@1.2.3": + version "1.2.3" + resolved "https://registry.yarnpkg.com/@types/mini-css-extract-plugin/-/mini-css-extract-plugin-1.2.3.tgz#199037f2f3e11fa0fa3e7606d762a6cd56a22785" + integrity sha512-kWuO6PeoOqlxaP+6NCSfM7x+NowqXwLnS03w/G6gYYhOviIx5bC3jeOhp5zloqe75pNJuBxfuJPKN+ABc4Xklw== dependencies: - "@types/node" "*" - tapable "^2.2.0" - webpack "^5" + "@types/webpack" "^4" "@types/minimatch@*": version "3.0.4" @@ -8049,16 +8054,6 @@ resolved "https://registry.yarnpkg.com/@types/minimist/-/minimist-1.2.1.tgz#283f669ff76d7b8260df8ab7a4262cc83d988256" integrity sha512-fZQQafSREFyuZcdWFAExYjBiCL7AUCdgsk80iO0q4yihYYdcIiH28CcuPTGFgLOCC8RlW49GSQxdHwZP+I7CNg== -"@types/mocha@5.2.7": - version "5.2.7" - resolved "https://registry.yarnpkg.com/@types/mocha/-/mocha-5.2.7.tgz#315d570ccb56c53452ff8638738df60726d5b6ea" - integrity sha512-NYrtPht0wGzhwe9+/idPaBB+TqkY9AhTvOLMkThm0IoEfLaiVQZwBwyJ5puCkO3AUCWrmcoePjp2mbFocKy4SQ== - -"@types/mocha@7.0.2": - version "7.0.2" - resolved "https://registry.yarnpkg.com/@types/mocha/-/mocha-7.0.2.tgz#b17f16cf933597e10d6d78eae3251e692ce8b0ce" - integrity sha512-ZvO2tAcjmMi8V/5Z3JsyofMe3hasRcaw88cto5etSVMwVQfeivGAlEYmaQgceUSVYFofVjT+ioHsATjdWcFt1w== - "@types/mocha@8.0.3", "@types/mocha@^8.0.2", "@types/mocha@^8.0.3": version "8.0.3" resolved "https://registry.yarnpkg.com/@types/mocha/-/mocha-8.0.3.tgz#51b21b6acb6d1b923bbdc7725c38f9f455166402" @@ -8402,6 +8397,18 @@ dependencies: source-map "^0.6.1" +"@types/underscore.string@0.0.38": + version "0.0.38" + resolved "https://registry.yarnpkg.com/@types/underscore.string/-/underscore.string-0.0.38.tgz#4081755f005f5691fb7fbd4eff3aabe6066a6c63" + integrity sha512-QPMttDInBYkulH/3nON0KnYpEd/RlyE5kUrhuts5d76B/stpjXpDticq+iTluoAsVnVXuGECFhPtuX+aDJdx+A== + dependencies: + "@types/underscore" "*" + +"@types/underscore@*": + version "1.11.3" + resolved "https://registry.yarnpkg.com/@types/underscore/-/underscore-1.11.3.tgz#d6734f3741ce41b2630018c6b61c6745f6188c07" + integrity sha512-Fl1TX1dapfXyDqFg2ic9M+vlXRktcPJrc4PR7sRc7sdVrjavg/JHlbUXBt8qWWqhJrmSqg3RNAkAPRiOYw6Ahw== + "@types/unist@*", "@types/unist@^2.0.0", "@types/unist@^2.0.2", "@types/unist@^2.0.3": version "2.0.3" resolved "https://registry.yarnpkg.com/@types/unist/-/unist-2.0.3.tgz#9c088679876f374eb5983f150d4787aa6fb32d7e" @@ -15419,6 +15426,14 @@ css-modules-loader-core@^1.1.0: postcss-modules-scope "1.1.0" postcss-modules-values "1.3.0" +css-modules-typescript-loader@4.0.1: + version "4.0.1" + resolved "https://registry.yarnpkg.com/css-modules-typescript-loader/-/css-modules-typescript-loader-4.0.1.tgz#0b818cf647fefd8f9fb3d4469374e69ab1e72742" + integrity sha512-vXrUAwPGcRaopnGdg7I5oqv/NSSKQRN5L80m3f49uSGinenU5DTNsMFHS+2roh5tXqpY5+yAAKAl7A2HDvumzg== + dependencies: + line-diff "^2.0.1" + loader-utils "^1.2.3" + css-node-extract@^2.1.3: version "2.1.3" resolved "https://registry.yarnpkg.com/css-node-extract/-/css-node-extract-2.1.3.tgz#ec388a857b8fdf13fefd94b3da733257162405da" @@ -19387,7 +19402,7 @@ find-webpack@2.2.1: find-yarn-workspace-root "1.2.1" mocked-env "1.3.2" -find-yarn-workspace-root@1.2.1, find-yarn-workspace-root@^1.2.1: +find-yarn-workspace-root@1.2.1: version "1.2.1" resolved "https://registry.yarnpkg.com/find-yarn-workspace-root/-/find-yarn-workspace-root-1.2.1.tgz#40eb8e6e7c2502ddfaa2577c176f221422f860db" integrity sha512-dVtfb0WuQG+8Ag2uWkbG79hOUzEsRrhBzgfn86g2sJPkzmcpGdghbNTfUKGTxymFrY/tLIodDzLoW9nOJ4FY8Q== @@ -19395,7 +19410,7 @@ find-yarn-workspace-root@1.2.1, find-yarn-workspace-root@^1.2.1: fs-extra "^4.0.3" micromatch "^3.1.4" -find-yarn-workspace-root@2.0.0: +find-yarn-workspace-root@2.0.0, find-yarn-workspace-root@^2.0.0: version "2.0.0" resolved "https://registry.yarnpkg.com/find-yarn-workspace-root/-/find-yarn-workspace-root-2.0.0.tgz#f47fb8d239c900eb78179aa81b66673eac88f7bd" integrity sha512-1IMnbjt4KzsQfnhnzNd8wUEgXZ44IzZaZmnLYx7D5FZlaHt2gW20Cri8Q+E/t5tIj4+epTBub+2Zxu/vNILzqQ== @@ -25161,6 +25176,11 @@ less@4.1.1: needle "^2.5.2" source-map "~0.6.0" +levdist@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/levdist/-/levdist-1.0.0.tgz#91d7a3044964f2ccc421a0477cac827fe75c5718" + integrity sha1-kdejBElk8szEIaBHfKyCf+dcVxg= + level-blobs@^0.1.7: version "0.1.7" resolved "https://registry.yarnpkg.com/level-blobs/-/level-blobs-0.1.7.tgz#9ab9b97bb99f1edbf9f78a3433e21ed56386bdaf" @@ -25443,6 +25463,13 @@ line-column@^1.0.2: isarray "^1.0.0" isobject "^2.0.0" +line-diff@^2.0.1: + version "2.1.1" + resolved "https://registry.yarnpkg.com/line-diff/-/line-diff-2.1.1.tgz#a389799b931375a3b1e764964ad0b0b3ce60d6f6" + integrity sha512-vswdynAI5AMPJacOo2o+JJ4caDJbnY2NEqms4MhMW0NJbjh3skP/brpVTAgBxrg55NRZ2Vtw88ef18hnagIpYQ== + dependencies: + levdist "^1.0.0" + lines-and-columns@^1.1.6: version "1.1.6" resolved "https://registry.yarnpkg.com/lines-and-columns/-/lines-and-columns-1.1.6.tgz#1c00c743b433cd0a4e80758f7b64a57440d9ff00" @@ -29035,7 +29062,7 @@ open@^6.3.0: dependencies: is-wsl "^1.1.0" -open@^7.0.2, open@^7.0.3: +open@^7.0.2, open@^7.0.3, open@^7.4.2: version "7.4.2" resolved "https://registry.yarnpkg.com/open/-/open-7.4.2.tgz#b8147e26dcf3e426316c730089fd71edd29c2321" integrity sha512-MVHddDVweXZF3awtlAS+6pgKLlm/JgxZ90+/NBurBoQctVOOB/zDdVjcyPzQ+0laDGbsWgrRkflI65sQeOgT9Q== @@ -29869,19 +29896,20 @@ pascalcase@^0.1.1: resolved "https://registry.yarnpkg.com/pascalcase/-/pascalcase-0.1.1.tgz#b363e55e8006ca6fe21784d2db22bd15d7917f14" integrity sha1-s2PlXoAGym/iF4TS2yK9FdeRfxQ= -patch-package@6.2.2: - version "6.2.2" - resolved "https://registry.yarnpkg.com/patch-package/-/patch-package-6.2.2.tgz#71d170d650c65c26556f0d0fbbb48d92b6cc5f39" - integrity sha512-YqScVYkVcClUY0v8fF0kWOjDYopzIM8e3bj/RU1DPeEF14+dCGm6UeOYm4jvCyxqIEQ5/eJzmbWfDWnUleFNMg== +patch-package@6.4.7: + version "6.4.7" + resolved "https://registry.yarnpkg.com/patch-package/-/patch-package-6.4.7.tgz#2282d53c397909a0d9ef92dae3fdeb558382b148" + integrity sha512-S0vh/ZEafZ17hbhgqdnpunKDfzHQibQizx9g8yEf5dcVk3KOflOfdufRXQX8CSEkyOQwuM/bNz1GwKvFj54kaQ== dependencies: "@yarnpkg/lockfile" "^1.1.0" chalk "^2.4.2" cross-spawn "^6.0.5" - find-yarn-workspace-root "^1.2.1" + find-yarn-workspace-root "^2.0.0" fs-extra "^7.0.1" is-ci "^2.0.0" klaw-sync "^6.0.0" minimist "^1.2.0" + open "^7.4.2" rimraf "^2.6.3" semver "^5.6.0" slash "^2.0.0" From 83a1f09b1174b4d70a826d9894e47a0ce7a777e9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Barth=C3=A9l=C3=A9my=20Ledoux?= Date: Thu, 14 Oct 2021 11:26:49 -0500 Subject: [PATCH 06/27] fix: warn when the projectRoot is not writeable (#18495) closes #18485 --- packages/server/lib/modes/run.js | 15 ++++++++++++++- .../server/test/e2e/non_root_read_only_fs_spec.ts | 3 +++ packages/server/test/unit/modes/run_spec.js | 2 ++ 3 files changed, 19 insertions(+), 1 deletion(-) diff --git a/packages/server/lib/modes/run.js b/packages/server/lib/modes/run.js index 145847dffd99..fee65362da7a 100644 --- a/packages/server/lib/modes/run.js +++ b/packages/server/lib/modes/run.js @@ -608,9 +608,22 @@ const openProjectCreate = (projectRoot, socketId, args) => { return openProject.create(projectRoot, args, options) } -const createAndOpenProject = async function (socketId, options) { +async function checkAccess (folderPath) { + return fs.access(folderPath, fs.W_OK).catch((err) => { + if (['EACCES', 'EPERM'].includes(err.code)) { + // we cannot write due to folder permissions + return errors.warning('FOLDER_NOT_WRITABLE', folderPath) + } + + throw err + }) +} + +const createAndOpenProject = async (socketId, options) => { const { projectRoot, projectId } = options + await checkAccess(projectRoot) + return openProjectCreate(projectRoot, socketId, options) .then((open_project) => open_project.getProject()) .then((project) => { diff --git a/packages/server/test/e2e/non_root_read_only_fs_spec.ts b/packages/server/test/e2e/non_root_read_only_fs_spec.ts index f42b236eefc1..379b3f407084 100644 --- a/packages/server/test/e2e/non_root_read_only_fs_spec.ts +++ b/packages/server/test/e2e/non_root_read_only_fs_spec.ts @@ -8,6 +8,9 @@ describe('e2e readonly fs', function () { const projectPath = Fixtures.projectPath('read-only-project-root') + /** + * Change permissions recursively + */ const chmodr = (p: string, mode: number) => { const stats = fs.statSync(p) diff --git a/packages/server/test/unit/modes/run_spec.js b/packages/server/test/unit/modes/run_spec.js index 1821baa7b33b..9f0e3f38600e 100644 --- a/packages/server/test/unit/modes/run_spec.js +++ b/packages/server/test/unit/modes/run_spec.js @@ -662,6 +662,7 @@ describe('lib/modes/run', () => { sinon.stub(random, 'id').returns(1234) sinon.stub(openProject, 'create').resolves(openProject) sinon.stub(runMode, 'waitForSocketConnection').resolves() + sinon.stub(fs, 'access').resolves() sinon.stub(runMode, 'waitForTestsToFinishRunning').resolves({ stats: { failures: 10 }, spec: {}, @@ -736,6 +737,7 @@ describe('lib/modes/run', () => { sinon.stub(electron.app, 'on').withArgs('ready').yieldsAsync() sinon.stub(user, 'ensureAuthToken') + sinon.stub(fs, 'access').resolves() sinon.stub(random, 'id').returns(1234) sinon.stub(openProject, 'create').resolves(openProject) sinon.stub(system, 'info').resolves({ osName: 'osFoo', osVersion: 'fooVersion' }) From 8e3e99d11db37a1c6dbc06ee95012539e06854ba Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" <41898282+github-actions[bot]@users.noreply.github.com> Date: Thu, 14 Oct 2021 12:33:26 -0400 Subject: [PATCH 07/27] chore: Update Chrome (beta) to 95.0.4638.49 (#18489) Co-authored-by: cypress-bot[bot] <2f0651858c6e38e0+cypress-bot[bot]@users.noreply.github.com> --- browser-versions.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/browser-versions.json b/browser-versions.json index 475da3afb7c2..8d3572d7486d 100644 --- a/browser-versions.json +++ b/browser-versions.json @@ -1,4 +1,4 @@ { - "chrome:beta": "95.0.4638.40", + "chrome:beta": "95.0.4638.49", "chrome:stable": "94.0.4606.81" } From d51779308f50eecb2b7a1f8bfd9ff4c66ac32e00 Mon Sep 17 00:00:00 2001 From: Blue F Date: Thu, 14 Oct 2021 09:51:35 -0700 Subject: [PATCH 08/27] Update packages/server/lib/scaffold.js Co-authored-by: Zach Bloomquist --- packages/server/lib/scaffold.js | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/packages/server/lib/scaffold.js b/packages/server/lib/scaffold.js index 531ad3c6f5a6..a65510bd4f29 100644 --- a/packages/server/lib/scaffold.js +++ b/packages/server/lib/scaffold.js @@ -256,9 +256,7 @@ module.exports = { return fs.copyAsync(src, dest) }).catch((error) => { if (error.code === 'EACCES') { - const err = errors.get('ERROR_WRITING_FILE', dest, error) - - errors.log(err) + error = errors.get('ERROR_WRITING_FILE', dest, error) } throw error From 43a8fb318e9267dcfa12fa2d31a3a0ade1a7ce19 Mon Sep 17 00:00:00 2001 From: Emily Rohrbough Date: Fri, 15 Oct 2021 14:11:06 -0500 Subject: [PATCH 09/27] chore(.gitignore): remove duplicate entry --- .gitignore | 1 - 1 file changed, 1 deletion(-) diff --git a/.gitignore b/.gitignore index a02bc6e2a0aa..1117ea700d77 100644 --- a/.gitignore +++ b/.gitignore @@ -335,7 +335,6 @@ $RECYCLE.BIN/ # Windows shortcuts *.lnk -/npm/react/bin/* # End of https://www.gitignore.io/api/osx,git,node,windows,intellij,linux # Circle cache artifacts From 95f19964b1ed6ead48741587cc3f5666cbf80d99 Mon Sep 17 00:00:00 2001 From: itsAftabAlam <88653530+itsAftabAlam@users.noreply.github.com> Date: Mon, 18 Oct 2021 20:04:30 +0530 Subject: [PATCH 10/27] feat: updated README.md ,added hyperlink to cypress banner (#18519) --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index e8de4bae170b..e4f75316dc14 100644 --- a/README.md +++ b/README.md @@ -1,5 +1,5 @@

        - +

        Documentation | From 214994b2b20af14f547c305265ccf3529069748f Mon Sep 17 00:00:00 2001 From: Zach Bloomquist Date: Mon, 18 Oct 2021 14:53:08 +0000 Subject: [PATCH 11/27] chore(contributing): create recommended extensions.json (#18511) --- .vscode/extensions.json | 35 +++++++++++++++++++++++++++++++++++ 1 file changed, 35 insertions(+) create mode 100644 .vscode/extensions.json diff --git a/.vscode/extensions.json b/.vscode/extensions.json new file mode 100644 index 000000000000..1fd5f170b61b --- /dev/null +++ b/.vscode/extensions.json @@ -0,0 +1,35 @@ +{ + // To see these extensions in VS Code: + // 1. Open the Command Palette (Ctrl+Shift+P) + // 2. Select "Extensions: Show Recommended Extensions" + + // See https://go.microsoft.com/fwlink/?LinkId=827846 to learn about workspace recommendations. + + // List of extensions which are recommended for Cypress contributors using VS Code: + "recommendations": [ + // Name: ESLint + // Description: Integrates ESLint JavaScript into VS Code. + "dbaeumer.vscode-eslint", + // Name: GitHub linker + // Description: Create links to fragments of code in GitHub + "gimenete.github-linker", + // Name: GitLens — Git supercharged + // Description: Supercharge the Git capabilities built into Visual Studio Code — Visualize code authorship at a glance via Git blame annotations and code lens, seamlessly navigate and explore Git repositories, gain valuable insights via powerful comparison commands, and so much more + "eamodio.gitlens", + // Name: Terminals Manager + // Description: An extension for setting-up multiple terminals at once, or just running some commands + // There are several Terminals defined in `.vscode/terminals.json` that can be used via this plugin. + "fabiospampinato.vscode-terminals", + // Name: Test Utils + // Description: Add, remove, and move .only in tests + "chrisbreiding.test-utils", + // Name: Toggle Quotes + // Description: Toggle cycle " -> ' -> ` + "britesnow.vscode-toggle-quotes", + ], + + // List of extensions recommended by VS Code that should not be recommended for Cypress contributors using VS Code: + "unwantedRecommendations": [ + + ] +} \ No newline at end of file From a045e4f59ab148d3e48b534c6ef289bd3db0902c Mon Sep 17 00:00:00 2001 From: Jessica Sachs Date: Mon, 18 Oct 2021 15:53:14 -0400 Subject: [PATCH 12/27] chore: move server e2e tests to system-tests (#16354) Co-authored-by: Brian Mann Co-authored-by: Zach Bloomquist Co-authored-by: Zach Bloomquist --- .eslintignore | 21 +- .gitignore | 4 + .vscode/terminals.json | 14 +- CONTRIBUTING.md | 8 +- circle.yml | 42 +-- lerna.json | 3 +- npm/webpack-preprocessor/index.ts | 13 +- npm/webpack-preprocessor/test/e2e/helpers.js | 2 +- package.json | 5 +- .../fixtures/errors/exceptions_spec.js | 2 +- packages/server/README.md | 18 +- packages/server/lib/modes/record.js | 2 +- packages/server/lib/repl.js | 54 ---- packages/server/package.json | 2 +- packages/server/repl.js | 2 - .../server/test/integration/cypress_spec.js | 2 +- .../test/integration/http_requests_spec.js | 2 +- .../server/test/integration/plugins_spec.js | 2 +- .../server/test/integration/server_spec.js | 2 +- .../test/integration/websockets_spec.js | 2 +- .../performance/cy_visit_performance_spec.js | 6 +- .../performance/proxy_performance_spec.js | 2 +- .../system-node/cypress/integration/spec.js | 5 - packages/server/test/support/helpers/gzip.js | 15 - packages/server/test/unit/cache_spec.js | 2 +- packages/server/test/unit/config_spec.js | 22 +- packages/server/test/unit/files_spec.js | 2 +- packages/server/test/unit/fixture_spec.js | 2 +- .../server/test/unit/open_project_spec.js | 2 +- .../unit/plugins/child/run_plugins_spec.js | 2 +- .../test/unit/plugins/preprocessor_spec.js | 2 +- packages/server/test/unit/project_spec.js | 2 +- .../server/test/unit/project_utils_spec.ts | 2 +- packages/server/test/unit/scaffold_spec.js | 2 +- packages/server/test/unit/screenshots_spec.js | 2 +- packages/server/test/unit/socket_spec.js | 2 +- packages/server/test/unit/specs_spec.js | 2 +- .../server/test/unit/util/spec_writer_spec.ts | 13 +- patches/snap-shot-core+10.2.0.patch | 59 ++++ patches/snap-shot-it+7.9.3.patch | 59 +++- scripts/binary/build.js | 2 +- scripts/binary/smoke.js | 2 +- system-tests/.eslintrc.json | 17 + system-tests/README.md | 70 ++++ .../__snapshots__/async_timeouts_spec.js | 0 .../__snapshots__/base_url_spec.js | 0 .../before_browser_launch_spec.ts.js | 0 .../__snapshots__/block_hosts_spec.js | 0 .../__snapshots__/browser_path_spec.js | 0 .../__snapshots__/busted_support_file_spec.js | 0 .../__snapshots__/cache_spec.js | 0 .../caught_uncaught_hook_errors_spec.js | 0 .../__snapshots__/cdp_spec.ts.js | 0 .../commands_outside_of_test_spec.js | 0 .../__snapshots__/config_spec.js | 0 .../__snapshots__/controllers_spec.js | 0 .../__snapshots__/cookies_spec.ts.js | 0 .../cy_visit_performance_spec.js | 0 .../__snapshots__/deprecated_spec.ts.js | 0 .../__snapshots__/domain_spec.js | 0 .../__snapshots__/es_modules_spec.js | 0 .../__snapshots__/form_submissions_spec.js | 0 .../__snapshots__/go_spec.js | 0 .../__snapshots__/headless_spec.ts.js | 0 .../__snapshots__/iframe_spec.js | 0 .../__snapshots__/images_spec.js | 0 .../__snapshots__/interception_spec.js | 0 .../__snapshots__/issue_149_spec.js | 0 .../__snapshots__/issue_1669_spec.js | 0 .../__snapshots__/issue_173_spec.ts.js | 0 .../__snapshots__/issue_2891_spec.js | 0 .../__snapshots__/issue_5475_spec.js | 0 .../__snapshots__/issue_6619.ts.js | 0 .../__snapshots__/issue_674_spec.js | 0 .../__snapshots__/issue_7217_spec.ts.js | 0 .../__snapshots__/js_error_handling_spec.js | 9 +- .../network_error_handling_spec.js | 0 .../__snapshots__/new_project_spec.js | 0 .../__snapshots__/non_proxied_spec.ts.js | 0 .../non_root_read_only_fs_spec.ts.js | 0 .../__snapshots__/only_spec.js | 0 .../__snapshots__/page_loading_spec.js | 0 .../plugin_run_events_spec.ts.js | 0 .../__snapshots__/plugins_spec.js | 0 .../__snapshots__/promises_spec.js | 0 .../__snapshots__/record_spec.js | 0 .../__snapshots__/reporters_spec.js | 0 .../__snapshots__/request_spec.ts.js | 0 .../__snapshots__/retries_spec.ts.js | 0 .../__snapshots__/return_value_spec.js | 0 .../runnable_execution_spec.ts.js | 0 .../screenshot_element_capture_spec.js | 0 .../screenshot_fullpage_capture_spec.js | 0 .../screenshot_nested_file_spec.js | 0 .../screenshot_viewport_capture_spec.js | 0 .../__snapshots__/screenshots_spec.js | 17 +- .../__snapshots__/server_sent_events_spec.js | 0 .../__snapshots__/session_spec.ts.js | 27 +- .../__snapshots__/spec_isolation_spec.js | 0 .../__snapshots__/specs_spec.js | 0 .../__snapshots__/stdout_spec.js | 0 .../__snapshots__/studio_spec.ts.js | 0 .../__snapshots__/subdomain_spec.ts.js | 0 .../__snapshots__/system_node_spec.js | 0 .../__snapshots__/task_not_registered_spec.js | 0 .../__snapshots__/task_spec.js | 0 .../testConfigOverrides_spec.ts.js | 0 .../typescript_spec_support_spec.ts.js | 4 +- .../uncaught_spec_errors_spec.js | 0 .../uncaught_support_file_spec.js | 0 .../__snapshots__/user_agent_spec.js | 0 .../__snapshots__/viewport_spec.js | 0 .../__snapshots__/visit_spec.js | 0 .../__snapshots__/web_security_spec.js | 0 .../__snapshots__/websockets_spec.js | 0 .../__snapshots__/xhr_spec.js | 0 .../helpers => system-tests/lib}/fixtures.js | 12 +- .../lib}/performance.js | 4 +- .../lib}/resultsUtils.ts | 16 +- .../lib}/serverStub.ts | 4 +- system-tests/lib/spec_helper.js | 127 ++++++++ .../lib/system-tests.ts | 301 +++++++++++++++--- system-tests/package.json | 80 +++++ .../projects/.eslintrc.json | 0 .../projects/browser-extensions/cypress.json | 0 .../cypress/integration/spec.js | 0 .../cypress/plugins/index.js | 0 .../projects/browser-extensions/index.html | 0 .../projects/busted-support-file/cypress.json | 0 .../cypress/integration/app_spec.js | 0 .../cypress/support/index.js | 0 .../chrome-browser-preferences/cypress.json | 0 .../cypress/integration/spec.js | 0 .../cypress/plugins/index.js | 0 .../projects/component-tests/cypress.json | 0 .../cypress/component-tests/fails.spec.js | 0 .../cypress/component-tests/foo.spec.js | 0 .../cypress/integration/integration-spec.js | 0 .../component-tests/cypress/plugins/index.js | 0 .../cypress.config.custom.js | 0 .../cypress/integration/app_spec.js | 0 .../cypress.config.custom.ts | 0 .../cypress/integration/app_spec.js | 0 .../config-with-invalid-browser/cypress.json | 0 .../cypress/fixtures/example.json | 0 .../cypress/integration/app_spec.js | 0 .../cypress/plugins/index.js | 0 .../cypress/support/commands.js | 0 .../cypress/support/index.js | 0 .../config-with-invalid-viewport/cypress.json | 0 .../cypress/integration/app_spec.js | 0 .../cypress/plugins/index.js | 0 .../projects/config-with-js/cypress.config.js | 0 .../cypress/integration/app_spec.js | 0 .../config-with-short-timeout/cypress.json | 0 .../cypress/integration/dom_times_out_spec.js | 0 .../config-with-short-timeout/index.html | 0 .../projects/config-with-ts/cypress.config.ts | 0 .../cypress/integration/app_spec.js | 0 .../projects/cookies/cypress.json | 0 .../cookies/cypress/integration/app_spec.js | 0 .../projects/default-layout/cypress.json | 0 .../integration/default_layout_spec.js | 0 .../projects/default-layout/views/layout.html | 0 system-tests/projects/downloads/.gitignore | 2 + .../projects/downloads/cypress.json | 0 .../downloads/cypress/fixtures/downloads.html | 0 .../downloads/cypress/fixtures/files.zip | Bin .../downloads/cypress/fixtures/people.xlsx | Bin .../downloads/cypress/fixtures/records.csv | 0 .../cypress/integration/download_csv_spec.ts | 0 .../cypress/integration/downloads_spec.ts | 0 .../integration/simple_passing_spec.ts | 0 .../projects/downloads/tsconfig.json | 0 .../projects/e2e/cross_origin_script.html | 0 .../projects/e2e/cypress-alt.json | 0 .../projects/e2e/cypress.json | 0 .../cypress/component/simple_failing_spec.js | 0 .../e2e/cypress/fixtures/bigger-sample.pdf | Bin .../e2e/cypress/fixtures/example.json | 0 .../e2e/cypress/fixtures/mjs_file.mjs | 0 .../projects/e2e/cypress/fixtures/sample.jpg | Bin .../projects/e2e/cypress/fixtures/sample.pdf | Bin .../e2e/cypress/integration/a_record.spec.js | 0 .../integration/a_record_instantfail.spec.js | 0 ...assertions_failing_outside_of_test_spec.js | 0 ...assertions_passing_outside_of_test_spec.js | 0 .../integration/async_timeouts_spec.js | 0 .../e2e/cypress/integration/b_record.spec.js | 0 .../e2e/cypress/integration/base_url_spec.js | 0 .../cypress/integration/block_hosts_spec.js | 0 .../integration/cache_clearing_spec.js | 0 .../e2e/cypress/integration/cache_spec.js | 0 .../caught_async_sync_test_spec.js | 0 .../integration/character_encoding_spec.js | 0 .../commands_outside_of_test_spec.js | 0 .../integration/config_passing_spec.js | 0 .../cypress/integration/config_record_spec.js | 0 .../integration/cookies_spec_baseurl.js | 0 .../integration/cookies_spec_no_baseurl.js | 0 .../e2e/cypress/integration/domain_2_spec.js | 0 .../e2e/cypress/integration/domain_spec.js | 0 .../e2e/cypress/integration/empty.spec.js | 0 .../cypress/integration/empty_suite.spec.js | 0 .../integration/ended_early_failing_spec.js | 0 .../es_module_import_failing_spec.js | 0 .../es_modules_in_coffee_spec.coffee | 0 .../cypress/integration/fast_visit_spec.js | 0 .../integration/fetch_no_polyfill_spec.js | 0 .../e2e/cypress/integration/fetch_spec.js | 0 .../cypress/integration/firefox_windowSize.js | 0 .../form_submission_failing_spec.js | 0 .../form_submission_multipart_spec.js | 0 .../form_submission_passing_spec.js | 0 .../e2e/cypress/integration/go_spec.js | 0 .../integration/hanging_retries_spec.js | 0 .../e2e/cypress/integration/headless_spec.js | 0 .../hook_caught_error_failing_spec.js | 0 ...hook_uncaught_error_events_failing_spec.js | 0 .../hook_uncaught_error_failing_spec.js | 0 .../hook_uncaught_root_error_failing_spec.js | 0 .../integration/https_passthru_spec.js | 0 .../e2e/cypress/integration/iframe_spec.js | 0 .../e2e/cypress/integration/images_spec.js | 0 .../e2e/cypress/integration/issue_149_spec.js | 0 .../cypress/integration/issue_1669_spec.js | 0 .../e2e/cypress/integration/issue_173_spec.js | 0 .../cypress/integration/issue_2196_spec.js | 0 .../cypress/integration/issue_5475_spec_1.js | 0 .../cypress/integration/issue_5475_spec_2.js | 0 .../e2e/cypress/integration/issue_674_spec.js | 0 .../js_error_handling_failing_spec.js | 0 .../e2e/cypress/integration/mjs_spec.mjs | 0 .../cypress/integration/multi_cookies_spec.js | 0 .../nested-1/nested-2/nested-3/spec.js | 0 .../nested-2/nested-3/stdout_specfile.js | 0 ...that_never_has_a_line_break_or_new_line.js | 0 .../nested-2/screenshot_nested_file_spec.js | 0 .../network_error_304_handling_spec.js | 0 .../network_error_handling_spec.js | 0 .../no_superfluous_screenshots_spec.js | 0 .../cypress/integration/node_builtins_spec.js | 0 .../cypress/integration/only_multiple_spec.js | 0 .../e2e/cypress/integration/only_spec.js | 0 .../cypress/integration/page_loading_spec.js | 0 .../integration/plugins_config_extras_spec.js | 0 .../e2e/cypress/integration/promises_spec.js | 0 .../e2e/cypress/integration/proxying_spec.js | 0 .../cypress/integration/record_error_spec.js | 0 .../cypress/integration/record_fail_spec.js | 0 .../cypress/integration/record_pass_spec.js | 0 .../integration/record_uncaught_spec.js | 0 .../cypress/integration/reload-spec.spec.js | 0 ...request_http_network_error_failing_spec.js | 0 .../request_long_http_props_failing_spec.js | 0 .../e2e/cypress/integration/request_spec.js | 0 .../request_status_code_failing_spec.js | 0 .../cypress/integration/return_value_spec.js | 0 .../runnables_already_run_suite.js | 0 .../screenshot_element_capture_spec.js | 0 .../screenshot_fullpage_capture_spec.js | 0 .../screenshot_viewport_capture_spec.js | 0 .../cypress/integration/screenshots_spec.js | 0 .../integration/server_sent_events_spec.js | 0 .../integration/session_persist_spec_1.js | 0 .../integration/session_persist_spec_2.js | 0 .../e2e/cypress/integration/session_spec.js | 0 .../integration/simple_failing_hook_spec.js | 0 .../integration/simple_failing_spec.js | 0 .../cypress/integration/simple_hooks_spec.js | 0 .../integration/simple_passing_spec.js | 0 .../integration/simple_retrying_spec.js | 0 .../e2e/cypress/integration/simple_spec.js | 0 .../integration/source_rewriting_spec.js | 0 .../stdout_assertion_errors_spec.js | 0 .../stdout_exit_early_failing_spec.js | 0 .../integration/stdout_failing_spec.js | 0 .../integration/stdout_passing_spec.js | 0 .../integration/studio_written.spec.js | 0 .../e2e/cypress/integration/subdomain_spec.js | 0 .../e2e/cypress/integration/task_spec.js | 0 .../testConfigOverrides-invalid-browser.js | 0 .../testConfigOverrides-skip-browser.js | 0 .../integration/typescript_passing_spec.ts | 0 .../typescript_syntax_error_spec.ts | 0 .../integration/uncaught_during_hook_spec.js | 0 .../integration/uncaught_during_test_spec.js | 0 ...ncaught_synchronous_before_tests_parsed.js | 0 .../uncaught_synchronous_during_hook_spec.js | 0 .../cypress/integration/user_agent_spec.js | 0 .../integration/video_compression_spec.js | 0 .../e2e/cypress/integration/viewport_spec.js | 0 .../visit_file_404_response_failing_spec.js | 0 .../visit_http_500_response_failing_spec.js | 0 .../visit_http_network_error_failing_spec.js | 0 .../visit_http_timeout_failing_spec.js | 0 ...isit_non_html_content_type_failing_spec.js | 0 .../visit_response_never_ends_failing_spec.js | 0 .../e2e/cypress/integration/visit_spec.js | 0 .../cypress/integration/web_security_spec.js | 0 .../cypress/integration/websockets_spec.js | 0 .../integration/window_open_spec.coffee | 0 .../e2e/cypress/integration/xhr_spec.js | 0 .../projects/e2e/cypress/plugins/index.js | 2 +- .../projects/e2e/cypress/support/commands.js | 0 .../projects/e2e/cypress/support/foo/bar.js | 0 .../projects/e2e/cypress/support/index.js | 0 .../projects/e2e/cypress/support/util.js | 0 .../projects/e2e/elements.html | 0 .../projects/e2e/fail.html | 0 .../projects/e2e/forms.html | 0 .../projects/e2e/hash.html | 0 .../projects/e2e/index.html | 0 .../projects/e2e/jquery.html | 0 .../projects/e2e/js_errors.html | 0 .../projects/e2e/lib/bar.js | 0 .../projects/e2e/lib/baz.js | 0 .../projects/e2e/lib/dom.jsx | 0 .../projects/e2e/lib/fail.js | 0 .../projects/e2e/lib/foo.coffee | 0 .../projects/e2e/obstructive_code.html | 0 .../projects/e2e/outer.html | 0 .../projects/e2e/outer_404.html | 0 .../projects/e2e/package.json | 0 .../projects/e2e/reporters/custom.js | 0 .../projects/e2e/reporters/throws.js | 0 .../projects/e2e/reporters/uses-file.js | 0 .../projects/e2e/scrollable.html | 0 .../projects/e2e/static/FiraSans-Regular.woff | Bin .../e2e/static/FiraSans-Regular.woff.gz | Bin .../projects/e2e/static/charsets/euc-kr.html | 0 .../projects/e2e/static/charsets/gb2312.html | 0 .../e2e/static/charsets/iso-8859-1.html | 0 .../e2e/static/charsets/shift-jis.html | 0 .../projects/e2e/static/content.json | 0 .../projects/e2e/static/fail.js | 0 .../projects/e2e/static/hello.txt | 0 .../projects/e2e/static/iframe/index.html | 0 .../projects/e2e/static/javascript-logo.png | Bin .../e2e/static/javascript-logo.png.gz | Bin .../projects/e2e/static/jquery.js | 0 .../projects/e2e/static/obstructive_code.js | 0 .../projects/e2e/static/onclick_redirect.html | 0 .../static/settimeout_basetag_redirect.html | 0 .../static/settimeout_redirect_assign.html | 0 .../settimeout_redirect_document_href.html | 0 .../e2e/static/settimeout_redirect_href.html | 0 .../static/settimeout_redirect_href_hash.html | 0 .../static/settimeout_redirect_pathname.html | 0 .../static/settimeout_redirect_replace.html | 0 .../static/settimeout_redirect_search.html | 0 ...imeout_redirect_set_document_location.html | 0 ...t_redirect_set_document_location_hash.html | 0 .../settimeout_redirect_set_location.html | 0 ...redirect_set_window_document_location.html | 0 ...ttimeout_redirect_set_window_location.html | 0 ...timeout_redirect_window_document_href.html | 0 .../settimeout_redirect_window_href.html | 0 .../e2e/static/simple_obstructive_code.js | 0 .../e2e/static/xhr_onload_redirect.html | 0 system-tests/projects/e2e/tsconfig.json | 7 + .../projects/e2e/visit_error.html | 0 .../projects/e2e/window_open.html | 0 .../projects/e2e/xhr.html | 0 .../projects/empty-folders/cypress.json | 0 .../empty-folders/cypress/plugins/.gitkeep | 0 .../empty-folders/cypress/support/.gitkeep | 0 .../projects/failures/cypress}/cypress.json | 0 .../failures/cypress/integration/app_spec.js | 0 .../cypress/integration/syntax_error.js | 0 .../projects/firefox-memory/cypress.json | 0 .../cypress/integration/spec.js | 0 .../firefox-memory/cypress/plugins/index.js | 0 .../cypress.json | 0 .../test/fixtures/example.json | 0 .../test/spec.js | 0 .../folder-same-as-fixture/cypress.json | 0 .../cypress/fixtures/foo.json | 0 .../cypress/fixtures/foo/.gitkeep | 0 .../projects/hooks-after-rerun/cypress.json | 0 .../beforehook-and-test-navigation.js | 0 .../integration/runnable-run-count.spec.js | 0 .../cypress/plugins/index.js | 0 .../cypress/support/index.js | 0 .../projects/ids}/cypress.json | 0 .../projects/ids/cypress/.eslintrc.json | 0 .../ids/cypress/fixtures/example.json | 0 .../0.844061cbceddba47c476.hot-update.js | 0 .../projects/ids/cypress/integration/bar.js | 0 .../projects/ids/cypress/integration/baz.js | 0 .../projects/ids/cypress/integration/dom.jsx | 0 .../projects/ids/cypress/integration/es6.js | 0 .../ids/cypress/integration/foo.coffee | 0 .../ids/cypress/integration/nested/tmp.js | 0 .../ids/cypress/integration/noop.coffee | 0 .../projects/ids/cypress/support/index.js | 0 .../integration/failing_spec.js | 0 .../project-root/cypress.json | 0 .../issue-8111-iframe-input/cypress.json | 0 .../cypress/integration/iframe_input_spec.js | 0 .../cypress/plugins/index.js | 0 .../issue-8111-iframe-input/inner.html | 0 .../issue-8111-iframe-input/outer.html | 0 .../projects/max-listeners}/cypress.json | 0 .../multiple-task-registrations/cypress.json | 0 .../multiple_task_registrations_spec.js | 0 .../cypress/plugins/index.js | 0 .../projects/no-scaffolding}/cypress.json | 0 .../cypress/integration/app_spec.js | 0 .../projects/no-server/cypress.json | 0 .../projects/no-server/dev/a space/foo.txt | 0 .../projects/no-server/dev/assets/app.css | 0 .../projects/no-server/dev/assets/foo.json | 0 .../projects/no-server/dev/index.html | 0 .../projects/no-server/dev/sub/index.html | 0 .../projects/no-server/helpers/includes.js | 0 .../projects/no-server/my-tests/test1.js | 0 .../projects/non-existent-spec/cypress.json | 0 .../cypress/integration/spec.js | 0 .../cypress/plugins/index.js | 0 .../projects/non-proxied/cypress.json | 0 .../cypress/fixtures/cy-non-proxied.png | Bin .../non-proxied/cypress/integration/spec.js | 0 .../non-proxied/cypress/plugins/index.js | 0 .../cypress/integration/.gitkeep | 0 .../cypress/integration/1.0/sample_spec.js | 0 .../plugin-after-screenshot/cypress.json | 0 .../after_screenshot_overwrite_spec.js | 0 .../integration/after_screenshot_spec.js | 0 .../cypress/plugins/index.js | 0 .../screenshot-replacement.png | Bin .../cypress.json | 0 .../integration/after_spec_deletes_video.js | 0 .../cypress/plugins/index.js | 0 .../cypress.json | 0 .../cypress/integration/app_spec.js | 0 .../cypress/integration/app_spec2.js | 0 .../cypress/plugins/index.js | 0 .../projects/plugin-browser/cypress.json | 0 .../cypress/integration/app_spec.js | 0 .../plugin-browser/cypress/plugins/index.js | 0 .../plugin-config-version/cypress.json | 0 .../cypress/integration/dummy.js | 0 .../cypress/plugins/index.js | 0 .../projects/plugin-config/cypress.json | 0 .../cypress/integration/app_spec.js | 0 .../plugin-config/cypress/plugins/index.js | 0 .../projects/plugin-empty/cypress.json | 0 .../cypress/integration/app_spec.js | 0 .../plugin-empty/cypress/plugins/index.js | 0 .../plugin-event-deprecated/cypress.json | 0 .../cypress/integration/app_spec.js | 0 .../cypress/plugins/index.js | 0 .../projects/plugin-extension/cypress.json | 0 .../cypress/integration/app_spec.js | 0 .../plugin-extension/cypress/plugins/index.js | 0 .../plugin-extension/ext/background.js | 0 .../plugin-extension/ext/manifest.json | 0 .../projects/plugin-extension/index.html | 0 .../plugin-filter-browsers/cypress.json | 0 .../cypress/integration/app_spec.js | 0 .../cypress/plugins/index.js | 2 +- .../projects/plugin-retries/cypress.json | 0 .../cypress/integration/main.spec.js | 0 .../plugin-returns-bad-config/cypress.json | 0 .../cypress/fixtures/example.json | 0 .../cypress/integration/app_spec.js | 0 .../cypress/plugins/index.js | 0 .../cypress/support/commands.js | 0 .../cypress/support/index.js | 0 .../cypress.json | 0 .../cypress/fixtures/example.json | 0 .../cypress/integration/app_spec.js | 0 .../cypress/plugins/index.js | 0 .../cypress/support/commands.js | 0 .../cypress/support/index.js | 0 .../cypress.json | 0 .../cypress/fixtures/example.json | 0 .../cypress/integration/app_spec.js | 0 .../cypress/plugins/index.js | 0 .../cypress/support/commands.js | 0 .../cypress/support/index.js | 0 .../plugin-run-event-throws/cypress.json | 0 .../integration/run_event_throws_spec.js | 0 .../cypress/plugins/index.js | 0 .../projects/plugin-run-events/cypress.json | 0 .../cypress/integration/run_events_spec_1.js | 0 .../cypress/integration/run_events_spec_2.js | 0 .../cypress/plugins/index.js | 0 .../plugin-validation-error/cypress.json | 0 .../cypress/integration/app_spec.js | 0 .../cypress/plugins/index.js | 0 .../plugins-absolute-path/cypress.json | 0 .../cypress/integration/absolute_spec.js | 0 .../cypress/plugins/index.js | 0 .../projects/plugins-async-error/cypress.json | 0 .../cypress/integration/app_spec.js | 0 .../cypress/plugins/index.js | 0 .../plugins-root-async-error/cypress.json | 0 .../cypress/integration/app_spec.js | 0 .../cypress/plugins/index.js | 0 .../projects/pristine/app.js | 0 .../read-only-project-root/cypress.json | 0 .../cypress/integration/spec.js | 0 .../cypress/plugins/index.js | 0 .../read-only-project-root/cypress/support.js | 0 .../projects/record/cypress.json | 0 .../record/cypress/integration/app_spec.js | 0 .../remote-debugging-disconnect/cypress.json | 0 .../cypress/integration/spec.ts | 0 .../cypress/plugins.js | 0 .../remote-debugging-disconnect/tsconfig.json | 0 .../cypress.json | 0 .../cypress/integration/spec.ts | 0 .../cypress/plugins.js | 0 .../projects/retries-2/cypress.json | 0 .../cypress/integration/fail-twice.js | 0 .../retries-2/cypress/plugins/index.js | 0 .../cypress.json | 0 .../cypress/integration/example.json | 0 .../cypress/integration/spec.js | 0 .../projects/screen-size/cypress.json | 0 .../cypress/integration/default_size.spec.js | 0 .../integration/device_pixel_ratio.spec.js | 0 .../cypress/integration/maximized.spec.js | 0 .../screen-size/cypress/plugins/index.js | 0 .../shadow-dom-global-inclusion/cypress.json | 0 .../cypress/fixtures/shadow-dom.html | 0 .../shadow_dom_global_option_spec.js | 0 .../studio-no-source-maps/cypress.json | 0 .../cypress/integration/extend.spec.js | 0 .../cypress/integration/new.spec.js | 0 .../cypress/plugins/index.js | 0 .../projects/studio-no-source-maps/index.html | 0 .../projects/studio/cypress.json | 0 .../integration/empty-comments.spec.js | 0 .../studio/cypress/integration/extend.spec.js | 0 .../cypress/integration/external.spec.js | 0 .../studio/cypress/integration/new.spec.js | 0 .../cypress/integration/unwritten.spec.js | 0 .../cypress/integration/written.spec.js | 0 .../studio/cypress/support/external.js | 0 .../projects/studio/cypress/support/index.js | 0 .../projects/studio/index.html | 0 .../projects/studio/new.html | 0 .../projects/system-node/cypress.json | 0 .../system-node/cypress/integration/spec.js | 13 + .../system-node/cypress/plugins/index.js | 0 .../projects/task-not-registered/cypress.json | 0 .../integration/task_not_registered_spec.js | 0 .../projects/todos/cypress.json | 0 .../projects/todos/lib/my_coffee.coffee | 0 .../projects/todos/tests/_fixtures/ascii.foo | 0 .../todos/tests/_fixtures/bad_coffee.coffee | 0 .../projects/todos/tests/_fixtures/bad_js.js | 0 .../todos/tests/_fixtures/bad_json.json | 0 .../projects/todos/tests/_fixtures/bar.js | 0 .../todos/tests/_fixtures/bar_coffee.coffee | 0 .../projects/todos/tests/_fixtures/data.csv | 0 .../todos/tests/_fixtures/empty_objects.json | 0 .../todos/tests/_fixtures/example.zip | Bin .../projects/todos/tests/_fixtures/foo.coffee | 0 .../projects/todos/tests/_fixtures/foo.exe | 0 .../projects/todos/tests/_fixtures/foo.js | 0 .../projects/todos/tests/_fixtures/foo.json | 0 .../todos/tests/_fixtures/images/flower.png | Bin .../todos/tests/_fixtures/images/sample.jpg | Bin .../todos/tests/_fixtures/images/sample.tif | Bin .../todos/tests/_fixtures/images/word.gif | Bin .../projects/todos/tests/_fixtures/index.html | 0 .../todos/tests/_fixtures/invalid.exe | 0 .../todos/tests/_fixtures/message.txt | 0 .../todos/tests/_fixtures/nested/fixture.js | 0 .../todos/tests/_fixtures/no_format.js | 0 .../todos/tests/_fixtures/no_format.json | 0 .../tests/_fixtures/no_format_coffee.coffee | 0 .../tests/_fixtures/trailing_new_line.html | 0 .../tests/_fixtures/trailing_new_line.js | 0 .../tests/_fixtures/trailing_new_line.json | 0 .../tests/_fixtures/trailing_new_line.txt | 0 .../_fixtures/trailing_new_line_coffee.coffee | 0 .../todos/tests/_fixtures/unicode_escape.json | 0 .../todos/tests/_fixtures/unknown_ext.yaml | 0 .../projects/todos/tests/_fixtures/user.js | 0 .../projects/todos/tests/_fixtures/users.json | 0 .../tests/_fixtures/valid_coffee_obj.coffee | 0 .../projects/todos/tests/_fixtures/words.json | 0 .../todos/tests/_support/spec_helper.js | 0 .../projects/todos/tests/etc/etc.js | 0 .../projects/todos/tests/sub/a&b%c.js | 0 .../projects/todos/tests/sub/sub_test.coffee | 0 .../projects/todos/tests/test1.js | 0 .../projects/todos/tests/test2.coffee | 0 .../projects/todos/throws-error.js | 0 .../projects/ts-installed/.gitignore | 0 .../projects/ts-installed/cypress.json | 1 + .../ts-proj-custom-names/cypress.json | 0 .../cypress/integration/app_spec.ts | 0 .../cypress/integration/math.ts | 0 .../ts-proj-custom-names/cypress/plugins.ts | 0 .../ts-proj-custom-names/cypress/support.ts | 0 .../ts-proj-esmoduleinterop-true/cypress.json | 0 .../cypress/integration/passing_spec.ts | 0 .../cypress/plugins/commonjs-export.js | 0 .../cypress/plugins/index.ts | 0 .../tsconfig.json | 0 .../ts-proj-tsconfig-in-plugins/cypress.json | 0 .../cypress/integration/passing_spec.js | 0 .../cypress/plugins/index.ts | 0 .../cypress/plugins/tsconfig.json | 0 .../ts-proj-with-module-esnext/cypress.json | 0 .../uses_cy_task_in_ts_plugins_file_spec.js | 0 .../cypress/plugins/greeting.ts | 0 .../cypress/plugins/index.ts | 0 .../ts-proj-with-module-esnext/tsconfig.json | 0 .../projects/ts-proj-with-paths/cypress.json | 0 .../cypress/integration/app_spec.ts | 0 .../cypress/plugins/index.ts | 0 .../cypress/support/index.ts | 0 .../projects/ts-proj-with-paths/src/main.ts | 0 .../projects/ts-proj-with-paths/tsconfig.json | 0 .../projects/ts-proj/cypress.json | 0 .../ts-proj/cypress/integration/app_spec.ts | 0 .../ts-proj/cypress/integration/math.ts | 0 .../plugins/commonjs-export-function.js | 0 .../projects/ts-proj/cypress/plugins/index.ts | 0 .../ts-proj/cypress/support/commands.ts | 0 .../projects/ts-proj/cypress/support/index.ts | 0 .../projects/ts-proj/tsconfig.json | 0 .../uncaught-support-file/cypress.json | 0 .../cypress/integration/spec.js | 0 .../cypress/support/index.js | 0 .../projects/utils.js | 0 .../cypress/integration/.gitkeep | 0 .../cypress/integration/coffee_spec.coffee | 0 .../cypress/integration/js_spec.js | 0 .../cypress/integration/ts_spec.ts | 0 .../cypress.json | 0 .../cypress/integration/failing_spec.ts | 0 .../cypress/plugins/index.js | 0 .../tsconfig.json | 0 .../cypress.json | 0 .../cypress/integration/failing_spec.ts | 0 .../cypress/plugins/index.js | 0 .../tsconfig.json | 0 .../cypress.json | 0 .../cypress/integration/failing_spec.ts | 0 .../cypress/plugins/index.js | 0 .../tsconfig.json | 0 .../webpack-preprocessor/cypress.json | 0 .../cypress/integration/failing_spec.js | 0 .../cypress/plugins/index.js | 0 .../working-preprocessor/cypress.json | 0 .../cypress/integration/another_spec.js | 0 .../cypress/integration/app_spec.js | 0 .../cypress/plugins/index.js | 0 .../projects/yarn-v2-pnp/.gitignore | 0 .../projects/yarn-v2-pnp/.yarnrc.yml | 0 .../projects/yarn-v2-pnp/cypress.json | 1 + .../yarn-v2-pnp/cypress/integration/index.ts | 0 .../yarn-v2-pnp/cypress/plugins/index.ts | 0 .../projects/yarn-v2-pnp/package.json | 0 .../projects/yarn-v2-pnp/tsconfig.json | 0 .../projects/yarn-v2-pnp/yarn-berry.cjs | 0 .../projects/yarn-v2-pnp/yarn.lock | 0 system-tests/scripts/.eslintrc.json | 5 + system-tests/scripts/run.js | 173 ++++++++++ .../test}/async_timeouts_spec.js | 6 +- .../test}/base_url_spec.js | 10 +- .../test}/before_browser_launch_spec.ts | 12 +- .../test}/block_hosts_spec.js | 6 +- .../test}/browser_path_spec.js | 10 +- .../test}/busted_support_file_spec.js | 10 +- .../e2e => system-tests/test}/cache_spec.js | 12 +- .../test}/caught_uncaught_hook_errors_spec.js | 12 +- .../e2e => system-tests/test}/cdp_spec.ts | 10 +- .../test}/commands_outside_of_test_spec.js | 10 +- .../e2e => system-tests/test}/config_spec.js | 28 +- .../test}/controllers_spec.js | 10 +- .../e2e => system-tests/test}/cookies_spec.ts | 8 +- .../test}/deprecated_spec.ts | 20 +- .../e2e => system-tests/test}/domain_spec.js | 6 +- .../test}/downloads_spec.ts | 20 +- .../test}/error_ui_spec.ts | 14 +- .../test}/es_modules_spec.js | 10 +- .../test}/fetch_polyfill_spec.js | 10 +- .../e2e => system-tests/test}/firefox_spec.ts | 12 +- .../test}/form_submissions_spec.js | 22 +- .../test/e2e => system-tests/test}/go_spec.js | 6 +- .../test}/headless_spec.ts | 18 +- .../e2e => system-tests/test}/iframe_spec.js | 8 +- .../e2e => system-tests/test}/images_spec.js | 6 +- .../test}/interception_spec.js | 8 +- .../test}/issue_149_spec.js | 10 +- .../test}/issue_1669_spec.js | 6 +- .../test}/issue_173_spec.ts | 6 +- .../test}/issue_2891_spec.js | 8 +- .../test}/issue_5475_spec.js | 6 +- .../e2e => system-tests/test}/issue_6619.ts | 6 +- .../test}/issue_674_spec.js | 6 +- .../test}/issue_7217_spec.ts | 6 +- .../e2e => system-tests/test}/issue_7481.ts | 6 +- .../test}/issue_8111_spec.js | 8 +- .../test}/js_error_handling_spec.js | 11 +- .../test}/max_listeners_spec.ts | 8 +- .../test}/network_error_handling_spec.js | 24 +- .../test}/new_project_spec.js | 10 +- .../test}/no_superfluous_screenshots_spec.js | 10 +- .../test}/non_proxied_spec.ts | 8 +- .../test}/non_root_read_only_fs_spec.ts | 8 +- .../e2e => system-tests/test}/only_spec.js | 6 +- .../test}/page_loading_spec.js | 6 +- .../test}/plugin_run_events_spec.ts | 12 +- .../e2e => system-tests/test}/plugins_spec.js | 46 +-- .../test}/promises_spec.js | 6 +- .../test}/proxying_spec.ts | 6 +- .../e2e => system-tests/test}/record_spec.js | 117 ++++--- .../test}/reporters_spec.js | 26 +- .../e2e => system-tests/test}/request_spec.ts | 12 +- .../e2e => system-tests/test}/retries_spec.ts | 8 +- .../test}/return_value_spec.js | 6 +- .../e2e => system-tests/test}/run_ct_spec.js | 6 +- .../test}/runnable_execution_spec.ts | 12 +- .../test}/screenshot_element_capture_spec.js | 8 +- .../test}/screenshot_fullpage_capture_spec.js | 8 +- .../test}/screenshot_nested_file_spec.js | 6 +- .../test}/screenshot_viewport_capture_spec.js | 8 +- .../test}/screenshots_spec.js | 24 +- .../test}/server_sent_events_spec.js | 6 +- .../e2e => system-tests/test}/session_spec.ts | 6 +- .../test}/spec_isolation_spec.js | 21 +- .../e2e => system-tests/test}/specs_spec.js | 14 +- .../e2e => system-tests/test}/stdout_spec.js | 18 +- .../e2e => system-tests/test}/studio_spec.ts | 28 +- .../test}/subdomain_spec.ts | 6 +- .../test}/system_node_spec.js | 8 +- .../test}/task_not_registered_spec.js | 8 +- .../e2e => system-tests/test}/task_spec.js | 10 +- .../test}/testConfigOverrides_spec.ts | 10 +- .../test}/typescript_plugins_spec.ts | 14 +- .../test}/typescript_spec_support_spec.ts | 16 +- .../test}/uncaught_spec_errors_spec.js | 14 +- .../test}/uncaught_support_file_spec.js | 8 +- .../test}/user_agent_spec.js | 6 +- .../test}/video_compression_spec.js | 12 +- .../test}/viewport_spec.js | 6 +- .../e2e => system-tests/test}/visit_spec.js | 26 +- .../test}/web_security_spec.js | 10 +- .../test}/websockets_spec.js | 6 +- .../test}/window_open_spec.js | 6 +- .../e2e => system-tests/test}/xhr_spec.js | 8 +- .../test}/yarn_v2_pnp_spec.ts | 12 +- 752 files changed, 1556 insertions(+), 802 deletions(-) delete mode 100644 packages/server/lib/repl.js delete mode 100644 packages/server/repl.js delete mode 100644 packages/server/test/support/fixtures/projects/system-node/cypress/integration/spec.js delete mode 100644 packages/server/test/support/helpers/gzip.js create mode 100644 patches/snap-shot-core+10.2.0.patch create mode 100644 system-tests/.eslintrc.json create mode 100644 system-tests/README.md rename {packages/server => system-tests}/__snapshots__/async_timeouts_spec.js (100%) rename {packages/server => system-tests}/__snapshots__/base_url_spec.js (100%) rename {packages/server => system-tests}/__snapshots__/before_browser_launch_spec.ts.js (100%) rename {packages/server => system-tests}/__snapshots__/block_hosts_spec.js (100%) rename {packages/server => system-tests}/__snapshots__/browser_path_spec.js (100%) rename {packages/server => system-tests}/__snapshots__/busted_support_file_spec.js (100%) rename {packages/server => system-tests}/__snapshots__/cache_spec.js (100%) rename {packages/server => system-tests}/__snapshots__/caught_uncaught_hook_errors_spec.js (100%) rename {packages/server => system-tests}/__snapshots__/cdp_spec.ts.js (100%) rename {packages/server => system-tests}/__snapshots__/commands_outside_of_test_spec.js (100%) rename {packages/server => system-tests}/__snapshots__/config_spec.js (100%) rename {packages/server => system-tests}/__snapshots__/controllers_spec.js (100%) rename {packages/server => system-tests}/__snapshots__/cookies_spec.ts.js (100%) rename {packages/server => system-tests}/__snapshots__/cy_visit_performance_spec.js (100%) rename {packages/server => system-tests}/__snapshots__/deprecated_spec.ts.js (100%) rename {packages/server => system-tests}/__snapshots__/domain_spec.js (100%) rename {packages/server => system-tests}/__snapshots__/es_modules_spec.js (100%) rename {packages/server => system-tests}/__snapshots__/form_submissions_spec.js (100%) rename {packages/server => system-tests}/__snapshots__/go_spec.js (100%) rename {packages/server => system-tests}/__snapshots__/headless_spec.ts.js (100%) rename {packages/server => system-tests}/__snapshots__/iframe_spec.js (100%) rename {packages/server => system-tests}/__snapshots__/images_spec.js (100%) rename {packages/server => system-tests}/__snapshots__/interception_spec.js (100%) rename {packages/server => system-tests}/__snapshots__/issue_149_spec.js (100%) rename {packages/server => system-tests}/__snapshots__/issue_1669_spec.js (100%) rename {packages/server => system-tests}/__snapshots__/issue_173_spec.ts.js (100%) rename {packages/server => system-tests}/__snapshots__/issue_2891_spec.js (100%) rename {packages/server => system-tests}/__snapshots__/issue_5475_spec.js (100%) rename {packages/server => system-tests}/__snapshots__/issue_6619.ts.js (100%) rename {packages/server => system-tests}/__snapshots__/issue_674_spec.js (100%) rename {packages/server => system-tests}/__snapshots__/issue_7217_spec.ts.js (100%) rename {packages/server => system-tests}/__snapshots__/js_error_handling_spec.js (95%) rename {packages/server => system-tests}/__snapshots__/network_error_handling_spec.js (100%) rename {packages/server => system-tests}/__snapshots__/new_project_spec.js (100%) rename {packages/server => system-tests}/__snapshots__/non_proxied_spec.ts.js (100%) rename {packages/server => system-tests}/__snapshots__/non_root_read_only_fs_spec.ts.js (100%) rename {packages/server => system-tests}/__snapshots__/only_spec.js (100%) rename {packages/server => system-tests}/__snapshots__/page_loading_spec.js (100%) rename {packages/server => system-tests}/__snapshots__/plugin_run_events_spec.ts.js (100%) rename {packages/server => system-tests}/__snapshots__/plugins_spec.js (100%) rename {packages/server => system-tests}/__snapshots__/promises_spec.js (100%) rename {packages/server => system-tests}/__snapshots__/record_spec.js (100%) rename {packages/server => system-tests}/__snapshots__/reporters_spec.js (100%) rename {packages/server => system-tests}/__snapshots__/request_spec.ts.js (100%) rename {packages/server => system-tests}/__snapshots__/retries_spec.ts.js (100%) rename {packages/server => system-tests}/__snapshots__/return_value_spec.js (100%) rename {packages/server => system-tests}/__snapshots__/runnable_execution_spec.ts.js (100%) rename {packages/server => system-tests}/__snapshots__/screenshot_element_capture_spec.js (100%) rename {packages/server => system-tests}/__snapshots__/screenshot_fullpage_capture_spec.js (100%) rename {packages/server => system-tests}/__snapshots__/screenshot_nested_file_spec.js (100%) rename {packages/server => system-tests}/__snapshots__/screenshot_viewport_capture_spec.js (100%) rename {packages/server => system-tests}/__snapshots__/screenshots_spec.js (94%) rename {packages/server => system-tests}/__snapshots__/server_sent_events_spec.js (100%) rename {packages/server => system-tests}/__snapshots__/session_spec.ts.js (94%) rename {packages/server => system-tests}/__snapshots__/spec_isolation_spec.js (100%) rename {packages/server => system-tests}/__snapshots__/specs_spec.js (100%) rename {packages/server => system-tests}/__snapshots__/stdout_spec.js (100%) rename {packages/server => system-tests}/__snapshots__/studio_spec.ts.js (100%) rename {packages/server => system-tests}/__snapshots__/subdomain_spec.ts.js (100%) rename {packages/server => system-tests}/__snapshots__/system_node_spec.js (100%) rename {packages/server => system-tests}/__snapshots__/task_not_registered_spec.js (100%) rename {packages/server => system-tests}/__snapshots__/task_spec.js (100%) rename {packages/server => system-tests}/__snapshots__/testConfigOverrides_spec.ts.js (100%) rename {packages/server => system-tests}/__snapshots__/typescript_spec_support_spec.ts.js (99%) rename {packages/server => system-tests}/__snapshots__/uncaught_spec_errors_spec.js (100%) rename {packages/server => system-tests}/__snapshots__/uncaught_support_file_spec.js (100%) rename {packages/server => system-tests}/__snapshots__/user_agent_spec.js (100%) rename {packages/server => system-tests}/__snapshots__/viewport_spec.js (100%) rename {packages/server => system-tests}/__snapshots__/visit_spec.js (100%) rename {packages/server => system-tests}/__snapshots__/web_security_spec.js (100%) rename {packages/server => system-tests}/__snapshots__/websockets_spec.js (100%) rename {packages/server => system-tests}/__snapshots__/xhr_spec.js (100%) rename {packages/server/test/support/helpers => system-tests/lib}/fixtures.js (81%) rename {packages/server/test/support/helpers => system-tests/lib}/performance.js (93%) rename {packages/server/test/support/helpers => system-tests/lib}/resultsUtils.ts (93%) rename {packages/server/test/support/helpers => system-tests/lib}/serverStub.ts (99%) create mode 100644 system-tests/lib/spec_helper.js rename packages/server/test/support/helpers/e2e.ts => system-tests/lib/system-tests.ts (75%) create mode 100644 system-tests/package.json rename {packages/server/test/support/fixtures => system-tests}/projects/.eslintrc.json (100%) rename {packages/server/test/support/fixtures => system-tests}/projects/browser-extensions/cypress.json (100%) rename {packages/server/test/support/fixtures => system-tests}/projects/browser-extensions/cypress/integration/spec.js (100%) rename {packages/server/test/support/fixtures => system-tests}/projects/browser-extensions/cypress/plugins/index.js (100%) rename {packages/server/test/support/fixtures => system-tests}/projects/browser-extensions/index.html (100%) rename {packages/server/test/support/fixtures => system-tests}/projects/busted-support-file/cypress.json (100%) rename {packages/server/test/support/fixtures => system-tests}/projects/busted-support-file/cypress/integration/app_spec.js (100%) rename {packages/server/test/support/fixtures => system-tests}/projects/busted-support-file/cypress/support/index.js (100%) rename {packages/server/test/support/fixtures => system-tests}/projects/chrome-browser-preferences/cypress.json (100%) rename {packages/server/test/support/fixtures => system-tests}/projects/chrome-browser-preferences/cypress/integration/spec.js (100%) rename {packages/server/test/support/fixtures => system-tests}/projects/chrome-browser-preferences/cypress/plugins/index.js (100%) rename {packages/server/test/support/fixtures => system-tests}/projects/component-tests/cypress.json (100%) rename {packages/server/test/support/fixtures => system-tests}/projects/component-tests/cypress/component-tests/fails.spec.js (100%) rename {packages/server/test/support/fixtures => system-tests}/projects/component-tests/cypress/component-tests/foo.spec.js (100%) rename {packages/server/test/support/fixtures => system-tests}/projects/component-tests/cypress/integration/integration-spec.js (100%) rename {packages/server/test/support/fixtures => system-tests}/projects/component-tests/cypress/plugins/index.js (100%) rename {packages/server/test/support/fixtures => system-tests}/projects/config-with-custom-file-js/cypress.config.custom.js (100%) rename {packages/server/test/support/fixtures => system-tests}/projects/config-with-custom-file-js/cypress/integration/app_spec.js (100%) rename {packages/server/test/support/fixtures => system-tests}/projects/config-with-custom-file-ts/cypress.config.custom.ts (100%) rename {packages/server/test/support/fixtures => system-tests}/projects/config-with-custom-file-ts/cypress/integration/app_spec.js (100%) rename {packages/server/test/support/fixtures => system-tests}/projects/config-with-invalid-browser/cypress.json (100%) rename {packages/server/test/support/fixtures => system-tests}/projects/config-with-invalid-browser/cypress/fixtures/example.json (100%) rename {packages/server/test/support/fixtures => system-tests}/projects/config-with-invalid-browser/cypress/integration/app_spec.js (100%) rename {packages/server/test/support/fixtures => system-tests}/projects/config-with-invalid-browser/cypress/plugins/index.js (100%) rename {packages/server/test/support/fixtures => system-tests}/projects/config-with-invalid-browser/cypress/support/commands.js (100%) rename {packages/server/test/support/fixtures => system-tests}/projects/config-with-invalid-browser/cypress/support/index.js (100%) rename {packages/server/test/support/fixtures => system-tests}/projects/config-with-invalid-viewport/cypress.json (100%) rename {packages/server/test/support/fixtures => system-tests}/projects/config-with-invalid-viewport/cypress/integration/app_spec.js (100%) rename {packages/server/test/support/fixtures => system-tests}/projects/config-with-invalid-viewport/cypress/plugins/index.js (100%) rename {packages/server/test/support/fixtures => system-tests}/projects/config-with-js/cypress.config.js (100%) rename {packages/server/test/support/fixtures => system-tests}/projects/config-with-js/cypress/integration/app_spec.js (100%) rename {packages/server/test/support/fixtures => system-tests}/projects/config-with-short-timeout/cypress.json (100%) rename {packages/server/test/support/fixtures => system-tests}/projects/config-with-short-timeout/cypress/integration/dom_times_out_spec.js (100%) rename {packages/server/test/support/fixtures => system-tests}/projects/config-with-short-timeout/index.html (100%) rename {packages/server/test/support/fixtures => system-tests}/projects/config-with-ts/cypress.config.ts (100%) rename {packages/server/test/support/fixtures => system-tests}/projects/config-with-ts/cypress/integration/app_spec.js (100%) rename {packages/server/test/support/fixtures => system-tests}/projects/cookies/cypress.json (100%) rename {packages/server/test/support/fixtures => system-tests}/projects/cookies/cypress/integration/app_spec.js (100%) rename {packages/server/test/support/fixtures => system-tests}/projects/default-layout/cypress.json (100%) rename {packages/server/test/support/fixtures => system-tests}/projects/default-layout/cypress/integration/default_layout_spec.js (100%) rename {packages/server/test/support/fixtures => system-tests}/projects/default-layout/views/layout.html (100%) create mode 100644 system-tests/projects/downloads/.gitignore rename {packages/server/test/support/fixtures => system-tests}/projects/downloads/cypress.json (100%) rename {packages/server/test/support/fixtures => system-tests}/projects/downloads/cypress/fixtures/downloads.html (100%) rename {packages/server/test/support/fixtures => system-tests}/projects/downloads/cypress/fixtures/files.zip (100%) rename {packages/server/test/support/fixtures => system-tests}/projects/downloads/cypress/fixtures/people.xlsx (100%) rename {packages/server/test/support/fixtures => system-tests}/projects/downloads/cypress/fixtures/records.csv (100%) rename {packages/server/test/support/fixtures => system-tests}/projects/downloads/cypress/integration/download_csv_spec.ts (100%) rename {packages/server/test/support/fixtures => system-tests}/projects/downloads/cypress/integration/downloads_spec.ts (100%) rename {packages/server/test/support/fixtures => system-tests}/projects/downloads/cypress/integration/simple_passing_spec.ts (100%) rename packages/server/test/support/fixtures/projects/failures/cypress/cypress.json => system-tests/projects/downloads/tsconfig.json (100%) rename {packages/server/test/support/fixtures => system-tests}/projects/e2e/cross_origin_script.html (100%) rename {packages/server/test/support/fixtures => system-tests}/projects/e2e/cypress-alt.json (100%) rename {packages/server/test/support/fixtures => system-tests}/projects/e2e/cypress.json (100%) rename {packages/server/test/support/fixtures => system-tests}/projects/e2e/cypress/component/simple_failing_spec.js (100%) rename {packages/server/test/support/fixtures => system-tests}/projects/e2e/cypress/fixtures/bigger-sample.pdf (100%) rename {packages/server/test/support/fixtures => system-tests}/projects/e2e/cypress/fixtures/example.json (100%) rename {packages/server/test/support/fixtures => system-tests}/projects/e2e/cypress/fixtures/mjs_file.mjs (100%) rename {packages/server/test/support/fixtures => system-tests}/projects/e2e/cypress/fixtures/sample.jpg (100%) rename {packages/server/test/support/fixtures => system-tests}/projects/e2e/cypress/fixtures/sample.pdf (100%) rename {packages/server/test/support/fixtures => system-tests}/projects/e2e/cypress/integration/a_record.spec.js (100%) rename {packages/server/test/support/fixtures => system-tests}/projects/e2e/cypress/integration/a_record_instantfail.spec.js (100%) rename {packages/server/test/support/fixtures => system-tests}/projects/e2e/cypress/integration/assertions_failing_outside_of_test_spec.js (100%) rename {packages/server/test/support/fixtures => system-tests}/projects/e2e/cypress/integration/assertions_passing_outside_of_test_spec.js (100%) rename {packages/server/test/support/fixtures => system-tests}/projects/e2e/cypress/integration/async_timeouts_spec.js (100%) rename {packages/server/test/support/fixtures => system-tests}/projects/e2e/cypress/integration/b_record.spec.js (100%) rename {packages/server/test/support/fixtures => system-tests}/projects/e2e/cypress/integration/base_url_spec.js (100%) rename {packages/server/test/support/fixtures => system-tests}/projects/e2e/cypress/integration/block_hosts_spec.js (100%) rename {packages/server/test/support/fixtures => system-tests}/projects/e2e/cypress/integration/cache_clearing_spec.js (100%) rename {packages/server/test/support/fixtures => system-tests}/projects/e2e/cypress/integration/cache_spec.js (100%) rename {packages/server/test/support/fixtures => system-tests}/projects/e2e/cypress/integration/caught_async_sync_test_spec.js (100%) rename {packages/server/test/support/fixtures => system-tests}/projects/e2e/cypress/integration/character_encoding_spec.js (100%) rename {packages/server/test/support/fixtures => system-tests}/projects/e2e/cypress/integration/commands_outside_of_test_spec.js (100%) rename {packages/server/test/support/fixtures => system-tests}/projects/e2e/cypress/integration/config_passing_spec.js (100%) rename {packages/server/test/support/fixtures => system-tests}/projects/e2e/cypress/integration/config_record_spec.js (100%) rename {packages/server/test/support/fixtures => system-tests}/projects/e2e/cypress/integration/cookies_spec_baseurl.js (100%) rename {packages/server/test/support/fixtures => system-tests}/projects/e2e/cypress/integration/cookies_spec_no_baseurl.js (100%) rename {packages/server/test/support/fixtures => system-tests}/projects/e2e/cypress/integration/domain_2_spec.js (100%) rename {packages/server/test/support/fixtures => system-tests}/projects/e2e/cypress/integration/domain_spec.js (100%) rename {packages/server/test/support/fixtures => system-tests}/projects/e2e/cypress/integration/empty.spec.js (100%) rename {packages/server/test/support/fixtures => system-tests}/projects/e2e/cypress/integration/empty_suite.spec.js (100%) rename {packages/server/test/support/fixtures => system-tests}/projects/e2e/cypress/integration/ended_early_failing_spec.js (100%) rename {packages/server/test/support/fixtures => system-tests}/projects/e2e/cypress/integration/es_module_import_failing_spec.js (100%) rename {packages/server/test/support/fixtures => system-tests}/projects/e2e/cypress/integration/es_modules_in_coffee_spec.coffee (100%) rename {packages/server/test/support/fixtures => system-tests}/projects/e2e/cypress/integration/fast_visit_spec.js (100%) rename {packages/server/test/support/fixtures => system-tests}/projects/e2e/cypress/integration/fetch_no_polyfill_spec.js (100%) rename {packages/server/test/support/fixtures => system-tests}/projects/e2e/cypress/integration/fetch_spec.js (100%) rename {packages/server/test/support/fixtures => system-tests}/projects/e2e/cypress/integration/firefox_windowSize.js (100%) rename {packages/server/test/support/fixtures => system-tests}/projects/e2e/cypress/integration/form_submission_failing_spec.js (100%) rename {packages/server/test/support/fixtures => system-tests}/projects/e2e/cypress/integration/form_submission_multipart_spec.js (100%) rename {packages/server/test/support/fixtures => system-tests}/projects/e2e/cypress/integration/form_submission_passing_spec.js (100%) rename {packages/server/test/support/fixtures => system-tests}/projects/e2e/cypress/integration/go_spec.js (100%) rename {packages/server/test/support/fixtures => system-tests}/projects/e2e/cypress/integration/hanging_retries_spec.js (100%) rename {packages/server/test/support/fixtures => system-tests}/projects/e2e/cypress/integration/headless_spec.js (100%) rename {packages/server/test/support/fixtures => system-tests}/projects/e2e/cypress/integration/hook_caught_error_failing_spec.js (100%) rename {packages/server/test/support/fixtures => system-tests}/projects/e2e/cypress/integration/hook_uncaught_error_events_failing_spec.js (100%) rename {packages/server/test/support/fixtures => system-tests}/projects/e2e/cypress/integration/hook_uncaught_error_failing_spec.js (100%) rename {packages/server/test/support/fixtures => system-tests}/projects/e2e/cypress/integration/hook_uncaught_root_error_failing_spec.js (100%) rename {packages/server/test/support/fixtures => system-tests}/projects/e2e/cypress/integration/https_passthru_spec.js (100%) rename {packages/server/test/support/fixtures => system-tests}/projects/e2e/cypress/integration/iframe_spec.js (100%) rename {packages/server/test/support/fixtures => system-tests}/projects/e2e/cypress/integration/images_spec.js (100%) rename {packages/server/test/support/fixtures => system-tests}/projects/e2e/cypress/integration/issue_149_spec.js (100%) rename {packages/server/test/support/fixtures => system-tests}/projects/e2e/cypress/integration/issue_1669_spec.js (100%) rename {packages/server/test/support/fixtures => system-tests}/projects/e2e/cypress/integration/issue_173_spec.js (100%) rename {packages/server/test/support/fixtures => system-tests}/projects/e2e/cypress/integration/issue_2196_spec.js (100%) rename {packages/server/test/support/fixtures => system-tests}/projects/e2e/cypress/integration/issue_5475_spec_1.js (100%) rename {packages/server/test/support/fixtures => system-tests}/projects/e2e/cypress/integration/issue_5475_spec_2.js (100%) rename {packages/server/test/support/fixtures => system-tests}/projects/e2e/cypress/integration/issue_674_spec.js (100%) rename {packages/server/test/support/fixtures => system-tests}/projects/e2e/cypress/integration/js_error_handling_failing_spec.js (100%) rename {packages/server/test/support/fixtures => system-tests}/projects/e2e/cypress/integration/mjs_spec.mjs (100%) rename {packages/server/test/support/fixtures => system-tests}/projects/e2e/cypress/integration/multi_cookies_spec.js (100%) rename {packages/server/test/support/fixtures => system-tests}/projects/e2e/cypress/integration/nested-1/nested-2/nested-3/spec.js (100%) rename {packages/server/test/support/fixtures => system-tests}/projects/e2e/cypress/integration/nested-1/nested-2/nested-3/stdout_specfile.js (100%) rename {packages/server/test/support/fixtures => system-tests}/projects/e2e/cypress/integration/nested-1/nested-2/nested-3/stdout_specfile_display_spec_with_a_really_long_name_that_never_has_a_line_break_or_new_line.js (100%) rename {packages/server/test/support/fixtures => system-tests}/projects/e2e/cypress/integration/nested-1/nested-2/screenshot_nested_file_spec.js (100%) rename {packages/server/test/support/fixtures => system-tests}/projects/e2e/cypress/integration/network_error_304_handling_spec.js (100%) rename {packages/server/test/support/fixtures => system-tests}/projects/e2e/cypress/integration/network_error_handling_spec.js (100%) rename {packages/server/test/support/fixtures => system-tests}/projects/e2e/cypress/integration/no_superfluous_screenshots_spec.js (100%) rename {packages/server/test/support/fixtures => system-tests}/projects/e2e/cypress/integration/node_builtins_spec.js (100%) rename {packages/server/test/support/fixtures => system-tests}/projects/e2e/cypress/integration/only_multiple_spec.js (100%) rename {packages/server/test/support/fixtures => system-tests}/projects/e2e/cypress/integration/only_spec.js (100%) rename {packages/server/test/support/fixtures => system-tests}/projects/e2e/cypress/integration/page_loading_spec.js (100%) rename {packages/server/test/support/fixtures => system-tests}/projects/e2e/cypress/integration/plugins_config_extras_spec.js (100%) rename {packages/server/test/support/fixtures => system-tests}/projects/e2e/cypress/integration/promises_spec.js (100%) rename {packages/server/test/support/fixtures => system-tests}/projects/e2e/cypress/integration/proxying_spec.js (100%) rename {packages/server/test/support/fixtures => system-tests}/projects/e2e/cypress/integration/record_error_spec.js (100%) rename {packages/server/test/support/fixtures => system-tests}/projects/e2e/cypress/integration/record_fail_spec.js (100%) rename {packages/server/test/support/fixtures => system-tests}/projects/e2e/cypress/integration/record_pass_spec.js (100%) rename {packages/server/test/support/fixtures => system-tests}/projects/e2e/cypress/integration/record_uncaught_spec.js (100%) rename {packages/server/test/support/fixtures => system-tests}/projects/e2e/cypress/integration/reload-spec.spec.js (100%) rename {packages/server/test/support/fixtures => system-tests}/projects/e2e/cypress/integration/request_http_network_error_failing_spec.js (100%) rename {packages/server/test/support/fixtures => system-tests}/projects/e2e/cypress/integration/request_long_http_props_failing_spec.js (100%) rename {packages/server/test/support/fixtures => system-tests}/projects/e2e/cypress/integration/request_spec.js (100%) rename {packages/server/test/support/fixtures => system-tests}/projects/e2e/cypress/integration/request_status_code_failing_spec.js (100%) rename {packages/server/test/support/fixtures => system-tests}/projects/e2e/cypress/integration/return_value_spec.js (100%) rename {packages/server/test/support/fixtures => system-tests}/projects/e2e/cypress/integration/runnables_already_run_suite.js (100%) rename {packages/server/test/support/fixtures => system-tests}/projects/e2e/cypress/integration/screenshot_element_capture_spec.js (100%) rename {packages/server/test/support/fixtures => system-tests}/projects/e2e/cypress/integration/screenshot_fullpage_capture_spec.js (100%) rename {packages/server/test/support/fixtures => system-tests}/projects/e2e/cypress/integration/screenshot_viewport_capture_spec.js (100%) rename {packages/server/test/support/fixtures => system-tests}/projects/e2e/cypress/integration/screenshots_spec.js (100%) rename {packages/server/test/support/fixtures => system-tests}/projects/e2e/cypress/integration/server_sent_events_spec.js (100%) rename {packages/server/test/support/fixtures => system-tests}/projects/e2e/cypress/integration/session_persist_spec_1.js (100%) rename {packages/server/test/support/fixtures => system-tests}/projects/e2e/cypress/integration/session_persist_spec_2.js (100%) rename {packages/server/test/support/fixtures => system-tests}/projects/e2e/cypress/integration/session_spec.js (100%) rename {packages/server/test/support/fixtures => system-tests}/projects/e2e/cypress/integration/simple_failing_hook_spec.js (100%) rename {packages/server/test/support/fixtures => system-tests}/projects/e2e/cypress/integration/simple_failing_spec.js (100%) rename {packages/server/test/support/fixtures => system-tests}/projects/e2e/cypress/integration/simple_hooks_spec.js (100%) rename {packages/server/test/support/fixtures => system-tests}/projects/e2e/cypress/integration/simple_passing_spec.js (100%) rename {packages/server/test/support/fixtures => system-tests}/projects/e2e/cypress/integration/simple_retrying_spec.js (100%) rename {packages/server/test/support/fixtures => system-tests}/projects/e2e/cypress/integration/simple_spec.js (100%) rename {packages/server/test/support/fixtures => system-tests}/projects/e2e/cypress/integration/source_rewriting_spec.js (100%) rename {packages/server/test/support/fixtures => system-tests}/projects/e2e/cypress/integration/stdout_assertion_errors_spec.js (100%) rename {packages/server/test/support/fixtures => system-tests}/projects/e2e/cypress/integration/stdout_exit_early_failing_spec.js (100%) rename {packages/server/test/support/fixtures => system-tests}/projects/e2e/cypress/integration/stdout_failing_spec.js (100%) rename {packages/server/test/support/fixtures => system-tests}/projects/e2e/cypress/integration/stdout_passing_spec.js (100%) rename {packages/server/test/support/fixtures => system-tests}/projects/e2e/cypress/integration/studio_written.spec.js (100%) rename {packages/server/test/support/fixtures => system-tests}/projects/e2e/cypress/integration/subdomain_spec.js (100%) rename {packages/server/test/support/fixtures => system-tests}/projects/e2e/cypress/integration/task_spec.js (100%) rename {packages/server/test/support/fixtures => system-tests}/projects/e2e/cypress/integration/testConfigOverrides-invalid-browser.js (100%) rename {packages/server/test/support/fixtures => system-tests}/projects/e2e/cypress/integration/testConfigOverrides-skip-browser.js (100%) rename {packages/server/test/support/fixtures => system-tests}/projects/e2e/cypress/integration/typescript_passing_spec.ts (100%) rename {packages/server/test/support/fixtures => system-tests}/projects/e2e/cypress/integration/typescript_syntax_error_spec.ts (100%) rename {packages/server/test/support/fixtures => system-tests}/projects/e2e/cypress/integration/uncaught_during_hook_spec.js (100%) rename {packages/server/test/support/fixtures => system-tests}/projects/e2e/cypress/integration/uncaught_during_test_spec.js (100%) rename {packages/server/test/support/fixtures => system-tests}/projects/e2e/cypress/integration/uncaught_synchronous_before_tests_parsed.js (100%) rename {packages/server/test/support/fixtures => system-tests}/projects/e2e/cypress/integration/uncaught_synchronous_during_hook_spec.js (100%) rename {packages/server/test/support/fixtures => system-tests}/projects/e2e/cypress/integration/user_agent_spec.js (100%) rename {packages/server/test/support/fixtures => system-tests}/projects/e2e/cypress/integration/video_compression_spec.js (100%) rename {packages/server/test/support/fixtures => system-tests}/projects/e2e/cypress/integration/viewport_spec.js (100%) rename {packages/server/test/support/fixtures => system-tests}/projects/e2e/cypress/integration/visit_file_404_response_failing_spec.js (100%) rename {packages/server/test/support/fixtures => system-tests}/projects/e2e/cypress/integration/visit_http_500_response_failing_spec.js (100%) rename {packages/server/test/support/fixtures => system-tests}/projects/e2e/cypress/integration/visit_http_network_error_failing_spec.js (100%) rename {packages/server/test/support/fixtures => system-tests}/projects/e2e/cypress/integration/visit_http_timeout_failing_spec.js (100%) rename {packages/server/test/support/fixtures => system-tests}/projects/e2e/cypress/integration/visit_non_html_content_type_failing_spec.js (100%) rename {packages/server/test/support/fixtures => system-tests}/projects/e2e/cypress/integration/visit_response_never_ends_failing_spec.js (100%) rename {packages/server/test/support/fixtures => system-tests}/projects/e2e/cypress/integration/visit_spec.js (100%) rename {packages/server/test/support/fixtures => system-tests}/projects/e2e/cypress/integration/web_security_spec.js (100%) rename {packages/server/test/support/fixtures => system-tests}/projects/e2e/cypress/integration/websockets_spec.js (100%) rename {packages/server/test/support/fixtures => system-tests}/projects/e2e/cypress/integration/window_open_spec.coffee (100%) rename {packages/server/test/support/fixtures => system-tests}/projects/e2e/cypress/integration/xhr_spec.js (100%) rename {packages/server/test/support/fixtures => system-tests}/projects/e2e/cypress/plugins/index.js (98%) rename {packages/server/test/support/fixtures => system-tests}/projects/e2e/cypress/support/commands.js (100%) rename {packages/server/test/support/fixtures => system-tests}/projects/e2e/cypress/support/foo/bar.js (100%) rename {packages/server/test/support/fixtures => system-tests}/projects/e2e/cypress/support/index.js (100%) rename {packages/server/test/support/fixtures => system-tests}/projects/e2e/cypress/support/util.js (100%) rename {packages/server/test/support/fixtures => system-tests}/projects/e2e/elements.html (100%) rename {packages/server/test/support/fixtures => system-tests}/projects/e2e/fail.html (100%) rename {packages/server/test/support/fixtures => system-tests}/projects/e2e/forms.html (100%) rename {packages/server/test/support/fixtures => system-tests}/projects/e2e/hash.html (100%) rename {packages/server/test/support/fixtures => system-tests}/projects/e2e/index.html (100%) rename {packages/server/test/support/fixtures => system-tests}/projects/e2e/jquery.html (100%) rename {packages/server/test/support/fixtures => system-tests}/projects/e2e/js_errors.html (100%) rename {packages/server/test/support/fixtures => system-tests}/projects/e2e/lib/bar.js (100%) rename {packages/server/test/support/fixtures => system-tests}/projects/e2e/lib/baz.js (100%) rename {packages/server/test/support/fixtures => system-tests}/projects/e2e/lib/dom.jsx (100%) rename {packages/server/test/support/fixtures => system-tests}/projects/e2e/lib/fail.js (100%) rename {packages/server/test/support/fixtures => system-tests}/projects/e2e/lib/foo.coffee (100%) rename {packages/server/test/support/fixtures => system-tests}/projects/e2e/obstructive_code.html (100%) rename {packages/server/test/support/fixtures => system-tests}/projects/e2e/outer.html (100%) rename {packages/server/test/support/fixtures => system-tests}/projects/e2e/outer_404.html (100%) rename {packages/server/test/support/fixtures => system-tests}/projects/e2e/package.json (100%) rename {packages/server/test/support/fixtures => system-tests}/projects/e2e/reporters/custom.js (100%) rename {packages/server/test/support/fixtures => system-tests}/projects/e2e/reporters/throws.js (100%) rename {packages/server/test/support/fixtures => system-tests}/projects/e2e/reporters/uses-file.js (100%) rename {packages/server/test/support/fixtures => system-tests}/projects/e2e/scrollable.html (100%) rename {packages/server/test/support/fixtures => system-tests}/projects/e2e/static/FiraSans-Regular.woff (100%) rename {packages/server/test/support/fixtures => system-tests}/projects/e2e/static/FiraSans-Regular.woff.gz (100%) rename {packages/server/test/support/fixtures => system-tests}/projects/e2e/static/charsets/euc-kr.html (100%) rename {packages/server/test/support/fixtures => system-tests}/projects/e2e/static/charsets/gb2312.html (100%) rename {packages/server/test/support/fixtures => system-tests}/projects/e2e/static/charsets/iso-8859-1.html (100%) rename {packages/server/test/support/fixtures => system-tests}/projects/e2e/static/charsets/shift-jis.html (100%) rename {packages/server/test/support/fixtures => system-tests}/projects/e2e/static/content.json (100%) rename {packages/server/test/support/fixtures => system-tests}/projects/e2e/static/fail.js (100%) rename {packages/server/test/support/fixtures => system-tests}/projects/e2e/static/hello.txt (100%) rename {packages/server/test/support/fixtures => system-tests}/projects/e2e/static/iframe/index.html (100%) rename {packages/server/test/support/fixtures => system-tests}/projects/e2e/static/javascript-logo.png (100%) rename {packages/server/test/support/fixtures => system-tests}/projects/e2e/static/javascript-logo.png.gz (100%) rename {packages/server/test/support/fixtures => system-tests}/projects/e2e/static/jquery.js (100%) rename {packages/server/test/support/fixtures => system-tests}/projects/e2e/static/obstructive_code.js (100%) rename {packages/server/test/support/fixtures => system-tests}/projects/e2e/static/onclick_redirect.html (100%) rename {packages/server/test/support/fixtures => system-tests}/projects/e2e/static/settimeout_basetag_redirect.html (100%) rename {packages/server/test/support/fixtures => system-tests}/projects/e2e/static/settimeout_redirect_assign.html (100%) rename {packages/server/test/support/fixtures => system-tests}/projects/e2e/static/settimeout_redirect_document_href.html (100%) rename {packages/server/test/support/fixtures => system-tests}/projects/e2e/static/settimeout_redirect_href.html (100%) rename {packages/server/test/support/fixtures => system-tests}/projects/e2e/static/settimeout_redirect_href_hash.html (100%) rename {packages/server/test/support/fixtures => system-tests}/projects/e2e/static/settimeout_redirect_pathname.html (100%) rename {packages/server/test/support/fixtures => system-tests}/projects/e2e/static/settimeout_redirect_replace.html (100%) rename {packages/server/test/support/fixtures => system-tests}/projects/e2e/static/settimeout_redirect_search.html (100%) rename {packages/server/test/support/fixtures => system-tests}/projects/e2e/static/settimeout_redirect_set_document_location.html (100%) rename {packages/server/test/support/fixtures => system-tests}/projects/e2e/static/settimeout_redirect_set_document_location_hash.html (100%) rename {packages/server/test/support/fixtures => system-tests}/projects/e2e/static/settimeout_redirect_set_location.html (100%) rename {packages/server/test/support/fixtures => system-tests}/projects/e2e/static/settimeout_redirect_set_window_document_location.html (100%) rename {packages/server/test/support/fixtures => system-tests}/projects/e2e/static/settimeout_redirect_set_window_location.html (100%) rename {packages/server/test/support/fixtures => system-tests}/projects/e2e/static/settimeout_redirect_window_document_href.html (100%) rename {packages/server/test/support/fixtures => system-tests}/projects/e2e/static/settimeout_redirect_window_href.html (100%) rename {packages/server/test/support/fixtures => system-tests}/projects/e2e/static/simple_obstructive_code.js (100%) rename {packages/server/test/support/fixtures => system-tests}/projects/e2e/static/xhr_onload_redirect.html (100%) create mode 100644 system-tests/projects/e2e/tsconfig.json rename {packages/server/test/support/fixtures => system-tests}/projects/e2e/visit_error.html (100%) rename {packages/server/test/support/fixtures => system-tests}/projects/e2e/window_open.html (100%) rename {packages/server/test/support/fixtures => system-tests}/projects/e2e/xhr.html (100%) rename {packages/server/test/support/fixtures => system-tests}/projects/empty-folders/cypress.json (100%) rename {packages/server/test/support/fixtures => system-tests}/projects/empty-folders/cypress/plugins/.gitkeep (100%) rename {packages/server/test/support/fixtures => system-tests}/projects/empty-folders/cypress/support/.gitkeep (100%) rename {packages/server/test/support/fixtures/projects/ids => system-tests/projects/failures/cypress}/cypress.json (100%) rename {packages/server/test/support/fixtures => system-tests}/projects/failures/cypress/integration/app_spec.js (100%) rename {packages/server/test/support/fixtures => system-tests}/projects/failures/cypress/integration/syntax_error.js (100%) rename {packages/server/test/support/fixtures => system-tests}/projects/firefox-memory/cypress.json (100%) rename {packages/server/test/support/fixtures => system-tests}/projects/firefox-memory/cypress/integration/spec.js (100%) rename {packages/server/test/support/fixtures => system-tests}/projects/firefox-memory/cypress/plugins/index.js (100%) rename {packages/server/test/support/fixtures => system-tests}/projects/fixture-subfolder-of-integration/cypress.json (100%) rename {packages/server/test/support/fixtures => system-tests}/projects/fixture-subfolder-of-integration/test/fixtures/example.json (100%) rename {packages/server/test/support/fixtures => system-tests}/projects/fixture-subfolder-of-integration/test/spec.js (100%) rename {packages/server/test/support/fixtures => system-tests}/projects/folder-same-as-fixture/cypress.json (100%) rename {packages/server/test/support/fixtures => system-tests}/projects/folder-same-as-fixture/cypress/fixtures/foo.json (100%) rename {packages/server/test/support/fixtures => system-tests}/projects/folder-same-as-fixture/cypress/fixtures/foo/.gitkeep (100%) rename {packages/server/test/support/fixtures => system-tests}/projects/hooks-after-rerun/cypress.json (100%) rename {packages/server/test/support/fixtures => system-tests}/projects/hooks-after-rerun/cypress/integration/beforehook-and-test-navigation.js (100%) rename {packages/server/test/support/fixtures => system-tests}/projects/hooks-after-rerun/cypress/integration/runnable-run-count.spec.js (100%) rename {packages/server/test/support/fixtures => system-tests}/projects/hooks-after-rerun/cypress/plugins/index.js (100%) rename {packages/server/test/support/fixtures => system-tests}/projects/hooks-after-rerun/cypress/support/index.js (100%) rename {packages/server/test/support/fixtures/projects/max-listeners => system-tests/projects/ids}/cypress.json (100%) rename {packages/server/test/support/fixtures => system-tests}/projects/ids/cypress/.eslintrc.json (100%) rename {packages/server/test/support/fixtures => system-tests}/projects/ids/cypress/fixtures/example.json (100%) rename {packages/server/test/support/fixtures => system-tests}/projects/ids/cypress/integration/0.844061cbceddba47c476.hot-update.js (100%) rename {packages/server/test/support/fixtures => system-tests}/projects/ids/cypress/integration/bar.js (100%) rename {packages/server/test/support/fixtures => system-tests}/projects/ids/cypress/integration/baz.js (100%) rename {packages/server/test/support/fixtures => system-tests}/projects/ids/cypress/integration/dom.jsx (100%) rename {packages/server/test/support/fixtures => system-tests}/projects/ids/cypress/integration/es6.js (100%) rename {packages/server/test/support/fixtures => system-tests}/projects/ids/cypress/integration/foo.coffee (100%) rename {packages/server/test/support/fixtures => system-tests}/projects/ids/cypress/integration/nested/tmp.js (100%) rename {packages/server/test/support/fixtures => system-tests}/projects/ids/cypress/integration/noop.coffee (100%) rename {packages/server/test/support/fixtures => system-tests}/projects/ids/cypress/support/index.js (100%) rename {packages/server/test/support/fixtures => system-tests}/projects/integration-outside-project-root/integration/failing_spec.js (100%) rename {packages/server/test/support/fixtures => system-tests}/projects/integration-outside-project-root/project-root/cypress.json (100%) rename {packages/server/test/support/fixtures => system-tests}/projects/issue-8111-iframe-input/cypress.json (100%) rename {packages/server/test/support/fixtures => system-tests}/projects/issue-8111-iframe-input/cypress/integration/iframe_input_spec.js (100%) rename {packages/server/test/support/fixtures => system-tests}/projects/issue-8111-iframe-input/cypress/plugins/index.js (100%) rename {packages/server/test/support/fixtures => system-tests}/projects/issue-8111-iframe-input/inner.html (100%) rename {packages/server/test/support/fixtures => system-tests}/projects/issue-8111-iframe-input/outer.html (100%) rename {packages/server/test/support/fixtures/projects/no-scaffolding => system-tests/projects/max-listeners}/cypress.json (100%) rename {packages/server/test/support/fixtures => system-tests}/projects/multiple-task-registrations/cypress.json (100%) rename {packages/server/test/support/fixtures => system-tests}/projects/multiple-task-registrations/cypress/integration/multiple_task_registrations_spec.js (100%) rename {packages/server/test/support/fixtures => system-tests}/projects/multiple-task-registrations/cypress/plugins/index.js (100%) rename {packages/server/test/support/fixtures/projects/ts-installed => system-tests/projects/no-scaffolding}/cypress.json (100%) rename {packages/server/test/support/fixtures => system-tests}/projects/no-scaffolding/cypress/integration/app_spec.js (100%) rename {packages/server/test/support/fixtures => system-tests}/projects/no-server/cypress.json (100%) rename {packages/server/test/support/fixtures => system-tests}/projects/no-server/dev/a space/foo.txt (100%) rename {packages/server/test/support/fixtures => system-tests}/projects/no-server/dev/assets/app.css (100%) rename {packages/server/test/support/fixtures => system-tests}/projects/no-server/dev/assets/foo.json (100%) rename {packages/server/test/support/fixtures => system-tests}/projects/no-server/dev/index.html (100%) rename {packages/server/test/support/fixtures => system-tests}/projects/no-server/dev/sub/index.html (100%) rename {packages/server/test/support/fixtures => system-tests}/projects/no-server/helpers/includes.js (100%) rename {packages/server/test/support/fixtures => system-tests}/projects/no-server/my-tests/test1.js (100%) rename {packages/server/test/support/fixtures => system-tests}/projects/non-existent-spec/cypress.json (100%) rename {packages/server/test/support/fixtures => system-tests}/projects/non-existent-spec/cypress/integration/spec.js (100%) rename {packages/server/test/support/fixtures => system-tests}/projects/non-existent-spec/cypress/plugins/index.js (100%) rename {packages/server/test/support/fixtures => system-tests}/projects/non-proxied/cypress.json (100%) rename {packages/server/test/support/fixtures => system-tests}/projects/non-proxied/cypress/fixtures/cy-non-proxied.png (100%) rename {packages/server/test/support/fixtures => system-tests}/projects/non-proxied/cypress/integration/spec.js (100%) rename {packages/server/test/support/fixtures => system-tests}/projects/non-proxied/cypress/plugins/index.js (100%) rename {packages/server/test/support/fixtures => system-tests}/projects/odd-directory-name/cypress/integration/.gitkeep (100%) rename {packages/server/test/support/fixtures => system-tests}/projects/odd-directory-name/cypress/integration/1.0/sample_spec.js (100%) rename {packages/server/test/support/fixtures => system-tests}/projects/plugin-after-screenshot/cypress.json (100%) rename {packages/server/test/support/fixtures => system-tests}/projects/plugin-after-screenshot/cypress/integration/after_screenshot_overwrite_spec.js (100%) rename {packages/server/test/support/fixtures => system-tests}/projects/plugin-after-screenshot/cypress/integration/after_screenshot_spec.js (100%) rename {packages/server/test/support/fixtures => system-tests}/projects/plugin-after-screenshot/cypress/plugins/index.js (100%) rename {packages/server/test/support/fixtures => system-tests}/projects/plugin-after-screenshot/screenshot-replacement.png (100%) rename {packages/server/test/support/fixtures => system-tests}/projects/plugin-after-spec-deletes-video/cypress.json (100%) rename {packages/server/test/support/fixtures => system-tests}/projects/plugin-after-spec-deletes-video/cypress/integration/after_spec_deletes_video.js (100%) rename {packages/server/test/support/fixtures => system-tests}/projects/plugin-after-spec-deletes-video/cypress/plugins/index.js (100%) rename {packages/server/test/support/fixtures => system-tests}/projects/plugin-before-browser-launch-deprecation/cypress.json (100%) rename {packages/server/test/support/fixtures => system-tests}/projects/plugin-before-browser-launch-deprecation/cypress/integration/app_spec.js (100%) rename {packages/server/test/support/fixtures => system-tests}/projects/plugin-before-browser-launch-deprecation/cypress/integration/app_spec2.js (100%) rename {packages/server/test/support/fixtures => system-tests}/projects/plugin-before-browser-launch-deprecation/cypress/plugins/index.js (100%) rename {packages/server/test/support/fixtures => system-tests}/projects/plugin-browser/cypress.json (100%) rename {packages/server/test/support/fixtures => system-tests}/projects/plugin-browser/cypress/integration/app_spec.js (100%) rename {packages/server/test/support/fixtures => system-tests}/projects/plugin-browser/cypress/plugins/index.js (100%) rename {packages/server/test/support/fixtures => system-tests}/projects/plugin-config-version/cypress.json (100%) rename {packages/server/test/support/fixtures => system-tests}/projects/plugin-config-version/cypress/integration/dummy.js (100%) rename {packages/server/test/support/fixtures => system-tests}/projects/plugin-config-version/cypress/plugins/index.js (100%) rename {packages/server/test/support/fixtures => system-tests}/projects/plugin-config/cypress.json (100%) rename {packages/server/test/support/fixtures => system-tests}/projects/plugin-config/cypress/integration/app_spec.js (100%) rename {packages/server/test/support/fixtures => system-tests}/projects/plugin-config/cypress/plugins/index.js (100%) rename {packages/server/test/support/fixtures => system-tests}/projects/plugin-empty/cypress.json (100%) rename {packages/server/test/support/fixtures => system-tests}/projects/plugin-empty/cypress/integration/app_spec.js (100%) rename {packages/server/test/support/fixtures => system-tests}/projects/plugin-empty/cypress/plugins/index.js (100%) rename {packages/server/test/support/fixtures => system-tests}/projects/plugin-event-deprecated/cypress.json (100%) rename {packages/server/test/support/fixtures => system-tests}/projects/plugin-event-deprecated/cypress/integration/app_spec.js (100%) rename {packages/server/test/support/fixtures => system-tests}/projects/plugin-event-deprecated/cypress/plugins/index.js (100%) rename {packages/server/test/support/fixtures => system-tests}/projects/plugin-extension/cypress.json (100%) rename {packages/server/test/support/fixtures => system-tests}/projects/plugin-extension/cypress/integration/app_spec.js (100%) rename {packages/server/test/support/fixtures => system-tests}/projects/plugin-extension/cypress/plugins/index.js (100%) rename {packages/server/test/support/fixtures => system-tests}/projects/plugin-extension/ext/background.js (100%) rename {packages/server/test/support/fixtures => system-tests}/projects/plugin-extension/ext/manifest.json (100%) rename {packages/server/test/support/fixtures => system-tests}/projects/plugin-extension/index.html (100%) rename {packages/server/test/support/fixtures => system-tests}/projects/plugin-filter-browsers/cypress.json (100%) rename {packages/server/test/support/fixtures => system-tests}/projects/plugin-filter-browsers/cypress/integration/app_spec.js (100%) rename {packages/server/test/support/fixtures => system-tests}/projects/plugin-filter-browsers/cypress/plugins/index.js (93%) rename {packages/server/test/support/fixtures => system-tests}/projects/plugin-retries/cypress.json (100%) rename {packages/server/test/support/fixtures => system-tests}/projects/plugin-retries/cypress/integration/main.spec.js (100%) rename {packages/server/test/support/fixtures => system-tests}/projects/plugin-returns-bad-config/cypress.json (100%) rename {packages/server/test/support/fixtures => system-tests}/projects/plugin-returns-bad-config/cypress/fixtures/example.json (100%) rename {packages/server/test/support/fixtures => system-tests}/projects/plugin-returns-bad-config/cypress/integration/app_spec.js (100%) rename {packages/server/test/support/fixtures => system-tests}/projects/plugin-returns-bad-config/cypress/plugins/index.js (100%) rename {packages/server/test/support/fixtures => system-tests}/projects/plugin-returns-bad-config/cypress/support/commands.js (100%) rename {packages/server/test/support/fixtures => system-tests}/projects/plugin-returns-bad-config/cypress/support/index.js (100%) rename {packages/server/test/support/fixtures => system-tests}/projects/plugin-returns-empty-browsers-list/cypress.json (100%) rename {packages/server/test/support/fixtures => system-tests}/projects/plugin-returns-empty-browsers-list/cypress/fixtures/example.json (100%) rename {packages/server/test/support/fixtures => system-tests}/projects/plugin-returns-empty-browsers-list/cypress/integration/app_spec.js (100%) rename {packages/server/test/support/fixtures => system-tests}/projects/plugin-returns-empty-browsers-list/cypress/plugins/index.js (100%) rename {packages/server/test/support/fixtures => system-tests}/projects/plugin-returns-empty-browsers-list/cypress/support/commands.js (100%) rename {packages/server/test/support/fixtures => system-tests}/projects/plugin-returns-empty-browsers-list/cypress/support/index.js (100%) rename {packages/server/test/support/fixtures => system-tests}/projects/plugin-returns-invalid-browser/cypress.json (100%) rename {packages/server/test/support/fixtures => system-tests}/projects/plugin-returns-invalid-browser/cypress/fixtures/example.json (100%) rename {packages/server/test/support/fixtures => system-tests}/projects/plugin-returns-invalid-browser/cypress/integration/app_spec.js (100%) rename {packages/server/test/support/fixtures => system-tests}/projects/plugin-returns-invalid-browser/cypress/plugins/index.js (100%) rename {packages/server/test/support/fixtures => system-tests}/projects/plugin-returns-invalid-browser/cypress/support/commands.js (100%) rename {packages/server/test/support/fixtures => system-tests}/projects/plugin-returns-invalid-browser/cypress/support/index.js (100%) rename {packages/server/test/support/fixtures => system-tests}/projects/plugin-run-event-throws/cypress.json (100%) rename {packages/server/test/support/fixtures => system-tests}/projects/plugin-run-event-throws/cypress/integration/run_event_throws_spec.js (100%) rename {packages/server/test/support/fixtures => system-tests}/projects/plugin-run-event-throws/cypress/plugins/index.js (100%) rename {packages/server/test/support/fixtures => system-tests}/projects/plugin-run-events/cypress.json (100%) rename {packages/server/test/support/fixtures => system-tests}/projects/plugin-run-events/cypress/integration/run_events_spec_1.js (100%) rename {packages/server/test/support/fixtures => system-tests}/projects/plugin-run-events/cypress/integration/run_events_spec_2.js (100%) rename {packages/server/test/support/fixtures => system-tests}/projects/plugin-run-events/cypress/plugins/index.js (100%) rename {packages/server/test/support/fixtures => system-tests}/projects/plugin-validation-error/cypress.json (100%) rename {packages/server/test/support/fixtures => system-tests}/projects/plugin-validation-error/cypress/integration/app_spec.js (100%) rename {packages/server/test/support/fixtures => system-tests}/projects/plugin-validation-error/cypress/plugins/index.js (100%) rename {packages/server/test/support/fixtures => system-tests}/projects/plugins-absolute-path/cypress.json (100%) rename {packages/server/test/support/fixtures => system-tests}/projects/plugins-absolute-path/cypress/integration/absolute_spec.js (100%) rename {packages/server/test/support/fixtures => system-tests}/projects/plugins-absolute-path/cypress/plugins/index.js (100%) rename {packages/server/test/support/fixtures => system-tests}/projects/plugins-async-error/cypress.json (100%) rename {packages/server/test/support/fixtures => system-tests}/projects/plugins-async-error/cypress/integration/app_spec.js (100%) rename {packages/server/test/support/fixtures => system-tests}/projects/plugins-async-error/cypress/plugins/index.js (100%) rename {packages/server/test/support/fixtures => system-tests}/projects/plugins-root-async-error/cypress.json (100%) rename {packages/server/test/support/fixtures => system-tests}/projects/plugins-root-async-error/cypress/integration/app_spec.js (100%) rename {packages/server/test/support/fixtures => system-tests}/projects/plugins-root-async-error/cypress/plugins/index.js (100%) rename {packages/server/test/support/fixtures => system-tests}/projects/pristine/app.js (100%) rename {packages/server/test/support/fixtures => system-tests}/projects/read-only-project-root/cypress.json (100%) rename {packages/server/test/support/fixtures => system-tests}/projects/read-only-project-root/cypress/integration/spec.js (100%) rename {packages/server/test/support/fixtures => system-tests}/projects/read-only-project-root/cypress/plugins/index.js (100%) rename {packages/server/test/support/fixtures => system-tests}/projects/read-only-project-root/cypress/support.js (100%) rename {packages/server/test/support/fixtures => system-tests}/projects/record/cypress.json (100%) rename {packages/server/test/support/fixtures => system-tests}/projects/record/cypress/integration/app_spec.js (100%) rename {packages/server/test/support/fixtures => system-tests}/projects/remote-debugging-disconnect/cypress.json (100%) rename {packages/server/test/support/fixtures => system-tests}/projects/remote-debugging-disconnect/cypress/integration/spec.ts (100%) rename {packages/server/test/support/fixtures => system-tests}/projects/remote-debugging-disconnect/cypress/plugins.js (100%) rename packages/server/test/support/fixtures/projects/yarn-v2-pnp/cypress.json => system-tests/projects/remote-debugging-disconnect/tsconfig.json (100%) rename {packages/server/test/support/fixtures => system-tests}/projects/remote-debugging-port-removed/cypress.json (100%) rename {packages/server/test/support/fixtures => system-tests}/projects/remote-debugging-port-removed/cypress/integration/spec.ts (100%) rename {packages/server/test/support/fixtures => system-tests}/projects/remote-debugging-port-removed/cypress/plugins.js (100%) rename {packages/server/test/support/fixtures => system-tests}/projects/retries-2/cypress.json (100%) rename {packages/server/test/support/fixtures => system-tests}/projects/retries-2/cypress/integration/fail-twice.js (100%) rename {packages/server/test/support/fixtures => system-tests}/projects/retries-2/cypress/plugins/index.js (100%) rename {packages/server/test/support/fixtures => system-tests}/projects/same-fixtures-integration-folders/cypress.json (100%) rename {packages/server/test/support/fixtures => system-tests}/projects/same-fixtures-integration-folders/cypress/integration/example.json (100%) rename {packages/server/test/support/fixtures => system-tests}/projects/same-fixtures-integration-folders/cypress/integration/spec.js (100%) rename {packages/server/test/support/fixtures => system-tests}/projects/screen-size/cypress.json (100%) rename {packages/server/test/support/fixtures => system-tests}/projects/screen-size/cypress/integration/default_size.spec.js (100%) rename {packages/server/test/support/fixtures => system-tests}/projects/screen-size/cypress/integration/device_pixel_ratio.spec.js (100%) rename {packages/server/test/support/fixtures => system-tests}/projects/screen-size/cypress/integration/maximized.spec.js (100%) rename {packages/server/test/support/fixtures => system-tests}/projects/screen-size/cypress/plugins/index.js (100%) rename {packages/server/test/support/fixtures => system-tests}/projects/shadow-dom-global-inclusion/cypress.json (100%) rename {packages/server/test/support/fixtures => system-tests}/projects/shadow-dom-global-inclusion/cypress/fixtures/shadow-dom.html (100%) rename {packages/server/test/support/fixtures => system-tests}/projects/shadow-dom-global-inclusion/cypress/integration/shadow_dom_global_option_spec.js (100%) rename {packages/server/test/support/fixtures => system-tests}/projects/studio-no-source-maps/cypress.json (100%) rename {packages/server/test/support/fixtures => system-tests}/projects/studio-no-source-maps/cypress/integration/extend.spec.js (100%) rename {packages/server/test/support/fixtures => system-tests}/projects/studio-no-source-maps/cypress/integration/new.spec.js (100%) rename {packages/server/test/support/fixtures => system-tests}/projects/studio-no-source-maps/cypress/plugins/index.js (100%) rename {packages/server/test/support/fixtures => system-tests}/projects/studio-no-source-maps/index.html (100%) rename {packages/server/test/support/fixtures => system-tests}/projects/studio/cypress.json (100%) rename {packages/server/test/support/fixtures => system-tests}/projects/studio/cypress/integration/empty-comments.spec.js (100%) rename {packages/server/test/support/fixtures => system-tests}/projects/studio/cypress/integration/extend.spec.js (100%) rename {packages/server/test/support/fixtures => system-tests}/projects/studio/cypress/integration/external.spec.js (100%) rename {packages/server/test/support/fixtures => system-tests}/projects/studio/cypress/integration/new.spec.js (100%) rename {packages/server/test/support/fixtures => system-tests}/projects/studio/cypress/integration/unwritten.spec.js (100%) rename {packages/server/test/support/fixtures => system-tests}/projects/studio/cypress/integration/written.spec.js (100%) rename {packages/server/test/support/fixtures => system-tests}/projects/studio/cypress/support/external.js (100%) rename {packages/server/test/support/fixtures => system-tests}/projects/studio/cypress/support/index.js (100%) rename {packages/server/test/support/fixtures => system-tests}/projects/studio/index.html (100%) rename {packages/server/test/support/fixtures => system-tests}/projects/studio/new.html (100%) rename {packages/server/test/support/fixtures => system-tests}/projects/system-node/cypress.json (100%) create mode 100644 system-tests/projects/system-node/cypress/integration/spec.js rename {packages/server/test/support/fixtures => system-tests}/projects/system-node/cypress/plugins/index.js (100%) rename {packages/server/test/support/fixtures => system-tests}/projects/task-not-registered/cypress.json (100%) rename {packages/server/test/support/fixtures => system-tests}/projects/task-not-registered/cypress/integration/task_not_registered_spec.js (100%) rename {packages/server/test/support/fixtures => system-tests}/projects/todos/cypress.json (100%) rename {packages/server/test/support/fixtures => system-tests}/projects/todos/lib/my_coffee.coffee (100%) rename {packages/server/test/support/fixtures => system-tests}/projects/todos/tests/_fixtures/ascii.foo (100%) rename {packages/server/test/support/fixtures => system-tests}/projects/todos/tests/_fixtures/bad_coffee.coffee (100%) rename {packages/server/test/support/fixtures => system-tests}/projects/todos/tests/_fixtures/bad_js.js (100%) rename {packages/server/test/support/fixtures => system-tests}/projects/todos/tests/_fixtures/bad_json.json (100%) rename {packages/server/test/support/fixtures => system-tests}/projects/todos/tests/_fixtures/bar.js (100%) rename {packages/server/test/support/fixtures => system-tests}/projects/todos/tests/_fixtures/bar_coffee.coffee (100%) rename {packages/server/test/support/fixtures => system-tests}/projects/todos/tests/_fixtures/data.csv (100%) rename {packages/server/test/support/fixtures => system-tests}/projects/todos/tests/_fixtures/empty_objects.json (100%) rename {packages/server/test/support/fixtures => system-tests}/projects/todos/tests/_fixtures/example.zip (100%) rename {packages/server/test/support/fixtures => system-tests}/projects/todos/tests/_fixtures/foo.coffee (100%) rename {packages/server/test/support/fixtures => system-tests}/projects/todos/tests/_fixtures/foo.exe (100%) rename {packages/server/test/support/fixtures => system-tests}/projects/todos/tests/_fixtures/foo.js (100%) rename {packages/server/test/support/fixtures => system-tests}/projects/todos/tests/_fixtures/foo.json (100%) rename {packages/server/test/support/fixtures => system-tests}/projects/todos/tests/_fixtures/images/flower.png (100%) rename {packages/server/test/support/fixtures => system-tests}/projects/todos/tests/_fixtures/images/sample.jpg (100%) rename {packages/server/test/support/fixtures => system-tests}/projects/todos/tests/_fixtures/images/sample.tif (100%) rename {packages/server/test/support/fixtures => system-tests}/projects/todos/tests/_fixtures/images/word.gif (100%) rename {packages/server/test/support/fixtures => system-tests}/projects/todos/tests/_fixtures/index.html (100%) rename {packages/server/test/support/fixtures => system-tests}/projects/todos/tests/_fixtures/invalid.exe (100%) rename {packages/server/test/support/fixtures => system-tests}/projects/todos/tests/_fixtures/message.txt (100%) rename {packages/server/test/support/fixtures => system-tests}/projects/todos/tests/_fixtures/nested/fixture.js (100%) rename {packages/server/test/support/fixtures => system-tests}/projects/todos/tests/_fixtures/no_format.js (100%) rename {packages/server/test/support/fixtures => system-tests}/projects/todos/tests/_fixtures/no_format.json (100%) rename {packages/server/test/support/fixtures => system-tests}/projects/todos/tests/_fixtures/no_format_coffee.coffee (100%) rename {packages/server/test/support/fixtures => system-tests}/projects/todos/tests/_fixtures/trailing_new_line.html (100%) rename {packages/server/test/support/fixtures => system-tests}/projects/todos/tests/_fixtures/trailing_new_line.js (100%) rename {packages/server/test/support/fixtures => system-tests}/projects/todos/tests/_fixtures/trailing_new_line.json (100%) rename {packages/server/test/support/fixtures => system-tests}/projects/todos/tests/_fixtures/trailing_new_line.txt (100%) rename {packages/server/test/support/fixtures => system-tests}/projects/todos/tests/_fixtures/trailing_new_line_coffee.coffee (100%) rename {packages/server/test/support/fixtures => system-tests}/projects/todos/tests/_fixtures/unicode_escape.json (100%) rename {packages/server/test/support/fixtures => system-tests}/projects/todos/tests/_fixtures/unknown_ext.yaml (100%) rename {packages/server/test/support/fixtures => system-tests}/projects/todos/tests/_fixtures/user.js (100%) rename {packages/server/test/support/fixtures => system-tests}/projects/todos/tests/_fixtures/users.json (100%) rename {packages/server/test/support/fixtures => system-tests}/projects/todos/tests/_fixtures/valid_coffee_obj.coffee (100%) rename {packages/server/test/support/fixtures => system-tests}/projects/todos/tests/_fixtures/words.json (100%) rename {packages/server/test/support/fixtures => system-tests}/projects/todos/tests/_support/spec_helper.js (100%) rename {packages/server/test/support/fixtures => system-tests}/projects/todos/tests/etc/etc.js (100%) rename {packages/server/test/support/fixtures => system-tests}/projects/todos/tests/sub/a&b%c.js (100%) rename {packages/server/test/support/fixtures => system-tests}/projects/todos/tests/sub/sub_test.coffee (100%) rename {packages/server/test/support/fixtures => system-tests}/projects/todos/tests/test1.js (100%) rename {packages/server/test/support/fixtures => system-tests}/projects/todos/tests/test2.coffee (100%) rename {packages/server/test/support/fixtures => system-tests}/projects/todos/throws-error.js (100%) rename {packages/server/test/support/fixtures => system-tests}/projects/ts-installed/.gitignore (100%) create mode 100644 system-tests/projects/ts-installed/cypress.json rename {packages/server/test/support/fixtures => system-tests}/projects/ts-proj-custom-names/cypress.json (100%) rename {packages/server/test/support/fixtures => system-tests}/projects/ts-proj-custom-names/cypress/integration/app_spec.ts (100%) rename {packages/server/test/support/fixtures => system-tests}/projects/ts-proj-custom-names/cypress/integration/math.ts (100%) rename {packages/server/test/support/fixtures => system-tests}/projects/ts-proj-custom-names/cypress/plugins.ts (100%) rename {packages/server/test/support/fixtures => system-tests}/projects/ts-proj-custom-names/cypress/support.ts (100%) rename {packages/server/test/support/fixtures => system-tests}/projects/ts-proj-esmoduleinterop-true/cypress.json (100%) rename {packages/server/test/support/fixtures => system-tests}/projects/ts-proj-esmoduleinterop-true/cypress/integration/passing_spec.ts (100%) rename {packages/server/test/support/fixtures => system-tests}/projects/ts-proj-esmoduleinterop-true/cypress/plugins/commonjs-export.js (100%) rename {packages/server/test/support/fixtures => system-tests}/projects/ts-proj-esmoduleinterop-true/cypress/plugins/index.ts (100%) rename {packages/server/test/support/fixtures => system-tests}/projects/ts-proj-esmoduleinterop-true/tsconfig.json (100%) rename {packages/server/test/support/fixtures => system-tests}/projects/ts-proj-tsconfig-in-plugins/cypress.json (100%) rename packages/server/test/support/fixtures/projects/ts-proj-tsconfig-in-plugins/cypress/integration/passing_spec.ts => system-tests/projects/ts-proj-tsconfig-in-plugins/cypress/integration/passing_spec.js (100%) rename {packages/server/test/support/fixtures => system-tests}/projects/ts-proj-tsconfig-in-plugins/cypress/plugins/index.ts (100%) rename {packages/server/test/support/fixtures => system-tests}/projects/ts-proj-tsconfig-in-plugins/cypress/plugins/tsconfig.json (100%) rename {packages/server/test/support/fixtures => system-tests}/projects/ts-proj-with-module-esnext/cypress.json (100%) rename {packages/server/test/support/fixtures => system-tests}/projects/ts-proj-with-module-esnext/cypress/integration/uses_cy_task_in_ts_plugins_file_spec.js (100%) rename {packages/server/test/support/fixtures => system-tests}/projects/ts-proj-with-module-esnext/cypress/plugins/greeting.ts (100%) rename {packages/server/test/support/fixtures => system-tests}/projects/ts-proj-with-module-esnext/cypress/plugins/index.ts (100%) rename {packages/server/test/support/fixtures => system-tests}/projects/ts-proj-with-module-esnext/tsconfig.json (100%) rename {packages/server/test/support/fixtures => system-tests}/projects/ts-proj-with-paths/cypress.json (100%) rename {packages/server/test/support/fixtures => system-tests}/projects/ts-proj-with-paths/cypress/integration/app_spec.ts (100%) rename {packages/server/test/support/fixtures => system-tests}/projects/ts-proj-with-paths/cypress/plugins/index.ts (100%) rename {packages/server/test/support/fixtures => system-tests}/projects/ts-proj-with-paths/cypress/support/index.ts (100%) rename {packages/server/test/support/fixtures => system-tests}/projects/ts-proj-with-paths/src/main.ts (100%) rename {packages/server/test/support/fixtures => system-tests}/projects/ts-proj-with-paths/tsconfig.json (100%) rename {packages/server/test/support/fixtures => system-tests}/projects/ts-proj/cypress.json (100%) rename {packages/server/test/support/fixtures => system-tests}/projects/ts-proj/cypress/integration/app_spec.ts (100%) rename {packages/server/test/support/fixtures => system-tests}/projects/ts-proj/cypress/integration/math.ts (100%) rename {packages/server/test/support/fixtures => system-tests}/projects/ts-proj/cypress/plugins/commonjs-export-function.js (100%) rename {packages/server/test/support/fixtures => system-tests}/projects/ts-proj/cypress/plugins/index.ts (100%) rename {packages/server/test/support/fixtures => system-tests}/projects/ts-proj/cypress/support/commands.ts (100%) rename {packages/server/test/support/fixtures => system-tests}/projects/ts-proj/cypress/support/index.ts (100%) rename {packages/server/test/support/fixtures => system-tests}/projects/ts-proj/tsconfig.json (100%) rename {packages/server/test/support/fixtures => system-tests}/projects/uncaught-support-file/cypress.json (100%) rename {packages/server/test/support/fixtures => system-tests}/projects/uncaught-support-file/cypress/integration/spec.js (100%) rename {packages/server/test/support/fixtures => system-tests}/projects/uncaught-support-file/cypress/support/index.js (100%) rename {packages/server/test/support/fixtures => system-tests}/projects/utils.js (100%) rename {packages/server/test/support/fixtures => system-tests}/projects/various-file-types/cypress/integration/.gitkeep (100%) rename {packages/server/test/support/fixtures => system-tests}/projects/various-file-types/cypress/integration/coffee_spec.coffee (100%) rename {packages/server/test/support/fixtures => system-tests}/projects/various-file-types/cypress/integration/js_spec.js (100%) rename {packages/server/test/support/fixtures => system-tests}/projects/various-file-types/cypress/integration/ts_spec.ts (100%) rename {packages/server/test/support/fixtures => system-tests}/projects/webpack-preprocessor-awesome-typescript-loader/cypress.json (100%) rename {packages/server/test/support/fixtures => system-tests}/projects/webpack-preprocessor-awesome-typescript-loader/cypress/integration/failing_spec.ts (100%) rename {packages/server/test/support/fixtures => system-tests}/projects/webpack-preprocessor-awesome-typescript-loader/cypress/plugins/index.js (100%) rename {packages/server/test/support/fixtures => system-tests}/projects/webpack-preprocessor-awesome-typescript-loader/tsconfig.json (100%) rename {packages/server/test/support/fixtures => system-tests}/projects/webpack-preprocessor-ts-loader-compiler-options/cypress.json (100%) rename {packages/server/test/support/fixtures => system-tests}/projects/webpack-preprocessor-ts-loader-compiler-options/cypress/integration/failing_spec.ts (100%) rename {packages/server/test/support/fixtures => system-tests}/projects/webpack-preprocessor-ts-loader-compiler-options/cypress/plugins/index.js (100%) rename {packages/server/test/support/fixtures => system-tests}/projects/webpack-preprocessor-ts-loader-compiler-options/tsconfig.json (100%) rename {packages/server/test/support/fixtures => system-tests}/projects/webpack-preprocessor-ts-loader/cypress.json (100%) rename {packages/server/test/support/fixtures => system-tests}/projects/webpack-preprocessor-ts-loader/cypress/integration/failing_spec.ts (100%) rename {packages/server/test/support/fixtures => system-tests}/projects/webpack-preprocessor-ts-loader/cypress/plugins/index.js (100%) rename {packages/server/test/support/fixtures => system-tests}/projects/webpack-preprocessor-ts-loader/tsconfig.json (100%) rename {packages/server/test/support/fixtures => system-tests}/projects/webpack-preprocessor/cypress.json (100%) rename {packages/server/test/support/fixtures => system-tests}/projects/webpack-preprocessor/cypress/integration/failing_spec.js (100%) rename {packages/server/test/support/fixtures => system-tests}/projects/webpack-preprocessor/cypress/plugins/index.js (100%) rename {packages/server/test/support/fixtures => system-tests}/projects/working-preprocessor/cypress.json (100%) rename {packages/server/test/support/fixtures => system-tests}/projects/working-preprocessor/cypress/integration/another_spec.js (100%) rename {packages/server/test/support/fixtures => system-tests}/projects/working-preprocessor/cypress/integration/app_spec.js (100%) rename {packages/server/test/support/fixtures => system-tests}/projects/working-preprocessor/cypress/plugins/index.js (100%) rename {packages/server/test/support/fixtures => system-tests}/projects/yarn-v2-pnp/.gitignore (100%) rename {packages/server/test/support/fixtures => system-tests}/projects/yarn-v2-pnp/.yarnrc.yml (100%) create mode 100644 system-tests/projects/yarn-v2-pnp/cypress.json rename {packages/server/test/support/fixtures => system-tests}/projects/yarn-v2-pnp/cypress/integration/index.ts (100%) rename {packages/server/test/support/fixtures => system-tests}/projects/yarn-v2-pnp/cypress/plugins/index.ts (100%) rename {packages/server/test/support/fixtures => system-tests}/projects/yarn-v2-pnp/package.json (100%) rename {packages/server/test/support/fixtures => system-tests}/projects/yarn-v2-pnp/tsconfig.json (100%) rename {packages/server/test/support/fixtures => system-tests}/projects/yarn-v2-pnp/yarn-berry.cjs (100%) rename {packages/server/test/support/fixtures => system-tests}/projects/yarn-v2-pnp/yarn.lock (100%) create mode 100644 system-tests/scripts/.eslintrc.json create mode 100644 system-tests/scripts/run.js rename {packages/server/test/e2e => system-tests/test}/async_timeouts_spec.js (53%) rename {packages/server/test/e2e => system-tests/test}/base_url_spec.js (77%) rename {packages/server/test/e2e => system-tests/test}/before_browser_launch_spec.ts (71%) rename {packages/server/test/e2e => system-tests/test}/block_hosts_spec.js (84%) rename {packages/server/test/e2e => system-tests/test}/browser_path_spec.js (88%) rename {packages/server/test/e2e => system-tests/test}/busted_support_file_spec.js (57%) rename {packages/server/test/e2e => system-tests/test}/cache_spec.js (86%) rename {packages/server/test/e2e => system-tests/test}/caught_uncaught_hook_errors_spec.js (72%) rename {packages/server/test/e2e => system-tests/test}/cdp_spec.ts (78%) rename {packages/server/test/e2e => system-tests/test}/commands_outside_of_test_spec.js (60%) rename {packages/server/test/e2e => system-tests/test}/config_spec.js (80%) rename {packages/server/test/e2e => system-tests/test}/controllers_spec.js (84%) rename {packages/server/test/e2e => system-tests/test}/cookies_spec.ts (98%) rename {packages/server/test/e2e => system-tests/test}/deprecated_spec.ts (86%) rename {packages/server/test/e2e => system-tests/test}/domain_spec.js (72%) rename {packages/server/test/e2e => system-tests/test}/downloads_spec.ts (82%) rename {packages/server/test/e2e => system-tests/test}/error_ui_spec.ts (68%) rename {packages/server/test/e2e => system-tests/test}/es_modules_spec.js (62%) rename {packages/server/test/e2e => system-tests/test}/fetch_polyfill_spec.js (96%) rename {packages/server/test/e2e => system-tests/test}/firefox_spec.ts (87%) rename {packages/server/test/e2e => system-tests/test}/form_submissions_spec.js (87%) rename {packages/server/test/e2e => system-tests/test}/go_spec.js (83%) rename {packages/server/test/e2e => system-tests/test}/headless_spec.ts (80%) rename {packages/server/test/e2e => system-tests/test}/iframe_spec.js (92%) rename {packages/server/test/e2e => system-tests/test}/images_spec.js (71%) rename {packages/server/test/e2e => system-tests/test}/interception_spec.js (91%) rename {packages/server/test/e2e => system-tests/test}/issue_149_spec.js (68%) rename {packages/server/test/e2e => system-tests/test}/issue_1669_spec.js (67%) rename {packages/server/test/e2e => system-tests/test}/issue_173_spec.ts (63%) rename {packages/server/test/e2e => system-tests/test}/issue_2891_spec.js (64%) rename {packages/server/test/e2e => system-tests/test}/issue_5475_spec.js (51%) rename {packages/server/test/e2e => system-tests/test}/issue_6619.ts (69%) rename {packages/server/test/e2e => system-tests/test}/issue_674_spec.js (61%) rename {packages/server/test/e2e => system-tests/test}/issue_7217_spec.ts (79%) rename {packages/server/test/e2e => system-tests/test}/issue_7481.ts (63%) rename {packages/server/test/e2e => system-tests/test}/issue_8111_spec.js (65%) rename {packages/server/test/e2e => system-tests/test}/js_error_handling_spec.js (87%) rename {packages/server/test/e2e => system-tests/test}/max_listeners_spec.ts (84%) rename {packages/server/test/e2e => system-tests/test}/network_error_handling_spec.js (96%) rename {packages/server/test/e2e => system-tests/test}/new_project_spec.js (72%) rename {packages/server/test/e2e => system-tests/test}/no_superfluous_screenshots_spec.js (72%) rename {packages/server/test/e2e => system-tests/test}/non_proxied_spec.ts (60%) rename {packages/server/test/e2e => system-tests/test}/non_root_read_only_fs_spec.ts (82%) rename {packages/server/test/e2e => system-tests/test}/only_spec.js (52%) rename {packages/server/test/e2e => system-tests/test}/page_loading_spec.js (94%) rename {packages/server/test/e2e => system-tests/test}/plugin_run_events_spec.ts (67%) rename {packages/server/test/e2e => system-tests/test}/plugins_spec.js (87%) rename {packages/server/test/e2e => system-tests/test}/promises_spec.js (51%) rename {packages/server/test/e2e => system-tests/test}/proxying_spec.ts (62%) rename {packages/server/test/e2e => system-tests/test}/record_spec.js (95%) rename {packages/server/test/e2e => system-tests/test}/reporters_spec.js (89%) rename {packages/server/test/e2e => system-tests/test}/request_spec.ts (95%) rename {packages/server/test/e2e => system-tests/test}/retries_spec.ts (78%) rename {packages/server/test/e2e => system-tests/test}/return_value_spec.js (59%) rename {packages/server/test/e2e => system-tests/test}/run_ct_spec.js (51%) rename {packages/server/test/e2e => system-tests/test}/runnable_execution_spec.ts (70%) rename {packages/server/test/e2e => system-tests/test}/screenshot_element_capture_spec.js (77%) rename {packages/server/test/e2e => system-tests/test}/screenshot_fullpage_capture_spec.js (82%) rename {packages/server/test/e2e => system-tests/test}/screenshot_nested_file_spec.js (56%) rename {packages/server/test/e2e => system-tests/test}/screenshot_viewport_capture_spec.js (77%) rename {packages/server/test/e2e => system-tests/test}/screenshots_spec.js (88%) rename {packages/server/test/e2e => system-tests/test}/server_sent_events_spec.js (91%) rename {packages/server/test/e2e => system-tests/test}/session_spec.ts (97%) rename {packages/server/test/e2e => system-tests/test}/spec_isolation_spec.js (75%) rename {packages/server/test/e2e => system-tests/test}/specs_spec.js (76%) rename {packages/server/test/e2e => system-tests/test}/stdout_spec.js (78%) rename {packages/server/test/e2e => system-tests/test}/studio_spec.ts (74%) rename {packages/server/test/e2e => system-tests/test}/subdomain_spec.ts (96%) rename {packages/server/test/e2e => system-tests/test}/system_node_spec.js (85%) rename {packages/server/test/e2e => system-tests/test}/task_not_registered_spec.js (62%) rename {packages/server/test/e2e => system-tests/test}/task_spec.js (78%) rename {packages/server/test/e2e => system-tests/test}/testConfigOverrides_spec.ts (71%) rename {packages/server/test/e2e => system-tests/test}/typescript_plugins_spec.ts (76%) rename {packages/server/test/e2e => system-tests/test}/typescript_spec_support_spec.ts (72%) rename {packages/server/test/e2e => system-tests/test}/uncaught_spec_errors_spec.js (69%) rename {packages/server/test/e2e => system-tests/test}/uncaught_support_file_spec.js (65%) rename {packages/server/test/e2e => system-tests/test}/user_agent_spec.js (83%) rename {packages/server/test/e2e => system-tests/test}/video_compression_spec.js (92%) rename {packages/server/test/e2e => system-tests/test}/viewport_spec.js (61%) rename {packages/server/test/e2e => system-tests/test}/visit_spec.js (87%) rename {packages/server/test/e2e => system-tests/test}/web_security_spec.js (90%) rename {packages/server/test/e2e => system-tests/test}/websockets_spec.js (87%) rename {packages/server/test/e2e => system-tests/test}/window_open_spec.js (67%) rename {packages/server/test/e2e => system-tests/test}/xhr_spec.js (79%) rename {packages/server/test/e2e => system-tests/test}/yarn_v2_pnp_spec.ts (80%) diff --git a/.eslintignore b/.eslintignore index 907b3c5f0ac8..84a4d0703801 100644 --- a/.eslintignore +++ b/.eslintignore @@ -14,6 +14,21 @@ **/support/fixtures/projects/**/static/* **/support/fixtures/projects/**/*.jsx **/support/fixtures/projects/**/fail.js + +system-tests/fixtures/* +!system-tests/projects +system-tests/projects/**/_fixtures/* +system-tests/projects/**/static/* +system-tests/projects/**/*.jsx +system-tests/projects/**/fail.js +system-tests/lib/scaffold/plugins/index.js +system-tests/lib/scaffold/support/index.js +system-tests/lib/scaffold/support/commands.js +system-tests/test/support/projects/e2e/cypress/ +system-tests/projects/e2e/cypress/integration/stdout_exit_early_failing_spec.js +system-tests/projects/e2e/cypress/integration/typescript_syntax_error_spec.ts + + **/test/fixtures **/vendor @@ -23,11 +38,7 @@ cli/types packages/example packages/extension/test/helpers/background.js -packages/server/lib/scaffold/plugins/index.js -packages/server/lib/scaffold/support/index.js -packages/server/lib/scaffold/support/commands.js -packages/server/test/support/fixtures/projects/e2e/cypress/integration/stdout_exit_early_failing_spec.js -packages/server/test/support/fixtures/projects/e2e/cypress/integration/typescript_syntax_error_spec.ts +integration/stdout_exit_early_failing_spec.js npm/webpack-preprocessor/cypress/tests/e2e/compile-error.js npm/webpack-preprocessor/examples/use-babelrc/cypress/integration/spec.js diff --git a/.gitignore b/.gitignore index 1117ea700d77..bcf831bbbf04 100644 --- a/.gitignore +++ b/.gitignore @@ -40,6 +40,10 @@ packages/server/support packages/server/test/support/fixtures/server/imgs packages/server/test/support/fixtures/server/libs +# from system-tests +system-tests/.projects +system-tests/fixtures/large-img + # from npm/react /npm/react/bin/* /npm/react/cypress/videos diff --git a/.vscode/terminals.json b/.vscode/terminals.json index bb5b56b9f05e..27f9a82ccf57 100644 --- a/.vscode/terminals.json +++ b/.vscode/terminals.json @@ -24,12 +24,20 @@ "command": "yarn cypress:run --project ../project" }, { - "name": "packages/server test-e2e", + "name": "cypress open (CT)", + "focus": true, + "onlySingle": true, + "execute": true, + "cwd": "[cwd]/packages/server-ct", + "command": "yarn cypress:open" + }, + { + "name": "system-tests test", "focus": true, "onlySingle": true, "execute": false, - "cwd": "[cwd]/packages/server", - "command": "yarn test-e2e [fileBasename]" + "cwd": "[cwd]/system-tests", + "command": "yarn test [fileBasename]" }, { "name": "packages/server test-watch", diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index fb3e31bdb00d..4431772b6d2d 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -396,6 +396,7 @@ By default, top level tasks will execute for all packages. However, most scripts | `test-unit` | Run unit tests | | `test-integration` | Run integration tests | | `test-e2e` | Run end-to-end tests | +| `test-system` | Run system tests | | `test-watch` | Run unit tests and rebuild/rerun on file changes | > Most of the time you will only want to run a task within a specific package; this can be done by providing the package name as a scope to the top level task. @@ -428,7 +429,6 @@ Each package is responsible for building itself and testing itself and can do so | `test` | Runs all tests once (this usually means running unit tests; via `yarn test-unit`) | | `test-unit` | Run all unit tests within the package; `exit 0` if N/A | | `test-integration` | Run all integration tests within the package; `exit 0` if N/A | -| `test-e2e` | Run all e2e tests within the package; `exit 0` if N/A | | `test-watch` | Run all unit tests in the package in watch mode | #### Debugging @@ -486,11 +486,11 @@ This is to ensure that links do not go dead in older versions of Cypress when th For most packages there are typically unit and integration tests. -Our true e2e tests are in [`packages/server`](packages/server), which test the full stack all together. +Please refer to each packages' `README.md` which documents how to run tests. It is not feasible to try to run all of the tests together. We run our entire test fleet across over a dozen containers in CI. -Additionally, we test the code by running it against various other example projects in CI. See CI badges and links at the top of this document. +There are also a set of system tests in [`system-tests`](system-tests) which attempt to test the entire Cypress App as close to real world as possible. See the [`README`](system-tests/README.md) for more information. -Please refer to each packages' `README.md` which documents how to run tests. It is not feasible to try to run all of the tests together. We run our entire test fleet across over a dozen containers in CI. +Additionally, we test the code by running it against various other example projects in CI. See CI badges and links at the top of this document. If you're curious how we manage all of these tests in CI check out our [`circle.yml`](circle.yml) file found in the root `cypress` directory. diff --git a/circle.yml b/circle.yml index 300659ceaa5a..4de0c815fc6a 100644 --- a/circle.yml +++ b/circle.yml @@ -112,6 +112,7 @@ commands: mkdir -p /tmp/node_modules_cache mv ~/cypress/node_modules /tmp/node_modules_cache/root_node_modules mv ~/cypress/cli/node_modules /tmp/node_modules_cache/cli_node_modules + mv ~/cypress/system-tests/node_modules /tmp/node_modules_cache/system-tests_node_modules mv ~/cypress/globbed_node_modules /tmp/node_modules_cache/globbed_node_modules build-and-persist: @@ -142,6 +143,7 @@ commands: if [[ -d "/tmp/node_modules_cache" ]]; then mv /tmp/node_modules_cache/root_node_modules ~/cypress/node_modules mv /tmp/node_modules_cache/cli_node_modules ~/cypress/cli/node_modules + mv /tmp/node_modules_cache/system-tests_node_modules ~/cypress/system-tests/node_modules mv /tmp/node_modules_cache/globbed_node_modules ~/cypress/globbed_node_modules rm -rf /tmp/node_modules_cache fi @@ -194,6 +196,7 @@ commands: paths: - node_modules - cli/node_modules + - system-tests/node_modules - globbed_node_modules - unless: condition: <> @@ -417,7 +420,7 @@ commands: path: ./packages/runner-ct/cypress/videos - store-npm-logs - run-e2e-tests: + run-system-tests: parameters: browser: description: browser shortname to target @@ -425,8 +428,9 @@ commands: steps: - restore_cached_workspace - run: + name: Run system tests command: | - ALL_SPECS=`circleci tests glob "/root/cypress/packages/server/test/e2e/*spec*"` + ALL_SPECS=`circleci tests glob "/root/cypress/system-tests/test/*spec*"` SPECS= for file in $ALL_SPECS; do # filter out non_root tests, they have their own stage @@ -438,7 +442,7 @@ commands: done SPECS=`echo $SPECS | xargs -n 1 | circleci tests split --split-by=timings` echo SPECS=$SPECS - yarn workspace @packages/server test $SPECS --browser <> + yarn workspace @tooling/system-tests test:ci $SPECS --browser <> - verify-mocha-results - store_test_results: path: /tmp/cypress @@ -1080,37 +1084,37 @@ jobs: path: /tmp/artifacts - store-npm-logs - server-e2e-tests-chrome: + system-tests-chrome: <<: *defaults resource_class: medium parallelism: 8 steps: - - run-e2e-tests: + - run-system-tests: browser: chrome - server-e2e-tests-electron: + system-tests-electron: <<: *defaults resource_class: medium parallelism: 8 steps: - - run-e2e-tests: + - run-system-tests: browser: electron - server-e2e-tests-firefox: + system-tests-firefox: <<: *defaults resource_class: medium parallelism: 8 steps: - - run-e2e-tests: + - run-system-tests: browser: firefox - server-e2e-tests-non-root: + system-tests-non-root: <<: *defaults resource_class: medium steps: - restore_cached_workspace - run: - command: yarn workspace @packages/server test ./test/e2e/non_root*spec* --browser electron + command: yarn workspace @tooling/system-tests test:ci "test/non_root*spec*" --browser electron - verify-mocha-results - store_test_results: path: /tmp/cypress @@ -2007,16 +2011,16 @@ linux-workflow: &linux-workflow - server-performance-tests: requires: - build - - server-e2e-tests-chrome: + - system-tests-chrome: requires: - build - - server-e2e-tests-electron: + - system-tests-electron: requires: - build - - server-e2e-tests-firefox: + - system-tests-firefox: requires: - build - - server-e2e-tests-non-root: + - system-tests-non-root: executor: non-root-docker-user requires: - build @@ -2123,10 +2127,10 @@ linux-workflow: &linux-workflow - driver-integration-tests-firefox - driver-integration-tests-chrome - driver-integration-tests-electron - - server-e2e-tests-non-root - - server-e2e-tests-firefox - - server-e2e-tests-electron - - server-e2e-tests-chrome + - system-tests-non-root + - system-tests-firefox + - system-tests-electron + - system-tests-chrome - server-performance-tests - server-integration-tests - server-unit-tests diff --git a/lerna.json b/lerna.json index e0eaa3cfb9ae..e541ef2d7385 100644 --- a/lerna.json +++ b/lerna.json @@ -3,7 +3,8 @@ "packages": [ "cli", "packages/*", - "npm/*" + "npm/*", + "system-tests" ], "useWorkspaces": true, "version": "0.0.0" diff --git a/npm/webpack-preprocessor/index.ts b/npm/webpack-preprocessor/index.ts index 88e3a51a17c9..c5d68fd3e977 100644 --- a/npm/webpack-preprocessor/index.ts +++ b/npm/webpack-preprocessor/index.ts @@ -268,6 +268,11 @@ const preprocessor: WebpackPreprocessor = (options: PreprocessorOptions = {}): F const jsonStats = stats.toJson() + // these stats are really only useful for debugging + if (jsonStats.warnings.length > 0) { + debug(`warnings for ${outputPath} %o`, jsonStats.warnings) + } + if (stats.hasErrors()) { err = new Error('Webpack Compilation Error') @@ -279,17 +284,11 @@ const preprocessor: WebpackPreprocessor = (options: PreprocessorOptions = {}): F err.message += `\n${errorsToAppend}` - debug('stats had error(s)') + debug('stats had error(s) %o', jsonStats.errors) return rejectWithErr(err) } - // these stats are really only useful for debugging - if (jsonStats.warnings.length > 0) { - debug(`warnings for ${outputPath}`) - debug(jsonStats.warnings) - } - debug('finished bundling', outputPath) if (debugStats.enabled) { /* eslint-disable-next-line no-console */ diff --git a/npm/webpack-preprocessor/test/e2e/helpers.js b/npm/webpack-preprocessor/test/e2e/helpers.js index c7821acc0d09..0e6581f6c414 100644 --- a/npm/webpack-preprocessor/test/e2e/helpers.js +++ b/npm/webpack-preprocessor/test/e2e/helpers.js @@ -83,7 +83,7 @@ exports.runTest = async (options = {}) => { VIDEO_COMPRESSION_THROTTLE: 120000, // don't fail our own tests running from forked PR's - CYPRESS_INTERNAL_E2E_TESTS: '1', + CYPRESS_INTERNAL_SYSTEM_TESTS: '1', CYPRESS_ENV: 'test', }) diff --git a/package.json b/package.json index 0fcec7af6491..9b9045505a5f 100644 --- a/package.json +++ b/package.json @@ -49,12 +49,12 @@ "test": "yarn lerna exec yarn test --scope cypress --scope \"'@packages/{electron,extension,https-proxy,launcher,net-stubbing,network,proxy,rewriter,runner,runner-shared,socket}'\"", "test-debug": "lerna exec yarn test-debug --ignore \"'@packages/{desktop-gui,driver,root,static,web-config}'\"", "pretest-e2e": "yarn ensure-deps", - "test-e2e": "lerna exec yarn test-e2e --ignore \"'@packages/{desktop-gui,driver,root,static,web-config}'\"", "test-integration": "lerna exec yarn test-integration --ignore \"'@packages/{desktop-gui,driver,root,static,web-config}'\"", "test-mocha": "mocha --reporter spec scripts/spec.js", "test-mocha-snapshot": "mocha scripts/mocha-snapshot-spec.js", "test-npm-package-release-script": "npx lerna exec --scope \"@cypress/*\" -- npx --no-install semantic-release --dry-run", "test-s3-api": "node -r ./packages/ts/register scripts/binary/s3-api-demo.ts", + "test-system": "yarn workspace @tooling/system-tests test", "test-scripts": "mocha -r packages/ts/register --reporter spec 'scripts/unit/**/*spec.js'", "test-scripts-watch": "yarn test-scripts --watch --watch-extensions 'ts,js'", "pretest-unit": "yarn ensure-deps", @@ -224,7 +224,8 @@ "packages": [ "cli", "packages/*", - "npm/*" + "npm/*", + "system-tests" ], "nohoist": [ "**/@ffmpeg-installer", diff --git a/packages/runner/cypress/fixtures/errors/exceptions_spec.js b/packages/runner/cypress/fixtures/errors/exceptions_spec.js index ec61175d6b1c..605c9a5091f8 100644 --- a/packages/runner/cypress/fixtures/errors/exceptions_spec.js +++ b/packages/runner/cypress/fixtures/errors/exceptions_spec.js @@ -1,6 +1,6 @@ import './setup' -const outsideError = require('../../../../server/test/support/fixtures/projects/todos/throws-error') +const outsideError = require('@tooling/system-tests/projects/todos/throws-error') describe('exception failures', () => { it('in spec file', () => { diff --git a/packages/server/README.md b/packages/server/README.md index 286f09925b1f..85c879d19829 100644 --- a/packages/server/README.md +++ b/packages/server/README.md @@ -39,7 +39,6 @@ yarn workspace @packages/server build-prod * `yarn test-unit` executes unit tests in [`test/unit`](./test/unit) * `yarn test-integration` executes integration tests in [`test/integration`](./test/integration) * `yarn test-performance` executes performance tests in [`test/performance`](./test/performance) -* `yarn test-e2e` executes the large (slow) end to end tests in [`test/e2e`](./test/e2e) You can also use the `test-watch` command to rerun a test file whenever there is a change: @@ -47,8 +46,6 @@ You can also use the `test-watch` command to rerun a test file whenever there is yarn test-watch /test/path/to/spec.js ``` -When running e2e tests, some test projects output verbose logs. To see them run the test with `DEBUG=cypress:e2e` environment variable. - ### Running individual unit tests ```bashtest-kitchensink @@ -67,19 +64,9 @@ yarn test test/integration/cli_spec.js yarn test-integration cli_spec ## shorthand, uses globbing to find spec ``` -### Running individual e2e tests +### Running e2e/system tests -```bash -yarn test -yarn test test/e2e/1_async_timeouts_spec.js -## or -yarn test-e2e async_timeouts ## shorthand, uses globbing to find spec -``` - -To keep the browser open after a spec run (for easier debugging and iterating on specs), you can pass the `--no-exit` flag to the e2e test command. Live reloading due to spec changes should also work: -```sh -yarn test test/e2e/go_spec.js --browser chrome --no-exit -``` +> With the addition of Component Testing, `e2e` tests have been renamed to `system-tests` and moved to the [`system-tests`](../../system-tests) directory. ### Updating snaphots @@ -88,5 +75,4 @@ Prepend `SNAPSHOT_UPDATE=1` to any test command. See [`snap-shot-it` instruction ```bash SNAPSHOT_UPDATE=1 yarn test test/unit/api_spec.js SNAPSHOT_UPDATE=1 yarn test test/integration/cli_spec.js -SNAPSHOT_UPDATE=1 yarn test-e2e async_timeout ``` diff --git a/packages/server/lib/modes/record.js b/packages/server/lib/modes/record.js index cf38fe303ff0..7fae7dd0dcf9 100644 --- a/packages/server/lib/modes/record.js +++ b/packages/server/lib/modes/record.js @@ -32,7 +32,7 @@ const logException = (err) => { // dont yell about any errors either const runningInternalTests = () => { - return env.get('CYPRESS_INTERNAL_E2E_TESTS') === '1' + return env.get('CYPRESS_INTERNAL_SYSTEM_TESTS') === '1' } const haveProjectIdAndKeyButNoRecordOption = (projectId, options) => { diff --git a/packages/server/lib/repl.js b/packages/server/lib/repl.js deleted file mode 100644 index 9ad0e26ea63c..000000000000 --- a/packages/server/lib/repl.js +++ /dev/null @@ -1,54 +0,0 @@ -require('./environment') - -const _ = require('lodash') -const path = require('path') -const repl = require('repl') -const history = require('repl.history') -const browsers = require('./browsers') -const Fixtures = require('../test/support/helpers/fixtures') - -const replServer = repl.start({ - prompt: '> ', -}) - -let setContext - -// preserve the repl history -history(replServer, path.join(process.env.HOME, '.node_history')) - -const req = replServer.context.require - -const getObj = function () { - const deploy = require('../deploy') - - return { - lodash: _, - deploy, - darwin: deploy.getPlatform('darwin'), - linux: deploy.getPlatform('linux'), - Fixtures, - browsers, - - reload () { - let key - - for (key in require.cache) { - delete require.cache[key] - } - - for (key in req.cache) { - delete req.cache[key] - } - - return setContext() - }, - - r (file) { - return require(file) - }, - } -}; - -(setContext = () => { - return _.extend(replServer.context, getObj()) -})() diff --git a/packages/server/package.json b/packages/server/package.json index 9988d819ff7b..2e9b5cd098a8 100644 --- a/packages/server/package.json +++ b/packages/server/package.json @@ -13,7 +13,6 @@ "repl": "node repl.js", "start": "node ../../scripts/cypress open --dev --global", "test": "node ./test/scripts/run.js", - "test-e2e": "node ./test/scripts/run.js --glob-in-dir=test/e2e", "test-integration": "node ./test/scripts/run.js --glob-in-dir=test/integration", "test-performance": "node ./test/scripts/run.js --glob-in-dir=test/performance", "test-unit": "node ./test/scripts/run.js --glob-in-dir=test/unit", @@ -143,6 +142,7 @@ "@packages/root": "0.0.0-development", "@packages/socket": "0.0.0-development", "@packages/ts": "0.0.0-development", + "@tooling/system-tests": "0.0.0-development", "@types/chai-as-promised": "7.1.2", "@types/chrome": "0.0.101", "@types/http-proxy": "1.17.4", diff --git a/packages/server/repl.js b/packages/server/repl.js deleted file mode 100644 index b7233d76d87f..000000000000 --- a/packages/server/repl.js +++ /dev/null @@ -1,2 +0,0 @@ -require('@packages/ts/register') -require('./lib/repl') diff --git a/packages/server/test/integration/cypress_spec.js b/packages/server/test/integration/cypress_spec.js index c618ff5f8ee4..7a4d14fff8e6 100644 --- a/packages/server/test/integration/cypress_spec.js +++ b/packages/server/test/integration/cypress_spec.js @@ -9,7 +9,7 @@ const http = require('http') const Promise = require('bluebird') const electron = require('electron') const commitInfo = require('@cypress/commit-info') -const Fixtures = require('../support/helpers/fixtures') +const Fixtures = require('@tooling/system-tests/lib/fixtures') const snapshot = require('snap-shot-it') const stripAnsi = require('strip-ansi') const debug = require('debug')('test') diff --git a/packages/server/test/integration/http_requests_spec.js b/packages/server/test/integration/http_requests_spec.js index 96a4de7a4441..996aef1b44d8 100644 --- a/packages/server/test/integration/http_requests_spec.js +++ b/packages/server/test/integration/http_requests_spec.js @@ -30,7 +30,7 @@ const resolve = require(`${root}lib/util/resolve`) const { fs } = require(`${root}lib/util/fs`) const glob = require(`${root}lib/util/glob`) const CacheBuster = require(`${root}lib/util/cache_buster`) -const Fixtures = require(`${root}test/support/helpers/fixtures`) +const Fixtures = require('@tooling/system-tests/lib/fixtures') /** * @type {import('@packages/resolve-dist')} */ diff --git a/packages/server/test/integration/plugins_spec.js b/packages/server/test/integration/plugins_spec.js index b32418a05823..a15d4fd17e27 100644 --- a/packages/server/test/integration/plugins_spec.js +++ b/packages/server/test/integration/plugins_spec.js @@ -1,7 +1,7 @@ require('../spec_helper') const plugins = require('../../lib/plugins') -const Fixtures = require('../support/helpers/fixtures') +const Fixtures = require('@tooling/system-tests/lib/fixtures') const pluginsFile = Fixtures.projectPath('plugin-before-browser-launch-deprecation/cypress/plugins/index.js') diff --git a/packages/server/test/integration/server_spec.js b/packages/server/test/integration/server_spec.js index 9cad9400ec89..a495d8c9b8a5 100644 --- a/packages/server/test/integration/server_spec.js +++ b/packages/server/test/integration/server_spec.js @@ -10,7 +10,7 @@ const config = require(`${root}lib/config`) const { ServerE2E } = require(`${root}lib/server-e2e`) const { SocketE2E } = require(`${root}lib/socket-e2e`) const { SpecsStore } = require(`${root}/lib/specs-store`) -const Fixtures = require(`${root}test/support/helpers/fixtures`) +const Fixtures = require('@tooling/system-tests/lib/fixtures') const { createRoutes } = require(`${root}lib/routes`) const s3StaticHtmlUrl = 'https://s3.amazonaws.com/internal-test-runner-assets.cypress.io/index.html' diff --git a/packages/server/test/integration/websockets_spec.js b/packages/server/test/integration/websockets_spec.js index 915ac4c9de58..645cf1a04559 100644 --- a/packages/server/test/integration/websockets_spec.js +++ b/packages/server/test/integration/websockets_spec.js @@ -12,7 +12,7 @@ const { ServerE2E } = require(`${root}lib/server-e2e`) const { SocketE2E } = require(`${root}lib/socket-e2e`) const { SpecsStore } = require(`${root}/lib/specs-store`) const { Automation } = require(`${root}lib/automation`) -const Fixtures = require(`${root}/test/support/helpers/fixtures`) +const Fixtures = require('@tooling/system-tests/lib/fixtures') const { createRoutes } = require(`${root}lib/routes`) const cyPort = 12345 diff --git a/packages/server/test/performance/cy_visit_performance_spec.js b/packages/server/test/performance/cy_visit_performance_spec.js index b57342092284..8d6c2c620d1a 100644 --- a/packages/server/test/performance/cy_visit_performance_spec.js +++ b/packages/server/test/performance/cy_visit_performance_spec.js @@ -1,10 +1,10 @@ -const e2e = require('../support/helpers/e2e').default +const systemTests = require('@tooling/system-tests/lib/system-tests').default // https://github.com/cypress-io/cypress/issues/4313 context('cy.visit performance tests', function () { this.retries(3) - e2e.setup({ + systemTests.setup({ servers: { port: 3434, onServer (app) { @@ -27,7 +27,7 @@ context('cy.visit performance tests', function () { return stdout.replace(/^\d+%\s+of visits to [^\s]+ finished in less than.*$/gm, 'histogram line') } - e2e.it('passes', { + systemTests.it('passes', { onStdout, spec: 'fast_visit_spec.js', snapshot: true, diff --git a/packages/server/test/performance/proxy_performance_spec.js b/packages/server/test/performance/proxy_performance_spec.js index 9762623d9bed..6a281b2a8e69 100644 --- a/packages/server/test/performance/proxy_performance_spec.js +++ b/packages/server/test/performance/proxy_performance_spec.js @@ -9,7 +9,7 @@ const { expect } = require('chai') const debug = require('debug')('test:proxy-performance') const DebuggingProxy = require('@cypress/debugging-proxy') const HarCapturer = require('chrome-har-capturer') -const performance = require('../support/helpers/performance') +const performance = require('@tooling/system-tests/lib/performance') const Promise = require('bluebird') const sanitizeFilename = require('sanitize-filename') const { createRoutes } = require(`${root}lib/routes`) diff --git a/packages/server/test/support/fixtures/projects/system-node/cypress/integration/spec.js b/packages/server/test/support/fixtures/projects/system-node/cypress/integration/spec.js deleted file mode 100644 index 26153f9bffc8..000000000000 --- a/packages/server/test/support/fixtures/projects/system-node/cypress/integration/spec.js +++ /dev/null @@ -1,5 +0,0 @@ -it('has expected resolvedNodePath and resolvedNodeVersion', () => { - expect(Cypress.config('nodeVersion')).to.eq('system') - expect(Cypress.config('resolvedNodePath')).to.eq(Cypress.env('expectedNodePath')) - expect(Cypress.config('resolvedNodeVersion')).to.eq(Cypress.env('expectedNodeVersion')) -}) diff --git a/packages/server/test/support/helpers/gzip.js b/packages/server/test/support/helpers/gzip.js deleted file mode 100644 index 9fd00af03462..000000000000 --- a/packages/server/test/support/helpers/gzip.js +++ /dev/null @@ -1,15 +0,0 @@ -const fs = require('fs') -const zlib = require('zlib') -const path = require('path') - -const src = path.join('test/support/fixtures/projects/e2e/static/FiraSans-Regular.woff') -const dest = path.join('test/support/fixtures/projects/e2e/static/FiraSans-Regular.woff.gz') - -fs.readFile(src, (err, buf) => { - zlib.gzip(buf, (err, zipped) => { - console.log(dest) - fs.writeFile(dest, zipped, (err, bytes) => { - console.log(err, bytes) - }) - }) -}) diff --git a/packages/server/test/unit/cache_spec.js b/packages/server/test/unit/cache_spec.js index b445df08dc85..8372b89770bf 100644 --- a/packages/server/test/unit/cache_spec.js +++ b/packages/server/test/unit/cache_spec.js @@ -4,7 +4,7 @@ require(`${root}lib/cwd`) const Promise = require('bluebird') const cache = require(`${root}lib/cache`) const { fs } = require(`${root}lib/util/fs`) -const Fixtures = require('../support/helpers/fixtures') +const Fixtures = require('@tooling/system-tests/lib/fixtures') describe('lib/cache', () => { beforeEach(() => { diff --git a/packages/server/test/unit/config_spec.js b/packages/server/test/unit/config_spec.js index 0d35983df67d..8a712138ffd8 100644 --- a/packages/server/test/unit/config_spec.js +++ b/packages/server/test/unit/config_spec.js @@ -1,7 +1,6 @@ require('../spec_helper') const _ = require('lodash') -const path = require('path') const R = require('ramda') const debug = require('debug')('test') const config = require(`${root}lib/config`) @@ -9,6 +8,7 @@ const errors = require(`${root}lib/errors`) const configUtil = require(`${root}lib/util/config`) const findSystemNode = require(`${root}lib/util/find_system_node`) const scaffold = require(`${root}lib/scaffold`) +const Fixtures = require('@tooling/system-tests/lib/fixtures') let settings = require(`${root}lib/util/settings`) describe('lib/config', () => { @@ -16,6 +16,8 @@ describe('lib/config', () => { this.env = process.env process.env = _.omit(process.env, 'CYPRESS_DEBUG') + + Fixtures.scaffold() }) afterEach(function () { @@ -2037,7 +2039,7 @@ describe('lib/config', () => { }) it('sets the supportFile to default index.js if it does not exist, support folder does not exist, and supportFile is the default', () => { - const projectRoot = path.join(process.cwd(), 'test/support/fixtures/projects/no-scaffolding') + const projectRoot = Fixtures.projectPath('no-scaffolding') const obj = config.setAbsolutePaths({ projectRoot, @@ -2055,7 +2057,7 @@ describe('lib/config', () => { }) it('sets the supportFile to false if it does not exist, support folder exists, and supportFile is the default', () => { - const projectRoot = path.join(process.cwd(), 'test/support/fixtures/projects/empty-folders') + const projectRoot = Fixtures.projectPath('empty-folders') const obj = config.setAbsolutePaths({ projectRoot, @@ -2086,7 +2088,7 @@ describe('lib/config', () => { }) it('sets the supportFile to index.ts if it exists (without ts require hook)', () => { - const projectRoot = path.join(process.cwd(), 'test/support/fixtures/projects/ts-proj') + const projectRoot = Fixtures.projectPath('ts-proj') const supportFolder = `${projectRoot}/cypress/support` const supportFilename = `${supportFolder}/index.ts` @@ -2113,7 +2115,7 @@ describe('lib/config', () => { }) it('uses custom TS supportFile if it exists (without ts require hook)', () => { - const projectRoot = path.join(process.cwd(), 'test/support/fixtures/projects/ts-proj-custom-names') + const projectRoot = Fixtures.projectPath('ts-proj-custom-names') const supportFolder = `${projectRoot}/cypress` const supportFilename = `${supportFolder}/support.ts` @@ -2153,7 +2155,7 @@ describe('lib/config', () => { }) it('sets the pluginsFile to default index.js if does not exist', () => { - const projectRoot = path.join(process.cwd(), 'test/support/fixtures/projects/no-scaffolding') + const projectRoot = Fixtures.projectPath('no-scaffolding') const obj = { projectRoot, @@ -2170,7 +2172,7 @@ describe('lib/config', () => { }) it('sets the pluginsFile to index.ts if it exists', () => { - const projectRoot = path.join(process.cwd(), 'test/support/fixtures/projects/ts-proj-with-module-esnext') + const projectRoot = Fixtures.projectPath('ts-proj-with-module-esnext') const obj = { projectRoot, @@ -2187,7 +2189,7 @@ describe('lib/config', () => { }) it('sets the pluginsFile to index.ts if it exists (without ts require hook)', () => { - const projectRoot = path.join(process.cwd(), 'test/support/fixtures/projects/ts-proj-with-module-esnext') + const projectRoot = Fixtures.projectPath('ts-proj-with-module-esnext') const pluginsFolder = `${projectRoot}/cypress/plugins` const pluginsFilename = `${pluginsFolder}/index.ts` @@ -2211,7 +2213,7 @@ describe('lib/config', () => { }) it('set the pluginsFile to false if it does not exist, plugins folder exists, and pluginsFile is the default', () => { - const projectRoot = path.join(process.cwd(), 'test/support/fixtures/projects/empty-folders') + const projectRoot = Fixtures.projectPath('empty-folders') const obj = config.setAbsolutePaths({ projectRoot, @@ -2242,7 +2244,7 @@ describe('lib/config', () => { }) it('uses custom TS pluginsFile if it exists (without ts require hook)', () => { - const projectRoot = path.join(process.cwd(), 'test/support/fixtures/projects/ts-proj-custom-names') + const projectRoot = Fixtures.projectPath('ts-proj-custom-names') const pluginsFolder = `${projectRoot}/cypress` const pluginsFile = `${pluginsFolder}/plugins.ts` diff --git a/packages/server/test/unit/files_spec.js b/packages/server/test/unit/files_spec.js index de0a37dc69fc..7361badf75c8 100644 --- a/packages/server/test/unit/files_spec.js +++ b/packages/server/test/unit/files_spec.js @@ -2,7 +2,7 @@ require('../spec_helper') const config = require(`${root}lib/config`) const files = require(`${root}lib/files`) -const FixturesHelper = require(`${root}/test/support/helpers/fixtures`) +const FixturesHelper = require('@tooling/system-tests/lib/fixtures') describe('lib/files', () => { beforeEach(function () { diff --git a/packages/server/test/unit/fixture_spec.js b/packages/server/test/unit/fixture_spec.js index 3385534fd7ba..9046a19f395c 100644 --- a/packages/server/test/unit/fixture_spec.js +++ b/packages/server/test/unit/fixture_spec.js @@ -5,7 +5,7 @@ const Promise = require('bluebird') const config = require(`${root}lib/config`) const fixture = require(`${root}lib/fixture`) const { fs } = require(`${root}lib/util/fs`) -const FixturesHelper = require(`${root}/test/support/helpers/fixtures`) +const FixturesHelper = require('@tooling/system-tests/lib/fixtures') const os = require('os') const eol = require('eol') diff --git a/packages/server/test/unit/open_project_spec.js b/packages/server/test/unit/open_project_spec.js index 75671d1f2025..64c69f1d8d95 100644 --- a/packages/server/test/unit/open_project_spec.js +++ b/packages/server/test/unit/open_project_spec.js @@ -8,7 +8,7 @@ const ProjectBase = require(`${root}lib/project-base`).ProjectBase const { openProject } = require('../../lib/open_project') const preprocessor = require(`${root}lib/plugins/preprocessor`) const runEvents = require(`${root}lib/plugins/run_events`) -const Fixtures = require('../test/../support/helpers/fixtures') +const Fixtures = require('@tooling/system-tests/lib/fixtures') const todosPath = Fixtures.projectPath('todos') diff --git a/packages/server/test/unit/plugins/child/run_plugins_spec.js b/packages/server/test/unit/plugins/child/run_plugins_spec.js index 6323777f78ba..dbb7f91cdf5c 100644 --- a/packages/server/test/unit/plugins/child/run_plugins_spec.js +++ b/packages/server/test/unit/plugins/child/run_plugins_spec.js @@ -9,7 +9,7 @@ const task = require(`${root}../../lib/plugins/child/task`) const util = require(`${root}../../lib/plugins/util`) const resolve = require(`${root}../../lib/util/resolve`) const browserUtils = require(`${root}../../lib/browsers/utils`) -const Fixtures = require(`${root}../../test/support/helpers/fixtures`) +const Fixtures = require('@tooling/system-tests/lib/fixtures') const tsNodeUtil = require(`${root}../../lib/util/ts_node`) const runPlugins = require(`${root}../../lib/plugins/child/run_plugins`) diff --git a/packages/server/test/unit/plugins/preprocessor_spec.js b/packages/server/test/unit/plugins/preprocessor_spec.js index 56098fda8976..c34697e577b1 100644 --- a/packages/server/test/unit/plugins/preprocessor_spec.js +++ b/packages/server/test/unit/plugins/preprocessor_spec.js @@ -1,6 +1,6 @@ require('../../spec_helper') -const Fixtures = require('../../support/helpers/fixtures') +const Fixtures = require('@tooling/system-tests/lib/fixtures') const path = require('path') const appData = require(`${root}../lib/util/app_data`) diff --git a/packages/server/test/unit/project_spec.js b/packages/server/test/unit/project_spec.js index d05e445fe43c..2387cd11115e 100644 --- a/packages/server/test/unit/project_spec.js +++ b/packages/server/test/unit/project_spec.js @@ -5,7 +5,7 @@ const path = require('path') const commitInfo = require('@cypress/commit-info') const chokidar = require('chokidar') const pkg = require('@packages/root') -const Fixtures = require('../support/helpers/fixtures') +const Fixtures = require('@tooling/system-tests/lib/fixtures') const { sinon } = require('../spec_helper') const api = require(`${root}lib/api`) const user = require(`${root}lib/user`) diff --git a/packages/server/test/unit/project_utils_spec.ts b/packages/server/test/unit/project_utils_spec.ts index dbf69ea14fd7..c8c1acedd5a7 100644 --- a/packages/server/test/unit/project_utils_spec.ts +++ b/packages/server/test/unit/project_utils_spec.ts @@ -3,7 +3,7 @@ import path from 'path' import sinon from 'sinon' import { fs } from '../../lib/util/fs' import { getSpecUrl, checkSupportFile, getDefaultConfigFilePath } from '../../lib/project_utils' -import Fixtures from '../support/helpers/fixtures' +import Fixtures from '@tooling/system-tests/lib/fixtures' const todosPath = Fixtures.projectPath('todos') diff --git a/packages/server/test/unit/scaffold_spec.js b/packages/server/test/unit/scaffold_spec.js index 4294cf0ef7ae..8001b3f3ca59 100644 --- a/packages/server/test/unit/scaffold_spec.js +++ b/packages/server/test/unit/scaffold_spec.js @@ -9,7 +9,7 @@ const ProjectBase = require(`${root}lib/project-base`).ProjectBase const scaffold = require(`${root}lib/scaffold`) const { fs } = require(`${root}lib/util/fs`) const glob = require(`${root}lib/util/glob`) -const Fixtures = require(`${root}/test/support/helpers/fixtures`) +const Fixtures = require('@tooling/system-tests/lib/fixtures') describe('lib/scaffold', () => { beforeEach(() => { diff --git a/packages/server/test/unit/screenshots_spec.js b/packages/server/test/unit/screenshots_spec.js index 818d15ad72a8..2cebcfeefa45 100644 --- a/packages/server/test/unit/screenshots_spec.js +++ b/packages/server/test/unit/screenshots_spec.js @@ -6,7 +6,7 @@ const Jimp = require('jimp') const { Buffer } = require('buffer') const dataUriToBuffer = require('data-uri-to-buffer') const sizeOf = require('image-size') -const Fixtures = require('../support/helpers/fixtures') +const Fixtures = require('@tooling/system-tests/lib/fixtures') const config = require(`${root}lib/config`) const screenshots = require(`${root}lib/screenshots`) const { fs } = require(`${root}lib/util/fs`) diff --git a/packages/server/test/unit/socket_spec.js b/packages/server/test/unit/socket_spec.js index 6b537d6943a0..54f150dab74c 100644 --- a/packages/server/test/unit/socket_spec.js +++ b/packages/server/test/unit/socket_spec.js @@ -15,7 +15,7 @@ const exec = require(`${root}lib/exec`) const preprocessor = require(`${root}lib/plugins/preprocessor`) const { fs } = require(`${root}lib/util/fs`) const open = require(`${root}lib/util/open`) -const Fixtures = require(`${root}/test/support/helpers/fixtures`) +const Fixtures = require('@tooling/system-tests/lib/fixtures') const firefoxUtil = require(`${root}lib/browsers/firefox-util`).default const { createRoutes } = require(`${root}lib/routes`) diff --git a/packages/server/test/unit/specs_spec.js b/packages/server/test/unit/specs_spec.js index bc65e6b2432c..2f72cfb4aaf9 100644 --- a/packages/server/test/unit/specs_spec.js +++ b/packages/server/test/unit/specs_spec.js @@ -4,7 +4,7 @@ const R = require('ramda') const path = require('path') const config = require(`${root}lib/config`) const specsUtil = require(`${root}lib/util/specs`).default -const FixturesHelper = require(`${root}/test/support/helpers/fixtures`) +const FixturesHelper = require('@tooling/system-tests/lib/fixtures') const debug = require('debug')('test') describe('lib/util/specs', () => { diff --git a/packages/server/test/unit/util/spec_writer_spec.ts b/packages/server/test/unit/util/spec_writer_spec.ts index a66737faf8c8..a66050d95624 100644 --- a/packages/server/test/unit/util/spec_writer_spec.ts +++ b/packages/server/test/unit/util/spec_writer_spec.ts @@ -5,7 +5,7 @@ import sinon from 'sinon' import snapshot from 'snap-shot-it' import { expect } from 'chai' -import Fixtures from '../../support/helpers/fixtures' +import Fixtures from '@tooling/system-tests/lib/fixtures' import { fs } from '../../../lib/util/fs' import { generateCypressCommand, @@ -19,10 +19,6 @@ import { countStudioUsage, } from '../../../lib/util/spec_writer' -const mockSpec = Fixtures.get('projects/studio/cypress/integration/unwritten.spec.js') -const emptyCommentsSpec = Fixtures.get('projects/studio/cypress/integration/empty-comments.spec.js') -const writtenSpec = Fixtures.get('projects/studio/cypress/integration/written.spec.js') - const exampleTestCommands = [ { selector: '.input', @@ -46,10 +42,15 @@ const verifyOutput = (ast) => { } describe('lib/util/spec_writer', () => { - let readFile + let readFile; let mockSpec; let emptyCommentsSpec; let writtenSpec // recast doesn't play nicely with mockfs so we do it manually beforeEach(() => { + Fixtures.scaffold() + mockSpec = fs.readFileSync(Fixtures.projectPath('studio/cypress/integration/unwritten.spec.js')) + emptyCommentsSpec = fs.readFileSync(Fixtures.projectPath('studio/cypress/integration/empty-comments.spec.js')) + writtenSpec = fs.readFileSync(Fixtures.projectPath('studio/cypress/integration/written.spec.js')) + readFile = sinon.stub(fs, 'readFile').resolves(mockSpec) sinon.stub(fs, 'writeFile').callsFake((path, output) => { snapshot(output) diff --git a/patches/snap-shot-core+10.2.0.patch b/patches/snap-shot-core+10.2.0.patch new file mode 100644 index 000000000000..3e36b17e648e --- /dev/null +++ b/patches/snap-shot-core+10.2.0.patch @@ -0,0 +1,59 @@ +diff --git a/node_modules/snap-shot-core/src/file-system.js b/node_modules/snap-shot-core/src/file-system.js +index b2886cd..7d199a0 100644 +--- a/node_modules/snap-shot-core/src/file-system.js ++++ b/node_modules/snap-shot-core/src/file-system.js +@@ -21,11 +21,14 @@ const exportObject = require('./utils').exportObject + * and we don't want the snapshots to randomly "jump" around and be + * saved in an unexpected location. + */ +-const cwd = process.cwd() ++// cache CWD globally so we can reset it in the case where a test ++// changes cwd before/after this file is required in a non-deterministic ++// fashion (like in the autobalanced system tests) ++global.CACHED_CWD_FOR_SNAP_SHOT_IT = process.cwd() + /** + * Returns a relative path to the original working directory. + */ +-const fromCurrentFolder = path.relative.bind(null, cwd) ++const fromCurrentFolder = (...args) => path.relative(global.CACHED_CWD_FOR_SNAP_SHOT_IT, ...args) + const snapshotsFolderName = '__snapshots__' + /** + * Given relative path, returns same relative path, but inside +@@ -34,14 +37,14 @@ const snapshotsFolderName = '__snapshots__' + * joinSnapshotsFolder('foo/bar') + * // CWD/__snapshots__/foo/bar + */ +-const joinSnapshotsFolder = path.join.bind(null, cwd, snapshotsFolderName) ++const joinSnapshotsFolder = (...args) => path.join(global.CACHED_CWD_FOR_SNAP_SHOT_IT, snapshotsFolderName, ...args) + + // TODO: expose the name of the snapshots folder to the outside world id:16 + // - + // Gleb Bahmutov + // gleb.bahmutov@gmail.com + const snapshotsFolder = fromCurrentFolder(snapshotsFolderName) +-debug('process cwd: %s', cwd) ++debug('process cwd: %s', global.CACHED_CWD_FOR_SNAP_SHOT_IT) + debug('snapshots folder: %s', snapshotsFolder) + + /** +@@ -52,7 +55,7 @@ debug('snapshots folder: %s', snapshotsFolder) + * we want to form snapshot filenames wrt to the original starting + * working directory. + */ +-const resolveToCwd = path.resolve.bind(null, cwd) ++const resolveToCwd = (...args) => path.resolve(global.CACHED_CWD_FOR_SNAP_SHOT_IT, ...args) + + const isSaveOptions = is.schema({ + sortSnapshots: is.bool +diff --git a/node_modules/snap-shot-core/src/index.js b/node_modules/snap-shot-core/src/index.js +index b0442f0..fbe55bf 100644 +--- a/node_modules/snap-shot-core/src/index.js ++++ b/node_modules/snap-shot-core/src/index.js +@@ -332,6 +332,7 @@ function core (options) { + if (expected === undefined) { + if (opts.ci) { + console.log('current directory', process.cwd()) ++ console.log('cached cwd', global.CACHED_CWD_FOR_SNAP_SHOT_IT) + console.log('new value to save: %j', value) + return throwCannotSaveOnCI({ + value, diff --git a/patches/snap-shot-it+7.9.3.patch b/patches/snap-shot-it+7.9.3.patch index a8d93a038cbd..c5d7a5c20d5d 100644 --- a/patches/snap-shot-it+7.9.3.patch +++ b/patches/snap-shot-it+7.9.3.patch @@ -1,16 +1,53 @@ diff --git a/node_modules/snap-shot-it/src/index.js b/node_modules/snap-shot-it/src/index.js -index 0fb68da..154f09d 100644 +index 0fb68da..d1ff31a 100644 --- a/node_modules/snap-shot-it/src/index.js +++ b/node_modules/snap-shot-it/src/index.js -@@ -319,6 +319,11 @@ function snapshot (value) { - // the code is duplicate from above to get just the key collision error - const info = R.assoc('key', e.key, snapshotInfo) - info.allowDuplicate = Boolean(snapshotOptions.allowSharedSnapshot) -+ -+ if (info.allowDuplicate) { -+ return -+ } -+ - debug('current snapshot info %o', info) +@@ -16,8 +16,11 @@ const itsName = require('its-name') + + // save current directory right away to avoid any surprises later + // when some random tests change it +-const cwd = process.cwd() +-const relativeToCwd = path.relative.bind(null, cwd) ++// cache CWD globally so we can reset it in the case where a test ++// changes cwd before/after this file is required in a non-deterministic ++// fashion (like in the autobalanced system tests) ++global.CACHED_CWD_FOR_SNAP_SHOT_IT = process.cwd() ++const relativeToCwd = (...args) => path.relative(global.CACHED_CWD_FOR_SNAP_SHOT_IT, ...args) + + debug('loading snap-shot-it') + const EXTENSION = '.js' +@@ -239,7 +242,7 @@ function snapshot (value) { + compare: R.noop, + store: R.noop + } +- const packageConfigOptions = utils.getPackageConfigOptions(cwd) ++ const packageConfigOptions = utils.getPackageConfigOptions(global.CACHED_CWD_FOR_SNAP_SHOT_IT) + const opts = utils.mergeConfigOptions( + defaultOptions, + packageConfigOptions, +@@ -254,12 +257,12 @@ function snapshot (value) { + debug('prune options %o', pruneSnapshotsOptions) + + const compare = opts.compare +- ? utils.load(cwd, opts.compare) ++ ? utils.load(global.CACHED_CWD_FOR_SNAP_SHOT_IT, opts.compare) + : require('snap-shot-compare') +- const store = opts.store ? utils.load(cwd, opts.store) : null ++ const store = opts.store ? utils.load(global.CACHED_CWD_FOR_SNAP_SHOT_IT, opts.store) : null + + const preCompare = opts['pre-compare'] +- ? utils.load(cwd, opts['pre-compare']) ++ ? utils.load(global.CACHED_CWD_FOR_SNAP_SHOT_IT, opts['pre-compare']) + : R.identity + const what = preCompare(value) + +@@ -323,6 +326,9 @@ function snapshot (value) { const prevInfo = findExistingSnapshotKey(info) + if (prevInfo) { ++ if (info.allowDuplicate) { ++ return ++ } + debug('found duplicate snapshot name: %s', prevInfo.key) + console.error( + 'Snapshot error was caused by the duplicate snapshot name' diff --git a/scripts/binary/build.js b/scripts/binary/build.js index 787a5a1395f8..2990404ba0f1 100644 --- a/scripts/binary/build.js +++ b/scripts/binary/build.js @@ -20,7 +20,7 @@ const packages = require('./util/packages') const xvfb = require('../../cli/lib/exec/xvfb') const { transformRequires } = require('./util/transform-requires') const { testStaticAssets } = require('./util/testStaticAssets') -const performanceTracking = require('../../packages/server/test/support/helpers/performance.js') +const performanceTracking = require('@tooling/system-tests/lib/performance') const rootPackage = require('@packages/root') diff --git a/scripts/binary/smoke.js b/scripts/binary/smoke.js index b64010d23d26..570eaa1f6edb 100644 --- a/scripts/binary/smoke.js +++ b/scripts/binary/smoke.js @@ -6,7 +6,7 @@ const path = require('path') const Promise = require('bluebird') const os = require('os') const verify = require('../../cli/lib/tasks/verify') -const Fixtures = require('../../packages/server/test/support/helpers/fixtures') +const Fixtures = require('@tooling/system-tests/lib/fixtures') const fs = Promise.promisifyAll(fse) diff --git a/system-tests/.eslintrc.json b/system-tests/.eslintrc.json new file mode 100644 index 000000000000..42c1beed2704 --- /dev/null +++ b/system-tests/.eslintrc.json @@ -0,0 +1,17 @@ +{ + "globals": { + "expect": "readonly", + "mockery": "readonly", + "nock": "readonly", + "proxyquire": "readonly", + "root": "readonly", + "sinon": "readonly", + "supertest": "readonly" + }, + "extends": [ + "plugin:@cypress/dev/tests" + ], + "rules": { + "no-console": "off" + } +} diff --git a/system-tests/README.md b/system-tests/README.md new file mode 100644 index 000000000000..62b7582913ae --- /dev/null +++ b/system-tests/README.md @@ -0,0 +1,70 @@ +@tooling/system-tests +=== + +This package contains Cypress's suite of system tests. + +These tests launch the [Cypress server](../packages/server) process for each test and run different specs and projects under specific environment conditions, to get tests that can be as close to "real world" as possible. + +These tests run in CI in Electron, Chrome, and Firefox under the `system-tests` job family. + +## Running system tests + +```bash +yarn test +yarn test test/async_timeouts_spec.js +## or +yarn test async_timeouts ## shorthand, uses globbing to find spec +``` + +To keep the browser open after a spec run (for easier debugging and iterating on specs), you can pass the `--no-exit` flag to the test command. Live reloading due to spec changes should also work: + +```sh +yarn test test/go_spec.js --browser chrome --no-exit +``` + +To debug the Cypress process under test, you can pass `--cypress-inspect-brk`: + +```sh +yarn test test/go_spec.js --browser chrome --no-exit +``` + +## Developing tests + +System tests cover the entire Cypress run, so they are good for testing features that do not fit into a normal integration or unit test. However, they do take more resources to run, so consider carefully if you really *need* to write a system test, or if you could achieve 100% coverage via an integration or unit test instead. + +There are two parts to a system test: + +1. A test written using the [`systemTests`](./lib/system-tests) Mocha wrapper that lives in [`./test`](./test), and +2. A matching Cypress project that lives in the [`./projects`](./projects) directory. + +For example, if you initialized a new project in `./projects/my-new-project`, and you wanted to assert that 2 tests fail and take a snapshot of the `stdout`, you'd write a test like this: + +```ts +// ./test/my-new-project.spec.ts +import systemTests from '../lib/system-tests' +import Fixtures from '../lib/fixtures' + +describe('my new project', () => { + // scaffold projects + systemTests.setup() + + systemTests.it('fails as expected', { + project: Fixtures.projectPath('my-new-project'), + snapshot: true, + spec: '*', + expectedExitCode: 2 + }) +}) +``` + +From here, you could run this test with `yarn test my-new-project`. + +There are many more options available for `systemTests.it` and `systemTests.setup`. You can massage the stdout, do pre-run tasks, set up HTTP/S servers, and more. Explore the typedocs in [`./lib/system-tests`](./lib/system-tests) for more information. + +## Updating snaphots + +Prepend `SNAPSHOT_UPDATE=1` to any test command. See [`snap-shot-it` instructions](https://github.com/bahmutov/snap-shot-it#advanced-use) for more info. + +```bash +SNAPSHOT_UPDATE=1 yarn test go_spec +``` diff --git a/packages/server/__snapshots__/async_timeouts_spec.js b/system-tests/__snapshots__/async_timeouts_spec.js similarity index 100% rename from packages/server/__snapshots__/async_timeouts_spec.js rename to system-tests/__snapshots__/async_timeouts_spec.js diff --git a/packages/server/__snapshots__/base_url_spec.js b/system-tests/__snapshots__/base_url_spec.js similarity index 100% rename from packages/server/__snapshots__/base_url_spec.js rename to system-tests/__snapshots__/base_url_spec.js diff --git a/packages/server/__snapshots__/before_browser_launch_spec.ts.js b/system-tests/__snapshots__/before_browser_launch_spec.ts.js similarity index 100% rename from packages/server/__snapshots__/before_browser_launch_spec.ts.js rename to system-tests/__snapshots__/before_browser_launch_spec.ts.js diff --git a/packages/server/__snapshots__/block_hosts_spec.js b/system-tests/__snapshots__/block_hosts_spec.js similarity index 100% rename from packages/server/__snapshots__/block_hosts_spec.js rename to system-tests/__snapshots__/block_hosts_spec.js diff --git a/packages/server/__snapshots__/browser_path_spec.js b/system-tests/__snapshots__/browser_path_spec.js similarity index 100% rename from packages/server/__snapshots__/browser_path_spec.js rename to system-tests/__snapshots__/browser_path_spec.js diff --git a/packages/server/__snapshots__/busted_support_file_spec.js b/system-tests/__snapshots__/busted_support_file_spec.js similarity index 100% rename from packages/server/__snapshots__/busted_support_file_spec.js rename to system-tests/__snapshots__/busted_support_file_spec.js diff --git a/packages/server/__snapshots__/cache_spec.js b/system-tests/__snapshots__/cache_spec.js similarity index 100% rename from packages/server/__snapshots__/cache_spec.js rename to system-tests/__snapshots__/cache_spec.js diff --git a/packages/server/__snapshots__/caught_uncaught_hook_errors_spec.js b/system-tests/__snapshots__/caught_uncaught_hook_errors_spec.js similarity index 100% rename from packages/server/__snapshots__/caught_uncaught_hook_errors_spec.js rename to system-tests/__snapshots__/caught_uncaught_hook_errors_spec.js diff --git a/packages/server/__snapshots__/cdp_spec.ts.js b/system-tests/__snapshots__/cdp_spec.ts.js similarity index 100% rename from packages/server/__snapshots__/cdp_spec.ts.js rename to system-tests/__snapshots__/cdp_spec.ts.js diff --git a/packages/server/__snapshots__/commands_outside_of_test_spec.js b/system-tests/__snapshots__/commands_outside_of_test_spec.js similarity index 100% rename from packages/server/__snapshots__/commands_outside_of_test_spec.js rename to system-tests/__snapshots__/commands_outside_of_test_spec.js diff --git a/packages/server/__snapshots__/config_spec.js b/system-tests/__snapshots__/config_spec.js similarity index 100% rename from packages/server/__snapshots__/config_spec.js rename to system-tests/__snapshots__/config_spec.js diff --git a/packages/server/__snapshots__/controllers_spec.js b/system-tests/__snapshots__/controllers_spec.js similarity index 100% rename from packages/server/__snapshots__/controllers_spec.js rename to system-tests/__snapshots__/controllers_spec.js diff --git a/packages/server/__snapshots__/cookies_spec.ts.js b/system-tests/__snapshots__/cookies_spec.ts.js similarity index 100% rename from packages/server/__snapshots__/cookies_spec.ts.js rename to system-tests/__snapshots__/cookies_spec.ts.js diff --git a/packages/server/__snapshots__/cy_visit_performance_spec.js b/system-tests/__snapshots__/cy_visit_performance_spec.js similarity index 100% rename from packages/server/__snapshots__/cy_visit_performance_spec.js rename to system-tests/__snapshots__/cy_visit_performance_spec.js diff --git a/packages/server/__snapshots__/deprecated_spec.ts.js b/system-tests/__snapshots__/deprecated_spec.ts.js similarity index 100% rename from packages/server/__snapshots__/deprecated_spec.ts.js rename to system-tests/__snapshots__/deprecated_spec.ts.js diff --git a/packages/server/__snapshots__/domain_spec.js b/system-tests/__snapshots__/domain_spec.js similarity index 100% rename from packages/server/__snapshots__/domain_spec.js rename to system-tests/__snapshots__/domain_spec.js diff --git a/packages/server/__snapshots__/es_modules_spec.js b/system-tests/__snapshots__/es_modules_spec.js similarity index 100% rename from packages/server/__snapshots__/es_modules_spec.js rename to system-tests/__snapshots__/es_modules_spec.js diff --git a/packages/server/__snapshots__/form_submissions_spec.js b/system-tests/__snapshots__/form_submissions_spec.js similarity index 100% rename from packages/server/__snapshots__/form_submissions_spec.js rename to system-tests/__snapshots__/form_submissions_spec.js diff --git a/packages/server/__snapshots__/go_spec.js b/system-tests/__snapshots__/go_spec.js similarity index 100% rename from packages/server/__snapshots__/go_spec.js rename to system-tests/__snapshots__/go_spec.js diff --git a/packages/server/__snapshots__/headless_spec.ts.js b/system-tests/__snapshots__/headless_spec.ts.js similarity index 100% rename from packages/server/__snapshots__/headless_spec.ts.js rename to system-tests/__snapshots__/headless_spec.ts.js diff --git a/packages/server/__snapshots__/iframe_spec.js b/system-tests/__snapshots__/iframe_spec.js similarity index 100% rename from packages/server/__snapshots__/iframe_spec.js rename to system-tests/__snapshots__/iframe_spec.js diff --git a/packages/server/__snapshots__/images_spec.js b/system-tests/__snapshots__/images_spec.js similarity index 100% rename from packages/server/__snapshots__/images_spec.js rename to system-tests/__snapshots__/images_spec.js diff --git a/packages/server/__snapshots__/interception_spec.js b/system-tests/__snapshots__/interception_spec.js similarity index 100% rename from packages/server/__snapshots__/interception_spec.js rename to system-tests/__snapshots__/interception_spec.js diff --git a/packages/server/__snapshots__/issue_149_spec.js b/system-tests/__snapshots__/issue_149_spec.js similarity index 100% rename from packages/server/__snapshots__/issue_149_spec.js rename to system-tests/__snapshots__/issue_149_spec.js diff --git a/packages/server/__snapshots__/issue_1669_spec.js b/system-tests/__snapshots__/issue_1669_spec.js similarity index 100% rename from packages/server/__snapshots__/issue_1669_spec.js rename to system-tests/__snapshots__/issue_1669_spec.js diff --git a/packages/server/__snapshots__/issue_173_spec.ts.js b/system-tests/__snapshots__/issue_173_spec.ts.js similarity index 100% rename from packages/server/__snapshots__/issue_173_spec.ts.js rename to system-tests/__snapshots__/issue_173_spec.ts.js diff --git a/packages/server/__snapshots__/issue_2891_spec.js b/system-tests/__snapshots__/issue_2891_spec.js similarity index 100% rename from packages/server/__snapshots__/issue_2891_spec.js rename to system-tests/__snapshots__/issue_2891_spec.js diff --git a/packages/server/__snapshots__/issue_5475_spec.js b/system-tests/__snapshots__/issue_5475_spec.js similarity index 100% rename from packages/server/__snapshots__/issue_5475_spec.js rename to system-tests/__snapshots__/issue_5475_spec.js diff --git a/packages/server/__snapshots__/issue_6619.ts.js b/system-tests/__snapshots__/issue_6619.ts.js similarity index 100% rename from packages/server/__snapshots__/issue_6619.ts.js rename to system-tests/__snapshots__/issue_6619.ts.js diff --git a/packages/server/__snapshots__/issue_674_spec.js b/system-tests/__snapshots__/issue_674_spec.js similarity index 100% rename from packages/server/__snapshots__/issue_674_spec.js rename to system-tests/__snapshots__/issue_674_spec.js diff --git a/packages/server/__snapshots__/issue_7217_spec.ts.js b/system-tests/__snapshots__/issue_7217_spec.ts.js similarity index 100% rename from packages/server/__snapshots__/issue_7217_spec.ts.js rename to system-tests/__snapshots__/issue_7217_spec.ts.js diff --git a/packages/server/__snapshots__/js_error_handling_spec.js b/system-tests/__snapshots__/js_error_handling_spec.js similarity index 95% rename from packages/server/__snapshots__/js_error_handling_spec.js rename to system-tests/__snapshots__/js_error_handling_spec.js index d53654a0df68..e94d55442246 100644 --- a/packages/server/__snapshots__/js_error_handling_spec.js +++ b/system-tests/__snapshots__/js_error_handling_spec.js @@ -115,7 +115,7 @@ https://on.cypress.io/cross-origin-script-error │ Pending: 0 │ │ Skipped: 0 │ │ Screenshots: 5 │ - │ Video: true │ + │ Video: false │ │ Duration: X seconds │ │ Spec Ran: js_error_handling_failing_spec.js │ └────────────────────────────────────────────────────────────────────────────────────────────────┘ @@ -135,13 +135,6 @@ https://on.cypress.io/cross-origin-script-error rigin script errors -- explains where script errored (failed).png - (Video) - - - Started processing: Compressing to 32 CRF - - Finished processing: /XXX/XXX/XXX/cypress/videos/js_error_handling_failing_spec. (X second) - js.mp4 - - ==================================================================================================== (Run Finished) diff --git a/packages/server/__snapshots__/network_error_handling_spec.js b/system-tests/__snapshots__/network_error_handling_spec.js similarity index 100% rename from packages/server/__snapshots__/network_error_handling_spec.js rename to system-tests/__snapshots__/network_error_handling_spec.js diff --git a/packages/server/__snapshots__/new_project_spec.js b/system-tests/__snapshots__/new_project_spec.js similarity index 100% rename from packages/server/__snapshots__/new_project_spec.js rename to system-tests/__snapshots__/new_project_spec.js diff --git a/packages/server/__snapshots__/non_proxied_spec.ts.js b/system-tests/__snapshots__/non_proxied_spec.ts.js similarity index 100% rename from packages/server/__snapshots__/non_proxied_spec.ts.js rename to system-tests/__snapshots__/non_proxied_spec.ts.js diff --git a/packages/server/__snapshots__/non_root_read_only_fs_spec.ts.js b/system-tests/__snapshots__/non_root_read_only_fs_spec.ts.js similarity index 100% rename from packages/server/__snapshots__/non_root_read_only_fs_spec.ts.js rename to system-tests/__snapshots__/non_root_read_only_fs_spec.ts.js diff --git a/packages/server/__snapshots__/only_spec.js b/system-tests/__snapshots__/only_spec.js similarity index 100% rename from packages/server/__snapshots__/only_spec.js rename to system-tests/__snapshots__/only_spec.js diff --git a/packages/server/__snapshots__/page_loading_spec.js b/system-tests/__snapshots__/page_loading_spec.js similarity index 100% rename from packages/server/__snapshots__/page_loading_spec.js rename to system-tests/__snapshots__/page_loading_spec.js diff --git a/packages/server/__snapshots__/plugin_run_events_spec.ts.js b/system-tests/__snapshots__/plugin_run_events_spec.ts.js similarity index 100% rename from packages/server/__snapshots__/plugin_run_events_spec.ts.js rename to system-tests/__snapshots__/plugin_run_events_spec.ts.js diff --git a/packages/server/__snapshots__/plugins_spec.js b/system-tests/__snapshots__/plugins_spec.js similarity index 100% rename from packages/server/__snapshots__/plugins_spec.js rename to system-tests/__snapshots__/plugins_spec.js diff --git a/packages/server/__snapshots__/promises_spec.js b/system-tests/__snapshots__/promises_spec.js similarity index 100% rename from packages/server/__snapshots__/promises_spec.js rename to system-tests/__snapshots__/promises_spec.js diff --git a/packages/server/__snapshots__/record_spec.js b/system-tests/__snapshots__/record_spec.js similarity index 100% rename from packages/server/__snapshots__/record_spec.js rename to system-tests/__snapshots__/record_spec.js diff --git a/packages/server/__snapshots__/reporters_spec.js b/system-tests/__snapshots__/reporters_spec.js similarity index 100% rename from packages/server/__snapshots__/reporters_spec.js rename to system-tests/__snapshots__/reporters_spec.js diff --git a/packages/server/__snapshots__/request_spec.ts.js b/system-tests/__snapshots__/request_spec.ts.js similarity index 100% rename from packages/server/__snapshots__/request_spec.ts.js rename to system-tests/__snapshots__/request_spec.ts.js diff --git a/packages/server/__snapshots__/retries_spec.ts.js b/system-tests/__snapshots__/retries_spec.ts.js similarity index 100% rename from packages/server/__snapshots__/retries_spec.ts.js rename to system-tests/__snapshots__/retries_spec.ts.js diff --git a/packages/server/__snapshots__/return_value_spec.js b/system-tests/__snapshots__/return_value_spec.js similarity index 100% rename from packages/server/__snapshots__/return_value_spec.js rename to system-tests/__snapshots__/return_value_spec.js diff --git a/packages/server/__snapshots__/runnable_execution_spec.ts.js b/system-tests/__snapshots__/runnable_execution_spec.ts.js similarity index 100% rename from packages/server/__snapshots__/runnable_execution_spec.ts.js rename to system-tests/__snapshots__/runnable_execution_spec.ts.js diff --git a/packages/server/__snapshots__/screenshot_element_capture_spec.js b/system-tests/__snapshots__/screenshot_element_capture_spec.js similarity index 100% rename from packages/server/__snapshots__/screenshot_element_capture_spec.js rename to system-tests/__snapshots__/screenshot_element_capture_spec.js diff --git a/packages/server/__snapshots__/screenshot_fullpage_capture_spec.js b/system-tests/__snapshots__/screenshot_fullpage_capture_spec.js similarity index 100% rename from packages/server/__snapshots__/screenshot_fullpage_capture_spec.js rename to system-tests/__snapshots__/screenshot_fullpage_capture_spec.js diff --git a/packages/server/__snapshots__/screenshot_nested_file_spec.js b/system-tests/__snapshots__/screenshot_nested_file_spec.js similarity index 100% rename from packages/server/__snapshots__/screenshot_nested_file_spec.js rename to system-tests/__snapshots__/screenshot_nested_file_spec.js diff --git a/packages/server/__snapshots__/screenshot_viewport_capture_spec.js b/system-tests/__snapshots__/screenshot_viewport_capture_spec.js similarity index 100% rename from packages/server/__snapshots__/screenshot_viewport_capture_spec.js rename to system-tests/__snapshots__/screenshot_viewport_capture_spec.js diff --git a/packages/server/__snapshots__/screenshots_spec.js b/system-tests/__snapshots__/screenshots_spec.js similarity index 94% rename from packages/server/__snapshots__/screenshots_spec.js rename to system-tests/__snapshots__/screenshots_spec.js index 3bfeb8f26eb0..e7cd0760d82d 100644 --- a/packages/server/__snapshots__/screenshots_spec.js +++ b/system-tests/__snapshots__/screenshots_spec.js @@ -38,6 +38,8 @@ exports['e2e screenshots / passes'] = ` - does not take a screenshot for a pending test ✓ adds padding to element screenshot when specified ✓ does not add padding to non-element screenshot + ✓ can pass overwrite option to replace existing filename + ✓ can set overwrite default option to replace existing filename clipping ✓ can clip app screenshots ✓ can clip runner screenshots @@ -53,7 +55,7 @@ exports['e2e screenshots / passes'] = ` ✓ takes another screenshot - 20 passing + 22 passing 1 pending 6 failing @@ -102,8 +104,8 @@ Because this error occurred during a \`after each\` hook we are skipping the rem (Results) ┌────────────────────────────────────────────────────────────────────────────────────────────────┐ - │ Tests: 26 │ - │ Passing: 20 │ + │ Tests: 28 │ + │ Passing: 22 │ │ Failing: 5 │ │ Pending: 1 │ │ Skipped: 0 │ @@ -153,6 +155,7 @@ Because this error occurred during a \`after each\` hook we are skipping the rem - /XXX/XXX/XXX/cypress/screenshots/screenshots_spec.js/aut-resize.png (1000x2000) - /XXX/XXX/XXX/cypress/screenshots/screenshots_spec.js/element-padding.png (420x320) - /XXX/XXX/XXX/cypress/screenshots/screenshots_spec.js/non-element-padding.png (600x200) + - /XXX/XXX/XXX/cypress/screenshots/screenshots_spec.js/overwrite-test.png (100x50) - /XXX/XXX/XXX/cypress/screenshots/screenshots_spec.js/app-clip.png (100x50) - /XXX/XXX/XXX/cypress/screenshots/screenshots_spec.js/runner-clip.png (120x60) - /XXX/XXX/XXX/cypress/screenshots/screenshots_spec.js/fullPage-clip.png (140x70) @@ -167,10 +170,6 @@ Because this error occurred during a \`after each\` hook we are skipping the rem y long test title aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa.png - - /XXX/XXX/XXX/cypress/screenshots/screenshots_spec.js/taking screenshots -- reall (1000x660) - y long test title aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa - aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa - aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa (1).png (Video) @@ -186,9 +185,9 @@ Because this error occurred during a \`after each\` hook we are skipping the rem Spec Tests Passing Failing Pending Skipped ┌────────────────────────────────────────────────────────────────────────────────────────────────┐ - │ ✖ screenshots_spec.js XX:XX 26 20 5 1 - │ + │ ✖ screenshots_spec.js XX:XX 28 22 5 1 - │ └────────────────────────────────────────────────────────────────────────────────────────────────┘ - ✖ 1 of 1 failed (100%) XX:XX 26 20 5 1 - + ✖ 1 of 1 failed (100%) XX:XX 28 22 5 1 - ` diff --git a/packages/server/__snapshots__/server_sent_events_spec.js b/system-tests/__snapshots__/server_sent_events_spec.js similarity index 100% rename from packages/server/__snapshots__/server_sent_events_spec.js rename to system-tests/__snapshots__/server_sent_events_spec.js diff --git a/packages/server/__snapshots__/session_spec.ts.js b/system-tests/__snapshots__/session_spec.ts.js similarity index 94% rename from packages/server/__snapshots__/session_spec.ts.js rename to system-tests/__snapshots__/session_spec.ts.js index 0200e50cae1e..40a0a3daeaec 100644 --- a/packages/server/__snapshots__/session_spec.ts.js +++ b/system-tests/__snapshots__/session_spec.ts.js @@ -66,7 +66,7 @@ exports['e2e sessions / session tests'] = ` ✓ t1 ✓ t2 - options.validate reruns steps when rejecting + options.validate reruns steps when throwing ✓ t1 ✓ t2 @@ -105,7 +105,17 @@ exports['e2e sessions / session tests'] = ` ✓ t2 consoleProps - ✓ t1 + - t1 + + ignores setting insecure context data when on secure context + no cross origin secure origins, nothing to clear + ✓ sets insecure content + ✓ nothing to clear - 1/2 + ✓ nothing to clear - 2/2 + only secure origins cleared + ✓ sets insecure content + ✓ switches to secure context - clears only secure context data - 1/2 + ✓ clears only secure context data - 2/2 errors ✓ throws error when experimentalSessionSupport not enabled @@ -113,16 +123,17 @@ exports['e2e sessions / session tests'] = ` ✓ throws if multiple session calls with same name but different options - 49 passing + 54 passing + 1 pending (Results) ┌────────────────────────────────────────────────────────────────────────────────────────────────┐ - │ Tests: 49 │ - │ Passing: 49 │ + │ Tests: 55 │ + │ Passing: 54 │ │ Failing: 0 │ - │ Pending: 0 │ + │ Pending: 1 │ │ Skipped: 0 │ │ Screenshots: 0 │ │ Video: false │ @@ -138,9 +149,9 @@ exports['e2e sessions / session tests'] = ` Spec Tests Passing Failing Pending Skipped ┌────────────────────────────────────────────────────────────────────────────────────────────────┐ - │ ✔ session_spec.js XX:XX 49 49 - - - │ + │ ✔ session_spec.js XX:XX 55 54 - 1 - │ └────────────────────────────────────────────────────────────────────────────────────────────────┘ - ✔ All specs passed! XX:XX 49 49 - - - + ✔ All specs passed! XX:XX 55 54 - 1 - ` diff --git a/packages/server/__snapshots__/spec_isolation_spec.js b/system-tests/__snapshots__/spec_isolation_spec.js similarity index 100% rename from packages/server/__snapshots__/spec_isolation_spec.js rename to system-tests/__snapshots__/spec_isolation_spec.js diff --git a/packages/server/__snapshots__/specs_spec.js b/system-tests/__snapshots__/specs_spec.js similarity index 100% rename from packages/server/__snapshots__/specs_spec.js rename to system-tests/__snapshots__/specs_spec.js diff --git a/packages/server/__snapshots__/stdout_spec.js b/system-tests/__snapshots__/stdout_spec.js similarity index 100% rename from packages/server/__snapshots__/stdout_spec.js rename to system-tests/__snapshots__/stdout_spec.js diff --git a/packages/server/__snapshots__/studio_spec.ts.js b/system-tests/__snapshots__/studio_spec.ts.js similarity index 100% rename from packages/server/__snapshots__/studio_spec.ts.js rename to system-tests/__snapshots__/studio_spec.ts.js diff --git a/packages/server/__snapshots__/subdomain_spec.ts.js b/system-tests/__snapshots__/subdomain_spec.ts.js similarity index 100% rename from packages/server/__snapshots__/subdomain_spec.ts.js rename to system-tests/__snapshots__/subdomain_spec.ts.js diff --git a/packages/server/__snapshots__/system_node_spec.js b/system-tests/__snapshots__/system_node_spec.js similarity index 100% rename from packages/server/__snapshots__/system_node_spec.js rename to system-tests/__snapshots__/system_node_spec.js diff --git a/packages/server/__snapshots__/task_not_registered_spec.js b/system-tests/__snapshots__/task_not_registered_spec.js similarity index 100% rename from packages/server/__snapshots__/task_not_registered_spec.js rename to system-tests/__snapshots__/task_not_registered_spec.js diff --git a/packages/server/__snapshots__/task_spec.js b/system-tests/__snapshots__/task_spec.js similarity index 100% rename from packages/server/__snapshots__/task_spec.js rename to system-tests/__snapshots__/task_spec.js diff --git a/packages/server/__snapshots__/testConfigOverrides_spec.ts.js b/system-tests/__snapshots__/testConfigOverrides_spec.ts.js similarity index 100% rename from packages/server/__snapshots__/testConfigOverrides_spec.ts.js rename to system-tests/__snapshots__/testConfigOverrides_spec.ts.js diff --git a/packages/server/__snapshots__/typescript_spec_support_spec.ts.js b/system-tests/__snapshots__/typescript_spec_support_spec.ts.js similarity index 99% rename from packages/server/__snapshots__/typescript_spec_support_spec.ts.js rename to system-tests/__snapshots__/typescript_spec_support_spec.ts.js index fa425a42af18..3aa0bfc61b08 100644 --- a/packages/server/__snapshots__/typescript_spec_support_spec.ts.js +++ b/system-tests/__snapshots__/typescript_spec_support_spec.ts.js @@ -88,9 +88,9 @@ The error was: Error: Webpack Compilation Error ./cypress/integration/typescript_syntax_error_spec.tsXX:XX -Module parse failed: Unexpected token (4:19) +Module parse failed: Unexpected token (3:19) File was processed with these loaders: - * ../../../../npm/webpack-batteries-included-preprocessor/node_modules/ts-loader/index.js + * ../../../npm/webpack-batteries-included-preprocessor/node_modules/ts-loader/index.js You may need an additional loader to handle the result of these loaders. | // The code below is ignored by eslint | // because it tests failing spec. diff --git a/packages/server/__snapshots__/uncaught_spec_errors_spec.js b/system-tests/__snapshots__/uncaught_spec_errors_spec.js similarity index 100% rename from packages/server/__snapshots__/uncaught_spec_errors_spec.js rename to system-tests/__snapshots__/uncaught_spec_errors_spec.js diff --git a/packages/server/__snapshots__/uncaught_support_file_spec.js b/system-tests/__snapshots__/uncaught_support_file_spec.js similarity index 100% rename from packages/server/__snapshots__/uncaught_support_file_spec.js rename to system-tests/__snapshots__/uncaught_support_file_spec.js diff --git a/packages/server/__snapshots__/user_agent_spec.js b/system-tests/__snapshots__/user_agent_spec.js similarity index 100% rename from packages/server/__snapshots__/user_agent_spec.js rename to system-tests/__snapshots__/user_agent_spec.js diff --git a/packages/server/__snapshots__/viewport_spec.js b/system-tests/__snapshots__/viewport_spec.js similarity index 100% rename from packages/server/__snapshots__/viewport_spec.js rename to system-tests/__snapshots__/viewport_spec.js diff --git a/packages/server/__snapshots__/visit_spec.js b/system-tests/__snapshots__/visit_spec.js similarity index 100% rename from packages/server/__snapshots__/visit_spec.js rename to system-tests/__snapshots__/visit_spec.js diff --git a/packages/server/__snapshots__/web_security_spec.js b/system-tests/__snapshots__/web_security_spec.js similarity index 100% rename from packages/server/__snapshots__/web_security_spec.js rename to system-tests/__snapshots__/web_security_spec.js diff --git a/packages/server/__snapshots__/websockets_spec.js b/system-tests/__snapshots__/websockets_spec.js similarity index 100% rename from packages/server/__snapshots__/websockets_spec.js rename to system-tests/__snapshots__/websockets_spec.js diff --git a/packages/server/__snapshots__/xhr_spec.js b/system-tests/__snapshots__/xhr_spec.js similarity index 100% rename from packages/server/__snapshots__/xhr_spec.js rename to system-tests/__snapshots__/xhr_spec.js diff --git a/packages/server/test/support/helpers/fixtures.js b/system-tests/lib/fixtures.js similarity index 81% rename from packages/server/test/support/helpers/fixtures.js rename to system-tests/lib/fixtures.js index 857f2b5a8d6c..2cac5ddad381 100644 --- a/packages/server/test/support/helpers/fixtures.js +++ b/system-tests/lib/fixtures.js @@ -2,8 +2,10 @@ const fs = require('fs-extra') const path = require('path') const chokidar = require('chokidar') -const root = path.join(__dirname, '..', '..', '..') -const projects = path.join(root, 'test', 'support', 'fixtures', 'projects') +const root = path.join(__dirname, '..') + +const serverRoot = path.join(__dirname, '../../packages/server/') +const projects = path.join(root, 'projects') const tmpDir = path.join(root, '.projects') // copy contents instead of deleting+creating new file, which can cause @@ -29,7 +31,7 @@ module.exports = { }, scaffoldWatch () { - const watchdir = path.resolve(__dirname, '../fixtures/projects') + const watchdir = path.resolve(__dirname, '../projects') console.log('watching files due to --no-exit', watchdir) @@ -68,10 +70,10 @@ module.exports = { }, get (fixture, encoding = 'utf8') { - return fs.readFileSync(path.join(root, 'test', 'support', 'fixtures', fixture), encoding) + return fs.readFileSync(path.join(serverRoot, 'test', 'support', 'fixtures', fixture), encoding) }, path (fixture) { - return path.join(root, 'test', 'support', 'fixtures', fixture) + return path.join(serverRoot, 'test', 'support', 'fixtures', fixture) }, } diff --git a/packages/server/test/support/helpers/performance.js b/system-tests/lib/performance.js similarity index 93% rename from packages/server/test/support/helpers/performance.js rename to system-tests/lib/performance.js index a8dd40b4577e..23a423801673 100644 --- a/packages/server/test/support/helpers/performance.js +++ b/system-tests/lib/performance.js @@ -1,6 +1,6 @@ -const ciProvider = require('../../../lib/util/ci_provider') +const ciProvider = require('@packages/server/lib/util/ci_provider') const { commitInfo } = require('@cypress/commit-info') -const pkg = require('../../../../../package.json') +const pkg = require('@packages/root') const Promise = require('bluebird') const rp = require('@cypress/request-promise') const debug = require('debug')('cypress:performance') diff --git a/packages/server/test/support/helpers/resultsUtils.ts b/system-tests/lib/resultsUtils.ts similarity index 93% rename from packages/server/test/support/helpers/resultsUtils.ts rename to system-tests/lib/resultsUtils.ts index 7863f791a959..5814d7dbf0bb 100644 --- a/packages/server/test/support/helpers/resultsUtils.ts +++ b/system-tests/lib/resultsUtils.ts @@ -1,4 +1,4 @@ -import e2e from './e2e' +import systemTests from './system-tests' import dayjs from 'dayjs' import _ from 'lodash' @@ -113,7 +113,7 @@ export const expectRunsToHaveCorrectTimings = (runs = []) => { _.each(run.tests, (test) => { try { if (test.displayError) { - test.displayError = e2e.normalizeStdout(test.displayError) + test.displayError = systemTests.normalizeStdout(test.displayError) } const attempts = test.attempts @@ -122,7 +122,7 @@ export const expectRunsToHaveCorrectTimings = (runs = []) => { // is around the sum of all of its timings attempts.forEach((attempt) => { if (attempt.error) { - attempt.error.stack = e2e.normalizeStdout(attempt.error.stack).trim() + attempt.error.stack = systemTests.normalizeStdout(attempt.error.stack).trim() } // cannot sum an object, must use array of values @@ -264,18 +264,18 @@ export const expectCorrectModuleApiResult = (json, opts: { 1234, ) - run.spec.absolute = e2e.normalizeStdout(run.spec.absolute) + run.spec.absolute = systemTests.normalizeStdout(run.spec.absolute) _.each(run.tests, (test) => { if (test.displayError) { - test.displayError = e2e.normalizeStdout(test.displayError) + test.displayError = systemTests.normalizeStdout(test.displayError) } }) attempts.forEach((attempt) => { // normalize stack if (attempt.error) { - attempt.error.stack = e2e.normalizeStdout(attempt.error.stack).trim() + attempt.error.stack = systemTests.normalizeStdout(attempt.error.stack).trim() } // normalize startedAt @@ -300,7 +300,7 @@ export const expectCorrectModuleApiResult = (json, opts: { screenshot.takenAt = STATIC_DATE // screenshot.screenshotId = 'some-random-id' - screenshot.path = e2e.normalizeStdout(screenshot.path) + screenshot.path = systemTests.normalizeStdout(screenshot.path) }) if (attempt.duration) { @@ -311,7 +311,7 @@ export const expectCorrectModuleApiResult = (json, opts: { if (opts.video) { // normalize video path - run.video = e2e.normalizeStdout(run.video) + run.video = systemTests.normalizeStdout(run.video) } }) } diff --git a/packages/server/test/support/helpers/serverStub.ts b/system-tests/lib/serverStub.ts similarity index 99% rename from packages/server/test/support/helpers/serverStub.ts rename to system-tests/lib/serverStub.ts index ff3326687340..1563aceb838f 100644 --- a/packages/server/test/support/helpers/serverStub.ts +++ b/system-tests/lib/serverStub.ts @@ -2,7 +2,7 @@ import _ from 'lodash' import Bluebird from 'bluebird' import bodyParser from 'body-parser' import { api as jsonSchemas } from '@cypress/json-schemas' -import e2e from './e2e' +import systemTests from './system-tests' export const postRunResponseWithWarnings = jsonSchemas.getExample('postRunResponse')('2.2.0') @@ -280,7 +280,7 @@ const onServer = (routes) => { } export const setupStubbedServer = (routes, settings = {}) => { - e2e.setup({ + systemTests.setup({ settings: _.extend({ projectId: 'pid123', videoUploadOnPasses: false, diff --git a/system-tests/lib/spec_helper.js b/system-tests/lib/spec_helper.js new file mode 100644 index 000000000000..08346d1e84fb --- /dev/null +++ b/system-tests/lib/spec_helper.js @@ -0,0 +1,127 @@ +const root = '@packages/server' + +const chai = require('chai') + +chai.use(require('chai-subset')) + +global.root = root +global.supertest = require('supertest') +global.nock = require('nock') +global.expect = chai.expect +global.mockery = require('mockery') +global.proxyquire = require('proxyquire') +global.sinon = require('sinon') +const _ = require('lodash') +const Promise = require('bluebird') +const path = require('path') +const cache = require(`@packages/server/lib/cache`) + +require('chai') +.use(require('@cypress/sinon-chai')) +.use(require('chai-uuid')) +.use(require('chai-as-promised')) + +if (process.env.UPDATE) { + throw new Error('You\'re using UPDATE=1 which is the old way of updating snapshots.\n\nThe correct environment variable is SNAPSHOT_UPDATE=1') +} + +if (process.env.UPDATE_SNAPSHOT) { + throw new Error('You\'re using UPDATE_SNAPSHOT=1\n\nThe correct environment variable is SNAPSHOT_UPDATE=1') +} + +if (process.env.UPDATE_SNAPSHOTS) { + throw new Error('You\'re using UPDATE_SNAPSHOTS=1\n\nThe correct environment variable is SNAPSHOT_UPDATE=1') +} + +let hasOnly = false; + +// hack for older version of mocha so that +// snap-shot-it can find suite._onlyTests +['it', 'describe', 'context'].forEach((prop) => { + const backup = global[prop].only + + global[prop].only = function (...args) { + hasOnly = true + + return backup.apply(this, args) + } +}) + +const originalEnv = process.env +const env = _.clone(process.env) + +sinon.usingPromise(Promise) + +// backup these originals +const { + restore, + useFakeTimers, +} = sinon + +sinon.useFakeTimers = function (...args) { + sinon._clock = useFakeTimers.apply(sinon, args) +} + +sinon.restore = function (...args) { + let c + + c = sinon._clock + + if (c) { + c.restore() + } + + return restore.apply(sinon, args) +} + +mockery.enable({ + warnOnUnregistered: false, +}) + +// stub out the entire electron object for our stub +// we must use an absolute path here because of the way mockery internally loads this +// module - meaning the first time electron is required it'll use this path string +// so because its required from a separate module we must use an absolute reference to it +mockery.registerSubstitute( + 'electron', + path.join(__dirname, './support/helpers/electron_stub'), +) + +// stub out electron's original-fs module which is available when running in electron +mockery.registerMock('original-fs', {}) + +before(function () { + if (hasOnly) { + this.test.parent._onlyTests = [true] + } +}) + +// appData.ensure() + +beforeEach(function () { + this.originalEnv = originalEnv + + nock.disableNetConnect() + nock.enableNetConnect(/localhost/) + + // always clean up the cache + // before each test + return cache.remove() +}) + +afterEach(() => { + sinon.restore() + + nock.cleanAll() + nock.enableNetConnect() + + process.env = _.clone(env) +}) + +module.exports = { + expect: global.expect, + nock: global.nock, + proxyquire: global.proxyquire, + sinon: global.sinon, + root: global.root, +} diff --git a/packages/server/test/support/helpers/e2e.ts b/system-tests/lib/system-tests.ts similarity index 75% rename from packages/server/test/support/helpers/e2e.ts rename to system-tests/lib/system-tests.ts index 5f778be5af1e..f739cc359687 100644 --- a/packages/server/test/support/helpers/e2e.ts +++ b/system-tests/lib/system-tests.ts @@ -1,4 +1,7 @@ -import { expect, root } from '../../spec_helper' +const snapshot = require('snap-shot-it') + +import { SpawnOptions } from 'child_process' +import { expect } from './spec_helper' require('mocha-banner').register() const chalk = require('chalk').default @@ -11,19 +14,228 @@ const morgan = require('morgan') const stream = require('stream') const express = require('express') const Bluebird = require('bluebird') -const snapshot = require('snap-shot-it') -const debug = require('debug')('cypress:support:e2e') +const debug = require('debug')('cypress:system-tests') const httpsProxy = require('@packages/https-proxy') const Fixtures = require('./fixtures') -const { fs } = require(`${root}../lib/util/fs`) -const { allowDestroy } = require(`${root}../lib/util/server_destroy`) -const cypress = require(`${root}../lib/cypress`) -const screenshots = require(`${root}../lib/screenshots`) -const videoCapture = require(`${root}../lib/video_capture`) -const settings = require(`${root}../lib/util/settings`) +const { allowDestroy } = require(`@packages/server/lib/util/server_destroy`) +const cypress = require(`@packages/server/lib/cypress`) +const screenshots = require(`@packages/server/lib/screenshots`) +const videoCapture = require(`@packages/server/lib/video_capture`) +const settings = require(`@packages/server/lib/util/settings`) // mutates mocha test runner - needed for `test.titlePath` -require(`${root}../lib/project-base`) +// TODO: fix this - this mutates cwd and is strange in general +require(`@packages/server/lib/project-base`) + +type CypressConfig = { [key: string]: any } + +type BrowserName = 'electron' | 'firefox' | 'chrome' + +type ExecResult = { + code: number + stdout: string + stderr: string +} + +type ExecFn = (options?: ExecOptions) => Promise + +type ItOptions = ExecOptions & { + /** + * If a function is supplied, it will be executed instead of running the `systemTests.exec` function immediately. + */ + onRun?: ( + execFn: ExecFn + ) => Promise | any + /** + * Same as using `systemTests.it.only`. + */ + only?: boolean + /** + * Same as using `systemTests.it.skip`. + */ + skip?: boolean +} + +type ExecOptions = { + /** + * Deprecated. Use `--cypress-inspect-brk` from command line instead. + * @deprecated + */ + inspectBrk?: null + /** + * Deprecated. Use `--no-exit` from command line instead. + * @deprecated + */ + exit?: null + /** + * Don't exit when tests are finished. You can also pass `--no-exit` via the command line. + */ + noExit?: boolean + /** + * The browser to run the system tests on. By default, runs on all. + */ + browser?: BrowserName | Array + /** + * Test timeout in milliseconds. + */ + timeout?: number + /** + * The spec argument to pass to Cypress. + */ + spec?: string + /** + * The project fixture to scaffold and pass to Cypress. + */ + project?: string + /** + * The testing type to use. + */ + testingType?: 'e2e' | 'component' + /** + * If set, asserts that Cypress exited with the given exit code. + * If all is working as it should, this is the number of failing tests. + */ + expectedExitCode?: number + /** + * Force Cypress's server to use the specified port. + */ + port?: number + /** + * Set headed mode. By default system tests run headlessly. + */ + headed?: boolean + /** + * Set if the run should record. By default system tests do not record. + */ + record?: boolean + /** + * Set additional command line args to be passed to the executable. + */ + args?: string[] + /** + * If set, automatically snapshot the test's stdout. + */ + snapshot?: boolean + /** + * Pass a function to assert on and/or modify the stdout before snapshotting. + */ + onStdout?: (stdout: string) => string | void + /** + * User-supplied snapshot title. If unset, one will be autogenerated from the suite name. + */ + originalTitle?: string + /** + * If set, screenshot dimensions will be sanitized for snapshotting purposes. + * @default false + */ + sanitizeScreenshotDimensions?: boolean + /** + * If set, the list of available browsers in stdout will be sanitized for snapshotting purposes. + * @default true + */ + normalizeStdoutAvailableBrowsers?: boolean + /** + * Runs Cypress in quiet mode. + */ + quiet?: boolean + /** + * Run Cypress with parallelization. + */ + parallel?: boolean + /** + * Run Cypress with run groups. + */ + group?: string + /** + * Run Cypress with a CI build ID. + */ + ciBuildId?: string + /** + * Run Cypress with a record key. + */ + key?: string + /** + * Run Cypress with a custom Mocha reporter. + */ + reporter?: string + /** + * Run Cypress with custom reporter options. + */ + reporterOptions?: string + /** + * Run Cypress with CLI config. + */ + config?: CypressConfig + /** + * Set Cypress env vars (not OS-level env) + */ + env?: string + /** + * Set OS-level env vars. + */ + processEnv?: { [key: string]: string | number } + /** + * Set an output path. + */ + outputPath?: string + /** + * Set a run tag. + */ + tag?: string + /** + * Run Cypress with a custom config filename. + */ + configFile?: string + /** + * Set a custom executable to run instead of the default. + */ + command?: string + /** + * Additional options to pass to `cp.spawn`. + */ + spawnOpts?: SpawnOptions + /** + * Emulate a no-typescript environment. + */ + noTypeScript?: boolean + /** + * If set, a dummy `node_modules` project with this name will be set up. + */ + stubPackage?: string +} + +type Server = { + /** + * The port to listen on. + */ + port: number + /** + * If set, use `@packages/https-proxy`'s CA to set up self-signed HTTPS. + */ + https?: boolean + /** + * If set, use `express.static` middleware to serve the e2e project's static assets. + */ + static?: boolean + /** + * If set, use the `cors` middleware to provide CORS headers. + */ + cors?: boolean + /** + * A function that receives the Express app for setting up routes, etc. + */ + onServer?: (app: Express.Application) => void +} + +type SetupOptions = { + servers?: Server | Array + /** + * Set default Cypress config. + */ + settings?: CypressConfig +} + +const serverPath = path.dirname(require.resolve('@packages/server')) cp = Bluebird.promisifyAll(cp) @@ -55,13 +267,13 @@ const expectedAddedVideoSnapshotLines = [ 'This error will not alter the exit code.', '', 'TimeoutError: operation timed out', '[stack trace lines]', '', '', - '│ Video: false │', ] const expectedDeletedVideoSnapshotLines = [ - '│ Video: true │', '(Video)', '', '- Started processing: Compressing to 32 CRF', ] +const sometimesAddedVideoSnapshotLine = '│ Video: false │' +const sometimesDeletedVideoSnapshotLine = '│ Video: true │' const isVideoSnapshotError = (err: Error) => { const [added, deleted] = [[], []] @@ -82,6 +294,9 @@ const isVideoSnapshotError = (err: Error) => { if (line.charAt(0) === '-') deleted.push(line.slice(1).trim()) } + _.pull(added, sometimesAddedVideoSnapshotLine) + _.pull(deleted, sometimesDeletedVideoSnapshotLine) + return _.isEqual(added, expectedAddedVideoSnapshotLines) && _.isEqual(deleted, expectedDeletedVideoSnapshotLines) } @@ -344,7 +559,7 @@ const normalizeToArray = (value) => { return value } -const localItFn = function (title, opts = {}) { +const localItFn = function (title: string, opts: ItOptions) { opts.browser = normalizeToArray(opts.browser) const DEFAULT_OPTIONS = { @@ -362,7 +577,7 @@ const localItFn = function (title, opts = {}) { const options = _.defaults({}, opts, DEFAULT_OPTIONS) if (!title) { - throw new Error('e2e.it(...) must be passed a title as the first argument') + throw new Error('systemTests.it(...) must be passed a title as the first argument') } // LOGIC FOR AUTOGENERATING DYNAMIC TESTS @@ -391,7 +606,7 @@ const localItFn = function (title, opts = {}) { const ctx = this const execFn = (overrides = {}) => { - return e2e.exec(ctx, _.extend({ originalTitle }, options, overrides, { browser })) + return systemTests.exec(ctx, _.extend({ originalTitle }, options, overrides, { browser })) } return options.onRun(execFn, browser, ctx) @@ -401,13 +616,13 @@ const localItFn = function (title, opts = {}) { return _.each(browsersToTest, browserToTest) } -localItFn.only = function (title, options) { +localItFn.only = function (title: string, options: ItOptions) { options.only = true return localItFn(title, options) } -localItFn.skip = function (title, options) { +localItFn.skip = function (title: string, options: ItOptions) { options.skip = true return localItFn(title, options) @@ -423,7 +638,7 @@ const maybeVerifyExitCode = (expectedExitCode, fn) => { return fn() } -const e2e = { +const systemTests = { replaceStackTraceLines, @@ -436,15 +651,13 @@ const e2e = { snapshot (...args) { args = _.compact(args) + // avoid snapshot cwd issue - see /patches/snap-shot* for more information + global.CACHED_CWD_FOR_SNAP_SHOT_IT = path.join(__dirname, '..') + return snapshot.apply(null, args) }, - setup (options = {}) { - // cleanup old node_modules that may have been around from legacy tests - before(() => { - return fs.removeAsync(Fixtures.path('projects/e2e/node_modules')) - }) - + setup (options: SetupOptions = {}) { beforeEach(async function () { // after installing node modules copying all of the fixtures // can take a long time (5-15 secs) @@ -489,12 +702,12 @@ const e2e = { }) }, - options (ctx, options = {}) { + options (ctx, options: ExecOptions) { if (options.inspectBrk != null) { throw new Error(` - passing { inspectBrk: true } to e2e options is no longer supported + passing { inspectBrk: true } to system test options is no longer supported Please pass the --cypress-inspect-brk flag to the test command instead - e.g. "yarn test test/e2e/1_async_timeouts_spec.js --cypress-inspect-brk" + e.g. "yarn test async_timeouts_spec.js --cypress-inspect-brk" `) } @@ -513,9 +726,9 @@ const e2e = { if (options.exit != null) { throw new Error(` - passing { exit: false } to e2e options is no longer supported + passing { exit: false } to system test options is no longer supported Please pass the --no-exit flag to the test command instead - e.g. "yarn test test/e2e/1_async_timeouts_spec.js --no-exit" + e.g. "yarn test async_timeouts_spec.js --no-exit" `) } @@ -546,12 +759,12 @@ const e2e = { return options }, - args (options = {}) { + args (options: ExecOptions) { debug('converting options to args %o', { options }) const args = [ // hides a user warning to go through NPM module - `--cwd=${process.cwd()}`, + `--cwd=${serverPath}`, `--run-project=${options.project}`, `--testingType=${options.testingType || 'e2e'}`, ] @@ -570,7 +783,7 @@ const e2e = { } if (!_.isUndefined(options.headed)) { - args.push('--headed', options.headed) + args.push('--headed', String(options.headed)) } if (options.record) { @@ -640,7 +853,7 @@ const e2e = { return args }, - start (ctx, options = {}) { + start (ctx, options: ExecOptions) { options = this.options(ctx, options) const args = this.args(options) @@ -658,20 +871,20 @@ const e2e = { * Executes a given project and optionally sanitizes and checks output. * @example ``` - e2e.setup() + systemTests.setup() project = Fixtures.projectPath("component-tests") - e2e.exec(this, { + systemTests.exec(this, { project, config: { video: false } }) .then (result) -> - console.log(e2e.normalizeStdout(result.stdout)) + console.log(systemTests.normalizeStdout(result.stdout)) ``` */ - exec (ctx, options = {}) { - debug('e2e exec options %o', options) + exec (ctx, options: ExecOptions) { + debug('systemTests.exec options %o', options) options = this.options(ctx, options) debug('processed options %o', options) let args = this.args(options) @@ -706,7 +919,7 @@ const e2e = { if (ostd) { const newStdout = ostd(stdout) - if (_.isString(newStdout)) { + if (newStdout && _.isString(newStdout)) { stdout = newStdout } } @@ -740,9 +953,9 @@ const e2e = { try { if (options.originalTitle) { - snapshot(options.originalTitle, str, { allowSharedSnapshot: true }) + systemTests.snapshot(options.originalTitle, str, { allowSharedSnapshot: true }) } else { - snapshot(str) + systemTests.snapshot(str) } } catch (err) { // firefox has issues with recording video. for now, ignore snapshot diffs that only differ in this error. @@ -751,7 +964,7 @@ const e2e = { throw err } - console.warn('(e2e warning) Firefox failed to process the video, but this is being ignored due to known issues with video processing in Firefox.') + console.log('(system tests warning) Firefox failed to process the video, but this is being ignored due to known issues with video processing in Firefox.') } } @@ -784,7 +997,7 @@ const e2e = { VIDEO_COMPRESSION_THROTTLE: 120000, // don't fail our own tests running from forked PR's - CYPRESS_INTERNAL_E2E_TESTS: '1', + CYPRESS_INTERNAL_SYSTEM_TESTS: '1', // Emulate no typescript environment CYPRESS_INTERNAL_NO_TYPESCRIPT: options.noTypeScript ? '1' : '0', @@ -867,6 +1080,6 @@ const e2e = { } export { - e2e as default, + systemTests as default, expect, } diff --git a/system-tests/package.json b/system-tests/package.json new file mode 100644 index 000000000000..f88ad8abd1f6 --- /dev/null +++ b/system-tests/package.json @@ -0,0 +1,80 @@ +{ + "name": "@tooling/system-tests", + "version": "0.0.0-development", + "description": "Internal cypress tests for running across multiple projects which have their own configuration for E2E and CT", + "private": true, + "main": "index.js", + "scripts": { + "test": "node ./scripts/run.js --glob-in-dir=test", + "test:ci": "node ./scripts/run.js" + }, + "devDependencies": { + "@babel/core": "7.9.0", + "@babel/preset-env": "7.9.0", + "@cypress/commit-info": "2.2.0", + "@cypress/debugging-proxy": "2.0.1", + "@cypress/json-schemas": "5.39.0", + "@cypress/request": "2.88.6", + "@cypress/request-promise": "4.2.6", + "@cypress/sinon-chai": "2.9.1", + "@cypress/webpack-preprocessor": "0.0.0-development", + "@ffprobe-installer/ffprobe": "1.1.0", + "@packages/https-proxy": "0.0.0-development", + "@packages/launcher": "0.0.0-development", + "@packages/network": "0.0.0-development", + "@packages/root": "0.0.0-development", + "@packages/server": "0.0.0-development", + "@packages/socket": "0.0.0-development", + "@packages/ts": "0.0.0-development", + "babel-loader": "8.1.0", + "bluebird": "3.7.2", + "body-parser": "1.19.0", + "chai": "1.10.0", + "chai-as-promised": "7.1.1", + "chai-subset": "1.6.0", + "chai-uuid": "1.0.6", + "chalk": "2.4.2", + "chokidar": "3.5.1", + "common-tags": "1.8.0", + "compression": "1.7.4", + "cookie-parser": "1.4.5", + "cors": "2.8.5", + "dayjs": "^1.9.3", + "debug": "4.3.2", + "execa": "1.0.0", + "express": "4.17.1", + "express-session": "1.16.1", + "express-useragent": "1.0.15", + "fluent-ffmpeg": "2.1.2", + "fs-extra": "8.1.0", + "http-mitm-proxy": "0.7.0", + "https-proxy-agent": "3.0.1", + "human-interval": "1.0.0", + "image-size": "0.8.3", + "lazy-ass": "1.6.0", + "lodash": "4.17.21", + "mocha": "7.1.0", + "mocha-banner": "1.1.2", + "mochawesome-1.5.2": "npm:mochawesome@1.5.2", + "mochawesome-2.3.1": "npm:mochawesome@2.3.1", + "mochawesome-3.0.1": "npm:mochawesome@3.0.1", + "mocked-env": "1.2.4", + "mockery": "2.1.0", + "morgan": "1.9.1", + "multer": "1.4.2", + "nock": "12.0.2", + "proxyquire": "2.1.3", + "ramda": "0.27.1", + "semver": "7.3.2", + "sinon": "5.1.1", + "snap-shot-it": "7.9.3", + "ssestream": "1.0.1", + "supertest": "4.0.2", + "systeminformation": "5.6.4", + "webpack": "4.43.0", + "ws": "5.2.3" + }, + "license": "ISC", + "author": "", + "keywords": [] +} diff --git a/packages/server/test/support/fixtures/projects/.eslintrc.json b/system-tests/projects/.eslintrc.json similarity index 100% rename from packages/server/test/support/fixtures/projects/.eslintrc.json rename to system-tests/projects/.eslintrc.json diff --git a/packages/server/test/support/fixtures/projects/browser-extensions/cypress.json b/system-tests/projects/browser-extensions/cypress.json similarity index 100% rename from packages/server/test/support/fixtures/projects/browser-extensions/cypress.json rename to system-tests/projects/browser-extensions/cypress.json diff --git a/packages/server/test/support/fixtures/projects/browser-extensions/cypress/integration/spec.js b/system-tests/projects/browser-extensions/cypress/integration/spec.js similarity index 100% rename from packages/server/test/support/fixtures/projects/browser-extensions/cypress/integration/spec.js rename to system-tests/projects/browser-extensions/cypress/integration/spec.js diff --git a/packages/server/test/support/fixtures/projects/browser-extensions/cypress/plugins/index.js b/system-tests/projects/browser-extensions/cypress/plugins/index.js similarity index 100% rename from packages/server/test/support/fixtures/projects/browser-extensions/cypress/plugins/index.js rename to system-tests/projects/browser-extensions/cypress/plugins/index.js diff --git a/packages/server/test/support/fixtures/projects/browser-extensions/index.html b/system-tests/projects/browser-extensions/index.html similarity index 100% rename from packages/server/test/support/fixtures/projects/browser-extensions/index.html rename to system-tests/projects/browser-extensions/index.html diff --git a/packages/server/test/support/fixtures/projects/busted-support-file/cypress.json b/system-tests/projects/busted-support-file/cypress.json similarity index 100% rename from packages/server/test/support/fixtures/projects/busted-support-file/cypress.json rename to system-tests/projects/busted-support-file/cypress.json diff --git a/packages/server/test/support/fixtures/projects/busted-support-file/cypress/integration/app_spec.js b/system-tests/projects/busted-support-file/cypress/integration/app_spec.js similarity index 100% rename from packages/server/test/support/fixtures/projects/busted-support-file/cypress/integration/app_spec.js rename to system-tests/projects/busted-support-file/cypress/integration/app_spec.js diff --git a/packages/server/test/support/fixtures/projects/busted-support-file/cypress/support/index.js b/system-tests/projects/busted-support-file/cypress/support/index.js similarity index 100% rename from packages/server/test/support/fixtures/projects/busted-support-file/cypress/support/index.js rename to system-tests/projects/busted-support-file/cypress/support/index.js diff --git a/packages/server/test/support/fixtures/projects/chrome-browser-preferences/cypress.json b/system-tests/projects/chrome-browser-preferences/cypress.json similarity index 100% rename from packages/server/test/support/fixtures/projects/chrome-browser-preferences/cypress.json rename to system-tests/projects/chrome-browser-preferences/cypress.json diff --git a/packages/server/test/support/fixtures/projects/chrome-browser-preferences/cypress/integration/spec.js b/system-tests/projects/chrome-browser-preferences/cypress/integration/spec.js similarity index 100% rename from packages/server/test/support/fixtures/projects/chrome-browser-preferences/cypress/integration/spec.js rename to system-tests/projects/chrome-browser-preferences/cypress/integration/spec.js diff --git a/packages/server/test/support/fixtures/projects/chrome-browser-preferences/cypress/plugins/index.js b/system-tests/projects/chrome-browser-preferences/cypress/plugins/index.js similarity index 100% rename from packages/server/test/support/fixtures/projects/chrome-browser-preferences/cypress/plugins/index.js rename to system-tests/projects/chrome-browser-preferences/cypress/plugins/index.js diff --git a/packages/server/test/support/fixtures/projects/component-tests/cypress.json b/system-tests/projects/component-tests/cypress.json similarity index 100% rename from packages/server/test/support/fixtures/projects/component-tests/cypress.json rename to system-tests/projects/component-tests/cypress.json diff --git a/packages/server/test/support/fixtures/projects/component-tests/cypress/component-tests/fails.spec.js b/system-tests/projects/component-tests/cypress/component-tests/fails.spec.js similarity index 100% rename from packages/server/test/support/fixtures/projects/component-tests/cypress/component-tests/fails.spec.js rename to system-tests/projects/component-tests/cypress/component-tests/fails.spec.js diff --git a/packages/server/test/support/fixtures/projects/component-tests/cypress/component-tests/foo.spec.js b/system-tests/projects/component-tests/cypress/component-tests/foo.spec.js similarity index 100% rename from packages/server/test/support/fixtures/projects/component-tests/cypress/component-tests/foo.spec.js rename to system-tests/projects/component-tests/cypress/component-tests/foo.spec.js diff --git a/packages/server/test/support/fixtures/projects/component-tests/cypress/integration/integration-spec.js b/system-tests/projects/component-tests/cypress/integration/integration-spec.js similarity index 100% rename from packages/server/test/support/fixtures/projects/component-tests/cypress/integration/integration-spec.js rename to system-tests/projects/component-tests/cypress/integration/integration-spec.js diff --git a/packages/server/test/support/fixtures/projects/component-tests/cypress/plugins/index.js b/system-tests/projects/component-tests/cypress/plugins/index.js similarity index 100% rename from packages/server/test/support/fixtures/projects/component-tests/cypress/plugins/index.js rename to system-tests/projects/component-tests/cypress/plugins/index.js diff --git a/packages/server/test/support/fixtures/projects/config-with-custom-file-js/cypress.config.custom.js b/system-tests/projects/config-with-custom-file-js/cypress.config.custom.js similarity index 100% rename from packages/server/test/support/fixtures/projects/config-with-custom-file-js/cypress.config.custom.js rename to system-tests/projects/config-with-custom-file-js/cypress.config.custom.js diff --git a/packages/server/test/support/fixtures/projects/config-with-custom-file-js/cypress/integration/app_spec.js b/system-tests/projects/config-with-custom-file-js/cypress/integration/app_spec.js similarity index 100% rename from packages/server/test/support/fixtures/projects/config-with-custom-file-js/cypress/integration/app_spec.js rename to system-tests/projects/config-with-custom-file-js/cypress/integration/app_spec.js diff --git a/packages/server/test/support/fixtures/projects/config-with-custom-file-ts/cypress.config.custom.ts b/system-tests/projects/config-with-custom-file-ts/cypress.config.custom.ts similarity index 100% rename from packages/server/test/support/fixtures/projects/config-with-custom-file-ts/cypress.config.custom.ts rename to system-tests/projects/config-with-custom-file-ts/cypress.config.custom.ts diff --git a/packages/server/test/support/fixtures/projects/config-with-custom-file-ts/cypress/integration/app_spec.js b/system-tests/projects/config-with-custom-file-ts/cypress/integration/app_spec.js similarity index 100% rename from packages/server/test/support/fixtures/projects/config-with-custom-file-ts/cypress/integration/app_spec.js rename to system-tests/projects/config-with-custom-file-ts/cypress/integration/app_spec.js diff --git a/packages/server/test/support/fixtures/projects/config-with-invalid-browser/cypress.json b/system-tests/projects/config-with-invalid-browser/cypress.json similarity index 100% rename from packages/server/test/support/fixtures/projects/config-with-invalid-browser/cypress.json rename to system-tests/projects/config-with-invalid-browser/cypress.json diff --git a/packages/server/test/support/fixtures/projects/config-with-invalid-browser/cypress/fixtures/example.json b/system-tests/projects/config-with-invalid-browser/cypress/fixtures/example.json similarity index 100% rename from packages/server/test/support/fixtures/projects/config-with-invalid-browser/cypress/fixtures/example.json rename to system-tests/projects/config-with-invalid-browser/cypress/fixtures/example.json diff --git a/packages/server/test/support/fixtures/projects/config-with-invalid-browser/cypress/integration/app_spec.js b/system-tests/projects/config-with-invalid-browser/cypress/integration/app_spec.js similarity index 100% rename from packages/server/test/support/fixtures/projects/config-with-invalid-browser/cypress/integration/app_spec.js rename to system-tests/projects/config-with-invalid-browser/cypress/integration/app_spec.js diff --git a/packages/server/test/support/fixtures/projects/config-with-invalid-browser/cypress/plugins/index.js b/system-tests/projects/config-with-invalid-browser/cypress/plugins/index.js similarity index 100% rename from packages/server/test/support/fixtures/projects/config-with-invalid-browser/cypress/plugins/index.js rename to system-tests/projects/config-with-invalid-browser/cypress/plugins/index.js diff --git a/packages/server/test/support/fixtures/projects/config-with-invalid-browser/cypress/support/commands.js b/system-tests/projects/config-with-invalid-browser/cypress/support/commands.js similarity index 100% rename from packages/server/test/support/fixtures/projects/config-with-invalid-browser/cypress/support/commands.js rename to system-tests/projects/config-with-invalid-browser/cypress/support/commands.js diff --git a/packages/server/test/support/fixtures/projects/config-with-invalid-browser/cypress/support/index.js b/system-tests/projects/config-with-invalid-browser/cypress/support/index.js similarity index 100% rename from packages/server/test/support/fixtures/projects/config-with-invalid-browser/cypress/support/index.js rename to system-tests/projects/config-with-invalid-browser/cypress/support/index.js diff --git a/packages/server/test/support/fixtures/projects/config-with-invalid-viewport/cypress.json b/system-tests/projects/config-with-invalid-viewport/cypress.json similarity index 100% rename from packages/server/test/support/fixtures/projects/config-with-invalid-viewport/cypress.json rename to system-tests/projects/config-with-invalid-viewport/cypress.json diff --git a/packages/server/test/support/fixtures/projects/config-with-invalid-viewport/cypress/integration/app_spec.js b/system-tests/projects/config-with-invalid-viewport/cypress/integration/app_spec.js similarity index 100% rename from packages/server/test/support/fixtures/projects/config-with-invalid-viewport/cypress/integration/app_spec.js rename to system-tests/projects/config-with-invalid-viewport/cypress/integration/app_spec.js diff --git a/packages/server/test/support/fixtures/projects/config-with-invalid-viewport/cypress/plugins/index.js b/system-tests/projects/config-with-invalid-viewport/cypress/plugins/index.js similarity index 100% rename from packages/server/test/support/fixtures/projects/config-with-invalid-viewport/cypress/plugins/index.js rename to system-tests/projects/config-with-invalid-viewport/cypress/plugins/index.js diff --git a/packages/server/test/support/fixtures/projects/config-with-js/cypress.config.js b/system-tests/projects/config-with-js/cypress.config.js similarity index 100% rename from packages/server/test/support/fixtures/projects/config-with-js/cypress.config.js rename to system-tests/projects/config-with-js/cypress.config.js diff --git a/packages/server/test/support/fixtures/projects/config-with-js/cypress/integration/app_spec.js b/system-tests/projects/config-with-js/cypress/integration/app_spec.js similarity index 100% rename from packages/server/test/support/fixtures/projects/config-with-js/cypress/integration/app_spec.js rename to system-tests/projects/config-with-js/cypress/integration/app_spec.js diff --git a/packages/server/test/support/fixtures/projects/config-with-short-timeout/cypress.json b/system-tests/projects/config-with-short-timeout/cypress.json similarity index 100% rename from packages/server/test/support/fixtures/projects/config-with-short-timeout/cypress.json rename to system-tests/projects/config-with-short-timeout/cypress.json diff --git a/packages/server/test/support/fixtures/projects/config-with-short-timeout/cypress/integration/dom_times_out_spec.js b/system-tests/projects/config-with-short-timeout/cypress/integration/dom_times_out_spec.js similarity index 100% rename from packages/server/test/support/fixtures/projects/config-with-short-timeout/cypress/integration/dom_times_out_spec.js rename to system-tests/projects/config-with-short-timeout/cypress/integration/dom_times_out_spec.js diff --git a/packages/server/test/support/fixtures/projects/config-with-short-timeout/index.html b/system-tests/projects/config-with-short-timeout/index.html similarity index 100% rename from packages/server/test/support/fixtures/projects/config-with-short-timeout/index.html rename to system-tests/projects/config-with-short-timeout/index.html diff --git a/packages/server/test/support/fixtures/projects/config-with-ts/cypress.config.ts b/system-tests/projects/config-with-ts/cypress.config.ts similarity index 100% rename from packages/server/test/support/fixtures/projects/config-with-ts/cypress.config.ts rename to system-tests/projects/config-with-ts/cypress.config.ts diff --git a/packages/server/test/support/fixtures/projects/config-with-ts/cypress/integration/app_spec.js b/system-tests/projects/config-with-ts/cypress/integration/app_spec.js similarity index 100% rename from packages/server/test/support/fixtures/projects/config-with-ts/cypress/integration/app_spec.js rename to system-tests/projects/config-with-ts/cypress/integration/app_spec.js diff --git a/packages/server/test/support/fixtures/projects/cookies/cypress.json b/system-tests/projects/cookies/cypress.json similarity index 100% rename from packages/server/test/support/fixtures/projects/cookies/cypress.json rename to system-tests/projects/cookies/cypress.json diff --git a/packages/server/test/support/fixtures/projects/cookies/cypress/integration/app_spec.js b/system-tests/projects/cookies/cypress/integration/app_spec.js similarity index 100% rename from packages/server/test/support/fixtures/projects/cookies/cypress/integration/app_spec.js rename to system-tests/projects/cookies/cypress/integration/app_spec.js diff --git a/packages/server/test/support/fixtures/projects/default-layout/cypress.json b/system-tests/projects/default-layout/cypress.json similarity index 100% rename from packages/server/test/support/fixtures/projects/default-layout/cypress.json rename to system-tests/projects/default-layout/cypress.json diff --git a/packages/server/test/support/fixtures/projects/default-layout/cypress/integration/default_layout_spec.js b/system-tests/projects/default-layout/cypress/integration/default_layout_spec.js similarity index 100% rename from packages/server/test/support/fixtures/projects/default-layout/cypress/integration/default_layout_spec.js rename to system-tests/projects/default-layout/cypress/integration/default_layout_spec.js diff --git a/packages/server/test/support/fixtures/projects/default-layout/views/layout.html b/system-tests/projects/default-layout/views/layout.html similarity index 100% rename from packages/server/test/support/fixtures/projects/default-layout/views/layout.html rename to system-tests/projects/default-layout/views/layout.html diff --git a/system-tests/projects/downloads/.gitignore b/system-tests/projects/downloads/.gitignore new file mode 100644 index 000000000000..4ff4547186c0 --- /dev/null +++ b/system-tests/projects/downloads/.gitignore @@ -0,0 +1,2 @@ +cypress/downloads +cypress/videos \ No newline at end of file diff --git a/packages/server/test/support/fixtures/projects/downloads/cypress.json b/system-tests/projects/downloads/cypress.json similarity index 100% rename from packages/server/test/support/fixtures/projects/downloads/cypress.json rename to system-tests/projects/downloads/cypress.json diff --git a/packages/server/test/support/fixtures/projects/downloads/cypress/fixtures/downloads.html b/system-tests/projects/downloads/cypress/fixtures/downloads.html similarity index 100% rename from packages/server/test/support/fixtures/projects/downloads/cypress/fixtures/downloads.html rename to system-tests/projects/downloads/cypress/fixtures/downloads.html diff --git a/packages/server/test/support/fixtures/projects/downloads/cypress/fixtures/files.zip b/system-tests/projects/downloads/cypress/fixtures/files.zip similarity index 100% rename from packages/server/test/support/fixtures/projects/downloads/cypress/fixtures/files.zip rename to system-tests/projects/downloads/cypress/fixtures/files.zip diff --git a/packages/server/test/support/fixtures/projects/downloads/cypress/fixtures/people.xlsx b/system-tests/projects/downloads/cypress/fixtures/people.xlsx similarity index 100% rename from packages/server/test/support/fixtures/projects/downloads/cypress/fixtures/people.xlsx rename to system-tests/projects/downloads/cypress/fixtures/people.xlsx diff --git a/packages/server/test/support/fixtures/projects/downloads/cypress/fixtures/records.csv b/system-tests/projects/downloads/cypress/fixtures/records.csv similarity index 100% rename from packages/server/test/support/fixtures/projects/downloads/cypress/fixtures/records.csv rename to system-tests/projects/downloads/cypress/fixtures/records.csv diff --git a/packages/server/test/support/fixtures/projects/downloads/cypress/integration/download_csv_spec.ts b/system-tests/projects/downloads/cypress/integration/download_csv_spec.ts similarity index 100% rename from packages/server/test/support/fixtures/projects/downloads/cypress/integration/download_csv_spec.ts rename to system-tests/projects/downloads/cypress/integration/download_csv_spec.ts diff --git a/packages/server/test/support/fixtures/projects/downloads/cypress/integration/downloads_spec.ts b/system-tests/projects/downloads/cypress/integration/downloads_spec.ts similarity index 100% rename from packages/server/test/support/fixtures/projects/downloads/cypress/integration/downloads_spec.ts rename to system-tests/projects/downloads/cypress/integration/downloads_spec.ts diff --git a/packages/server/test/support/fixtures/projects/downloads/cypress/integration/simple_passing_spec.ts b/system-tests/projects/downloads/cypress/integration/simple_passing_spec.ts similarity index 100% rename from packages/server/test/support/fixtures/projects/downloads/cypress/integration/simple_passing_spec.ts rename to system-tests/projects/downloads/cypress/integration/simple_passing_spec.ts diff --git a/packages/server/test/support/fixtures/projects/failures/cypress/cypress.json b/system-tests/projects/downloads/tsconfig.json similarity index 100% rename from packages/server/test/support/fixtures/projects/failures/cypress/cypress.json rename to system-tests/projects/downloads/tsconfig.json diff --git a/packages/server/test/support/fixtures/projects/e2e/cross_origin_script.html b/system-tests/projects/e2e/cross_origin_script.html similarity index 100% rename from packages/server/test/support/fixtures/projects/e2e/cross_origin_script.html rename to system-tests/projects/e2e/cross_origin_script.html diff --git a/packages/server/test/support/fixtures/projects/e2e/cypress-alt.json b/system-tests/projects/e2e/cypress-alt.json similarity index 100% rename from packages/server/test/support/fixtures/projects/e2e/cypress-alt.json rename to system-tests/projects/e2e/cypress-alt.json diff --git a/packages/server/test/support/fixtures/projects/e2e/cypress.json b/system-tests/projects/e2e/cypress.json similarity index 100% rename from packages/server/test/support/fixtures/projects/e2e/cypress.json rename to system-tests/projects/e2e/cypress.json diff --git a/packages/server/test/support/fixtures/projects/e2e/cypress/component/simple_failing_spec.js b/system-tests/projects/e2e/cypress/component/simple_failing_spec.js similarity index 100% rename from packages/server/test/support/fixtures/projects/e2e/cypress/component/simple_failing_spec.js rename to system-tests/projects/e2e/cypress/component/simple_failing_spec.js diff --git a/packages/server/test/support/fixtures/projects/e2e/cypress/fixtures/bigger-sample.pdf b/system-tests/projects/e2e/cypress/fixtures/bigger-sample.pdf similarity index 100% rename from packages/server/test/support/fixtures/projects/e2e/cypress/fixtures/bigger-sample.pdf rename to system-tests/projects/e2e/cypress/fixtures/bigger-sample.pdf diff --git a/packages/server/test/support/fixtures/projects/e2e/cypress/fixtures/example.json b/system-tests/projects/e2e/cypress/fixtures/example.json similarity index 100% rename from packages/server/test/support/fixtures/projects/e2e/cypress/fixtures/example.json rename to system-tests/projects/e2e/cypress/fixtures/example.json diff --git a/packages/server/test/support/fixtures/projects/e2e/cypress/fixtures/mjs_file.mjs b/system-tests/projects/e2e/cypress/fixtures/mjs_file.mjs similarity index 100% rename from packages/server/test/support/fixtures/projects/e2e/cypress/fixtures/mjs_file.mjs rename to system-tests/projects/e2e/cypress/fixtures/mjs_file.mjs diff --git a/packages/server/test/support/fixtures/projects/e2e/cypress/fixtures/sample.jpg b/system-tests/projects/e2e/cypress/fixtures/sample.jpg similarity index 100% rename from packages/server/test/support/fixtures/projects/e2e/cypress/fixtures/sample.jpg rename to system-tests/projects/e2e/cypress/fixtures/sample.jpg diff --git a/packages/server/test/support/fixtures/projects/e2e/cypress/fixtures/sample.pdf b/system-tests/projects/e2e/cypress/fixtures/sample.pdf similarity index 100% rename from packages/server/test/support/fixtures/projects/e2e/cypress/fixtures/sample.pdf rename to system-tests/projects/e2e/cypress/fixtures/sample.pdf diff --git a/packages/server/test/support/fixtures/projects/e2e/cypress/integration/a_record.spec.js b/system-tests/projects/e2e/cypress/integration/a_record.spec.js similarity index 100% rename from packages/server/test/support/fixtures/projects/e2e/cypress/integration/a_record.spec.js rename to system-tests/projects/e2e/cypress/integration/a_record.spec.js diff --git a/packages/server/test/support/fixtures/projects/e2e/cypress/integration/a_record_instantfail.spec.js b/system-tests/projects/e2e/cypress/integration/a_record_instantfail.spec.js similarity index 100% rename from packages/server/test/support/fixtures/projects/e2e/cypress/integration/a_record_instantfail.spec.js rename to system-tests/projects/e2e/cypress/integration/a_record_instantfail.spec.js diff --git a/packages/server/test/support/fixtures/projects/e2e/cypress/integration/assertions_failing_outside_of_test_spec.js b/system-tests/projects/e2e/cypress/integration/assertions_failing_outside_of_test_spec.js similarity index 100% rename from packages/server/test/support/fixtures/projects/e2e/cypress/integration/assertions_failing_outside_of_test_spec.js rename to system-tests/projects/e2e/cypress/integration/assertions_failing_outside_of_test_spec.js diff --git a/packages/server/test/support/fixtures/projects/e2e/cypress/integration/assertions_passing_outside_of_test_spec.js b/system-tests/projects/e2e/cypress/integration/assertions_passing_outside_of_test_spec.js similarity index 100% rename from packages/server/test/support/fixtures/projects/e2e/cypress/integration/assertions_passing_outside_of_test_spec.js rename to system-tests/projects/e2e/cypress/integration/assertions_passing_outside_of_test_spec.js diff --git a/packages/server/test/support/fixtures/projects/e2e/cypress/integration/async_timeouts_spec.js b/system-tests/projects/e2e/cypress/integration/async_timeouts_spec.js similarity index 100% rename from packages/server/test/support/fixtures/projects/e2e/cypress/integration/async_timeouts_spec.js rename to system-tests/projects/e2e/cypress/integration/async_timeouts_spec.js diff --git a/packages/server/test/support/fixtures/projects/e2e/cypress/integration/b_record.spec.js b/system-tests/projects/e2e/cypress/integration/b_record.spec.js similarity index 100% rename from packages/server/test/support/fixtures/projects/e2e/cypress/integration/b_record.spec.js rename to system-tests/projects/e2e/cypress/integration/b_record.spec.js diff --git a/packages/server/test/support/fixtures/projects/e2e/cypress/integration/base_url_spec.js b/system-tests/projects/e2e/cypress/integration/base_url_spec.js similarity index 100% rename from packages/server/test/support/fixtures/projects/e2e/cypress/integration/base_url_spec.js rename to system-tests/projects/e2e/cypress/integration/base_url_spec.js diff --git a/packages/server/test/support/fixtures/projects/e2e/cypress/integration/block_hosts_spec.js b/system-tests/projects/e2e/cypress/integration/block_hosts_spec.js similarity index 100% rename from packages/server/test/support/fixtures/projects/e2e/cypress/integration/block_hosts_spec.js rename to system-tests/projects/e2e/cypress/integration/block_hosts_spec.js diff --git a/packages/server/test/support/fixtures/projects/e2e/cypress/integration/cache_clearing_spec.js b/system-tests/projects/e2e/cypress/integration/cache_clearing_spec.js similarity index 100% rename from packages/server/test/support/fixtures/projects/e2e/cypress/integration/cache_clearing_spec.js rename to system-tests/projects/e2e/cypress/integration/cache_clearing_spec.js diff --git a/packages/server/test/support/fixtures/projects/e2e/cypress/integration/cache_spec.js b/system-tests/projects/e2e/cypress/integration/cache_spec.js similarity index 100% rename from packages/server/test/support/fixtures/projects/e2e/cypress/integration/cache_spec.js rename to system-tests/projects/e2e/cypress/integration/cache_spec.js diff --git a/packages/server/test/support/fixtures/projects/e2e/cypress/integration/caught_async_sync_test_spec.js b/system-tests/projects/e2e/cypress/integration/caught_async_sync_test_spec.js similarity index 100% rename from packages/server/test/support/fixtures/projects/e2e/cypress/integration/caught_async_sync_test_spec.js rename to system-tests/projects/e2e/cypress/integration/caught_async_sync_test_spec.js diff --git a/packages/server/test/support/fixtures/projects/e2e/cypress/integration/character_encoding_spec.js b/system-tests/projects/e2e/cypress/integration/character_encoding_spec.js similarity index 100% rename from packages/server/test/support/fixtures/projects/e2e/cypress/integration/character_encoding_spec.js rename to system-tests/projects/e2e/cypress/integration/character_encoding_spec.js diff --git a/packages/server/test/support/fixtures/projects/e2e/cypress/integration/commands_outside_of_test_spec.js b/system-tests/projects/e2e/cypress/integration/commands_outside_of_test_spec.js similarity index 100% rename from packages/server/test/support/fixtures/projects/e2e/cypress/integration/commands_outside_of_test_spec.js rename to system-tests/projects/e2e/cypress/integration/commands_outside_of_test_spec.js diff --git a/packages/server/test/support/fixtures/projects/e2e/cypress/integration/config_passing_spec.js b/system-tests/projects/e2e/cypress/integration/config_passing_spec.js similarity index 100% rename from packages/server/test/support/fixtures/projects/e2e/cypress/integration/config_passing_spec.js rename to system-tests/projects/e2e/cypress/integration/config_passing_spec.js diff --git a/packages/server/test/support/fixtures/projects/e2e/cypress/integration/config_record_spec.js b/system-tests/projects/e2e/cypress/integration/config_record_spec.js similarity index 100% rename from packages/server/test/support/fixtures/projects/e2e/cypress/integration/config_record_spec.js rename to system-tests/projects/e2e/cypress/integration/config_record_spec.js diff --git a/packages/server/test/support/fixtures/projects/e2e/cypress/integration/cookies_spec_baseurl.js b/system-tests/projects/e2e/cypress/integration/cookies_spec_baseurl.js similarity index 100% rename from packages/server/test/support/fixtures/projects/e2e/cypress/integration/cookies_spec_baseurl.js rename to system-tests/projects/e2e/cypress/integration/cookies_spec_baseurl.js diff --git a/packages/server/test/support/fixtures/projects/e2e/cypress/integration/cookies_spec_no_baseurl.js b/system-tests/projects/e2e/cypress/integration/cookies_spec_no_baseurl.js similarity index 100% rename from packages/server/test/support/fixtures/projects/e2e/cypress/integration/cookies_spec_no_baseurl.js rename to system-tests/projects/e2e/cypress/integration/cookies_spec_no_baseurl.js diff --git a/packages/server/test/support/fixtures/projects/e2e/cypress/integration/domain_2_spec.js b/system-tests/projects/e2e/cypress/integration/domain_2_spec.js similarity index 100% rename from packages/server/test/support/fixtures/projects/e2e/cypress/integration/domain_2_spec.js rename to system-tests/projects/e2e/cypress/integration/domain_2_spec.js diff --git a/packages/server/test/support/fixtures/projects/e2e/cypress/integration/domain_spec.js b/system-tests/projects/e2e/cypress/integration/domain_spec.js similarity index 100% rename from packages/server/test/support/fixtures/projects/e2e/cypress/integration/domain_spec.js rename to system-tests/projects/e2e/cypress/integration/domain_spec.js diff --git a/packages/server/test/support/fixtures/projects/e2e/cypress/integration/empty.spec.js b/system-tests/projects/e2e/cypress/integration/empty.spec.js similarity index 100% rename from packages/server/test/support/fixtures/projects/e2e/cypress/integration/empty.spec.js rename to system-tests/projects/e2e/cypress/integration/empty.spec.js diff --git a/packages/server/test/support/fixtures/projects/e2e/cypress/integration/empty_suite.spec.js b/system-tests/projects/e2e/cypress/integration/empty_suite.spec.js similarity index 100% rename from packages/server/test/support/fixtures/projects/e2e/cypress/integration/empty_suite.spec.js rename to system-tests/projects/e2e/cypress/integration/empty_suite.spec.js diff --git a/packages/server/test/support/fixtures/projects/e2e/cypress/integration/ended_early_failing_spec.js b/system-tests/projects/e2e/cypress/integration/ended_early_failing_spec.js similarity index 100% rename from packages/server/test/support/fixtures/projects/e2e/cypress/integration/ended_early_failing_spec.js rename to system-tests/projects/e2e/cypress/integration/ended_early_failing_spec.js diff --git a/packages/server/test/support/fixtures/projects/e2e/cypress/integration/es_module_import_failing_spec.js b/system-tests/projects/e2e/cypress/integration/es_module_import_failing_spec.js similarity index 100% rename from packages/server/test/support/fixtures/projects/e2e/cypress/integration/es_module_import_failing_spec.js rename to system-tests/projects/e2e/cypress/integration/es_module_import_failing_spec.js diff --git a/packages/server/test/support/fixtures/projects/e2e/cypress/integration/es_modules_in_coffee_spec.coffee b/system-tests/projects/e2e/cypress/integration/es_modules_in_coffee_spec.coffee similarity index 100% rename from packages/server/test/support/fixtures/projects/e2e/cypress/integration/es_modules_in_coffee_spec.coffee rename to system-tests/projects/e2e/cypress/integration/es_modules_in_coffee_spec.coffee diff --git a/packages/server/test/support/fixtures/projects/e2e/cypress/integration/fast_visit_spec.js b/system-tests/projects/e2e/cypress/integration/fast_visit_spec.js similarity index 100% rename from packages/server/test/support/fixtures/projects/e2e/cypress/integration/fast_visit_spec.js rename to system-tests/projects/e2e/cypress/integration/fast_visit_spec.js diff --git a/packages/server/test/support/fixtures/projects/e2e/cypress/integration/fetch_no_polyfill_spec.js b/system-tests/projects/e2e/cypress/integration/fetch_no_polyfill_spec.js similarity index 100% rename from packages/server/test/support/fixtures/projects/e2e/cypress/integration/fetch_no_polyfill_spec.js rename to system-tests/projects/e2e/cypress/integration/fetch_no_polyfill_spec.js diff --git a/packages/server/test/support/fixtures/projects/e2e/cypress/integration/fetch_spec.js b/system-tests/projects/e2e/cypress/integration/fetch_spec.js similarity index 100% rename from packages/server/test/support/fixtures/projects/e2e/cypress/integration/fetch_spec.js rename to system-tests/projects/e2e/cypress/integration/fetch_spec.js diff --git a/packages/server/test/support/fixtures/projects/e2e/cypress/integration/firefox_windowSize.js b/system-tests/projects/e2e/cypress/integration/firefox_windowSize.js similarity index 100% rename from packages/server/test/support/fixtures/projects/e2e/cypress/integration/firefox_windowSize.js rename to system-tests/projects/e2e/cypress/integration/firefox_windowSize.js diff --git a/packages/server/test/support/fixtures/projects/e2e/cypress/integration/form_submission_failing_spec.js b/system-tests/projects/e2e/cypress/integration/form_submission_failing_spec.js similarity index 100% rename from packages/server/test/support/fixtures/projects/e2e/cypress/integration/form_submission_failing_spec.js rename to system-tests/projects/e2e/cypress/integration/form_submission_failing_spec.js diff --git a/packages/server/test/support/fixtures/projects/e2e/cypress/integration/form_submission_multipart_spec.js b/system-tests/projects/e2e/cypress/integration/form_submission_multipart_spec.js similarity index 100% rename from packages/server/test/support/fixtures/projects/e2e/cypress/integration/form_submission_multipart_spec.js rename to system-tests/projects/e2e/cypress/integration/form_submission_multipart_spec.js diff --git a/packages/server/test/support/fixtures/projects/e2e/cypress/integration/form_submission_passing_spec.js b/system-tests/projects/e2e/cypress/integration/form_submission_passing_spec.js similarity index 100% rename from packages/server/test/support/fixtures/projects/e2e/cypress/integration/form_submission_passing_spec.js rename to system-tests/projects/e2e/cypress/integration/form_submission_passing_spec.js diff --git a/packages/server/test/support/fixtures/projects/e2e/cypress/integration/go_spec.js b/system-tests/projects/e2e/cypress/integration/go_spec.js similarity index 100% rename from packages/server/test/support/fixtures/projects/e2e/cypress/integration/go_spec.js rename to system-tests/projects/e2e/cypress/integration/go_spec.js diff --git a/packages/server/test/support/fixtures/projects/e2e/cypress/integration/hanging_retries_spec.js b/system-tests/projects/e2e/cypress/integration/hanging_retries_spec.js similarity index 100% rename from packages/server/test/support/fixtures/projects/e2e/cypress/integration/hanging_retries_spec.js rename to system-tests/projects/e2e/cypress/integration/hanging_retries_spec.js diff --git a/packages/server/test/support/fixtures/projects/e2e/cypress/integration/headless_spec.js b/system-tests/projects/e2e/cypress/integration/headless_spec.js similarity index 100% rename from packages/server/test/support/fixtures/projects/e2e/cypress/integration/headless_spec.js rename to system-tests/projects/e2e/cypress/integration/headless_spec.js diff --git a/packages/server/test/support/fixtures/projects/e2e/cypress/integration/hook_caught_error_failing_spec.js b/system-tests/projects/e2e/cypress/integration/hook_caught_error_failing_spec.js similarity index 100% rename from packages/server/test/support/fixtures/projects/e2e/cypress/integration/hook_caught_error_failing_spec.js rename to system-tests/projects/e2e/cypress/integration/hook_caught_error_failing_spec.js diff --git a/packages/server/test/support/fixtures/projects/e2e/cypress/integration/hook_uncaught_error_events_failing_spec.js b/system-tests/projects/e2e/cypress/integration/hook_uncaught_error_events_failing_spec.js similarity index 100% rename from packages/server/test/support/fixtures/projects/e2e/cypress/integration/hook_uncaught_error_events_failing_spec.js rename to system-tests/projects/e2e/cypress/integration/hook_uncaught_error_events_failing_spec.js diff --git a/packages/server/test/support/fixtures/projects/e2e/cypress/integration/hook_uncaught_error_failing_spec.js b/system-tests/projects/e2e/cypress/integration/hook_uncaught_error_failing_spec.js similarity index 100% rename from packages/server/test/support/fixtures/projects/e2e/cypress/integration/hook_uncaught_error_failing_spec.js rename to system-tests/projects/e2e/cypress/integration/hook_uncaught_error_failing_spec.js diff --git a/packages/server/test/support/fixtures/projects/e2e/cypress/integration/hook_uncaught_root_error_failing_spec.js b/system-tests/projects/e2e/cypress/integration/hook_uncaught_root_error_failing_spec.js similarity index 100% rename from packages/server/test/support/fixtures/projects/e2e/cypress/integration/hook_uncaught_root_error_failing_spec.js rename to system-tests/projects/e2e/cypress/integration/hook_uncaught_root_error_failing_spec.js diff --git a/packages/server/test/support/fixtures/projects/e2e/cypress/integration/https_passthru_spec.js b/system-tests/projects/e2e/cypress/integration/https_passthru_spec.js similarity index 100% rename from packages/server/test/support/fixtures/projects/e2e/cypress/integration/https_passthru_spec.js rename to system-tests/projects/e2e/cypress/integration/https_passthru_spec.js diff --git a/packages/server/test/support/fixtures/projects/e2e/cypress/integration/iframe_spec.js b/system-tests/projects/e2e/cypress/integration/iframe_spec.js similarity index 100% rename from packages/server/test/support/fixtures/projects/e2e/cypress/integration/iframe_spec.js rename to system-tests/projects/e2e/cypress/integration/iframe_spec.js diff --git a/packages/server/test/support/fixtures/projects/e2e/cypress/integration/images_spec.js b/system-tests/projects/e2e/cypress/integration/images_spec.js similarity index 100% rename from packages/server/test/support/fixtures/projects/e2e/cypress/integration/images_spec.js rename to system-tests/projects/e2e/cypress/integration/images_spec.js diff --git a/packages/server/test/support/fixtures/projects/e2e/cypress/integration/issue_149_spec.js b/system-tests/projects/e2e/cypress/integration/issue_149_spec.js similarity index 100% rename from packages/server/test/support/fixtures/projects/e2e/cypress/integration/issue_149_spec.js rename to system-tests/projects/e2e/cypress/integration/issue_149_spec.js diff --git a/packages/server/test/support/fixtures/projects/e2e/cypress/integration/issue_1669_spec.js b/system-tests/projects/e2e/cypress/integration/issue_1669_spec.js similarity index 100% rename from packages/server/test/support/fixtures/projects/e2e/cypress/integration/issue_1669_spec.js rename to system-tests/projects/e2e/cypress/integration/issue_1669_spec.js diff --git a/packages/server/test/support/fixtures/projects/e2e/cypress/integration/issue_173_spec.js b/system-tests/projects/e2e/cypress/integration/issue_173_spec.js similarity index 100% rename from packages/server/test/support/fixtures/projects/e2e/cypress/integration/issue_173_spec.js rename to system-tests/projects/e2e/cypress/integration/issue_173_spec.js diff --git a/packages/server/test/support/fixtures/projects/e2e/cypress/integration/issue_2196_spec.js b/system-tests/projects/e2e/cypress/integration/issue_2196_spec.js similarity index 100% rename from packages/server/test/support/fixtures/projects/e2e/cypress/integration/issue_2196_spec.js rename to system-tests/projects/e2e/cypress/integration/issue_2196_spec.js diff --git a/packages/server/test/support/fixtures/projects/e2e/cypress/integration/issue_5475_spec_1.js b/system-tests/projects/e2e/cypress/integration/issue_5475_spec_1.js similarity index 100% rename from packages/server/test/support/fixtures/projects/e2e/cypress/integration/issue_5475_spec_1.js rename to system-tests/projects/e2e/cypress/integration/issue_5475_spec_1.js diff --git a/packages/server/test/support/fixtures/projects/e2e/cypress/integration/issue_5475_spec_2.js b/system-tests/projects/e2e/cypress/integration/issue_5475_spec_2.js similarity index 100% rename from packages/server/test/support/fixtures/projects/e2e/cypress/integration/issue_5475_spec_2.js rename to system-tests/projects/e2e/cypress/integration/issue_5475_spec_2.js diff --git a/packages/server/test/support/fixtures/projects/e2e/cypress/integration/issue_674_spec.js b/system-tests/projects/e2e/cypress/integration/issue_674_spec.js similarity index 100% rename from packages/server/test/support/fixtures/projects/e2e/cypress/integration/issue_674_spec.js rename to system-tests/projects/e2e/cypress/integration/issue_674_spec.js diff --git a/packages/server/test/support/fixtures/projects/e2e/cypress/integration/js_error_handling_failing_spec.js b/system-tests/projects/e2e/cypress/integration/js_error_handling_failing_spec.js similarity index 100% rename from packages/server/test/support/fixtures/projects/e2e/cypress/integration/js_error_handling_failing_spec.js rename to system-tests/projects/e2e/cypress/integration/js_error_handling_failing_spec.js diff --git a/packages/server/test/support/fixtures/projects/e2e/cypress/integration/mjs_spec.mjs b/system-tests/projects/e2e/cypress/integration/mjs_spec.mjs similarity index 100% rename from packages/server/test/support/fixtures/projects/e2e/cypress/integration/mjs_spec.mjs rename to system-tests/projects/e2e/cypress/integration/mjs_spec.mjs diff --git a/packages/server/test/support/fixtures/projects/e2e/cypress/integration/multi_cookies_spec.js b/system-tests/projects/e2e/cypress/integration/multi_cookies_spec.js similarity index 100% rename from packages/server/test/support/fixtures/projects/e2e/cypress/integration/multi_cookies_spec.js rename to system-tests/projects/e2e/cypress/integration/multi_cookies_spec.js diff --git a/packages/server/test/support/fixtures/projects/e2e/cypress/integration/nested-1/nested-2/nested-3/spec.js b/system-tests/projects/e2e/cypress/integration/nested-1/nested-2/nested-3/spec.js similarity index 100% rename from packages/server/test/support/fixtures/projects/e2e/cypress/integration/nested-1/nested-2/nested-3/spec.js rename to system-tests/projects/e2e/cypress/integration/nested-1/nested-2/nested-3/spec.js diff --git a/packages/server/test/support/fixtures/projects/e2e/cypress/integration/nested-1/nested-2/nested-3/stdout_specfile.js b/system-tests/projects/e2e/cypress/integration/nested-1/nested-2/nested-3/stdout_specfile.js similarity index 100% rename from packages/server/test/support/fixtures/projects/e2e/cypress/integration/nested-1/nested-2/nested-3/stdout_specfile.js rename to system-tests/projects/e2e/cypress/integration/nested-1/nested-2/nested-3/stdout_specfile.js diff --git a/packages/server/test/support/fixtures/projects/e2e/cypress/integration/nested-1/nested-2/nested-3/stdout_specfile_display_spec_with_a_really_long_name_that_never_has_a_line_break_or_new_line.js b/system-tests/projects/e2e/cypress/integration/nested-1/nested-2/nested-3/stdout_specfile_display_spec_with_a_really_long_name_that_never_has_a_line_break_or_new_line.js similarity index 100% rename from packages/server/test/support/fixtures/projects/e2e/cypress/integration/nested-1/nested-2/nested-3/stdout_specfile_display_spec_with_a_really_long_name_that_never_has_a_line_break_or_new_line.js rename to system-tests/projects/e2e/cypress/integration/nested-1/nested-2/nested-3/stdout_specfile_display_spec_with_a_really_long_name_that_never_has_a_line_break_or_new_line.js diff --git a/packages/server/test/support/fixtures/projects/e2e/cypress/integration/nested-1/nested-2/screenshot_nested_file_spec.js b/system-tests/projects/e2e/cypress/integration/nested-1/nested-2/screenshot_nested_file_spec.js similarity index 100% rename from packages/server/test/support/fixtures/projects/e2e/cypress/integration/nested-1/nested-2/screenshot_nested_file_spec.js rename to system-tests/projects/e2e/cypress/integration/nested-1/nested-2/screenshot_nested_file_spec.js diff --git a/packages/server/test/support/fixtures/projects/e2e/cypress/integration/network_error_304_handling_spec.js b/system-tests/projects/e2e/cypress/integration/network_error_304_handling_spec.js similarity index 100% rename from packages/server/test/support/fixtures/projects/e2e/cypress/integration/network_error_304_handling_spec.js rename to system-tests/projects/e2e/cypress/integration/network_error_304_handling_spec.js diff --git a/packages/server/test/support/fixtures/projects/e2e/cypress/integration/network_error_handling_spec.js b/system-tests/projects/e2e/cypress/integration/network_error_handling_spec.js similarity index 100% rename from packages/server/test/support/fixtures/projects/e2e/cypress/integration/network_error_handling_spec.js rename to system-tests/projects/e2e/cypress/integration/network_error_handling_spec.js diff --git a/packages/server/test/support/fixtures/projects/e2e/cypress/integration/no_superfluous_screenshots_spec.js b/system-tests/projects/e2e/cypress/integration/no_superfluous_screenshots_spec.js similarity index 100% rename from packages/server/test/support/fixtures/projects/e2e/cypress/integration/no_superfluous_screenshots_spec.js rename to system-tests/projects/e2e/cypress/integration/no_superfluous_screenshots_spec.js diff --git a/packages/server/test/support/fixtures/projects/e2e/cypress/integration/node_builtins_spec.js b/system-tests/projects/e2e/cypress/integration/node_builtins_spec.js similarity index 100% rename from packages/server/test/support/fixtures/projects/e2e/cypress/integration/node_builtins_spec.js rename to system-tests/projects/e2e/cypress/integration/node_builtins_spec.js diff --git a/packages/server/test/support/fixtures/projects/e2e/cypress/integration/only_multiple_spec.js b/system-tests/projects/e2e/cypress/integration/only_multiple_spec.js similarity index 100% rename from packages/server/test/support/fixtures/projects/e2e/cypress/integration/only_multiple_spec.js rename to system-tests/projects/e2e/cypress/integration/only_multiple_spec.js diff --git a/packages/server/test/support/fixtures/projects/e2e/cypress/integration/only_spec.js b/system-tests/projects/e2e/cypress/integration/only_spec.js similarity index 100% rename from packages/server/test/support/fixtures/projects/e2e/cypress/integration/only_spec.js rename to system-tests/projects/e2e/cypress/integration/only_spec.js diff --git a/packages/server/test/support/fixtures/projects/e2e/cypress/integration/page_loading_spec.js b/system-tests/projects/e2e/cypress/integration/page_loading_spec.js similarity index 100% rename from packages/server/test/support/fixtures/projects/e2e/cypress/integration/page_loading_spec.js rename to system-tests/projects/e2e/cypress/integration/page_loading_spec.js diff --git a/packages/server/test/support/fixtures/projects/e2e/cypress/integration/plugins_config_extras_spec.js b/system-tests/projects/e2e/cypress/integration/plugins_config_extras_spec.js similarity index 100% rename from packages/server/test/support/fixtures/projects/e2e/cypress/integration/plugins_config_extras_spec.js rename to system-tests/projects/e2e/cypress/integration/plugins_config_extras_spec.js diff --git a/packages/server/test/support/fixtures/projects/e2e/cypress/integration/promises_spec.js b/system-tests/projects/e2e/cypress/integration/promises_spec.js similarity index 100% rename from packages/server/test/support/fixtures/projects/e2e/cypress/integration/promises_spec.js rename to system-tests/projects/e2e/cypress/integration/promises_spec.js diff --git a/packages/server/test/support/fixtures/projects/e2e/cypress/integration/proxying_spec.js b/system-tests/projects/e2e/cypress/integration/proxying_spec.js similarity index 100% rename from packages/server/test/support/fixtures/projects/e2e/cypress/integration/proxying_spec.js rename to system-tests/projects/e2e/cypress/integration/proxying_spec.js diff --git a/packages/server/test/support/fixtures/projects/e2e/cypress/integration/record_error_spec.js b/system-tests/projects/e2e/cypress/integration/record_error_spec.js similarity index 100% rename from packages/server/test/support/fixtures/projects/e2e/cypress/integration/record_error_spec.js rename to system-tests/projects/e2e/cypress/integration/record_error_spec.js diff --git a/packages/server/test/support/fixtures/projects/e2e/cypress/integration/record_fail_spec.js b/system-tests/projects/e2e/cypress/integration/record_fail_spec.js similarity index 100% rename from packages/server/test/support/fixtures/projects/e2e/cypress/integration/record_fail_spec.js rename to system-tests/projects/e2e/cypress/integration/record_fail_spec.js diff --git a/packages/server/test/support/fixtures/projects/e2e/cypress/integration/record_pass_spec.js b/system-tests/projects/e2e/cypress/integration/record_pass_spec.js similarity index 100% rename from packages/server/test/support/fixtures/projects/e2e/cypress/integration/record_pass_spec.js rename to system-tests/projects/e2e/cypress/integration/record_pass_spec.js diff --git a/packages/server/test/support/fixtures/projects/e2e/cypress/integration/record_uncaught_spec.js b/system-tests/projects/e2e/cypress/integration/record_uncaught_spec.js similarity index 100% rename from packages/server/test/support/fixtures/projects/e2e/cypress/integration/record_uncaught_spec.js rename to system-tests/projects/e2e/cypress/integration/record_uncaught_spec.js diff --git a/packages/server/test/support/fixtures/projects/e2e/cypress/integration/reload-spec.spec.js b/system-tests/projects/e2e/cypress/integration/reload-spec.spec.js similarity index 100% rename from packages/server/test/support/fixtures/projects/e2e/cypress/integration/reload-spec.spec.js rename to system-tests/projects/e2e/cypress/integration/reload-spec.spec.js diff --git a/packages/server/test/support/fixtures/projects/e2e/cypress/integration/request_http_network_error_failing_spec.js b/system-tests/projects/e2e/cypress/integration/request_http_network_error_failing_spec.js similarity index 100% rename from packages/server/test/support/fixtures/projects/e2e/cypress/integration/request_http_network_error_failing_spec.js rename to system-tests/projects/e2e/cypress/integration/request_http_network_error_failing_spec.js diff --git a/packages/server/test/support/fixtures/projects/e2e/cypress/integration/request_long_http_props_failing_spec.js b/system-tests/projects/e2e/cypress/integration/request_long_http_props_failing_spec.js similarity index 100% rename from packages/server/test/support/fixtures/projects/e2e/cypress/integration/request_long_http_props_failing_spec.js rename to system-tests/projects/e2e/cypress/integration/request_long_http_props_failing_spec.js diff --git a/packages/server/test/support/fixtures/projects/e2e/cypress/integration/request_spec.js b/system-tests/projects/e2e/cypress/integration/request_spec.js similarity index 100% rename from packages/server/test/support/fixtures/projects/e2e/cypress/integration/request_spec.js rename to system-tests/projects/e2e/cypress/integration/request_spec.js diff --git a/packages/server/test/support/fixtures/projects/e2e/cypress/integration/request_status_code_failing_spec.js b/system-tests/projects/e2e/cypress/integration/request_status_code_failing_spec.js similarity index 100% rename from packages/server/test/support/fixtures/projects/e2e/cypress/integration/request_status_code_failing_spec.js rename to system-tests/projects/e2e/cypress/integration/request_status_code_failing_spec.js diff --git a/packages/server/test/support/fixtures/projects/e2e/cypress/integration/return_value_spec.js b/system-tests/projects/e2e/cypress/integration/return_value_spec.js similarity index 100% rename from packages/server/test/support/fixtures/projects/e2e/cypress/integration/return_value_spec.js rename to system-tests/projects/e2e/cypress/integration/return_value_spec.js diff --git a/packages/server/test/support/fixtures/projects/e2e/cypress/integration/runnables_already_run_suite.js b/system-tests/projects/e2e/cypress/integration/runnables_already_run_suite.js similarity index 100% rename from packages/server/test/support/fixtures/projects/e2e/cypress/integration/runnables_already_run_suite.js rename to system-tests/projects/e2e/cypress/integration/runnables_already_run_suite.js diff --git a/packages/server/test/support/fixtures/projects/e2e/cypress/integration/screenshot_element_capture_spec.js b/system-tests/projects/e2e/cypress/integration/screenshot_element_capture_spec.js similarity index 100% rename from packages/server/test/support/fixtures/projects/e2e/cypress/integration/screenshot_element_capture_spec.js rename to system-tests/projects/e2e/cypress/integration/screenshot_element_capture_spec.js diff --git a/packages/server/test/support/fixtures/projects/e2e/cypress/integration/screenshot_fullpage_capture_spec.js b/system-tests/projects/e2e/cypress/integration/screenshot_fullpage_capture_spec.js similarity index 100% rename from packages/server/test/support/fixtures/projects/e2e/cypress/integration/screenshot_fullpage_capture_spec.js rename to system-tests/projects/e2e/cypress/integration/screenshot_fullpage_capture_spec.js diff --git a/packages/server/test/support/fixtures/projects/e2e/cypress/integration/screenshot_viewport_capture_spec.js b/system-tests/projects/e2e/cypress/integration/screenshot_viewport_capture_spec.js similarity index 100% rename from packages/server/test/support/fixtures/projects/e2e/cypress/integration/screenshot_viewport_capture_spec.js rename to system-tests/projects/e2e/cypress/integration/screenshot_viewport_capture_spec.js diff --git a/packages/server/test/support/fixtures/projects/e2e/cypress/integration/screenshots_spec.js b/system-tests/projects/e2e/cypress/integration/screenshots_spec.js similarity index 100% rename from packages/server/test/support/fixtures/projects/e2e/cypress/integration/screenshots_spec.js rename to system-tests/projects/e2e/cypress/integration/screenshots_spec.js diff --git a/packages/server/test/support/fixtures/projects/e2e/cypress/integration/server_sent_events_spec.js b/system-tests/projects/e2e/cypress/integration/server_sent_events_spec.js similarity index 100% rename from packages/server/test/support/fixtures/projects/e2e/cypress/integration/server_sent_events_spec.js rename to system-tests/projects/e2e/cypress/integration/server_sent_events_spec.js diff --git a/packages/server/test/support/fixtures/projects/e2e/cypress/integration/session_persist_spec_1.js b/system-tests/projects/e2e/cypress/integration/session_persist_spec_1.js similarity index 100% rename from packages/server/test/support/fixtures/projects/e2e/cypress/integration/session_persist_spec_1.js rename to system-tests/projects/e2e/cypress/integration/session_persist_spec_1.js diff --git a/packages/server/test/support/fixtures/projects/e2e/cypress/integration/session_persist_spec_2.js b/system-tests/projects/e2e/cypress/integration/session_persist_spec_2.js similarity index 100% rename from packages/server/test/support/fixtures/projects/e2e/cypress/integration/session_persist_spec_2.js rename to system-tests/projects/e2e/cypress/integration/session_persist_spec_2.js diff --git a/packages/server/test/support/fixtures/projects/e2e/cypress/integration/session_spec.js b/system-tests/projects/e2e/cypress/integration/session_spec.js similarity index 100% rename from packages/server/test/support/fixtures/projects/e2e/cypress/integration/session_spec.js rename to system-tests/projects/e2e/cypress/integration/session_spec.js diff --git a/packages/server/test/support/fixtures/projects/e2e/cypress/integration/simple_failing_hook_spec.js b/system-tests/projects/e2e/cypress/integration/simple_failing_hook_spec.js similarity index 100% rename from packages/server/test/support/fixtures/projects/e2e/cypress/integration/simple_failing_hook_spec.js rename to system-tests/projects/e2e/cypress/integration/simple_failing_hook_spec.js diff --git a/packages/server/test/support/fixtures/projects/e2e/cypress/integration/simple_failing_spec.js b/system-tests/projects/e2e/cypress/integration/simple_failing_spec.js similarity index 100% rename from packages/server/test/support/fixtures/projects/e2e/cypress/integration/simple_failing_spec.js rename to system-tests/projects/e2e/cypress/integration/simple_failing_spec.js diff --git a/packages/server/test/support/fixtures/projects/e2e/cypress/integration/simple_hooks_spec.js b/system-tests/projects/e2e/cypress/integration/simple_hooks_spec.js similarity index 100% rename from packages/server/test/support/fixtures/projects/e2e/cypress/integration/simple_hooks_spec.js rename to system-tests/projects/e2e/cypress/integration/simple_hooks_spec.js diff --git a/packages/server/test/support/fixtures/projects/e2e/cypress/integration/simple_passing_spec.js b/system-tests/projects/e2e/cypress/integration/simple_passing_spec.js similarity index 100% rename from packages/server/test/support/fixtures/projects/e2e/cypress/integration/simple_passing_spec.js rename to system-tests/projects/e2e/cypress/integration/simple_passing_spec.js diff --git a/packages/server/test/support/fixtures/projects/e2e/cypress/integration/simple_retrying_spec.js b/system-tests/projects/e2e/cypress/integration/simple_retrying_spec.js similarity index 100% rename from packages/server/test/support/fixtures/projects/e2e/cypress/integration/simple_retrying_spec.js rename to system-tests/projects/e2e/cypress/integration/simple_retrying_spec.js diff --git a/packages/server/test/support/fixtures/projects/e2e/cypress/integration/simple_spec.js b/system-tests/projects/e2e/cypress/integration/simple_spec.js similarity index 100% rename from packages/server/test/support/fixtures/projects/e2e/cypress/integration/simple_spec.js rename to system-tests/projects/e2e/cypress/integration/simple_spec.js diff --git a/packages/server/test/support/fixtures/projects/e2e/cypress/integration/source_rewriting_spec.js b/system-tests/projects/e2e/cypress/integration/source_rewriting_spec.js similarity index 100% rename from packages/server/test/support/fixtures/projects/e2e/cypress/integration/source_rewriting_spec.js rename to system-tests/projects/e2e/cypress/integration/source_rewriting_spec.js diff --git a/packages/server/test/support/fixtures/projects/e2e/cypress/integration/stdout_assertion_errors_spec.js b/system-tests/projects/e2e/cypress/integration/stdout_assertion_errors_spec.js similarity index 100% rename from packages/server/test/support/fixtures/projects/e2e/cypress/integration/stdout_assertion_errors_spec.js rename to system-tests/projects/e2e/cypress/integration/stdout_assertion_errors_spec.js diff --git a/packages/server/test/support/fixtures/projects/e2e/cypress/integration/stdout_exit_early_failing_spec.js b/system-tests/projects/e2e/cypress/integration/stdout_exit_early_failing_spec.js similarity index 100% rename from packages/server/test/support/fixtures/projects/e2e/cypress/integration/stdout_exit_early_failing_spec.js rename to system-tests/projects/e2e/cypress/integration/stdout_exit_early_failing_spec.js diff --git a/packages/server/test/support/fixtures/projects/e2e/cypress/integration/stdout_failing_spec.js b/system-tests/projects/e2e/cypress/integration/stdout_failing_spec.js similarity index 100% rename from packages/server/test/support/fixtures/projects/e2e/cypress/integration/stdout_failing_spec.js rename to system-tests/projects/e2e/cypress/integration/stdout_failing_spec.js diff --git a/packages/server/test/support/fixtures/projects/e2e/cypress/integration/stdout_passing_spec.js b/system-tests/projects/e2e/cypress/integration/stdout_passing_spec.js similarity index 100% rename from packages/server/test/support/fixtures/projects/e2e/cypress/integration/stdout_passing_spec.js rename to system-tests/projects/e2e/cypress/integration/stdout_passing_spec.js diff --git a/packages/server/test/support/fixtures/projects/e2e/cypress/integration/studio_written.spec.js b/system-tests/projects/e2e/cypress/integration/studio_written.spec.js similarity index 100% rename from packages/server/test/support/fixtures/projects/e2e/cypress/integration/studio_written.spec.js rename to system-tests/projects/e2e/cypress/integration/studio_written.spec.js diff --git a/packages/server/test/support/fixtures/projects/e2e/cypress/integration/subdomain_spec.js b/system-tests/projects/e2e/cypress/integration/subdomain_spec.js similarity index 100% rename from packages/server/test/support/fixtures/projects/e2e/cypress/integration/subdomain_spec.js rename to system-tests/projects/e2e/cypress/integration/subdomain_spec.js diff --git a/packages/server/test/support/fixtures/projects/e2e/cypress/integration/task_spec.js b/system-tests/projects/e2e/cypress/integration/task_spec.js similarity index 100% rename from packages/server/test/support/fixtures/projects/e2e/cypress/integration/task_spec.js rename to system-tests/projects/e2e/cypress/integration/task_spec.js diff --git a/packages/server/test/support/fixtures/projects/e2e/cypress/integration/testConfigOverrides-invalid-browser.js b/system-tests/projects/e2e/cypress/integration/testConfigOverrides-invalid-browser.js similarity index 100% rename from packages/server/test/support/fixtures/projects/e2e/cypress/integration/testConfigOverrides-invalid-browser.js rename to system-tests/projects/e2e/cypress/integration/testConfigOverrides-invalid-browser.js diff --git a/packages/server/test/support/fixtures/projects/e2e/cypress/integration/testConfigOverrides-skip-browser.js b/system-tests/projects/e2e/cypress/integration/testConfigOverrides-skip-browser.js similarity index 100% rename from packages/server/test/support/fixtures/projects/e2e/cypress/integration/testConfigOverrides-skip-browser.js rename to system-tests/projects/e2e/cypress/integration/testConfigOverrides-skip-browser.js diff --git a/packages/server/test/support/fixtures/projects/e2e/cypress/integration/typescript_passing_spec.ts b/system-tests/projects/e2e/cypress/integration/typescript_passing_spec.ts similarity index 100% rename from packages/server/test/support/fixtures/projects/e2e/cypress/integration/typescript_passing_spec.ts rename to system-tests/projects/e2e/cypress/integration/typescript_passing_spec.ts diff --git a/packages/server/test/support/fixtures/projects/e2e/cypress/integration/typescript_syntax_error_spec.ts b/system-tests/projects/e2e/cypress/integration/typescript_syntax_error_spec.ts similarity index 100% rename from packages/server/test/support/fixtures/projects/e2e/cypress/integration/typescript_syntax_error_spec.ts rename to system-tests/projects/e2e/cypress/integration/typescript_syntax_error_spec.ts diff --git a/packages/server/test/support/fixtures/projects/e2e/cypress/integration/uncaught_during_hook_spec.js b/system-tests/projects/e2e/cypress/integration/uncaught_during_hook_spec.js similarity index 100% rename from packages/server/test/support/fixtures/projects/e2e/cypress/integration/uncaught_during_hook_spec.js rename to system-tests/projects/e2e/cypress/integration/uncaught_during_hook_spec.js diff --git a/packages/server/test/support/fixtures/projects/e2e/cypress/integration/uncaught_during_test_spec.js b/system-tests/projects/e2e/cypress/integration/uncaught_during_test_spec.js similarity index 100% rename from packages/server/test/support/fixtures/projects/e2e/cypress/integration/uncaught_during_test_spec.js rename to system-tests/projects/e2e/cypress/integration/uncaught_during_test_spec.js diff --git a/packages/server/test/support/fixtures/projects/e2e/cypress/integration/uncaught_synchronous_before_tests_parsed.js b/system-tests/projects/e2e/cypress/integration/uncaught_synchronous_before_tests_parsed.js similarity index 100% rename from packages/server/test/support/fixtures/projects/e2e/cypress/integration/uncaught_synchronous_before_tests_parsed.js rename to system-tests/projects/e2e/cypress/integration/uncaught_synchronous_before_tests_parsed.js diff --git a/packages/server/test/support/fixtures/projects/e2e/cypress/integration/uncaught_synchronous_during_hook_spec.js b/system-tests/projects/e2e/cypress/integration/uncaught_synchronous_during_hook_spec.js similarity index 100% rename from packages/server/test/support/fixtures/projects/e2e/cypress/integration/uncaught_synchronous_during_hook_spec.js rename to system-tests/projects/e2e/cypress/integration/uncaught_synchronous_during_hook_spec.js diff --git a/packages/server/test/support/fixtures/projects/e2e/cypress/integration/user_agent_spec.js b/system-tests/projects/e2e/cypress/integration/user_agent_spec.js similarity index 100% rename from packages/server/test/support/fixtures/projects/e2e/cypress/integration/user_agent_spec.js rename to system-tests/projects/e2e/cypress/integration/user_agent_spec.js diff --git a/packages/server/test/support/fixtures/projects/e2e/cypress/integration/video_compression_spec.js b/system-tests/projects/e2e/cypress/integration/video_compression_spec.js similarity index 100% rename from packages/server/test/support/fixtures/projects/e2e/cypress/integration/video_compression_spec.js rename to system-tests/projects/e2e/cypress/integration/video_compression_spec.js diff --git a/packages/server/test/support/fixtures/projects/e2e/cypress/integration/viewport_spec.js b/system-tests/projects/e2e/cypress/integration/viewport_spec.js similarity index 100% rename from packages/server/test/support/fixtures/projects/e2e/cypress/integration/viewport_spec.js rename to system-tests/projects/e2e/cypress/integration/viewport_spec.js diff --git a/packages/server/test/support/fixtures/projects/e2e/cypress/integration/visit_file_404_response_failing_spec.js b/system-tests/projects/e2e/cypress/integration/visit_file_404_response_failing_spec.js similarity index 100% rename from packages/server/test/support/fixtures/projects/e2e/cypress/integration/visit_file_404_response_failing_spec.js rename to system-tests/projects/e2e/cypress/integration/visit_file_404_response_failing_spec.js diff --git a/packages/server/test/support/fixtures/projects/e2e/cypress/integration/visit_http_500_response_failing_spec.js b/system-tests/projects/e2e/cypress/integration/visit_http_500_response_failing_spec.js similarity index 100% rename from packages/server/test/support/fixtures/projects/e2e/cypress/integration/visit_http_500_response_failing_spec.js rename to system-tests/projects/e2e/cypress/integration/visit_http_500_response_failing_spec.js diff --git a/packages/server/test/support/fixtures/projects/e2e/cypress/integration/visit_http_network_error_failing_spec.js b/system-tests/projects/e2e/cypress/integration/visit_http_network_error_failing_spec.js similarity index 100% rename from packages/server/test/support/fixtures/projects/e2e/cypress/integration/visit_http_network_error_failing_spec.js rename to system-tests/projects/e2e/cypress/integration/visit_http_network_error_failing_spec.js diff --git a/packages/server/test/support/fixtures/projects/e2e/cypress/integration/visit_http_timeout_failing_spec.js b/system-tests/projects/e2e/cypress/integration/visit_http_timeout_failing_spec.js similarity index 100% rename from packages/server/test/support/fixtures/projects/e2e/cypress/integration/visit_http_timeout_failing_spec.js rename to system-tests/projects/e2e/cypress/integration/visit_http_timeout_failing_spec.js diff --git a/packages/server/test/support/fixtures/projects/e2e/cypress/integration/visit_non_html_content_type_failing_spec.js b/system-tests/projects/e2e/cypress/integration/visit_non_html_content_type_failing_spec.js similarity index 100% rename from packages/server/test/support/fixtures/projects/e2e/cypress/integration/visit_non_html_content_type_failing_spec.js rename to system-tests/projects/e2e/cypress/integration/visit_non_html_content_type_failing_spec.js diff --git a/packages/server/test/support/fixtures/projects/e2e/cypress/integration/visit_response_never_ends_failing_spec.js b/system-tests/projects/e2e/cypress/integration/visit_response_never_ends_failing_spec.js similarity index 100% rename from packages/server/test/support/fixtures/projects/e2e/cypress/integration/visit_response_never_ends_failing_spec.js rename to system-tests/projects/e2e/cypress/integration/visit_response_never_ends_failing_spec.js diff --git a/packages/server/test/support/fixtures/projects/e2e/cypress/integration/visit_spec.js b/system-tests/projects/e2e/cypress/integration/visit_spec.js similarity index 100% rename from packages/server/test/support/fixtures/projects/e2e/cypress/integration/visit_spec.js rename to system-tests/projects/e2e/cypress/integration/visit_spec.js diff --git a/packages/server/test/support/fixtures/projects/e2e/cypress/integration/web_security_spec.js b/system-tests/projects/e2e/cypress/integration/web_security_spec.js similarity index 100% rename from packages/server/test/support/fixtures/projects/e2e/cypress/integration/web_security_spec.js rename to system-tests/projects/e2e/cypress/integration/web_security_spec.js diff --git a/packages/server/test/support/fixtures/projects/e2e/cypress/integration/websockets_spec.js b/system-tests/projects/e2e/cypress/integration/websockets_spec.js similarity index 100% rename from packages/server/test/support/fixtures/projects/e2e/cypress/integration/websockets_spec.js rename to system-tests/projects/e2e/cypress/integration/websockets_spec.js diff --git a/packages/server/test/support/fixtures/projects/e2e/cypress/integration/window_open_spec.coffee b/system-tests/projects/e2e/cypress/integration/window_open_spec.coffee similarity index 100% rename from packages/server/test/support/fixtures/projects/e2e/cypress/integration/window_open_spec.coffee rename to system-tests/projects/e2e/cypress/integration/window_open_spec.coffee diff --git a/packages/server/test/support/fixtures/projects/e2e/cypress/integration/xhr_spec.js b/system-tests/projects/e2e/cypress/integration/xhr_spec.js similarity index 100% rename from packages/server/test/support/fixtures/projects/e2e/cypress/integration/xhr_spec.js rename to system-tests/projects/e2e/cypress/integration/xhr_spec.js diff --git a/packages/server/test/support/fixtures/projects/e2e/cypress/plugins/index.js b/system-tests/projects/e2e/cypress/plugins/index.js similarity index 98% rename from packages/server/test/support/fixtures/projects/e2e/cypress/plugins/index.js rename to system-tests/projects/e2e/cypress/plugins/index.js index 05eb0da244fd..c22dff3f00f3 100644 --- a/packages/server/test/support/fixtures/projects/e2e/cypress/plugins/index.js +++ b/system-tests/projects/e2e/cypress/plugins/index.js @@ -29,7 +29,7 @@ module.exports = (on, config) => { // TODO: fix this - in open mode, this will throw an error // since the relative path is different in open vs run mode try { - performance = require('../../../../test/support/helpers/performance') + performance = require('@tooling/system-tests/lib/performance') } catch (err) { console.error(err) } diff --git a/packages/server/test/support/fixtures/projects/e2e/cypress/support/commands.js b/system-tests/projects/e2e/cypress/support/commands.js similarity index 100% rename from packages/server/test/support/fixtures/projects/e2e/cypress/support/commands.js rename to system-tests/projects/e2e/cypress/support/commands.js diff --git a/packages/server/test/support/fixtures/projects/e2e/cypress/support/foo/bar.js b/system-tests/projects/e2e/cypress/support/foo/bar.js similarity index 100% rename from packages/server/test/support/fixtures/projects/e2e/cypress/support/foo/bar.js rename to system-tests/projects/e2e/cypress/support/foo/bar.js diff --git a/packages/server/test/support/fixtures/projects/e2e/cypress/support/index.js b/system-tests/projects/e2e/cypress/support/index.js similarity index 100% rename from packages/server/test/support/fixtures/projects/e2e/cypress/support/index.js rename to system-tests/projects/e2e/cypress/support/index.js diff --git a/packages/server/test/support/fixtures/projects/e2e/cypress/support/util.js b/system-tests/projects/e2e/cypress/support/util.js similarity index 100% rename from packages/server/test/support/fixtures/projects/e2e/cypress/support/util.js rename to system-tests/projects/e2e/cypress/support/util.js diff --git a/packages/server/test/support/fixtures/projects/e2e/elements.html b/system-tests/projects/e2e/elements.html similarity index 100% rename from packages/server/test/support/fixtures/projects/e2e/elements.html rename to system-tests/projects/e2e/elements.html diff --git a/packages/server/test/support/fixtures/projects/e2e/fail.html b/system-tests/projects/e2e/fail.html similarity index 100% rename from packages/server/test/support/fixtures/projects/e2e/fail.html rename to system-tests/projects/e2e/fail.html diff --git a/packages/server/test/support/fixtures/projects/e2e/forms.html b/system-tests/projects/e2e/forms.html similarity index 100% rename from packages/server/test/support/fixtures/projects/e2e/forms.html rename to system-tests/projects/e2e/forms.html diff --git a/packages/server/test/support/fixtures/projects/e2e/hash.html b/system-tests/projects/e2e/hash.html similarity index 100% rename from packages/server/test/support/fixtures/projects/e2e/hash.html rename to system-tests/projects/e2e/hash.html diff --git a/packages/server/test/support/fixtures/projects/e2e/index.html b/system-tests/projects/e2e/index.html similarity index 100% rename from packages/server/test/support/fixtures/projects/e2e/index.html rename to system-tests/projects/e2e/index.html diff --git a/packages/server/test/support/fixtures/projects/e2e/jquery.html b/system-tests/projects/e2e/jquery.html similarity index 100% rename from packages/server/test/support/fixtures/projects/e2e/jquery.html rename to system-tests/projects/e2e/jquery.html diff --git a/packages/server/test/support/fixtures/projects/e2e/js_errors.html b/system-tests/projects/e2e/js_errors.html similarity index 100% rename from packages/server/test/support/fixtures/projects/e2e/js_errors.html rename to system-tests/projects/e2e/js_errors.html diff --git a/packages/server/test/support/fixtures/projects/e2e/lib/bar.js b/system-tests/projects/e2e/lib/bar.js similarity index 100% rename from packages/server/test/support/fixtures/projects/e2e/lib/bar.js rename to system-tests/projects/e2e/lib/bar.js diff --git a/packages/server/test/support/fixtures/projects/e2e/lib/baz.js b/system-tests/projects/e2e/lib/baz.js similarity index 100% rename from packages/server/test/support/fixtures/projects/e2e/lib/baz.js rename to system-tests/projects/e2e/lib/baz.js diff --git a/packages/server/test/support/fixtures/projects/e2e/lib/dom.jsx b/system-tests/projects/e2e/lib/dom.jsx similarity index 100% rename from packages/server/test/support/fixtures/projects/e2e/lib/dom.jsx rename to system-tests/projects/e2e/lib/dom.jsx diff --git a/packages/server/test/support/fixtures/projects/e2e/lib/fail.js b/system-tests/projects/e2e/lib/fail.js similarity index 100% rename from packages/server/test/support/fixtures/projects/e2e/lib/fail.js rename to system-tests/projects/e2e/lib/fail.js diff --git a/packages/server/test/support/fixtures/projects/e2e/lib/foo.coffee b/system-tests/projects/e2e/lib/foo.coffee similarity index 100% rename from packages/server/test/support/fixtures/projects/e2e/lib/foo.coffee rename to system-tests/projects/e2e/lib/foo.coffee diff --git a/packages/server/test/support/fixtures/projects/e2e/obstructive_code.html b/system-tests/projects/e2e/obstructive_code.html similarity index 100% rename from packages/server/test/support/fixtures/projects/e2e/obstructive_code.html rename to system-tests/projects/e2e/obstructive_code.html diff --git a/packages/server/test/support/fixtures/projects/e2e/outer.html b/system-tests/projects/e2e/outer.html similarity index 100% rename from packages/server/test/support/fixtures/projects/e2e/outer.html rename to system-tests/projects/e2e/outer.html diff --git a/packages/server/test/support/fixtures/projects/e2e/outer_404.html b/system-tests/projects/e2e/outer_404.html similarity index 100% rename from packages/server/test/support/fixtures/projects/e2e/outer_404.html rename to system-tests/projects/e2e/outer_404.html diff --git a/packages/server/test/support/fixtures/projects/e2e/package.json b/system-tests/projects/e2e/package.json similarity index 100% rename from packages/server/test/support/fixtures/projects/e2e/package.json rename to system-tests/projects/e2e/package.json diff --git a/packages/server/test/support/fixtures/projects/e2e/reporters/custom.js b/system-tests/projects/e2e/reporters/custom.js similarity index 100% rename from packages/server/test/support/fixtures/projects/e2e/reporters/custom.js rename to system-tests/projects/e2e/reporters/custom.js diff --git a/packages/server/test/support/fixtures/projects/e2e/reporters/throws.js b/system-tests/projects/e2e/reporters/throws.js similarity index 100% rename from packages/server/test/support/fixtures/projects/e2e/reporters/throws.js rename to system-tests/projects/e2e/reporters/throws.js diff --git a/packages/server/test/support/fixtures/projects/e2e/reporters/uses-file.js b/system-tests/projects/e2e/reporters/uses-file.js similarity index 100% rename from packages/server/test/support/fixtures/projects/e2e/reporters/uses-file.js rename to system-tests/projects/e2e/reporters/uses-file.js diff --git a/packages/server/test/support/fixtures/projects/e2e/scrollable.html b/system-tests/projects/e2e/scrollable.html similarity index 100% rename from packages/server/test/support/fixtures/projects/e2e/scrollable.html rename to system-tests/projects/e2e/scrollable.html diff --git a/packages/server/test/support/fixtures/projects/e2e/static/FiraSans-Regular.woff b/system-tests/projects/e2e/static/FiraSans-Regular.woff similarity index 100% rename from packages/server/test/support/fixtures/projects/e2e/static/FiraSans-Regular.woff rename to system-tests/projects/e2e/static/FiraSans-Regular.woff diff --git a/packages/server/test/support/fixtures/projects/e2e/static/FiraSans-Regular.woff.gz b/system-tests/projects/e2e/static/FiraSans-Regular.woff.gz similarity index 100% rename from packages/server/test/support/fixtures/projects/e2e/static/FiraSans-Regular.woff.gz rename to system-tests/projects/e2e/static/FiraSans-Regular.woff.gz diff --git a/packages/server/test/support/fixtures/projects/e2e/static/charsets/euc-kr.html b/system-tests/projects/e2e/static/charsets/euc-kr.html similarity index 100% rename from packages/server/test/support/fixtures/projects/e2e/static/charsets/euc-kr.html rename to system-tests/projects/e2e/static/charsets/euc-kr.html diff --git a/packages/server/test/support/fixtures/projects/e2e/static/charsets/gb2312.html b/system-tests/projects/e2e/static/charsets/gb2312.html similarity index 100% rename from packages/server/test/support/fixtures/projects/e2e/static/charsets/gb2312.html rename to system-tests/projects/e2e/static/charsets/gb2312.html diff --git a/packages/server/test/support/fixtures/projects/e2e/static/charsets/iso-8859-1.html b/system-tests/projects/e2e/static/charsets/iso-8859-1.html similarity index 100% rename from packages/server/test/support/fixtures/projects/e2e/static/charsets/iso-8859-1.html rename to system-tests/projects/e2e/static/charsets/iso-8859-1.html diff --git a/packages/server/test/support/fixtures/projects/e2e/static/charsets/shift-jis.html b/system-tests/projects/e2e/static/charsets/shift-jis.html similarity index 100% rename from packages/server/test/support/fixtures/projects/e2e/static/charsets/shift-jis.html rename to system-tests/projects/e2e/static/charsets/shift-jis.html diff --git a/packages/server/test/support/fixtures/projects/e2e/static/content.json b/system-tests/projects/e2e/static/content.json similarity index 100% rename from packages/server/test/support/fixtures/projects/e2e/static/content.json rename to system-tests/projects/e2e/static/content.json diff --git a/packages/server/test/support/fixtures/projects/e2e/static/fail.js b/system-tests/projects/e2e/static/fail.js similarity index 100% rename from packages/server/test/support/fixtures/projects/e2e/static/fail.js rename to system-tests/projects/e2e/static/fail.js diff --git a/packages/server/test/support/fixtures/projects/e2e/static/hello.txt b/system-tests/projects/e2e/static/hello.txt similarity index 100% rename from packages/server/test/support/fixtures/projects/e2e/static/hello.txt rename to system-tests/projects/e2e/static/hello.txt diff --git a/packages/server/test/support/fixtures/projects/e2e/static/iframe/index.html b/system-tests/projects/e2e/static/iframe/index.html similarity index 100% rename from packages/server/test/support/fixtures/projects/e2e/static/iframe/index.html rename to system-tests/projects/e2e/static/iframe/index.html diff --git a/packages/server/test/support/fixtures/projects/e2e/static/javascript-logo.png b/system-tests/projects/e2e/static/javascript-logo.png similarity index 100% rename from packages/server/test/support/fixtures/projects/e2e/static/javascript-logo.png rename to system-tests/projects/e2e/static/javascript-logo.png diff --git a/packages/server/test/support/fixtures/projects/e2e/static/javascript-logo.png.gz b/system-tests/projects/e2e/static/javascript-logo.png.gz similarity index 100% rename from packages/server/test/support/fixtures/projects/e2e/static/javascript-logo.png.gz rename to system-tests/projects/e2e/static/javascript-logo.png.gz diff --git a/packages/server/test/support/fixtures/projects/e2e/static/jquery.js b/system-tests/projects/e2e/static/jquery.js similarity index 100% rename from packages/server/test/support/fixtures/projects/e2e/static/jquery.js rename to system-tests/projects/e2e/static/jquery.js diff --git a/packages/server/test/support/fixtures/projects/e2e/static/obstructive_code.js b/system-tests/projects/e2e/static/obstructive_code.js similarity index 100% rename from packages/server/test/support/fixtures/projects/e2e/static/obstructive_code.js rename to system-tests/projects/e2e/static/obstructive_code.js diff --git a/packages/server/test/support/fixtures/projects/e2e/static/onclick_redirect.html b/system-tests/projects/e2e/static/onclick_redirect.html similarity index 100% rename from packages/server/test/support/fixtures/projects/e2e/static/onclick_redirect.html rename to system-tests/projects/e2e/static/onclick_redirect.html diff --git a/packages/server/test/support/fixtures/projects/e2e/static/settimeout_basetag_redirect.html b/system-tests/projects/e2e/static/settimeout_basetag_redirect.html similarity index 100% rename from packages/server/test/support/fixtures/projects/e2e/static/settimeout_basetag_redirect.html rename to system-tests/projects/e2e/static/settimeout_basetag_redirect.html diff --git a/packages/server/test/support/fixtures/projects/e2e/static/settimeout_redirect_assign.html b/system-tests/projects/e2e/static/settimeout_redirect_assign.html similarity index 100% rename from packages/server/test/support/fixtures/projects/e2e/static/settimeout_redirect_assign.html rename to system-tests/projects/e2e/static/settimeout_redirect_assign.html diff --git a/packages/server/test/support/fixtures/projects/e2e/static/settimeout_redirect_document_href.html b/system-tests/projects/e2e/static/settimeout_redirect_document_href.html similarity index 100% rename from packages/server/test/support/fixtures/projects/e2e/static/settimeout_redirect_document_href.html rename to system-tests/projects/e2e/static/settimeout_redirect_document_href.html diff --git a/packages/server/test/support/fixtures/projects/e2e/static/settimeout_redirect_href.html b/system-tests/projects/e2e/static/settimeout_redirect_href.html similarity index 100% rename from packages/server/test/support/fixtures/projects/e2e/static/settimeout_redirect_href.html rename to system-tests/projects/e2e/static/settimeout_redirect_href.html diff --git a/packages/server/test/support/fixtures/projects/e2e/static/settimeout_redirect_href_hash.html b/system-tests/projects/e2e/static/settimeout_redirect_href_hash.html similarity index 100% rename from packages/server/test/support/fixtures/projects/e2e/static/settimeout_redirect_href_hash.html rename to system-tests/projects/e2e/static/settimeout_redirect_href_hash.html diff --git a/packages/server/test/support/fixtures/projects/e2e/static/settimeout_redirect_pathname.html b/system-tests/projects/e2e/static/settimeout_redirect_pathname.html similarity index 100% rename from packages/server/test/support/fixtures/projects/e2e/static/settimeout_redirect_pathname.html rename to system-tests/projects/e2e/static/settimeout_redirect_pathname.html diff --git a/packages/server/test/support/fixtures/projects/e2e/static/settimeout_redirect_replace.html b/system-tests/projects/e2e/static/settimeout_redirect_replace.html similarity index 100% rename from packages/server/test/support/fixtures/projects/e2e/static/settimeout_redirect_replace.html rename to system-tests/projects/e2e/static/settimeout_redirect_replace.html diff --git a/packages/server/test/support/fixtures/projects/e2e/static/settimeout_redirect_search.html b/system-tests/projects/e2e/static/settimeout_redirect_search.html similarity index 100% rename from packages/server/test/support/fixtures/projects/e2e/static/settimeout_redirect_search.html rename to system-tests/projects/e2e/static/settimeout_redirect_search.html diff --git a/packages/server/test/support/fixtures/projects/e2e/static/settimeout_redirect_set_document_location.html b/system-tests/projects/e2e/static/settimeout_redirect_set_document_location.html similarity index 100% rename from packages/server/test/support/fixtures/projects/e2e/static/settimeout_redirect_set_document_location.html rename to system-tests/projects/e2e/static/settimeout_redirect_set_document_location.html diff --git a/packages/server/test/support/fixtures/projects/e2e/static/settimeout_redirect_set_document_location_hash.html b/system-tests/projects/e2e/static/settimeout_redirect_set_document_location_hash.html similarity index 100% rename from packages/server/test/support/fixtures/projects/e2e/static/settimeout_redirect_set_document_location_hash.html rename to system-tests/projects/e2e/static/settimeout_redirect_set_document_location_hash.html diff --git a/packages/server/test/support/fixtures/projects/e2e/static/settimeout_redirect_set_location.html b/system-tests/projects/e2e/static/settimeout_redirect_set_location.html similarity index 100% rename from packages/server/test/support/fixtures/projects/e2e/static/settimeout_redirect_set_location.html rename to system-tests/projects/e2e/static/settimeout_redirect_set_location.html diff --git a/packages/server/test/support/fixtures/projects/e2e/static/settimeout_redirect_set_window_document_location.html b/system-tests/projects/e2e/static/settimeout_redirect_set_window_document_location.html similarity index 100% rename from packages/server/test/support/fixtures/projects/e2e/static/settimeout_redirect_set_window_document_location.html rename to system-tests/projects/e2e/static/settimeout_redirect_set_window_document_location.html diff --git a/packages/server/test/support/fixtures/projects/e2e/static/settimeout_redirect_set_window_location.html b/system-tests/projects/e2e/static/settimeout_redirect_set_window_location.html similarity index 100% rename from packages/server/test/support/fixtures/projects/e2e/static/settimeout_redirect_set_window_location.html rename to system-tests/projects/e2e/static/settimeout_redirect_set_window_location.html diff --git a/packages/server/test/support/fixtures/projects/e2e/static/settimeout_redirect_window_document_href.html b/system-tests/projects/e2e/static/settimeout_redirect_window_document_href.html similarity index 100% rename from packages/server/test/support/fixtures/projects/e2e/static/settimeout_redirect_window_document_href.html rename to system-tests/projects/e2e/static/settimeout_redirect_window_document_href.html diff --git a/packages/server/test/support/fixtures/projects/e2e/static/settimeout_redirect_window_href.html b/system-tests/projects/e2e/static/settimeout_redirect_window_href.html similarity index 100% rename from packages/server/test/support/fixtures/projects/e2e/static/settimeout_redirect_window_href.html rename to system-tests/projects/e2e/static/settimeout_redirect_window_href.html diff --git a/packages/server/test/support/fixtures/projects/e2e/static/simple_obstructive_code.js b/system-tests/projects/e2e/static/simple_obstructive_code.js similarity index 100% rename from packages/server/test/support/fixtures/projects/e2e/static/simple_obstructive_code.js rename to system-tests/projects/e2e/static/simple_obstructive_code.js diff --git a/packages/server/test/support/fixtures/projects/e2e/static/xhr_onload_redirect.html b/system-tests/projects/e2e/static/xhr_onload_redirect.html similarity index 100% rename from packages/server/test/support/fixtures/projects/e2e/static/xhr_onload_redirect.html rename to system-tests/projects/e2e/static/xhr_onload_redirect.html diff --git a/system-tests/projects/e2e/tsconfig.json b/system-tests/projects/e2e/tsconfig.json new file mode 100644 index 000000000000..278913508efa --- /dev/null +++ b/system-tests/projects/e2e/tsconfig.json @@ -0,0 +1,7 @@ +{ + "compilerOptions": { + "jsx": "react", + "esModuleInterop": true, + "allowSyntheticDefaultImports": true + } +} \ No newline at end of file diff --git a/packages/server/test/support/fixtures/projects/e2e/visit_error.html b/system-tests/projects/e2e/visit_error.html similarity index 100% rename from packages/server/test/support/fixtures/projects/e2e/visit_error.html rename to system-tests/projects/e2e/visit_error.html diff --git a/packages/server/test/support/fixtures/projects/e2e/window_open.html b/system-tests/projects/e2e/window_open.html similarity index 100% rename from packages/server/test/support/fixtures/projects/e2e/window_open.html rename to system-tests/projects/e2e/window_open.html diff --git a/packages/server/test/support/fixtures/projects/e2e/xhr.html b/system-tests/projects/e2e/xhr.html similarity index 100% rename from packages/server/test/support/fixtures/projects/e2e/xhr.html rename to system-tests/projects/e2e/xhr.html diff --git a/packages/server/test/support/fixtures/projects/empty-folders/cypress.json b/system-tests/projects/empty-folders/cypress.json similarity index 100% rename from packages/server/test/support/fixtures/projects/empty-folders/cypress.json rename to system-tests/projects/empty-folders/cypress.json diff --git a/packages/server/test/support/fixtures/projects/empty-folders/cypress/plugins/.gitkeep b/system-tests/projects/empty-folders/cypress/plugins/.gitkeep similarity index 100% rename from packages/server/test/support/fixtures/projects/empty-folders/cypress/plugins/.gitkeep rename to system-tests/projects/empty-folders/cypress/plugins/.gitkeep diff --git a/packages/server/test/support/fixtures/projects/empty-folders/cypress/support/.gitkeep b/system-tests/projects/empty-folders/cypress/support/.gitkeep similarity index 100% rename from packages/server/test/support/fixtures/projects/empty-folders/cypress/support/.gitkeep rename to system-tests/projects/empty-folders/cypress/support/.gitkeep diff --git a/packages/server/test/support/fixtures/projects/ids/cypress.json b/system-tests/projects/failures/cypress/cypress.json similarity index 100% rename from packages/server/test/support/fixtures/projects/ids/cypress.json rename to system-tests/projects/failures/cypress/cypress.json diff --git a/packages/server/test/support/fixtures/projects/failures/cypress/integration/app_spec.js b/system-tests/projects/failures/cypress/integration/app_spec.js similarity index 100% rename from packages/server/test/support/fixtures/projects/failures/cypress/integration/app_spec.js rename to system-tests/projects/failures/cypress/integration/app_spec.js diff --git a/packages/server/test/support/fixtures/projects/failures/cypress/integration/syntax_error.js b/system-tests/projects/failures/cypress/integration/syntax_error.js similarity index 100% rename from packages/server/test/support/fixtures/projects/failures/cypress/integration/syntax_error.js rename to system-tests/projects/failures/cypress/integration/syntax_error.js diff --git a/packages/server/test/support/fixtures/projects/firefox-memory/cypress.json b/system-tests/projects/firefox-memory/cypress.json similarity index 100% rename from packages/server/test/support/fixtures/projects/firefox-memory/cypress.json rename to system-tests/projects/firefox-memory/cypress.json diff --git a/packages/server/test/support/fixtures/projects/firefox-memory/cypress/integration/spec.js b/system-tests/projects/firefox-memory/cypress/integration/spec.js similarity index 100% rename from packages/server/test/support/fixtures/projects/firefox-memory/cypress/integration/spec.js rename to system-tests/projects/firefox-memory/cypress/integration/spec.js diff --git a/packages/server/test/support/fixtures/projects/firefox-memory/cypress/plugins/index.js b/system-tests/projects/firefox-memory/cypress/plugins/index.js similarity index 100% rename from packages/server/test/support/fixtures/projects/firefox-memory/cypress/plugins/index.js rename to system-tests/projects/firefox-memory/cypress/plugins/index.js diff --git a/packages/server/test/support/fixtures/projects/fixture-subfolder-of-integration/cypress.json b/system-tests/projects/fixture-subfolder-of-integration/cypress.json similarity index 100% rename from packages/server/test/support/fixtures/projects/fixture-subfolder-of-integration/cypress.json rename to system-tests/projects/fixture-subfolder-of-integration/cypress.json diff --git a/packages/server/test/support/fixtures/projects/fixture-subfolder-of-integration/test/fixtures/example.json b/system-tests/projects/fixture-subfolder-of-integration/test/fixtures/example.json similarity index 100% rename from packages/server/test/support/fixtures/projects/fixture-subfolder-of-integration/test/fixtures/example.json rename to system-tests/projects/fixture-subfolder-of-integration/test/fixtures/example.json diff --git a/packages/server/test/support/fixtures/projects/fixture-subfolder-of-integration/test/spec.js b/system-tests/projects/fixture-subfolder-of-integration/test/spec.js similarity index 100% rename from packages/server/test/support/fixtures/projects/fixture-subfolder-of-integration/test/spec.js rename to system-tests/projects/fixture-subfolder-of-integration/test/spec.js diff --git a/packages/server/test/support/fixtures/projects/folder-same-as-fixture/cypress.json b/system-tests/projects/folder-same-as-fixture/cypress.json similarity index 100% rename from packages/server/test/support/fixtures/projects/folder-same-as-fixture/cypress.json rename to system-tests/projects/folder-same-as-fixture/cypress.json diff --git a/packages/server/test/support/fixtures/projects/folder-same-as-fixture/cypress/fixtures/foo.json b/system-tests/projects/folder-same-as-fixture/cypress/fixtures/foo.json similarity index 100% rename from packages/server/test/support/fixtures/projects/folder-same-as-fixture/cypress/fixtures/foo.json rename to system-tests/projects/folder-same-as-fixture/cypress/fixtures/foo.json diff --git a/packages/server/test/support/fixtures/projects/folder-same-as-fixture/cypress/fixtures/foo/.gitkeep b/system-tests/projects/folder-same-as-fixture/cypress/fixtures/foo/.gitkeep similarity index 100% rename from packages/server/test/support/fixtures/projects/folder-same-as-fixture/cypress/fixtures/foo/.gitkeep rename to system-tests/projects/folder-same-as-fixture/cypress/fixtures/foo/.gitkeep diff --git a/packages/server/test/support/fixtures/projects/hooks-after-rerun/cypress.json b/system-tests/projects/hooks-after-rerun/cypress.json similarity index 100% rename from packages/server/test/support/fixtures/projects/hooks-after-rerun/cypress.json rename to system-tests/projects/hooks-after-rerun/cypress.json diff --git a/packages/server/test/support/fixtures/projects/hooks-after-rerun/cypress/integration/beforehook-and-test-navigation.js b/system-tests/projects/hooks-after-rerun/cypress/integration/beforehook-and-test-navigation.js similarity index 100% rename from packages/server/test/support/fixtures/projects/hooks-after-rerun/cypress/integration/beforehook-and-test-navigation.js rename to system-tests/projects/hooks-after-rerun/cypress/integration/beforehook-and-test-navigation.js diff --git a/packages/server/test/support/fixtures/projects/hooks-after-rerun/cypress/integration/runnable-run-count.spec.js b/system-tests/projects/hooks-after-rerun/cypress/integration/runnable-run-count.spec.js similarity index 100% rename from packages/server/test/support/fixtures/projects/hooks-after-rerun/cypress/integration/runnable-run-count.spec.js rename to system-tests/projects/hooks-after-rerun/cypress/integration/runnable-run-count.spec.js diff --git a/packages/server/test/support/fixtures/projects/hooks-after-rerun/cypress/plugins/index.js b/system-tests/projects/hooks-after-rerun/cypress/plugins/index.js similarity index 100% rename from packages/server/test/support/fixtures/projects/hooks-after-rerun/cypress/plugins/index.js rename to system-tests/projects/hooks-after-rerun/cypress/plugins/index.js diff --git a/packages/server/test/support/fixtures/projects/hooks-after-rerun/cypress/support/index.js b/system-tests/projects/hooks-after-rerun/cypress/support/index.js similarity index 100% rename from packages/server/test/support/fixtures/projects/hooks-after-rerun/cypress/support/index.js rename to system-tests/projects/hooks-after-rerun/cypress/support/index.js diff --git a/packages/server/test/support/fixtures/projects/max-listeners/cypress.json b/system-tests/projects/ids/cypress.json similarity index 100% rename from packages/server/test/support/fixtures/projects/max-listeners/cypress.json rename to system-tests/projects/ids/cypress.json diff --git a/packages/server/test/support/fixtures/projects/ids/cypress/.eslintrc.json b/system-tests/projects/ids/cypress/.eslintrc.json similarity index 100% rename from packages/server/test/support/fixtures/projects/ids/cypress/.eslintrc.json rename to system-tests/projects/ids/cypress/.eslintrc.json diff --git a/packages/server/test/support/fixtures/projects/ids/cypress/fixtures/example.json b/system-tests/projects/ids/cypress/fixtures/example.json similarity index 100% rename from packages/server/test/support/fixtures/projects/ids/cypress/fixtures/example.json rename to system-tests/projects/ids/cypress/fixtures/example.json diff --git a/packages/server/test/support/fixtures/projects/ids/cypress/integration/0.844061cbceddba47c476.hot-update.js b/system-tests/projects/ids/cypress/integration/0.844061cbceddba47c476.hot-update.js similarity index 100% rename from packages/server/test/support/fixtures/projects/ids/cypress/integration/0.844061cbceddba47c476.hot-update.js rename to system-tests/projects/ids/cypress/integration/0.844061cbceddba47c476.hot-update.js diff --git a/packages/server/test/support/fixtures/projects/ids/cypress/integration/bar.js b/system-tests/projects/ids/cypress/integration/bar.js similarity index 100% rename from packages/server/test/support/fixtures/projects/ids/cypress/integration/bar.js rename to system-tests/projects/ids/cypress/integration/bar.js diff --git a/packages/server/test/support/fixtures/projects/ids/cypress/integration/baz.js b/system-tests/projects/ids/cypress/integration/baz.js similarity index 100% rename from packages/server/test/support/fixtures/projects/ids/cypress/integration/baz.js rename to system-tests/projects/ids/cypress/integration/baz.js diff --git a/packages/server/test/support/fixtures/projects/ids/cypress/integration/dom.jsx b/system-tests/projects/ids/cypress/integration/dom.jsx similarity index 100% rename from packages/server/test/support/fixtures/projects/ids/cypress/integration/dom.jsx rename to system-tests/projects/ids/cypress/integration/dom.jsx diff --git a/packages/server/test/support/fixtures/projects/ids/cypress/integration/es6.js b/system-tests/projects/ids/cypress/integration/es6.js similarity index 100% rename from packages/server/test/support/fixtures/projects/ids/cypress/integration/es6.js rename to system-tests/projects/ids/cypress/integration/es6.js diff --git a/packages/server/test/support/fixtures/projects/ids/cypress/integration/foo.coffee b/system-tests/projects/ids/cypress/integration/foo.coffee similarity index 100% rename from packages/server/test/support/fixtures/projects/ids/cypress/integration/foo.coffee rename to system-tests/projects/ids/cypress/integration/foo.coffee diff --git a/packages/server/test/support/fixtures/projects/ids/cypress/integration/nested/tmp.js b/system-tests/projects/ids/cypress/integration/nested/tmp.js similarity index 100% rename from packages/server/test/support/fixtures/projects/ids/cypress/integration/nested/tmp.js rename to system-tests/projects/ids/cypress/integration/nested/tmp.js diff --git a/packages/server/test/support/fixtures/projects/ids/cypress/integration/noop.coffee b/system-tests/projects/ids/cypress/integration/noop.coffee similarity index 100% rename from packages/server/test/support/fixtures/projects/ids/cypress/integration/noop.coffee rename to system-tests/projects/ids/cypress/integration/noop.coffee diff --git a/packages/server/test/support/fixtures/projects/ids/cypress/support/index.js b/system-tests/projects/ids/cypress/support/index.js similarity index 100% rename from packages/server/test/support/fixtures/projects/ids/cypress/support/index.js rename to system-tests/projects/ids/cypress/support/index.js diff --git a/packages/server/test/support/fixtures/projects/integration-outside-project-root/integration/failing_spec.js b/system-tests/projects/integration-outside-project-root/integration/failing_spec.js similarity index 100% rename from packages/server/test/support/fixtures/projects/integration-outside-project-root/integration/failing_spec.js rename to system-tests/projects/integration-outside-project-root/integration/failing_spec.js diff --git a/packages/server/test/support/fixtures/projects/integration-outside-project-root/project-root/cypress.json b/system-tests/projects/integration-outside-project-root/project-root/cypress.json similarity index 100% rename from packages/server/test/support/fixtures/projects/integration-outside-project-root/project-root/cypress.json rename to system-tests/projects/integration-outside-project-root/project-root/cypress.json diff --git a/packages/server/test/support/fixtures/projects/issue-8111-iframe-input/cypress.json b/system-tests/projects/issue-8111-iframe-input/cypress.json similarity index 100% rename from packages/server/test/support/fixtures/projects/issue-8111-iframe-input/cypress.json rename to system-tests/projects/issue-8111-iframe-input/cypress.json diff --git a/packages/server/test/support/fixtures/projects/issue-8111-iframe-input/cypress/integration/iframe_input_spec.js b/system-tests/projects/issue-8111-iframe-input/cypress/integration/iframe_input_spec.js similarity index 100% rename from packages/server/test/support/fixtures/projects/issue-8111-iframe-input/cypress/integration/iframe_input_spec.js rename to system-tests/projects/issue-8111-iframe-input/cypress/integration/iframe_input_spec.js diff --git a/packages/server/test/support/fixtures/projects/issue-8111-iframe-input/cypress/plugins/index.js b/system-tests/projects/issue-8111-iframe-input/cypress/plugins/index.js similarity index 100% rename from packages/server/test/support/fixtures/projects/issue-8111-iframe-input/cypress/plugins/index.js rename to system-tests/projects/issue-8111-iframe-input/cypress/plugins/index.js diff --git a/packages/server/test/support/fixtures/projects/issue-8111-iframe-input/inner.html b/system-tests/projects/issue-8111-iframe-input/inner.html similarity index 100% rename from packages/server/test/support/fixtures/projects/issue-8111-iframe-input/inner.html rename to system-tests/projects/issue-8111-iframe-input/inner.html diff --git a/packages/server/test/support/fixtures/projects/issue-8111-iframe-input/outer.html b/system-tests/projects/issue-8111-iframe-input/outer.html similarity index 100% rename from packages/server/test/support/fixtures/projects/issue-8111-iframe-input/outer.html rename to system-tests/projects/issue-8111-iframe-input/outer.html diff --git a/packages/server/test/support/fixtures/projects/no-scaffolding/cypress.json b/system-tests/projects/max-listeners/cypress.json similarity index 100% rename from packages/server/test/support/fixtures/projects/no-scaffolding/cypress.json rename to system-tests/projects/max-listeners/cypress.json diff --git a/packages/server/test/support/fixtures/projects/multiple-task-registrations/cypress.json b/system-tests/projects/multiple-task-registrations/cypress.json similarity index 100% rename from packages/server/test/support/fixtures/projects/multiple-task-registrations/cypress.json rename to system-tests/projects/multiple-task-registrations/cypress.json diff --git a/packages/server/test/support/fixtures/projects/multiple-task-registrations/cypress/integration/multiple_task_registrations_spec.js b/system-tests/projects/multiple-task-registrations/cypress/integration/multiple_task_registrations_spec.js similarity index 100% rename from packages/server/test/support/fixtures/projects/multiple-task-registrations/cypress/integration/multiple_task_registrations_spec.js rename to system-tests/projects/multiple-task-registrations/cypress/integration/multiple_task_registrations_spec.js diff --git a/packages/server/test/support/fixtures/projects/multiple-task-registrations/cypress/plugins/index.js b/system-tests/projects/multiple-task-registrations/cypress/plugins/index.js similarity index 100% rename from packages/server/test/support/fixtures/projects/multiple-task-registrations/cypress/plugins/index.js rename to system-tests/projects/multiple-task-registrations/cypress/plugins/index.js diff --git a/packages/server/test/support/fixtures/projects/ts-installed/cypress.json b/system-tests/projects/no-scaffolding/cypress.json similarity index 100% rename from packages/server/test/support/fixtures/projects/ts-installed/cypress.json rename to system-tests/projects/no-scaffolding/cypress.json diff --git a/packages/server/test/support/fixtures/projects/no-scaffolding/cypress/integration/app_spec.js b/system-tests/projects/no-scaffolding/cypress/integration/app_spec.js similarity index 100% rename from packages/server/test/support/fixtures/projects/no-scaffolding/cypress/integration/app_spec.js rename to system-tests/projects/no-scaffolding/cypress/integration/app_spec.js diff --git a/packages/server/test/support/fixtures/projects/no-server/cypress.json b/system-tests/projects/no-server/cypress.json similarity index 100% rename from packages/server/test/support/fixtures/projects/no-server/cypress.json rename to system-tests/projects/no-server/cypress.json diff --git a/packages/server/test/support/fixtures/projects/no-server/dev/a space/foo.txt b/system-tests/projects/no-server/dev/a space/foo.txt similarity index 100% rename from packages/server/test/support/fixtures/projects/no-server/dev/a space/foo.txt rename to system-tests/projects/no-server/dev/a space/foo.txt diff --git a/packages/server/test/support/fixtures/projects/no-server/dev/assets/app.css b/system-tests/projects/no-server/dev/assets/app.css similarity index 100% rename from packages/server/test/support/fixtures/projects/no-server/dev/assets/app.css rename to system-tests/projects/no-server/dev/assets/app.css diff --git a/packages/server/test/support/fixtures/projects/no-server/dev/assets/foo.json b/system-tests/projects/no-server/dev/assets/foo.json similarity index 100% rename from packages/server/test/support/fixtures/projects/no-server/dev/assets/foo.json rename to system-tests/projects/no-server/dev/assets/foo.json diff --git a/packages/server/test/support/fixtures/projects/no-server/dev/index.html b/system-tests/projects/no-server/dev/index.html similarity index 100% rename from packages/server/test/support/fixtures/projects/no-server/dev/index.html rename to system-tests/projects/no-server/dev/index.html diff --git a/packages/server/test/support/fixtures/projects/no-server/dev/sub/index.html b/system-tests/projects/no-server/dev/sub/index.html similarity index 100% rename from packages/server/test/support/fixtures/projects/no-server/dev/sub/index.html rename to system-tests/projects/no-server/dev/sub/index.html diff --git a/packages/server/test/support/fixtures/projects/no-server/helpers/includes.js b/system-tests/projects/no-server/helpers/includes.js similarity index 100% rename from packages/server/test/support/fixtures/projects/no-server/helpers/includes.js rename to system-tests/projects/no-server/helpers/includes.js diff --git a/packages/server/test/support/fixtures/projects/no-server/my-tests/test1.js b/system-tests/projects/no-server/my-tests/test1.js similarity index 100% rename from packages/server/test/support/fixtures/projects/no-server/my-tests/test1.js rename to system-tests/projects/no-server/my-tests/test1.js diff --git a/packages/server/test/support/fixtures/projects/non-existent-spec/cypress.json b/system-tests/projects/non-existent-spec/cypress.json similarity index 100% rename from packages/server/test/support/fixtures/projects/non-existent-spec/cypress.json rename to system-tests/projects/non-existent-spec/cypress.json diff --git a/packages/server/test/support/fixtures/projects/non-existent-spec/cypress/integration/spec.js b/system-tests/projects/non-existent-spec/cypress/integration/spec.js similarity index 100% rename from packages/server/test/support/fixtures/projects/non-existent-spec/cypress/integration/spec.js rename to system-tests/projects/non-existent-spec/cypress/integration/spec.js diff --git a/packages/server/test/support/fixtures/projects/non-existent-spec/cypress/plugins/index.js b/system-tests/projects/non-existent-spec/cypress/plugins/index.js similarity index 100% rename from packages/server/test/support/fixtures/projects/non-existent-spec/cypress/plugins/index.js rename to system-tests/projects/non-existent-spec/cypress/plugins/index.js diff --git a/packages/server/test/support/fixtures/projects/non-proxied/cypress.json b/system-tests/projects/non-proxied/cypress.json similarity index 100% rename from packages/server/test/support/fixtures/projects/non-proxied/cypress.json rename to system-tests/projects/non-proxied/cypress.json diff --git a/packages/server/test/support/fixtures/projects/non-proxied/cypress/fixtures/cy-non-proxied.png b/system-tests/projects/non-proxied/cypress/fixtures/cy-non-proxied.png similarity index 100% rename from packages/server/test/support/fixtures/projects/non-proxied/cypress/fixtures/cy-non-proxied.png rename to system-tests/projects/non-proxied/cypress/fixtures/cy-non-proxied.png diff --git a/packages/server/test/support/fixtures/projects/non-proxied/cypress/integration/spec.js b/system-tests/projects/non-proxied/cypress/integration/spec.js similarity index 100% rename from packages/server/test/support/fixtures/projects/non-proxied/cypress/integration/spec.js rename to system-tests/projects/non-proxied/cypress/integration/spec.js diff --git a/packages/server/test/support/fixtures/projects/non-proxied/cypress/plugins/index.js b/system-tests/projects/non-proxied/cypress/plugins/index.js similarity index 100% rename from packages/server/test/support/fixtures/projects/non-proxied/cypress/plugins/index.js rename to system-tests/projects/non-proxied/cypress/plugins/index.js diff --git a/packages/server/test/support/fixtures/projects/odd-directory-name/cypress/integration/.gitkeep b/system-tests/projects/odd-directory-name/cypress/integration/.gitkeep similarity index 100% rename from packages/server/test/support/fixtures/projects/odd-directory-name/cypress/integration/.gitkeep rename to system-tests/projects/odd-directory-name/cypress/integration/.gitkeep diff --git a/packages/server/test/support/fixtures/projects/odd-directory-name/cypress/integration/1.0/sample_spec.js b/system-tests/projects/odd-directory-name/cypress/integration/1.0/sample_spec.js similarity index 100% rename from packages/server/test/support/fixtures/projects/odd-directory-name/cypress/integration/1.0/sample_spec.js rename to system-tests/projects/odd-directory-name/cypress/integration/1.0/sample_spec.js diff --git a/packages/server/test/support/fixtures/projects/plugin-after-screenshot/cypress.json b/system-tests/projects/plugin-after-screenshot/cypress.json similarity index 100% rename from packages/server/test/support/fixtures/projects/plugin-after-screenshot/cypress.json rename to system-tests/projects/plugin-after-screenshot/cypress.json diff --git a/packages/server/test/support/fixtures/projects/plugin-after-screenshot/cypress/integration/after_screenshot_overwrite_spec.js b/system-tests/projects/plugin-after-screenshot/cypress/integration/after_screenshot_overwrite_spec.js similarity index 100% rename from packages/server/test/support/fixtures/projects/plugin-after-screenshot/cypress/integration/after_screenshot_overwrite_spec.js rename to system-tests/projects/plugin-after-screenshot/cypress/integration/after_screenshot_overwrite_spec.js diff --git a/packages/server/test/support/fixtures/projects/plugin-after-screenshot/cypress/integration/after_screenshot_spec.js b/system-tests/projects/plugin-after-screenshot/cypress/integration/after_screenshot_spec.js similarity index 100% rename from packages/server/test/support/fixtures/projects/plugin-after-screenshot/cypress/integration/after_screenshot_spec.js rename to system-tests/projects/plugin-after-screenshot/cypress/integration/after_screenshot_spec.js diff --git a/packages/server/test/support/fixtures/projects/plugin-after-screenshot/cypress/plugins/index.js b/system-tests/projects/plugin-after-screenshot/cypress/plugins/index.js similarity index 100% rename from packages/server/test/support/fixtures/projects/plugin-after-screenshot/cypress/plugins/index.js rename to system-tests/projects/plugin-after-screenshot/cypress/plugins/index.js diff --git a/packages/server/test/support/fixtures/projects/plugin-after-screenshot/screenshot-replacement.png b/system-tests/projects/plugin-after-screenshot/screenshot-replacement.png similarity index 100% rename from packages/server/test/support/fixtures/projects/plugin-after-screenshot/screenshot-replacement.png rename to system-tests/projects/plugin-after-screenshot/screenshot-replacement.png diff --git a/packages/server/test/support/fixtures/projects/plugin-after-spec-deletes-video/cypress.json b/system-tests/projects/plugin-after-spec-deletes-video/cypress.json similarity index 100% rename from packages/server/test/support/fixtures/projects/plugin-after-spec-deletes-video/cypress.json rename to system-tests/projects/plugin-after-spec-deletes-video/cypress.json diff --git a/packages/server/test/support/fixtures/projects/plugin-after-spec-deletes-video/cypress/integration/after_spec_deletes_video.js b/system-tests/projects/plugin-after-spec-deletes-video/cypress/integration/after_spec_deletes_video.js similarity index 100% rename from packages/server/test/support/fixtures/projects/plugin-after-spec-deletes-video/cypress/integration/after_spec_deletes_video.js rename to system-tests/projects/plugin-after-spec-deletes-video/cypress/integration/after_spec_deletes_video.js diff --git a/packages/server/test/support/fixtures/projects/plugin-after-spec-deletes-video/cypress/plugins/index.js b/system-tests/projects/plugin-after-spec-deletes-video/cypress/plugins/index.js similarity index 100% rename from packages/server/test/support/fixtures/projects/plugin-after-spec-deletes-video/cypress/plugins/index.js rename to system-tests/projects/plugin-after-spec-deletes-video/cypress/plugins/index.js diff --git a/packages/server/test/support/fixtures/projects/plugin-before-browser-launch-deprecation/cypress.json b/system-tests/projects/plugin-before-browser-launch-deprecation/cypress.json similarity index 100% rename from packages/server/test/support/fixtures/projects/plugin-before-browser-launch-deprecation/cypress.json rename to system-tests/projects/plugin-before-browser-launch-deprecation/cypress.json diff --git a/packages/server/test/support/fixtures/projects/plugin-before-browser-launch-deprecation/cypress/integration/app_spec.js b/system-tests/projects/plugin-before-browser-launch-deprecation/cypress/integration/app_spec.js similarity index 100% rename from packages/server/test/support/fixtures/projects/plugin-before-browser-launch-deprecation/cypress/integration/app_spec.js rename to system-tests/projects/plugin-before-browser-launch-deprecation/cypress/integration/app_spec.js diff --git a/packages/server/test/support/fixtures/projects/plugin-before-browser-launch-deprecation/cypress/integration/app_spec2.js b/system-tests/projects/plugin-before-browser-launch-deprecation/cypress/integration/app_spec2.js similarity index 100% rename from packages/server/test/support/fixtures/projects/plugin-before-browser-launch-deprecation/cypress/integration/app_spec2.js rename to system-tests/projects/plugin-before-browser-launch-deprecation/cypress/integration/app_spec2.js diff --git a/packages/server/test/support/fixtures/projects/plugin-before-browser-launch-deprecation/cypress/plugins/index.js b/system-tests/projects/plugin-before-browser-launch-deprecation/cypress/plugins/index.js similarity index 100% rename from packages/server/test/support/fixtures/projects/plugin-before-browser-launch-deprecation/cypress/plugins/index.js rename to system-tests/projects/plugin-before-browser-launch-deprecation/cypress/plugins/index.js diff --git a/packages/server/test/support/fixtures/projects/plugin-browser/cypress.json b/system-tests/projects/plugin-browser/cypress.json similarity index 100% rename from packages/server/test/support/fixtures/projects/plugin-browser/cypress.json rename to system-tests/projects/plugin-browser/cypress.json diff --git a/packages/server/test/support/fixtures/projects/plugin-browser/cypress/integration/app_spec.js b/system-tests/projects/plugin-browser/cypress/integration/app_spec.js similarity index 100% rename from packages/server/test/support/fixtures/projects/plugin-browser/cypress/integration/app_spec.js rename to system-tests/projects/plugin-browser/cypress/integration/app_spec.js diff --git a/packages/server/test/support/fixtures/projects/plugin-browser/cypress/plugins/index.js b/system-tests/projects/plugin-browser/cypress/plugins/index.js similarity index 100% rename from packages/server/test/support/fixtures/projects/plugin-browser/cypress/plugins/index.js rename to system-tests/projects/plugin-browser/cypress/plugins/index.js diff --git a/packages/server/test/support/fixtures/projects/plugin-config-version/cypress.json b/system-tests/projects/plugin-config-version/cypress.json similarity index 100% rename from packages/server/test/support/fixtures/projects/plugin-config-version/cypress.json rename to system-tests/projects/plugin-config-version/cypress.json diff --git a/packages/server/test/support/fixtures/projects/plugin-config-version/cypress/integration/dummy.js b/system-tests/projects/plugin-config-version/cypress/integration/dummy.js similarity index 100% rename from packages/server/test/support/fixtures/projects/plugin-config-version/cypress/integration/dummy.js rename to system-tests/projects/plugin-config-version/cypress/integration/dummy.js diff --git a/packages/server/test/support/fixtures/projects/plugin-config-version/cypress/plugins/index.js b/system-tests/projects/plugin-config-version/cypress/plugins/index.js similarity index 100% rename from packages/server/test/support/fixtures/projects/plugin-config-version/cypress/plugins/index.js rename to system-tests/projects/plugin-config-version/cypress/plugins/index.js diff --git a/packages/server/test/support/fixtures/projects/plugin-config/cypress.json b/system-tests/projects/plugin-config/cypress.json similarity index 100% rename from packages/server/test/support/fixtures/projects/plugin-config/cypress.json rename to system-tests/projects/plugin-config/cypress.json diff --git a/packages/server/test/support/fixtures/projects/plugin-config/cypress/integration/app_spec.js b/system-tests/projects/plugin-config/cypress/integration/app_spec.js similarity index 100% rename from packages/server/test/support/fixtures/projects/plugin-config/cypress/integration/app_spec.js rename to system-tests/projects/plugin-config/cypress/integration/app_spec.js diff --git a/packages/server/test/support/fixtures/projects/plugin-config/cypress/plugins/index.js b/system-tests/projects/plugin-config/cypress/plugins/index.js similarity index 100% rename from packages/server/test/support/fixtures/projects/plugin-config/cypress/plugins/index.js rename to system-tests/projects/plugin-config/cypress/plugins/index.js diff --git a/packages/server/test/support/fixtures/projects/plugin-empty/cypress.json b/system-tests/projects/plugin-empty/cypress.json similarity index 100% rename from packages/server/test/support/fixtures/projects/plugin-empty/cypress.json rename to system-tests/projects/plugin-empty/cypress.json diff --git a/packages/server/test/support/fixtures/projects/plugin-empty/cypress/integration/app_spec.js b/system-tests/projects/plugin-empty/cypress/integration/app_spec.js similarity index 100% rename from packages/server/test/support/fixtures/projects/plugin-empty/cypress/integration/app_spec.js rename to system-tests/projects/plugin-empty/cypress/integration/app_spec.js diff --git a/packages/server/test/support/fixtures/projects/plugin-empty/cypress/plugins/index.js b/system-tests/projects/plugin-empty/cypress/plugins/index.js similarity index 100% rename from packages/server/test/support/fixtures/projects/plugin-empty/cypress/plugins/index.js rename to system-tests/projects/plugin-empty/cypress/plugins/index.js diff --git a/packages/server/test/support/fixtures/projects/plugin-event-deprecated/cypress.json b/system-tests/projects/plugin-event-deprecated/cypress.json similarity index 100% rename from packages/server/test/support/fixtures/projects/plugin-event-deprecated/cypress.json rename to system-tests/projects/plugin-event-deprecated/cypress.json diff --git a/packages/server/test/support/fixtures/projects/plugin-event-deprecated/cypress/integration/app_spec.js b/system-tests/projects/plugin-event-deprecated/cypress/integration/app_spec.js similarity index 100% rename from packages/server/test/support/fixtures/projects/plugin-event-deprecated/cypress/integration/app_spec.js rename to system-tests/projects/plugin-event-deprecated/cypress/integration/app_spec.js diff --git a/packages/server/test/support/fixtures/projects/plugin-event-deprecated/cypress/plugins/index.js b/system-tests/projects/plugin-event-deprecated/cypress/plugins/index.js similarity index 100% rename from packages/server/test/support/fixtures/projects/plugin-event-deprecated/cypress/plugins/index.js rename to system-tests/projects/plugin-event-deprecated/cypress/plugins/index.js diff --git a/packages/server/test/support/fixtures/projects/plugin-extension/cypress.json b/system-tests/projects/plugin-extension/cypress.json similarity index 100% rename from packages/server/test/support/fixtures/projects/plugin-extension/cypress.json rename to system-tests/projects/plugin-extension/cypress.json diff --git a/packages/server/test/support/fixtures/projects/plugin-extension/cypress/integration/app_spec.js b/system-tests/projects/plugin-extension/cypress/integration/app_spec.js similarity index 100% rename from packages/server/test/support/fixtures/projects/plugin-extension/cypress/integration/app_spec.js rename to system-tests/projects/plugin-extension/cypress/integration/app_spec.js diff --git a/packages/server/test/support/fixtures/projects/plugin-extension/cypress/plugins/index.js b/system-tests/projects/plugin-extension/cypress/plugins/index.js similarity index 100% rename from packages/server/test/support/fixtures/projects/plugin-extension/cypress/plugins/index.js rename to system-tests/projects/plugin-extension/cypress/plugins/index.js diff --git a/packages/server/test/support/fixtures/projects/plugin-extension/ext/background.js b/system-tests/projects/plugin-extension/ext/background.js similarity index 100% rename from packages/server/test/support/fixtures/projects/plugin-extension/ext/background.js rename to system-tests/projects/plugin-extension/ext/background.js diff --git a/packages/server/test/support/fixtures/projects/plugin-extension/ext/manifest.json b/system-tests/projects/plugin-extension/ext/manifest.json similarity index 100% rename from packages/server/test/support/fixtures/projects/plugin-extension/ext/manifest.json rename to system-tests/projects/plugin-extension/ext/manifest.json diff --git a/packages/server/test/support/fixtures/projects/plugin-extension/index.html b/system-tests/projects/plugin-extension/index.html similarity index 100% rename from packages/server/test/support/fixtures/projects/plugin-extension/index.html rename to system-tests/projects/plugin-extension/index.html diff --git a/packages/server/test/support/fixtures/projects/plugin-filter-browsers/cypress.json b/system-tests/projects/plugin-filter-browsers/cypress.json similarity index 100% rename from packages/server/test/support/fixtures/projects/plugin-filter-browsers/cypress.json rename to system-tests/projects/plugin-filter-browsers/cypress.json diff --git a/packages/server/test/support/fixtures/projects/plugin-filter-browsers/cypress/integration/app_spec.js b/system-tests/projects/plugin-filter-browsers/cypress/integration/app_spec.js similarity index 100% rename from packages/server/test/support/fixtures/projects/plugin-filter-browsers/cypress/integration/app_spec.js rename to system-tests/projects/plugin-filter-browsers/cypress/integration/app_spec.js diff --git a/packages/server/test/support/fixtures/projects/plugin-filter-browsers/cypress/plugins/index.js b/system-tests/projects/plugin-filter-browsers/cypress/plugins/index.js similarity index 93% rename from packages/server/test/support/fixtures/projects/plugin-filter-browsers/cypress/plugins/index.js rename to system-tests/projects/plugin-filter-browsers/cypress/plugins/index.js index a429bf6293ee..27ebfd5e46fb 100644 --- a/packages/server/test/support/fixtures/projects/plugin-filter-browsers/cypress/plugins/index.js +++ b/system-tests/projects/plugin-filter-browsers/cypress/plugins/index.js @@ -1,4 +1,4 @@ -const debug = require('debug')('cypress:e2e') +const debug = require('debug')('cypress:system-tests') module.exports = function (onFn, config) { debug('plugin file %s', __filename) diff --git a/packages/server/test/support/fixtures/projects/plugin-retries/cypress.json b/system-tests/projects/plugin-retries/cypress.json similarity index 100% rename from packages/server/test/support/fixtures/projects/plugin-retries/cypress.json rename to system-tests/projects/plugin-retries/cypress.json diff --git a/packages/server/test/support/fixtures/projects/plugin-retries/cypress/integration/main.spec.js b/system-tests/projects/plugin-retries/cypress/integration/main.spec.js similarity index 100% rename from packages/server/test/support/fixtures/projects/plugin-retries/cypress/integration/main.spec.js rename to system-tests/projects/plugin-retries/cypress/integration/main.spec.js diff --git a/packages/server/test/support/fixtures/projects/plugin-returns-bad-config/cypress.json b/system-tests/projects/plugin-returns-bad-config/cypress.json similarity index 100% rename from packages/server/test/support/fixtures/projects/plugin-returns-bad-config/cypress.json rename to system-tests/projects/plugin-returns-bad-config/cypress.json diff --git a/packages/server/test/support/fixtures/projects/plugin-returns-bad-config/cypress/fixtures/example.json b/system-tests/projects/plugin-returns-bad-config/cypress/fixtures/example.json similarity index 100% rename from packages/server/test/support/fixtures/projects/plugin-returns-bad-config/cypress/fixtures/example.json rename to system-tests/projects/plugin-returns-bad-config/cypress/fixtures/example.json diff --git a/packages/server/test/support/fixtures/projects/plugin-returns-bad-config/cypress/integration/app_spec.js b/system-tests/projects/plugin-returns-bad-config/cypress/integration/app_spec.js similarity index 100% rename from packages/server/test/support/fixtures/projects/plugin-returns-bad-config/cypress/integration/app_spec.js rename to system-tests/projects/plugin-returns-bad-config/cypress/integration/app_spec.js diff --git a/packages/server/test/support/fixtures/projects/plugin-returns-bad-config/cypress/plugins/index.js b/system-tests/projects/plugin-returns-bad-config/cypress/plugins/index.js similarity index 100% rename from packages/server/test/support/fixtures/projects/plugin-returns-bad-config/cypress/plugins/index.js rename to system-tests/projects/plugin-returns-bad-config/cypress/plugins/index.js diff --git a/packages/server/test/support/fixtures/projects/plugin-returns-bad-config/cypress/support/commands.js b/system-tests/projects/plugin-returns-bad-config/cypress/support/commands.js similarity index 100% rename from packages/server/test/support/fixtures/projects/plugin-returns-bad-config/cypress/support/commands.js rename to system-tests/projects/plugin-returns-bad-config/cypress/support/commands.js diff --git a/packages/server/test/support/fixtures/projects/plugin-returns-bad-config/cypress/support/index.js b/system-tests/projects/plugin-returns-bad-config/cypress/support/index.js similarity index 100% rename from packages/server/test/support/fixtures/projects/plugin-returns-bad-config/cypress/support/index.js rename to system-tests/projects/plugin-returns-bad-config/cypress/support/index.js diff --git a/packages/server/test/support/fixtures/projects/plugin-returns-empty-browsers-list/cypress.json b/system-tests/projects/plugin-returns-empty-browsers-list/cypress.json similarity index 100% rename from packages/server/test/support/fixtures/projects/plugin-returns-empty-browsers-list/cypress.json rename to system-tests/projects/plugin-returns-empty-browsers-list/cypress.json diff --git a/packages/server/test/support/fixtures/projects/plugin-returns-empty-browsers-list/cypress/fixtures/example.json b/system-tests/projects/plugin-returns-empty-browsers-list/cypress/fixtures/example.json similarity index 100% rename from packages/server/test/support/fixtures/projects/plugin-returns-empty-browsers-list/cypress/fixtures/example.json rename to system-tests/projects/plugin-returns-empty-browsers-list/cypress/fixtures/example.json diff --git a/packages/server/test/support/fixtures/projects/plugin-returns-empty-browsers-list/cypress/integration/app_spec.js b/system-tests/projects/plugin-returns-empty-browsers-list/cypress/integration/app_spec.js similarity index 100% rename from packages/server/test/support/fixtures/projects/plugin-returns-empty-browsers-list/cypress/integration/app_spec.js rename to system-tests/projects/plugin-returns-empty-browsers-list/cypress/integration/app_spec.js diff --git a/packages/server/test/support/fixtures/projects/plugin-returns-empty-browsers-list/cypress/plugins/index.js b/system-tests/projects/plugin-returns-empty-browsers-list/cypress/plugins/index.js similarity index 100% rename from packages/server/test/support/fixtures/projects/plugin-returns-empty-browsers-list/cypress/plugins/index.js rename to system-tests/projects/plugin-returns-empty-browsers-list/cypress/plugins/index.js diff --git a/packages/server/test/support/fixtures/projects/plugin-returns-empty-browsers-list/cypress/support/commands.js b/system-tests/projects/plugin-returns-empty-browsers-list/cypress/support/commands.js similarity index 100% rename from packages/server/test/support/fixtures/projects/plugin-returns-empty-browsers-list/cypress/support/commands.js rename to system-tests/projects/plugin-returns-empty-browsers-list/cypress/support/commands.js diff --git a/packages/server/test/support/fixtures/projects/plugin-returns-empty-browsers-list/cypress/support/index.js b/system-tests/projects/plugin-returns-empty-browsers-list/cypress/support/index.js similarity index 100% rename from packages/server/test/support/fixtures/projects/plugin-returns-empty-browsers-list/cypress/support/index.js rename to system-tests/projects/plugin-returns-empty-browsers-list/cypress/support/index.js diff --git a/packages/server/test/support/fixtures/projects/plugin-returns-invalid-browser/cypress.json b/system-tests/projects/plugin-returns-invalid-browser/cypress.json similarity index 100% rename from packages/server/test/support/fixtures/projects/plugin-returns-invalid-browser/cypress.json rename to system-tests/projects/plugin-returns-invalid-browser/cypress.json diff --git a/packages/server/test/support/fixtures/projects/plugin-returns-invalid-browser/cypress/fixtures/example.json b/system-tests/projects/plugin-returns-invalid-browser/cypress/fixtures/example.json similarity index 100% rename from packages/server/test/support/fixtures/projects/plugin-returns-invalid-browser/cypress/fixtures/example.json rename to system-tests/projects/plugin-returns-invalid-browser/cypress/fixtures/example.json diff --git a/packages/server/test/support/fixtures/projects/plugin-returns-invalid-browser/cypress/integration/app_spec.js b/system-tests/projects/plugin-returns-invalid-browser/cypress/integration/app_spec.js similarity index 100% rename from packages/server/test/support/fixtures/projects/plugin-returns-invalid-browser/cypress/integration/app_spec.js rename to system-tests/projects/plugin-returns-invalid-browser/cypress/integration/app_spec.js diff --git a/packages/server/test/support/fixtures/projects/plugin-returns-invalid-browser/cypress/plugins/index.js b/system-tests/projects/plugin-returns-invalid-browser/cypress/plugins/index.js similarity index 100% rename from packages/server/test/support/fixtures/projects/plugin-returns-invalid-browser/cypress/plugins/index.js rename to system-tests/projects/plugin-returns-invalid-browser/cypress/plugins/index.js diff --git a/packages/server/test/support/fixtures/projects/plugin-returns-invalid-browser/cypress/support/commands.js b/system-tests/projects/plugin-returns-invalid-browser/cypress/support/commands.js similarity index 100% rename from packages/server/test/support/fixtures/projects/plugin-returns-invalid-browser/cypress/support/commands.js rename to system-tests/projects/plugin-returns-invalid-browser/cypress/support/commands.js diff --git a/packages/server/test/support/fixtures/projects/plugin-returns-invalid-browser/cypress/support/index.js b/system-tests/projects/plugin-returns-invalid-browser/cypress/support/index.js similarity index 100% rename from packages/server/test/support/fixtures/projects/plugin-returns-invalid-browser/cypress/support/index.js rename to system-tests/projects/plugin-returns-invalid-browser/cypress/support/index.js diff --git a/packages/server/test/support/fixtures/projects/plugin-run-event-throws/cypress.json b/system-tests/projects/plugin-run-event-throws/cypress.json similarity index 100% rename from packages/server/test/support/fixtures/projects/plugin-run-event-throws/cypress.json rename to system-tests/projects/plugin-run-event-throws/cypress.json diff --git a/packages/server/test/support/fixtures/projects/plugin-run-event-throws/cypress/integration/run_event_throws_spec.js b/system-tests/projects/plugin-run-event-throws/cypress/integration/run_event_throws_spec.js similarity index 100% rename from packages/server/test/support/fixtures/projects/plugin-run-event-throws/cypress/integration/run_event_throws_spec.js rename to system-tests/projects/plugin-run-event-throws/cypress/integration/run_event_throws_spec.js diff --git a/packages/server/test/support/fixtures/projects/plugin-run-event-throws/cypress/plugins/index.js b/system-tests/projects/plugin-run-event-throws/cypress/plugins/index.js similarity index 100% rename from packages/server/test/support/fixtures/projects/plugin-run-event-throws/cypress/plugins/index.js rename to system-tests/projects/plugin-run-event-throws/cypress/plugins/index.js diff --git a/packages/server/test/support/fixtures/projects/plugin-run-events/cypress.json b/system-tests/projects/plugin-run-events/cypress.json similarity index 100% rename from packages/server/test/support/fixtures/projects/plugin-run-events/cypress.json rename to system-tests/projects/plugin-run-events/cypress.json diff --git a/packages/server/test/support/fixtures/projects/plugin-run-events/cypress/integration/run_events_spec_1.js b/system-tests/projects/plugin-run-events/cypress/integration/run_events_spec_1.js similarity index 100% rename from packages/server/test/support/fixtures/projects/plugin-run-events/cypress/integration/run_events_spec_1.js rename to system-tests/projects/plugin-run-events/cypress/integration/run_events_spec_1.js diff --git a/packages/server/test/support/fixtures/projects/plugin-run-events/cypress/integration/run_events_spec_2.js b/system-tests/projects/plugin-run-events/cypress/integration/run_events_spec_2.js similarity index 100% rename from packages/server/test/support/fixtures/projects/plugin-run-events/cypress/integration/run_events_spec_2.js rename to system-tests/projects/plugin-run-events/cypress/integration/run_events_spec_2.js diff --git a/packages/server/test/support/fixtures/projects/plugin-run-events/cypress/plugins/index.js b/system-tests/projects/plugin-run-events/cypress/plugins/index.js similarity index 100% rename from packages/server/test/support/fixtures/projects/plugin-run-events/cypress/plugins/index.js rename to system-tests/projects/plugin-run-events/cypress/plugins/index.js diff --git a/packages/server/test/support/fixtures/projects/plugin-validation-error/cypress.json b/system-tests/projects/plugin-validation-error/cypress.json similarity index 100% rename from packages/server/test/support/fixtures/projects/plugin-validation-error/cypress.json rename to system-tests/projects/plugin-validation-error/cypress.json diff --git a/packages/server/test/support/fixtures/projects/plugin-validation-error/cypress/integration/app_spec.js b/system-tests/projects/plugin-validation-error/cypress/integration/app_spec.js similarity index 100% rename from packages/server/test/support/fixtures/projects/plugin-validation-error/cypress/integration/app_spec.js rename to system-tests/projects/plugin-validation-error/cypress/integration/app_spec.js diff --git a/packages/server/test/support/fixtures/projects/plugin-validation-error/cypress/plugins/index.js b/system-tests/projects/plugin-validation-error/cypress/plugins/index.js similarity index 100% rename from packages/server/test/support/fixtures/projects/plugin-validation-error/cypress/plugins/index.js rename to system-tests/projects/plugin-validation-error/cypress/plugins/index.js diff --git a/packages/server/test/support/fixtures/projects/plugins-absolute-path/cypress.json b/system-tests/projects/plugins-absolute-path/cypress.json similarity index 100% rename from packages/server/test/support/fixtures/projects/plugins-absolute-path/cypress.json rename to system-tests/projects/plugins-absolute-path/cypress.json diff --git a/packages/server/test/support/fixtures/projects/plugins-absolute-path/cypress/integration/absolute_spec.js b/system-tests/projects/plugins-absolute-path/cypress/integration/absolute_spec.js similarity index 100% rename from packages/server/test/support/fixtures/projects/plugins-absolute-path/cypress/integration/absolute_spec.js rename to system-tests/projects/plugins-absolute-path/cypress/integration/absolute_spec.js diff --git a/packages/server/test/support/fixtures/projects/plugins-absolute-path/cypress/plugins/index.js b/system-tests/projects/plugins-absolute-path/cypress/plugins/index.js similarity index 100% rename from packages/server/test/support/fixtures/projects/plugins-absolute-path/cypress/plugins/index.js rename to system-tests/projects/plugins-absolute-path/cypress/plugins/index.js diff --git a/packages/server/test/support/fixtures/projects/plugins-async-error/cypress.json b/system-tests/projects/plugins-async-error/cypress.json similarity index 100% rename from packages/server/test/support/fixtures/projects/plugins-async-error/cypress.json rename to system-tests/projects/plugins-async-error/cypress.json diff --git a/packages/server/test/support/fixtures/projects/plugins-async-error/cypress/integration/app_spec.js b/system-tests/projects/plugins-async-error/cypress/integration/app_spec.js similarity index 100% rename from packages/server/test/support/fixtures/projects/plugins-async-error/cypress/integration/app_spec.js rename to system-tests/projects/plugins-async-error/cypress/integration/app_spec.js diff --git a/packages/server/test/support/fixtures/projects/plugins-async-error/cypress/plugins/index.js b/system-tests/projects/plugins-async-error/cypress/plugins/index.js similarity index 100% rename from packages/server/test/support/fixtures/projects/plugins-async-error/cypress/plugins/index.js rename to system-tests/projects/plugins-async-error/cypress/plugins/index.js diff --git a/packages/server/test/support/fixtures/projects/plugins-root-async-error/cypress.json b/system-tests/projects/plugins-root-async-error/cypress.json similarity index 100% rename from packages/server/test/support/fixtures/projects/plugins-root-async-error/cypress.json rename to system-tests/projects/plugins-root-async-error/cypress.json diff --git a/packages/server/test/support/fixtures/projects/plugins-root-async-error/cypress/integration/app_spec.js b/system-tests/projects/plugins-root-async-error/cypress/integration/app_spec.js similarity index 100% rename from packages/server/test/support/fixtures/projects/plugins-root-async-error/cypress/integration/app_spec.js rename to system-tests/projects/plugins-root-async-error/cypress/integration/app_spec.js diff --git a/packages/server/test/support/fixtures/projects/plugins-root-async-error/cypress/plugins/index.js b/system-tests/projects/plugins-root-async-error/cypress/plugins/index.js similarity index 100% rename from packages/server/test/support/fixtures/projects/plugins-root-async-error/cypress/plugins/index.js rename to system-tests/projects/plugins-root-async-error/cypress/plugins/index.js diff --git a/packages/server/test/support/fixtures/projects/pristine/app.js b/system-tests/projects/pristine/app.js similarity index 100% rename from packages/server/test/support/fixtures/projects/pristine/app.js rename to system-tests/projects/pristine/app.js diff --git a/packages/server/test/support/fixtures/projects/read-only-project-root/cypress.json b/system-tests/projects/read-only-project-root/cypress.json similarity index 100% rename from packages/server/test/support/fixtures/projects/read-only-project-root/cypress.json rename to system-tests/projects/read-only-project-root/cypress.json diff --git a/packages/server/test/support/fixtures/projects/read-only-project-root/cypress/integration/spec.js b/system-tests/projects/read-only-project-root/cypress/integration/spec.js similarity index 100% rename from packages/server/test/support/fixtures/projects/read-only-project-root/cypress/integration/spec.js rename to system-tests/projects/read-only-project-root/cypress/integration/spec.js diff --git a/packages/server/test/support/fixtures/projects/read-only-project-root/cypress/plugins/index.js b/system-tests/projects/read-only-project-root/cypress/plugins/index.js similarity index 100% rename from packages/server/test/support/fixtures/projects/read-only-project-root/cypress/plugins/index.js rename to system-tests/projects/read-only-project-root/cypress/plugins/index.js diff --git a/packages/server/test/support/fixtures/projects/read-only-project-root/cypress/support.js b/system-tests/projects/read-only-project-root/cypress/support.js similarity index 100% rename from packages/server/test/support/fixtures/projects/read-only-project-root/cypress/support.js rename to system-tests/projects/read-only-project-root/cypress/support.js diff --git a/packages/server/test/support/fixtures/projects/record/cypress.json b/system-tests/projects/record/cypress.json similarity index 100% rename from packages/server/test/support/fixtures/projects/record/cypress.json rename to system-tests/projects/record/cypress.json diff --git a/packages/server/test/support/fixtures/projects/record/cypress/integration/app_spec.js b/system-tests/projects/record/cypress/integration/app_spec.js similarity index 100% rename from packages/server/test/support/fixtures/projects/record/cypress/integration/app_spec.js rename to system-tests/projects/record/cypress/integration/app_spec.js diff --git a/packages/server/test/support/fixtures/projects/remote-debugging-disconnect/cypress.json b/system-tests/projects/remote-debugging-disconnect/cypress.json similarity index 100% rename from packages/server/test/support/fixtures/projects/remote-debugging-disconnect/cypress.json rename to system-tests/projects/remote-debugging-disconnect/cypress.json diff --git a/packages/server/test/support/fixtures/projects/remote-debugging-disconnect/cypress/integration/spec.ts b/system-tests/projects/remote-debugging-disconnect/cypress/integration/spec.ts similarity index 100% rename from packages/server/test/support/fixtures/projects/remote-debugging-disconnect/cypress/integration/spec.ts rename to system-tests/projects/remote-debugging-disconnect/cypress/integration/spec.ts diff --git a/packages/server/test/support/fixtures/projects/remote-debugging-disconnect/cypress/plugins.js b/system-tests/projects/remote-debugging-disconnect/cypress/plugins.js similarity index 100% rename from packages/server/test/support/fixtures/projects/remote-debugging-disconnect/cypress/plugins.js rename to system-tests/projects/remote-debugging-disconnect/cypress/plugins.js diff --git a/packages/server/test/support/fixtures/projects/yarn-v2-pnp/cypress.json b/system-tests/projects/remote-debugging-disconnect/tsconfig.json similarity index 100% rename from packages/server/test/support/fixtures/projects/yarn-v2-pnp/cypress.json rename to system-tests/projects/remote-debugging-disconnect/tsconfig.json diff --git a/packages/server/test/support/fixtures/projects/remote-debugging-port-removed/cypress.json b/system-tests/projects/remote-debugging-port-removed/cypress.json similarity index 100% rename from packages/server/test/support/fixtures/projects/remote-debugging-port-removed/cypress.json rename to system-tests/projects/remote-debugging-port-removed/cypress.json diff --git a/packages/server/test/support/fixtures/projects/remote-debugging-port-removed/cypress/integration/spec.ts b/system-tests/projects/remote-debugging-port-removed/cypress/integration/spec.ts similarity index 100% rename from packages/server/test/support/fixtures/projects/remote-debugging-port-removed/cypress/integration/spec.ts rename to system-tests/projects/remote-debugging-port-removed/cypress/integration/spec.ts diff --git a/packages/server/test/support/fixtures/projects/remote-debugging-port-removed/cypress/plugins.js b/system-tests/projects/remote-debugging-port-removed/cypress/plugins.js similarity index 100% rename from packages/server/test/support/fixtures/projects/remote-debugging-port-removed/cypress/plugins.js rename to system-tests/projects/remote-debugging-port-removed/cypress/plugins.js diff --git a/packages/server/test/support/fixtures/projects/retries-2/cypress.json b/system-tests/projects/retries-2/cypress.json similarity index 100% rename from packages/server/test/support/fixtures/projects/retries-2/cypress.json rename to system-tests/projects/retries-2/cypress.json diff --git a/packages/server/test/support/fixtures/projects/retries-2/cypress/integration/fail-twice.js b/system-tests/projects/retries-2/cypress/integration/fail-twice.js similarity index 100% rename from packages/server/test/support/fixtures/projects/retries-2/cypress/integration/fail-twice.js rename to system-tests/projects/retries-2/cypress/integration/fail-twice.js diff --git a/packages/server/test/support/fixtures/projects/retries-2/cypress/plugins/index.js b/system-tests/projects/retries-2/cypress/plugins/index.js similarity index 100% rename from packages/server/test/support/fixtures/projects/retries-2/cypress/plugins/index.js rename to system-tests/projects/retries-2/cypress/plugins/index.js diff --git a/packages/server/test/support/fixtures/projects/same-fixtures-integration-folders/cypress.json b/system-tests/projects/same-fixtures-integration-folders/cypress.json similarity index 100% rename from packages/server/test/support/fixtures/projects/same-fixtures-integration-folders/cypress.json rename to system-tests/projects/same-fixtures-integration-folders/cypress.json diff --git a/packages/server/test/support/fixtures/projects/same-fixtures-integration-folders/cypress/integration/example.json b/system-tests/projects/same-fixtures-integration-folders/cypress/integration/example.json similarity index 100% rename from packages/server/test/support/fixtures/projects/same-fixtures-integration-folders/cypress/integration/example.json rename to system-tests/projects/same-fixtures-integration-folders/cypress/integration/example.json diff --git a/packages/server/test/support/fixtures/projects/same-fixtures-integration-folders/cypress/integration/spec.js b/system-tests/projects/same-fixtures-integration-folders/cypress/integration/spec.js similarity index 100% rename from packages/server/test/support/fixtures/projects/same-fixtures-integration-folders/cypress/integration/spec.js rename to system-tests/projects/same-fixtures-integration-folders/cypress/integration/spec.js diff --git a/packages/server/test/support/fixtures/projects/screen-size/cypress.json b/system-tests/projects/screen-size/cypress.json similarity index 100% rename from packages/server/test/support/fixtures/projects/screen-size/cypress.json rename to system-tests/projects/screen-size/cypress.json diff --git a/packages/server/test/support/fixtures/projects/screen-size/cypress/integration/default_size.spec.js b/system-tests/projects/screen-size/cypress/integration/default_size.spec.js similarity index 100% rename from packages/server/test/support/fixtures/projects/screen-size/cypress/integration/default_size.spec.js rename to system-tests/projects/screen-size/cypress/integration/default_size.spec.js diff --git a/packages/server/test/support/fixtures/projects/screen-size/cypress/integration/device_pixel_ratio.spec.js b/system-tests/projects/screen-size/cypress/integration/device_pixel_ratio.spec.js similarity index 100% rename from packages/server/test/support/fixtures/projects/screen-size/cypress/integration/device_pixel_ratio.spec.js rename to system-tests/projects/screen-size/cypress/integration/device_pixel_ratio.spec.js diff --git a/packages/server/test/support/fixtures/projects/screen-size/cypress/integration/maximized.spec.js b/system-tests/projects/screen-size/cypress/integration/maximized.spec.js similarity index 100% rename from packages/server/test/support/fixtures/projects/screen-size/cypress/integration/maximized.spec.js rename to system-tests/projects/screen-size/cypress/integration/maximized.spec.js diff --git a/packages/server/test/support/fixtures/projects/screen-size/cypress/plugins/index.js b/system-tests/projects/screen-size/cypress/plugins/index.js similarity index 100% rename from packages/server/test/support/fixtures/projects/screen-size/cypress/plugins/index.js rename to system-tests/projects/screen-size/cypress/plugins/index.js diff --git a/packages/server/test/support/fixtures/projects/shadow-dom-global-inclusion/cypress.json b/system-tests/projects/shadow-dom-global-inclusion/cypress.json similarity index 100% rename from packages/server/test/support/fixtures/projects/shadow-dom-global-inclusion/cypress.json rename to system-tests/projects/shadow-dom-global-inclusion/cypress.json diff --git a/packages/server/test/support/fixtures/projects/shadow-dom-global-inclusion/cypress/fixtures/shadow-dom.html b/system-tests/projects/shadow-dom-global-inclusion/cypress/fixtures/shadow-dom.html similarity index 100% rename from packages/server/test/support/fixtures/projects/shadow-dom-global-inclusion/cypress/fixtures/shadow-dom.html rename to system-tests/projects/shadow-dom-global-inclusion/cypress/fixtures/shadow-dom.html diff --git a/packages/server/test/support/fixtures/projects/shadow-dom-global-inclusion/cypress/integration/shadow_dom_global_option_spec.js b/system-tests/projects/shadow-dom-global-inclusion/cypress/integration/shadow_dom_global_option_spec.js similarity index 100% rename from packages/server/test/support/fixtures/projects/shadow-dom-global-inclusion/cypress/integration/shadow_dom_global_option_spec.js rename to system-tests/projects/shadow-dom-global-inclusion/cypress/integration/shadow_dom_global_option_spec.js diff --git a/packages/server/test/support/fixtures/projects/studio-no-source-maps/cypress.json b/system-tests/projects/studio-no-source-maps/cypress.json similarity index 100% rename from packages/server/test/support/fixtures/projects/studio-no-source-maps/cypress.json rename to system-tests/projects/studio-no-source-maps/cypress.json diff --git a/packages/server/test/support/fixtures/projects/studio-no-source-maps/cypress/integration/extend.spec.js b/system-tests/projects/studio-no-source-maps/cypress/integration/extend.spec.js similarity index 100% rename from packages/server/test/support/fixtures/projects/studio-no-source-maps/cypress/integration/extend.spec.js rename to system-tests/projects/studio-no-source-maps/cypress/integration/extend.spec.js diff --git a/packages/server/test/support/fixtures/projects/studio-no-source-maps/cypress/integration/new.spec.js b/system-tests/projects/studio-no-source-maps/cypress/integration/new.spec.js similarity index 100% rename from packages/server/test/support/fixtures/projects/studio-no-source-maps/cypress/integration/new.spec.js rename to system-tests/projects/studio-no-source-maps/cypress/integration/new.spec.js diff --git a/packages/server/test/support/fixtures/projects/studio-no-source-maps/cypress/plugins/index.js b/system-tests/projects/studio-no-source-maps/cypress/plugins/index.js similarity index 100% rename from packages/server/test/support/fixtures/projects/studio-no-source-maps/cypress/plugins/index.js rename to system-tests/projects/studio-no-source-maps/cypress/plugins/index.js diff --git a/packages/server/test/support/fixtures/projects/studio-no-source-maps/index.html b/system-tests/projects/studio-no-source-maps/index.html similarity index 100% rename from packages/server/test/support/fixtures/projects/studio-no-source-maps/index.html rename to system-tests/projects/studio-no-source-maps/index.html diff --git a/packages/server/test/support/fixtures/projects/studio/cypress.json b/system-tests/projects/studio/cypress.json similarity index 100% rename from packages/server/test/support/fixtures/projects/studio/cypress.json rename to system-tests/projects/studio/cypress.json diff --git a/packages/server/test/support/fixtures/projects/studio/cypress/integration/empty-comments.spec.js b/system-tests/projects/studio/cypress/integration/empty-comments.spec.js similarity index 100% rename from packages/server/test/support/fixtures/projects/studio/cypress/integration/empty-comments.spec.js rename to system-tests/projects/studio/cypress/integration/empty-comments.spec.js diff --git a/packages/server/test/support/fixtures/projects/studio/cypress/integration/extend.spec.js b/system-tests/projects/studio/cypress/integration/extend.spec.js similarity index 100% rename from packages/server/test/support/fixtures/projects/studio/cypress/integration/extend.spec.js rename to system-tests/projects/studio/cypress/integration/extend.spec.js diff --git a/packages/server/test/support/fixtures/projects/studio/cypress/integration/external.spec.js b/system-tests/projects/studio/cypress/integration/external.spec.js similarity index 100% rename from packages/server/test/support/fixtures/projects/studio/cypress/integration/external.spec.js rename to system-tests/projects/studio/cypress/integration/external.spec.js diff --git a/packages/server/test/support/fixtures/projects/studio/cypress/integration/new.spec.js b/system-tests/projects/studio/cypress/integration/new.spec.js similarity index 100% rename from packages/server/test/support/fixtures/projects/studio/cypress/integration/new.spec.js rename to system-tests/projects/studio/cypress/integration/new.spec.js diff --git a/packages/server/test/support/fixtures/projects/studio/cypress/integration/unwritten.spec.js b/system-tests/projects/studio/cypress/integration/unwritten.spec.js similarity index 100% rename from packages/server/test/support/fixtures/projects/studio/cypress/integration/unwritten.spec.js rename to system-tests/projects/studio/cypress/integration/unwritten.spec.js diff --git a/packages/server/test/support/fixtures/projects/studio/cypress/integration/written.spec.js b/system-tests/projects/studio/cypress/integration/written.spec.js similarity index 100% rename from packages/server/test/support/fixtures/projects/studio/cypress/integration/written.spec.js rename to system-tests/projects/studio/cypress/integration/written.spec.js diff --git a/packages/server/test/support/fixtures/projects/studio/cypress/support/external.js b/system-tests/projects/studio/cypress/support/external.js similarity index 100% rename from packages/server/test/support/fixtures/projects/studio/cypress/support/external.js rename to system-tests/projects/studio/cypress/support/external.js diff --git a/packages/server/test/support/fixtures/projects/studio/cypress/support/index.js b/system-tests/projects/studio/cypress/support/index.js similarity index 100% rename from packages/server/test/support/fixtures/projects/studio/cypress/support/index.js rename to system-tests/projects/studio/cypress/support/index.js diff --git a/packages/server/test/support/fixtures/projects/studio/index.html b/system-tests/projects/studio/index.html similarity index 100% rename from packages/server/test/support/fixtures/projects/studio/index.html rename to system-tests/projects/studio/index.html diff --git a/packages/server/test/support/fixtures/projects/studio/new.html b/system-tests/projects/studio/new.html similarity index 100% rename from packages/server/test/support/fixtures/projects/studio/new.html rename to system-tests/projects/studio/new.html diff --git a/packages/server/test/support/fixtures/projects/system-node/cypress.json b/system-tests/projects/system-node/cypress.json similarity index 100% rename from packages/server/test/support/fixtures/projects/system-node/cypress.json rename to system-tests/projects/system-node/cypress.json diff --git a/system-tests/projects/system-node/cypress/integration/spec.js b/system-tests/projects/system-node/cypress/integration/spec.js new file mode 100644 index 000000000000..10871cfa3829 --- /dev/null +++ b/system-tests/projects/system-node/cypress/integration/spec.js @@ -0,0 +1,13 @@ +it('has expected resolvedNodePath and resolvedNodeVersion', () => { + expect(Cypress.config('nodeVersion')).to.eq('system') + + // TODO: make this assertion a strict equality check again + // for some reason, `yarn` is messing up the node path in CI and making it `/tmp/yarn---12345/node` + // but the e2e test does not get that same node path for `expectedNodePath` + // however since it still works as it should this is fine - this is an issue with the tests + // expect(Cypress.config('resolvedNodePath')).to.eq(Cypress.env('expectedNodePath')) + expect(Cypress.config('resolvedNodePath')).to.match(/.*\/node$/) + expect(Cypress.env('expectedNodePath')).to.match(/.*\/node$/) + + expect(Cypress.config('resolvedNodeVersion')).to.eq(Cypress.env('expectedNodeVersion')) +}) diff --git a/packages/server/test/support/fixtures/projects/system-node/cypress/plugins/index.js b/system-tests/projects/system-node/cypress/plugins/index.js similarity index 100% rename from packages/server/test/support/fixtures/projects/system-node/cypress/plugins/index.js rename to system-tests/projects/system-node/cypress/plugins/index.js diff --git a/packages/server/test/support/fixtures/projects/task-not-registered/cypress.json b/system-tests/projects/task-not-registered/cypress.json similarity index 100% rename from packages/server/test/support/fixtures/projects/task-not-registered/cypress.json rename to system-tests/projects/task-not-registered/cypress.json diff --git a/packages/server/test/support/fixtures/projects/task-not-registered/cypress/integration/task_not_registered_spec.js b/system-tests/projects/task-not-registered/cypress/integration/task_not_registered_spec.js similarity index 100% rename from packages/server/test/support/fixtures/projects/task-not-registered/cypress/integration/task_not_registered_spec.js rename to system-tests/projects/task-not-registered/cypress/integration/task_not_registered_spec.js diff --git a/packages/server/test/support/fixtures/projects/todos/cypress.json b/system-tests/projects/todos/cypress.json similarity index 100% rename from packages/server/test/support/fixtures/projects/todos/cypress.json rename to system-tests/projects/todos/cypress.json diff --git a/packages/server/test/support/fixtures/projects/todos/lib/my_coffee.coffee b/system-tests/projects/todos/lib/my_coffee.coffee similarity index 100% rename from packages/server/test/support/fixtures/projects/todos/lib/my_coffee.coffee rename to system-tests/projects/todos/lib/my_coffee.coffee diff --git a/packages/server/test/support/fixtures/projects/todos/tests/_fixtures/ascii.foo b/system-tests/projects/todos/tests/_fixtures/ascii.foo similarity index 100% rename from packages/server/test/support/fixtures/projects/todos/tests/_fixtures/ascii.foo rename to system-tests/projects/todos/tests/_fixtures/ascii.foo diff --git a/packages/server/test/support/fixtures/projects/todos/tests/_fixtures/bad_coffee.coffee b/system-tests/projects/todos/tests/_fixtures/bad_coffee.coffee similarity index 100% rename from packages/server/test/support/fixtures/projects/todos/tests/_fixtures/bad_coffee.coffee rename to system-tests/projects/todos/tests/_fixtures/bad_coffee.coffee diff --git a/packages/server/test/support/fixtures/projects/todos/tests/_fixtures/bad_js.js b/system-tests/projects/todos/tests/_fixtures/bad_js.js similarity index 100% rename from packages/server/test/support/fixtures/projects/todos/tests/_fixtures/bad_js.js rename to system-tests/projects/todos/tests/_fixtures/bad_js.js diff --git a/packages/server/test/support/fixtures/projects/todos/tests/_fixtures/bad_json.json b/system-tests/projects/todos/tests/_fixtures/bad_json.json similarity index 100% rename from packages/server/test/support/fixtures/projects/todos/tests/_fixtures/bad_json.json rename to system-tests/projects/todos/tests/_fixtures/bad_json.json diff --git a/packages/server/test/support/fixtures/projects/todos/tests/_fixtures/bar.js b/system-tests/projects/todos/tests/_fixtures/bar.js similarity index 100% rename from packages/server/test/support/fixtures/projects/todos/tests/_fixtures/bar.js rename to system-tests/projects/todos/tests/_fixtures/bar.js diff --git a/packages/server/test/support/fixtures/projects/todos/tests/_fixtures/bar_coffee.coffee b/system-tests/projects/todos/tests/_fixtures/bar_coffee.coffee similarity index 100% rename from packages/server/test/support/fixtures/projects/todos/tests/_fixtures/bar_coffee.coffee rename to system-tests/projects/todos/tests/_fixtures/bar_coffee.coffee diff --git a/packages/server/test/support/fixtures/projects/todos/tests/_fixtures/data.csv b/system-tests/projects/todos/tests/_fixtures/data.csv similarity index 100% rename from packages/server/test/support/fixtures/projects/todos/tests/_fixtures/data.csv rename to system-tests/projects/todos/tests/_fixtures/data.csv diff --git a/packages/server/test/support/fixtures/projects/todos/tests/_fixtures/empty_objects.json b/system-tests/projects/todos/tests/_fixtures/empty_objects.json similarity index 100% rename from packages/server/test/support/fixtures/projects/todos/tests/_fixtures/empty_objects.json rename to system-tests/projects/todos/tests/_fixtures/empty_objects.json diff --git a/packages/server/test/support/fixtures/projects/todos/tests/_fixtures/example.zip b/system-tests/projects/todos/tests/_fixtures/example.zip similarity index 100% rename from packages/server/test/support/fixtures/projects/todos/tests/_fixtures/example.zip rename to system-tests/projects/todos/tests/_fixtures/example.zip diff --git a/packages/server/test/support/fixtures/projects/todos/tests/_fixtures/foo.coffee b/system-tests/projects/todos/tests/_fixtures/foo.coffee similarity index 100% rename from packages/server/test/support/fixtures/projects/todos/tests/_fixtures/foo.coffee rename to system-tests/projects/todos/tests/_fixtures/foo.coffee diff --git a/packages/server/test/support/fixtures/projects/todos/tests/_fixtures/foo.exe b/system-tests/projects/todos/tests/_fixtures/foo.exe similarity index 100% rename from packages/server/test/support/fixtures/projects/todos/tests/_fixtures/foo.exe rename to system-tests/projects/todos/tests/_fixtures/foo.exe diff --git a/packages/server/test/support/fixtures/projects/todos/tests/_fixtures/foo.js b/system-tests/projects/todos/tests/_fixtures/foo.js similarity index 100% rename from packages/server/test/support/fixtures/projects/todos/tests/_fixtures/foo.js rename to system-tests/projects/todos/tests/_fixtures/foo.js diff --git a/packages/server/test/support/fixtures/projects/todos/tests/_fixtures/foo.json b/system-tests/projects/todos/tests/_fixtures/foo.json similarity index 100% rename from packages/server/test/support/fixtures/projects/todos/tests/_fixtures/foo.json rename to system-tests/projects/todos/tests/_fixtures/foo.json diff --git a/packages/server/test/support/fixtures/projects/todos/tests/_fixtures/images/flower.png b/system-tests/projects/todos/tests/_fixtures/images/flower.png similarity index 100% rename from packages/server/test/support/fixtures/projects/todos/tests/_fixtures/images/flower.png rename to system-tests/projects/todos/tests/_fixtures/images/flower.png diff --git a/packages/server/test/support/fixtures/projects/todos/tests/_fixtures/images/sample.jpg b/system-tests/projects/todos/tests/_fixtures/images/sample.jpg similarity index 100% rename from packages/server/test/support/fixtures/projects/todos/tests/_fixtures/images/sample.jpg rename to system-tests/projects/todos/tests/_fixtures/images/sample.jpg diff --git a/packages/server/test/support/fixtures/projects/todos/tests/_fixtures/images/sample.tif b/system-tests/projects/todos/tests/_fixtures/images/sample.tif similarity index 100% rename from packages/server/test/support/fixtures/projects/todos/tests/_fixtures/images/sample.tif rename to system-tests/projects/todos/tests/_fixtures/images/sample.tif diff --git a/packages/server/test/support/fixtures/projects/todos/tests/_fixtures/images/word.gif b/system-tests/projects/todos/tests/_fixtures/images/word.gif similarity index 100% rename from packages/server/test/support/fixtures/projects/todos/tests/_fixtures/images/word.gif rename to system-tests/projects/todos/tests/_fixtures/images/word.gif diff --git a/packages/server/test/support/fixtures/projects/todos/tests/_fixtures/index.html b/system-tests/projects/todos/tests/_fixtures/index.html similarity index 100% rename from packages/server/test/support/fixtures/projects/todos/tests/_fixtures/index.html rename to system-tests/projects/todos/tests/_fixtures/index.html diff --git a/packages/server/test/support/fixtures/projects/todos/tests/_fixtures/invalid.exe b/system-tests/projects/todos/tests/_fixtures/invalid.exe similarity index 100% rename from packages/server/test/support/fixtures/projects/todos/tests/_fixtures/invalid.exe rename to system-tests/projects/todos/tests/_fixtures/invalid.exe diff --git a/packages/server/test/support/fixtures/projects/todos/tests/_fixtures/message.txt b/system-tests/projects/todos/tests/_fixtures/message.txt similarity index 100% rename from packages/server/test/support/fixtures/projects/todos/tests/_fixtures/message.txt rename to system-tests/projects/todos/tests/_fixtures/message.txt diff --git a/packages/server/test/support/fixtures/projects/todos/tests/_fixtures/nested/fixture.js b/system-tests/projects/todos/tests/_fixtures/nested/fixture.js similarity index 100% rename from packages/server/test/support/fixtures/projects/todos/tests/_fixtures/nested/fixture.js rename to system-tests/projects/todos/tests/_fixtures/nested/fixture.js diff --git a/packages/server/test/support/fixtures/projects/todos/tests/_fixtures/no_format.js b/system-tests/projects/todos/tests/_fixtures/no_format.js similarity index 100% rename from packages/server/test/support/fixtures/projects/todos/tests/_fixtures/no_format.js rename to system-tests/projects/todos/tests/_fixtures/no_format.js diff --git a/packages/server/test/support/fixtures/projects/todos/tests/_fixtures/no_format.json b/system-tests/projects/todos/tests/_fixtures/no_format.json similarity index 100% rename from packages/server/test/support/fixtures/projects/todos/tests/_fixtures/no_format.json rename to system-tests/projects/todos/tests/_fixtures/no_format.json diff --git a/packages/server/test/support/fixtures/projects/todos/tests/_fixtures/no_format_coffee.coffee b/system-tests/projects/todos/tests/_fixtures/no_format_coffee.coffee similarity index 100% rename from packages/server/test/support/fixtures/projects/todos/tests/_fixtures/no_format_coffee.coffee rename to system-tests/projects/todos/tests/_fixtures/no_format_coffee.coffee diff --git a/packages/server/test/support/fixtures/projects/todos/tests/_fixtures/trailing_new_line.html b/system-tests/projects/todos/tests/_fixtures/trailing_new_line.html similarity index 100% rename from packages/server/test/support/fixtures/projects/todos/tests/_fixtures/trailing_new_line.html rename to system-tests/projects/todos/tests/_fixtures/trailing_new_line.html diff --git a/packages/server/test/support/fixtures/projects/todos/tests/_fixtures/trailing_new_line.js b/system-tests/projects/todos/tests/_fixtures/trailing_new_line.js similarity index 100% rename from packages/server/test/support/fixtures/projects/todos/tests/_fixtures/trailing_new_line.js rename to system-tests/projects/todos/tests/_fixtures/trailing_new_line.js diff --git a/packages/server/test/support/fixtures/projects/todos/tests/_fixtures/trailing_new_line.json b/system-tests/projects/todos/tests/_fixtures/trailing_new_line.json similarity index 100% rename from packages/server/test/support/fixtures/projects/todos/tests/_fixtures/trailing_new_line.json rename to system-tests/projects/todos/tests/_fixtures/trailing_new_line.json diff --git a/packages/server/test/support/fixtures/projects/todos/tests/_fixtures/trailing_new_line.txt b/system-tests/projects/todos/tests/_fixtures/trailing_new_line.txt similarity index 100% rename from packages/server/test/support/fixtures/projects/todos/tests/_fixtures/trailing_new_line.txt rename to system-tests/projects/todos/tests/_fixtures/trailing_new_line.txt diff --git a/packages/server/test/support/fixtures/projects/todos/tests/_fixtures/trailing_new_line_coffee.coffee b/system-tests/projects/todos/tests/_fixtures/trailing_new_line_coffee.coffee similarity index 100% rename from packages/server/test/support/fixtures/projects/todos/tests/_fixtures/trailing_new_line_coffee.coffee rename to system-tests/projects/todos/tests/_fixtures/trailing_new_line_coffee.coffee diff --git a/packages/server/test/support/fixtures/projects/todos/tests/_fixtures/unicode_escape.json b/system-tests/projects/todos/tests/_fixtures/unicode_escape.json similarity index 100% rename from packages/server/test/support/fixtures/projects/todos/tests/_fixtures/unicode_escape.json rename to system-tests/projects/todos/tests/_fixtures/unicode_escape.json diff --git a/packages/server/test/support/fixtures/projects/todos/tests/_fixtures/unknown_ext.yaml b/system-tests/projects/todos/tests/_fixtures/unknown_ext.yaml similarity index 100% rename from packages/server/test/support/fixtures/projects/todos/tests/_fixtures/unknown_ext.yaml rename to system-tests/projects/todos/tests/_fixtures/unknown_ext.yaml diff --git a/packages/server/test/support/fixtures/projects/todos/tests/_fixtures/user.js b/system-tests/projects/todos/tests/_fixtures/user.js similarity index 100% rename from packages/server/test/support/fixtures/projects/todos/tests/_fixtures/user.js rename to system-tests/projects/todos/tests/_fixtures/user.js diff --git a/packages/server/test/support/fixtures/projects/todos/tests/_fixtures/users.json b/system-tests/projects/todos/tests/_fixtures/users.json similarity index 100% rename from packages/server/test/support/fixtures/projects/todos/tests/_fixtures/users.json rename to system-tests/projects/todos/tests/_fixtures/users.json diff --git a/packages/server/test/support/fixtures/projects/todos/tests/_fixtures/valid_coffee_obj.coffee b/system-tests/projects/todos/tests/_fixtures/valid_coffee_obj.coffee similarity index 100% rename from packages/server/test/support/fixtures/projects/todos/tests/_fixtures/valid_coffee_obj.coffee rename to system-tests/projects/todos/tests/_fixtures/valid_coffee_obj.coffee diff --git a/packages/server/test/support/fixtures/projects/todos/tests/_fixtures/words.json b/system-tests/projects/todos/tests/_fixtures/words.json similarity index 100% rename from packages/server/test/support/fixtures/projects/todos/tests/_fixtures/words.json rename to system-tests/projects/todos/tests/_fixtures/words.json diff --git a/packages/server/test/support/fixtures/projects/todos/tests/_support/spec_helper.js b/system-tests/projects/todos/tests/_support/spec_helper.js similarity index 100% rename from packages/server/test/support/fixtures/projects/todos/tests/_support/spec_helper.js rename to system-tests/projects/todos/tests/_support/spec_helper.js diff --git a/packages/server/test/support/fixtures/projects/todos/tests/etc/etc.js b/system-tests/projects/todos/tests/etc/etc.js similarity index 100% rename from packages/server/test/support/fixtures/projects/todos/tests/etc/etc.js rename to system-tests/projects/todos/tests/etc/etc.js diff --git a/packages/server/test/support/fixtures/projects/todos/tests/sub/a&b%c.js b/system-tests/projects/todos/tests/sub/a&b%c.js similarity index 100% rename from packages/server/test/support/fixtures/projects/todos/tests/sub/a&b%c.js rename to system-tests/projects/todos/tests/sub/a&b%c.js diff --git a/packages/server/test/support/fixtures/projects/todos/tests/sub/sub_test.coffee b/system-tests/projects/todos/tests/sub/sub_test.coffee similarity index 100% rename from packages/server/test/support/fixtures/projects/todos/tests/sub/sub_test.coffee rename to system-tests/projects/todos/tests/sub/sub_test.coffee diff --git a/packages/server/test/support/fixtures/projects/todos/tests/test1.js b/system-tests/projects/todos/tests/test1.js similarity index 100% rename from packages/server/test/support/fixtures/projects/todos/tests/test1.js rename to system-tests/projects/todos/tests/test1.js diff --git a/packages/server/test/support/fixtures/projects/todos/tests/test2.coffee b/system-tests/projects/todos/tests/test2.coffee similarity index 100% rename from packages/server/test/support/fixtures/projects/todos/tests/test2.coffee rename to system-tests/projects/todos/tests/test2.coffee diff --git a/packages/server/test/support/fixtures/projects/todos/throws-error.js b/system-tests/projects/todos/throws-error.js similarity index 100% rename from packages/server/test/support/fixtures/projects/todos/throws-error.js rename to system-tests/projects/todos/throws-error.js diff --git a/packages/server/test/support/fixtures/projects/ts-installed/.gitignore b/system-tests/projects/ts-installed/.gitignore similarity index 100% rename from packages/server/test/support/fixtures/projects/ts-installed/.gitignore rename to system-tests/projects/ts-installed/.gitignore diff --git a/system-tests/projects/ts-installed/cypress.json b/system-tests/projects/ts-installed/cypress.json new file mode 100644 index 000000000000..9e26dfeeb6e6 --- /dev/null +++ b/system-tests/projects/ts-installed/cypress.json @@ -0,0 +1 @@ +{} \ No newline at end of file diff --git a/packages/server/test/support/fixtures/projects/ts-proj-custom-names/cypress.json b/system-tests/projects/ts-proj-custom-names/cypress.json similarity index 100% rename from packages/server/test/support/fixtures/projects/ts-proj-custom-names/cypress.json rename to system-tests/projects/ts-proj-custom-names/cypress.json diff --git a/packages/server/test/support/fixtures/projects/ts-proj-custom-names/cypress/integration/app_spec.ts b/system-tests/projects/ts-proj-custom-names/cypress/integration/app_spec.ts similarity index 100% rename from packages/server/test/support/fixtures/projects/ts-proj-custom-names/cypress/integration/app_spec.ts rename to system-tests/projects/ts-proj-custom-names/cypress/integration/app_spec.ts diff --git a/packages/server/test/support/fixtures/projects/ts-proj-custom-names/cypress/integration/math.ts b/system-tests/projects/ts-proj-custom-names/cypress/integration/math.ts similarity index 100% rename from packages/server/test/support/fixtures/projects/ts-proj-custom-names/cypress/integration/math.ts rename to system-tests/projects/ts-proj-custom-names/cypress/integration/math.ts diff --git a/packages/server/test/support/fixtures/projects/ts-proj-custom-names/cypress/plugins.ts b/system-tests/projects/ts-proj-custom-names/cypress/plugins.ts similarity index 100% rename from packages/server/test/support/fixtures/projects/ts-proj-custom-names/cypress/plugins.ts rename to system-tests/projects/ts-proj-custom-names/cypress/plugins.ts diff --git a/packages/server/test/support/fixtures/projects/ts-proj-custom-names/cypress/support.ts b/system-tests/projects/ts-proj-custom-names/cypress/support.ts similarity index 100% rename from packages/server/test/support/fixtures/projects/ts-proj-custom-names/cypress/support.ts rename to system-tests/projects/ts-proj-custom-names/cypress/support.ts diff --git a/packages/server/test/support/fixtures/projects/ts-proj-esmoduleinterop-true/cypress.json b/system-tests/projects/ts-proj-esmoduleinterop-true/cypress.json similarity index 100% rename from packages/server/test/support/fixtures/projects/ts-proj-esmoduleinterop-true/cypress.json rename to system-tests/projects/ts-proj-esmoduleinterop-true/cypress.json diff --git a/packages/server/test/support/fixtures/projects/ts-proj-esmoduleinterop-true/cypress/integration/passing_spec.ts b/system-tests/projects/ts-proj-esmoduleinterop-true/cypress/integration/passing_spec.ts similarity index 100% rename from packages/server/test/support/fixtures/projects/ts-proj-esmoduleinterop-true/cypress/integration/passing_spec.ts rename to system-tests/projects/ts-proj-esmoduleinterop-true/cypress/integration/passing_spec.ts diff --git a/packages/server/test/support/fixtures/projects/ts-proj-esmoduleinterop-true/cypress/plugins/commonjs-export.js b/system-tests/projects/ts-proj-esmoduleinterop-true/cypress/plugins/commonjs-export.js similarity index 100% rename from packages/server/test/support/fixtures/projects/ts-proj-esmoduleinterop-true/cypress/plugins/commonjs-export.js rename to system-tests/projects/ts-proj-esmoduleinterop-true/cypress/plugins/commonjs-export.js diff --git a/packages/server/test/support/fixtures/projects/ts-proj-esmoduleinterop-true/cypress/plugins/index.ts b/system-tests/projects/ts-proj-esmoduleinterop-true/cypress/plugins/index.ts similarity index 100% rename from packages/server/test/support/fixtures/projects/ts-proj-esmoduleinterop-true/cypress/plugins/index.ts rename to system-tests/projects/ts-proj-esmoduleinterop-true/cypress/plugins/index.ts diff --git a/packages/server/test/support/fixtures/projects/ts-proj-esmoduleinterop-true/tsconfig.json b/system-tests/projects/ts-proj-esmoduleinterop-true/tsconfig.json similarity index 100% rename from packages/server/test/support/fixtures/projects/ts-proj-esmoduleinterop-true/tsconfig.json rename to system-tests/projects/ts-proj-esmoduleinterop-true/tsconfig.json diff --git a/packages/server/test/support/fixtures/projects/ts-proj-tsconfig-in-plugins/cypress.json b/system-tests/projects/ts-proj-tsconfig-in-plugins/cypress.json similarity index 100% rename from packages/server/test/support/fixtures/projects/ts-proj-tsconfig-in-plugins/cypress.json rename to system-tests/projects/ts-proj-tsconfig-in-plugins/cypress.json diff --git a/packages/server/test/support/fixtures/projects/ts-proj-tsconfig-in-plugins/cypress/integration/passing_spec.ts b/system-tests/projects/ts-proj-tsconfig-in-plugins/cypress/integration/passing_spec.js similarity index 100% rename from packages/server/test/support/fixtures/projects/ts-proj-tsconfig-in-plugins/cypress/integration/passing_spec.ts rename to system-tests/projects/ts-proj-tsconfig-in-plugins/cypress/integration/passing_spec.js diff --git a/packages/server/test/support/fixtures/projects/ts-proj-tsconfig-in-plugins/cypress/plugins/index.ts b/system-tests/projects/ts-proj-tsconfig-in-plugins/cypress/plugins/index.ts similarity index 100% rename from packages/server/test/support/fixtures/projects/ts-proj-tsconfig-in-plugins/cypress/plugins/index.ts rename to system-tests/projects/ts-proj-tsconfig-in-plugins/cypress/plugins/index.ts diff --git a/packages/server/test/support/fixtures/projects/ts-proj-tsconfig-in-plugins/cypress/plugins/tsconfig.json b/system-tests/projects/ts-proj-tsconfig-in-plugins/cypress/plugins/tsconfig.json similarity index 100% rename from packages/server/test/support/fixtures/projects/ts-proj-tsconfig-in-plugins/cypress/plugins/tsconfig.json rename to system-tests/projects/ts-proj-tsconfig-in-plugins/cypress/plugins/tsconfig.json diff --git a/packages/server/test/support/fixtures/projects/ts-proj-with-module-esnext/cypress.json b/system-tests/projects/ts-proj-with-module-esnext/cypress.json similarity index 100% rename from packages/server/test/support/fixtures/projects/ts-proj-with-module-esnext/cypress.json rename to system-tests/projects/ts-proj-with-module-esnext/cypress.json diff --git a/packages/server/test/support/fixtures/projects/ts-proj-with-module-esnext/cypress/integration/uses_cy_task_in_ts_plugins_file_spec.js b/system-tests/projects/ts-proj-with-module-esnext/cypress/integration/uses_cy_task_in_ts_plugins_file_spec.js similarity index 100% rename from packages/server/test/support/fixtures/projects/ts-proj-with-module-esnext/cypress/integration/uses_cy_task_in_ts_plugins_file_spec.js rename to system-tests/projects/ts-proj-with-module-esnext/cypress/integration/uses_cy_task_in_ts_plugins_file_spec.js diff --git a/packages/server/test/support/fixtures/projects/ts-proj-with-module-esnext/cypress/plugins/greeting.ts b/system-tests/projects/ts-proj-with-module-esnext/cypress/plugins/greeting.ts similarity index 100% rename from packages/server/test/support/fixtures/projects/ts-proj-with-module-esnext/cypress/plugins/greeting.ts rename to system-tests/projects/ts-proj-with-module-esnext/cypress/plugins/greeting.ts diff --git a/packages/server/test/support/fixtures/projects/ts-proj-with-module-esnext/cypress/plugins/index.ts b/system-tests/projects/ts-proj-with-module-esnext/cypress/plugins/index.ts similarity index 100% rename from packages/server/test/support/fixtures/projects/ts-proj-with-module-esnext/cypress/plugins/index.ts rename to system-tests/projects/ts-proj-with-module-esnext/cypress/plugins/index.ts diff --git a/packages/server/test/support/fixtures/projects/ts-proj-with-module-esnext/tsconfig.json b/system-tests/projects/ts-proj-with-module-esnext/tsconfig.json similarity index 100% rename from packages/server/test/support/fixtures/projects/ts-proj-with-module-esnext/tsconfig.json rename to system-tests/projects/ts-proj-with-module-esnext/tsconfig.json diff --git a/packages/server/test/support/fixtures/projects/ts-proj-with-paths/cypress.json b/system-tests/projects/ts-proj-with-paths/cypress.json similarity index 100% rename from packages/server/test/support/fixtures/projects/ts-proj-with-paths/cypress.json rename to system-tests/projects/ts-proj-with-paths/cypress.json diff --git a/packages/server/test/support/fixtures/projects/ts-proj-with-paths/cypress/integration/app_spec.ts b/system-tests/projects/ts-proj-with-paths/cypress/integration/app_spec.ts similarity index 100% rename from packages/server/test/support/fixtures/projects/ts-proj-with-paths/cypress/integration/app_spec.ts rename to system-tests/projects/ts-proj-with-paths/cypress/integration/app_spec.ts diff --git a/packages/server/test/support/fixtures/projects/ts-proj-with-paths/cypress/plugins/index.ts b/system-tests/projects/ts-proj-with-paths/cypress/plugins/index.ts similarity index 100% rename from packages/server/test/support/fixtures/projects/ts-proj-with-paths/cypress/plugins/index.ts rename to system-tests/projects/ts-proj-with-paths/cypress/plugins/index.ts diff --git a/packages/server/test/support/fixtures/projects/ts-proj-with-paths/cypress/support/index.ts b/system-tests/projects/ts-proj-with-paths/cypress/support/index.ts similarity index 100% rename from packages/server/test/support/fixtures/projects/ts-proj-with-paths/cypress/support/index.ts rename to system-tests/projects/ts-proj-with-paths/cypress/support/index.ts diff --git a/packages/server/test/support/fixtures/projects/ts-proj-with-paths/src/main.ts b/system-tests/projects/ts-proj-with-paths/src/main.ts similarity index 100% rename from packages/server/test/support/fixtures/projects/ts-proj-with-paths/src/main.ts rename to system-tests/projects/ts-proj-with-paths/src/main.ts diff --git a/packages/server/test/support/fixtures/projects/ts-proj-with-paths/tsconfig.json b/system-tests/projects/ts-proj-with-paths/tsconfig.json similarity index 100% rename from packages/server/test/support/fixtures/projects/ts-proj-with-paths/tsconfig.json rename to system-tests/projects/ts-proj-with-paths/tsconfig.json diff --git a/packages/server/test/support/fixtures/projects/ts-proj/cypress.json b/system-tests/projects/ts-proj/cypress.json similarity index 100% rename from packages/server/test/support/fixtures/projects/ts-proj/cypress.json rename to system-tests/projects/ts-proj/cypress.json diff --git a/packages/server/test/support/fixtures/projects/ts-proj/cypress/integration/app_spec.ts b/system-tests/projects/ts-proj/cypress/integration/app_spec.ts similarity index 100% rename from packages/server/test/support/fixtures/projects/ts-proj/cypress/integration/app_spec.ts rename to system-tests/projects/ts-proj/cypress/integration/app_spec.ts diff --git a/packages/server/test/support/fixtures/projects/ts-proj/cypress/integration/math.ts b/system-tests/projects/ts-proj/cypress/integration/math.ts similarity index 100% rename from packages/server/test/support/fixtures/projects/ts-proj/cypress/integration/math.ts rename to system-tests/projects/ts-proj/cypress/integration/math.ts diff --git a/packages/server/test/support/fixtures/projects/ts-proj/cypress/plugins/commonjs-export-function.js b/system-tests/projects/ts-proj/cypress/plugins/commonjs-export-function.js similarity index 100% rename from packages/server/test/support/fixtures/projects/ts-proj/cypress/plugins/commonjs-export-function.js rename to system-tests/projects/ts-proj/cypress/plugins/commonjs-export-function.js diff --git a/packages/server/test/support/fixtures/projects/ts-proj/cypress/plugins/index.ts b/system-tests/projects/ts-proj/cypress/plugins/index.ts similarity index 100% rename from packages/server/test/support/fixtures/projects/ts-proj/cypress/plugins/index.ts rename to system-tests/projects/ts-proj/cypress/plugins/index.ts diff --git a/packages/server/test/support/fixtures/projects/ts-proj/cypress/support/commands.ts b/system-tests/projects/ts-proj/cypress/support/commands.ts similarity index 100% rename from packages/server/test/support/fixtures/projects/ts-proj/cypress/support/commands.ts rename to system-tests/projects/ts-proj/cypress/support/commands.ts diff --git a/packages/server/test/support/fixtures/projects/ts-proj/cypress/support/index.ts b/system-tests/projects/ts-proj/cypress/support/index.ts similarity index 100% rename from packages/server/test/support/fixtures/projects/ts-proj/cypress/support/index.ts rename to system-tests/projects/ts-proj/cypress/support/index.ts diff --git a/packages/server/test/support/fixtures/projects/ts-proj/tsconfig.json b/system-tests/projects/ts-proj/tsconfig.json similarity index 100% rename from packages/server/test/support/fixtures/projects/ts-proj/tsconfig.json rename to system-tests/projects/ts-proj/tsconfig.json diff --git a/packages/server/test/support/fixtures/projects/uncaught-support-file/cypress.json b/system-tests/projects/uncaught-support-file/cypress.json similarity index 100% rename from packages/server/test/support/fixtures/projects/uncaught-support-file/cypress.json rename to system-tests/projects/uncaught-support-file/cypress.json diff --git a/packages/server/test/support/fixtures/projects/uncaught-support-file/cypress/integration/spec.js b/system-tests/projects/uncaught-support-file/cypress/integration/spec.js similarity index 100% rename from packages/server/test/support/fixtures/projects/uncaught-support-file/cypress/integration/spec.js rename to system-tests/projects/uncaught-support-file/cypress/integration/spec.js diff --git a/packages/server/test/support/fixtures/projects/uncaught-support-file/cypress/support/index.js b/system-tests/projects/uncaught-support-file/cypress/support/index.js similarity index 100% rename from packages/server/test/support/fixtures/projects/uncaught-support-file/cypress/support/index.js rename to system-tests/projects/uncaught-support-file/cypress/support/index.js diff --git a/packages/server/test/support/fixtures/projects/utils.js b/system-tests/projects/utils.js similarity index 100% rename from packages/server/test/support/fixtures/projects/utils.js rename to system-tests/projects/utils.js diff --git a/packages/server/test/support/fixtures/projects/various-file-types/cypress/integration/.gitkeep b/system-tests/projects/various-file-types/cypress/integration/.gitkeep similarity index 100% rename from packages/server/test/support/fixtures/projects/various-file-types/cypress/integration/.gitkeep rename to system-tests/projects/various-file-types/cypress/integration/.gitkeep diff --git a/packages/server/test/support/fixtures/projects/various-file-types/cypress/integration/coffee_spec.coffee b/system-tests/projects/various-file-types/cypress/integration/coffee_spec.coffee similarity index 100% rename from packages/server/test/support/fixtures/projects/various-file-types/cypress/integration/coffee_spec.coffee rename to system-tests/projects/various-file-types/cypress/integration/coffee_spec.coffee diff --git a/packages/server/test/support/fixtures/projects/various-file-types/cypress/integration/js_spec.js b/system-tests/projects/various-file-types/cypress/integration/js_spec.js similarity index 100% rename from packages/server/test/support/fixtures/projects/various-file-types/cypress/integration/js_spec.js rename to system-tests/projects/various-file-types/cypress/integration/js_spec.js diff --git a/packages/server/test/support/fixtures/projects/various-file-types/cypress/integration/ts_spec.ts b/system-tests/projects/various-file-types/cypress/integration/ts_spec.ts similarity index 100% rename from packages/server/test/support/fixtures/projects/various-file-types/cypress/integration/ts_spec.ts rename to system-tests/projects/various-file-types/cypress/integration/ts_spec.ts diff --git a/packages/server/test/support/fixtures/projects/webpack-preprocessor-awesome-typescript-loader/cypress.json b/system-tests/projects/webpack-preprocessor-awesome-typescript-loader/cypress.json similarity index 100% rename from packages/server/test/support/fixtures/projects/webpack-preprocessor-awesome-typescript-loader/cypress.json rename to system-tests/projects/webpack-preprocessor-awesome-typescript-loader/cypress.json diff --git a/packages/server/test/support/fixtures/projects/webpack-preprocessor-awesome-typescript-loader/cypress/integration/failing_spec.ts b/system-tests/projects/webpack-preprocessor-awesome-typescript-loader/cypress/integration/failing_spec.ts similarity index 100% rename from packages/server/test/support/fixtures/projects/webpack-preprocessor-awesome-typescript-loader/cypress/integration/failing_spec.ts rename to system-tests/projects/webpack-preprocessor-awesome-typescript-loader/cypress/integration/failing_spec.ts diff --git a/packages/server/test/support/fixtures/projects/webpack-preprocessor-awesome-typescript-loader/cypress/plugins/index.js b/system-tests/projects/webpack-preprocessor-awesome-typescript-loader/cypress/plugins/index.js similarity index 100% rename from packages/server/test/support/fixtures/projects/webpack-preprocessor-awesome-typescript-loader/cypress/plugins/index.js rename to system-tests/projects/webpack-preprocessor-awesome-typescript-loader/cypress/plugins/index.js diff --git a/packages/server/test/support/fixtures/projects/webpack-preprocessor-awesome-typescript-loader/tsconfig.json b/system-tests/projects/webpack-preprocessor-awesome-typescript-loader/tsconfig.json similarity index 100% rename from packages/server/test/support/fixtures/projects/webpack-preprocessor-awesome-typescript-loader/tsconfig.json rename to system-tests/projects/webpack-preprocessor-awesome-typescript-loader/tsconfig.json diff --git a/packages/server/test/support/fixtures/projects/webpack-preprocessor-ts-loader-compiler-options/cypress.json b/system-tests/projects/webpack-preprocessor-ts-loader-compiler-options/cypress.json similarity index 100% rename from packages/server/test/support/fixtures/projects/webpack-preprocessor-ts-loader-compiler-options/cypress.json rename to system-tests/projects/webpack-preprocessor-ts-loader-compiler-options/cypress.json diff --git a/packages/server/test/support/fixtures/projects/webpack-preprocessor-ts-loader-compiler-options/cypress/integration/failing_spec.ts b/system-tests/projects/webpack-preprocessor-ts-loader-compiler-options/cypress/integration/failing_spec.ts similarity index 100% rename from packages/server/test/support/fixtures/projects/webpack-preprocessor-ts-loader-compiler-options/cypress/integration/failing_spec.ts rename to system-tests/projects/webpack-preprocessor-ts-loader-compiler-options/cypress/integration/failing_spec.ts diff --git a/packages/server/test/support/fixtures/projects/webpack-preprocessor-ts-loader-compiler-options/cypress/plugins/index.js b/system-tests/projects/webpack-preprocessor-ts-loader-compiler-options/cypress/plugins/index.js similarity index 100% rename from packages/server/test/support/fixtures/projects/webpack-preprocessor-ts-loader-compiler-options/cypress/plugins/index.js rename to system-tests/projects/webpack-preprocessor-ts-loader-compiler-options/cypress/plugins/index.js diff --git a/packages/server/test/support/fixtures/projects/webpack-preprocessor-ts-loader-compiler-options/tsconfig.json b/system-tests/projects/webpack-preprocessor-ts-loader-compiler-options/tsconfig.json similarity index 100% rename from packages/server/test/support/fixtures/projects/webpack-preprocessor-ts-loader-compiler-options/tsconfig.json rename to system-tests/projects/webpack-preprocessor-ts-loader-compiler-options/tsconfig.json diff --git a/packages/server/test/support/fixtures/projects/webpack-preprocessor-ts-loader/cypress.json b/system-tests/projects/webpack-preprocessor-ts-loader/cypress.json similarity index 100% rename from packages/server/test/support/fixtures/projects/webpack-preprocessor-ts-loader/cypress.json rename to system-tests/projects/webpack-preprocessor-ts-loader/cypress.json diff --git a/packages/server/test/support/fixtures/projects/webpack-preprocessor-ts-loader/cypress/integration/failing_spec.ts b/system-tests/projects/webpack-preprocessor-ts-loader/cypress/integration/failing_spec.ts similarity index 100% rename from packages/server/test/support/fixtures/projects/webpack-preprocessor-ts-loader/cypress/integration/failing_spec.ts rename to system-tests/projects/webpack-preprocessor-ts-loader/cypress/integration/failing_spec.ts diff --git a/packages/server/test/support/fixtures/projects/webpack-preprocessor-ts-loader/cypress/plugins/index.js b/system-tests/projects/webpack-preprocessor-ts-loader/cypress/plugins/index.js similarity index 100% rename from packages/server/test/support/fixtures/projects/webpack-preprocessor-ts-loader/cypress/plugins/index.js rename to system-tests/projects/webpack-preprocessor-ts-loader/cypress/plugins/index.js diff --git a/packages/server/test/support/fixtures/projects/webpack-preprocessor-ts-loader/tsconfig.json b/system-tests/projects/webpack-preprocessor-ts-loader/tsconfig.json similarity index 100% rename from packages/server/test/support/fixtures/projects/webpack-preprocessor-ts-loader/tsconfig.json rename to system-tests/projects/webpack-preprocessor-ts-loader/tsconfig.json diff --git a/packages/server/test/support/fixtures/projects/webpack-preprocessor/cypress.json b/system-tests/projects/webpack-preprocessor/cypress.json similarity index 100% rename from packages/server/test/support/fixtures/projects/webpack-preprocessor/cypress.json rename to system-tests/projects/webpack-preprocessor/cypress.json diff --git a/packages/server/test/support/fixtures/projects/webpack-preprocessor/cypress/integration/failing_spec.js b/system-tests/projects/webpack-preprocessor/cypress/integration/failing_spec.js similarity index 100% rename from packages/server/test/support/fixtures/projects/webpack-preprocessor/cypress/integration/failing_spec.js rename to system-tests/projects/webpack-preprocessor/cypress/integration/failing_spec.js diff --git a/packages/server/test/support/fixtures/projects/webpack-preprocessor/cypress/plugins/index.js b/system-tests/projects/webpack-preprocessor/cypress/plugins/index.js similarity index 100% rename from packages/server/test/support/fixtures/projects/webpack-preprocessor/cypress/plugins/index.js rename to system-tests/projects/webpack-preprocessor/cypress/plugins/index.js diff --git a/packages/server/test/support/fixtures/projects/working-preprocessor/cypress.json b/system-tests/projects/working-preprocessor/cypress.json similarity index 100% rename from packages/server/test/support/fixtures/projects/working-preprocessor/cypress.json rename to system-tests/projects/working-preprocessor/cypress.json diff --git a/packages/server/test/support/fixtures/projects/working-preprocessor/cypress/integration/another_spec.js b/system-tests/projects/working-preprocessor/cypress/integration/another_spec.js similarity index 100% rename from packages/server/test/support/fixtures/projects/working-preprocessor/cypress/integration/another_spec.js rename to system-tests/projects/working-preprocessor/cypress/integration/another_spec.js diff --git a/packages/server/test/support/fixtures/projects/working-preprocessor/cypress/integration/app_spec.js b/system-tests/projects/working-preprocessor/cypress/integration/app_spec.js similarity index 100% rename from packages/server/test/support/fixtures/projects/working-preprocessor/cypress/integration/app_spec.js rename to system-tests/projects/working-preprocessor/cypress/integration/app_spec.js diff --git a/packages/server/test/support/fixtures/projects/working-preprocessor/cypress/plugins/index.js b/system-tests/projects/working-preprocessor/cypress/plugins/index.js similarity index 100% rename from packages/server/test/support/fixtures/projects/working-preprocessor/cypress/plugins/index.js rename to system-tests/projects/working-preprocessor/cypress/plugins/index.js diff --git a/packages/server/test/support/fixtures/projects/yarn-v2-pnp/.gitignore b/system-tests/projects/yarn-v2-pnp/.gitignore similarity index 100% rename from packages/server/test/support/fixtures/projects/yarn-v2-pnp/.gitignore rename to system-tests/projects/yarn-v2-pnp/.gitignore diff --git a/packages/server/test/support/fixtures/projects/yarn-v2-pnp/.yarnrc.yml b/system-tests/projects/yarn-v2-pnp/.yarnrc.yml similarity index 100% rename from packages/server/test/support/fixtures/projects/yarn-v2-pnp/.yarnrc.yml rename to system-tests/projects/yarn-v2-pnp/.yarnrc.yml diff --git a/system-tests/projects/yarn-v2-pnp/cypress.json b/system-tests/projects/yarn-v2-pnp/cypress.json new file mode 100644 index 000000000000..9e26dfeeb6e6 --- /dev/null +++ b/system-tests/projects/yarn-v2-pnp/cypress.json @@ -0,0 +1 @@ +{} \ No newline at end of file diff --git a/packages/server/test/support/fixtures/projects/yarn-v2-pnp/cypress/integration/index.ts b/system-tests/projects/yarn-v2-pnp/cypress/integration/index.ts similarity index 100% rename from packages/server/test/support/fixtures/projects/yarn-v2-pnp/cypress/integration/index.ts rename to system-tests/projects/yarn-v2-pnp/cypress/integration/index.ts diff --git a/packages/server/test/support/fixtures/projects/yarn-v2-pnp/cypress/plugins/index.ts b/system-tests/projects/yarn-v2-pnp/cypress/plugins/index.ts similarity index 100% rename from packages/server/test/support/fixtures/projects/yarn-v2-pnp/cypress/plugins/index.ts rename to system-tests/projects/yarn-v2-pnp/cypress/plugins/index.ts diff --git a/packages/server/test/support/fixtures/projects/yarn-v2-pnp/package.json b/system-tests/projects/yarn-v2-pnp/package.json similarity index 100% rename from packages/server/test/support/fixtures/projects/yarn-v2-pnp/package.json rename to system-tests/projects/yarn-v2-pnp/package.json diff --git a/packages/server/test/support/fixtures/projects/yarn-v2-pnp/tsconfig.json b/system-tests/projects/yarn-v2-pnp/tsconfig.json similarity index 100% rename from packages/server/test/support/fixtures/projects/yarn-v2-pnp/tsconfig.json rename to system-tests/projects/yarn-v2-pnp/tsconfig.json diff --git a/packages/server/test/support/fixtures/projects/yarn-v2-pnp/yarn-berry.cjs b/system-tests/projects/yarn-v2-pnp/yarn-berry.cjs similarity index 100% rename from packages/server/test/support/fixtures/projects/yarn-v2-pnp/yarn-berry.cjs rename to system-tests/projects/yarn-v2-pnp/yarn-berry.cjs diff --git a/packages/server/test/support/fixtures/projects/yarn-v2-pnp/yarn.lock b/system-tests/projects/yarn-v2-pnp/yarn.lock similarity index 100% rename from packages/server/test/support/fixtures/projects/yarn-v2-pnp/yarn.lock rename to system-tests/projects/yarn-v2-pnp/yarn.lock diff --git a/system-tests/scripts/.eslintrc.json b/system-tests/scripts/.eslintrc.json new file mode 100644 index 000000000000..74e0826b6dbb --- /dev/null +++ b/system-tests/scripts/.eslintrc.json @@ -0,0 +1,5 @@ +{ + "parserOptions": { + "sourceType": "script" + } +} diff --git a/system-tests/scripts/run.js b/system-tests/scripts/run.js new file mode 100644 index 000000000000..1d32fd0196be --- /dev/null +++ b/system-tests/scripts/run.js @@ -0,0 +1,173 @@ +const _ = require('lodash') +const chalk = require('chalk') +const minimist = require('minimist') +const cp = require('child_process') + +const path = require('path') +const os = require('os') + +const options = minimist(process.argv.slice(2)) + +let run = options._ + +if (options['spec']) { + console.error('NOTE: It is no longer necessary to pass `--spec` to server test commands. Try passing the path directly instead.') + run = [options.spec] +} + +if (run[0] && run[0].includes('--inspect-brk')) { + run = run.slice(1) +} + +if (options['glob-in-dir']) { + if (run[0]) { + run = [path.join(options['glob-in-dir'], '**', `*${run[0]}*`)] + } else { + run = [path.join(options['glob-in-dir'], '**')] + } +} + +function exitErr (msg) { + console.error(chalk.red(msg)) + + return process.exit(1) +} + +const isWindows = () => { + return os.platform() === 'win32' +} + +const isGteNode12 = () => { + return Number(process.versions.node.split('.')[0]) >= 12 +} + +if (!run || !run.length) { + return exitErr(` + Error: A path to a spec file or a pattern must be specified! + + It should look something like this: + + $ yarn test ./test/unit/api_spec.js + $ yarn test api_spec + `) +} + +const commandAndArguments = { + command: '', + args: [], +} + +if (isWindows()) { + commandAndArguments.command = 'mocha' + commandAndArguments.args = run.slice() +} else { + commandAndArguments.command = 'xvfb-maybe' + // this should always match cli/lib/exec/xvfb.js + commandAndArguments.args = [ + `-as`, + `"-screen 0 1280x1024x24"`, + `--`, + 'node', + ] +} + +if (options['inspect-brk']) { + commandAndArguments.args.push( + '--inspect', + `--inspect-brk${options['inspect-brk'] === true ? '' : `=${options['inspect-brk']}`}`, + ) +} + +if (isGteNode12()) { + // max HTTP header size 8kb -> 1mb + // https://github.com/cypress-io/cypress/issues/76 + commandAndArguments.args.push( + `--max-http-header-size=${1024 * 1024}`, + ) +} + +if (!isWindows()) { + commandAndArguments.args.push( + 'node_modules/.bin/_mocha', + ) + + commandAndArguments.args = commandAndArguments.args.concat(run) +} + +if (options.fgrep) { + commandAndArguments.args.push( + '--fgrep', + options.fgrep, + ) +} + +commandAndArguments.args.push( + '--timeout', + options['inspect-brk'] ? '40000000' : '10000', + '--recursive', + '-r @packages/ts/register', + '--reporter', + 'mocha-multi-reporters', + '--reporter-options', + 'configFile=../../mocha-reporter-config.json', + '--extension=js,ts', + // restore mocha 2.x behavior to force end process after spec run + '--exit', +) + +const env = _.clone(process.env) + +env.NODE_ENV = 'test' +env.CYPRESS_INTERNAL_ENV = 'test' + +if (env.VERBOSE === '1') { + _.extend(env, { + CYPRESS_DEBUG: true, + NODE_DEBUG: 'request', + BLUEBIRD_DEBUG: 1, + DEBUG: _.chain([ + env.DEBUG, + 'nock.*', + '-nock.common', + '-nock.scope', + '-nock.interceptor', + 'socket.io:*', + 'xvfb-maybe', + ]) + .compact() + .join(','), + }) +} + +if (options.browser) { + env.BROWSER = options.browser +} + +if (options.headed) { + env.HEADED = true +} + +if (options.exit === false) { + env.NO_EXIT = '1' +} + +if (options['cypress-inspect-brk']) { + env.CYPRESS_INSPECT_BRK = '1' +} + +const cmd = `${commandAndArguments.command} ${ + commandAndArguments.args.join(' ')}` + +console.log('specfiles:', run) +console.log('test command:') +console.log(cmd) + +const child = cp.spawn(cmd, { shell: true, env, stdio: 'inherit' }) + +child.on('exit', (code, signal) => { + if (signal) { + console.error(`tests exited with signal ${signal}`) + } + + process.exit(code === null ? 1 : code) +}) diff --git a/packages/server/test/e2e/async_timeouts_spec.js b/system-tests/test/async_timeouts_spec.js similarity index 53% rename from packages/server/test/e2e/async_timeouts_spec.js rename to system-tests/test/async_timeouts_spec.js index 812d40c2e22b..7a9526d062cd 100644 --- a/packages/server/test/e2e/async_timeouts_spec.js +++ b/system-tests/test/async_timeouts_spec.js @@ -1,9 +1,9 @@ -const e2e = require('../support/helpers/e2e').default +const systemTests = require('../lib/system-tests').default describe('e2e async timeouts', () => { - e2e.setup() + systemTests.setup() - e2e.it('failing1', { + systemTests.it('failing1', { spec: 'async_timeouts_spec.js', snapshot: true, expectedExitCode: 2, diff --git a/packages/server/test/e2e/base_url_spec.js b/system-tests/test/base_url_spec.js similarity index 77% rename from packages/server/test/e2e/base_url_spec.js rename to system-tests/test/base_url_spec.js index 10454ed2ecd3..3b8842d73677 100644 --- a/packages/server/test/e2e/base_url_spec.js +++ b/system-tests/test/base_url_spec.js @@ -1,4 +1,4 @@ -const e2e = require('../support/helpers/e2e').default +const systemTests = require('../lib/system-tests').default const onServer = (app) => { return app.get('/app/html', (req, res) => { @@ -8,20 +8,20 @@ const onServer = (app) => { describe('e2e baseUrl', () => { context('https', () => { - e2e.setup({ + systemTests.setup({ settings: { baseUrl: 'https://httpbin.org', }, }) - e2e.it('passes', { + systemTests.it('passes', { spec: 'base_url_spec.js', snapshot: true, }) }) context('http', () => { - e2e.setup({ + systemTests.setup({ servers: { port: 9999, onServer, @@ -31,7 +31,7 @@ describe('e2e baseUrl', () => { }, }) - e2e.it('passes', { + systemTests.it('passes', { spec: 'base_url_spec.js', snapshot: true, }) diff --git a/packages/server/test/e2e/before_browser_launch_spec.ts b/system-tests/test/before_browser_launch_spec.ts similarity index 71% rename from packages/server/test/e2e/before_browser_launch_spec.ts rename to system-tests/test/before_browser_launch_spec.ts index f397bd310bff..4cef93a9fba8 100644 --- a/packages/server/test/e2e/before_browser_launch_spec.ts +++ b/system-tests/test/before_browser_launch_spec.ts @@ -1,6 +1,6 @@ -import e2e from '../support/helpers/e2e' -import Fixtures from '../support/helpers/fixtures' -import browserUtils from '../../lib/browsers/utils' +import systemTests from '../lib/system-tests' +import Fixtures from '../lib/fixtures' +import browserUtils from '@packages/server/lib/browsers/utils' const browser = { name: 'chrome', @@ -10,9 +10,9 @@ const isTextTerminal = true // we're always in run mode const PATH_TO_CHROME_PROFILE = browserUtils.getProfileDir(browser, isTextTerminal) describe('e2e before:browser:launch', () => { - e2e.setup() + systemTests.setup() - e2e.it('modifies preferences on disk if DNE', { + systemTests.it('modifies preferences on disk if DNE', { browser: 'chrome', config: { video: false, @@ -25,7 +25,7 @@ describe('e2e before:browser:launch', () => { spec: 'spec.js', }) - e2e.it('can add extensions', { + systemTests.it('can add extensions', { spec: 'spec.js', config: { video: false, diff --git a/packages/server/test/e2e/block_hosts_spec.js b/system-tests/test/block_hosts_spec.js similarity index 84% rename from packages/server/test/e2e/block_hosts_spec.js rename to system-tests/test/block_hosts_spec.js index d2e39e8044ed..1040907ffced 100644 --- a/packages/server/test/e2e/block_hosts_spec.js +++ b/system-tests/test/block_hosts_spec.js @@ -1,4 +1,4 @@ -const e2e = require('../support/helpers/e2e').default +const systemTests = require('../lib/system-tests').default const onServer = function (app) { app.get('/', (req, res) => { @@ -15,7 +15,7 @@ const onServer = function (app) { } describe('e2e blockHosts', () => { - e2e.setup({ + systemTests.setup({ servers: [{ port: 3131, onServer, @@ -31,7 +31,7 @@ describe('e2e blockHosts', () => { }) it('passes', function () { - return e2e.exec(this, { + return systemTests.exec(this, { spec: 'block_hosts_spec.js', snapshot: true, }) diff --git a/packages/server/test/e2e/browser_path_spec.js b/system-tests/test/browser_path_spec.js similarity index 88% rename from packages/server/test/e2e/browser_path_spec.js rename to system-tests/test/browser_path_spec.js index 8ddafdbd75d7..fc68a922c420 100644 --- a/packages/server/test/e2e/browser_path_spec.js +++ b/system-tests/test/browser_path_spec.js @@ -1,8 +1,8 @@ const path = require('path') const { exec } = require('child_process') -const e2e = require('../support/helpers/e2e').default -const Fixtures = require('../support/helpers/fixtures') +const systemTests = require('../lib/system-tests').default +const Fixtures = require('../lib/fixtures') const launcher = require('@packages/launcher') const absPath = (pathStr) => { @@ -22,10 +22,10 @@ const absPath = (pathStr) => { } describe('e2e launching browsers by path', () => { - e2e.setup() + systemTests.setup() it('fails with bad browser path', function () { - return e2e.exec(this, { + return systemTests.exec(this, { project: Fixtures.projectPath('e2e'), spec: 'simple_spec.js', browser: '/this/aint/gonna/be/found', @@ -52,7 +52,7 @@ describe('e2e launching browsers by path', () => { // so that server recognizes them as a path, not as a browser name .then((absPath)) .then((foundPath) => { - return e2e.exec(this, { + return systemTests.exec(this, { project: Fixtures.projectPath('e2e'), spec: 'simple_spec.js', browser: foundPath, diff --git a/packages/server/test/e2e/busted_support_file_spec.js b/system-tests/test/busted_support_file_spec.js similarity index 57% rename from packages/server/test/e2e/busted_support_file_spec.js rename to system-tests/test/busted_support_file_spec.js index 1a54dbbbe7c9..ce196e218b27 100644 --- a/packages/server/test/e2e/busted_support_file_spec.js +++ b/system-tests/test/busted_support_file_spec.js @@ -1,18 +1,18 @@ -const Fixtures = require('../support/helpers/fixtures') -const e2e = require('../support/helpers/e2e').default +const Fixtures = require('../lib/fixtures') +const systemTests = require('../lib/system-tests').default const bustedSupportFile = Fixtures.projectPath('busted-support-file') describe('e2e busted support file', () => { - e2e.setup() + systemTests.setup() it('passes', function () { - return e2e.exec(this, { + return systemTests.exec(this, { project: bustedSupportFile, sanitizeScreenshotDimensions: true, snapshot: true, expectedExitCode: 1, - onStdout: e2e.normalizeWebpackErrors, + onStdout: systemTests.normalizeWebpackErrors, }) }) }) diff --git a/packages/server/test/e2e/cache_spec.js b/system-tests/test/cache_spec.js similarity index 86% rename from packages/server/test/e2e/cache_spec.js rename to system-tests/test/cache_spec.js index 7f0546cac8ab..e286b3dd35d5 100644 --- a/packages/server/test/e2e/cache_spec.js +++ b/system-tests/test/cache_spec.js @@ -1,7 +1,7 @@ const fs = require('fs') const path = require('path') -const Fixtures = require('../support/helpers/fixtures') -const e2e = require('../support/helpers/e2e').default +const Fixtures = require('../lib/fixtures') +const systemTests = require('../lib/system-tests').default const replacerRe = /(

        )\w+(<\/h1>)/ @@ -33,7 +33,7 @@ const onServer = function (app) { } describe('e2e cache', () => { - e2e.setup({ + systemTests.setup({ servers: { port: 1515, onServer, @@ -45,21 +45,21 @@ describe('e2e cache', () => { }) it('passes', function () { - return e2e.exec(this, { + return systemTests.exec(this, { spec: 'cache_spec.js', snapshot: true, }) }) it('clears cache when browser is spawned', function () { - return e2e.exec(this, { + return systemTests.exec(this, { spec: 'cache_clearing_spec.js', }) .then(() => { // only 1 request should have gone out expect(requestsForCache).to.eq(1) - return e2e.exec(this, { + return systemTests.exec(this, { spec: 'cache_clearing_spec.js', }) .then(() => { diff --git a/packages/server/test/e2e/caught_uncaught_hook_errors_spec.js b/system-tests/test/caught_uncaught_hook_errors_spec.js similarity index 72% rename from packages/server/test/e2e/caught_uncaught_hook_errors_spec.js rename to system-tests/test/caught_uncaught_hook_errors_spec.js index dbe4e8f97727..9ff913ed5604 100644 --- a/packages/server/test/e2e/caught_uncaught_hook_errors_spec.js +++ b/system-tests/test/caught_uncaught_hook_errors_spec.js @@ -1,32 +1,32 @@ -const e2e = require('../support/helpers/e2e').default +const systemTests = require('../lib/system-tests').default describe('e2e caught and uncaught hooks errors', () => { - e2e.setup({ + systemTests.setup({ servers: { port: 7878, static: true, }, }) - e2e.it('failing1', { + systemTests.it('failing1', { spec: 'hook_caught_error_failing_spec.js', snapshot: true, expectedExitCode: 3, }) - e2e.it('failing2', { + systemTests.it('failing2', { spec: 'hook_uncaught_error_failing_spec.js', snapshot: true, expectedExitCode: 1, }) - e2e.it('failing3', { + systemTests.it('failing3', { spec: 'hook_uncaught_root_error_failing_spec.js', snapshot: true, expectedExitCode: 1, }) - e2e.it('failing4', { + systemTests.it('failing4', { spec: 'hook_uncaught_error_events_failing_spec.js', snapshot: true, expectedExitCode: 1, diff --git a/packages/server/test/e2e/cdp_spec.ts b/system-tests/test/cdp_spec.ts similarity index 78% rename from packages/server/test/e2e/cdp_spec.ts rename to system-tests/test/cdp_spec.ts index c80af4680e13..79d77badd83d 100644 --- a/packages/server/test/e2e/cdp_spec.ts +++ b/system-tests/test/cdp_spec.ts @@ -1,9 +1,9 @@ import mockedEnv from 'mocked-env' -import e2e from '../support/helpers/e2e' -import Fixtures from '../support/helpers/fixtures' +import systemTests from '../lib/system-tests' +import Fixtures from '../lib/fixtures' describe('e2e cdp', function () { - e2e.setup() + systemTests.setup() let restoreEnv: Function beforeEach(() => { @@ -17,7 +17,7 @@ describe('e2e cdp', function () { }) // NOTE: this test takes almost a minute and is largely redundant with protocol_spec - e2e.it.skip('fails when remote debugging port cannot be connected to', { + systemTests.it.skip('fails when remote debugging port cannot be connected to', { project: Fixtures.projectPath('remote-debugging-port-removed'), spec: 'spec.ts', browser: 'chrome', @@ -25,7 +25,7 @@ describe('e2e cdp', function () { }) // https://github.com/cypress-io/cypress/issues/5685 - e2e.it('handles disconnections as expected', { + systemTests.it('handles disconnections as expected', { project: Fixtures.projectPath('remote-debugging-disconnect'), spec: 'spec.ts', browser: 'chrome', diff --git a/packages/server/test/e2e/commands_outside_of_test_spec.js b/system-tests/test/commands_outside_of_test_spec.js similarity index 60% rename from packages/server/test/e2e/commands_outside_of_test_spec.js rename to system-tests/test/commands_outside_of_test_spec.js index 57921b27261f..013f6964314c 100644 --- a/packages/server/test/e2e/commands_outside_of_test_spec.js +++ b/system-tests/test/commands_outside_of_test_spec.js @@ -1,21 +1,21 @@ -const e2e = require('../support/helpers/e2e').default +const systemTests = require('../lib/system-tests').default describe('e2e commands outside of test', () => { - e2e.setup() + systemTests.setup() - e2e.it('fails on cy commands', { + systemTests.it('fails on cy commands', { spec: 'commands_outside_of_test_spec.js', snapshot: true, expectedExitCode: 1, }) - e2e.it('fails on failing assertions', { + systemTests.it('fails on failing assertions', { spec: 'assertions_failing_outside_of_test_spec.js', snapshot: true, expectedExitCode: 1, }) - e2e.it('passes on passing assertions', { + systemTests.it('passes on passing assertions', { spec: 'assertions_passing_outside_of_test_spec.js', snapshot: true, }) diff --git a/packages/server/test/e2e/config_spec.js b/system-tests/test/config_spec.js similarity index 80% rename from packages/server/test/e2e/config_spec.js rename to system-tests/test/config_spec.js index 0a5d80d10ff5..c39a9eebff95 100644 --- a/packages/server/test/e2e/config_spec.js +++ b/system-tests/test/config_spec.js @@ -1,13 +1,13 @@ -const e2e = require('../support/helpers/e2e').default -const { fs } = require('../../lib/util/fs') +const systemTests = require('../lib/system-tests').default +const { fs } = require('@packages/server/lib/util/fs') const path = require('path') -const Fixtures = require('../support/helpers/fixtures') +const Fixtures = require('../lib/fixtures') describe('e2e config', () => { - e2e.setup() + systemTests.setup() it('provides various environment details', function () { - return e2e.exec(this, { + return systemTests.exec(this, { spec: 'config_passing_spec.js', snapshot: true, config: { @@ -19,7 +19,7 @@ describe('e2e config', () => { }) it('applies defaultCommandTimeout globally', function () { - return e2e.exec(this, { + return systemTests.exec(this, { project: Fixtures.projectPath('config-with-short-timeout'), snapshot: true, expectedExitCode: 1, @@ -29,7 +29,7 @@ describe('e2e config', () => { // TODO: test that environment variables and CYPRESS_config work as well it('throws error when invalid viewportWidth in the configuration file', function () { - return e2e.exec(this, { + return systemTests.exec(this, { project: Fixtures.projectPath('config-with-invalid-viewport'), expectedExitCode: 1, snapshot: true, @@ -37,7 +37,7 @@ describe('e2e config', () => { }) it('throws error when invalid browser in the configuration file', function () { - return e2e.exec(this, { + return systemTests.exec(this, { project: Fixtures.projectPath('config-with-invalid-browser'), expectedExitCode: 1, snapshot: true, @@ -45,33 +45,33 @@ describe('e2e config', () => { }) it('supports global shadow dom inclusion', function () { - return e2e.exec(this, { + return systemTests.exec(this, { project: Fixtures.projectPath('shadow-dom-global-inclusion'), }) }) it('supports custom configFile in JavaScript', function () { - return e2e.exec(this, { + return systemTests.exec(this, { project: Fixtures.projectPath('config-with-custom-file-js'), configFile: 'cypress.config.custom.js', }) }) it('supports custom configFile in TypeScript', function () { - return e2e.exec(this, { + return systemTests.exec(this, { project: Fixtures.projectPath('config-with-custom-file-ts'), configFile: 'cypress.config.custom.ts', }) }) it('supports custom configFile in a default JavaScript file', function () { - return e2e.exec(this, { + return systemTests.exec(this, { project: Fixtures.projectPath('config-with-js'), }) }) it('supports custom configFile in a default TypeScript file', function () { - return e2e.exec(this, { + return systemTests.exec(this, { project: Fixtures.projectPath('config-with-ts'), }) }) @@ -83,7 +83,7 @@ describe('e2e config', () => { fs.writeFile(path.join(projectRoot, 'cypress.config.js'), 'module.exports = {}'), fs.writeFile(path.join(projectRoot, 'cypress.config.ts'), 'export default {}'), ]).then(() => { - return e2e.exec(this, { + return systemTests.exec(this, { project: projectRoot, expectedExitCode: 1, snapshot: true, diff --git a/packages/server/test/e2e/controllers_spec.js b/system-tests/test/controllers_spec.js similarity index 84% rename from packages/server/test/e2e/controllers_spec.js rename to system-tests/test/controllers_spec.js index 06cef27690ee..4a1d0863bae0 100644 --- a/packages/server/test/e2e/controllers_spec.js +++ b/system-tests/test/controllers_spec.js @@ -1,17 +1,17 @@ const fs = require('fs-extra') const path = require('path') -const e2e = require('../support/helpers/e2e').default -const Fixtures = require('../support/helpers/fixtures') +const systemTests = require('../lib/system-tests').default +const Fixtures = require('../lib/fixtures') const nonExistentSpec = Fixtures.projectPath('non-existent-spec') const e2eProject = Fixtures.projectPath('e2e') describe('e2e plugins', () => { - e2e.setup() + systemTests.setup() it('fails when spec does not exist', function () { - return e2e.exec(this, { + return systemTests.exec(this, { spec: 'spec.js', project: nonExistentSpec, sanitizeScreenshotDimensions: true, @@ -26,7 +26,7 @@ describe('e2e plugins', () => { return fs.outputFile(specPath, 'it(\'passes\', () => {})') .then(() => { - return e2e.exec(this, { + return systemTests.exec(this, { spec: specPath, sanitizeScreenshotDimensions: true, }) diff --git a/packages/server/test/e2e/cookies_spec.ts b/system-tests/test/cookies_spec.ts similarity index 98% rename from packages/server/test/e2e/cookies_spec.ts rename to system-tests/test/cookies_spec.ts index b2f985560f88..b50cdb5a1a55 100644 --- a/packages/server/test/e2e/cookies_spec.ts +++ b/system-tests/test/cookies_spec.ts @@ -1,11 +1,11 @@ /* eslint-disable no-restricted-properties */ import dayjs from 'dayjs' import parser from 'cookie-parser' -import e2e from '../support/helpers/e2e' +import systemTests from '../lib/system-tests' import humanInterval from 'human-interval' import cors from 'cors' -const it = e2e.it +const it = systemTests.it const onServer = function (app) { app.use(parser()) @@ -173,7 +173,7 @@ const sharedBaseUrlSpecSnapshot = 'e2e cookies with baseurl' const sharedNoBaseUrlSpecSnapshot = 'e2e cookies with no baseurl' describe('e2e cookies', () => { - e2e.setup({ + systemTests.setup({ servers: [{ onServer, port: httpPort, @@ -324,7 +324,7 @@ describe('cross-origin cookies, set:cookies', () => { }) } - e2e.setup({ + systemTests.setup({ servers: [{ onServer, port: httpPort, diff --git a/packages/server/test/e2e/deprecated_spec.ts b/system-tests/test/deprecated_spec.ts similarity index 86% rename from packages/server/test/e2e/deprecated_spec.ts rename to system-tests/test/deprecated_spec.ts index 7815a73898bd..f02c9001f2d5 100644 --- a/packages/server/test/e2e/deprecated_spec.ts +++ b/system-tests/test/deprecated_spec.ts @@ -1,12 +1,12 @@ -import e2e from '../support/helpers/e2e' -import Fixtures from '../support/helpers/fixtures' +import systemTests from '../lib/system-tests' +import Fixtures from '../lib/fixtures' const beforeBrowserLaunchProject = Fixtures.projectPath('plugin-before-browser-launch-deprecation') describe('deprecated before:browser:launch args', () => { - e2e.setup() + systemTests.setup() - e2e.it('fails when adding unknown properties to launchOptions', { + systemTests.it('fails when adding unknown properties to launchOptions', { config: { video: false, env: { @@ -19,7 +19,7 @@ describe('deprecated before:browser:launch args', () => { snapshot: true, }) - e2e.it('push and no return - warns user exactly once', { + systemTests.it('push and no return - warns user exactly once', { config: { video: false, env: { @@ -33,7 +33,7 @@ describe('deprecated before:browser:launch args', () => { psInclude: ['--foo', '--bar'], }) - e2e.it('using non-deprecated API - no warning', { + systemTests.it('using non-deprecated API - no warning', { // TODO: implement webPreferences.additionalArgs here // once we decide if/what we're going to make the implemenation // SUGGESTION: add this to Cypress.browser.args which will capture @@ -51,7 +51,7 @@ describe('deprecated before:browser:launch args', () => { psInclude: ['--foo', '--bar'], }) - e2e.it('concat return returns once per spec', { + systemTests.it('concat return returns once per spec', { // TODO: implement webPreferences.additionalArgs here // once we decide if/what we're going to make the implemenation // SUGGESTION: add this to Cypress.browser.args which will capture @@ -68,7 +68,7 @@ describe('deprecated before:browser:launch args', () => { stdoutInclude: 'Deprecation Warning:', }) - e2e.it('no mutate return', { + systemTests.it('no mutate return', { // TODO: implement webPreferences.additionalArgs here // once we decide if/what we're going to make the implemenation // SUGGESTION: add this to Cypress.browser.args which will capture @@ -91,7 +91,7 @@ describe('deprecated before:browser:launch args', () => { // error which reads strangely - the message + stack are both // printed. we should print that we are aborting the run because // the before:browser:launch handler threw an error / rejected - e2e.it('displays errors thrown and aborts the run', { + systemTests.it('displays errors thrown and aborts the run', { config: { video: false, env: { @@ -109,7 +109,7 @@ describe('deprecated before:browser:launch args', () => { // error which reads strangely - the message + stack are both // printed. we should print that we are aborting the run because // the before:browser:launch handler threw an error / rejected - e2e.it('displays promises rejected and aborts the run', { + systemTests.it('displays promises rejected and aborts the run', { config: { video: false, env: { diff --git a/packages/server/test/e2e/domain_spec.js b/system-tests/test/domain_spec.js similarity index 72% rename from packages/server/test/e2e/domain_spec.js rename to system-tests/test/domain_spec.js index 5a79c0ca6b76..bc2d303c7915 100644 --- a/packages/server/test/e2e/domain_spec.js +++ b/system-tests/test/domain_spec.js @@ -1,4 +1,4 @@ -const e2e = require('../support/helpers/e2e').default +const systemTests = require('../lib/system-tests').default const hosts = { 'app.localhost': '127.0.0.1', @@ -6,14 +6,14 @@ const hosts = { } describe('e2e domain', () => { - e2e.setup({ + systemTests.setup({ servers: { port: 4848, static: true, }, }) - e2e.it('passes', { + systemTests.it('passes', { spec: 'domain*', snapshot: true, video: false, diff --git a/packages/server/test/e2e/downloads_spec.ts b/system-tests/test/downloads_spec.ts similarity index 82% rename from packages/server/test/e2e/downloads_spec.ts rename to system-tests/test/downloads_spec.ts index 2fedbe485d90..e2f5d4159731 100644 --- a/packages/server/test/e2e/downloads_spec.ts +++ b/system-tests/test/downloads_spec.ts @@ -1,15 +1,15 @@ import path from 'path' -import e2e, { expect } from '../support/helpers/e2e' -import Fixtures from '../support/helpers/fixtures' -import { fs } from '../../lib/util/fs' +import systemTests, { expect } from '../lib/system-tests' +import Fixtures from '../lib/fixtures' +import { fs } from '@packages/server/lib/util/fs' const downloadsProject = Fixtures.projectPath('downloads') describe('e2e downloads', () => { - e2e.setup() + systemTests.setup() - e2e.it('handles various file downloads', { + systemTests.it('handles various file downloads', { project: downloadsProject, spec: 'downloads_spec.ts', config: { @@ -21,7 +21,7 @@ describe('e2e downloads', () => { return fs.pathExists(path.join(Fixtures.projectPath('downloads'), 'cypress', 'dls', fileName)) } - e2e.it('allows changing the downloads folder', { + systemTests.it('allows changing the downloads folder', { project: Fixtures.projectPath('downloads'), spec: '*', config: { @@ -38,13 +38,13 @@ describe('e2e downloads', () => { }) it('trashes downloads between runs', async function () { - await e2e.exec(this, { + await systemTests.exec(this, { project: downloadsProject, spec: 'download_csv_spec.ts', }) // this run should trash the downloads from the above run - await e2e.exec(this, { + await systemTests.exec(this, { project: downloadsProject, spec: 'simple_passing_spec.ts', }) @@ -56,13 +56,13 @@ describe('e2e downloads', () => { }) it('does not trash downloads between runs if trashAssetsBeforeRuns: false', async function () { - await e2e.exec(this, { + await systemTests.exec(this, { project: downloadsProject, spec: 'download_csv_spec.ts', }) // this run should _not_ trash the downloads from the above run - await e2e.exec(this, { + await systemTests.exec(this, { project: downloadsProject, spec: 'simple_passing_spec.ts', config: { diff --git a/packages/server/test/e2e/error_ui_spec.ts b/system-tests/test/error_ui_spec.ts similarity index 68% rename from packages/server/test/e2e/error_ui_spec.ts rename to system-tests/test/error_ui_spec.ts index 99a61a39af2d..63da95be84f5 100644 --- a/packages/server/test/e2e/error_ui_spec.ts +++ b/system-tests/test/error_ui_spec.ts @@ -1,5 +1,5 @@ -import e2e, { expect } from '../support/helpers/e2e' -import Fixtures from '../support/helpers/fixtures' +import systemTests, { expect } from '../lib/system-tests' +import Fixtures from '../lib/fixtures' import path from 'path' const verifyPassedAndFailedAreSame = (expectedFailures) => { @@ -11,16 +11,18 @@ const verifyPassedAndFailedAreSame = (expectedFailures) => { } describe('e2e error ui', function () { - e2e.setup() + systemTests.setup() ;[ 'webpack-preprocessor', 'webpack-preprocessor-ts-loader', 'webpack-preprocessor-ts-loader-compiler-options', - 'webpack-preprocessor-awesome-typescript-loader', + // TODO: unskip this once we understand why it is failing + // @see https://github.com/cypress-io/cypress/issues/18497 + // 'webpack-preprocessor-awesome-typescript-loader', ] .forEach((project) => { - e2e.it(`handles sourcemaps in webpack for project: ${project}`, { + systemTests.it(`handles sourcemaps in webpack for project: ${project}`, { project: Fixtures.projectPath(project), spec: 'failing_spec.*', expectedExitCode: 1, @@ -31,7 +33,7 @@ describe('e2e error ui', function () { }) // https://github.com/cypress-io/cypress/issues/16255 - e2e.it('handles errors when integration folder is outside of project root', { + systemTests.it('handles errors when integration folder is outside of project root', { project: path.join(Fixtures.projectPath('integration-outside-project-root'), 'project-root'), spec: '../../../integration/failing_spec.js', expectedExitCode: 1, diff --git a/packages/server/test/e2e/es_modules_spec.js b/system-tests/test/es_modules_spec.js similarity index 62% rename from packages/server/test/e2e/es_modules_spec.js rename to system-tests/test/es_modules_spec.js index cf5df3230e60..98f71005bfdc 100644 --- a/packages/server/test/e2e/es_modules_spec.js +++ b/system-tests/test/es_modules_spec.js @@ -1,10 +1,10 @@ -const e2e = require('../support/helpers/e2e').default +const systemTests = require('../lib/system-tests').default describe('e2e es modules', () => { - e2e.setup() + systemTests.setup() it('passes', function () { - return e2e.exec(this, { + return systemTests.exec(this, { spec: 'es_modules_in_coffee_spec.coffee', snapshot: true, noTypeScript: true, @@ -12,12 +12,12 @@ describe('e2e es modules', () => { }) it('fails', function () { - return e2e.exec(this, { + return systemTests.exec(this, { spec: 'es_module_import_failing_spec.js', snapshot: true, expectedExitCode: 1, noTypeScript: true, - onStdout: e2e.normalizeWebpackErrors, + onStdout: systemTests.normalizeWebpackErrors, }) }) }) diff --git a/packages/server/test/e2e/fetch_polyfill_spec.js b/system-tests/test/fetch_polyfill_spec.js similarity index 96% rename from packages/server/test/e2e/fetch_polyfill_spec.js rename to system-tests/test/fetch_polyfill_spec.js index 3d4bf629d457..38e9488868b8 100644 --- a/packages/server/test/e2e/fetch_polyfill_spec.js +++ b/system-tests/test/fetch_polyfill_spec.js @@ -1,4 +1,4 @@ -const e2e = require('../support/helpers/e2e').default +const systemTests = require('../lib/system-tests').default const { stripIndent } = require('common-tags') const bodyParser = require('body-parser') @@ -128,14 +128,14 @@ const onServer = function (app) { } describe('e2e fetch polyfill', () => { - e2e.setup({ + systemTests.setup({ servers: { port: 1818, onServer, }, }) - e2e.it('passes', { + systemTests.it('passes', { spec: 'fetch_spec.js', snapshot: false, config: { @@ -145,14 +145,14 @@ describe('e2e fetch polyfill', () => { }) describe('e2e no fetch polyfill', () => { - e2e.setup({ + systemTests.setup({ servers: { port: 1818, onServer, }, }) - e2e.it('passes', { + systemTests.it('passes', { spec: 'fetch_no_polyfill_spec.js', snapshot: false, config: { diff --git a/packages/server/test/e2e/firefox_spec.ts b/system-tests/test/firefox_spec.ts similarity index 87% rename from packages/server/test/e2e/firefox_spec.ts rename to system-tests/test/firefox_spec.ts index 6baf2d51a148..2fcb8d5c8385 100644 --- a/packages/server/test/e2e/firefox_spec.ts +++ b/system-tests/test/firefox_spec.ts @@ -2,20 +2,20 @@ import path from 'path' import util from 'util' import fs from 'fs-extra' -import e2e, { expect } from '../support/helpers/e2e' +import systemTests, { expect } from '../lib/system-tests' import Bluebird from 'bluebird' -import Fixtures from '../support/helpers/fixtures' +import Fixtures from '../lib/fixtures' const e2ePath = Fixtures.projectPath('e2e') const outputPath = path.join(e2ePath, 'output.json') describe('e2e firefox', function () { - e2e.setup() + systemTests.setup() // NOTE: This can be used to demonstrate the Firefox out-of-memory issue, but it is skipped // because it takes forever and is redundant since we test `services` against Cypress prereleases. // @see https://github.com/cypress-io/cypress/issues/6187 - e2e.it.skip('can run a lot of tests', { + systemTests.it.skip('can run a lot of tests', { outputPath, project: Fixtures.projectPath('firefox-memory'), spec: 'spec.js', @@ -52,7 +52,7 @@ describe('e2e firefox', function () { // snapshot: true, }) - e2e.it('launches maximized by default', { + systemTests.it('launches maximized by default', { browser: 'firefox', project: Fixtures.projectPath('screen-size'), spec: 'maximized.spec.js', @@ -71,7 +71,7 @@ describe('e2e firefox', function () { // NOTE: only an issue on windows // https://github.com/cypress-io/cypress/issues/6392 - e2e.it.skip('can run multiple specs', { + systemTests.it.skip('can run multiple specs', { browser: 'firefox', project: Fixtures.projectPath('e2e'), spec: 'simple_spec.js,simple_passing_spec.js', diff --git a/packages/server/test/e2e/form_submissions_spec.js b/system-tests/test/form_submissions_spec.js similarity index 87% rename from packages/server/test/e2e/form_submissions_spec.js rename to system-tests/test/form_submissions_spec.js index 6e7d9d316d48..38462a899806 100644 --- a/packages/server/test/e2e/form_submissions_spec.js +++ b/system-tests/test/form_submissions_spec.js @@ -2,19 +2,19 @@ const rp = require('@cypress/request-promise') const path = require('path') const bodyParser = require('body-parser') const multer = require('multer') -const { fs } = require('../../lib/util/fs') -const e2e = require('../support/helpers/e2e').default -const Fixtures = require('../support/helpers/fixtures') +const { fs } = require('@packages/server/lib/util/fs') +const systemTests = require('../lib/system-tests').default +const Fixtures = require('../lib/fixtures') const HTTPS_PORT = 11443 const HTTP_PORT = 11180 describe('e2e form submissions', () => { - return e2e.setup() + return systemTests.setup() }) const e2ePath = Fixtures.projectPath('e2e') -const pathToLargeImage = Fixtures.path('server/imgs/earth.jpg') +const pathToLargeImage = Fixtures.path('server/large-img/earth.jpg') const getFormHtml = (formAttrs, textValue = '') => { return `\ @@ -87,14 +87,14 @@ buffer compare yielded: ${ret}\ describe('e2e forms', () => { context('submissions with jquery XHR POST', () => { - e2e.setup() + systemTests.setup() - e2e.it('passing', { + systemTests.it('passing', { spec: 'form_submission_passing_spec.js', snapshot: true, }) - e2e.it('failing', { + systemTests.it('failing', { spec: 'form_submission_failing_spec.js', snapshot: true, expectedExitCode: 1, @@ -106,7 +106,7 @@ describe('e2e forms', () => { }) context('
        submissions', () => { - e2e.setup({ + systemTests.setup({ settings: { env: { PATH_TO_LARGE_IMAGE: pathToLargeImage, @@ -138,7 +138,7 @@ describe('e2e forms', () => { }) }) - e2e.it('passes with https on localhost', { + systemTests.it('passes with https on localhost', { config: { baseUrl: `https://localhost:${HTTPS_PORT}`, }, @@ -146,7 +146,7 @@ describe('e2e forms', () => { snapshot: true, }) - e2e.it('passes with http on localhost', { + systemTests.it('passes with http on localhost', { config: { baseUrl: `http://localhost:${HTTP_PORT}`, }, diff --git a/packages/server/test/e2e/go_spec.js b/system-tests/test/go_spec.js similarity index 83% rename from packages/server/test/e2e/go_spec.js rename to system-tests/test/go_spec.js index ce91b2afa0cd..7dc90c5b5f29 100644 --- a/packages/server/test/e2e/go_spec.js +++ b/system-tests/test/go_spec.js @@ -1,4 +1,4 @@ -const e2e = require('../support/helpers/e2e').default +const systemTests = require('../lib/system-tests').default const onServer = function (app) { app.get('/first', (req, res) => { @@ -11,7 +11,7 @@ const onServer = function (app) { } describe('e2e go', () => { - e2e.setup({ + systemTests.setup({ servers: { port: 1818, onServer, @@ -21,7 +21,7 @@ describe('e2e go', () => { // this tests that history changes work as intended // there have been regressions in electron which would // otherwise cause these tests to fail - e2e.it('passes', { + systemTests.it('passes', { spec: 'go_spec.js', snapshot: true, }) diff --git a/packages/server/test/e2e/headless_spec.ts b/system-tests/test/headless_spec.ts similarity index 80% rename from packages/server/test/e2e/headless_spec.ts rename to system-tests/test/headless_spec.ts index 264adffb61fd..0d87f4db1307 100644 --- a/packages/server/test/e2e/headless_spec.ts +++ b/system-tests/test/headless_spec.ts @@ -1,8 +1,8 @@ -import e2e from '../support/helpers/e2e' -import Fixtures from '../support/helpers/fixtures' +import systemTests from '../lib/system-tests' +import Fixtures from '../lib/fixtures' describe('e2e headless', function () { - e2e.setup() + systemTests.setup() describe('ELECTRON_RUN_AS_NODE', () => { const baseSpec = { @@ -24,7 +24,7 @@ describe('e2e headless', function () { }, } - e2e.it('pass for browsers that do not need xvfb', { + systemTests.it('pass for browsers that do not need xvfb', { ...baseSpec, browser: ['chrome', 'chrome-beta', 'firefox'], expectedExitCode: 0, @@ -35,7 +35,7 @@ describe('e2e headless', function () { }, }) - e2e.it('fails for browsers that do need xvfb', { + systemTests.it('fails for browsers that do need xvfb', { ...baseSpec, expectedExitCode: 1, browser: ['electron'], @@ -43,7 +43,7 @@ describe('e2e headless', function () { }) // cypress run --headless - e2e.it('tests in headless mode pass', { + systemTests.it('tests in headless mode pass', { spec: 'headless_spec.js', config: { env: { @@ -65,7 +65,7 @@ describe('e2e headless', function () { 'electron', '!electron', ].map((b) => { - e2e.it(`tests in headed mode pass in ${b}`, { + systemTests.it(`tests in headed mode pass in ${b}`, { spec: 'headless_spec.js', config: { env: { @@ -79,13 +79,13 @@ describe('e2e headless', function () { }) }) - e2e.it('launches maximized by default in headless mode (1920x1080)', { + systemTests.it('launches maximized by default in headless mode (1920x1080)', { headed: false, project: Fixtures.projectPath('screen-size'), spec: 'default_size.spec.js', }) - e2e.it('launches at DPR 1x', { + systemTests.it('launches at DPR 1x', { headed: false, project: Fixtures.projectPath('screen-size'), spec: 'device_pixel_ratio.spec.js', diff --git a/packages/server/test/e2e/iframe_spec.js b/system-tests/test/iframe_spec.js similarity index 92% rename from packages/server/test/e2e/iframe_spec.js rename to system-tests/test/iframe_spec.js index 471daca12fd8..5061d1da2427 100644 --- a/packages/server/test/e2e/iframe_spec.js +++ b/system-tests/test/iframe_spec.js @@ -1,7 +1,7 @@ const path = require('path') const bodyParser = require('body-parser') -const Fixtures = require('../support/helpers/fixtures') -const e2e = require('../support/helpers/e2e').default +const Fixtures = require('../lib/fixtures') +const systemTests = require('../lib/system-tests').default const e2ePath = Fixtures.projectPath('e2e') @@ -69,14 +69,14 @@ outer contents } describe('e2e iframes', () => { - e2e.setup({ + systemTests.setup({ servers: { port: 1616, onServer, }, }) - e2e.it('passes', { + systemTests.it('passes', { spec: 'iframe_spec.js', snapshot: true, config: { diff --git a/packages/server/test/e2e/images_spec.js b/system-tests/test/images_spec.js similarity index 71% rename from packages/server/test/e2e/images_spec.js rename to system-tests/test/images_spec.js index 54ea9d12c24c..c078e10b6d43 100644 --- a/packages/server/test/e2e/images_spec.js +++ b/system-tests/test/images_spec.js @@ -1,7 +1,7 @@ -const e2e = require('../support/helpers/e2e').default +const systemTests = require('../lib/system-tests').default describe('e2e images', () => { - e2e.setup({ + systemTests.setup({ servers: { port: 3636, static: true, @@ -10,7 +10,7 @@ describe('e2e images', () => { // this tests that images are correctly proxied and that we are not // accidentally modifying their bytes in the stream - e2e.it('passes', { + systemTests.it('passes', { spec: 'images_spec.js', snapshot: true, }) diff --git a/packages/server/test/e2e/interception_spec.js b/system-tests/test/interception_spec.js similarity index 91% rename from packages/server/test/e2e/interception_spec.js rename to system-tests/test/interception_spec.js index dd63e3f236a8..8cea00f5e151 100644 --- a/packages/server/test/e2e/interception_spec.js +++ b/system-tests/test/interception_spec.js @@ -1,6 +1,6 @@ const compression = require('compression') -const e2e = require('../support/helpers/e2e').default -const Fixtures = require('../support/helpers/fixtures') +const systemTests = require('../lib/system-tests').default +const Fixtures = require('../lib/fixtures') const path = require('path') const PORT = 9876 @@ -36,7 +36,7 @@ const pageOnlyController = (charset) => { } describe('e2e interception spec', () => { - e2e.setup({ + systemTests.setup({ servers: [ { onServer (app) { @@ -61,7 +61,7 @@ describe('e2e interception spec', () => { context('character encodings', () => { // @see https://github.com/cypress-io/cypress/issues/1543 it('does not mangle non-UTF-8 text', function () { - return e2e.exec(this, { + return systemTests.exec(this, { spec: 'character_encoding_spec.js', config: { defaultCommandTimeout: 100, diff --git a/packages/server/test/e2e/issue_149_spec.js b/system-tests/test/issue_149_spec.js similarity index 68% rename from packages/server/test/e2e/issue_149_spec.js rename to system-tests/test/issue_149_spec.js index 609fb2f689b9..3c940b30fb4c 100644 --- a/packages/server/test/e2e/issue_149_spec.js +++ b/system-tests/test/issue_149_spec.js @@ -1,13 +1,13 @@ -const { fs } = require('../../lib/util/fs') -const Fixtures = require('../support/helpers/fixtures') -const e2e = require('../support/helpers/e2e').default +const { fs } = require('@packages/server/lib/util/fs') +const Fixtures = require('../lib/fixtures') +const systemTests = require('../lib/system-tests').default describe('e2e issue 149', () => { - e2e.setup() + systemTests.setup() // https://github.com/cypress-io/cypress/issues/149 it('failing', function () { - return e2e.exec(this, { + return systemTests.exec(this, { spec: 'issue_149_spec.js', snapshot: true, expectedExitCode: 1, diff --git a/packages/server/test/e2e/issue_1669_spec.js b/system-tests/test/issue_1669_spec.js similarity index 67% rename from packages/server/test/e2e/issue_1669_spec.js rename to system-tests/test/issue_1669_spec.js index 340f99b89de8..7c4805785f73 100644 --- a/packages/server/test/e2e/issue_1669_spec.js +++ b/system-tests/test/issue_1669_spec.js @@ -1,11 +1,11 @@ -const e2e = require('../support/helpers/e2e').default +const systemTests = require('../lib/system-tests').default describe('e2e issue 1669', () => { - e2e.setup() + systemTests.setup() // https://github.com/cypress-io/cypress/issues/1669 it('passes', function () { - return e2e.exec(this, { + return systemTests.exec(this, { spec: 'issue_1669_spec.js', snapshot: true, browser: 'chrome', diff --git a/packages/server/test/e2e/issue_173_spec.ts b/system-tests/test/issue_173_spec.ts similarity index 63% rename from packages/server/test/e2e/issue_173_spec.ts rename to system-tests/test/issue_173_spec.ts index a7b5a35343e1..87426ccca540 100644 --- a/packages/server/test/e2e/issue_173_spec.ts +++ b/system-tests/test/issue_173_spec.ts @@ -1,10 +1,10 @@ -import e2e from '../support/helpers/e2e' +import systemTests from '../lib/system-tests' describe('e2e issue 173', () => { - e2e.setup() + systemTests.setup() // https://github.com/cypress-io/cypress/issues/173 - e2e.it('failing', { + systemTests.it('failing', { spec: 'issue_173_spec.js', snapshot: true, expectedExitCode: 1, diff --git a/packages/server/test/e2e/issue_2891_spec.js b/system-tests/test/issue_2891_spec.js similarity index 64% rename from packages/server/test/e2e/issue_2891_spec.js rename to system-tests/test/issue_2891_spec.js index d9679e2aed82..cc26822cf044 100644 --- a/packages/server/test/e2e/issue_2891_spec.js +++ b/system-tests/test/issue_2891_spec.js @@ -1,12 +1,12 @@ -const e2e = require('../support/helpers/e2e').default -const Fixtures = require('../support/helpers/fixtures') +const systemTests = require('../lib/system-tests').default +const Fixtures = require('../lib/fixtures') describe('e2e issue 2891', () => { - e2e.setup() + systemTests.setup() // https://github.com/cypress-io/cypress/issues/2891 it('passes', function () { - return e2e.exec(this, { + return systemTests.exec(this, { project: Fixtures.projectPath('default-layout'), spec: 'default_layout_spec.js', sanitizeScreenshotDimensions: true, diff --git a/packages/server/test/e2e/issue_5475_spec.js b/system-tests/test/issue_5475_spec.js similarity index 51% rename from packages/server/test/e2e/issue_5475_spec.js rename to system-tests/test/issue_5475_spec.js index d59ec3fb6ef2..d2adb0697d7e 100644 --- a/packages/server/test/e2e/issue_5475_spec.js +++ b/system-tests/test/issue_5475_spec.js @@ -1,9 +1,9 @@ -const e2e = require('../support/helpers/e2e').default +const systemTests = require('../lib/system-tests').default describe('e2e issue 5475 history pushState hangs', function () { - e2e.setup() + systemTests.setup() - e2e.it('fails when remote debugging port cannot be connected to', { + systemTests.it('fails when remote debugging port cannot be connected to', { spec: 'issue_5475*', browser: 'electron', expectedExitCode: 1, diff --git a/packages/server/test/e2e/issue_6619.ts b/system-tests/test/issue_6619.ts similarity index 69% rename from packages/server/test/e2e/issue_6619.ts rename to system-tests/test/issue_6619.ts index 2e30ac8f579e..c4c8bfe9db20 100644 --- a/packages/server/test/e2e/issue_6619.ts +++ b/system-tests/test/issue_6619.ts @@ -1,12 +1,12 @@ -import e2e from '../support/helpers/e2e' +import systemTests from '../lib/system-tests' describe('e2e issue 6619', () => { - e2e.setup() + systemTests.setup() // this tests open mode behavior // when the user hits the 'reload' button in open mode // https://github.com/cypress-io/cypress/issues/6619 - e2e.it('can reload during spec run', { + systemTests.it('can reload during spec run', { spec: 'reload-spec.spec.js', snapshot: true, timeout: 30000, diff --git a/packages/server/test/e2e/issue_674_spec.js b/system-tests/test/issue_674_spec.js similarity index 61% rename from packages/server/test/e2e/issue_674_spec.js rename to system-tests/test/issue_674_spec.js index ebe4cd236139..7c63ce064aed 100644 --- a/packages/server/test/e2e/issue_674_spec.js +++ b/system-tests/test/issue_674_spec.js @@ -1,10 +1,10 @@ -const e2e = require('../support/helpers/e2e').default +const systemTests = require('../lib/system-tests').default describe('e2e issue 674', () => { - e2e.setup() + systemTests.setup() // https://github.com/cypress-io/cypress/issues/674 - e2e.it('fails', { + systemTests.it('fails', { spec: 'issue_674_spec.js', snapshot: true, expectedExitCode: 1, diff --git a/packages/server/test/e2e/issue_7217_spec.ts b/system-tests/test/issue_7217_spec.ts similarity index 79% rename from packages/server/test/e2e/issue_7217_spec.ts rename to system-tests/test/issue_7217_spec.ts index 75dcb2b6b21e..4a9e0d4888f2 100644 --- a/packages/server/test/e2e/issue_7217_spec.ts +++ b/system-tests/test/issue_7217_spec.ts @@ -1,13 +1,13 @@ import path from 'path' -import e2e from '../support/helpers/e2e' +import systemTests from '../lib/system-tests' describe('e2e issue 7217', () => { - e2e.setup() + systemTests.setup() // this test ensures that the right error is reported if the // browser can't connect // https://github.com/cypress-io/cypress/issues/7217 - e2e.it('shows correct error if browser does not connect', { + systemTests.it('shows correct error if browser does not connect', { expectedExitCode: 1, spec: 'simple_passing_spec.js', processEnv: { diff --git a/packages/server/test/e2e/issue_7481.ts b/system-tests/test/issue_7481.ts similarity index 63% rename from packages/server/test/e2e/issue_7481.ts rename to system-tests/test/issue_7481.ts index 7d8fab7e0ad7..9a07820d51e3 100644 --- a/packages/server/test/e2e/issue_7481.ts +++ b/system-tests/test/issue_7481.ts @@ -1,15 +1,15 @@ -import e2e from '../support/helpers/e2e' +import systemTests from '../lib/system-tests' const PORT = 3333 describe('e2e issue 7481', () => { - e2e.setup({ + systemTests.setup({ servers: { port: PORT, }, }) - e2e.it('does not error loading authenticated url', { + systemTests.it('does not error loading authenticated url', { spec: 'simple_passing_spec.js', config: { baseUrl: `http://username:password@localhost:${PORT}/`, diff --git a/packages/server/test/e2e/issue_8111_spec.js b/system-tests/test/issue_8111_spec.js similarity index 65% rename from packages/server/test/e2e/issue_8111_spec.js rename to system-tests/test/issue_8111_spec.js index f775270ef993..83763451c89b 100644 --- a/packages/server/test/e2e/issue_8111_spec.js +++ b/system-tests/test/issue_8111_spec.js @@ -1,10 +1,10 @@ -const e2e = require('../support/helpers/e2e').default -const Fixtures = require('../support/helpers/fixtures') +const systemTests = require('../lib/system-tests').default +const Fixtures = require('../lib/fixtures') describe('e2e issue 8111 iframe input focus', function () { - e2e.setup() + systemTests.setup() - e2e.it('iframe input retains focus when browser is out of focus', { + systemTests.it('iframe input retains focus when browser is out of focus', { // this test is dependent on the browser being Chrome headed // and also having --auto-open-devtools-for-tabs plugins option // (which pulls focus from main browser window) diff --git a/packages/server/test/e2e/js_error_handling_spec.js b/system-tests/test/js_error_handling_spec.js similarity index 87% rename from packages/server/test/e2e/js_error_handling_spec.js rename to system-tests/test/js_error_handling_spec.js index 9a7f1b6d1f62..1be10f85ac19 100644 --- a/packages/server/test/e2e/js_error_handling_spec.js +++ b/system-tests/test/js_error_handling_spec.js @@ -1,6 +1,6 @@ const fs = require('fs') -const Fixtures = require('../support/helpers/fixtures') -const e2e = require('../support/helpers/e2e').default +const Fixtures = require('../lib/fixtures') +const systemTests = require('../lib/system-tests').default const onServer = function (app) { app.get('/index.html', (req, res) => { @@ -35,7 +35,7 @@ const onServer = function (app) { } describe('e2e js error handling', () => { - e2e.setup({ + systemTests.setup({ servers: [{ port: 1122, static: true, @@ -45,10 +45,13 @@ describe('e2e js error handling', () => { }], }) - e2e.it('fails', { + systemTests.it('fails', { spec: 'js_error_handling_failing_spec.js', snapshot: true, expectedExitCode: 5, + config: { + video: false, + }, onStdout (stdout) { // firefox has a stack line for the cross-origin error that other browsers don't return stdout diff --git a/packages/server/test/e2e/max_listeners_spec.ts b/system-tests/test/max_listeners_spec.ts similarity index 84% rename from packages/server/test/e2e/max_listeners_spec.ts rename to system-tests/test/max_listeners_spec.ts index 8cd1dcd9e39e..ed1386ece00b 100644 --- a/packages/server/test/e2e/max_listeners_spec.ts +++ b/system-tests/test/max_listeners_spec.ts @@ -2,16 +2,16 @@ import _ from 'lodash' import path from 'path' import fs from 'fs-extra' -import e2e from '../support/helpers/e2e' -import Fixtures from '../support/helpers/fixtures' +import systemTests from '../lib/system-tests' +import Fixtures from '../lib/fixtures' const projectPath = Fixtures.projectPath('max-listeners') describe('max listeners warning spec', () => { - e2e.setup() + systemTests.setup() // @see https://github.com/cypress-io/cypress/issues/1305 - e2e.it('does not log MaxEventListeners error', { + systemTests.it('does not log MaxEventListeners error', { browser: 'electron', project: projectPath, spec: '*', diff --git a/packages/server/test/e2e/network_error_handling_spec.js b/system-tests/test/network_error_handling_spec.js similarity index 96% rename from packages/server/test/e2e/network_error_handling_spec.js rename to system-tests/test/network_error_handling_spec.js index d4f7c0d25f9a..99219f098d0c 100644 --- a/packages/server/test/e2e/network_error_handling_spec.js +++ b/system-tests/test/network_error_handling_spec.js @@ -8,10 +8,10 @@ const Promise = require('bluebird') const bodyParser = require('body-parser') const DebugProxy = require('@cypress/debugging-proxy') const launcher = require('@packages/launcher') -const chrome = require('../../lib/browsers/chrome') -const e2e = require('../support/helpers/e2e').default -const random = require('../../lib/util/random') -const Fixtures = require('../support/helpers/fixtures') +const chrome = require('@packages/server/lib/browsers/chrome') +const systemTests = require('../lib/system-tests').default +const random = require('@packages/server/lib/util/random') +const Fixtures = require('../lib/fixtures') let mitmProxy = require('http-mitm-proxy') const PORT = 13370 @@ -155,7 +155,7 @@ const controllers = { describe('e2e network error handling', function () { this.timeout(240000) - e2e.setup({ + systemTests.setup({ servers: [ { onServer (app) { @@ -366,7 +366,7 @@ describe('e2e network error handling', function () { }) it('baseurl check tries 5 times in run mode', function () { - return e2e.exec(this, { + return systemTests.exec(this, { config: { baseUrl: 'http://never-gonna-exist.invalid', }, @@ -376,7 +376,7 @@ describe('e2e network error handling', function () { }) it('tests run as expected', function () { - return e2e.exec(this, { + return systemTests.exec(this, { spec: 'network_error_handling_spec.js', video: false, expectedExitCode: 2, @@ -469,7 +469,7 @@ describe('e2e network error handling', function () { process.env.HTTP_PROXY = `http://localhost:${PROXY_PORT}` process.env.NO_PROXY = '<-loopback>' // proxy everything including localhost - return e2e.exec(this, { + return systemTests.exec(this, { spec: 'https_passthru_spec.js', snapshot: true, }) @@ -498,7 +498,7 @@ describe('e2e network error handling', function () { process.env.HTTP_PROXY = `http://localhost:${PROXY_PORT}` process.env.NO_PROXY = '<-loopback>,localhost:13373' // proxy everything except for the irrelevant test - return e2e.exec(this, { + return systemTests.exec(this, { spec: 'https_passthru_spec.js', snapshot: true, config: { @@ -526,7 +526,7 @@ describe('e2e network error handling', function () { // https://github.com/cypress-io/cypress/issues/4298 context('does not delay a 304 Not Modified', () => { it('in normal network conditions', function () { - return e2e.exec(this, { + return systemTests.exec(this, { spec: 'network_error_304_handling_spec.js', video: false, config: { @@ -546,7 +546,7 @@ describe('e2e network error handling', function () { process.env.HTTP_PROXY = `http://localhost:${PROXY_PORT}` process.env.NO_PROXY = '' }).then(() => { - return e2e.exec(this, { + return systemTests.exec(this, { spec: 'network_error_304_handling_spec.js', video: false, config: { @@ -578,7 +578,7 @@ describe('e2e network error handling', function () { process.env.HTTP_PROXY = `http://localhost:${PROXY_PORT}` process.env.NO_PROXY = '' - return e2e.exec(this, { + return systemTests.exec(this, { spec: 'network_error_304_handling_spec.js', video: false, config: { diff --git a/packages/server/test/e2e/new_project_spec.js b/system-tests/test/new_project_spec.js similarity index 72% rename from packages/server/test/e2e/new_project_spec.js rename to system-tests/test/new_project_spec.js index 4d577f7eab62..5a111b8b58fa 100644 --- a/packages/server/test/e2e/new_project_spec.js +++ b/system-tests/test/new_project_spec.js @@ -1,13 +1,13 @@ const path = require('path') -const Fixtures = require('../support/helpers/fixtures') -const e2e = require('../support/helpers/e2e').default -const { fs } = require('../../lib/util/fs') +const Fixtures = require('../lib/fixtures') +const systemTests = require('../lib/system-tests').default +const { fs } = require('@packages/server/lib/util/fs') const noScaffoldingPath = Fixtures.projectPath('no-scaffolding') const supportPath = path.join(noScaffoldingPath, 'cypress', 'support') describe('e2e new project', () => { - e2e.setup() + systemTests.setup() it('passes', function () { return fs @@ -15,7 +15,7 @@ describe('e2e new project', () => { .then(() => { throw new Error('support folder should not exist') }).catch(() => { - return e2e.exec(this, { + return systemTests.exec(this, { project: noScaffoldingPath, sanitizeScreenshotDimensions: true, snapshot: true, diff --git a/packages/server/test/e2e/no_superfluous_screenshots_spec.js b/system-tests/test/no_superfluous_screenshots_spec.js similarity index 72% rename from packages/server/test/e2e/no_superfluous_screenshots_spec.js rename to system-tests/test/no_superfluous_screenshots_spec.js index 8aa881b32163..9f4618784e5d 100644 --- a/packages/server/test/e2e/no_superfluous_screenshots_spec.js +++ b/system-tests/test/no_superfluous_screenshots_spec.js @@ -1,15 +1,15 @@ -const { fs } = require('../../lib/util/fs') +const { fs } = require('@packages/server/lib/util/fs') const path = require('path') -const e2e = require('../support/helpers/e2e').default -const Fixtures = require('../support/helpers/fixtures') +const systemTests = require('../lib/system-tests').default +const Fixtures = require('../lib/fixtures') const e2ePath = Fixtures.projectPath('e2e') // https://github.com/cypress-io/cypress/issues/9209 describe('no superfluous screenshots when afterEach() failed', () => { - e2e.setup() + systemTests.setup() - e2e.it('2 screenshots', { + systemTests.it('2 screenshots', { spec: 'no_superfluous_screenshots_spec.js', onRun (exec) { return exec(). diff --git a/packages/server/test/e2e/non_proxied_spec.ts b/system-tests/test/non_proxied_spec.ts similarity index 60% rename from packages/server/test/e2e/non_proxied_spec.ts rename to system-tests/test/non_proxied_spec.ts index 77f111496c8c..77cf25494f62 100644 --- a/packages/server/test/e2e/non_proxied_spec.ts +++ b/system-tests/test/non_proxied_spec.ts @@ -1,10 +1,10 @@ -import e2e from '../support/helpers/e2e' -import Fixtures from '../support/helpers/fixtures' +import systemTests from '../lib/system-tests' +import Fixtures from '../lib/fixtures' describe('e2e non-proxied spec', () => { - e2e.setup() + systemTests.setup() - e2e.it('passes', { + systemTests.it('passes', { spec: 'spec.js', config: { video: false, diff --git a/packages/server/test/e2e/non_root_read_only_fs_spec.ts b/system-tests/test/non_root_read_only_fs_spec.ts similarity index 82% rename from packages/server/test/e2e/non_root_read_only_fs_spec.ts rename to system-tests/test/non_root_read_only_fs_spec.ts index 379b3f407084..4c340c1277e9 100644 --- a/packages/server/test/e2e/non_root_read_only_fs_spec.ts +++ b/system-tests/test/non_root_read_only_fs_spec.ts @@ -1,10 +1,10 @@ import * as fs from 'fs' import * as path from 'path' -import e2e from '../support/helpers/e2e' -import Fixtures from '../support/helpers/fixtures' +import systemTests from '../lib/system-tests' +import Fixtures from '../lib/fixtures' describe('e2e readonly fs', function () { - e2e.setup() + systemTests.setup() const projectPath = Fixtures.projectPath('read-only-project-root') @@ -30,7 +30,7 @@ describe('e2e readonly fs', function () { }) } - e2e.it('warns when unable to write to disk', { + systemTests.it('warns when unable to write to disk', { project: projectPath, expectedExitCode: 1, spec: 'spec.js', diff --git a/packages/server/test/e2e/only_spec.js b/system-tests/test/only_spec.js similarity index 52% rename from packages/server/test/e2e/only_spec.js rename to system-tests/test/only_spec.js index 8548a59e461a..488d1a4ce726 100644 --- a/packages/server/test/e2e/only_spec.js +++ b/system-tests/test/only_spec.js @@ -1,10 +1,10 @@ -const e2e = require('../support/helpers/e2e').default +const systemTests = require('../lib/system-tests').default describe('e2e only spec', () => { - e2e.setup() + systemTests.setup() it('failing', function () { - return e2e.exec(this, { + return systemTests.exec(this, { spec: 'only*.js', snapshot: true, }) diff --git a/packages/server/test/e2e/page_loading_spec.js b/system-tests/test/page_loading_spec.js similarity index 94% rename from packages/server/test/e2e/page_loading_spec.js rename to system-tests/test/page_loading_spec.js index 8b16fb79bda0..9b76f2d99fc1 100644 --- a/packages/server/test/e2e/page_loading_spec.js +++ b/system-tests/test/page_loading_spec.js @@ -1,5 +1,5 @@ const bodyParser = require('body-parser') -const e2e = require('../support/helpers/e2e').default +const systemTests = require('../lib/system-tests').default let count = 0 @@ -62,7 +62,7 @@ const onServer = function (app) { } describe('e2e page_loading', () => { - e2e.setup({ + systemTests.setup({ servers: [{ port: 1717, onServer, @@ -77,7 +77,7 @@ describe('e2e page_loading', () => { // additionally this creates an edge case where after __cypress.initial is // set we send an XHR which should not inject because its requested for JSON // but that another XHR which is requested for html should inject - e2e.it('passes', { + systemTests.it('passes', { spec: 'page_loading_spec.js', snapshot: true, }) diff --git a/packages/server/test/e2e/plugin_run_events_spec.ts b/system-tests/test/plugin_run_events_spec.ts similarity index 67% rename from packages/server/test/e2e/plugin_run_events_spec.ts rename to system-tests/test/plugin_run_events_spec.ts index 54cf8aaade7a..148595bde8c2 100644 --- a/packages/server/test/e2e/plugin_run_events_spec.ts +++ b/system-tests/test/plugin_run_events_spec.ts @@ -1,10 +1,10 @@ -import e2e from '../support/helpers/e2e' -import Fixtures from '../support/helpers/fixtures' +import systemTests from '../lib/system-tests' +import Fixtures from '../lib/fixtures' describe('e2e plugin run events', () => { - e2e.setup() + systemTests.setup() - e2e.it('sends events', { + systemTests.it('sends events', { browser: 'electron', project: Fixtures.projectPath('plugin-run-events'), spec: '*', @@ -14,14 +14,14 @@ describe('e2e plugin run events', () => { }, }) - e2e.it('handles video being deleted in after:spec', { + systemTests.it('handles video being deleted in after:spec', { browser: 'electron', project: Fixtures.projectPath('plugin-after-spec-deletes-video'), spec: '*', snapshot: true, }) - e2e.it('fails run if event handler throws', { + systemTests.it('fails run if event handler throws', { browser: 'electron', project: Fixtures.projectPath('plugin-run-event-throws'), spec: '*', diff --git a/packages/server/test/e2e/plugins_spec.js b/system-tests/test/plugins_spec.js similarity index 87% rename from packages/server/test/e2e/plugins_spec.js rename to system-tests/test/plugins_spec.js index cd81cfa510f8..211ee1b94f02 100644 --- a/packages/server/test/e2e/plugins_spec.js +++ b/system-tests/test/plugins_spec.js @@ -1,18 +1,18 @@ const path = require('path') -const e2e = require('../support/helpers/e2e').default -const Fixtures = require('../support/helpers/fixtures') +const systemTests = require('../lib/system-tests').default +const Fixtures = require('../lib/fixtures') const e2eProject = Fixtures.projectPath('e2e') describe('e2e plugins', function () { - e2e.setup() + systemTests.setup() // this tests verifies stdout manually instead of via snapshot because // there's a degree of randomness as to whether the error occurs before or // after the run output starts. the important thing is that the run is // failed and the right error is displayed - e2e.it('fails when there is an async error at the root', { + systemTests.it('fails when there is an async error at the root', { browser: 'chrome', spec: 'app_spec.js', project: Fixtures.projectPath('plugins-root-async-error'), @@ -26,7 +26,7 @@ describe('e2e plugins', function () { }) it('fails when there is an async error inside an event handler', function () { - return e2e.exec(this, { + return systemTests.exec(this, { spec: 'app_spec.js', project: Fixtures.projectPath('plugins-async-error'), sanitizeScreenshotDimensions: true, @@ -39,7 +39,7 @@ describe('e2e plugins', function () { }) it('can modify config from plugins', function () { - return e2e.exec(this, { + return systemTests.exec(this, { spec: 'app_spec.js', env: 'foo=foo,bar=bar', config: { pageLoadTimeout: 10000 }, @@ -50,14 +50,14 @@ describe('e2e plugins', function () { }) it('passes version correctly', function () { - return e2e.exec(this, { + return systemTests.exec(this, { project: Fixtures.projectPath('plugin-config-version'), }) }) it('catches invalid viewportWidth returned from plugins', function () { // the test project returns config object with a bad value - return e2e.exec(this, { + return systemTests.exec(this, { project: Fixtures.projectPath('plugin-returns-bad-config'), expectedExitCode: 1, snapshot: true, @@ -65,7 +65,7 @@ describe('e2e plugins', function () { }) it('catches invalid browsers list returned from plugins', function () { - return e2e.exec(this, { + return systemTests.exec(this, { project: Fixtures.projectPath('plugin-returns-empty-browsers-list'), expectedExitCode: 1, snapshot: true, @@ -73,7 +73,7 @@ describe('e2e plugins', function () { }) it('catches invalid browser returned from plugins', function () { - return e2e.exec(this, { + return systemTests.exec(this, { project: Fixtures.projectPath('plugin-returns-invalid-browser'), expectedExitCode: 1, snapshot: true, @@ -81,7 +81,7 @@ describe('e2e plugins', function () { }) it('can filter browsers from config', function () { - return e2e.exec(this, { + return systemTests.exec(this, { project: Fixtures.projectPath('plugin-filter-browsers'), // the test project filters available browsers // and returns a list with JUST Electron browser @@ -96,7 +96,7 @@ describe('e2e plugins', function () { }) }) - e2e.it('works with user extensions', { + systemTests.it('works with user extensions', { browser: 'chrome', spec: 'app_spec.js', headed: true, @@ -108,7 +108,7 @@ describe('e2e plugins', function () { it('handles absolute path to pluginsFile', function () { const pluginsAbsolutePath = Fixtures.projectPath('plugins-absolute-path') - return e2e.exec(this, { + return systemTests.exec(this, { spec: 'absolute_spec.js', config: { pluginsFile: path.join( @@ -125,7 +125,7 @@ describe('e2e plugins', function () { const pluginAfterScreenshot = Fixtures.projectPath('plugin-after-screenshot') it('calls after:screenshot for cy.screenshot() and failure screenshots', function () { - return e2e.exec(this, { + return systemTests.exec(this, { spec: 'after_screenshot_spec.js', project: pluginAfterScreenshot, sanitizeScreenshotDimensions: true, @@ -136,7 +136,7 @@ describe('e2e plugins', function () { // https://github.com/cypress-io/cypress/issues/8079 it('does not report more screenshots than exist if user overwrites previous screenshot in afterScreenshot', function () { - return e2e.exec(this, { + return systemTests.exec(this, { spec: 'after_screenshot_overwrite_spec.js', project: pluginAfterScreenshot, snapshot: true, @@ -144,7 +144,7 @@ describe('e2e plugins', function () { }) it('fails when invalid event is registered', function () { - return e2e.exec(this, { + return systemTests.exec(this, { spec: 'app_spec.js', project: Fixtures.projectPath('plugin-validation-error'), sanitizeScreenshotDimensions: true, @@ -154,7 +154,7 @@ describe('e2e plugins', function () { }) it('fails when there is no function exported', function () { - return e2e.exec(this, { + return systemTests.exec(this, { spec: 'app_spec.js', project: Fixtures.projectPath('plugin-empty'), sanitizeScreenshotDimensions: true, @@ -165,7 +165,7 @@ describe('e2e plugins', function () { describe('preprocessor', function () { it('passes with working preprocessor', function () { - return e2e.exec(this, { + return systemTests.exec(this, { spec: 'app_spec.js', project: Fixtures.projectPath('working-preprocessor'), sanitizeScreenshotDimensions: true, @@ -174,14 +174,14 @@ describe('e2e plugins', function () { }) it('supports node builtins', function () { - return e2e.exec(this, { + return systemTests.exec(this, { spec: 'node_builtins_spec.js', }) }) // https://github.com/cypress-io/cypress/issues/8361 it('supports .mjs files', function () { - return e2e.exec(this, { + return systemTests.exec(this, { spec: 'mjs_spec.mjs', }) }) @@ -189,7 +189,7 @@ describe('e2e plugins', function () { describe('extra properties', function () { it('passes projectRoot and default configFile to plugins function', function () { - return e2e.exec(this, { + return systemTests.exec(this, { spec: 'plugins_config_extras_spec.js', config: { env: { @@ -201,7 +201,7 @@ describe('e2e plugins', function () { }) it('passes custom configFile to plugins function', function () { - return e2e.exec(this, { + return systemTests.exec(this, { spec: 'plugins_config_extras_spec.js', configFile: 'cypress-alt.json', config: { @@ -214,7 +214,7 @@ describe('e2e plugins', function () { }) it('passes false configFile to plugins function', function () { - return e2e.exec(this, { + return systemTests.exec(this, { spec: 'plugins_config_extras_spec.js', configFile: 'false', config: { diff --git a/packages/server/test/e2e/promises_spec.js b/system-tests/test/promises_spec.js similarity index 51% rename from packages/server/test/e2e/promises_spec.js rename to system-tests/test/promises_spec.js index 5038c468227b..a95e89381957 100644 --- a/packages/server/test/e2e/promises_spec.js +++ b/system-tests/test/promises_spec.js @@ -1,9 +1,9 @@ -const e2e = require('../support/helpers/e2e').default +const systemTests = require('../lib/system-tests').default describe('e2e promises', () => { - e2e.setup() + systemTests.setup() - e2e.it('failing1', { + systemTests.it('failing1', { spec: 'promises_spec.js', snapshot: true, expectedExitCode: 2, diff --git a/packages/server/test/e2e/proxying_spec.ts b/system-tests/test/proxying_spec.ts similarity index 62% rename from packages/server/test/e2e/proxying_spec.ts rename to system-tests/test/proxying_spec.ts index ac71241f7ca9..3759d3858bbc 100644 --- a/packages/server/test/e2e/proxying_spec.ts +++ b/system-tests/test/proxying_spec.ts @@ -1,7 +1,7 @@ -import e2e from '../support/helpers/e2e' +import systemTests from '../lib/system-tests' describe('e2e proxying spec', () => { - e2e.setup({ + systemTests.setup({ servers: { port: 7878, static: true, @@ -10,7 +10,7 @@ describe('e2e proxying spec', () => { }, }) - e2e.it('integrity check', { + systemTests.it('integrity check', { spec: 'proxying_spec.js', }) }) diff --git a/packages/server/test/e2e/record_spec.js b/system-tests/test/record_spec.js similarity index 95% rename from packages/server/test/e2e/record_spec.js rename to system-tests/test/record_spec.js index c46b2b5586d4..2f37cfd2860c 100644 --- a/packages/server/test/e2e/record_spec.js +++ b/system-tests/test/record_spec.js @@ -2,10 +2,9 @@ const _ = require('lodash') const path = require('path') const Promise = require('bluebird') const jsonSchemas = require('@cypress/json-schemas').api -const snapshot = require('snap-shot-it') -const e2e = require('../support/helpers/e2e').default -const { fs } = require('../../lib/util/fs') -const Fixtures = require('../support/helpers/fixtures') +const systemTests = require('../lib/system-tests').default +const { fs } = require('@packages/server/lib/util/fs') +const Fixtures = require('../lib/fixtures') const { createRoutes, setupStubbedServer, @@ -14,8 +13,8 @@ const { postRunResponseWithWarnings, postRunInstanceResponse, postInstanceTestsResponse, -} = require('../support/helpers/serverStub') -const { expectRunsToHaveCorrectTimings } = require('../support/helpers/resultsUtils') +} = require('../lib/serverStub') +const { expectRunsToHaveCorrectTimings } = require('../lib/resultsUtils') const e2ePath = Fixtures.projectPath('e2e') const outputPath = path.join(e2ePath, 'output.json') @@ -34,7 +33,7 @@ describe('e2e record', () => { setupStubbedServer(createRoutes()) it('passes', async function () { - const { stdout } = await e2e.exec(this, { + const { stdout } = await systemTests.exec(this, { key: 'f858a2bc-b469-4e48-be67-0876339ee7e1', spec: 'record*', record: true, @@ -221,9 +220,9 @@ describe('e2e record', () => { expectRunsToHaveCorrectTimings(runs) - runs = e2e.normalizeRuns(runs) + runs = systemTests.normalizeRuns(runs) - snapshot(runs) + systemTests.snapshot(runs) const results = await fs.readJsonAsync(outputPath) @@ -347,7 +346,7 @@ describe('e2e record', () => { this.retries(3) return Promise.all([ - e2e.exec(this, { + systemTests.exec(this, { key: 'f858a2bc-b469-4e48-be67-0876339ee7e1', spec: 'record*', group: 'prod-e2e', @@ -368,7 +367,7 @@ describe('e2e record', () => { Promise .delay(3000) .then(() => { - return e2e.exec(this, { + return systemTests.exec(this, { key: 'f858a2bc-b469-4e48-be67-0876339ee7e1', spec: 'record*', group: 'prod-e2e', @@ -391,7 +390,7 @@ describe('e2e record', () => { setupStubbedServer(createRoutes()) it('sends Studio usage metadata', function () { - return e2e.exec(this, { + return systemTests.exec(this, { key: 'f858a2bc-b469-4e48-be67-0876339ee7e1', spec: 'studio_written.spec.js', record: true, @@ -412,7 +411,7 @@ describe('e2e record', () => { setupStubbedServer([]) it('errors and exits when no specs found', function () { - return e2e.exec(this, { + return systemTests.exec(this, { spec: 'notfound/**', snapshot: true, expectedExitCode: 1, @@ -423,7 +422,7 @@ describe('e2e record', () => { }) it('errors and exits when no browser found', function () { - return e2e.exec(this, { + return systemTests.exec(this, { browser: 'browserDoesNotExist', spec: 'record_pass*', snapshot: true, @@ -440,7 +439,7 @@ describe('e2e record', () => { // https://github.com/cypress-io/cypress/issues/15512 it('succeeds when empty spec file', async function () { - await e2e.exec(this, { + await systemTests.exec(this, { key: 'f858a2bc-b469-4e48-be67-0876339ee7e1', record: true, spec: 'empty_suite.spec.js,empty.spec.js', @@ -466,10 +465,10 @@ describe('e2e record', () => { }) context('projectId', () => { - e2e.setup() + systemTests.setup() it('errors and exits without projectId', function () { - return e2e.exec(this, { + return systemTests.exec(this, { key: 'f858a2bc-b469-4e48-be67-0876339ee7e1', spec: 'record_pass*', record: true, @@ -483,7 +482,7 @@ describe('e2e record', () => { setupStubbedServer(createRoutes()) it('respects quiet mode', function () { - return e2e.exec(this, { + return systemTests.exec(this, { key: 'f858a2bc-b469-4e48-be67-0876339ee7e1', spec: 'record_pass*', record: true, @@ -498,7 +497,7 @@ describe('e2e record', () => { setupStubbedServer(createRoutes()) it('errors and exits without recordKey', function () { - return e2e.exec(this, { + return systemTests.exec(this, { spec: 'record_pass*', record: true, snapshot: true, @@ -514,9 +513,9 @@ describe('e2e record', () => { process.env.CIRCLE_PR_NUMBER = '123' process.env.CIRCLE_PR_USERNAME = 'brian-mann' process.env.CIRCLE_PR_REPONAME = 'cypress' - process.env.CYPRESS_INTERNAL_E2E_TESTS = '0' + process.env.CYPRESS_INTERNAL_SYSTEM_TESTS = '0' - return e2e.exec(this, { + return systemTests.exec(this, { spec: 'record_pass*', record: true, snapshot: true, @@ -534,9 +533,9 @@ describe('e2e record', () => { process.env.CIRCLE_PR_NUMBER = '123' process.env.CIRCLE_PR_USERNAME = 'brian-mann' process.env.CIRCLE_PR_REPONAME = 'cypress' - process.env.CYPRESS_INTERNAL_E2E_TESTS = '0' + process.env.CYPRESS_INTERNAL_SYSTEM_TESTS = '0' - return e2e.exec(this, { + return systemTests.exec(this, { spec: 'record_pass*', record: true, parallel: true, @@ -555,7 +554,7 @@ describe('e2e record', () => { }) it('config from runtime, testOptions', async function () { - await e2e.exec(this, { + await systemTests.exec(this, { key: 'f858a2bc-b469-4e48-be67-0876339ee7e1', spec: 'config_record_spec*', record: true, @@ -610,7 +609,7 @@ describe('e2e record', () => { }), { video: false }) it('changes spec run order', async function () { - await e2e.exec(this, { + await systemTests.exec(this, { key: 'f858a2bc-b469-4e48-be67-0876339ee7e1', spec: 'a_record.spec.js,b_record.spec.js', record: true, @@ -650,7 +649,7 @@ describe('e2e record', () => { }), { video: false }) it('records tests and exits without executing', async function () { - await e2e.exec(this, { + await systemTests.exec(this, { key: 'f858a2bc-b469-4e48-be67-0876339ee7e1', spec: 'a_record_instantfail.spec.js,b_record.spec.js', record: true, @@ -677,7 +676,7 @@ describe('e2e record', () => { }) it('records tests and exits without executing in parallel', async function () { - await e2e.exec(this, { + await systemTests.exec(this, { key: 'f858a2bc-b469-4e48-be67-0876339ee7e1', spec: 'a_record_instantfail.spec.js,b_record.spec.js', record: true, @@ -707,7 +706,7 @@ describe('e2e record', () => { }) it('does not upload when not enabled', function () { - return e2e.exec(this, { + return systemTests.exec(this, { key: 'f858a2bc-b469-4e48-be67-0876339ee7e1', spec: 'record_pass*', record: true, @@ -729,7 +728,7 @@ describe('e2e record', () => { setupStubbedServer(routes) it('errors and exits on 401', function () { - return e2e.exec(this, { + return systemTests.exec(this, { key: 'f858a2bc-b469-4e48-be67-0876339ee7e1', spec: 'record_pass*', record: true, @@ -751,7 +750,7 @@ describe('e2e record', () => { setupStubbedServer(routes) it('errors and exits', function () { - return e2e.exec(this, { + return systemTests.exec(this, { key: 'f858a2bc-b469-4e48-be67-0876339ee7e1', spec: 'record_pass*', record: true, @@ -775,7 +774,7 @@ describe('e2e record', () => { it('errors and exits', function () { process.env.DISABLE_API_RETRIES = 'true' - return e2e.exec(this, { + return systemTests.exec(this, { key: 'f858a2bc-b469-4e48-be67-0876339ee7e1', spec: 'record_pass*', record: true, @@ -794,7 +793,7 @@ describe('e2e record', () => { it('when grouping without parallelization errors and exits', function () { process.env.DISABLE_API_RETRIES = 'true' - return e2e.exec(this, { + return systemTests.exec(this, { key: 'f858a2bc-b469-4e48-be67-0876339ee7e1', spec: 'record_pass*', group: 'foo', @@ -815,7 +814,7 @@ describe('e2e record', () => { it('does not proceed and exits with error when parallelizing', function () { process.env.DISABLE_API_RETRIES = 'true' - return e2e.exec(this, { + return systemTests.exec(this, { key: 'f858a2bc-b469-4e48-be67-0876339ee7e1', spec: 'record_pass*', group: 'foo', @@ -850,7 +849,7 @@ describe('e2e record', () => { it('does not proceed and exits with error when parallelizing and creating instance', function () { process.env.DISABLE_API_RETRIES = 'true' - return e2e.exec(this, { + return systemTests.exec(this, { key: 'f858a2bc-b469-4e48-be67-0876339ee7e1', spec: 'record_pass*', group: 'foo', @@ -874,7 +873,7 @@ describe('e2e record', () => { it('without parallelization - does not proceed', async function () { process.env.DISABLE_API_RETRIES = 'true' - await e2e.exec(this, { + await systemTests.exec(this, { key: 'f858a2bc-b469-4e48-be67-0876339ee7e1', spec: '*_record.spec.js', record: true, @@ -917,7 +916,7 @@ describe('e2e record', () => { it('does not proceed and exits with error when parallelizing and updating instance', function () { process.env.DISABLE_API_RETRIES = 'true' - return e2e.exec(this, { + return systemTests.exec(this, { key: 'f858a2bc-b469-4e48-be67-0876339ee7e1', spec: 'record_pass*', group: 'foo', @@ -960,7 +959,7 @@ describe('e2e record', () => { it('errors and exits when group name is in use', function () { process.env.CIRCLECI = '1' - return e2e.exec(this, { + return systemTests.exec(this, { key: 'f858a2bc-b469-4e48-be67-0876339ee7e1', spec: 'record_pass*', group: 'e2e-tests', @@ -991,7 +990,7 @@ describe('e2e record', () => { })) it('errors and exits when there is an unknown 422 response', function () { - return e2e.exec(this, { + return systemTests.exec(this, { key: 'f858a2bc-b469-4e48-be67-0876339ee7e1', spec: 'record_pass*', group: 'e2e-tests', @@ -1029,7 +1028,7 @@ describe('e2e record', () => { })) it('errors and exits when on free plan and over recorded runs limit', function () { - return e2e.exec(this, { + return systemTests.exec(this, { key: 'f858a2bc-b469-4e48-be67-0876339ee7e1', spec: 'record_pass*', record: true, @@ -1056,7 +1055,7 @@ describe('e2e record', () => { })) it('errors and exits when on free plan and over recorded tests limit', function () { - return e2e.exec(this, { + return systemTests.exec(this, { key: 'f858a2bc-b469-4e48-be67-0876339ee7e1', spec: 'record_pass*', record: true, @@ -1080,7 +1079,7 @@ describe('e2e record', () => { } })) it('errors and exits when attempting parallel run when not available in plan', function () { - return e2e.exec(this, { + return systemTests.exec(this, { key: 'f858a2bc-b469-4e48-be67-0876339ee7e1', spec: 'record_pass*', record: true, @@ -1103,7 +1102,7 @@ describe('e2e record', () => { } })) it('errors and exits when attempting parallel run when not available in plan', function () { - return e2e.exec(this, { + return systemTests.exec(this, { key: 'f858a2bc-b469-4e48-be67-0876339ee7e1', spec: 'record_pass*', record: true, @@ -1123,7 +1122,7 @@ describe('e2e record', () => { } })) it('errors and exits when there\'s an unknown 402 error', function () { - return e2e.exec(this, { + return systemTests.exec(this, { key: 'f858a2bc-b469-4e48-be67-0876339ee7e1', spec: 'record_pass*', record: true, @@ -1145,7 +1144,7 @@ describe('e2e record', () => { it('errors and exits on createInstance error', function () { process.env.DISABLE_API_RETRIES = 'true' - return e2e.exec(this, { + return systemTests.exec(this, { key: 'f858a2bc-b469-4e48-be67-0876339ee7e1', spec: '*_record_*', record: true, @@ -1175,7 +1174,7 @@ describe('e2e record', () => { // it('without parallelization continues, does not post instance results', async function () { // process.env.DISABLE_API_RETRIES = 'true' - // return e2e.exec(this, { + // return systemTests.exec(this, { // key: 'f858a2bc-b469-4e48-be67-0876339ee7e1', // spec: '*_record.spec*', // record: true, @@ -1197,7 +1196,7 @@ describe('e2e record', () => { it('without parallelization errors and exits', async function () { process.env.DISABLE_API_RETRIES = 'true' - return e2e.exec(this, { + return systemTests.exec(this, { key: 'f858a2bc-b469-4e48-be67-0876339ee7e1', spec: '*_record.spec*', group: 'foo', @@ -1220,7 +1219,7 @@ describe('e2e record', () => { it('with parallelization errors and exits', async function () { process.env.DISABLE_API_RETRIES = 'true' - await e2e.exec(this, { + await systemTests.exec(this, { key: 'f858a2bc-b469-4e48-be67-0876339ee7e1', spec: '*_record.spec.js', record: true, @@ -1256,7 +1255,7 @@ describe('e2e record', () => { it('errors and exits in serial', function () { process.env.DISABLE_API_RETRIES = 'true' - return e2e.exec(this, { + return systemTests.exec(this, { key: 'f858a2bc-b469-4e48-be67-0876339ee7e1', spec: 'record_pass*', record: true, @@ -1290,7 +1289,7 @@ describe('e2e record', () => { it('warns but proceeds', function () { process.env.DISABLE_API_RETRIES = 'true' - return e2e.exec(this, { + return systemTests.exec(this, { key: 'f858a2bc-b469-4e48-be67-0876339ee7e1', spec: 'record_pass*', record: true, @@ -1335,7 +1334,7 @@ describe('e2e record', () => { }) it('warns but proceeds', function () { - return e2e.exec(this, { + return systemTests.exec(this, { key: 'f858a2bc-b469-4e48-be67-0876339ee7e1', spec: 'record_pass*', record: true, @@ -1407,7 +1406,7 @@ describe('e2e record', () => { it('warns and does not create or update instances', function () { process.env.API_RETRY_INTERVALS = '1000,2000,3000' - return e2e.exec(this, { + return systemTests.exec(this, { key: 'f858a2bc-b469-4e48-be67-0876339ee7e1', spec: 'record_pass*', group: 'foo', @@ -1467,7 +1466,7 @@ describe('e2e record', () => { })) it('warns when over private test results', function () { - return e2e.exec(this, { + return systemTests.exec(this, { key: 'f858a2bc-b469-4e48-be67-0876339ee7e1', spec: 'record_pass*', record: true, @@ -1502,7 +1501,7 @@ describe('e2e record', () => { })) it('warns when over test results', function () { - return e2e.exec(this, { + return systemTests.exec(this, { key: 'f858a2bc-b469-4e48-be67-0876339ee7e1', spec: 'record_pass*', record: true, @@ -1536,7 +1535,7 @@ describe('e2e record', () => { })) it('warns when using parallel feature', function () { - return e2e.exec(this, { + return systemTests.exec(this, { key: 'f858a2bc-b469-4e48-be67-0876339ee7e1', spec: 'record_pass*', record: true, @@ -1570,7 +1569,7 @@ describe('e2e record', () => { })) it('warns when using parallel feature', function () { - return e2e.exec(this, { + return systemTests.exec(this, { key: 'f858a2bc-b469-4e48-be67-0876339ee7e1', spec: 'record_pass*', record: true, @@ -1605,7 +1604,7 @@ describe('e2e record', () => { })) it('warns when over private test results', function () { - return e2e.exec(this, { + return systemTests.exec(this, { key: 'f858a2bc-b469-4e48-be67-0876339ee7e1', spec: 'record_pass*', record: true, @@ -1640,7 +1639,7 @@ describe('e2e record', () => { })) it('warns when over test results', function () { - return e2e.exec(this, { + return systemTests.exec(this, { key: 'f858a2bc-b469-4e48-be67-0876339ee7e1', spec: 'record_pass*', record: true, @@ -1675,7 +1674,7 @@ describe('e2e record', () => { })) it('warns when over test results', function () { - return e2e.exec(this, { + return systemTests.exec(this, { key: 'f858a2bc-b469-4e48-be67-0876339ee7e1', spec: 'record_pass*', record: true, @@ -1695,7 +1694,7 @@ describe('e2e record', () => { })) it('warns with unknown warning code', function () { - return e2e.exec(this, { + return systemTests.exec(this, { key: 'f858a2bc-b469-4e48-be67-0876339ee7e1', spec: 'record_pass*', record: true, diff --git a/packages/server/test/e2e/reporters_spec.js b/system-tests/test/reporters_spec.js similarity index 89% rename from packages/server/test/e2e/reporters_spec.js rename to system-tests/test/reporters_spec.js index d4f08c15541a..eb0b65b943f7 100644 --- a/packages/server/test/e2e/reporters_spec.js +++ b/system-tests/test/reporters_spec.js @@ -1,8 +1,8 @@ const path = require('path') -const { fs } = require('../../lib/util/fs') -const glob = require('../../lib/util/glob') -const e2e = require('../support/helpers/e2e').default -const Fixtures = require('../support/helpers/fixtures') +const { fs } = require('@packages/server/lib/util/fs') +const glob = require('@packages/server/lib/util/glob') +const systemTests = require('../lib/system-tests').default +const Fixtures = require('../lib/fixtures') const e2ePath = Fixtures.projectPath('e2e') @@ -13,10 +13,10 @@ const mochaAwesomes = [ ] describe('e2e reporters', () => { - e2e.setup() + systemTests.setup() it('reports error if cannot load reporter', function () { - return e2e.exec(this, { + return systemTests.exec(this, { spec: 'simple_passing_spec.js', snapshot: true, expectedExitCode: 1, @@ -26,7 +26,7 @@ describe('e2e reporters', () => { // https://github.com/cypress-io/cypress/issues/1192 it('reports error when thrown from reporter', function () { - return e2e.exec(this, { + return systemTests.exec(this, { spec: 'simple_passing_spec.js', snapshot: true, expectedExitCode: 1, @@ -35,7 +35,7 @@ describe('e2e reporters', () => { }) it('supports junit reporter and reporter options', function () { - return e2e.exec(this, { + return systemTests.exec(this, { spec: 'simple_passing_spec.js', snapshot: true, reporter: 'junit', @@ -58,7 +58,7 @@ describe('e2e reporters', () => { }) it('supports local custom reporter', function () { - return e2e.exec(this, { + return systemTests.exec(this, { spec: 'simple_passing_spec.js', snapshot: true, reporter: 'reporters/custom.js', @@ -66,7 +66,7 @@ describe('e2e reporters', () => { }) it('sends file to reporter', function () { - return e2e.exec(this, { + return systemTests.exec(this, { spec: 'simple_passing_spec.js', reporter: 'reporters/uses-file.js', }) @@ -79,7 +79,7 @@ describe('e2e reporters', () => { describe('mochawesome', () => { return mochaAwesomes.forEach((ma) => { it(`passes with ${ma} npm custom reporter`, function () { - return e2e.exec(this, { + return systemTests.exec(this, { spec: 'simple_passing_spec.js', snapshot: true, // cypress supports passing module name, relative path, or absolute path @@ -105,7 +105,7 @@ describe('e2e reporters', () => { }) it(`fails with ${ma} npm custom reporter`, function () { - return e2e.exec(this, { + return systemTests.exec(this, { spec: 'simple_failing_hook_spec.js', snapshot: true, expectedExitCode: 3, @@ -138,7 +138,7 @@ describe('e2e reporters', () => { }) it('supports teamcity reporter and reporter options', function () { - return e2e.exec(this, { + return systemTests.exec(this, { spec: 'simple_passing_spec.js', snapshot: true, reporter: 'teamcity', diff --git a/packages/server/test/e2e/request_spec.ts b/system-tests/test/request_spec.ts similarity index 95% rename from packages/server/test/e2e/request_spec.ts rename to system-tests/test/request_spec.ts index f2bfc83dd425..b42c6cdd2d4d 100644 --- a/packages/server/test/e2e/request_spec.ts +++ b/system-tests/test/request_spec.ts @@ -1,6 +1,6 @@ import bodyParser from 'body-parser' import cookieParser from 'cookie-parser' -import e2e from '../support/helpers/e2e' +import systemTests from '../lib/system-tests' let counts = null @@ -136,7 +136,7 @@ const onServer = function (app) { } describe('e2e requests', () => { - e2e.setup({ + systemTests.setup({ servers: [{ port: 2290, onServer, @@ -167,7 +167,7 @@ describe('e2e requests', () => { } }) - e2e.it('passes', { + systemTests.it('passes', { spec: 'request_spec.js', snapshot: true, config: { @@ -176,7 +176,7 @@ describe('e2e requests', () => { }) it('fails when network immediately fails', function () { - return e2e.exec(this, { + return systemTests.exec(this, { spec: 'request_http_network_error_failing_spec.js', snapshot: true, expectedExitCode: 1, @@ -184,7 +184,7 @@ describe('e2e requests', () => { }) it('fails on status code', function () { - return e2e.exec(this, { + return systemTests.exec(this, { spec: 'request_status_code_failing_spec.js', snapshot: true, expectedExitCode: 1, @@ -198,7 +198,7 @@ describe('e2e requests', () => { }) it('prints long http props on fail', function () { - return e2e.exec(this, { + return systemTests.exec(this, { spec: 'request_long_http_props_failing_spec.js', snapshot: true, expectedExitCode: 1, diff --git a/packages/server/test/e2e/retries_spec.ts b/system-tests/test/retries_spec.ts similarity index 78% rename from packages/server/test/e2e/retries_spec.ts rename to system-tests/test/retries_spec.ts index 0da48081c825..6fdad2337d06 100644 --- a/packages/server/test/e2e/retries_spec.ts +++ b/system-tests/test/retries_spec.ts @@ -1,10 +1,10 @@ -import e2e from '../support/helpers/e2e' -import Fixtures from '../support/helpers/fixtures' +import systemTests from '../lib/system-tests' +import Fixtures from '../lib/fixtures' -const it = e2e.it +const it = systemTests.it describe('retries', () => { - e2e.setup() + systemTests.setup() it('supports retries', { project: Fixtures.projectPath('retries-2'), diff --git a/packages/server/test/e2e/return_value_spec.js b/system-tests/test/return_value_spec.js similarity index 59% rename from packages/server/test/e2e/return_value_spec.js rename to system-tests/test/return_value_spec.js index da4099d79cf2..9dbbd4b9634d 100644 --- a/packages/server/test/e2e/return_value_spec.js +++ b/system-tests/test/return_value_spec.js @@ -1,10 +1,10 @@ -const e2e = require('../support/helpers/e2e').default +const systemTests = require('../lib/system-tests').default describe('e2e return value', () => { - e2e.setup() + systemTests.setup() it('failing1', function () { - return e2e.exec(this, { + return systemTests.exec(this, { spec: 'return_value_spec.js', snapshot: true, expectedExitCode: 3, diff --git a/packages/server/test/e2e/run_ct_spec.js b/system-tests/test/run_ct_spec.js similarity index 51% rename from packages/server/test/e2e/run_ct_spec.js rename to system-tests/test/run_ct_spec.js index 2248a1fab855..cbc507a3f840 100644 --- a/packages/server/test/e2e/run_ct_spec.js +++ b/system-tests/test/run_ct_spec.js @@ -1,9 +1,9 @@ -const e2e = require('../support/helpers/e2e').default +const systemTests = require('../lib/system-tests').default describe('run-ct', () => { - e2e.setup() + systemTests.setup() - e2e.it('reports correct exit code when failing', { + systemTests.it('reports correct exit code when failing', { spec: 'simple_failing_spec.js', testingType: 'component', snapshot: false, diff --git a/packages/server/test/e2e/runnable_execution_spec.ts b/system-tests/test/runnable_execution_spec.ts similarity index 70% rename from packages/server/test/e2e/runnable_execution_spec.ts rename to system-tests/test/runnable_execution_spec.ts index 00e5439f3c23..421f542ac023 100644 --- a/packages/server/test/e2e/runnable_execution_spec.ts +++ b/system-tests/test/runnable_execution_spec.ts @@ -1,8 +1,8 @@ -import e2e from '../support/helpers/e2e' -import Fixtures from '../support/helpers/fixtures' +import systemTests from '../lib/system-tests' +import Fixtures from '../lib/fixtures' describe('e2e runnable execution', () => { - e2e.setup({ + systemTests.setup({ servers: [{ port: 3434, static: true, @@ -20,20 +20,20 @@ describe('e2e runnable execution', () => { // navigation in before and in test body doesn't cause infinite loop // but throws correct error // https://github.com/cypress-io/cypress/issues/1987 - e2e.it('cannot navigate in before hook and test', { + systemTests.it('cannot navigate in before hook and test', { project: Fixtures.projectPath('hooks-after-rerun'), spec: 'beforehook-and-test-navigation.js', snapshot: true, expectedExitCode: 2, }) - e2e.it('runnables run correct number of times with navigation', { + systemTests.it('runnables run correct number of times with navigation', { project: Fixtures.projectPath('hooks-after-rerun'), spec: 'runnable-run-count.spec.js', snapshot: true, }) - e2e.it('runs correctly after top navigation with already ran suite', { + systemTests.it('runs correctly after top navigation with already ran suite', { spec: 'runnables_already_run_suite.js', snapshot: true, expectedExitCode: 1, diff --git a/packages/server/test/e2e/screenshot_element_capture_spec.js b/system-tests/test/screenshot_element_capture_spec.js similarity index 77% rename from packages/server/test/e2e/screenshot_element_capture_spec.js rename to system-tests/test/screenshot_element_capture_spec.js index a6ac4a6499df..494f0c8729e5 100644 --- a/packages/server/test/e2e/screenshot_element_capture_spec.js +++ b/system-tests/test/screenshot_element_capture_spec.js @@ -1,7 +1,7 @@ -const e2e = require('../support/helpers/e2e').default +const systemTests = require('../lib/system-tests').default const onServer = (app) => { - return app.get('/element', e2e.sendHtml(`\ + return app.get('/element', systemTests.sendHtml(`\
        @@ -10,7 +10,7 @@ const onServer = (app) => { } describe('e2e screenshot element capture', () => { - e2e.setup({ + systemTests.setup({ servers: { port: 3322, onServer, @@ -19,7 +19,7 @@ describe('e2e screenshot element capture', () => { // this tests that consistent screenshots are taken for element captures, // that the runner UI is hidden and that the page is scrolled properly - e2e.it('passes', { + systemTests.it('passes', { spec: 'screenshot_element_capture_spec.js', snapshot: true, }) diff --git a/packages/server/test/e2e/screenshot_fullpage_capture_spec.js b/system-tests/test/screenshot_fullpage_capture_spec.js similarity index 82% rename from packages/server/test/e2e/screenshot_fullpage_capture_spec.js rename to system-tests/test/screenshot_fullpage_capture_spec.js index d3dbf0e77003..8f92bb536f3c 100644 --- a/packages/server/test/e2e/screenshot_fullpage_capture_spec.js +++ b/system-tests/test/screenshot_fullpage_capture_spec.js @@ -1,7 +1,7 @@ -const e2e = require('../support/helpers/e2e').default +const systemTests = require('../lib/system-tests').default const onServer = (app) => { - return app.get('/fullPage', e2e.sendHtml(`\ + return app.get('/fullPage', systemTests.sendHtml(`\
        @@ -12,7 +12,7 @@ const onServer = (app) => { } describe('e2e screenshot fullPage capture', () => { - e2e.setup({ + systemTests.setup({ servers: { port: 3322, onServer, @@ -21,7 +21,7 @@ describe('e2e screenshot fullPage capture', () => { // this tests that consistent screenshots are taken for fullPage captures, // that the runner UI is hidden and that the page is scrolled properly - e2e.it('passes', { + systemTests.it('passes', { spec: 'screenshot_fullpage_capture_spec.js', snapshot: true, }) diff --git a/packages/server/test/e2e/screenshot_nested_file_spec.js b/system-tests/test/screenshot_nested_file_spec.js similarity index 56% rename from packages/server/test/e2e/screenshot_nested_file_spec.js rename to system-tests/test/screenshot_nested_file_spec.js index 2a3a8cf9c855..5a5d5a53e833 100644 --- a/packages/server/test/e2e/screenshot_nested_file_spec.js +++ b/system-tests/test/screenshot_nested_file_spec.js @@ -1,9 +1,9 @@ -const e2e = require('../support/helpers/e2e').default +const systemTests = require('../lib/system-tests').default describe('e2e screenshot in nested spec', () => { - e2e.setup() + systemTests.setup() - e2e.it('passes', { + systemTests.it('passes', { spec: 'nested-1/nested-2/screenshot_nested_file_spec.js', snapshot: true, }) diff --git a/packages/server/test/e2e/screenshot_viewport_capture_spec.js b/system-tests/test/screenshot_viewport_capture_spec.js similarity index 77% rename from packages/server/test/e2e/screenshot_viewport_capture_spec.js rename to system-tests/test/screenshot_viewport_capture_spec.js index 3ec5045c71d5..4e77f7552966 100644 --- a/packages/server/test/e2e/screenshot_viewport_capture_spec.js +++ b/system-tests/test/screenshot_viewport_capture_spec.js @@ -1,14 +1,14 @@ -const e2e = require('../support/helpers/e2e').default +const systemTests = require('../lib/system-tests').default const onServer = (app) => { - return app.get('/viewport', e2e.sendHtml(`\ + return app.get('/viewport', systemTests.sendHtml(`\
        \ `)) } describe('e2e screenshot viewport capture', () => { - e2e.setup({ + systemTests.setup({ servers: { port: 3322, onServer, @@ -17,7 +17,7 @@ describe('e2e screenshot viewport capture', () => { // this tests that consistent screenshots are taken for app // captures (namely that the runner UI is hidden) - e2e.it('passes', { + systemTests.it('passes', { spec: 'screenshot_viewport_capture_spec.js', snapshot: true, }) diff --git a/packages/server/test/e2e/screenshots_spec.js b/system-tests/test/screenshots_spec.js similarity index 88% rename from packages/server/test/e2e/screenshots_spec.js rename to system-tests/test/screenshots_spec.js index be612fa64333..ccec353c1687 100644 --- a/packages/server/test/e2e/screenshots_spec.js +++ b/system-tests/test/screenshots_spec.js @@ -1,10 +1,10 @@ const _ = require('lodash') const path = require('path') const Promise = require('bluebird') -const Fixtures = require('../support/helpers/fixtures') -const e2e = require('../support/helpers/e2e').default +const Fixtures = require('../lib/fixtures') +const systemTests = require('../lib/system-tests').default let sizeOf = require('image-size') -const { fs } = require('../../lib/util/fs') +const { fs } = require('@packages/server/lib/util/fs') sizeOf = Promise.promisify(sizeOf) @@ -12,28 +12,28 @@ const e2ePath = Fixtures.projectPath('e2e') const onServer = function (app) { app.get('/color/:color', (req, res) => { - return e2e.sendHtml(`\ + return systemTests.sendHtml(`\
        `)(req, res) }) - app.get('/fullPage', e2e.sendHtml(`\ + app.get('/fullPage', systemTests.sendHtml(`\
        \ `)) - app.get('/fullPage-same', e2e.sendHtml(`\ + app.get('/fullPage-same', systemTests.sendHtml(`\
        \ `)) - app.get('/element', e2e.sendHtml(`\ + app.get('/element', systemTests.sendHtml(`\
        \ `)) - app.get('/pathological', e2e.sendHtml(`\ + app.get('/pathological', systemTests.sendHtml(`\
        @@ -43,14 +43,14 @@ const onServer = function (app) {
        \ `)) - return app.get('/identical', e2e.sendHtml(`\ + return app.get('/identical', systemTests.sendHtml(`\
        \ `)) } describe('e2e screenshots', () => { - e2e.setup({ + systemTests.setup({ servers: { port: 3322, onServer, @@ -60,12 +60,12 @@ describe('e2e screenshots', () => { // this tests that screenshots can be manually generated // and are also generated automatically on failure with // the test title as the file name - e2e.it('passes', { + systemTests.it('passes', { spec: 'screenshots_spec.js', expectedExitCode: 5, snapshot: true, timeout: 180000, - onStdout: e2e.normalizeWebpackErrors, + onStdout: systemTests.normalizeWebpackErrors, onRun (exec, browser) { return exec() .then(() => { diff --git a/packages/server/test/e2e/server_sent_events_spec.js b/system-tests/test/server_sent_events_spec.js similarity index 91% rename from packages/server/test/e2e/server_sent_events_spec.js rename to system-tests/test/server_sent_events_spec.js index a99280d2910c..75fa02984107 100644 --- a/packages/server/test/e2e/server_sent_events_spec.js +++ b/system-tests/test/server_sent_events_spec.js @@ -1,5 +1,5 @@ const SseStream = require('ssestream') -const e2e = require('../support/helpers/e2e').default +const systemTests = require('../lib/system-tests').default let clients = 0 @@ -51,7 +51,7 @@ const onSSEServer = (app) => { const onSSEsServer = function (app) {} describe('e2e server sent events', () => { - e2e.setup({ + systemTests.setup({ servers: [{ port: 3038, static: true, @@ -66,7 +66,7 @@ describe('e2e server sent events', () => { }) // https://github.com/cypress-io/cypress/issues/1440 - e2e.it('passes', { + systemTests.it('passes', { spec: 'server_sent_events_spec.js', snapshot: true, }) diff --git a/packages/server/test/e2e/session_spec.ts b/system-tests/test/session_spec.ts similarity index 97% rename from packages/server/test/e2e/session_spec.ts rename to system-tests/test/session_spec.ts index 38c852e71830..6686cc62d781 100644 --- a/packages/server/test/e2e/session_spec.ts +++ b/system-tests/test/session_spec.ts @@ -1,8 +1,8 @@ -import e2e from '../support/helpers/e2e' +import systemTests from '../lib/system-tests' import parser from 'cookie-parser' import BodyParser from 'body-parser' -const it = e2e.it +const it = systemTests.it const onServer = function (app) { app.use(parser()) @@ -108,7 +108,7 @@ const onServer = function (app) { } describe('e2e sessions', () => { - e2e.setup({ + systemTests.setup({ servers: [{ port: 4466, https: true, diff --git a/packages/server/test/e2e/spec_isolation_spec.js b/system-tests/test/spec_isolation_spec.js similarity index 75% rename from packages/server/test/e2e/spec_isolation_spec.js rename to system-tests/test/spec_isolation_spec.js index 1adbf2ada0f9..f99dc64a5ad1 100644 --- a/packages/server/test/e2e/spec_isolation_spec.js +++ b/system-tests/test/spec_isolation_spec.js @@ -2,13 +2,12 @@ const path = require('path') const _ = require('lodash') -const snapshot = require('snap-shot-it') -const { fs } = require('../../lib/util/fs') -const { default: e2e, STDOUT_DURATION_IN_TABLES_RE } = require('../support/helpers/e2e') -const Fixtures = require('../support/helpers/fixtures') -const { expectCorrectModuleApiResult } = require('../support/helpers/resultsUtils') +const { fs } = require('@packages/server/lib/util/fs') +const { default: systemTests, STDOUT_DURATION_IN_TABLES_RE } = require('../lib/system-tests') +const Fixtures = require('../lib/fixtures') +const { expectCorrectModuleApiResult } = require('../lib/resultsUtils') const e2ePath = Fixtures.projectPath('e2e') -const { it } = e2e +const { it } = systemTests const outputPath = path.join(e2ePath, 'output.json') @@ -20,7 +19,7 @@ const specs = [ ].join(',') describe('e2e spec_isolation', () => { - e2e.setup() + systemTests.setup() it('fails', { spec: specs, @@ -41,14 +40,14 @@ describe('e2e spec_isolation', () => { // and snapshot it so its what we expect after normalizing it let json = await fs.readJsonAsync(outputPath) - json.runs = e2e.normalizeRuns(json.runs) + json.runs = systemTests.normalizeRuns(json.runs) // also mutates into normalized obj ready for snapshot expectCorrectModuleApiResult(json, { e2ePath, runs: 4, video: false, }) - snapshot(json, { allowSharedSnapshot: true }) + systemTests.snapshot(json, { allowSharedSnapshot: true }) }, }) @@ -65,14 +64,14 @@ describe('e2e spec_isolation', () => { await execFn() let json = await fs.readJsonAsync(outputPath) - json.runs = e2e.normalizeRuns(json.runs) + json.runs = systemTests.normalizeRuns(json.runs) // also mutates into normalized obj ready for snapshot expectCorrectModuleApiResult(json, { e2ePath, runs: 2, video: false, }) - snapshot(json) + systemTests.snapshot(json) }, }) }) diff --git a/packages/server/test/e2e/specs_spec.js b/system-tests/test/specs_spec.js similarity index 76% rename from packages/server/test/e2e/specs_spec.js rename to system-tests/test/specs_spec.js index f9ae31e120da..13c0ed0da5ad 100644 --- a/packages/server/test/e2e/specs_spec.js +++ b/system-tests/test/specs_spec.js @@ -1,11 +1,11 @@ -const e2e = require('../support/helpers/e2e').default -const Fixtures = require('../support/helpers/fixtures') +const systemTests = require('../lib/system-tests').default +const Fixtures = require('../lib/fixtures') describe('e2e specs', () => { - e2e.setup() + systemTests.setup() it('failing when no specs found', function () { - return e2e.exec(this, { + return systemTests.exec(this, { config: { integrationFolder: 'cypress/specs' }, snapshot: true, expectedExitCode: 1, @@ -13,7 +13,7 @@ describe('e2e specs', () => { }) it('failing when no spec pattern found', function () { - return e2e.exec(this, { + return systemTests.exec(this, { spec: 'cypress/integration/**notfound**', snapshot: true, expectedExitCode: 1, @@ -24,7 +24,7 @@ describe('e2e specs', () => { it('handles the same integration and fixtures folders', function () { const project = Fixtures.projectPath('same-fixtures-integration-folders') - return e2e.exec(this, { + return systemTests.exec(this, { project, snapshot: false, expectedExitCode: 0, @@ -34,7 +34,7 @@ describe('e2e specs', () => { it('handles the fixtures folder being the subfolder of integration', function () { const project = Fixtures.projectPath('fixture-subfolder-of-integration') - return e2e.exec(this, { + return systemTests.exec(this, { project, snapshot: false, expectedExitCode: 0, diff --git a/packages/server/test/e2e/stdout_spec.js b/system-tests/test/stdout_spec.js similarity index 78% rename from packages/server/test/e2e/stdout_spec.js rename to system-tests/test/stdout_spec.js index a1c84963cba9..90e5c7a55a0e 100644 --- a/packages/server/test/e2e/stdout_spec.js +++ b/system-tests/test/stdout_spec.js @@ -1,7 +1,7 @@ -const e2e = require('../support/helpers/e2e').default +const systemTests = require('../lib/system-tests').default describe('e2e stdout', () => { - e2e.setup({ + systemTests.setup({ servers: [{ port: 1777, https: true, @@ -21,7 +21,7 @@ describe('e2e stdout', () => { }) it('displays errors from failures', function () { - return e2e.exec(this, { + return systemTests.exec(this, { port: 2020, snapshot: true, spec: 'stdout_failing_spec.js', @@ -30,16 +30,16 @@ describe('e2e stdout', () => { }) it('displays errors from exiting early due to bundle errors', function () { - return e2e.exec(this, { + return systemTests.exec(this, { spec: 'stdout_exit_early_failing_spec.js', snapshot: true, expectedExitCode: 1, - onStdout: e2e.normalizeWebpackErrors, + onStdout: systemTests.normalizeWebpackErrors, }) }) it('does not duplicate suites or tests between visits', function () { - return e2e.exec(this, { + return systemTests.exec(this, { spec: 'stdout_passing_spec.js', timeout: 120000, snapshot: true, @@ -47,7 +47,7 @@ describe('e2e stdout', () => { }) it('respects quiet mode', function () { - return e2e.exec(this, { + return systemTests.exec(this, { spec: 'stdout_passing_spec.js', timeout: 120000, snapshot: true, @@ -56,14 +56,14 @@ describe('e2e stdout', () => { }) it('displays fullname of nested specfile', function () { - return e2e.exec(this, { + return systemTests.exec(this, { port: 2020, snapshot: true, spec: 'nested-1/nested-2/nested-3/*', }) }) - e2e.it('displays assertion errors', { + systemTests.it('displays assertion errors', { spec: 'stdout_assertion_errors_spec.js', snapshot: true, expectedExitCode: 4, diff --git a/packages/server/test/e2e/studio_spec.ts b/system-tests/test/studio_spec.ts similarity index 74% rename from packages/server/test/e2e/studio_spec.ts rename to system-tests/test/studio_spec.ts index 33358e073a6a..44c63128e510 100644 --- a/packages/server/test/e2e/studio_spec.ts +++ b/system-tests/test/studio_spec.ts @@ -1,27 +1,25 @@ import path from 'path' -import snapshot from 'snap-shot-it' - -import { root } from '../spec_helper' -import e2e from '../support/helpers/e2e' -import { projectPath } from '../support/helpers/fixtures' - -const { fs } = require(`${root}/lib/util/fs`) +import systemTests from '../lib/system-tests' +import { projectPath } from '../lib/fixtures' +import { promises as fs } from 'fs' const snapshotFile = (project, file, folder = 'integration') => { const filePath = path.join(projectPath(project), 'cypress', folder, file) return fs.readFile(filePath).then((content) => { - snapshot(`${project} ${file}`, content.toString()) + systemTests.snapshot(`${project} ${file}`, content.toString()) }) } // NOTE: all output snapshots will display the root spec suite twice // this is intentional and indicates how the studio "restarts" the runner -describe('e2e studio', function () { - e2e.setup() +// TODO: fix these after system tests PR +// @see https://github.com/cypress-io/cypress/issues/18498 +describe.skip('e2e studio', function () { + systemTests.setup() - e2e.it('extends test', { + systemTests.it('extends test', { project: projectPath('studio'), spec: 'extend.spec.js', snapshot: true, @@ -33,7 +31,7 @@ describe('e2e studio', function () { // includes "New Test" in snapshot // this is the blank new test that's being created - e2e.it('creates new test', { + systemTests.it('creates new test', { project: projectPath('studio'), spec: 'new.spec.js', browser: 'electron', @@ -43,7 +41,7 @@ describe('e2e studio', function () { }, }) - e2e.it('can write to imported files', { + systemTests.it('can write to imported files', { project: projectPath('studio'), spec: 'external.spec.js', snapshot: true, @@ -56,7 +54,7 @@ describe('e2e studio', function () { }, }) - e2e.it('extends test without source maps', { + systemTests.it('extends test without source maps', { project: projectPath('studio-no-source-maps'), spec: 'extend.spec.js', snapshot: true, @@ -66,7 +64,7 @@ describe('e2e studio', function () { }, }) - e2e.it('creates new test without source maps', { + systemTests.it('creates new test without source maps', { project: projectPath('studio-no-source-maps'), spec: 'new.spec.js', browser: 'electron', diff --git a/packages/server/test/e2e/subdomain_spec.ts b/system-tests/test/subdomain_spec.ts similarity index 96% rename from packages/server/test/e2e/subdomain_spec.ts rename to system-tests/test/subdomain_spec.ts index 0cc7e3930db5..34588ddbf450 100644 --- a/packages/server/test/e2e/subdomain_spec.ts +++ b/system-tests/test/subdomain_spec.ts @@ -1,7 +1,7 @@ import cors from 'cors' import parser from 'cookie-parser' import session from 'express-session' -import e2e from '../support/helpers/e2e' +import systemTests from '../lib/system-tests' const onServer = function (app) { app.use(parser()) @@ -111,14 +111,14 @@ const onServer = function (app) { } describe('e2e subdomain', () => { - e2e.setup({ + systemTests.setup({ servers: { port: 2292, onServer, }, }) - e2e.it('passes', { + systemTests.it('passes', { spec: 'subdomain_spec.js', snapshot: true, config: { diff --git a/packages/server/test/e2e/system_node_spec.js b/system-tests/test/system_node_spec.js similarity index 85% rename from packages/server/test/e2e/system_node_spec.js rename to system-tests/test/system_node_spec.js index 3a0486c354b2..540888776610 100644 --- a/packages/server/test/e2e/system_node_spec.js +++ b/system-tests/test/system_node_spec.js @@ -1,12 +1,12 @@ -const e2e = require('../support/helpers/e2e').default +const systemTests = require('../lib/system-tests').default const execa = require('execa') -const Fixtures = require('../support/helpers/fixtures') +const Fixtures = require('../lib/fixtures') const Promise = require('bluebird') const systemNode = Fixtures.projectPath('system-node') describe('e2e system node', () => { - e2e.setup() + systemTests.setup() it('uses system node when launching plugins file', function () { return Promise.join( @@ -15,7 +15,7 @@ describe('e2e system node', () => { (expectedNodeVersion, expectedNodePath) => { expectedNodeVersion = expectedNodeVersion.slice(1) // v1.2.3 -> 1.2.3 - return e2e.exec(this, { + return systemTests.exec(this, { project: systemNode, config: { env: { diff --git a/packages/server/test/e2e/task_not_registered_spec.js b/system-tests/test/task_not_registered_spec.js similarity index 62% rename from packages/server/test/e2e/task_not_registered_spec.js rename to system-tests/test/task_not_registered_spec.js index 203703d8e5a7..b8312c5e7858 100644 --- a/packages/server/test/e2e/task_not_registered_spec.js +++ b/system-tests/test/task_not_registered_spec.js @@ -1,11 +1,11 @@ -const e2e = require('../support/helpers/e2e').default -const Fixtures = require('../support/helpers/fixtures') +const systemTests = require('../lib/system-tests').default +const Fixtures = require('../lib/fixtures') describe('e2e task', () => { - e2e.setup() + systemTests.setup() it('fails', function () { - return e2e.exec(this, { + return systemTests.exec(this, { project: Fixtures.projectPath('task-not-registered'), spec: 'task_not_registered_spec.js', sanitizeScreenshotDimensions: true, diff --git a/packages/server/test/e2e/task_spec.js b/system-tests/test/task_spec.js similarity index 78% rename from packages/server/test/e2e/task_spec.js rename to system-tests/test/task_spec.js index c5c6965bd964..2ff1d79ce086 100644 --- a/packages/server/test/e2e/task_spec.js +++ b/system-tests/test/task_spec.js @@ -1,11 +1,11 @@ -const e2e = require('../support/helpers/e2e').default -const Fixtures = require('../support/helpers/fixtures') +const systemTests = require('../lib/system-tests').default +const Fixtures = require('../lib/fixtures') describe('e2e task', () => { - e2e.setup() + systemTests.setup() it('handles undefined return and includes stack trace in error', function () { - return e2e.exec(this, { + return systemTests.exec(this, { spec: 'task_spec.js', snapshot: true, expectedExitCode: 2, @@ -21,7 +21,7 @@ describe('e2e task', () => { }) it('merges task events on subsequent registrations and logs warning for conflicts', function () { - return e2e.exec(this, { + return systemTests.exec(this, { project: Fixtures.projectPath('multiple-task-registrations'), spec: 'multiple_task_registrations_spec.js', sanitizeScreenshotDimensions: true, diff --git a/packages/server/test/e2e/testConfigOverrides_spec.ts b/system-tests/test/testConfigOverrides_spec.ts similarity index 71% rename from packages/server/test/e2e/testConfigOverrides_spec.ts rename to system-tests/test/testConfigOverrides_spec.ts index f772d5ee12f7..f4a71b2260c7 100644 --- a/packages/server/test/e2e/testConfigOverrides_spec.ts +++ b/system-tests/test/testConfigOverrides_spec.ts @@ -1,23 +1,23 @@ import fs from 'fs-extra' import path from 'path' -import e2e, { expect } from '../support/helpers/e2e' -import Fixtures from '../support/helpers/fixtures' +import systemTests, { expect } from '../lib/system-tests' +import Fixtures from '../lib/fixtures' const e2ePath = Fixtures.projectPath('e2e') const outputPath = path.join(e2ePath, 'output.json') describe('testConfigOverrides', () => { - e2e.setup() + systemTests.setup() - e2e.it('fails when passing invalid config value browser', { + systemTests.it('fails when passing invalid config value browser', { spec: 'testConfigOverrides-invalid-browser.js', snapshot: true, expectedExitCode: 1, }) - e2e.it('has originalTitle when skip due to browser config', { + systemTests.it('has originalTitle when skip due to browser config', { spec: 'testConfigOverrides-skip-browser.js', snapshot: true, outputPath, diff --git a/packages/server/test/e2e/typescript_plugins_spec.ts b/system-tests/test/typescript_plugins_spec.ts similarity index 76% rename from packages/server/test/e2e/typescript_plugins_spec.ts rename to system-tests/test/typescript_plugins_spec.ts index 17db9bcd1e69..f6aeeea3b651 100644 --- a/packages/server/test/e2e/typescript_plugins_spec.ts +++ b/system-tests/test/typescript_plugins_spec.ts @@ -1,32 +1,32 @@ -import e2e from '../support/helpers/e2e' -import Fixtures from '../support/helpers/fixtures' +import systemTests from '../lib/system-tests' +import Fixtures from '../lib/fixtures' describe('e2e typescript in plugins file', function () { - e2e.setup() + systemTests.setup() it('handles tsconfig with module other than commonjs', function () { - return e2e.exec(this, { + return systemTests.exec(this, { project: Fixtures.projectPath('ts-proj-with-module-esnext'), }) }) // https://github.com/cypress-io/cypress/issues/7575 it('defaults to esModuleInterop: false', function () { - return e2e.exec(this, { + return systemTests.exec(this, { project: Fixtures.projectPath('ts-proj'), }) }) // https://github.com/cypress-io/cypress/issues/7575 it('allows esModuleInterop to be overridden with true via tsconfig.json', function () { - return e2e.exec(this, { + return systemTests.exec(this, { project: Fixtures.projectPath('ts-proj-esmoduleinterop-true'), }) }) // https://github.com/cypress-io/cypress/issues/8359 it('loads tsconfig.json from plugins directory', function () { - return e2e.exec(this, { + return systemTests.exec(this, { project: Fixtures.projectPath('ts-proj-tsconfig-in-plugins'), }) }) diff --git a/packages/server/test/e2e/typescript_spec_support_spec.ts b/system-tests/test/typescript_spec_support_spec.ts similarity index 72% rename from packages/server/test/e2e/typescript_spec_support_spec.ts rename to system-tests/test/typescript_spec_support_spec.ts index 8c85f5ff1ac7..00fc966a6cd5 100644 --- a/packages/server/test/e2e/typescript_spec_support_spec.ts +++ b/system-tests/test/typescript_spec_support_spec.ts @@ -1,29 +1,29 @@ -import e2e from '../support/helpers/e2e' -import Fixtures from '../support/helpers/fixtures' +import systemTests from '../lib/system-tests' +import Fixtures from '../lib/fixtures' describe('e2e typescript in spec and support file', function () { - e2e.setup() + systemTests.setup() it('spec passes', function () { - return e2e.exec(this, { + return systemTests.exec(this, { spec: 'typescript_passing_spec.ts', snapshot: true, }) }) it('spec fails with syntax error', function () { - return e2e.exec(this, { + return systemTests.exec(this, { spec: 'typescript_syntax_error_spec.ts', snapshot: true, expectedExitCode: 1, - onStdout: e2e.normalizeWebpackErrors, + onStdout: systemTests.normalizeWebpackErrors, }) }) it('project passes', function () { const projPath = Fixtures.projectPath('ts-proj') - return e2e.exec(this, { + return systemTests.exec(this, { project: projPath, snapshot: true, }) @@ -33,7 +33,7 @@ describe('e2e typescript in spec and support file', function () { // @see https://github.com/cypress-io/cypress/issues/7006 // @see https://github.com/cypress-io/cypress/issues/8555 it('respects tsconfig paths', function () { - return e2e.exec(this, { + return systemTests.exec(this, { project: Fixtures.projectPath('ts-proj-with-paths'), }) }) diff --git a/packages/server/test/e2e/uncaught_spec_errors_spec.js b/system-tests/test/uncaught_spec_errors_spec.js similarity index 69% rename from packages/server/test/e2e/uncaught_spec_errors_spec.js rename to system-tests/test/uncaught_spec_errors_spec.js index 6bc2926b5e08..a548f1296bc0 100644 --- a/packages/server/test/e2e/uncaught_spec_errors_spec.js +++ b/system-tests/test/uncaught_spec_errors_spec.js @@ -1,33 +1,33 @@ -const e2e = require('../support/helpers/e2e').default +const systemTests = require('../lib/system-tests').default describe('e2e uncaught errors', () => { - e2e.setup() + systemTests.setup() - e2e.it('failing1', { + systemTests.it('failing1', { spec: 'uncaught_synchronous_before_tests_parsed.js', snapshot: true, expectedExitCode: 1, }) - e2e.it('failing2', { + systemTests.it('failing2', { spec: 'uncaught_synchronous_during_hook_spec.js', snapshot: true, expectedExitCode: 1, }) - e2e.it('failing3', { + systemTests.it('failing3', { spec: 'uncaught_during_test_spec.js', snapshot: true, expectedExitCode: 3, }) - e2e.it('failing4', { + systemTests.it('failing4', { spec: 'uncaught_during_hook_spec.js', snapshot: true, expectedExitCode: 1, }) - e2e.it('failing5', { + systemTests.it('failing5', { spec: 'caught_async_sync_test_spec.js', snapshot: true, expectedExitCode: 4, diff --git a/packages/server/test/e2e/uncaught_support_file_spec.js b/system-tests/test/uncaught_support_file_spec.js similarity index 65% rename from packages/server/test/e2e/uncaught_support_file_spec.js rename to system-tests/test/uncaught_support_file_spec.js index d7e496f654e3..d84c9292b1f7 100644 --- a/packages/server/test/e2e/uncaught_support_file_spec.js +++ b/system-tests/test/uncaught_support_file_spec.js @@ -1,13 +1,13 @@ -const e2e = require('../support/helpers/e2e').default -const Fixtures = require('../support/helpers/fixtures') +const systemTests = require('../lib/system-tests').default +const Fixtures = require('../lib/fixtures') const uncaughtSupportFile = Fixtures.projectPath('uncaught-support-file') describe('e2e uncaught support file errors', () => { - e2e.setup() + systemTests.setup() it('failing', function () { - return e2e.exec(this, { + return systemTests.exec(this, { project: uncaughtSupportFile, sanitizeScreenshotDimensions: true, snapshot: true, diff --git a/packages/server/test/e2e/user_agent_spec.js b/system-tests/test/user_agent_spec.js similarity index 83% rename from packages/server/test/e2e/user_agent_spec.js rename to system-tests/test/user_agent_spec.js index 82c2fa857d1e..fa3b1fa0bc50 100644 --- a/packages/server/test/e2e/user_agent_spec.js +++ b/system-tests/test/user_agent_spec.js @@ -1,4 +1,4 @@ -const e2e = require('../support/helpers/e2e').default +const systemTests = require('../lib/system-tests').default const onServer = function (app) { app.get('/agent', (req, res) => { @@ -15,7 +15,7 @@ const onServer = function (app) { } describe('e2e user agent', () => { - e2e.setup({ + systemTests.setup({ servers: { port: 4545, onServer, @@ -26,7 +26,7 @@ describe('e2e user agent', () => { }, }) - e2e.it('passes', { + systemTests.it('passes', { spec: 'user_agent_spec.js', snapshot: true, }) diff --git a/packages/server/test/e2e/video_compression_spec.js b/system-tests/test/video_compression_spec.js similarity index 92% rename from packages/server/test/e2e/video_compression_spec.js rename to system-tests/test/video_compression_spec.js index 45f91a004e4d..4a2a6084b274 100644 --- a/packages/server/test/e2e/video_compression_spec.js +++ b/system-tests/test/video_compression_spec.js @@ -9,10 +9,10 @@ ffmpeg.setFfprobePath(ffprobePath) const path = require('path') const fs = require('fs-extra') const humanInterval = require('human-interval') -const e2e = require('../support/helpers/e2e').default -const glob = require('../../lib/util/glob') -const videoCapture = require('../../lib/video_capture') -const Fixtures = require('../support/helpers/fixtures') +const systemTests = require('../lib/system-tests').default +const glob = require('@packages/server/lib/util/glob') +const videoCapture = require('@packages/server/lib/video_capture') +const Fixtures = require('../lib/fixtures') const NUM_TESTS = 40 const MS_PER_TEST = 500 @@ -31,13 +31,13 @@ function outputFinalFrameAsJpg (inputFile, outputFile) { } describe('e2e video compression', () => { - e2e.setup() + systemTests.setup() return [ true, false, ].forEach((headed) => { - e2e.it(`passes (head${headed ? 'ed' : 'less'})`, { + systemTests.it(`passes (head${headed ? 'ed' : 'less'})`, { // videos are corrupted in firefox due to known issues browser: '!firefox', spec: 'video_compression_spec.js', diff --git a/packages/server/test/e2e/viewport_spec.js b/system-tests/test/viewport_spec.js similarity index 61% rename from packages/server/test/e2e/viewport_spec.js rename to system-tests/test/viewport_spec.js index 17f7167a8c27..9b3f497cad36 100644 --- a/packages/server/test/e2e/viewport_spec.js +++ b/system-tests/test/viewport_spec.js @@ -1,14 +1,14 @@ -const e2e = require('../support/helpers/e2e').default +const systemTests = require('../lib/system-tests').default describe('e2e viewport', () => { - e2e.setup({ + systemTests.setup({ settings: { viewportWidth: 800, viewportHeight: 600, }, }) - e2e.it('passes', { + systemTests.it('passes', { spec: 'viewport_spec.js', snapshot: true, }) diff --git a/packages/server/test/e2e/visit_spec.js b/system-tests/test/visit_spec.js similarity index 87% rename from packages/server/test/e2e/visit_spec.js rename to system-tests/test/visit_spec.js index b5e743af5c6f..c70c44ff87fe 100644 --- a/packages/server/test/e2e/visit_spec.js +++ b/system-tests/test/visit_spec.js @@ -4,7 +4,7 @@ const cert = require('@packages/https-proxy/test/helpers/certs') const https = require('https') const useragent = require('express-useragent') const { allowDestroy } = require('@packages/network') -const e2e = require('../support/helpers/e2e').default +const systemTests = require('../lib/system-tests').default // create an HTTPS server that forces TLSv1 const startTlsV1Server = (port) => { @@ -117,7 +117,7 @@ foo\ describe('e2e visit', () => { context('low response timeout', () => { - e2e.setup({ + systemTests.setup({ settings: { responseTimeout: 500, pageLoadTimeout: 1000, @@ -129,7 +129,7 @@ describe('e2e visit', () => { }, }) - e2e.it('passes', { + systemTests.it('passes', { spec: 'visit_spec.js', snapshot: true, onRun (exec) { @@ -143,7 +143,7 @@ describe('e2e visit', () => { }, }) - e2e.it('passes with experimentalSourceRewriting', { + systemTests.it('passes with experimentalSourceRewriting', { spec: 'source_rewriting_spec.js', config: { experimentalSourceRewriting: true, @@ -160,38 +160,38 @@ describe('e2e visit', () => { }, }) - e2e.it('fails when network connection immediately fails', { + systemTests.it('fails when network connection immediately fails', { spec: 'visit_http_network_error_failing_spec.js', snapshot: true, expectedExitCode: 1, }) - e2e.it('fails when server responds with 500', { + systemTests.it('fails when server responds with 500', { spec: 'visit_http_500_response_failing_spec.js', snapshot: true, expectedExitCode: 1, }) - e2e.it('fails when file server responds with 404', { + systemTests.it('fails when file server responds with 404', { spec: 'visit_file_404_response_failing_spec.js', snapshot: true, expectedExitCode: 1, }) - e2e.it('fails when content type isnt html', { + systemTests.it('fails when content type isnt html', { spec: 'visit_non_html_content_type_failing_spec.js', snapshot: true, expectedExitCode: 1, }) - e2e.it('calls onBeforeLoad when overwriting cy.visit', { + systemTests.it('calls onBeforeLoad when overwriting cy.visit', { snapshot: true, spec: 'issue_2196_spec.js', }) }) context('low responseTimeout, normal pageLoadTimeout', () => { - e2e.setup({ + systemTests.setup({ settings: { responseTimeout: 2000, }, @@ -202,7 +202,7 @@ describe('e2e visit', () => { }, }) - e2e.it('fails when response never ends', { + systemTests.it('fails when response never ends', { spec: 'visit_response_never_ends_failing_spec.js', snapshot: true, expectedExitCode: 3, @@ -210,7 +210,7 @@ describe('e2e visit', () => { }) context('normal response timeouts', () => { - e2e.setup({ + systemTests.setup({ settings: { pageLoadTimeout: 1000, }, @@ -221,7 +221,7 @@ describe('e2e visit', () => { }, }) - e2e.it('fails when visit times out', { + systemTests.it('fails when visit times out', { spec: 'visit_http_timeout_failing_spec.js', snapshot: true, expectedExitCode: 2, diff --git a/packages/server/test/e2e/web_security_spec.js b/system-tests/test/web_security_spec.js similarity index 90% rename from packages/server/test/e2e/web_security_spec.js rename to system-tests/test/web_security_spec.js index dc0da65cf9f1..c87dcb0d3058 100644 --- a/packages/server/test/e2e/web_security_spec.js +++ b/system-tests/test/web_security_spec.js @@ -1,4 +1,4 @@ -const e2e = require('../support/helpers/e2e').default +const systemTests = require('../lib/system-tests').default const onServer = function (app) { app.get('/link', (req, res) => { @@ -51,7 +51,7 @@ const onServer = function (app) { } describe('e2e web security', () => { - e2e.setup({ + systemTests.setup({ servers: [{ port: 4466, onServer, @@ -68,7 +68,7 @@ describe('e2e web security', () => { }) context('when enabled', () => { - e2e.it('fails', { + systemTests.it('fails', { spec: 'web_security_spec.js', snapshot: true, expectedExitCode: 4, @@ -76,7 +76,7 @@ describe('e2e web security', () => { }) context('when disabled', () => { - e2e.it('passes', { + systemTests.it('passes', { spec: 'web_security_spec.js', config: { chromeWebSecurity: false, @@ -87,7 +87,7 @@ describe('e2e web security', () => { }) context('firefox', () => { - e2e.it('displays warning when firefox and chromeWebSecurity:false', { + systemTests.it('displays warning when firefox and chromeWebSecurity:false', { spec: 'simple_passing_spec.js', snapshot: true, browser: 'firefox', diff --git a/packages/server/test/e2e/websockets_spec.js b/system-tests/test/websockets_spec.js similarity index 87% rename from packages/server/test/e2e/websockets_spec.js rename to system-tests/test/websockets_spec.js index d22571dcc891..77846972e339 100644 --- a/packages/server/test/e2e/websockets_spec.js +++ b/system-tests/test/websockets_spec.js @@ -1,6 +1,6 @@ const ws = require('ws') -const e2e = require('../support/helpers/e2e').default +const systemTests = require('../lib/system-tests').default const onServer = (app) => { return app.get('/foo', (req, res) => { @@ -21,7 +21,7 @@ const onWsServer = function (app, server) { const onWssServer = function (app) {} describe('e2e websockets', () => { - e2e.setup({ + systemTests.setup({ servers: [{ port: 3038, static: true, @@ -36,7 +36,7 @@ describe('e2e websockets', () => { }) // https://github.com/cypress-io/cypress/issues/556 - e2e.it('passes', { + systemTests.it('passes', { spec: 'websockets_spec.js', snapshot: true, }) diff --git a/packages/server/test/e2e/window_open_spec.js b/system-tests/test/window_open_spec.js similarity index 67% rename from packages/server/test/e2e/window_open_spec.js rename to system-tests/test/window_open_spec.js index 937f96cca8ad..b8a02a544851 100644 --- a/packages/server/test/e2e/window_open_spec.js +++ b/system-tests/test/window_open_spec.js @@ -1,11 +1,11 @@ -const e2e = require('../support/helpers/e2e').default +const systemTests = require('../lib/system-tests').default describe('e2e window.open', () => { - e2e.setup() + systemTests.setup() // NOTE: skipping this for now due to snap-shot-it monkey patching causing test failures it.skip('passes', function () { - return e2e.exec(this, { + return systemTests.exec(this, { spec: 'window_open_spec.coffee', snapshot: true, }) diff --git a/packages/server/test/e2e/xhr_spec.js b/system-tests/test/xhr_spec.js similarity index 79% rename from packages/server/test/e2e/xhr_spec.js rename to system-tests/test/xhr_spec.js index 046875464a28..5a16f58f7845 100644 --- a/packages/server/test/e2e/xhr_spec.js +++ b/system-tests/test/xhr_spec.js @@ -1,5 +1,5 @@ const bodyParser = require('body-parser') -const e2e = require('../support/helpers/e2e').default +const systemTests = require('../lib/system-tests').default const onServer = function (app) { app.use(bodyParser.json()) @@ -21,19 +21,19 @@ const onServer = function (app) { } describe('e2e xhr', () => { - e2e.setup({ + systemTests.setup({ servers: { port: 1919, onServer, }, }) - e2e.it('passes in global mode', { + systemTests.it('passes in global mode', { spec: 'xhr_spec.js', snapshot: true, }) - e2e.it('passes through CLI', { + systemTests.it('passes through CLI', { spec: 'xhr_spec.js', snapshot: true, useCli: true, diff --git a/packages/server/test/e2e/yarn_v2_pnp_spec.ts b/system-tests/test/yarn_v2_pnp_spec.ts similarity index 80% rename from packages/server/test/e2e/yarn_v2_pnp_spec.ts rename to system-tests/test/yarn_v2_pnp_spec.ts index a7fa14cbc307..0f495724da12 100644 --- a/packages/server/test/e2e/yarn_v2_pnp_spec.ts +++ b/system-tests/test/yarn_v2_pnp_spec.ts @@ -3,8 +3,8 @@ import os from 'os' import path from 'path' import cp from 'child_process' import util from 'util' -import e2e from '../support/helpers/e2e' -import Fixtures from '../support/helpers/fixtures' +import systemTests from '../lib/system-tests' +import Fixtures from '../lib/fixtures' const exec = async (cmd, ...args) => { console.log(`Running "${cmd}"...`) @@ -21,13 +21,15 @@ const exec = async (cmd, ...args) => { return ret } -const fixtureDir = Fixtures.path('projects/yarn-v2-pnp') -const cypressCli = path.join(__dirname, '../../../../cli/bin/cypress') +const fixtureDir = Fixtures.projectPath('yarn-v2-pnp') +const cypressCli = path.join(__dirname, '../../cli/bin/cypress') describe('e2e yarn v2', () => { let projectDir beforeEach(async function () { + Fixtures.scaffold() + this.timeout(240000) // copy yarn-v2 to tmpdir so node_modules resolution won't fall back to project root @@ -42,7 +44,7 @@ describe('e2e yarn v2', () => { await projectExec('yarn') }) - e2e.it('can compile plugin and test specs', { + systemTests.it('can compile plugin and test specs', { snapshot: false, command: 'yarn', browser: 'electron', From 2a7578fede144ba916baeaf088bd9f5be6d5db9e Mon Sep 17 00:00:00 2001 From: "cypress-bot[bot]" <2f0651858c6e38e0+cypress-bot[bot]@users.noreply.github.com> Date: Tue, 19 Oct 2021 08:01:11 +0000 Subject: [PATCH 13/27] chore: Update Chrome (beta) to 95.0.4638.54 --- browser-versions.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/browser-versions.json b/browser-versions.json index 8d3572d7486d..dd61d1e384f7 100644 --- a/browser-versions.json +++ b/browser-versions.json @@ -1,4 +1,4 @@ { - "chrome:beta": "95.0.4638.49", + "chrome:beta": "95.0.4638.54", "chrome:stable": "94.0.4606.81" } From ea1079559473fc672b5e0e188b5b54bf8ebe2f98 Mon Sep 17 00:00:00 2001 From: Mohamed E Date: Tue, 19 Oct 2021 20:54:49 +0200 Subject: [PATCH 14/27] fix(cypress/react): disable react-refresh for craco setups (#18517) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Co-authored-by: Barthélémy Ledoux --- npm/react/plugins/craco/index.js | 2 ++ 1 file changed, 2 insertions(+) diff --git a/npm/react/plugins/craco/index.js b/npm/react/plugins/craco/index.js index e86ff6e3d395..d1a90301d3bd 100644 --- a/npm/react/plugins/craco/index.js +++ b/npm/react/plugins/craco/index.js @@ -3,6 +3,8 @@ const { createWebpackDevConfig } = require('@craco/craco') const { getLegacyDevServer } = require('../utils/legacy-setup-dev-server') function devServer (cypressDevServerConfig, cracoConfig) { + process.env.FAST_REFRESH = 'false' + return startDevServer({ options: cypressDevServerConfig, webpackConfig: createWebpackDevConfig(cracoConfig), From a51ea0c6189a68dd91088b8250b9d1770486646c Mon Sep 17 00:00:00 2001 From: David Munechika Date: Wed, 20 Oct 2021 11:53:14 -0400 Subject: [PATCH 15/27] fix: Electron video not playable in Firefox/Safari browsers or Quicktime player (#18530) Co-authored-by: Emily Rohrbough --- packages/server/lib/video_capture.ts | 1 + 1 file changed, 1 insertion(+) diff --git a/packages/server/lib/video_capture.ts b/packages/server/lib/video_capture.ts index bccd7b4be876..27a0a8eaf3ce 100644 --- a/packages/server/lib/video_capture.ts +++ b/packages/server/lib/video_capture.ts @@ -297,6 +297,7 @@ export async function process (name, cname, videoCompression, ffmpegchaptersConf const outputOptions = [ '-preset fast', `-crf ${videoCompression}`, + '-pix_fmt yuv420p', ] if (addChaptersMeta) { From f616aa22c1d7e23a2c3418900521e29f043be31c Mon Sep 17 00:00:00 2001 From: mjhenkes Date: Wed, 20 Oct 2021 12:38:51 -0500 Subject: [PATCH 16/27] fix: validate selectorPriority configuration --- .../cypress/selector_playground_spec.js | 43 ++++++++++++++++++- packages/driver/src/cypress/error_messages.ts | 6 ++- .../driver/src/cypress/selector_playground.ts | 21 ++++++--- 3 files changed, 61 insertions(+), 9 deletions(-) diff --git a/packages/driver/cypress/integration/cypress/selector_playground_spec.js b/packages/driver/cypress/integration/cypress/selector_playground_spec.js index e45fabc4ddc9..89c3dd764beb 100644 --- a/packages/driver/cypress/integration/cypress/selector_playground_spec.js +++ b/packages/driver/cypress/integration/cypress/selector_playground_spec.js @@ -23,11 +23,50 @@ describe('src/cypress/selector_playground', () => { }) it('sets selector:playground:priority if selectorPriority specified', () => { + const selectorPriority = [ + 'data-1', + 'data-2', + 'id', + 'class', + 'tag', + 'attributes', + 'nth-child', + ] + SelectorPlayground.defaults({ - selectorPriority: ['foo'], + selectorPriority, }) - expect(SelectorPlayground.getSelectorPriority()).to.eql(['foo']) + expect(SelectorPlayground.getSelectorPriority()).to.eql(selectorPriority) + }) + + it('throws if selector:playground:priority if selectorPriority contains an unsupported priority', () => { + const fn = () => { + SelectorPlayground.defaults({ + selectorPriority: [ + 'id', + 'name', + ], + }) + } + + expect(fn).to.throw() + .with.property('message') + .and.include('`Cypress.SelectorPlayground.defaults()` called with invalid `selectorPriority` property. It must be one of: `data-*`, `id`, `class`, `tag`, `attributes`, `nth-child`. You passed: `name`') + }) + + it('throws if selector:playground:priority if selectorPriority contains an unsupported priority that contains a valid priority', () => { + const fn = () => { + SelectorPlayground.defaults({ + selectorPriority: [ + 'idIsNotValid', + ], + }) + } + + expect(fn).to.throw() + .with.property('message') + .and.include('`Cypress.SelectorPlayground.defaults()` called with invalid `selectorPriority` property. It must be one of: `data-*`, `id`, `class`, `tag`, `attributes`, `nth-child`. You passed: `idIsNotValid`') }) it('sets selector:playground:on:element if onElement specified', () => { diff --git a/packages/driver/src/cypress/error_messages.ts b/packages/driver/src/cypress/error_messages.ts index 3438c3b79581..bdbc6350ce88 100644 --- a/packages/driver/src/cypress/error_messages.ts +++ b/packages/driver/src/cypress/error_messages.ts @@ -1428,10 +1428,14 @@ export default { message: '`Cypress.SelectorPlayground.defaults()` must be called with an object. You passed: `{{arg}}`', docsUrl: 'https://on.cypress.io/selector-playground-api', }, - defaults_invalid_priority: { + defaults_invalid_priority_type: { message: '`Cypress.SelectorPlayground.defaults()` called with invalid `selectorPriority` property. It must be an array. You passed: `{{arg}}`', docsUrl: 'https://on.cypress.io/selector-playground-api', }, + defaults_invalid_priority: { + message: '`Cypress.SelectorPlayground.defaults()` called with invalid `selectorPriority` property. It must be one of: `data-*`, `id`, `class`, `tag`, `attributes`, `nth-child`. You passed: `{{arg}}`. Consider using the `onElement` property if a specific selector is desired.', + docsUrl: 'https://on.cypress.io/selector-playground-api', + }, defaults_invalid_on_element: { message: '`Cypress.SelectorPlayground.defaults()` called with invalid `onElement` property. It must be a function. You passed: `{{arg}}`', docsUrl: 'https://on.cypress.io/selector-playground-api', diff --git a/packages/driver/src/cypress/selector_playground.ts b/packages/driver/src/cypress/selector_playground.ts index b3aadf9234b3..35fe910918ad 100644 --- a/packages/driver/src/cypress/selector_playground.ts +++ b/packages/driver/src/cypress/selector_playground.ts @@ -58,16 +58,25 @@ export default { }) } - const { selectorPriority: priority, onElement } = props + const { selectorPriority, onElement } = props - if (priority) { - if (!_.isArray(priority)) { - $errUtils.throwErrByPath('selector_playground.defaults_invalid_priority', { - args: { arg: $utils.stringify(priority) }, + if (selectorPriority) { + if (!_.isArray(selectorPriority)) { + $errUtils.throwErrByPath('selector_playground.defaults_invalid_priority_type', { + args: { arg: $utils.stringify(selectorPriority) }, }) } + // Validate that the priority is on of: "data-*", "id", "class", "tag", "attributes", "nth-child" + + selectorPriority.forEach((priority) => { + if (!priority.match(/^(data\-.*|id|class|tag|attributes|nth\-child)$/)) { + $errUtils.throwErrByPath('selector_playground.defaults_invalid_priority', { + args: { arg: priority }, + }) + } + }) - defaults.selectorPriority = priority + defaults.selectorPriority = selectorPriority } if (onElement) { From e884ae5f1c64f12b884acb58ce82771c54961c54 Mon Sep 17 00:00:00 2001 From: Matt Henkes Date: Wed, 20 Oct 2021 11:19:43 -0700 Subject: [PATCH 17/27] Update packages/driver/src/cypress/selector_playground.ts Co-authored-by: Emily Rohrbough --- packages/driver/src/cypress/selector_playground.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/driver/src/cypress/selector_playground.ts b/packages/driver/src/cypress/selector_playground.ts index 35fe910918ad..27df9ca12e1e 100644 --- a/packages/driver/src/cypress/selector_playground.ts +++ b/packages/driver/src/cypress/selector_playground.ts @@ -66,7 +66,7 @@ export default { args: { arg: $utils.stringify(selectorPriority) }, }) } - // Validate that the priority is on of: "data-*", "id", "class", "tag", "attributes", "nth-child" + // Validate that the priority is one of: "data-*", "id", "class", "tag", "attributes", "nth-child" selectorPriority.forEach((priority) => { if (!priority.match(/^(data\-.*|id|class|tag|attributes|nth\-child)$/)) { From 2be65ce427cbdc732638fe7bbd4f7df6b5e51633 Mon Sep 17 00:00:00 2001 From: mjhenkes Date: Wed, 20 Oct 2021 13:33:46 -0500 Subject: [PATCH 18/27] update test name --- .../cypress/integration/cypress/selector_playground_spec.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/driver/cypress/integration/cypress/selector_playground_spec.js b/packages/driver/cypress/integration/cypress/selector_playground_spec.js index 89c3dd764beb..7c8555b91a77 100644 --- a/packages/driver/cypress/integration/cypress/selector_playground_spec.js +++ b/packages/driver/cypress/integration/cypress/selector_playground_spec.js @@ -55,7 +55,7 @@ describe('src/cypress/selector_playground', () => { .and.include('`Cypress.SelectorPlayground.defaults()` called with invalid `selectorPriority` property. It must be one of: `data-*`, `id`, `class`, `tag`, `attributes`, `nth-child`. You passed: `name`') }) - it('throws if selector:playground:priority if selectorPriority contains an unsupported priority that contains a valid priority', () => { + it('throws if selector:playground:priority has an unsupported priority that contains a substring of a valid priority', () => { const fn = () => { SelectorPlayground.defaults({ selectorPriority: [ From 1ae3e29732c37ae4e646c0d26f3ed628b94f3e0e Mon Sep 17 00:00:00 2001 From: Matt Henkes Date: Thu, 21 Oct 2021 06:14:20 -0700 Subject: [PATCH 19/27] Apply suggestions from code review Co-authored-by: Chris Breiding --- .../cypress/integration/cypress/selector_playground_spec.js | 4 ++-- packages/driver/src/cypress/selector_playground.ts | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/packages/driver/cypress/integration/cypress/selector_playground_spec.js b/packages/driver/cypress/integration/cypress/selector_playground_spec.js index 7c8555b91a77..dffc390dcb89 100644 --- a/packages/driver/cypress/integration/cypress/selector_playground_spec.js +++ b/packages/driver/cypress/integration/cypress/selector_playground_spec.js @@ -40,7 +40,7 @@ describe('src/cypress/selector_playground', () => { expect(SelectorPlayground.getSelectorPriority()).to.eql(selectorPriority) }) - it('throws if selector:playground:priority if selectorPriority contains an unsupported priority', () => { + it('throws if selectorPriority contains an unsupported priority', () => { const fn = () => { SelectorPlayground.defaults({ selectorPriority: [ @@ -55,7 +55,7 @@ describe('src/cypress/selector_playground', () => { .and.include('`Cypress.SelectorPlayground.defaults()` called with invalid `selectorPriority` property. It must be one of: `data-*`, `id`, `class`, `tag`, `attributes`, `nth-child`. You passed: `name`') }) - it('throws if selector:playground:priority has an unsupported priority that contains a substring of a valid priority', () => { + it('throws if selectorPriority has an unsupported priority that contains a substring of a valid priority', () => { const fn = () => { SelectorPlayground.defaults({ selectorPriority: [ diff --git a/packages/driver/src/cypress/selector_playground.ts b/packages/driver/src/cypress/selector_playground.ts index 27df9ca12e1e..60cf9e1446e7 100644 --- a/packages/driver/src/cypress/selector_playground.ts +++ b/packages/driver/src/cypress/selector_playground.ts @@ -69,7 +69,7 @@ export default { // Validate that the priority is one of: "data-*", "id", "class", "tag", "attributes", "nth-child" selectorPriority.forEach((priority) => { - if (!priority.match(/^(data\-.*|id|class|tag|attributes|nth\-child)$/)) { + if (!/^(data\-.*|id|class|tag|attributes|nth\-child)$/.test(priority)) { $errUtils.throwErrByPath('selector_playground.defaults_invalid_priority', { args: { arg: priority }, }) From 94a32611ae5a485b8292bed69044f20b562702c9 Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" <41898282+github-actions[bot]@users.noreply.github.com> Date: Thu, 21 Oct 2021 08:54:50 -0500 Subject: [PATCH 20/27] chore: Update Chrome (stable) to 95.0.4638.54 (#18563) Co-authored-by: cypress-bot[bot] <2f0651858c6e38e0+cypress-bot[bot]@users.noreply.github.com> --- browser-versions.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/browser-versions.json b/browser-versions.json index dd61d1e384f7..c471c41893d8 100644 --- a/browser-versions.json +++ b/browser-versions.json @@ -1,4 +1,4 @@ { "chrome:beta": "95.0.4638.54", - "chrome:stable": "94.0.4606.81" + "chrome:stable": "95.0.4638.54" } From 1bf9406668e8a0c962e49edb253488e091934c60 Mon Sep 17 00:00:00 2001 From: Cesar Avitia Date: Fri, 22 Oct 2021 14:40:13 -0700 Subject: [PATCH 21/27] pin ua-parser-js to non compromised version --- package.json | 1 + yarn.lock | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/package.json b/package.json index 9b9045505a5f..4a27a215f7ab 100644 --- a/package.json +++ b/package.json @@ -247,6 +247,7 @@ "**/jquery": "3.1.1", "**/pretty-format": "26.4.0", "**/socket.io-parser": "4.0.4", + "**/ua-parser-js": "0.7.24", "vue-template-compiler": "2.6.12" } } diff --git a/yarn.lock b/yarn.lock index 5726d7032d60..559cc1c7f703 100644 --- a/yarn.lock +++ b/yarn.lock @@ -38354,7 +38354,7 @@ typescript@^3.9.7: resolved "https://registry.yarnpkg.com/typescript/-/typescript-3.9.9.tgz#e69905c54bc0681d0518bd4d587cc6f2d0b1a674" integrity sha512-kdMjTiekY+z/ubJCATUPlRDl39vXYiMV9iyeMuEuXZh2we6zz80uovNN2WlAxmmdE/Z/YQe+EbOEXB5RHEED3w== -ua-parser-js@^0.7.18: +ua-parser-js@0.7.24, ua-parser-js@^0.7.18: version "0.7.24" resolved "https://registry.yarnpkg.com/ua-parser-js/-/ua-parser-js-0.7.24.tgz#8d3ecea46ed4f1f1d63ec25f17d8568105dc027c" integrity sha512-yo+miGzQx5gakzVK3QFfN0/L9uVhosXBBO7qmnk7c2iw1IhL212wfA3zbnI54B0obGwC/5NWub/iT9sReMx+Fw== From ffdb1882556ef055122716552a60c04ad82fbf52 Mon Sep 17 00:00:00 2001 From: Cesar Avitia Date: Fri, 22 Oct 2021 15:59:45 -0700 Subject: [PATCH 22/27] Revert "pin ua-parser-js to non compromised version" This reverts commit 1bf9406668e8a0c962e49edb253488e091934c60. --- package.json | 1 - yarn.lock | 2 +- 2 files changed, 1 insertion(+), 2 deletions(-) diff --git a/package.json b/package.json index 4a27a215f7ab..9b9045505a5f 100644 --- a/package.json +++ b/package.json @@ -247,7 +247,6 @@ "**/jquery": "3.1.1", "**/pretty-format": "26.4.0", "**/socket.io-parser": "4.0.4", - "**/ua-parser-js": "0.7.24", "vue-template-compiler": "2.6.12" } } diff --git a/yarn.lock b/yarn.lock index 559cc1c7f703..5726d7032d60 100644 --- a/yarn.lock +++ b/yarn.lock @@ -38354,7 +38354,7 @@ typescript@^3.9.7: resolved "https://registry.yarnpkg.com/typescript/-/typescript-3.9.9.tgz#e69905c54bc0681d0518bd4d587cc6f2d0b1a674" integrity sha512-kdMjTiekY+z/ubJCATUPlRDl39vXYiMV9iyeMuEuXZh2we6zz80uovNN2WlAxmmdE/Z/YQe+EbOEXB5RHEED3w== -ua-parser-js@0.7.24, ua-parser-js@^0.7.18: +ua-parser-js@^0.7.18: version "0.7.24" resolved "https://registry.yarnpkg.com/ua-parser-js/-/ua-parser-js-0.7.24.tgz#8d3ecea46ed4f1f1d63ec25f17d8568105dc027c" integrity sha512-yo+miGzQx5gakzVK3QFfN0/L9uVhosXBBO7qmnk7c2iw1IhL212wfA3zbnI54B0obGwC/5NWub/iT9sReMx+Fw== From dcefd77b052b2deec0b9ad0bd29cb16635f50d94 Mon Sep 17 00:00:00 2001 From: Cesar Date: Fri, 22 Oct 2021 17:05:50 -0700 Subject: [PATCH 23/27] fix: pin ua-parser-js to non compromised version (#18611) --- package.json | 1 + yarn.lock | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/package.json b/package.json index 9b9045505a5f..4a27a215f7ab 100644 --- a/package.json +++ b/package.json @@ -247,6 +247,7 @@ "**/jquery": "3.1.1", "**/pretty-format": "26.4.0", "**/socket.io-parser": "4.0.4", + "**/ua-parser-js": "0.7.24", "vue-template-compiler": "2.6.12" } } diff --git a/yarn.lock b/yarn.lock index 5726d7032d60..559cc1c7f703 100644 --- a/yarn.lock +++ b/yarn.lock @@ -38354,7 +38354,7 @@ typescript@^3.9.7: resolved "https://registry.yarnpkg.com/typescript/-/typescript-3.9.9.tgz#e69905c54bc0681d0518bd4d587cc6f2d0b1a674" integrity sha512-kdMjTiekY+z/ubJCATUPlRDl39vXYiMV9iyeMuEuXZh2we6zz80uovNN2WlAxmmdE/Z/YQe+EbOEXB5RHEED3w== -ua-parser-js@^0.7.18: +ua-parser-js@0.7.24, ua-parser-js@^0.7.18: version "0.7.24" resolved "https://registry.yarnpkg.com/ua-parser-js/-/ua-parser-js-0.7.24.tgz#8d3ecea46ed4f1f1d63ec25f17d8568105dc027c" integrity sha512-yo+miGzQx5gakzVK3QFfN0/L9uVhosXBBO7qmnk7c2iw1IhL212wfA3zbnI54B0obGwC/5NWub/iT9sReMx+Fw== From 252be9e26e6a9d46b9269ea88efeffa5b0cd30db Mon Sep 17 00:00:00 2001 From: Emily Rohrbough Date: Mon, 25 Oct 2021 09:41:03 -0500 Subject: [PATCH 24/27] chore(server): align test folder structure to src folder structure (#18597) --- packages/server/lib/config.ts | 14 +----- packages/server/lib/util/config.ts | 17 +++++-- .../test/unit/browsers/browsers_spec.js | 2 +- packages/server/test/unit/config_spec.js | 22 --------- .../server/test/unit/{ => util}/args_spec.js | 6 +-- .../test/unit/{ => util}/cache_buster_spec.js | 4 +- .../unit/{ => util}/chrome_policy_check.js | 4 +- .../test/unit/{ => util}/ci_provider_spec.js | 4 +- .../test/unit/{ => util}/coerce_spec.js | 6 +-- packages/server/test/unit/util/config_spec.js | 48 +++++++++++++++++++ .../test/unit/{ => util}/duration_spec.js | 4 +- .../test/unit/{ => util}/ensure_url_spec.ts | 4 +- .../server/test/unit/{ => util}/file_spec.js | 10 ++-- .../test/unit/{ => util}/human_time_spec.js | 4 +- .../test/unit/{ => util}/newlines_spec.ts | 4 +- .../server/test/unit/{ => util}/open_spec.js | 4 +- .../test/unit/{ => util}/origin_spec.js | 4 +- .../test/unit/{ => util}/path_helpers_spec.js | 4 +- .../unit/{ => util}/profile_cleaner_spec.js | 8 ++-- .../test/unit/{ => util}/random_spec.js | 4 +- .../routes_spec.js} | 4 +- .../server/test/unit/{ => util}/specs_spec.js | 6 +-- .../unit/{ => util}/stream_buffer_spec.js | 4 +- .../unit/{ => util}/suppress_warnings_spec.ts | 6 +-- .../test/unit/{ => util}/terminal_spec.js | 8 ++-- .../server/test/unit/{ => util}/trash_spec.js | 4 +- .../server/test/unit/{ => util}/tty_spec.js | 6 +-- 27 files changed, 118 insertions(+), 97 deletions(-) rename packages/server/test/unit/{ => util}/args_spec.js (99%) rename packages/server/test/unit/{ => util}/cache_buster_spec.js (85%) rename packages/server/test/unit/{ => util}/chrome_policy_check.js (94%) rename packages/server/test/unit/{ => util}/ci_provider_spec.js (99%) rename packages/server/test/unit/{ => util}/coerce_spec.js (94%) create mode 100644 packages/server/test/unit/util/config_spec.js rename packages/server/test/unit/{ => util}/duration_spec.js (88%) rename packages/server/test/unit/{ => util}/ensure_url_spec.ts (95%) rename packages/server/test/unit/{ => util}/file_spec.js (97%) rename packages/server/test/unit/{ => util}/human_time_spec.js (93%) rename packages/server/test/unit/{ => util}/newlines_spec.ts (83%) rename packages/server/test/unit/{ => util}/open_spec.js (92%) rename packages/server/test/unit/{ => util}/origin_spec.js (85%) rename packages/server/test/unit/{ => util}/path_helpers_spec.js (84%) rename packages/server/test/unit/{ => util}/profile_cleaner_spec.js (92%) rename packages/server/test/unit/{ => util}/random_spec.js (88%) rename packages/server/test/unit/{routes_util_spec.js => util/routes_spec.js} (93%) rename packages/server/test/unit/{ => util}/specs_spec.js (97%) rename packages/server/test/unit/{ => util}/stream_buffer_spec.js (98%) rename packages/server/test/unit/{ => util}/suppress_warnings_spec.ts (87%) rename packages/server/test/unit/{ => util}/terminal_spec.js (94%) rename packages/server/test/unit/{ => util}/trash_spec.js (96%) rename packages/server/test/unit/{ => util}/tty_spec.js (95%) diff --git a/packages/server/lib/config.ts b/packages/server/lib/config.ts index 17aad0a1a06c..16e460e93e94 100644 --- a/packages/server/lib/config.ts +++ b/packages/server/lib/config.ts @@ -17,7 +17,7 @@ import findSystemNode from './util/find_system_node' const debug = Debug('cypress:server:config') import { options, breakingOptions } from './config_options' -import { getProcessEnvVars } from './util/config' +import { getProcessEnvVars, CYPRESS_SPECIAL_ENV_VARS } from './util/config' export const RESOLVED_FROM = ['plugin', 'env', 'default', 'runtime', 'config'] as const @@ -32,18 +32,6 @@ export type ResolvedConfigurationOptions = Partial<{ [x in keyof Cypress.ResolvedConfigOptions]: ResolvedFromConfig }> -export const CYPRESS_ENV_PREFIX = 'CYPRESS_' - -export const CYPRESS_ENV_PREFIX_LENGTH = 'CYPRESS_'.length - -export const CYPRESS_RESERVED_ENV_VARS = [ - 'CYPRESS_INTERNAL_ENV', -] - -export const CYPRESS_SPECIAL_ENV_VARS = [ - 'RECORD_KEY', -] - const dashesOrUnderscoresRe = /^(_-)+/ // takes an array and creates an index object of [keyKey]: [valueKey] diff --git a/packages/server/lib/util/config.ts b/packages/server/lib/util/config.ts index 06bae0dbae87..0bb4c8e7eec5 100644 --- a/packages/server/lib/util/config.ts +++ b/packages/server/lib/util/config.ts @@ -1,11 +1,18 @@ import _ from 'lodash' -import { - CYPRESS_ENV_PREFIX, - CYPRESS_ENV_PREFIX_LENGTH, - CYPRESS_RESERVED_ENV_VARS, -} from '../config' import { coerce } from './coerce' +export const CYPRESS_ENV_PREFIX = 'CYPRESS_' + +export const CYPRESS_ENV_PREFIX_LENGTH = 'CYPRESS_'.length + +export const CYPRESS_RESERVED_ENV_VARS = [ + 'CYPRESS_INTERNAL_ENV', +] + +export const CYPRESS_SPECIAL_ENV_VARS = [ + 'RECORD_KEY', +] + export const isDefault = (config: Record, prop: string) => { return config.resolved[prop].from === 'default' } diff --git a/packages/server/test/unit/browsers/browsers_spec.js b/packages/server/test/unit/browsers/browsers_spec.js index 96235f1b1870..4633589351d5 100644 --- a/packages/server/test/unit/browsers/browsers_spec.js +++ b/packages/server/test/unit/browsers/browsers_spec.js @@ -5,7 +5,7 @@ const utils = require(`${root}../lib/browsers/utils`) const snapshot = require('snap-shot-it') const normalizeBrowsers = (message) => { - return message.replace(/(found are: ).*/, '$1chrome, firefox, electron') + return message.replace(/(found on your system are:)((\n.*)*)/, '$1\n- chrome\n- firefox\n- electron') } // When we added component testing mode, we added the option for electron to be omitted diff --git a/packages/server/test/unit/config_spec.js b/packages/server/test/unit/config_spec.js index 8a712138ffd8..76b0819510b0 100644 --- a/packages/server/test/unit/config_spec.js +++ b/packages/server/test/unit/config_spec.js @@ -2412,25 +2412,3 @@ describe('lib/config', () => { }) }) }) - -describe('lib/util/config', () => { - context('.isDefault', () => { - it('returns true if value is default value', () => { - settings = { baseUrl: null } - const defaults = { baseUrl: null } - const resolved = {} - const merged = config.setResolvedConfigValues(settings, defaults, resolved) - - expect(configUtil.isDefault(merged, 'baseUrl')).to.be.true - }) - - it('returns false if value is not default value', () => { - settings = { baseUrl: null } - const defaults = { baseUrl: 'http://localhost:8080' } - const resolved = {} - const merged = config.setResolvedConfigValues(settings, defaults, resolved) - - expect(configUtil.isDefault(merged, 'baseUrl')).to.be.false - }) - }) -}) diff --git a/packages/server/test/unit/args_spec.js b/packages/server/test/unit/util/args_spec.js similarity index 99% rename from packages/server/test/unit/args_spec.js rename to packages/server/test/unit/util/args_spec.js index 6b92bdddefb1..06309170e967 100644 --- a/packages/server/test/unit/args_spec.js +++ b/packages/server/test/unit/util/args_spec.js @@ -1,12 +1,12 @@ -require('../spec_helper') +require('../../spec_helper') const path = require('path') const os = require('os') const snapshot = require('snap-shot-it') const stripAnsi = require('strip-ansi') const minimist = require('minimist') -const argsUtil = require(`${root}lib/util/args`) -const getWindowsProxyUtil = require(`${root}lib/util/get-windows-proxy`) +const argsUtil = require(`${root}../lib/util/args`) +const getWindowsProxyUtil = require(`${root}../lib/util/get-windows-proxy`) const cwd = process.cwd() diff --git a/packages/server/test/unit/cache_buster_spec.js b/packages/server/test/unit/util/cache_buster_spec.js similarity index 85% rename from packages/server/test/unit/cache_buster_spec.js rename to packages/server/test/unit/util/cache_buster_spec.js index eb981877b1df..4c8ee580c128 100644 --- a/packages/server/test/unit/cache_buster_spec.js +++ b/packages/server/test/unit/util/cache_buster_spec.js @@ -1,6 +1,6 @@ -require('../spec_helper') +require('../../spec_helper') -const CacheBuster = require(`${root}lib/util/cache_buster`) +const CacheBuster = require(`${root}../lib/util/cache_buster`) describe('lib/cache_buster', () => { context('#get', () => { diff --git a/packages/server/test/unit/chrome_policy_check.js b/packages/server/test/unit/util/chrome_policy_check.js similarity index 94% rename from packages/server/test/unit/chrome_policy_check.js rename to packages/server/test/unit/util/chrome_policy_check.js index a576044ef6e6..449f39b681c5 100644 --- a/packages/server/test/unit/chrome_policy_check.js +++ b/packages/server/test/unit/util/chrome_policy_check.js @@ -1,8 +1,8 @@ -require('../spec_helper') +require('../../spec_helper') const _ = require('lodash') const { stripIndent } = require('common-tags') -const chromePolicyCheck = require(`${root}lib/util/chrome_policy_check`) +const chromePolicyCheck = require(`${root}../lib/util/chrome_policy_check`) describe('lib/util/chrome_policy_check', () => { context('.getRunner returns a function', () => { diff --git a/packages/server/test/unit/ci_provider_spec.js b/packages/server/test/unit/util/ci_provider_spec.js similarity index 99% rename from packages/server/test/unit/ci_provider_spec.js rename to packages/server/test/unit/util/ci_provider_spec.js index 5fbaf29d55da..77e2c1e12827 100644 --- a/packages/server/test/unit/ci_provider_spec.js +++ b/packages/server/test/unit/util/ci_provider_spec.js @@ -1,8 +1,8 @@ const mockedEnv = require('mocked-env') -require('../spec_helper') +require('../../spec_helper') -const ciProvider = require(`${root}lib/util/ci_provider`) +const ciProvider = require(`${root}../lib/util/ci_provider`) const expectsName = (name) => { expect(ciProvider.provider(), 'CI providers detected name').to.eq(name) diff --git a/packages/server/test/unit/coerce_spec.js b/packages/server/test/unit/util/coerce_spec.js similarity index 94% rename from packages/server/test/unit/coerce_spec.js rename to packages/server/test/unit/util/coerce_spec.js index d1e33d7246c2..b6b58a7898d6 100644 --- a/packages/server/test/unit/coerce_spec.js +++ b/packages/server/test/unit/util/coerce_spec.js @@ -1,7 +1,7 @@ -require('../spec_helper') +require('../../spec_helper') -const { coerce } = require(`${root}lib/util/coerce`) -const { getProcessEnvVars } = require(`${root}lib/util/config`) +const { coerce } = require(`${root}../lib/util/coerce`) +const { getProcessEnvVars } = require(`${root}../lib/util/config`) describe('lib/util/coerce', () => { beforeEach(function () { diff --git a/packages/server/test/unit/util/config_spec.js b/packages/server/test/unit/util/config_spec.js new file mode 100644 index 000000000000..aaa99ab53e32 --- /dev/null +++ b/packages/server/test/unit/util/config_spec.js @@ -0,0 +1,48 @@ +require('../../spec_helper') + +const configUtil = require(`${root}../lib/util/config`) + +describe('lib/util/config', () => { + context('.isDefault', () => { + it('returns true if value is default value', () => { + const options = { + resolved: { + baseUrl: { from: 'default' }, + }, + } + + expect(configUtil.isDefault(options, 'baseUrl')).to.be.true + }) + + it('returns false if value is not default value', () => { + const options = { + resolved: { + baseUrl: { from: 'cli' }, + }, + } + + expect(configUtil.isDefault(options, 'baseUrl')).to.be.false + }) + }) + + context('.getProcessEnvVars', () => { + it('returns process envs prefixed with cypress', () => { + const envs = { + CYPRESS_BASE_URL: 'value', + RANDOM_ENV: 'ignored', + } + + expect(configUtil.getProcessEnvVars(envs)).to.deep.eq({ + BASE_URL: 'value', + }) + }) + + it('does not return CYPRESS_RESERVED_ENV_VARS', () => { + const envs = { + CYPRESS_INTERNAL_ENV: 'value', + } + + expect(configUtil.getProcessEnvVars(envs)).to.deep.eq({}) + }) + }) +}) diff --git a/packages/server/test/unit/duration_spec.js b/packages/server/test/unit/util/duration_spec.js similarity index 88% rename from packages/server/test/unit/duration_spec.js rename to packages/server/test/unit/util/duration_spec.js index 251b567ee188..6c23bc939fd0 100644 --- a/packages/server/test/unit/duration_spec.js +++ b/packages/server/test/unit/util/duration_spec.js @@ -1,6 +1,6 @@ -require('../spec_helper') +require('../../spec_helper') -const duration = require(`${root}lib/util/duration`) +const duration = require(`${root}../lib/util/duration`) describe('lib/util/duration', () => { context('.format', () => { diff --git a/packages/server/test/unit/ensure_url_spec.ts b/packages/server/test/unit/util/ensure_url_spec.ts similarity index 95% rename from packages/server/test/unit/ensure_url_spec.ts rename to packages/server/test/unit/util/ensure_url_spec.ts index b80aa01171aa..47c8af1904e1 100644 --- a/packages/server/test/unit/ensure_url_spec.ts +++ b/packages/server/test/unit/util/ensure_url_spec.ts @@ -1,7 +1,7 @@ -import '../spec_helper' +import '../../spec_helper' import { connect, agent } from '@packages/network' -import { isListening } from '../../lib/util/ensure-url' +import { isListening } from '../../../lib/util/ensure-url' import sinon from 'sinon' import nock from 'nock' diff --git a/packages/server/test/unit/file_spec.js b/packages/server/test/unit/util/file_spec.js similarity index 97% rename from packages/server/test/unit/file_spec.js rename to packages/server/test/unit/util/file_spec.js index fded35dcebc5..f126b7238fd6 100644 --- a/packages/server/test/unit/file_spec.js +++ b/packages/server/test/unit/util/file_spec.js @@ -1,13 +1,13 @@ -require('../spec_helper') +require('../../spec_helper') const os = require('os') const path = require('path') const Promise = require('bluebird') const lockFile = Promise.promisifyAll(require('lockfile')) -const { fs } = require(`${root}lib/util/fs`) -const env = require(`${root}lib/util/env`) -const exit = require(`${root}lib/util/exit`) -const FileUtil = require(`${root}lib/util/file`) +const { fs } = require(`${root}../lib/util/fs`) +const env = require(`${root}../lib/util/env`) +const exit = require(`${root}../lib/util/exit`) +const FileUtil = require(`${root}../lib/util/file`) describe('lib/util/file', () => { beforeEach(function () { diff --git a/packages/server/test/unit/human_time_spec.js b/packages/server/test/unit/util/human_time_spec.js similarity index 93% rename from packages/server/test/unit/human_time_spec.js rename to packages/server/test/unit/util/human_time_spec.js index c61bd1148cda..d93710a31174 100644 --- a/packages/server/test/unit/human_time_spec.js +++ b/packages/server/test/unit/util/human_time_spec.js @@ -1,7 +1,7 @@ -require('../spec_helper') +require('../../spec_helper') const humanInterval = require('human-interval') -const humanTime = require(`${root}lib/util/human_time`) +const humanTime = require(`${root}../lib/util/human_time`) describe('lib/util/human_time', () => { context('.long', () => { diff --git a/packages/server/test/unit/newlines_spec.ts b/packages/server/test/unit/util/newlines_spec.ts similarity index 83% rename from packages/server/test/unit/newlines_spec.ts rename to packages/server/test/unit/util/newlines_spec.ts index a3050923d0b4..a5f06ca4aa3c 100644 --- a/packages/server/test/unit/newlines_spec.ts +++ b/packages/server/test/unit/util/newlines_spec.ts @@ -1,6 +1,6 @@ -import '../spec_helper' +import '../../spec_helper' -import newlines from '../../lib/util/newlines' +import newlines from '../../../lib/util/newlines' describe('lib/util/newlines', function () { it('inserts newline at each n char', function () { diff --git a/packages/server/test/unit/open_spec.js b/packages/server/test/unit/util/open_spec.js similarity index 92% rename from packages/server/test/unit/open_spec.js rename to packages/server/test/unit/util/open_spec.js index d69a2c01c78a..05d9d1bb0a72 100644 --- a/packages/server/test/unit/open_spec.js +++ b/packages/server/test/unit/util/open_spec.js @@ -1,7 +1,7 @@ -require('../spec_helper') +require('../../spec_helper') const cp = require('child_process') -const open = require(`${root}lib/util/open`) +const open = require(`${root}../lib/util/open`) const platform = (p) => { return Object.defineProperty(process, 'platform', { diff --git a/packages/server/test/unit/origin_spec.js b/packages/server/test/unit/util/origin_spec.js similarity index 85% rename from packages/server/test/unit/origin_spec.js rename to packages/server/test/unit/util/origin_spec.js index 15876e2d1541..e3ac7d15e27a 100644 --- a/packages/server/test/unit/origin_spec.js +++ b/packages/server/test/unit/util/origin_spec.js @@ -1,6 +1,6 @@ -require('../spec_helper') +require('../../spec_helper') -const origin = require(`${root}lib/util/origin`) +const origin = require(`${root}../lib/util/origin`) describe('lib/util/origin', () => { beforeEach(function () { diff --git a/packages/server/test/unit/path_helpers_spec.js b/packages/server/test/unit/util/path_helpers_spec.js similarity index 84% rename from packages/server/test/unit/path_helpers_spec.js rename to packages/server/test/unit/util/path_helpers_spec.js index 0704b9bbd960..86323723783d 100644 --- a/packages/server/test/unit/path_helpers_spec.js +++ b/packages/server/test/unit/util/path_helpers_spec.js @@ -1,6 +1,6 @@ -require('../spec_helper') +require('../../spec_helper') -const path_helpers = require(`${root}lib/util/path_helpers`) +const path_helpers = require(`${root}../lib/util/path_helpers`) describe('lib/util/path_helpers', () => { context('checkIfResolveChangedRootFolder', () => { diff --git a/packages/server/test/unit/profile_cleaner_spec.js b/packages/server/test/unit/util/profile_cleaner_spec.js similarity index 92% rename from packages/server/test/unit/profile_cleaner_spec.js rename to packages/server/test/unit/util/profile_cleaner_spec.js index 6fa33e71a952..b6af0812bc25 100644 --- a/packages/server/test/unit/profile_cleaner_spec.js +++ b/packages/server/test/unit/util/profile_cleaner_spec.js @@ -1,10 +1,10 @@ -require('../spec_helper') +require('../../spec_helper') const os = require('os') const path = require('path') -const { fs } = require(`${root}/lib/util/fs`) -const findProcess = require(`${root}lib/util/find_process`) -const profileCleaner = require(`${root}lib/util/profile_cleaner`) +const { fs } = require(`${root}../lib/util/fs`) +const findProcess = require(`${root}../lib/util/find_process`) +const profileCleaner = require(`${root}../lib/util/profile_cleaner`) const tmpDir = os.tmpdir() const pidProfilesFolder = path.join(tmpDir, 'pid-profiles') diff --git a/packages/server/test/unit/random_spec.js b/packages/server/test/unit/util/random_spec.js similarity index 88% rename from packages/server/test/unit/random_spec.js rename to packages/server/test/unit/util/random_spec.js index 4864243a7c58..7270577af187 100644 --- a/packages/server/test/unit/random_spec.js +++ b/packages/server/test/unit/util/random_spec.js @@ -1,7 +1,7 @@ -require('../spec_helper') +require('../../spec_helper') const randomstring = require('randomstring') -const random = require(`${root}lib/util/random`) +const random = require(`${root}../lib/util/random`) context('.id', () => { it('returns random.generate string with length 5 by default', () => { diff --git a/packages/server/test/unit/routes_util_spec.js b/packages/server/test/unit/util/routes_spec.js similarity index 93% rename from packages/server/test/unit/routes_util_spec.js rename to packages/server/test/unit/util/routes_spec.js index bcf0e0c78346..f491b6125794 100644 --- a/packages/server/test/unit/routes_util_spec.js +++ b/packages/server/test/unit/util/routes_spec.js @@ -1,6 +1,6 @@ -require('../spec_helper') +require('../../spec_helper') -const { apiRoutes, onRoutes } = require(`${root}/lib/util/routes`) +const { apiRoutes, onRoutes } = require(`${root}../lib/util/routes`) describe('lib/util/routes', () => { describe('api routes', () => { diff --git a/packages/server/test/unit/specs_spec.js b/packages/server/test/unit/util/specs_spec.js similarity index 97% rename from packages/server/test/unit/specs_spec.js rename to packages/server/test/unit/util/specs_spec.js index 2f72cfb4aaf9..582d0eeb3087 100644 --- a/packages/server/test/unit/specs_spec.js +++ b/packages/server/test/unit/util/specs_spec.js @@ -1,9 +1,9 @@ -require('../spec_helper') +require('../../spec_helper') const R = require('ramda') const path = require('path') -const config = require(`${root}lib/config`) -const specsUtil = require(`${root}lib/util/specs`).default +const config = require(`${root}../lib/config`) +const specsUtil = require(`${root}../lib/util/specs`).default const FixturesHelper = require('@tooling/system-tests/lib/fixtures') const debug = require('debug')('test') diff --git a/packages/server/test/unit/stream_buffer_spec.js b/packages/server/test/unit/util/stream_buffer_spec.js similarity index 98% rename from packages/server/test/unit/stream_buffer_spec.js rename to packages/server/test/unit/util/stream_buffer_spec.js index bfb5db3da574..c7ae9eea1b72 100644 --- a/packages/server/test/unit/stream_buffer_spec.js +++ b/packages/server/test/unit/util/stream_buffer_spec.js @@ -1,11 +1,11 @@ -require('../spec_helper') +require('../../spec_helper') const _ = require('lodash') const fs = require('fs') const stream = require('stream') const Promise = require('bluebird') const { concatStream } = require('@packages/network') -const { streamBuffer } = require('../../lib/util/stream_buffer') +const { streamBuffer } = require('../../../lib/util/stream_buffer') function drain (stream) { return new Promise((resolve) => { diff --git a/packages/server/test/unit/suppress_warnings_spec.ts b/packages/server/test/unit/util/suppress_warnings_spec.ts similarity index 87% rename from packages/server/test/unit/suppress_warnings_spec.ts rename to packages/server/test/unit/util/suppress_warnings_spec.ts index 7509cf48dad3..bee28e6d04bb 100644 --- a/packages/server/test/unit/suppress_warnings_spec.ts +++ b/packages/server/test/unit/util/suppress_warnings_spec.ts @@ -1,4 +1,4 @@ -import '../spec_helper' +import '../../spec_helper' import { expect } from 'chai' import execa from 'execa' import proxyquire from 'proxyquire' @@ -6,7 +6,7 @@ import proxyquire from 'proxyquire' const ERROR_MESSAGE = 'Setting the NODE_TLS_REJECT_UNAUTHORIZED' const TLS_CONNECT = `require('tls').connect().on('error', ()=>{});` -const SUPPRESS_WARNING = `require('${__dirname}/../../lib/util/suppress_warnings').suppress();` +const SUPPRESS_WARNING = `require('${__dirname}/../../../lib/util/suppress_warnings').suppress();` describe('lib/util/suppress_warnings', function () { it('tls.connect emits warning if NODE_TLS_REJECT_UNAUTHORIZED=0 and not suppressed', function () { @@ -36,7 +36,7 @@ describe('lib/util/suppress_warnings', function () { const emitWarning = sinon.spy(process, 'emitWarning') // force typescript to always be non-requireable - const { suppress } = proxyquire('../../lib/util/suppress_warnings', {}) + const { suppress } = proxyquire('../../../lib/util/suppress_warnings', {}) suppress() diff --git a/packages/server/test/unit/terminal_spec.js b/packages/server/test/unit/util/terminal_spec.js similarity index 94% rename from packages/server/test/unit/terminal_spec.js rename to packages/server/test/unit/util/terminal_spec.js index 73e51e7a2e9e..3d8e6da471a2 100644 --- a/packages/server/test/unit/terminal_spec.js +++ b/packages/server/test/unit/util/terminal_spec.js @@ -1,11 +1,11 @@ -require('../spec_helper') +require('../../spec_helper') const snapshot = require('snap-shot-it') const stripAnsi = require('strip-ansi') const widestLine = require('widest-line') -const env = require(`${root}lib/util/env`) -const terminal = require(`${root}lib/util/terminal`) -const terminalSize = require(`${root}lib/util/terminal-size`) +const env = require(`${root}../lib/util/env`) +const terminal = require(`${root}../lib/util/terminal`) +const terminalSize = require(`${root}../lib/util/terminal-size`) const sanitizeSnapshot = (str) => { return snapshot(stripAnsi(str)) diff --git a/packages/server/test/unit/trash_spec.js b/packages/server/test/unit/util/trash_spec.js similarity index 96% rename from packages/server/test/unit/trash_spec.js rename to packages/server/test/unit/util/trash_spec.js index a8d4aecb0e59..953657a2b828 100644 --- a/packages/server/test/unit/trash_spec.js +++ b/packages/server/test/unit/util/trash_spec.js @@ -1,9 +1,9 @@ -require('../spec_helper') +require('../../spec_helper') const fs = require('fs') const os = require('os') const path = require('path') -const trash = require(`${root}lib/util/trash`) +const trash = require(`${root}../lib/util/trash`) const populateDirectories = function (basePath) { fs.mkdirSync(basePath) diff --git a/packages/server/test/unit/tty_spec.js b/packages/server/test/unit/util/tty_spec.js similarity index 95% rename from packages/server/test/unit/tty_spec.js rename to packages/server/test/unit/util/tty_spec.js index df66cc0493a6..277e9ff4bed2 100644 --- a/packages/server/test/unit/tty_spec.js +++ b/packages/server/test/unit/util/tty_spec.js @@ -1,8 +1,8 @@ -require('../spec_helper') +require('../../spec_helper') const tty = require('tty') -const ttyUtil = require(`${root}lib/util/tty`) -const terminalSize = require(`${root}lib/util/terminal-size`) +const ttyUtil = require(`${root}../lib/util/tty`) +const terminalSize = require(`${root}../lib/util/terminal-size`) const ttys = [process.stdin.isTTY, process.stdout.isTTY, process.stderr.isTTY] From c027f28f38930f9d1e534d3bbca19483538b2243 Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" <41898282+github-actions[bot]@users.noreply.github.com> Date: Mon, 25 Oct 2021 13:35:19 -0400 Subject: [PATCH 25/27] chore: Update Chrome (beta) to 96.0.4664.18 (#18604) Co-authored-by: cypress-bot[bot] <2f0651858c6e38e0+cypress-bot[bot]@users.noreply.github.com> Co-authored-by: Matt Henkes --- browser-versions.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/browser-versions.json b/browser-versions.json index c471c41893d8..46882bd5b8bc 100644 --- a/browser-versions.json +++ b/browser-versions.json @@ -1,4 +1,4 @@ { - "chrome:beta": "95.0.4638.54", + "chrome:beta": "96.0.4664.18", "chrome:stable": "95.0.4638.54" } From 776b7301fd1ccedca1999ca744fbf4c67b3857a1 Mon Sep 17 00:00:00 2001 From: Blue F Date: Mon, 25 Oct 2021 11:49:32 -0700 Subject: [PATCH 26/27] feat: Add 'slowTestThreshold' and fix this.slow() inside specs (#18496) Co-authored-by: Chris Breiding --- cli/schema/cypress.schema.json | 5 + cli/types/cypress-npm-api.d.ts | 4 + cli/types/cypress.d.ts | 5 + packages/driver/src/cypress/mocha.ts | 2 + packages/driver/src/cypress/runner.ts | 6 +- .../__snapshots__/retries.mochaEvents.spec.js | 985 +++++++++++------- .../__snapshots__/runner.mochaEvents.spec.js | 368 ++++--- .../__snapshots__/studio.mochaEvents.spec.js | 652 +++++++----- packages/server/lib/config.ts | 17 +- packages/server/lib/config_options.ts | 4 + packages/server/lib/reporter.js | 29 + .../test/unit/browsers/browsers_spec.js | 2 +- packages/server/test/unit/config_spec.js | 10 + packages/server/test/unit/reporter_spec.js | 1 - .../integration/slowTestThreshold_spec.js | 16 + system-tests/test/reporters_spec.js | 17 + 16 files changed, 1325 insertions(+), 798 deletions(-) create mode 100644 system-tests/projects/e2e/cypress/integration/slowTestThreshold_spec.js diff --git a/cli/schema/cypress.schema.json b/cli/schema/cypress.schema.json index 617664c1028d..7608f6a8b9ba 100644 --- a/cli/schema/cypress.schema.json +++ b/cli/schema/cypress.schema.json @@ -44,6 +44,11 @@ "default": null, "description": "The reporter options used. Supported options depend on the reporter. See https://on.cypress.io/reporters#Reporter-Options" }, + "slowTestThreshold": { + "type": "number", + "default": 10000, + "description": "Slow test threshold in milliseconds. Only affects the visual output of some reporters. For example, the spec reporter will display the test time in yellow if over the threshold. See https://on.cypress.io/configuration#Timeouts" + }, "testFiles": { "type": [ "string", diff --git a/cli/types/cypress-npm-api.d.ts b/cli/types/cypress-npm-api.d.ts index c60a34713812..9356702ccf00 100644 --- a/cli/types/cypress-npm-api.d.ts +++ b/cli/types/cypress-npm-api.d.ts @@ -91,6 +91,10 @@ declare namespace CypressCommandLine { * Specify mocha reporter options */ reporterOptions: any + /** + * Slow test threshold in milliseconds. Only affects the visual output of some reporters. For example, the spec reporter will display the test time in yellow if over the threshold. + */ + slowTestThreshold: number /** * Specify the specs to run */ diff --git a/cli/types/cypress.d.ts b/cli/types/cypress.d.ts index 4e58c6e5c14a..2cd7d647d8c2 100644 --- a/cli/types/cypress.d.ts +++ b/cli/types/cypress.d.ts @@ -2577,6 +2577,11 @@ declare namespace Cypress { * @default "spec" */ reporterOptions: { [key: string]: any } + /** + * Slow test threshold in milliseconds. Only affects the visual output of some reporters. For example, the spec reporter will display the test time in yellow if over the threshold. + * @default 10000 + */ + slowTestThreshold: number /** * Whether Cypress will watch and restart tests on test file changes * @default true diff --git a/packages/driver/src/cypress/mocha.ts b/packages/driver/src/cypress/mocha.ts index 8b46babf1dde..9450c2f1a885 100644 --- a/packages/driver/src/cypress/mocha.ts +++ b/packages/driver/src/cypress/mocha.ts @@ -500,6 +500,8 @@ const create = (specWindow, Cypress, config) => { const _mocha = createMocha(specWindow) + _mocha.slow(config('slowTestThreshold')) + const _runner = getRunner(_mocha) _mocha.suite.file = Cypress.spec.relative diff --git a/packages/driver/src/cypress/runner.ts b/packages/driver/src/cypress/runner.ts index 9fc0ce178b6f..97ee42be0692 100644 --- a/packages/driver/src/cypress/runner.ts +++ b/packages/driver/src/cypress/runner.ts @@ -21,7 +21,7 @@ const TEST_BEFORE_RUN_EVENT = 'runner:test:before:run' const TEST_AFTER_RUN_EVENT = 'runner:test:after:run' const RUNNABLE_LOGS = 'routes agents commands hooks'.split(' ') -const RUNNABLE_PROPS = '_testConfig id order title _titlePath root hookName hookId err state failedFromHookId body speed type duration wallClockStartedAt wallClockDuration timings file originalTitle invocationDetails final currentRetry retries'.split(' ') +const RUNNABLE_PROPS = '_testConfig id order title _titlePath root hookName hookId err state failedFromHookId body speed type duration wallClockStartedAt wallClockDuration timings file originalTitle invocationDetails final currentRetry retries _slow'.split(' ') const debug = debugFn('cypress:driver:runner') const debugErrors = debugFn('cypress:driver:errors') @@ -581,6 +581,10 @@ const normalize = (runnable, tests, initialTests, onRunnable, onLogsById, getRun wrappedRunnable._testConfig = cfg } + if (cfg.slowTestThreshold) { + runnable.slow(cfg.slowTestThreshold) + } + wrappedRunnable._titlePath = runnable.titlePath() } diff --git a/packages/runner/__snapshots__/retries.mochaEvents.spec.js b/packages/runner/__snapshots__/retries.mochaEvents.spec.js index d440a0171dbd..58a4e7318da8 100644 --- a/packages/runner/__snapshots__/retries.mochaEvents.spec.js +++ b/packages/runner/__snapshots__/retries.mochaEvents.spec.js @@ -15,7 +15,8 @@ exports['src/cypress/runner retries mochaEvents simple retry #1'] = [ "root": true, "type": "suite", "file": "relative/path/to/spec.js", - "retries": -1 + "retries": -1, + "_slow": 10000 } ], [ @@ -28,7 +29,8 @@ exports['src/cypress/runner retries mochaEvents simple retry #1'] = [ "type": "suite", "file": null, "invocationDetails": "{Object 8}", - "retries": -1 + "retries": -1, + "_slow": 10000 } ], [ @@ -43,7 +45,8 @@ exports['src/cypress/runner retries mochaEvents simple retry #1'] = [ "file": null, "invocationDetails": "{Object 8}", "currentRetry": 0, - "retries": -1 + "retries": -1, + "_slow": 10000 } ], [ @@ -59,7 +62,8 @@ exports['src/cypress/runner retries mochaEvents simple retry #1'] = [ "file": null, "invocationDetails": "{Object 8}", "currentRetry": 0, - "retries": -1 + "retries": -1, + "_slow": 10000 } ], [ @@ -92,7 +96,8 @@ exports['src/cypress/runner retries mochaEvents simple retry #1'] = [ "invocationDetails": "{Object 8}", "final": false, "currentRetry": 0, - "retries": 1 + "retries": 1, + "_slow": 10000 }, { "message": "[error message]", @@ -133,7 +138,8 @@ exports['src/cypress/runner retries mochaEvents simple retry #1'] = [ "invocationDetails": "{Object 8}", "final": false, "currentRetry": 0, - "retries": 1 + "retries": 1, + "_slow": 10000 } ], [ @@ -147,7 +153,8 @@ exports['src/cypress/runner retries mochaEvents simple retry #1'] = [ "wallClockStartedAt": "match.date", "file": null, "currentRetry": 1, - "retries": 1 + "retries": 1, + "_slow": 10000 } ], [ @@ -171,7 +178,8 @@ exports['src/cypress/runner retries mochaEvents simple retry #1'] = [ "file": null, "final": true, "currentRetry": 1, - "retries": 1 + "retries": 1, + "_slow": 10000 } ], [ @@ -195,7 +203,8 @@ exports['src/cypress/runner retries mochaEvents simple retry #1'] = [ "file": null, "final": true, "currentRetry": 1, - "retries": 1 + "retries": 1, + "_slow": 10000 } ], [ @@ -208,7 +217,8 @@ exports['src/cypress/runner retries mochaEvents simple retry #1'] = [ "type": "suite", "file": null, "invocationDetails": "{Object 8}", - "retries": -1 + "retries": -1, + "_slow": 10000 } ], [ @@ -233,7 +243,8 @@ exports['src/cypress/runner retries mochaEvents simple retry #1'] = [ "file": null, "final": true, "currentRetry": 1, - "retries": 1 + "retries": 1, + "_slow": 10000 } ], [ @@ -245,7 +256,8 @@ exports['src/cypress/runner retries mochaEvents simple retry #1'] = [ "root": true, "type": "suite", "file": "relative/path/to/spec.js", - "retries": -1 + "retries": -1, + "_slow": 10000 } ], [ @@ -274,7 +286,8 @@ exports['src/cypress/runner retries mochaEvents test retry with hooks #1'] = [ "root": true, "type": "suite", "file": "relative/path/to/spec.js", - "retries": -1 + "retries": -1, + "_slow": 10000 } ], [ @@ -287,7 +300,8 @@ exports['src/cypress/runner retries mochaEvents test retry with hooks #1'] = [ "type": "suite", "file": null, "invocationDetails": "{Object 8}", - "retries": -1 + "retries": -1, + "_slow": 10000 } ], [ @@ -303,7 +317,8 @@ exports['src/cypress/runner retries mochaEvents test retry with hooks #1'] = [ "file": null, "invocationDetails": "{Object 8}", "currentRetry": 0, - "retries": -1 + "retries": -1, + "_slow": 10000 } ], [ @@ -319,7 +334,8 @@ exports['src/cypress/runner retries mochaEvents test retry with hooks #1'] = [ "file": null, "invocationDetails": "{Object 8}", "currentRetry": 0, - "retries": -1 + "retries": -1, + "_slow": 10000 } ], [ @@ -336,7 +352,8 @@ exports['src/cypress/runner retries mochaEvents test retry with hooks #1'] = [ "file": null, "invocationDetails": "{Object 8}", "currentRetry": 0, - "retries": -1 + "retries": -1, + "_slow": 10000 } ], [ @@ -380,7 +397,8 @@ exports['src/cypress/runner retries mochaEvents test retry with hooks #1'] = [ "file": null, "invocationDetails": "{Object 8}", "currentRetry": 0, - "retries": 1 + "retries": 1, + "_slow": 10000 } ], [ @@ -396,7 +414,8 @@ exports['src/cypress/runner retries mochaEvents test retry with hooks #1'] = [ "file": null, "invocationDetails": "{Object 8}", "currentRetry": 0, - "retries": -1 + "retries": -1, + "_slow": 10000 } ], [ @@ -413,7 +432,8 @@ exports['src/cypress/runner retries mochaEvents test retry with hooks #1'] = [ "file": null, "invocationDetails": "{Object 8}", "currentRetry": 0, - "retries": -1 + "retries": -1, + "_slow": 10000 } ], [ @@ -467,7 +487,8 @@ exports['src/cypress/runner retries mochaEvents test retry with hooks #1'] = [ "invocationDetails": "{Object 8}", "final": false, "currentRetry": 0, - "retries": 1 + "retries": 1, + "_slow": 10000 }, { "message": "[error message]", @@ -490,7 +511,8 @@ exports['src/cypress/runner retries mochaEvents test retry with hooks #1'] = [ "file": null, "invocationDetails": "{Object 8}", "currentRetry": 0, - "retries": -1 + "retries": -1, + "_slow": 10000 } ], [ @@ -507,7 +529,8 @@ exports['src/cypress/runner retries mochaEvents test retry with hooks #1'] = [ "file": null, "invocationDetails": "{Object 8}", "currentRetry": 0, - "retries": -1 + "retries": -1, + "_slow": 10000 } ], [ @@ -562,7 +585,8 @@ exports['src/cypress/runner retries mochaEvents test retry with hooks #1'] = [ "invocationDetails": "{Object 8}", "final": false, "currentRetry": 0, - "retries": 1 + "retries": 1, + "_slow": 10000 } ], [ @@ -579,7 +603,8 @@ exports['src/cypress/runner retries mochaEvents test retry with hooks #1'] = [ "file": null, "invocationDetails": "{Object 8}", "currentRetry": 0, - "retries": -1 + "retries": -1, + "_slow": 10000 } ], [ @@ -593,7 +618,8 @@ exports['src/cypress/runner retries mochaEvents test retry with hooks #1'] = [ "wallClockStartedAt": "match.date", "file": null, "currentRetry": 1, - "retries": 1 + "retries": 1, + "_slow": 10000 } ], [ @@ -610,7 +636,8 @@ exports['src/cypress/runner retries mochaEvents test retry with hooks #1'] = [ "file": null, "invocationDetails": "{Object 8}", "currentRetry": 0, - "retries": -1 + "retries": -1, + "_slow": 10000 } ], [ @@ -627,7 +654,8 @@ exports['src/cypress/runner retries mochaEvents test retry with hooks #1'] = [ "file": null, "invocationDetails": "{Object 8}", "currentRetry": 0, - "retries": -1 + "retries": -1, + "_slow": 10000 } ], [ @@ -644,7 +672,8 @@ exports['src/cypress/runner retries mochaEvents test retry with hooks #1'] = [ "file": null, "invocationDetails": "{Object 8}", "currentRetry": 0, - "retries": -1 + "retries": -1, + "_slow": 10000 } ], [ @@ -660,7 +689,8 @@ exports['src/cypress/runner retries mochaEvents test retry with hooks #1'] = [ "file": null, "invocationDetails": "{Object 8}", "currentRetry": 0, - "retries": -1 + "retries": -1, + "_slow": 10000 } ], [ @@ -677,7 +707,8 @@ exports['src/cypress/runner retries mochaEvents test retry with hooks #1'] = [ "file": null, "invocationDetails": "{Object 8}", "currentRetry": 0, - "retries": -1 + "retries": -1, + "_slow": 10000 } ], [ @@ -722,7 +753,8 @@ exports['src/cypress/runner retries mochaEvents test retry with hooks #1'] = [ "file": null, "final": true, "currentRetry": 1, - "retries": 1 + "retries": 1, + "_slow": 10000 } ], [ @@ -767,7 +799,8 @@ exports['src/cypress/runner retries mochaEvents test retry with hooks #1'] = [ "file": null, "final": true, "currentRetry": 1, - "retries": 1 + "retries": 1, + "_slow": 10000 } ], [ @@ -780,7 +813,8 @@ exports['src/cypress/runner retries mochaEvents test retry with hooks #1'] = [ "type": "suite", "file": null, "invocationDetails": "{Object 8}", - "retries": -1 + "retries": -1, + "_slow": 10000 } ], [ @@ -826,7 +860,8 @@ exports['src/cypress/runner retries mochaEvents test retry with hooks #1'] = [ "file": null, "final": true, "currentRetry": 1, - "retries": 1 + "retries": 1, + "_slow": 10000 } ], [ @@ -838,7 +873,8 @@ exports['src/cypress/runner retries mochaEvents test retry with hooks #1'] = [ "root": true, "type": "suite", "file": "relative/path/to/spec.js", - "retries": -1 + "retries": -1, + "_slow": 10000 } ], [ @@ -867,7 +903,8 @@ exports['src/cypress/runner retries mochaEvents test retry with [only] #1'] = [ "root": true, "type": "suite", "file": "relative/path/to/spec.js", - "retries": -1 + "retries": -1, + "_slow": 10000 } ], [ @@ -880,7 +917,8 @@ exports['src/cypress/runner retries mochaEvents test retry with [only] #1'] = [ "type": "suite", "file": null, "invocationDetails": "{Object 8}", - "retries": -1 + "retries": -1, + "_slow": 10000 } ], [ @@ -896,7 +934,8 @@ exports['src/cypress/runner retries mochaEvents test retry with [only] #1'] = [ "file": null, "invocationDetails": "{Object 8}", "currentRetry": 0, - "retries": -1 + "retries": -1, + "_slow": 10000 } ], [ @@ -912,7 +951,8 @@ exports['src/cypress/runner retries mochaEvents test retry with [only] #1'] = [ "file": null, "invocationDetails": "{Object 8}", "currentRetry": 0, - "retries": -1 + "retries": -1, + "_slow": 10000 } ], [ @@ -929,7 +969,8 @@ exports['src/cypress/runner retries mochaEvents test retry with [only] #1'] = [ "file": null, "invocationDetails": "{Object 8}", "currentRetry": 0, - "retries": -1 + "retries": -1, + "_slow": 10000 } ], [ @@ -973,7 +1014,8 @@ exports['src/cypress/runner retries mochaEvents test retry with [only] #1'] = [ "file": null, "invocationDetails": "{Object 8}", "currentRetry": 0, - "retries": 1 + "retries": 1, + "_slow": 10000 } ], [ @@ -989,7 +1031,8 @@ exports['src/cypress/runner retries mochaEvents test retry with [only] #1'] = [ "file": null, "invocationDetails": "{Object 8}", "currentRetry": 0, - "retries": -1 + "retries": -1, + "_slow": 10000 } ], [ @@ -1006,7 +1049,8 @@ exports['src/cypress/runner retries mochaEvents test retry with [only] #1'] = [ "file": null, "invocationDetails": "{Object 8}", "currentRetry": 0, - "retries": -1 + "retries": -1, + "_slow": 10000 } ], [ @@ -1060,7 +1104,8 @@ exports['src/cypress/runner retries mochaEvents test retry with [only] #1'] = [ "invocationDetails": "{Object 8}", "final": false, "currentRetry": 0, - "retries": 1 + "retries": 1, + "_slow": 10000 }, { "message": "[error message]", @@ -1083,7 +1128,8 @@ exports['src/cypress/runner retries mochaEvents test retry with [only] #1'] = [ "file": null, "invocationDetails": "{Object 8}", "currentRetry": 0, - "retries": -1 + "retries": -1, + "_slow": 10000 } ], [ @@ -1100,7 +1146,8 @@ exports['src/cypress/runner retries mochaEvents test retry with [only] #1'] = [ "file": null, "invocationDetails": "{Object 8}", "currentRetry": 0, - "retries": -1 + "retries": -1, + "_slow": 10000 } ], [ @@ -1155,7 +1202,8 @@ exports['src/cypress/runner retries mochaEvents test retry with [only] #1'] = [ "invocationDetails": "{Object 8}", "final": false, "currentRetry": 0, - "retries": 1 + "retries": 1, + "_slow": 10000 } ], [ @@ -1172,7 +1220,8 @@ exports['src/cypress/runner retries mochaEvents test retry with [only] #1'] = [ "file": null, "invocationDetails": "{Object 8}", "currentRetry": 0, - "retries": -1 + "retries": -1, + "_slow": 10000 } ], [ @@ -1186,7 +1235,8 @@ exports['src/cypress/runner retries mochaEvents test retry with [only] #1'] = [ "wallClockStartedAt": "match.date", "file": null, "currentRetry": 1, - "retries": 1 + "retries": 1, + "_slow": 10000 } ], [ @@ -1203,7 +1253,8 @@ exports['src/cypress/runner retries mochaEvents test retry with [only] #1'] = [ "file": null, "invocationDetails": "{Object 8}", "currentRetry": 0, - "retries": -1 + "retries": -1, + "_slow": 10000 } ], [ @@ -1220,7 +1271,8 @@ exports['src/cypress/runner retries mochaEvents test retry with [only] #1'] = [ "file": null, "invocationDetails": "{Object 8}", "currentRetry": 0, - "retries": -1 + "retries": -1, + "_slow": 10000 } ], [ @@ -1237,7 +1289,8 @@ exports['src/cypress/runner retries mochaEvents test retry with [only] #1'] = [ "file": null, "invocationDetails": "{Object 8}", "currentRetry": 0, - "retries": -1 + "retries": -1, + "_slow": 10000 } ], [ @@ -1253,7 +1306,8 @@ exports['src/cypress/runner retries mochaEvents test retry with [only] #1'] = [ "file": null, "invocationDetails": "{Object 8}", "currentRetry": 0, - "retries": -1 + "retries": -1, + "_slow": 10000 } ], [ @@ -1270,7 +1324,8 @@ exports['src/cypress/runner retries mochaEvents test retry with [only] #1'] = [ "file": null, "invocationDetails": "{Object 8}", "currentRetry": 0, - "retries": -1 + "retries": -1, + "_slow": 10000 } ], [ @@ -1315,7 +1370,8 @@ exports['src/cypress/runner retries mochaEvents test retry with [only] #1'] = [ "file": null, "final": true, "currentRetry": 1, - "retries": 1 + "retries": 1, + "_slow": 10000 } ], [ @@ -1360,7 +1416,8 @@ exports['src/cypress/runner retries mochaEvents test retry with [only] #1'] = [ "file": null, "final": true, "currentRetry": 1, - "retries": 1 + "retries": 1, + "_slow": 10000 } ], [ @@ -1373,7 +1430,8 @@ exports['src/cypress/runner retries mochaEvents test retry with [only] #1'] = [ "type": "suite", "file": null, "invocationDetails": "{Object 8}", - "retries": -1 + "retries": -1, + "_slow": 10000 } ], [ @@ -1419,7 +1477,8 @@ exports['src/cypress/runner retries mochaEvents test retry with [only] #1'] = [ "file": null, "final": true, "currentRetry": 1, - "retries": 1 + "retries": 1, + "_slow": 10000 } ], [ @@ -1431,7 +1490,8 @@ exports['src/cypress/runner retries mochaEvents test retry with [only] #1'] = [ "root": true, "type": "suite", "file": "relative/path/to/spec.js", - "retries": -1 + "retries": -1, + "_slow": 10000 } ], [ @@ -1460,7 +1520,8 @@ exports['src/cypress/runner retries mochaEvents can retry from [beforeEach] #1'] "root": true, "type": "suite", "file": "relative/path/to/spec.js", - "retries": -1 + "retries": -1, + "_slow": 10000 } ], [ @@ -1473,7 +1534,8 @@ exports['src/cypress/runner retries mochaEvents can retry from [beforeEach] #1'] "type": "suite", "file": null, "invocationDetails": "{Object 8}", - "retries": -1 + "retries": -1, + "_slow": 10000 } ], [ @@ -1489,7 +1551,8 @@ exports['src/cypress/runner retries mochaEvents can retry from [beforeEach] #1'] "file": null, "invocationDetails": "{Object 8}", "currentRetry": 0, - "retries": -1 + "retries": -1, + "_slow": 10000 } ], [ @@ -1505,7 +1568,8 @@ exports['src/cypress/runner retries mochaEvents can retry from [beforeEach] #1'] "file": null, "invocationDetails": "{Object 8}", "currentRetry": 0, - "retries": -1 + "retries": -1, + "_slow": 10000 } ], [ @@ -1522,7 +1586,8 @@ exports['src/cypress/runner retries mochaEvents can retry from [beforeEach] #1'] "file": null, "invocationDetails": "{Object 8}", "currentRetry": 0, - "retries": -1 + "retries": -1, + "_slow": 10000 } ], [ @@ -1571,7 +1636,8 @@ exports['src/cypress/runner retries mochaEvents can retry from [beforeEach] #1'] "file": null, "invocationDetails": "{Object 8}", "currentRetry": 0, - "retries": 1 + "retries": 1, + "_slow": 10000 } ], [ @@ -1587,7 +1653,8 @@ exports['src/cypress/runner retries mochaEvents can retry from [beforeEach] #1'] "file": null, "invocationDetails": "{Object 8}", "currentRetry": 0, - "retries": -1 + "retries": -1, + "_slow": 10000 } ], [ @@ -1604,7 +1671,8 @@ exports['src/cypress/runner retries mochaEvents can retry from [beforeEach] #1'] "file": null, "invocationDetails": "{Object 8}", "currentRetry": 0, - "retries": -1 + "retries": -1, + "_slow": 10000 } ], [ @@ -1620,7 +1688,8 @@ exports['src/cypress/runner retries mochaEvents can retry from [beforeEach] #1'] "file": null, "invocationDetails": "{Object 8}", "currentRetry": 0, - "retries": -1 + "retries": -1, + "_slow": 10000 } ], [ @@ -1637,7 +1706,8 @@ exports['src/cypress/runner retries mochaEvents can retry from [beforeEach] #1'] "file": null, "invocationDetails": "{Object 8}", "currentRetry": 0, - "retries": -1 + "retries": -1, + "_slow": 10000 } ], [ @@ -1653,7 +1723,8 @@ exports['src/cypress/runner retries mochaEvents can retry from [beforeEach] #1'] "file": null, "invocationDetails": "{Object 8}", "currentRetry": 0, - "retries": -1 + "retries": -1, + "_slow": 10000 } ], [ @@ -1669,7 +1740,8 @@ exports['src/cypress/runner retries mochaEvents can retry from [beforeEach] #1'] "file": null, "invocationDetails": "{Object 8}", "currentRetry": 0, - "retries": -1 + "retries": -1, + "_slow": 10000 } ], [ @@ -1730,7 +1802,8 @@ exports['src/cypress/runner retries mochaEvents can retry from [beforeEach] #1'] "invocationDetails": "{Object 8}", "final": false, "currentRetry": 0, - "retries": 1 + "retries": 1, + "_slow": 10000 }, { "message": "[error message]", @@ -1753,7 +1826,8 @@ exports['src/cypress/runner retries mochaEvents can retry from [beforeEach] #1'] "file": null, "invocationDetails": "{Object 8}", "currentRetry": 0, - "retries": -1 + "retries": -1, + "_slow": 10000 } ], [ @@ -1770,7 +1844,8 @@ exports['src/cypress/runner retries mochaEvents can retry from [beforeEach] #1'] "file": null, "invocationDetails": "{Object 8}", "currentRetry": 0, - "retries": -1 + "retries": -1, + "_slow": 10000 } ], [ @@ -1832,7 +1907,8 @@ exports['src/cypress/runner retries mochaEvents can retry from [beforeEach] #1'] "invocationDetails": "{Object 8}", "final": false, "currentRetry": 0, - "retries": 1 + "retries": 1, + "_slow": 10000 } ], [ @@ -1849,7 +1925,8 @@ exports['src/cypress/runner retries mochaEvents can retry from [beforeEach] #1'] "file": null, "invocationDetails": "{Object 8}", "currentRetry": 0, - "retries": -1 + "retries": -1, + "_slow": 10000 } ], [ @@ -1863,7 +1940,8 @@ exports['src/cypress/runner retries mochaEvents can retry from [beforeEach] #1'] "wallClockStartedAt": "match.date", "file": null, "currentRetry": 1, - "retries": 1 + "retries": 1, + "_slow": 10000 } ], [ @@ -1880,7 +1958,8 @@ exports['src/cypress/runner retries mochaEvents can retry from [beforeEach] #1'] "file": null, "invocationDetails": "{Object 8}", "currentRetry": 0, - "retries": -1 + "retries": -1, + "_slow": 10000 } ], [ @@ -1897,7 +1976,8 @@ exports['src/cypress/runner retries mochaEvents can retry from [beforeEach] #1'] "file": null, "invocationDetails": "{Object 8}", "currentRetry": 0, - "retries": -1 + "retries": -1, + "_slow": 10000 } ], [ @@ -1914,7 +1994,8 @@ exports['src/cypress/runner retries mochaEvents can retry from [beforeEach] #1'] "file": null, "invocationDetails": "{Object 8}", "currentRetry": 0, - "retries": -1 + "retries": -1, + "_slow": 10000 } ], [ @@ -1930,7 +2011,8 @@ exports['src/cypress/runner retries mochaEvents can retry from [beforeEach] #1'] "file": null, "invocationDetails": "{Object 8}", "currentRetry": 0, - "retries": -1 + "retries": -1, + "_slow": 10000 } ], [ @@ -1947,7 +2029,8 @@ exports['src/cypress/runner retries mochaEvents can retry from [beforeEach] #1'] "file": null, "invocationDetails": "{Object 8}", "currentRetry": 0, - "retries": -1 + "retries": -1, + "_slow": 10000 } ], [ @@ -1964,7 +2047,8 @@ exports['src/cypress/runner retries mochaEvents can retry from [beforeEach] #1'] "file": null, "invocationDetails": "{Object 8}", "currentRetry": 0, - "retries": -1 + "retries": -1, + "_slow": 10000 } ], [ @@ -1981,7 +2065,8 @@ exports['src/cypress/runner retries mochaEvents can retry from [beforeEach] #1'] "file": null, "invocationDetails": "{Object 8}", "currentRetry": 0, - "retries": -1 + "retries": -1, + "_slow": 10000 } ], [ @@ -1997,7 +2082,8 @@ exports['src/cypress/runner retries mochaEvents can retry from [beforeEach] #1'] "file": null, "invocationDetails": "{Object 8}", "currentRetry": 0, - "retries": -1 + "retries": -1, + "_slow": 10000 } ], [ @@ -2014,7 +2100,8 @@ exports['src/cypress/runner retries mochaEvents can retry from [beforeEach] #1'] "file": null, "invocationDetails": "{Object 8}", "currentRetry": 0, - "retries": -1 + "retries": -1, + "_slow": 10000 } ], [ @@ -2069,7 +2156,8 @@ exports['src/cypress/runner retries mochaEvents can retry from [beforeEach] #1'] "file": null, "final": true, "currentRetry": 1, - "retries": 1 + "retries": 1, + "_slow": 10000 } ], [ @@ -2124,7 +2212,8 @@ exports['src/cypress/runner retries mochaEvents can retry from [beforeEach] #1'] "file": null, "final": true, "currentRetry": 1, - "retries": 1 + "retries": 1, + "_slow": 10000 } ], [ @@ -2137,7 +2226,8 @@ exports['src/cypress/runner retries mochaEvents can retry from [beforeEach] #1'] "type": "suite", "file": null, "invocationDetails": "{Object 8}", - "retries": -1 + "retries": -1, + "_slow": 10000 } ], [ @@ -2193,7 +2283,8 @@ exports['src/cypress/runner retries mochaEvents can retry from [beforeEach] #1'] "file": null, "final": true, "currentRetry": 1, - "retries": 1 + "retries": 1, + "_slow": 10000 } ], [ @@ -2205,7 +2296,8 @@ exports['src/cypress/runner retries mochaEvents can retry from [beforeEach] #1'] "root": true, "type": "suite", "file": "relative/path/to/spec.js", - "retries": -1 + "retries": -1, + "_slow": 10000 } ], [ @@ -2234,7 +2326,8 @@ exports['src/cypress/runner retries mochaEvents can retry from [afterEach] #1'] "root": true, "type": "suite", "file": "relative/path/to/spec.js", - "retries": -1 + "retries": -1, + "_slow": 10000 } ], [ @@ -2247,7 +2340,8 @@ exports['src/cypress/runner retries mochaEvents can retry from [afterEach] #1'] "type": "suite", "file": null, "invocationDetails": "{Object 8}", - "retries": -1 + "retries": -1, + "_slow": 10000 } ], [ @@ -2263,7 +2357,8 @@ exports['src/cypress/runner retries mochaEvents can retry from [afterEach] #1'] "file": null, "invocationDetails": "{Object 8}", "currentRetry": 0, - "retries": -1 + "retries": -1, + "_slow": 10000 } ], [ @@ -2279,7 +2374,8 @@ exports['src/cypress/runner retries mochaEvents can retry from [afterEach] #1'] "file": null, "invocationDetails": "{Object 8}", "currentRetry": 0, - "retries": -1 + "retries": -1, + "_slow": 10000 } ], [ @@ -2296,7 +2392,8 @@ exports['src/cypress/runner retries mochaEvents can retry from [afterEach] #1'] "file": null, "invocationDetails": "{Object 8}", "currentRetry": 0, - "retries": -1 + "retries": -1, + "_slow": 10000 } ], [ @@ -2350,7 +2447,8 @@ exports['src/cypress/runner retries mochaEvents can retry from [afterEach] #1'] "file": null, "invocationDetails": "{Object 8}", "currentRetry": 0, - "retries": 2 + "retries": 2, + "_slow": 10000 } ], [ @@ -2366,7 +2464,8 @@ exports['src/cypress/runner retries mochaEvents can retry from [afterEach] #1'] "file": null, "invocationDetails": "{Object 8}", "currentRetry": 0, - "retries": -1 + "retries": -1, + "_slow": 10000 } ], [ @@ -2383,7 +2482,8 @@ exports['src/cypress/runner retries mochaEvents can retry from [afterEach] #1'] "file": null, "invocationDetails": "{Object 8}", "currentRetry": 0, - "retries": -1 + "retries": -1, + "_slow": 10000 } ], [ @@ -2399,7 +2499,8 @@ exports['src/cypress/runner retries mochaEvents can retry from [afterEach] #1'] "file": null, "invocationDetails": "{Object 8}", "currentRetry": 0, - "retries": -1 + "retries": -1, + "_slow": 10000 } ], [ @@ -2416,7 +2517,8 @@ exports['src/cypress/runner retries mochaEvents can retry from [afterEach] #1'] "file": null, "invocationDetails": "{Object 8}", "currentRetry": 0, - "retries": -1 + "retries": -1, + "_slow": 10000 } ], [ @@ -2432,7 +2534,8 @@ exports['src/cypress/runner retries mochaEvents can retry from [afterEach] #1'] "file": null, "invocationDetails": "{Object 8}", "currentRetry": 0, - "retries": -1 + "retries": -1, + "_slow": 10000 } ], [ @@ -2449,7 +2552,8 @@ exports['src/cypress/runner retries mochaEvents can retry from [afterEach] #1'] "file": null, "invocationDetails": "{Object 8}", "currentRetry": 0, - "retries": -1 + "retries": -1, + "_slow": 10000 } ], [ @@ -2465,7 +2569,8 @@ exports['src/cypress/runner retries mochaEvents can retry from [afterEach] #1'] "file": "relative/path/to/spec.js", "invocationDetails": "{Object 8}", "currentRetry": 0, - "retries": -1 + "retries": -1, + "_slow": 10000 } ], [ @@ -2531,7 +2636,8 @@ exports['src/cypress/runner retries mochaEvents can retry from [afterEach] #1'] "invocationDetails": "{Object 8}", "final": false, "currentRetry": 0, - "retries": 2 + "retries": 2, + "_slow": 10000 }, { "message": "[error message]", @@ -2562,7 +2668,8 @@ exports['src/cypress/runner retries mochaEvents can retry from [afterEach] #1'] "file": "relative/path/to/spec.js", "invocationDetails": "{Object 8}", "currentRetry": 0, - "retries": -1 + "retries": -1, + "_slow": 10000 } ], [ @@ -2629,7 +2736,8 @@ exports['src/cypress/runner retries mochaEvents can retry from [afterEach] #1'] "invocationDetails": "{Object 8}", "final": false, "currentRetry": 0, - "retries": 2 + "retries": 2, + "_slow": 10000 } ], [ @@ -2646,7 +2754,8 @@ exports['src/cypress/runner retries mochaEvents can retry from [afterEach] #1'] "file": null, "invocationDetails": "{Object 8}", "currentRetry": 0, - "retries": -1 + "retries": -1, + "_slow": 10000 } ], [ @@ -2660,7 +2769,8 @@ exports['src/cypress/runner retries mochaEvents can retry from [afterEach] #1'] "wallClockStartedAt": "match.date", "file": null, "currentRetry": 1, - "retries": 2 + "retries": 2, + "_slow": 10000 } ], [ @@ -2677,7 +2787,8 @@ exports['src/cypress/runner retries mochaEvents can retry from [afterEach] #1'] "file": null, "invocationDetails": "{Object 8}", "currentRetry": 0, - "retries": -1 + "retries": -1, + "_slow": 10000 } ], [ @@ -2694,7 +2805,8 @@ exports['src/cypress/runner retries mochaEvents can retry from [afterEach] #1'] "file": null, "invocationDetails": "{Object 8}", "currentRetry": 0, - "retries": -1 + "retries": -1, + "_slow": 10000 } ], [ @@ -2711,7 +2823,8 @@ exports['src/cypress/runner retries mochaEvents can retry from [afterEach] #1'] "file": null, "invocationDetails": "{Object 8}", "currentRetry": 0, - "retries": -1 + "retries": -1, + "_slow": 10000 } ], [ @@ -2728,7 +2841,8 @@ exports['src/cypress/runner retries mochaEvents can retry from [afterEach] #1'] "file": null, "invocationDetails": "{Object 8}", "currentRetry": 0, - "retries": -1 + "retries": -1, + "_slow": 10000 } ], [ @@ -2745,7 +2859,8 @@ exports['src/cypress/runner retries mochaEvents can retry from [afterEach] #1'] "file": null, "invocationDetails": "{Object 8}", "currentRetry": 0, - "retries": -1 + "retries": -1, + "_slow": 10000 } ], [ @@ -2769,7 +2884,8 @@ exports['src/cypress/runner retries mochaEvents can retry from [afterEach] #1'] "file": "relative/path/to/spec.js", "invocationDetails": "{Object 8}", "currentRetry": 0, - "retries": -1 + "retries": -1, + "_slow": 10000 } ], [ @@ -2786,7 +2902,8 @@ exports['src/cypress/runner retries mochaEvents can retry from [afterEach] #1'] "file": "relative/path/to/spec.js", "invocationDetails": "{Object 8}", "currentRetry": 0, - "retries": -1 + "retries": -1, + "_slow": 10000 } ], [ @@ -2834,7 +2951,8 @@ exports['src/cypress/runner retries mochaEvents can retry from [afterEach] #1'] "file": null, "final": true, "currentRetry": 1, - "retries": 2 + "retries": 2, + "_slow": 10000 } ], [ @@ -2882,7 +3000,8 @@ exports['src/cypress/runner retries mochaEvents can retry from [afterEach] #1'] "file": null, "final": true, "currentRetry": 1, - "retries": 2 + "retries": 2, + "_slow": 10000 } ], [ @@ -2931,7 +3050,8 @@ exports['src/cypress/runner retries mochaEvents can retry from [afterEach] #1'] "file": null, "final": true, "currentRetry": 1, - "retries": 2 + "retries": 2, + "_slow": 10000 } ], [ @@ -2946,7 +3066,8 @@ exports['src/cypress/runner retries mochaEvents can retry from [afterEach] #1'] "file": null, "invocationDetails": "{Object 8}", "currentRetry": 0, - "retries": -1 + "retries": -1, + "_slow": 10000 } ], [ @@ -2963,7 +3084,8 @@ exports['src/cypress/runner retries mochaEvents can retry from [afterEach] #1'] "file": null, "invocationDetails": "{Object 8}", "currentRetry": 0, - "retries": -1 + "retries": -1, + "_slow": 10000 } ], [ @@ -2979,7 +3101,8 @@ exports['src/cypress/runner retries mochaEvents can retry from [afterEach] #1'] "file": null, "invocationDetails": "{Object 8}", "currentRetry": 0, - "retries": -1 + "retries": -1, + "_slow": 10000 } ], [ @@ -2996,7 +3119,8 @@ exports['src/cypress/runner retries mochaEvents can retry from [afterEach] #1'] "file": null, "invocationDetails": "{Object 8}", "currentRetry": 0, - "retries": -1 + "retries": -1, + "_slow": 10000 } ], [ @@ -3013,7 +3137,8 @@ exports['src/cypress/runner retries mochaEvents can retry from [afterEach] #1'] "file": null, "invocationDetails": "{Object 8}", "currentRetry": 0, - "retries": -1 + "retries": -1, + "_slow": 10000 } ], [ @@ -3030,7 +3155,8 @@ exports['src/cypress/runner retries mochaEvents can retry from [afterEach] #1'] "file": null, "invocationDetails": "{Object 8}", "currentRetry": 0, - "retries": -1 + "retries": -1, + "_slow": 10000 } ], [ @@ -3047,7 +3173,8 @@ exports['src/cypress/runner retries mochaEvents can retry from [afterEach] #1'] "file": null, "invocationDetails": "{Object 8}", "currentRetry": 0, - "retries": -1 + "retries": -1, + "_slow": 10000 } ], [ @@ -3064,7 +3191,8 @@ exports['src/cypress/runner retries mochaEvents can retry from [afterEach] #1'] "file": null, "invocationDetails": "{Object 8}", "currentRetry": 0, - "retries": -1 + "retries": -1, + "_slow": 10000 } ], [ @@ -3081,7 +3209,8 @@ exports['src/cypress/runner retries mochaEvents can retry from [afterEach] #1'] "file": "relative/path/to/spec.js", "invocationDetails": "{Object 8}", "currentRetry": 0, - "retries": -1 + "retries": -1, + "_slow": 10000 } ], [ @@ -3098,7 +3227,8 @@ exports['src/cypress/runner retries mochaEvents can retry from [afterEach] #1'] "file": "relative/path/to/spec.js", "invocationDetails": "{Object 8}", "currentRetry": 0, - "retries": -1 + "retries": -1, + "_slow": 10000 } ], [ @@ -3148,7 +3278,8 @@ exports['src/cypress/runner retries mochaEvents can retry from [afterEach] #1'] "invocationDetails": "{Object 8}", "final": true, "currentRetry": 0, - "retries": 2 + "retries": 2, + "_slow": 10000 } ], [ @@ -3198,7 +3329,8 @@ exports['src/cypress/runner retries mochaEvents can retry from [afterEach] #1'] "invocationDetails": "{Object 8}", "final": true, "currentRetry": 0, - "retries": 2 + "retries": 2, + "_slow": 10000 } ], [ @@ -3249,7 +3381,8 @@ exports['src/cypress/runner retries mochaEvents can retry from [afterEach] #1'] "invocationDetails": "{Object 8}", "final": true, "currentRetry": 0, - "retries": 2 + "retries": 2, + "_slow": 10000 } ], [ @@ -3264,7 +3397,8 @@ exports['src/cypress/runner retries mochaEvents can retry from [afterEach] #1'] "file": null, "invocationDetails": "{Object 8}", "currentRetry": 0, - "retries": -1 + "retries": -1, + "_slow": 10000 } ], [ @@ -3281,7 +3415,8 @@ exports['src/cypress/runner retries mochaEvents can retry from [afterEach] #1'] "file": null, "invocationDetails": "{Object 8}", "currentRetry": 0, - "retries": -1 + "retries": -1, + "_slow": 10000 } ], [ @@ -3297,7 +3432,8 @@ exports['src/cypress/runner retries mochaEvents can retry from [afterEach] #1'] "file": null, "invocationDetails": "{Object 8}", "currentRetry": 0, - "retries": -1 + "retries": -1, + "_slow": 10000 } ], [ @@ -3314,7 +3450,8 @@ exports['src/cypress/runner retries mochaEvents can retry from [afterEach] #1'] "file": null, "invocationDetails": "{Object 8}", "currentRetry": 0, - "retries": -1 + "retries": -1, + "_slow": 10000 } ], [ @@ -3331,7 +3468,8 @@ exports['src/cypress/runner retries mochaEvents can retry from [afterEach] #1'] "file": null, "invocationDetails": "{Object 8}", "currentRetry": 0, - "retries": -1 + "retries": -1, + "_slow": 10000 } ], [ @@ -3348,7 +3486,8 @@ exports['src/cypress/runner retries mochaEvents can retry from [afterEach] #1'] "file": null, "invocationDetails": "{Object 8}", "currentRetry": 0, - "retries": -1 + "retries": -1, + "_slow": 10000 } ], [ @@ -3365,7 +3504,8 @@ exports['src/cypress/runner retries mochaEvents can retry from [afterEach] #1'] "file": null, "invocationDetails": "{Object 8}", "currentRetry": 0, - "retries": -1 + "retries": -1, + "_slow": 10000 } ], [ @@ -3382,7 +3522,8 @@ exports['src/cypress/runner retries mochaEvents can retry from [afterEach] #1'] "file": null, "invocationDetails": "{Object 8}", "currentRetry": 0, - "retries": -1 + "retries": -1, + "_slow": 10000 } ], [ @@ -3399,7 +3540,8 @@ exports['src/cypress/runner retries mochaEvents can retry from [afterEach] #1'] "file": "relative/path/to/spec.js", "invocationDetails": "{Object 8}", "currentRetry": 0, - "retries": -1 + "retries": -1, + "_slow": 10000 } ], [ @@ -3416,7 +3558,8 @@ exports['src/cypress/runner retries mochaEvents can retry from [afterEach] #1'] "file": "relative/path/to/spec.js", "invocationDetails": "{Object 8}", "currentRetry": 0, - "retries": -1 + "retries": -1, + "_slow": 10000 } ], [ @@ -3432,7 +3575,8 @@ exports['src/cypress/runner retries mochaEvents can retry from [afterEach] #1'] "file": null, "invocationDetails": "{Object 8}", "currentRetry": 0, - "retries": -1 + "retries": -1, + "_slow": 10000 } ], [ @@ -3449,7 +3593,8 @@ exports['src/cypress/runner retries mochaEvents can retry from [afterEach] #1'] "file": null, "invocationDetails": "{Object 8}", "currentRetry": 0, - "retries": -1 + "retries": -1, + "_slow": 10000 } ], [ @@ -3506,7 +3651,8 @@ exports['src/cypress/runner retries mochaEvents can retry from [afterEach] #1'] "invocationDetails": "{Object 8}", "final": true, "currentRetry": 0, - "retries": 2 + "retries": 2, + "_slow": 10000 } ], [ @@ -3563,7 +3709,8 @@ exports['src/cypress/runner retries mochaEvents can retry from [afterEach] #1'] "invocationDetails": "{Object 8}", "final": true, "currentRetry": 0, - "retries": 2 + "retries": 2, + "_slow": 10000 } ], [ @@ -3621,7 +3768,8 @@ exports['src/cypress/runner retries mochaEvents can retry from [afterEach] #1'] "invocationDetails": "{Object 8}", "final": true, "currentRetry": 0, - "retries": 2 + "retries": 2, + "_slow": 10000 } ], [ @@ -3634,7 +3782,8 @@ exports['src/cypress/runner retries mochaEvents can retry from [afterEach] #1'] "type": "suite", "file": null, "invocationDetails": "{Object 8}", - "retries": -1 + "retries": -1, + "_slow": 10000 } ], [ @@ -3647,7 +3796,8 @@ exports['src/cypress/runner retries mochaEvents can retry from [afterEach] #1'] "type": "suite", "file": null, "invocationDetails": "{Object 8}", - "retries": -1 + "retries": -1, + "_slow": 10000 } ], [ @@ -3662,7 +3812,8 @@ exports['src/cypress/runner retries mochaEvents can retry from [afterEach] #1'] "file": null, "invocationDetails": "{Object 8}", "currentRetry": 0, - "retries": -1 + "retries": -1, + "_slow": 10000 } ], [ @@ -3678,7 +3829,8 @@ exports['src/cypress/runner retries mochaEvents can retry from [afterEach] #1'] "file": null, "invocationDetails": "{Object 8}", "currentRetry": 0, - "retries": -1 + "retries": -1, + "_slow": 10000 } ], [ @@ -3694,7 +3846,8 @@ exports['src/cypress/runner retries mochaEvents can retry from [afterEach] #1'] "file": null, "invocationDetails": "{Object 8}", "currentRetry": 0, - "retries": -1 + "retries": -1, + "_slow": 10000 } ], [ @@ -3741,7 +3894,8 @@ exports['src/cypress/runner retries mochaEvents can retry from [afterEach] #1'] "invocationDetails": "{Object 8}", "final": false, "currentRetry": 0, - "retries": 2 + "retries": 2, + "_slow": 10000 }, { "message": "[error message]", @@ -3772,7 +3926,8 @@ exports['src/cypress/runner retries mochaEvents can retry from [afterEach] #1'] "file": null, "invocationDetails": "{Object 8}", "currentRetry": 0, - "retries": -1 + "retries": -1, + "_slow": 10000 } ], [ @@ -3789,7 +3944,8 @@ exports['src/cypress/runner retries mochaEvents can retry from [afterEach] #1'] "file": "relative/path/to/spec.js", "invocationDetails": "{Object 8}", "currentRetry": 0, - "retries": -1 + "retries": -1, + "_slow": 10000 } ], [ @@ -3806,7 +3962,8 @@ exports['src/cypress/runner retries mochaEvents can retry from [afterEach] #1'] "file": "relative/path/to/spec.js", "invocationDetails": "{Object 8}", "currentRetry": 0, - "retries": -1 + "retries": -1, + "_slow": 10000 } ], [ @@ -3854,7 +4011,8 @@ exports['src/cypress/runner retries mochaEvents can retry from [afterEach] #1'] "invocationDetails": "{Object 8}", "final": false, "currentRetry": 0, - "retries": 2 + "retries": 2, + "_slow": 10000 } ], [ @@ -3868,7 +4026,8 @@ exports['src/cypress/runner retries mochaEvents can retry from [afterEach] #1'] "wallClockStartedAt": "match.date", "file": null, "currentRetry": 1, - "retries": 2 + "retries": 2, + "_slow": 10000 } ], [ @@ -3892,7 +4051,8 @@ exports['src/cypress/runner retries mochaEvents can retry from [afterEach] #1'] "file": null, "invocationDetails": "{Object 8}", "currentRetry": 0, - "retries": -1 + "retries": -1, + "_slow": 10000 } ], [ @@ -3937,7 +4097,8 @@ exports['src/cypress/runner retries mochaEvents can retry from [afterEach] #1'] "file": null, "final": false, "currentRetry": 1, - "retries": 2 + "retries": 2, + "_slow": 10000 }, { "message": "[error message]", @@ -3968,7 +4129,8 @@ exports['src/cypress/runner retries mochaEvents can retry from [afterEach] #1'] "file": null, "invocationDetails": "{Object 8}", "currentRetry": 0, - "retries": -1 + "retries": -1, + "_slow": 10000 } ], [ @@ -3985,7 +4147,8 @@ exports['src/cypress/runner retries mochaEvents can retry from [afterEach] #1'] "file": "relative/path/to/spec.js", "invocationDetails": "{Object 8}", "currentRetry": 0, - "retries": -1 + "retries": -1, + "_slow": 10000 } ], [ @@ -4002,7 +4165,8 @@ exports['src/cypress/runner retries mochaEvents can retry from [afterEach] #1'] "file": "relative/path/to/spec.js", "invocationDetails": "{Object 8}", "currentRetry": 0, - "retries": -1 + "retries": -1, + "_slow": 10000 } ], [ @@ -4048,7 +4212,8 @@ exports['src/cypress/runner retries mochaEvents can retry from [afterEach] #1'] "file": null, "final": false, "currentRetry": 1, - "retries": 2 + "retries": 2, + "_slow": 10000 } ], [ @@ -4062,7 +4227,8 @@ exports['src/cypress/runner retries mochaEvents can retry from [afterEach] #1'] "wallClockStartedAt": "match.date", "file": null, "currentRetry": 2, - "retries": 2 + "retries": 2, + "_slow": 10000 } ], [ @@ -4086,7 +4252,8 @@ exports['src/cypress/runner retries mochaEvents can retry from [afterEach] #1'] "file": null, "invocationDetails": "{Object 8}", "currentRetry": 0, - "retries": -1 + "retries": -1, + "_slow": 10000 } ], [ @@ -4103,7 +4270,8 @@ exports['src/cypress/runner retries mochaEvents can retry from [afterEach] #1'] "file": null, "invocationDetails": "{Object 8}", "currentRetry": 0, - "retries": -1 + "retries": -1, + "_slow": 10000 } ], [ @@ -4120,7 +4288,8 @@ exports['src/cypress/runner retries mochaEvents can retry from [afterEach] #1'] "file": "relative/path/to/spec.js", "invocationDetails": "{Object 8}", "currentRetry": 0, - "retries": -1 + "retries": -1, + "_slow": 10000 } ], [ @@ -4137,7 +4306,8 @@ exports['src/cypress/runner retries mochaEvents can retry from [afterEach] #1'] "file": "relative/path/to/spec.js", "invocationDetails": "{Object 8}", "currentRetry": 0, - "retries": -1 + "retries": -1, + "_slow": 10000 } ], [ @@ -4173,7 +4343,8 @@ exports['src/cypress/runner retries mochaEvents can retry from [afterEach] #1'] "file": null, "final": true, "currentRetry": 2, - "retries": 2 + "retries": 2, + "_slow": 10000 } ], [ @@ -4209,7 +4380,8 @@ exports['src/cypress/runner retries mochaEvents can retry from [afterEach] #1'] "file": null, "final": true, "currentRetry": 2, - "retries": 2 + "retries": 2, + "_slow": 10000 } ], [ @@ -4246,7 +4418,8 @@ exports['src/cypress/runner retries mochaEvents can retry from [afterEach] #1'] "file": null, "final": true, "currentRetry": 2, - "retries": 2 + "retries": 2, + "_slow": 10000 } ], [ @@ -4259,7 +4432,8 @@ exports['src/cypress/runner retries mochaEvents can retry from [afterEach] #1'] "type": "suite", "file": null, "invocationDetails": "{Object 8}", - "retries": -1 + "retries": -1, + "_slow": 10000 } ], [ @@ -4272,7 +4446,8 @@ exports['src/cypress/runner retries mochaEvents can retry from [afterEach] #1'] "type": "suite", "file": null, "invocationDetails": "{Object 8}", - "retries": -1 + "retries": -1, + "_slow": 10000 } ], [ @@ -4287,7 +4462,8 @@ exports['src/cypress/runner retries mochaEvents can retry from [afterEach] #1'] "file": null, "invocationDetails": "{Object 8}", "currentRetry": 0, - "retries": -1 + "retries": -1, + "_slow": 10000 } ], [ @@ -4303,7 +4479,8 @@ exports['src/cypress/runner retries mochaEvents can retry from [afterEach] #1'] "file": null, "invocationDetails": "{Object 8}", "currentRetry": 0, - "retries": -1 + "retries": -1, + "_slow": 10000 } ], [ @@ -4320,7 +4497,8 @@ exports['src/cypress/runner retries mochaEvents can retry from [afterEach] #1'] "file": "relative/path/to/spec.js", "invocationDetails": "{Object 8}", "currentRetry": 0, - "retries": -1 + "retries": -1, + "_slow": 10000 } ], [ @@ -4337,7 +4515,8 @@ exports['src/cypress/runner retries mochaEvents can retry from [afterEach] #1'] "file": "relative/path/to/spec.js", "invocationDetails": "{Object 8}", "currentRetry": 0, - "retries": -1 + "retries": -1, + "_slow": 10000 } ], [ @@ -4370,7 +4549,8 @@ exports['src/cypress/runner retries mochaEvents can retry from [afterEach] #1'] "invocationDetails": "{Object 8}", "final": true, "currentRetry": 0, - "retries": 2 + "retries": 2, + "_slow": 10000 } ], [ @@ -4403,7 +4583,8 @@ exports['src/cypress/runner retries mochaEvents can retry from [afterEach] #1'] "invocationDetails": "{Object 8}", "final": true, "currentRetry": 0, - "retries": 2 + "retries": 2, + "_slow": 10000 } ], [ @@ -4416,7 +4597,8 @@ exports['src/cypress/runner retries mochaEvents can retry from [afterEach] #1'] "type": "suite", "file": null, "invocationDetails": "{Object 8}", - "retries": -1 + "retries": -1, + "_slow": 10000 } ], [ @@ -4450,7 +4632,8 @@ exports['src/cypress/runner retries mochaEvents can retry from [afterEach] #1'] "invocationDetails": "{Object 8}", "final": true, "currentRetry": 0, - "retries": 2 + "retries": 2, + "_slow": 10000 } ], [ @@ -4462,7 +4645,8 @@ exports['src/cypress/runner retries mochaEvents can retry from [afterEach] #1'] "root": true, "type": "suite", "file": "relative/path/to/spec.js", - "retries": -1 + "retries": -1, + "_slow": 10000 } ], [ @@ -4491,7 +4675,8 @@ exports['src/cypress/runner retries mochaEvents cant retry from [before] #1'] = "root": true, "type": "suite", "file": "relative/path/to/spec.js", - "retries": -1 + "retries": -1, + "_slow": 10000 } ], [ @@ -4504,7 +4689,8 @@ exports['src/cypress/runner retries mochaEvents cant retry from [before] #1'] = "type": "suite", "file": null, "invocationDetails": "{Object 8}", - "retries": -1 + "retries": -1, + "_slow": 10000 } ], [ @@ -4520,7 +4706,8 @@ exports['src/cypress/runner retries mochaEvents cant retry from [before] #1'] = "file": null, "invocationDetails": "{Object 8}", "currentRetry": 0, - "retries": -1 + "retries": -1, + "_slow": 10000 } ], [ @@ -4536,7 +4723,8 @@ exports['src/cypress/runner retries mochaEvents cant retry from [before] #1'] = "file": null, "invocationDetails": "{Object 8}", "currentRetry": 0, - "retries": -1 + "retries": -1, + "_slow": 10000 } ], [ @@ -4562,7 +4750,8 @@ exports['src/cypress/runner retries mochaEvents cant retry from [before] #1'] = "originalTitle": "\"before all\" hook", "invocationDetails": "{Object 8}", "currentRetry": 0, - "retries": -1 + "retries": -1, + "_slow": 10000 }, { "message": "[error message]", @@ -4585,7 +4774,8 @@ exports['src/cypress/runner retries mochaEvents cant retry from [before] #1'] = "file": null, "invocationDetails": "{Object 8}", "currentRetry": 0, - "retries": -1 + "retries": -1, + "_slow": 10000 } ], [ @@ -4602,7 +4792,8 @@ exports['src/cypress/runner retries mochaEvents cant retry from [before] #1'] = "file": null, "invocationDetails": "{Object 8}", "currentRetry": 0, - "retries": -1 + "retries": -1, + "_slow": 10000 } ], [ @@ -4615,7 +4806,8 @@ exports['src/cypress/runner retries mochaEvents cant retry from [before] #1'] = "type": "suite", "file": null, "invocationDetails": "{Object 8}", - "retries": -1 + "retries": -1, + "_slow": 10000 } ], [ @@ -4660,7 +4852,8 @@ exports['src/cypress/runner retries mochaEvents cant retry from [before] #1'] = "invocationDetails": "{Object 8}", "final": true, "currentRetry": 0, - "retries": 1 + "retries": 1, + "_slow": 10000 } ], [ @@ -4706,7 +4899,8 @@ exports['src/cypress/runner retries mochaEvents cant retry from [before] #1'] = "invocationDetails": "{Object 8}", "final": true, "currentRetry": 0, - "retries": 1 + "retries": 1, + "_slow": 10000 } ], [ @@ -4718,7 +4912,8 @@ exports['src/cypress/runner retries mochaEvents cant retry from [before] #1'] = "root": true, "type": "suite", "file": "relative/path/to/spec.js", - "retries": -1 + "retries": -1, + "_slow": 10000 } ], [ @@ -4747,7 +4942,8 @@ exports['src/cypress/runner retries mochaEvents cant retry from [after] #1'] = [ "root": true, "type": "suite", "file": "relative/path/to/spec.js", - "retries": -1 + "retries": -1, + "_slow": 10000 } ], [ @@ -4760,7 +4956,8 @@ exports['src/cypress/runner retries mochaEvents cant retry from [after] #1'] = [ "type": "suite", "file": null, "invocationDetails": "{Object 8}", - "retries": -1 + "retries": -1, + "_slow": 10000 } ], [ @@ -4776,7 +4973,8 @@ exports['src/cypress/runner retries mochaEvents cant retry from [after] #1'] = [ "file": null, "invocationDetails": "{Object 8}", "currentRetry": 0, - "retries": -1 + "retries": -1, + "_slow": 10000 } ], [ @@ -4792,7 +4990,8 @@ exports['src/cypress/runner retries mochaEvents cant retry from [after] #1'] = [ "file": null, "invocationDetails": "{Object 8}", "currentRetry": 0, - "retries": -1 + "retries": -1, + "_slow": 10000 } ], [ @@ -4809,7 +5008,8 @@ exports['src/cypress/runner retries mochaEvents cant retry from [after] #1'] = [ "file": null, "invocationDetails": "{Object 8}", "currentRetry": 0, - "retries": -1 + "retries": -1, + "_slow": 10000 } ], [ @@ -4870,7 +5070,8 @@ exports['src/cypress/runner retries mochaEvents cant retry from [after] #1'] = [ "file": null, "invocationDetails": "{Object 8}", "currentRetry": 0, - "retries": 1 + "retries": 1, + "_slow": 10000 } ], [ @@ -4886,7 +5087,8 @@ exports['src/cypress/runner retries mochaEvents cant retry from [after] #1'] = [ "file": null, "invocationDetails": "{Object 8}", "currentRetry": 0, - "retries": -1 + "retries": -1, + "_slow": 10000 } ], [ @@ -4903,7 +5105,8 @@ exports['src/cypress/runner retries mochaEvents cant retry from [after] #1'] = [ "file": null, "invocationDetails": "{Object 8}", "currentRetry": 0, - "retries": -1 + "retries": -1, + "_slow": 10000 } ], [ @@ -4919,7 +5122,8 @@ exports['src/cypress/runner retries mochaEvents cant retry from [after] #1'] = [ "file": null, "invocationDetails": "{Object 8}", "currentRetry": 0, - "retries": -1 + "retries": -1, + "_slow": 10000 } ], [ @@ -4936,7 +5140,8 @@ exports['src/cypress/runner retries mochaEvents cant retry from [after] #1'] = [ "file": null, "invocationDetails": "{Object 8}", "currentRetry": 0, - "retries": -1 + "retries": -1, + "_slow": 10000 } ], [ @@ -4952,7 +5157,8 @@ exports['src/cypress/runner retries mochaEvents cant retry from [after] #1'] = [ "file": null, "invocationDetails": "{Object 8}", "currentRetry": 0, - "retries": -1 + "retries": -1, + "_slow": 10000 } ], [ @@ -4969,7 +5175,8 @@ exports['src/cypress/runner retries mochaEvents cant retry from [after] #1'] = [ "file": null, "invocationDetails": "{Object 8}", "currentRetry": 0, - "retries": -1 + "retries": -1, + "_slow": 10000 } ], [ @@ -4985,7 +5192,8 @@ exports['src/cypress/runner retries mochaEvents cant retry from [after] #1'] = [ "file": null, "invocationDetails": "{Object 8}", "currentRetry": 0, - "retries": -1 + "retries": -1, + "_slow": 10000 } ], [ @@ -5002,7 +5210,8 @@ exports['src/cypress/runner retries mochaEvents cant retry from [after] #1'] = [ "file": null, "invocationDetails": "{Object 8}", "currentRetry": 0, - "retries": -1 + "retries": -1, + "_slow": 10000 } ], [ @@ -5018,7 +5227,8 @@ exports['src/cypress/runner retries mochaEvents cant retry from [after] #1'] = [ "file": null, "invocationDetails": "{Object 8}", "currentRetry": 0, - "retries": -1 + "retries": -1, + "_slow": 10000 } ], [ @@ -5044,7 +5254,8 @@ exports['src/cypress/runner retries mochaEvents cant retry from [after] #1'] = [ "originalTitle": "\"after all\" hook", "invocationDetails": "{Object 8}", "currentRetry": 0, - "retries": -1 + "retries": -1, + "_slow": 10000 }, { "message": "[error message]", @@ -5124,7 +5335,8 @@ exports['src/cypress/runner retries mochaEvents cant retry from [after] #1'] = [ "invocationDetails": "{Object 8}", "final": true, "currentRetry": 0, - "retries": 1 + "retries": 1, + "_slow": 10000 } ], [ @@ -5137,7 +5349,8 @@ exports['src/cypress/runner retries mochaEvents cant retry from [after] #1'] = [ "type": "suite", "file": null, "invocationDetails": "{Object 8}", - "retries": -1 + "retries": -1, + "_slow": 10000 } ], [ @@ -5211,7 +5424,8 @@ exports['src/cypress/runner retries mochaEvents cant retry from [after] #1'] = [ "invocationDetails": "{Object 8}", "final": true, "currentRetry": 0, - "retries": 1 + "retries": 1, + "_slow": 10000 } ], [ @@ -5223,7 +5437,8 @@ exports['src/cypress/runner retries mochaEvents cant retry from [after] #1'] = [ "root": true, "type": "suite", "file": "relative/path/to/spec.js", - "retries": -1 + "retries": -1, + "_slow": 10000 } ], [ @@ -5252,7 +5467,8 @@ exports['src/cypress/runner retries mochaEvents three tests with retry #1'] = [ "root": true, "type": "suite", "file": "relative/path/to/spec.js", - "retries": -1 + "retries": -1, + "_slow": 10000 } ], [ @@ -5265,7 +5481,8 @@ exports['src/cypress/runner retries mochaEvents three tests with retry #1'] = [ "type": "suite", "file": null, "invocationDetails": "{Object 8}", - "retries": -1 + "retries": -1, + "_slow": 10000 } ], [ @@ -5281,7 +5498,8 @@ exports['src/cypress/runner retries mochaEvents three tests with retry #1'] = [ "file": null, "invocationDetails": "{Object 8}", "currentRetry": 0, - "retries": -1 + "retries": -1, + "_slow": 10000 } ], [ @@ -5297,7 +5515,8 @@ exports['src/cypress/runner retries mochaEvents three tests with retry #1'] = [ "file": null, "invocationDetails": "{Object 8}", "currentRetry": 0, - "retries": -1 + "retries": -1, + "_slow": 10000 } ], [ @@ -5314,7 +5533,8 @@ exports['src/cypress/runner retries mochaEvents three tests with retry #1'] = [ "file": null, "invocationDetails": "{Object 8}", "currentRetry": 0, - "retries": -1 + "retries": -1, + "_slow": 10000 } ], [ @@ -5358,7 +5578,8 @@ exports['src/cypress/runner retries mochaEvents three tests with retry #1'] = [ "file": null, "invocationDetails": "{Object 8}", "currentRetry": 0, - "retries": 2 + "retries": 2, + "_slow": 10000 } ], [ @@ -5374,7 +5595,8 @@ exports['src/cypress/runner retries mochaEvents three tests with retry #1'] = [ "file": null, "invocationDetails": "{Object 8}", "currentRetry": 0, - "retries": -1 + "retries": -1, + "_slow": 10000 } ], [ @@ -5391,7 +5613,8 @@ exports['src/cypress/runner retries mochaEvents three tests with retry #1'] = [ "file": null, "invocationDetails": "{Object 8}", "currentRetry": 0, - "retries": -1 + "retries": -1, + "_slow": 10000 } ], [ @@ -5407,7 +5630,8 @@ exports['src/cypress/runner retries mochaEvents three tests with retry #1'] = [ "file": null, "invocationDetails": "{Object 8}", "currentRetry": 0, - "retries": -1 + "retries": -1, + "_slow": 10000 } ], [ @@ -5424,7 +5648,8 @@ exports['src/cypress/runner retries mochaEvents three tests with retry #1'] = [ "file": null, "invocationDetails": "{Object 8}", "currentRetry": 0, - "retries": -1 + "retries": -1, + "_slow": 10000 } ], [ @@ -5471,7 +5696,8 @@ exports['src/cypress/runner retries mochaEvents three tests with retry #1'] = [ "invocationDetails": "{Object 8}", "final": true, "currentRetry": 0, - "retries": 2 + "retries": 2, + "_slow": 10000 } ], [ @@ -5518,7 +5744,8 @@ exports['src/cypress/runner retries mochaEvents three tests with retry #1'] = [ "invocationDetails": "{Object 8}", "final": true, "currentRetry": 0, - "retries": 2 + "retries": 2, + "_slow": 10000 } ], [ @@ -5566,7 +5793,8 @@ exports['src/cypress/runner retries mochaEvents three tests with retry #1'] = [ "invocationDetails": "{Object 8}", "final": true, "currentRetry": 0, - "retries": 2 + "retries": 2, + "_slow": 10000 } ], [ @@ -5581,7 +5809,8 @@ exports['src/cypress/runner retries mochaEvents three tests with retry #1'] = [ "file": null, "invocationDetails": "{Object 8}", "currentRetry": 0, - "retries": -1 + "retries": -1, + "_slow": 10000 } ], [ @@ -5598,7 +5827,8 @@ exports['src/cypress/runner retries mochaEvents three tests with retry #1'] = [ "file": null, "invocationDetails": "{Object 8}", "currentRetry": 0, - "retries": -1 + "retries": -1, + "_slow": 10000 } ], [ @@ -5614,7 +5844,8 @@ exports['src/cypress/runner retries mochaEvents three tests with retry #1'] = [ "file": null, "invocationDetails": "{Object 8}", "currentRetry": 0, - "retries": -1 + "retries": -1, + "_slow": 10000 } ], [ @@ -5631,7 +5862,8 @@ exports['src/cypress/runner retries mochaEvents three tests with retry #1'] = [ "file": null, "invocationDetails": "{Object 8}", "currentRetry": 0, - "retries": -1 + "retries": -1, + "_slow": 10000 } ], [ @@ -5678,7 +5910,8 @@ exports['src/cypress/runner retries mochaEvents three tests with retry #1'] = [ "invocationDetails": "{Object 8}", "final": false, "currentRetry": 0, - "retries": 2 + "retries": 2, + "_slow": 10000 }, { "message": "[error message]", @@ -5702,7 +5935,8 @@ exports['src/cypress/runner retries mochaEvents three tests with retry #1'] = [ "file": null, "invocationDetails": "{Object 8}", "currentRetry": 0, - "retries": -1 + "retries": -1, + "_slow": 10000 } ], [ @@ -5719,7 +5953,8 @@ exports['src/cypress/runner retries mochaEvents three tests with retry #1'] = [ "file": null, "invocationDetails": "{Object 8}", "currentRetry": 0, - "retries": -1 + "retries": -1, + "_slow": 10000 } ], [ @@ -5767,7 +6002,8 @@ exports['src/cypress/runner retries mochaEvents three tests with retry #1'] = [ "invocationDetails": "{Object 8}", "final": false, "currentRetry": 0, - "retries": 2 + "retries": 2, + "_slow": 10000 } ], [ @@ -5784,7 +6020,8 @@ exports['src/cypress/runner retries mochaEvents three tests with retry #1'] = [ "file": null, "invocationDetails": "{Object 8}", "currentRetry": 0, - "retries": -1 + "retries": -1, + "_slow": 10000 } ], [ @@ -5798,7 +6035,8 @@ exports['src/cypress/runner retries mochaEvents three tests with retry #1'] = [ "wallClockStartedAt": "match.date", "file": null, "currentRetry": 1, - "retries": 2 + "retries": 2, + "_slow": 10000 } ], [ @@ -5815,7 +6053,8 @@ exports['src/cypress/runner retries mochaEvents three tests with retry #1'] = [ "file": null, "invocationDetails": "{Object 8}", "currentRetry": 0, - "retries": -1 + "retries": -1, + "_slow": 10000 } ], [ @@ -5860,7 +6099,8 @@ exports['src/cypress/runner retries mochaEvents three tests with retry #1'] = [ "file": null, "final": false, "currentRetry": 1, - "retries": 2 + "retries": 2, + "_slow": 10000 }, { "message": "[error message]", @@ -5884,7 +6124,8 @@ exports['src/cypress/runner retries mochaEvents three tests with retry #1'] = [ "file": null, "invocationDetails": "{Object 8}", "currentRetry": 0, - "retries": -1 + "retries": -1, + "_slow": 10000 } ], [ @@ -5901,7 +6142,8 @@ exports['src/cypress/runner retries mochaEvents three tests with retry #1'] = [ "file": null, "invocationDetails": "{Object 8}", "currentRetry": 0, - "retries": -1 + "retries": -1, + "_slow": 10000 } ], [ @@ -5947,7 +6189,8 @@ exports['src/cypress/runner retries mochaEvents three tests with retry #1'] = [ "file": null, "final": false, "currentRetry": 1, - "retries": 2 + "retries": 2, + "_slow": 10000 } ], [ @@ -5964,7 +6207,8 @@ exports['src/cypress/runner retries mochaEvents three tests with retry #1'] = [ "file": null, "invocationDetails": "{Object 8}", "currentRetry": 0, - "retries": -1 + "retries": -1, + "_slow": 10000 } ], [ @@ -5978,7 +6222,8 @@ exports['src/cypress/runner retries mochaEvents three tests with retry #1'] = [ "wallClockStartedAt": "match.date", "file": null, "currentRetry": 2, - "retries": 2 + "retries": 2, + "_slow": 10000 } ], [ @@ -5995,7 +6240,8 @@ exports['src/cypress/runner retries mochaEvents three tests with retry #1'] = [ "file": null, "invocationDetails": "{Object 8}", "currentRetry": 0, - "retries": -1 + "retries": -1, + "_slow": 10000 } ], [ @@ -6012,7 +6258,8 @@ exports['src/cypress/runner retries mochaEvents three tests with retry #1'] = [ "file": null, "invocationDetails": "{Object 8}", "currentRetry": 0, - "retries": -1 + "retries": -1, + "_slow": 10000 } ], [ @@ -6029,7 +6276,8 @@ exports['src/cypress/runner retries mochaEvents three tests with retry #1'] = [ "file": null, "invocationDetails": "{Object 8}", "currentRetry": 0, - "retries": -1 + "retries": -1, + "_slow": 10000 } ], [ @@ -6067,7 +6315,8 @@ exports['src/cypress/runner retries mochaEvents three tests with retry #1'] = [ "file": null, "final": true, "currentRetry": 2, - "retries": 2 + "retries": 2, + "_slow": 10000 } ], [ @@ -6105,7 +6354,8 @@ exports['src/cypress/runner retries mochaEvents three tests with retry #1'] = [ "file": null, "final": true, "currentRetry": 2, - "retries": 2 + "retries": 2, + "_slow": 10000 } ], [ @@ -6144,7 +6394,8 @@ exports['src/cypress/runner retries mochaEvents three tests with retry #1'] = [ "file": null, "final": true, "currentRetry": 2, - "retries": 2 + "retries": 2, + "_slow": 10000 } ], [ @@ -6159,7 +6410,8 @@ exports['src/cypress/runner retries mochaEvents three tests with retry #1'] = [ "file": null, "invocationDetails": "{Object 8}", "currentRetry": 0, - "retries": -1 + "retries": -1, + "_slow": 10000 } ], [ @@ -6176,7 +6428,8 @@ exports['src/cypress/runner retries mochaEvents three tests with retry #1'] = [ "file": null, "invocationDetails": "{Object 8}", "currentRetry": 0, - "retries": -1 + "retries": -1, + "_slow": 10000 } ], [ @@ -6192,7 +6445,8 @@ exports['src/cypress/runner retries mochaEvents three tests with retry #1'] = [ "file": null, "invocationDetails": "{Object 8}", "currentRetry": 0, - "retries": -1 + "retries": -1, + "_slow": 10000 } ], [ @@ -6209,7 +6463,8 @@ exports['src/cypress/runner retries mochaEvents three tests with retry #1'] = [ "file": null, "invocationDetails": "{Object 8}", "currentRetry": 0, - "retries": -1 + "retries": -1, + "_slow": 10000 } ], [ @@ -6226,7 +6481,8 @@ exports['src/cypress/runner retries mochaEvents three tests with retry #1'] = [ "file": null, "invocationDetails": "{Object 8}", "currentRetry": 0, - "retries": -1 + "retries": -1, + "_slow": 10000 } ], [ @@ -6243,7 +6499,8 @@ exports['src/cypress/runner retries mochaEvents three tests with retry #1'] = [ "file": null, "invocationDetails": "{Object 8}", "currentRetry": 0, - "retries": -1 + "retries": -1, + "_slow": 10000 } ], [ @@ -6259,7 +6516,8 @@ exports['src/cypress/runner retries mochaEvents three tests with retry #1'] = [ "file": null, "invocationDetails": "{Object 8}", "currentRetry": 0, - "retries": -1 + "retries": -1, + "_slow": 10000 } ], [ @@ -6276,7 +6534,8 @@ exports['src/cypress/runner retries mochaEvents three tests with retry #1'] = [ "file": null, "invocationDetails": "{Object 8}", "currentRetry": 0, - "retries": -1 + "retries": -1, + "_slow": 10000 } ], [ @@ -6323,7 +6582,8 @@ exports['src/cypress/runner retries mochaEvents three tests with retry #1'] = [ "invocationDetails": "{Object 8}", "final": true, "currentRetry": 0, - "retries": 2 + "retries": 2, + "_slow": 10000 } ], [ @@ -6370,7 +6630,8 @@ exports['src/cypress/runner retries mochaEvents three tests with retry #1'] = [ "invocationDetails": "{Object 8}", "final": true, "currentRetry": 0, - "retries": 2 + "retries": 2, + "_slow": 10000 } ], [ @@ -6383,7 +6644,8 @@ exports['src/cypress/runner retries mochaEvents three tests with retry #1'] = [ "type": "suite", "file": null, "invocationDetails": "{Object 8}", - "retries": -1 + "retries": -1, + "_slow": 10000 } ], [ @@ -6431,7 +6693,8 @@ exports['src/cypress/runner retries mochaEvents three tests with retry #1'] = [ "invocationDetails": "{Object 8}", "final": true, "currentRetry": 0, - "retries": 2 + "retries": 2, + "_slow": 10000 } ], [ @@ -6443,7 +6706,8 @@ exports['src/cypress/runner retries mochaEvents three tests with retry #1'] = [ "root": true, "type": "suite", "file": "relative/path/to/spec.js", - "retries": -1 + "retries": -1, + "_slow": 10000 } ], [ @@ -6476,8 +6740,8 @@ exports['src/cypress/runner retries mochaEvents screenshots retry screenshot in "height": 660 }, "scaled": false, - "overwrite": false, "blackout": [], + "overwrite": false, "startTime": "match.string", "current": 1, "total": 1 @@ -6496,133 +6760,6 @@ exports['src/cypress/runner retries mochaEvents screenshots retry screenshot in "overwrite": false } -exports['serialize state - retries'] = { - "currentId": "r6", - "tests": { - "r3": { - "id": "r3", - "order": 1, - "title": "test 1", - "state": "passed", - "body": "[body]", - "type": "test", - "duration": 1, - "wallClockStartedAt": "1970-01-01T00:00:00.000Z", - "wallClockDuration": 1, - "timings": { - "lifecycle": 1, - "before all": [ - { - "hookId": "h1", - "fnDuration": 1, - "afterFnDuration": 1 - } - ], - "before each": [ - { - "hookId": "h2", - "fnDuration": 1, - "afterFnDuration": 1 - } - ], - "test": { - "fnDuration": 1, - "afterFnDuration": 1 - }, - "after each": [ - { - "hookId": "h4", - "fnDuration": 1, - "afterFnDuration": 1 - } - ], - "after all": [ - { - "hookId": "h3", - "fnDuration": 1, - "afterFnDuration": 1 - } - ] - }, - "file": null, - "invocationDetails": "{Object 8}", - "final": true, - "currentRetry": 0, - "retries": 1, - "hooks": [], - "prevAttempts": [] - }, - "r5": { - "id": "r5", - "title": "test 1", - "state": "passed", - "body": "[body]", - "type": "test", - "duration": 1, - "wallClockStartedAt": "1970-01-01T00:00:00.000Z", - "wallClockDuration": 1, - "timings": { - "lifecycle": 1, - "test": { - "fnDuration": 1, - "afterFnDuration": 1 - } - }, - "file": null, - "final": true, - "currentRetry": 1, - "retries": 1, - "prevAttempts": [ - { - "id": "r5", - "order": 2, - "title": "test 1", - "err": "{Object 9}", - "state": "failed", - "body": "[body]", - "type": "test", - "duration": 1, - "wallClockStartedAt": "1970-01-01T00:00:00.000Z", - "wallClockDuration": 1, - "timings": { - "lifecycle": 1, - "test": { - "fnDuration": 1, - "afterFnDuration": 1 - } - }, - "file": null, - "invocationDetails": "{Object 8}", - "final": false, - "currentRetry": 0, - "retries": 1, - "hooks": [] - } - ] - } - }, - "startTime": "1970-01-01T00:00:00.000Z", - "emissions": { - "started": { - "r1": true, - "r2": true, - "r3": true, - "r4": true, - "r5": true, - "r6": true - }, - "ended": { - "r3": true, - "r2": true, - "r5": true - } - }, - "passed": 2, - "failed": 0, - "pending": 0, - "numLogs": 0 -} - exports['src/cypress/runner retries mochaEvents cleanses errors before emitting does not try to serialize error with err.actual as DOM node #1'] = [ [ "mocha", @@ -6640,7 +6777,8 @@ exports['src/cypress/runner retries mochaEvents cleanses errors before emitting "root": true, "type": "suite", "file": "relative/path/to/spec.js", - "retries": -1 + "retries": -1, + "_slow": 10000 } ], [ @@ -6655,7 +6793,8 @@ exports['src/cypress/runner retries mochaEvents cleanses errors before emitting "file": null, "invocationDetails": "{Object 8}", "currentRetry": 0, - "retries": -1 + "retries": -1, + "_slow": 10000 } ], [ @@ -6671,7 +6810,8 @@ exports['src/cypress/runner retries mochaEvents cleanses errors before emitting "file": null, "invocationDetails": "{Object 8}", "currentRetry": 0, - "retries": -1 + "retries": -1, + "_slow": 10000 } ], [ @@ -6704,7 +6844,8 @@ exports['src/cypress/runner retries mochaEvents cleanses errors before emitting "invocationDetails": "{Object 8}", "final": false, "currentRetry": 0, - "retries": 2 + "retries": 2, + "_slow": 10000 }, { "message": "[error message]", @@ -6745,7 +6886,8 @@ exports['src/cypress/runner retries mochaEvents cleanses errors before emitting "invocationDetails": "{Object 8}", "final": false, "currentRetry": 0, - "retries": 2 + "retries": 2, + "_slow": 10000 } ], [ @@ -6759,7 +6901,8 @@ exports['src/cypress/runner retries mochaEvents cleanses errors before emitting "wallClockStartedAt": "match.date", "file": null, "currentRetry": 1, - "retries": 2 + "retries": 2, + "_slow": 10000 } ], [ @@ -6790,7 +6933,8 @@ exports['src/cypress/runner retries mochaEvents cleanses errors before emitting "file": null, "final": false, "currentRetry": 1, - "retries": 2 + "retries": 2, + "_slow": 10000 }, { "message": "[error message]", @@ -6829,7 +6973,8 @@ exports['src/cypress/runner retries mochaEvents cleanses errors before emitting "file": null, "final": false, "currentRetry": 1, - "retries": 2 + "retries": 2, + "_slow": 10000 } ], [ @@ -6843,7 +6988,8 @@ exports['src/cypress/runner retries mochaEvents cleanses errors before emitting "wallClockStartedAt": "match.date", "file": null, "currentRetry": 2, - "retries": 2 + "retries": 2, + "_slow": 10000 } ], [ @@ -6873,7 +7019,8 @@ exports['src/cypress/runner retries mochaEvents cleanses errors before emitting }, "file": null, "currentRetry": 2, - "retries": 2 + "retries": 2, + "_slow": 10000 }, { "message": "[error message]", @@ -6911,7 +7058,8 @@ exports['src/cypress/runner retries mochaEvents cleanses errors before emitting "file": null, "final": true, "currentRetry": 2, - "retries": 2 + "retries": 2, + "_slow": 10000 } ], [ @@ -6943,7 +7091,8 @@ exports['src/cypress/runner retries mochaEvents cleanses errors before emitting "file": null, "final": true, "currentRetry": 2, - "retries": 2 + "retries": 2, + "_slow": 10000 } ], [ @@ -6955,7 +7104,8 @@ exports['src/cypress/runner retries mochaEvents cleanses errors before emitting "root": true, "type": "suite", "file": "relative/path/to/spec.js", - "retries": -1 + "retries": -1, + "_slow": 10000 } ], [ @@ -6966,3 +7116,28 @@ exports['src/cypress/runner retries mochaEvents cleanses errors before emitting } ] ] + +exports['serialize state - retries'] = { + "currentId": "r6", + "tests": "{Object 2}", + "startTime": "1970-01-01T00:00:00.000Z", + "emissions": { + "started": { + "r1": true, + "r2": true, + "r3": true, + "r4": true, + "r5": true, + "r6": true + }, + "ended": { + "r3": true, + "r2": true, + "r5": true + } + }, + "passed": 2, + "failed": 0, + "pending": 0, + "numLogs": 0 +} diff --git a/packages/runner/__snapshots__/runner.mochaEvents.spec.js b/packages/runner/__snapshots__/runner.mochaEvents.spec.js index ab30d3da35c3..8aa18f1f22a7 100644 --- a/packages/runner/__snapshots__/runner.mochaEvents.spec.js +++ b/packages/runner/__snapshots__/runner.mochaEvents.spec.js @@ -15,7 +15,8 @@ exports['src/cypress/runner tests finish with correct state hook failures fail i "root": true, "type": "suite", "file": "relative/path/to/spec.js", - "retries": -1 + "retries": -1, + "_slow": 10000 } ], [ @@ -28,7 +29,8 @@ exports['src/cypress/runner tests finish with correct state hook failures fail i "type": "suite", "file": null, "invocationDetails": "{Object 8}", - "retries": -1 + "retries": -1, + "_slow": 10000 } ], [ @@ -44,7 +46,8 @@ exports['src/cypress/runner tests finish with correct state hook failures fail i "file": null, "invocationDetails": "{Object 8}", "currentRetry": 0, - "retries": -1 + "retries": -1, + "_slow": 10000 } ], [ @@ -60,7 +63,8 @@ exports['src/cypress/runner tests finish with correct state hook failures fail i "file": null, "invocationDetails": "{Object 8}", "currentRetry": 0, - "retries": -1 + "retries": -1, + "_slow": 10000 } ], [ @@ -86,7 +90,8 @@ exports['src/cypress/runner tests finish with correct state hook failures fail i "originalTitle": "\"before all\" hook", "invocationDetails": "{Object 8}", "currentRetry": 0, - "retries": -1 + "retries": -1, + "_slow": 10000 }, { "message": "[error message]", @@ -106,7 +111,8 @@ exports['src/cypress/runner tests finish with correct state hook failures fail i "type": "suite", "file": null, "invocationDetails": "{Object 8}", - "retries": -1 + "retries": -1, + "_slow": 10000 } ], [ @@ -144,7 +150,8 @@ exports['src/cypress/runner tests finish with correct state hook failures fail i "invocationDetails": "{Object 8}", "final": true, "currentRetry": 0, - "retries": 0 + "retries": 0, + "_slow": 10000 } ], [ @@ -183,7 +190,8 @@ exports['src/cypress/runner tests finish with correct state hook failures fail i "invocationDetails": "{Object 8}", "final": true, "currentRetry": 0, - "retries": 0 + "retries": 0, + "_slow": 10000 } ], [ @@ -195,7 +203,8 @@ exports['src/cypress/runner tests finish with correct state hook failures fail i "root": true, "type": "suite", "file": "relative/path/to/spec.js", - "retries": -1 + "retries": -1, + "_slow": 10000 } ], [ @@ -224,7 +233,8 @@ exports['src/cypress/runner tests finish with correct state hook failures fail i "root": true, "type": "suite", "file": "relative/path/to/spec.js", - "retries": -1 + "retries": -1, + "_slow": 10000 } ], [ @@ -237,7 +247,8 @@ exports['src/cypress/runner tests finish with correct state hook failures fail i "type": "suite", "file": null, "invocationDetails": "{Object 8}", - "retries": -1 + "retries": -1, + "_slow": 10000 } ], [ @@ -252,7 +263,8 @@ exports['src/cypress/runner tests finish with correct state hook failures fail i "file": null, "invocationDetails": "{Object 8}", "currentRetry": 0, - "retries": -1 + "retries": -1, + "_slow": 10000 } ], [ @@ -268,7 +280,8 @@ exports['src/cypress/runner tests finish with correct state hook failures fail i "file": null, "invocationDetails": "{Object 8}", "currentRetry": 0, - "retries": -1 + "retries": -1, + "_slow": 10000 } ], [ @@ -284,7 +297,8 @@ exports['src/cypress/runner tests finish with correct state hook failures fail i "file": null, "invocationDetails": "{Object 8}", "currentRetry": 0, - "retries": -1 + "retries": -1, + "_slow": 10000 } ], [ @@ -310,7 +324,8 @@ exports['src/cypress/runner tests finish with correct state hook failures fail i "originalTitle": "\"before each\" hook", "invocationDetails": "{Object 8}", "currentRetry": 0, - "retries": -1 + "retries": -1, + "_slow": 10000 }, { "message": "[error message]", @@ -355,7 +370,8 @@ exports['src/cypress/runner tests finish with correct state hook failures fail i "invocationDetails": "{Object 8}", "final": true, "currentRetry": 0, - "retries": 0 + "retries": 0, + "_slow": 10000 } ], [ @@ -368,7 +384,8 @@ exports['src/cypress/runner tests finish with correct state hook failures fail i "type": "suite", "file": null, "invocationDetails": "{Object 8}", - "retries": -1 + "retries": -1, + "_slow": 10000 } ], [ @@ -407,7 +424,8 @@ exports['src/cypress/runner tests finish with correct state hook failures fail i "invocationDetails": "{Object 8}", "final": true, "currentRetry": 0, - "retries": 0 + "retries": 0, + "_slow": 10000 } ], [ @@ -419,7 +437,8 @@ exports['src/cypress/runner tests finish with correct state hook failures fail i "root": true, "type": "suite", "file": "relative/path/to/spec.js", - "retries": -1 + "retries": -1, + "_slow": 10000 } ], [ @@ -448,7 +467,8 @@ exports['src/cypress/runner tests finish with correct state hook failures fail i "root": true, "type": "suite", "file": "relative/path/to/spec.js", - "retries": -1 + "retries": -1, + "_slow": 10000 } ], [ @@ -461,7 +481,8 @@ exports['src/cypress/runner tests finish with correct state hook failures fail i "type": "suite", "file": null, "invocationDetails": "{Object 8}", - "retries": -1 + "retries": -1, + "_slow": 10000 } ], [ @@ -476,7 +497,8 @@ exports['src/cypress/runner tests finish with correct state hook failures fail i "file": null, "invocationDetails": "{Object 8}", "currentRetry": 0, - "retries": -1 + "retries": -1, + "_slow": 10000 } ], [ @@ -492,7 +514,8 @@ exports['src/cypress/runner tests finish with correct state hook failures fail i "file": null, "invocationDetails": "{Object 8}", "currentRetry": 0, - "retries": -1 + "retries": -1, + "_slow": 10000 } ], [ @@ -508,7 +531,8 @@ exports['src/cypress/runner tests finish with correct state hook failures fail i "file": null, "invocationDetails": "{Object 8}", "currentRetry": 0, - "retries": -1 + "retries": -1, + "_slow": 10000 } ], [ @@ -534,7 +558,8 @@ exports['src/cypress/runner tests finish with correct state hook failures fail i "originalTitle": "\"after each\" hook", "invocationDetails": "{Object 8}", "currentRetry": 0, - "retries": -1 + "retries": -1, + "_slow": 10000 }, { "message": "[error message]", @@ -583,7 +608,8 @@ exports['src/cypress/runner tests finish with correct state hook failures fail i "invocationDetails": "{Object 8}", "final": true, "currentRetry": 0, - "retries": 0 + "retries": 0, + "_slow": 10000 } ], [ @@ -596,7 +622,8 @@ exports['src/cypress/runner tests finish with correct state hook failures fail i "type": "suite", "file": null, "invocationDetails": "{Object 8}", - "retries": -1 + "retries": -1, + "_slow": 10000 } ], [ @@ -639,7 +666,8 @@ exports['src/cypress/runner tests finish with correct state hook failures fail i "invocationDetails": "{Object 8}", "final": true, "currentRetry": 0, - "retries": 0 + "retries": 0, + "_slow": 10000 } ], [ @@ -651,7 +679,8 @@ exports['src/cypress/runner tests finish with correct state hook failures fail i "root": true, "type": "suite", "file": "relative/path/to/spec.js", - "retries": -1 + "retries": -1, + "_slow": 10000 } ], [ @@ -680,7 +709,8 @@ exports['src/cypress/runner tests finish with correct state hook failures fail i "root": true, "type": "suite", "file": "relative/path/to/spec.js", - "retries": -1 + "retries": -1, + "_slow": 10000 } ], [ @@ -693,7 +723,8 @@ exports['src/cypress/runner tests finish with correct state hook failures fail i "type": "suite", "file": null, "invocationDetails": "{Object 8}", - "retries": -1 + "retries": -1, + "_slow": 10000 } ], [ @@ -708,7 +739,8 @@ exports['src/cypress/runner tests finish with correct state hook failures fail i "file": null, "invocationDetails": "{Object 8}", "currentRetry": 0, - "retries": -1 + "retries": -1, + "_slow": 10000 } ], [ @@ -724,7 +756,8 @@ exports['src/cypress/runner tests finish with correct state hook failures fail i "file": null, "invocationDetails": "{Object 8}", "currentRetry": 0, - "retries": -1 + "retries": -1, + "_slow": 10000 } ], [ @@ -750,7 +783,8 @@ exports['src/cypress/runner tests finish with correct state hook failures fail i "invocationDetails": "{Object 8}", "final": true, "currentRetry": 0, - "retries": 0 + "retries": 0, + "_slow": 10000 } ], [ @@ -776,7 +810,8 @@ exports['src/cypress/runner tests finish with correct state hook failures fail i "invocationDetails": "{Object 8}", "final": true, "currentRetry": 0, - "retries": 0 + "retries": 0, + "_slow": 10000 } ], [ @@ -803,7 +838,8 @@ exports['src/cypress/runner tests finish with correct state hook failures fail i "invocationDetails": "{Object 8}", "final": true, "currentRetry": 0, - "retries": 0 + "retries": 0, + "_slow": 10000 } ], [ @@ -818,7 +854,8 @@ exports['src/cypress/runner tests finish with correct state hook failures fail i "file": null, "invocationDetails": "{Object 8}", "currentRetry": 0, - "retries": -1 + "retries": -1, + "_slow": 10000 } ], [ @@ -834,7 +871,8 @@ exports['src/cypress/runner tests finish with correct state hook failures fail i "file": null, "invocationDetails": "{Object 8}", "currentRetry": 0, - "retries": -1 + "retries": -1, + "_slow": 10000 } ], [ @@ -850,7 +888,8 @@ exports['src/cypress/runner tests finish with correct state hook failures fail i "file": null, "invocationDetails": "{Object 8}", "currentRetry": 0, - "retries": -1 + "retries": -1, + "_slow": 10000 } ], [ @@ -876,7 +915,8 @@ exports['src/cypress/runner tests finish with correct state hook failures fail i "originalTitle": "\"after all\" hook", "invocationDetails": "{Object 8}", "currentRetry": 0, - "retries": -1 + "retries": -1, + "_slow": 10000 }, { "message": "[error message]", @@ -925,7 +965,8 @@ exports['src/cypress/runner tests finish with correct state hook failures fail i "invocationDetails": "{Object 8}", "final": true, "currentRetry": 0, - "retries": 0 + "retries": 0, + "_slow": 10000 } ], [ @@ -938,7 +979,8 @@ exports['src/cypress/runner tests finish with correct state hook failures fail i "type": "suite", "file": null, "invocationDetails": "{Object 8}", - "retries": -1 + "retries": -1, + "_slow": 10000 } ], [ @@ -981,7 +1023,8 @@ exports['src/cypress/runner tests finish with correct state hook failures fail i "invocationDetails": "{Object 8}", "final": true, "currentRetry": 0, - "retries": 0 + "retries": 0, + "_slow": 10000 } ], [ @@ -993,7 +1036,8 @@ exports['src/cypress/runner tests finish with correct state hook failures fail i "root": true, "type": "suite", "file": "relative/path/to/spec.js", - "retries": -1 + "retries": -1, + "_slow": 10000 } ], [ @@ -1022,7 +1066,8 @@ exports['src/cypress/runner tests finish with correct state mocha grep fail with "root": true, "type": "suite", "file": "relative/path/to/spec.js", - "retries": -1 + "retries": -1, + "_slow": 10000 } ], [ @@ -1035,7 +1080,8 @@ exports['src/cypress/runner tests finish with correct state mocha grep fail with "type": "suite", "file": null, "invocationDetails": "{Object 8}", - "retries": -1 + "retries": -1, + "_slow": 10000 } ], [ @@ -1051,7 +1097,8 @@ exports['src/cypress/runner tests finish with correct state mocha grep fail with "file": null, "invocationDetails": "{Object 8}", "currentRetry": 0, - "retries": -1 + "retries": -1, + "_slow": 10000 } ], [ @@ -1067,7 +1114,8 @@ exports['src/cypress/runner tests finish with correct state mocha grep fail with "file": null, "invocationDetails": "{Object 8}", "currentRetry": 0, - "retries": -1 + "retries": -1, + "_slow": 10000 } ], [ @@ -1084,7 +1132,8 @@ exports['src/cypress/runner tests finish with correct state mocha grep fail with "file": null, "invocationDetails": "{Object 8}", "currentRetry": 0, - "retries": -1 + "retries": -1, + "_slow": 10000 } ], [ @@ -1135,7 +1184,8 @@ exports['src/cypress/runner tests finish with correct state mocha grep fail with "file": null, "invocationDetails": "{Object 8}", "currentRetry": 0, - "retries": 0 + "retries": 0, + "_slow": 10000 } ], [ @@ -1151,7 +1201,8 @@ exports['src/cypress/runner tests finish with correct state mocha grep fail with "file": null, "invocationDetails": "{Object 8}", "currentRetry": 0, - "retries": -1 + "retries": -1, + "_slow": 10000 } ], [ @@ -1168,7 +1219,8 @@ exports['src/cypress/runner tests finish with correct state mocha grep fail with "file": null, "invocationDetails": "{Object 8}", "currentRetry": 0, - "retries": -1 + "retries": -1, + "_slow": 10000 } ], [ @@ -1228,7 +1280,8 @@ exports['src/cypress/runner tests finish with correct state mocha grep fail with "file": null, "invocationDetails": "{Object 8}", "currentRetry": 0, - "retries": 0 + "retries": 0, + "_slow": 10000 }, { "message": "[error message]", @@ -1251,7 +1304,8 @@ exports['src/cypress/runner tests finish with correct state mocha grep fail with "file": null, "invocationDetails": "{Object 8}", "currentRetry": 0, - "retries": -1 + "retries": -1, + "_slow": 10000 } ], [ @@ -1268,7 +1322,8 @@ exports['src/cypress/runner tests finish with correct state mocha grep fail with "file": null, "invocationDetails": "{Object 8}", "currentRetry": 0, - "retries": -1 + "retries": -1, + "_slow": 10000 } ], [ @@ -1284,7 +1339,8 @@ exports['src/cypress/runner tests finish with correct state mocha grep fail with "file": null, "invocationDetails": "{Object 8}", "currentRetry": 0, - "retries": -1 + "retries": -1, + "_slow": 10000 } ], [ @@ -1301,7 +1357,8 @@ exports['src/cypress/runner tests finish with correct state mocha grep fail with "file": null, "invocationDetails": "{Object 8}", "currentRetry": 0, - "retries": -1 + "retries": -1, + "_slow": 10000 } ], [ @@ -1362,7 +1419,8 @@ exports['src/cypress/runner tests finish with correct state mocha grep fail with "invocationDetails": "{Object 8}", "final": true, "currentRetry": 0, - "retries": 0 + "retries": 0, + "_slow": 10000 } ], [ @@ -1375,7 +1433,8 @@ exports['src/cypress/runner tests finish with correct state mocha grep fail with "type": "suite", "file": null, "invocationDetails": "{Object 8}", - "retries": -1 + "retries": -1, + "_slow": 10000 } ], [ @@ -1437,7 +1496,8 @@ exports['src/cypress/runner tests finish with correct state mocha grep fail with "invocationDetails": "{Object 8}", "final": true, "currentRetry": 0, - "retries": 0 + "retries": 0, + "_slow": 10000 } ], [ @@ -1449,7 +1509,8 @@ exports['src/cypress/runner tests finish with correct state mocha grep fail with "root": true, "type": "suite", "file": "relative/path/to/spec.js", - "retries": -1 + "retries": -1, + "_slow": 10000 } ], [ @@ -1478,7 +1539,8 @@ exports['src/cypress/runner tests finish with correct state mocha grep pass with "root": true, "type": "suite", "file": "relative/path/to/spec.js", - "retries": -1 + "retries": -1, + "_slow": 10000 } ], [ @@ -1491,7 +1553,8 @@ exports['src/cypress/runner tests finish with correct state mocha grep pass with "type": "suite", "file": null, "invocationDetails": "{Object 8}", - "retries": -1 + "retries": -1, + "_slow": 10000 } ], [ @@ -1507,7 +1570,8 @@ exports['src/cypress/runner tests finish with correct state mocha grep pass with "file": null, "invocationDetails": "{Object 8}", "currentRetry": 0, - "retries": -1 + "retries": -1, + "_slow": 10000 } ], [ @@ -1523,7 +1587,8 @@ exports['src/cypress/runner tests finish with correct state mocha grep pass with "file": null, "invocationDetails": "{Object 8}", "currentRetry": 0, - "retries": -1 + "retries": -1, + "_slow": 10000 } ], [ @@ -1540,7 +1605,8 @@ exports['src/cypress/runner tests finish with correct state mocha grep pass with "file": null, "invocationDetails": "{Object 8}", "currentRetry": 0, - "retries": -1 + "retries": -1, + "_slow": 10000 } ], [ @@ -1591,7 +1657,8 @@ exports['src/cypress/runner tests finish with correct state mocha grep pass with "file": null, "invocationDetails": "{Object 8}", "currentRetry": 0, - "retries": 0 + "retries": 0, + "_slow": 10000 } ], [ @@ -1607,7 +1674,8 @@ exports['src/cypress/runner tests finish with correct state mocha grep pass with "file": null, "invocationDetails": "{Object 8}", "currentRetry": 0, - "retries": -1 + "retries": -1, + "_slow": 10000 } ], [ @@ -1624,7 +1692,8 @@ exports['src/cypress/runner tests finish with correct state mocha grep pass with "file": null, "invocationDetails": "{Object 8}", "currentRetry": 0, - "retries": -1 + "retries": -1, + "_slow": 10000 } ], [ @@ -1640,7 +1709,8 @@ exports['src/cypress/runner tests finish with correct state mocha grep pass with "file": null, "invocationDetails": "{Object 8}", "currentRetry": 0, - "retries": -1 + "retries": -1, + "_slow": 10000 } ], [ @@ -1657,7 +1727,8 @@ exports['src/cypress/runner tests finish with correct state mocha grep pass with "file": null, "invocationDetails": "{Object 8}", "currentRetry": 0, - "retries": -1 + "retries": -1, + "_slow": 10000 } ], [ @@ -1673,7 +1744,8 @@ exports['src/cypress/runner tests finish with correct state mocha grep pass with "file": null, "invocationDetails": "{Object 8}", "currentRetry": 0, - "retries": -1 + "retries": -1, + "_slow": 10000 } ], [ @@ -1690,7 +1762,8 @@ exports['src/cypress/runner tests finish with correct state mocha grep pass with "file": null, "invocationDetails": "{Object 8}", "currentRetry": 0, - "retries": -1 + "retries": -1, + "_slow": 10000 } ], [ @@ -1744,7 +1817,8 @@ exports['src/cypress/runner tests finish with correct state mocha grep pass with "invocationDetails": "{Object 8}", "final": true, "currentRetry": 0, - "retries": 0 + "retries": 0, + "_slow": 10000 } ], [ @@ -1798,7 +1872,8 @@ exports['src/cypress/runner tests finish with correct state mocha grep pass with "invocationDetails": "{Object 8}", "final": true, "currentRetry": 0, - "retries": 0 + "retries": 0, + "_slow": 10000 } ], [ @@ -1811,7 +1886,8 @@ exports['src/cypress/runner tests finish with correct state mocha grep pass with "type": "suite", "file": null, "invocationDetails": "{Object 8}", - "retries": -1 + "retries": -1, + "_slow": 10000 } ], [ @@ -1866,7 +1942,8 @@ exports['src/cypress/runner tests finish with correct state mocha grep pass with "invocationDetails": "{Object 8}", "final": true, "currentRetry": 0, - "retries": 0 + "retries": 0, + "_slow": 10000 } ], [ @@ -1878,7 +1955,8 @@ exports['src/cypress/runner tests finish with correct state mocha grep pass with "root": true, "type": "suite", "file": "relative/path/to/spec.js", - "retries": -1 + "retries": -1, + "_slow": 10000 } ], [ @@ -1939,8 +2017,8 @@ exports['src/cypress/runner other specs screenshots screenshot after failed test "height": 660 }, "scaled": true, - "overwrite": false, "blackout": [], + "overwrite": false, "startTime": "1970-01-01T00:00:00.000Z" } ] @@ -1963,7 +2041,8 @@ exports['src/cypress/runner mocha events simple single test #1'] = [ "root": true, "type": "suite", "file": "relative/path/to/spec.js", - "retries": -1 + "retries": -1, + "_slow": 10000 } ], [ @@ -1976,7 +2055,8 @@ exports['src/cypress/runner mocha events simple single test #1'] = [ "type": "suite", "file": null, "invocationDetails": "{Object 8}", - "retries": -1 + "retries": -1, + "_slow": 10000 } ], [ @@ -1991,7 +2071,8 @@ exports['src/cypress/runner mocha events simple single test #1'] = [ "file": null, "invocationDetails": "{Object 8}", "currentRetry": 0, - "retries": -1 + "retries": -1, + "_slow": 10000 } ], [ @@ -2007,7 +2088,8 @@ exports['src/cypress/runner mocha events simple single test #1'] = [ "file": null, "invocationDetails": "{Object 8}", "currentRetry": 0, - "retries": -1 + "retries": -1, + "_slow": 10000 } ], [ @@ -2033,7 +2115,8 @@ exports['src/cypress/runner mocha events simple single test #1'] = [ "invocationDetails": "{Object 8}", "final": true, "currentRetry": 0, - "retries": 0 + "retries": 0, + "_slow": 10000 } ], [ @@ -2059,7 +2142,8 @@ exports['src/cypress/runner mocha events simple single test #1'] = [ "invocationDetails": "{Object 8}", "final": true, "currentRetry": 0, - "retries": 0 + "retries": 0, + "_slow": 10000 } ], [ @@ -2072,7 +2156,8 @@ exports['src/cypress/runner mocha events simple single test #1'] = [ "type": "suite", "file": null, "invocationDetails": "{Object 8}", - "retries": -1 + "retries": -1, + "_slow": 10000 } ], [ @@ -2099,7 +2184,8 @@ exports['src/cypress/runner mocha events simple single test #1'] = [ "invocationDetails": "{Object 8}", "final": true, "currentRetry": 0, - "retries": 0 + "retries": 0, + "_slow": 10000 } ], [ @@ -2111,7 +2197,8 @@ exports['src/cypress/runner mocha events simple single test #1'] = [ "root": true, "type": "suite", "file": "relative/path/to/spec.js", - "retries": -1 + "retries": -1, + "_slow": 10000 } ], [ @@ -2140,7 +2227,8 @@ exports['src/cypress/runner mocha events simple three tests #1'] = [ "root": true, "type": "suite", "file": "relative/path/to/spec.js", - "retries": -1 + "retries": -1, + "_slow": 10000 } ], [ @@ -2153,7 +2241,8 @@ exports['src/cypress/runner mocha events simple three tests #1'] = [ "type": "suite", "file": null, "invocationDetails": "{Object 8}", - "retries": -1 + "retries": -1, + "_slow": 10000 } ], [ @@ -2169,7 +2258,8 @@ exports['src/cypress/runner mocha events simple three tests #1'] = [ "file": null, "invocationDetails": "{Object 8}", "currentRetry": 0, - "retries": -1 + "retries": -1, + "_slow": 10000 } ], [ @@ -2185,7 +2275,8 @@ exports['src/cypress/runner mocha events simple three tests #1'] = [ "file": null, "invocationDetails": "{Object 8}", "currentRetry": 0, - "retries": -1 + "retries": -1, + "_slow": 10000 } ], [ @@ -2202,7 +2293,8 @@ exports['src/cypress/runner mocha events simple three tests #1'] = [ "file": null, "invocationDetails": "{Object 8}", "currentRetry": 0, - "retries": -1 + "retries": -1, + "_slow": 10000 } ], [ @@ -2246,7 +2338,8 @@ exports['src/cypress/runner mocha events simple three tests #1'] = [ "file": null, "invocationDetails": "{Object 8}", "currentRetry": 0, - "retries": 0 + "retries": 0, + "_slow": 10000 } ], [ @@ -2262,7 +2355,8 @@ exports['src/cypress/runner mocha events simple three tests #1'] = [ "file": null, "invocationDetails": "{Object 8}", "currentRetry": 0, - "retries": -1 + "retries": -1, + "_slow": 10000 } ], [ @@ -2279,7 +2373,8 @@ exports['src/cypress/runner mocha events simple three tests #1'] = [ "file": null, "invocationDetails": "{Object 8}", "currentRetry": 0, - "retries": -1 + "retries": -1, + "_slow": 10000 } ], [ @@ -2295,7 +2390,8 @@ exports['src/cypress/runner mocha events simple three tests #1'] = [ "file": null, "invocationDetails": "{Object 8}", "currentRetry": 0, - "retries": -1 + "retries": -1, + "_slow": 10000 } ], [ @@ -2312,7 +2408,8 @@ exports['src/cypress/runner mocha events simple three tests #1'] = [ "file": null, "invocationDetails": "{Object 8}", "currentRetry": 0, - "retries": -1 + "retries": -1, + "_slow": 10000 } ], [ @@ -2359,7 +2456,8 @@ exports['src/cypress/runner mocha events simple three tests #1'] = [ "invocationDetails": "{Object 8}", "final": true, "currentRetry": 0, - "retries": 0 + "retries": 0, + "_slow": 10000 } ], [ @@ -2406,7 +2504,8 @@ exports['src/cypress/runner mocha events simple three tests #1'] = [ "invocationDetails": "{Object 8}", "final": true, "currentRetry": 0, - "retries": 0 + "retries": 0, + "_slow": 10000 } ], [ @@ -2454,7 +2553,8 @@ exports['src/cypress/runner mocha events simple three tests #1'] = [ "invocationDetails": "{Object 8}", "final": true, "currentRetry": 0, - "retries": 0 + "retries": 0, + "_slow": 10000 } ], [ @@ -2469,7 +2569,8 @@ exports['src/cypress/runner mocha events simple three tests #1'] = [ "file": null, "invocationDetails": "{Object 8}", "currentRetry": 0, - "retries": -1 + "retries": -1, + "_slow": 10000 } ], [ @@ -2486,7 +2587,8 @@ exports['src/cypress/runner mocha events simple three tests #1'] = [ "file": null, "invocationDetails": "{Object 8}", "currentRetry": 0, - "retries": -1 + "retries": -1, + "_slow": 10000 } ], [ @@ -2502,7 +2604,8 @@ exports['src/cypress/runner mocha events simple three tests #1'] = [ "file": null, "invocationDetails": "{Object 8}", "currentRetry": 0, - "retries": -1 + "retries": -1, + "_slow": 10000 } ], [ @@ -2519,7 +2622,8 @@ exports['src/cypress/runner mocha events simple three tests #1'] = [ "file": null, "invocationDetails": "{Object 8}", "currentRetry": 0, - "retries": -1 + "retries": -1, + "_slow": 10000 } ], [ @@ -2536,7 +2640,8 @@ exports['src/cypress/runner mocha events simple three tests #1'] = [ "file": null, "invocationDetails": "{Object 8}", "currentRetry": 0, - "retries": -1 + "retries": -1, + "_slow": 10000 } ], [ @@ -2553,7 +2658,8 @@ exports['src/cypress/runner mocha events simple three tests #1'] = [ "file": null, "invocationDetails": "{Object 8}", "currentRetry": 0, - "retries": -1 + "retries": -1, + "_slow": 10000 } ], [ @@ -2593,7 +2699,8 @@ exports['src/cypress/runner mocha events simple three tests #1'] = [ "invocationDetails": "{Object 8}", "final": true, "currentRetry": 0, - "retries": 0 + "retries": 0, + "_slow": 10000 } ], [ @@ -2633,7 +2740,8 @@ exports['src/cypress/runner mocha events simple three tests #1'] = [ "invocationDetails": "{Object 8}", "final": true, "currentRetry": 0, - "retries": 0 + "retries": 0, + "_slow": 10000 } ], [ @@ -2674,7 +2782,8 @@ exports['src/cypress/runner mocha events simple three tests #1'] = [ "invocationDetails": "{Object 8}", "final": true, "currentRetry": 0, - "retries": 0 + "retries": 0, + "_slow": 10000 } ], [ @@ -2689,7 +2798,8 @@ exports['src/cypress/runner mocha events simple three tests #1'] = [ "file": null, "invocationDetails": "{Object 8}", "currentRetry": 0, - "retries": -1 + "retries": -1, + "_slow": 10000 } ], [ @@ -2706,7 +2816,8 @@ exports['src/cypress/runner mocha events simple three tests #1'] = [ "file": null, "invocationDetails": "{Object 8}", "currentRetry": 0, - "retries": -1 + "retries": -1, + "_slow": 10000 } ], [ @@ -2722,7 +2833,8 @@ exports['src/cypress/runner mocha events simple three tests #1'] = [ "file": null, "invocationDetails": "{Object 8}", "currentRetry": 0, - "retries": -1 + "retries": -1, + "_slow": 10000 } ], [ @@ -2739,7 +2851,8 @@ exports['src/cypress/runner mocha events simple three tests #1'] = [ "file": null, "invocationDetails": "{Object 8}", "currentRetry": 0, - "retries": -1 + "retries": -1, + "_slow": 10000 } ], [ @@ -2756,7 +2869,8 @@ exports['src/cypress/runner mocha events simple three tests #1'] = [ "file": null, "invocationDetails": "{Object 8}", "currentRetry": 0, - "retries": -1 + "retries": -1, + "_slow": 10000 } ], [ @@ -2773,7 +2887,8 @@ exports['src/cypress/runner mocha events simple three tests #1'] = [ "file": null, "invocationDetails": "{Object 8}", "currentRetry": 0, - "retries": -1 + "retries": -1, + "_slow": 10000 } ], [ @@ -2789,7 +2904,8 @@ exports['src/cypress/runner mocha events simple three tests #1'] = [ "file": null, "invocationDetails": "{Object 8}", "currentRetry": 0, - "retries": -1 + "retries": -1, + "_slow": 10000 } ], [ @@ -2806,7 +2922,8 @@ exports['src/cypress/runner mocha events simple three tests #1'] = [ "file": null, "invocationDetails": "{Object 8}", "currentRetry": 0, - "retries": -1 + "retries": -1, + "_slow": 10000 } ], [ @@ -2853,7 +2970,8 @@ exports['src/cypress/runner mocha events simple three tests #1'] = [ "invocationDetails": "{Object 8}", "final": true, "currentRetry": 0, - "retries": 0 + "retries": 0, + "_slow": 10000 } ], [ @@ -2900,7 +3018,8 @@ exports['src/cypress/runner mocha events simple three tests #1'] = [ "invocationDetails": "{Object 8}", "final": true, "currentRetry": 0, - "retries": 0 + "retries": 0, + "_slow": 10000 } ], [ @@ -2913,7 +3032,8 @@ exports['src/cypress/runner mocha events simple three tests #1'] = [ "type": "suite", "file": null, "invocationDetails": "{Object 8}", - "retries": -1 + "retries": -1, + "_slow": 10000 } ], [ @@ -2961,7 +3081,8 @@ exports['src/cypress/runner mocha events simple three tests #1'] = [ "invocationDetails": "{Object 8}", "final": true, "currentRetry": 0, - "retries": 0 + "retries": 0, + "_slow": 10000 } ], [ @@ -2973,7 +3094,8 @@ exports['src/cypress/runner mocha events simple three tests #1'] = [ "root": true, "type": "suite", "file": "relative/path/to/spec.js", - "retries": -1 + "retries": -1, + "_slow": 10000 } ], [ diff --git a/packages/runner/__snapshots__/studio.mochaEvents.spec.js b/packages/runner/__snapshots__/studio.mochaEvents.spec.js index ebb6612843ce..7f02cccca6c6 100644 --- a/packages/runner/__snapshots__/studio.mochaEvents.spec.js +++ b/packages/runner/__snapshots__/studio.mochaEvents.spec.js @@ -15,7 +15,8 @@ exports['studio mocha events only runs a single test by id #1'] = [ "root": true, "type": "suite", "file": "relative/path/to/spec.js", - "retries": -1 + "retries": -1, + "_slow": 10000 } ], [ @@ -28,7 +29,8 @@ exports['studio mocha events only runs a single test by id #1'] = [ "type": "suite", "file": null, "invocationDetails": "{Object 8}", - "retries": -1 + "retries": -1, + "_slow": 10000 } ], [ @@ -43,7 +45,8 @@ exports['studio mocha events only runs a single test by id #1'] = [ "file": null, "invocationDetails": "{Object 8}", "currentRetry": 0, - "retries": -1 + "retries": -1, + "_slow": 10000 } ], [ @@ -59,7 +62,8 @@ exports['studio mocha events only runs a single test by id #1'] = [ "file": null, "invocationDetails": "{Object 8}", "currentRetry": 0, - "retries": -1 + "retries": -1, + "_slow": 10000 } ], [ @@ -85,7 +89,8 @@ exports['studio mocha events only runs a single test by id #1'] = [ "invocationDetails": "{Object 8}", "final": true, "currentRetry": 0, - "retries": 0 + "retries": 0, + "_slow": 10000 } ], [ @@ -111,7 +116,8 @@ exports['studio mocha events only runs a single test by id #1'] = [ "invocationDetails": "{Object 8}", "final": true, "currentRetry": 0, - "retries": 0 + "retries": 0, + "_slow": 10000 } ], [ @@ -124,7 +130,8 @@ exports['studio mocha events only runs a single test by id #1'] = [ "type": "suite", "file": null, "invocationDetails": "{Object 8}", - "retries": -1 + "retries": -1, + "_slow": 10000 } ], [ @@ -151,7 +158,8 @@ exports['studio mocha events only runs a single test by id #1'] = [ "invocationDetails": "{Object 8}", "final": true, "currentRetry": 0, - "retries": 0 + "retries": 0, + "_slow": 10000 } ], [ @@ -163,7 +171,8 @@ exports['studio mocha events only runs a single test by id #1'] = [ "root": true, "type": "suite", "file": "relative/path/to/spec.js", - "retries": -1 + "retries": -1, + "_slow": 10000 } ], [ @@ -192,7 +201,8 @@ exports['studio mocha events creates a new test when adding to a suite #1'] = [ "root": true, "type": "suite", "file": "relative/path/to/spec.js", - "retries": -1 + "retries": -1, + "_slow": 10000 } ], [ @@ -205,7 +215,8 @@ exports['studio mocha events creates a new test when adding to a suite #1'] = [ "type": "suite", "file": null, "invocationDetails": "{Object 8}", - "retries": -1 + "retries": -1, + "_slow": 10000 } ], [ @@ -219,7 +230,8 @@ exports['studio mocha events creates a new test when adding to a suite #1'] = [ "type": "test", "invocationDetails": "{Object 8}", "currentRetry": 0, - "retries": -1 + "retries": -1, + "_slow": 10000 } ], [ @@ -234,7 +246,8 @@ exports['studio mocha events creates a new test when adding to a suite #1'] = [ "wallClockStartedAt": "match.date", "invocationDetails": "{Object 8}", "currentRetry": 0, - "retries": -1 + "retries": -1, + "_slow": 10000 } ], [ @@ -259,7 +272,8 @@ exports['studio mocha events creates a new test when adding to a suite #1'] = [ "invocationDetails": "{Object 8}", "final": true, "currentRetry": 0, - "retries": 0 + "retries": 0, + "_slow": 10000 } ], [ @@ -284,7 +298,8 @@ exports['studio mocha events creates a new test when adding to a suite #1'] = [ "invocationDetails": "{Object 8}", "final": true, "currentRetry": 0, - "retries": 0 + "retries": 0, + "_slow": 10000 } ], [ @@ -297,7 +312,8 @@ exports['studio mocha events creates a new test when adding to a suite #1'] = [ "type": "suite", "file": null, "invocationDetails": "{Object 8}", - "retries": -1 + "retries": -1, + "_slow": 10000 } ], [ @@ -323,7 +339,8 @@ exports['studio mocha events creates a new test when adding to a suite #1'] = [ "invocationDetails": "{Object 8}", "final": true, "currentRetry": 0, - "retries": 0 + "retries": 0, + "_slow": 10000 } ], [ @@ -335,7 +352,156 @@ exports['studio mocha events creates a new test when adding to a suite #1'] = [ "root": true, "type": "suite", "file": "relative/path/to/spec.js", - "retries": -1 + "retries": -1, + "_slow": 10000 + } + ], + [ + "mocha", + "end", + { + "end": "match.date" + } + ] +] + +exports['studio mocha events can add new test to root runnable #1'] = [ + [ + "mocha", + "start", + { + "start": "match.date" + } + ], + [ + "mocha", + "suite", + { + "id": "r1", + "title": "", + "root": true, + "type": "suite", + "file": "relative/path/to/spec.js", + "retries": -1, + "_slow": 10000 + } + ], + [ + "mocha", + "test", + { + "id": "r2", + "order": 1, + "title": "New Test", + "body": "[body]", + "type": "test", + "currentRetry": 0, + "retries": -1, + "_slow": 10000 + } + ], + [ + "mocha", + "test:before:run", + { + "id": "r2", + "order": 1, + "title": "New Test", + "body": "[body]", + "type": "test", + "wallClockStartedAt": "match.date", + "currentRetry": 0, + "retries": -1, + "_slow": 10000 + } + ], + [ + "mocha", + "pass", + { + "id": "r2", + "order": 1, + "title": "New Test", + "state": "passed", + "body": "[body]", + "type": "test", + "duration": "match.number", + "wallClockStartedAt": "match.date", + "timings": { + "lifecycle": "match.number", + "test": { + "fnDuration": "match.number", + "afterFnDuration": "match.number" + } + }, + "final": true, + "currentRetry": 0, + "retries": 0, + "_slow": 10000 + } + ], + [ + "mocha", + "test end", + { + "id": "r2", + "order": 1, + "title": "New Test", + "state": "passed", + "body": "[body]", + "type": "test", + "duration": "match.number", + "wallClockStartedAt": "match.date", + "timings": { + "lifecycle": "match.number", + "test": { + "fnDuration": "match.number", + "afterFnDuration": "match.number" + } + }, + "final": true, + "currentRetry": 0, + "retries": 0, + "_slow": 10000 + } + ], + [ + "mocha", + "test:after:run", + { + "id": "r2", + "order": 1, + "title": "New Test", + "state": "passed", + "body": "[body]", + "type": "test", + "duration": "match.number", + "wallClockStartedAt": "match.date", + "wallClockDuration": "match.number", + "timings": { + "lifecycle": "match.number", + "test": { + "fnDuration": "match.number", + "afterFnDuration": "match.number" + } + }, + "final": true, + "currentRetry": 0, + "retries": 0, + "_slow": 10000 + } + ], + [ + "mocha", + "suite end", + { + "id": "r1", + "title": "", + "root": true, + "type": "suite", + "file": "relative/path/to/spec.js", + "retries": -1, + "_slow": 10000 } ], [ @@ -364,7 +530,8 @@ exports['studio mocha events hooks runs before hooks and test body but not after "root": true, "type": "suite", "file": "relative/path/to/spec.js", - "retries": -1 + "retries": -1, + "_slow": 10000 } ], [ @@ -377,7 +544,8 @@ exports['studio mocha events hooks runs before hooks and test body but not after "type": "suite", "file": null, "invocationDetails": "{Object 8}", - "retries": -1 + "retries": -1, + "_slow": 10000 } ], [ @@ -393,7 +561,8 @@ exports['studio mocha events hooks runs before hooks and test body but not after "file": null, "invocationDetails": "{Object 8}", "currentRetry": 0, - "retries": -1 + "retries": -1, + "_slow": 10000 } ], [ @@ -409,7 +578,8 @@ exports['studio mocha events hooks runs before hooks and test body but not after "file": null, "invocationDetails": "{Object 8}", "currentRetry": 0, - "retries": -1 + "retries": -1, + "_slow": 10000 } ], [ @@ -426,7 +596,8 @@ exports['studio mocha events hooks runs before hooks and test body but not after "file": null, "invocationDetails": "{Object 8}", "currentRetry": 0, - "retries": -1 + "retries": -1, + "_slow": 10000 } ], [ @@ -463,7 +634,8 @@ exports['studio mocha events hooks runs before hooks and test body but not after "file": null, "invocationDetails": "{Object 8}", "currentRetry": 0, - "retries": 0 + "retries": 0, + "_slow": 10000 } ], [ @@ -479,7 +651,8 @@ exports['studio mocha events hooks runs before hooks and test body but not after "file": null, "invocationDetails": "{Object 8}", "currentRetry": 0, - "retries": -1 + "retries": -1, + "_slow": 10000 } ], [ @@ -496,7 +669,8 @@ exports['studio mocha events hooks runs before hooks and test body but not after "file": null, "invocationDetails": "{Object 8}", "currentRetry": 0, - "retries": -1 + "retries": -1, + "_slow": 10000 } ], [ @@ -536,7 +710,8 @@ exports['studio mocha events hooks runs before hooks and test body but not after "invocationDetails": "{Object 8}", "final": true, "currentRetry": 0, - "retries": 0 + "retries": 0, + "_slow": 10000 } ], [ @@ -576,7 +751,8 @@ exports['studio mocha events hooks runs before hooks and test body but not after "invocationDetails": "{Object 8}", "final": true, "currentRetry": 0, - "retries": 0 + "retries": 0, + "_slow": 10000 } ], [ @@ -589,7 +765,8 @@ exports['studio mocha events hooks runs before hooks and test body but not after "type": "suite", "file": null, "invocationDetails": "{Object 8}", - "retries": -1 + "retries": -1, + "_slow": 10000 } ], [ @@ -630,7 +807,8 @@ exports['studio mocha events hooks runs before hooks and test body but not after "invocationDetails": "{Object 8}", "final": true, "currentRetry": 0, - "retries": 0 + "retries": 0, + "_slow": 10000 } ], [ @@ -642,7 +820,8 @@ exports['studio mocha events hooks runs before hooks and test body but not after "root": true, "type": "suite", "file": "relative/path/to/spec.js", - "retries": -1 + "retries": -1, + "_slow": 10000 } ], [ @@ -671,7 +850,8 @@ exports['studio mocha events hooks runs before hooks but not after hooks when ad "root": true, "type": "suite", "file": "relative/path/to/spec.js", - "retries": -1 + "retries": -1, + "_slow": 10000 } ], [ @@ -684,7 +864,8 @@ exports['studio mocha events hooks runs before hooks but not after hooks when ad "type": "suite", "file": null, "invocationDetails": "{Object 8}", - "retries": -1 + "retries": -1, + "_slow": 10000 } ], [ @@ -700,7 +881,8 @@ exports['studio mocha events hooks runs before hooks but not after hooks when ad "file": null, "invocationDetails": "{Object 8}", "currentRetry": 0, - "retries": -1 + "retries": -1, + "_slow": 10000 } ], [ @@ -715,7 +897,8 @@ exports['studio mocha events hooks runs before hooks but not after hooks when ad "wallClockStartedAt": "match.date", "invocationDetails": "{Object 8}", "currentRetry": 0, - "retries": -1 + "retries": -1, + "_slow": 10000 } ], [ @@ -732,7 +915,8 @@ exports['studio mocha events hooks runs before hooks but not after hooks when ad "file": null, "invocationDetails": "{Object 8}", "currentRetry": 0, - "retries": -1 + "retries": -1, + "_slow": 10000 } ], [ @@ -768,7 +952,8 @@ exports['studio mocha events hooks runs before hooks but not after hooks when ad }, "invocationDetails": "{Object 8}", "currentRetry": 0, - "retries": 0 + "retries": 0, + "_slow": 10000 } ], [ @@ -784,7 +969,8 @@ exports['studio mocha events hooks runs before hooks but not after hooks when ad "file": null, "invocationDetails": "{Object 8}", "currentRetry": 0, - "retries": -1 + "retries": -1, + "_slow": 10000 } ], [ @@ -801,7 +987,8 @@ exports['studio mocha events hooks runs before hooks but not after hooks when ad "file": null, "invocationDetails": "{Object 8}", "currentRetry": 0, - "retries": -1 + "retries": -1, + "_slow": 10000 } ], [ @@ -840,7 +1027,8 @@ exports['studio mocha events hooks runs before hooks but not after hooks when ad "invocationDetails": "{Object 8}", "final": true, "currentRetry": 0, - "retries": 0 + "retries": 0, + "_slow": 10000 } ], [ @@ -879,7 +1067,8 @@ exports['studio mocha events hooks runs before hooks but not after hooks when ad "invocationDetails": "{Object 8}", "final": true, "currentRetry": 0, - "retries": 0 + "retries": 0, + "_slow": 10000 } ], [ @@ -892,7 +1081,8 @@ exports['studio mocha events hooks runs before hooks but not after hooks when ad "type": "suite", "file": null, "invocationDetails": "{Object 8}", - "retries": -1 + "retries": -1, + "_slow": 10000 } ], [ @@ -932,7 +1122,8 @@ exports['studio mocha events hooks runs before hooks but not after hooks when ad "invocationDetails": "{Object 8}", "final": true, "currentRetry": 0, - "retries": 0 + "retries": 0, + "_slow": 10000 } ], [ @@ -944,7 +1135,8 @@ exports['studio mocha events hooks runs before hooks but not after hooks when ad "root": true, "type": "suite", "file": "relative/path/to/spec.js", - "retries": -1 + "retries": -1, + "_slow": 10000 } ], [ @@ -973,7 +1165,8 @@ exports['studio mocha events only test can be extended #1'] = [ "root": true, "type": "suite", "file": "relative/path/to/spec.js", - "retries": -1 + "retries": -1, + "_slow": 10000 } ], [ @@ -986,7 +1179,8 @@ exports['studio mocha events only test can be extended #1'] = [ "type": "suite", "file": null, "invocationDetails": "{Object 8}", - "retries": -1 + "retries": -1, + "_slow": 10000 } ], [ @@ -999,7 +1193,8 @@ exports['studio mocha events only test can be extended #1'] = [ "type": "suite", "file": null, "invocationDetails": "{Object 8}", - "retries": -1 + "retries": -1, + "_slow": 10000 } ], [ @@ -1014,7 +1209,8 @@ exports['studio mocha events only test can be extended #1'] = [ "file": null, "invocationDetails": "{Object 8}", "currentRetry": 0, - "retries": -1 + "retries": -1, + "_slow": 10000 } ], [ @@ -1030,7 +1226,8 @@ exports['studio mocha events only test can be extended #1'] = [ "file": null, "invocationDetails": "{Object 8}", "currentRetry": 0, - "retries": -1 + "retries": -1, + "_slow": 10000 } ], [ @@ -1056,7 +1253,8 @@ exports['studio mocha events only test can be extended #1'] = [ "invocationDetails": "{Object 8}", "final": true, "currentRetry": 0, - "retries": 0 + "retries": 0, + "_slow": 10000 } ], [ @@ -1082,7 +1280,8 @@ exports['studio mocha events only test can be extended #1'] = [ "invocationDetails": "{Object 8}", "final": true, "currentRetry": 0, - "retries": 0 + "retries": 0, + "_slow": 10000 } ], [ @@ -1095,7 +1294,8 @@ exports['studio mocha events only test can be extended #1'] = [ "type": "suite", "file": null, "invocationDetails": "{Object 8}", - "retries": -1 + "retries": -1, + "_slow": 10000 } ], [ @@ -1108,7 +1308,8 @@ exports['studio mocha events only test can be extended #1'] = [ "type": "suite", "file": null, "invocationDetails": "{Object 8}", - "retries": -1 + "retries": -1, + "_slow": 10000 } ], [ @@ -1135,7 +1336,8 @@ exports['studio mocha events only test can be extended #1'] = [ "invocationDetails": "{Object 8}", "final": true, "currentRetry": 0, - "retries": 0 + "retries": 0, + "_slow": 10000 } ], [ @@ -1147,7 +1349,8 @@ exports['studio mocha events only test can be extended #1'] = [ "root": true, "type": "suite", "file": "relative/path/to/spec.js", - "retries": -1 + "retries": -1, + "_slow": 10000 } ], [ @@ -1176,7 +1379,8 @@ exports['studio mocha events only test can be extended when there are multiple i "root": true, "type": "suite", "file": "relative/path/to/spec.js", - "retries": -1 + "retries": -1, + "_slow": 10000 } ], [ @@ -1189,7 +1393,8 @@ exports['studio mocha events only test can be extended when there are multiple i "type": "suite", "file": null, "invocationDetails": "{Object 8}", - "retries": -1 + "retries": -1, + "_slow": 10000 } ], [ @@ -1202,7 +1407,8 @@ exports['studio mocha events only test can be extended when there are multiple i "type": "suite", "file": null, "invocationDetails": "{Object 8}", - "retries": -1 + "retries": -1, + "_slow": 10000 } ], [ @@ -1217,7 +1423,8 @@ exports['studio mocha events only test can be extended when there are multiple i "file": null, "invocationDetails": "{Object 8}", "currentRetry": 0, - "retries": -1 + "retries": -1, + "_slow": 10000 } ], [ @@ -1233,7 +1440,8 @@ exports['studio mocha events only test can be extended when there are multiple i "file": null, "invocationDetails": "{Object 8}", "currentRetry": 0, - "retries": -1 + "retries": -1, + "_slow": 10000 } ], [ @@ -1259,7 +1467,8 @@ exports['studio mocha events only test can be extended when there are multiple i "invocationDetails": "{Object 8}", "final": true, "currentRetry": 0, - "retries": 0 + "retries": 0, + "_slow": 10000 } ], [ @@ -1285,7 +1494,8 @@ exports['studio mocha events only test can be extended when there are multiple i "invocationDetails": "{Object 8}", "final": true, "currentRetry": 0, - "retries": 0 + "retries": 0, + "_slow": 10000 } ], [ @@ -1298,7 +1508,8 @@ exports['studio mocha events only test can be extended when there are multiple i "type": "suite", "file": null, "invocationDetails": "{Object 8}", - "retries": -1 + "retries": -1, + "_slow": 10000 } ], [ @@ -1311,7 +1522,8 @@ exports['studio mocha events only test can be extended when there are multiple i "type": "suite", "file": null, "invocationDetails": "{Object 8}", - "retries": -1 + "retries": -1, + "_slow": 10000 } ], [ @@ -1338,7 +1550,8 @@ exports['studio mocha events only test can be extended when there are multiple i "invocationDetails": "{Object 8}", "final": true, "currentRetry": 0, - "retries": 0 + "retries": 0, + "_slow": 10000 } ], [ @@ -1350,7 +1563,8 @@ exports['studio mocha events only test can be extended when there are multiple i "root": true, "type": "suite", "file": "relative/path/to/spec.js", - "retries": -1 + "retries": -1, + "_slow": 10000 } ], [ @@ -1379,7 +1593,8 @@ exports['studio mocha events only test can extend a suite that contains an only "root": true, "type": "suite", "file": "relative/path/to/spec.js", - "retries": -1 + "retries": -1, + "_slow": 10000 } ], [ @@ -1392,7 +1607,8 @@ exports['studio mocha events only test can extend a suite that contains an only "type": "suite", "file": null, "invocationDetails": "{Object 8}", - "retries": -1 + "retries": -1, + "_slow": 10000 } ], [ @@ -1405,7 +1621,8 @@ exports['studio mocha events only test can extend a suite that contains an only "type": "suite", "file": null, "invocationDetails": "{Object 8}", - "retries": -1 + "retries": -1, + "_slow": 10000 } ], [ @@ -1419,7 +1636,8 @@ exports['studio mocha events only test can extend a suite that contains an only "type": "test", "invocationDetails": "{Object 8}", "currentRetry": 0, - "retries": -1 + "retries": -1, + "_slow": 10000 } ], [ @@ -1434,7 +1652,8 @@ exports['studio mocha events only test can extend a suite that contains an only "wallClockStartedAt": "match.date", "invocationDetails": "{Object 8}", "currentRetry": 0, - "retries": -1 + "retries": -1, + "_slow": 10000 } ], [ @@ -1459,7 +1678,8 @@ exports['studio mocha events only test can extend a suite that contains an only "invocationDetails": "{Object 8}", "final": true, "currentRetry": 0, - "retries": 0 + "retries": 0, + "_slow": 10000 } ], [ @@ -1484,7 +1704,8 @@ exports['studio mocha events only test can extend a suite that contains an only "invocationDetails": "{Object 8}", "final": true, "currentRetry": 0, - "retries": 0 + "retries": 0, + "_slow": 10000 } ], [ @@ -1497,7 +1718,8 @@ exports['studio mocha events only test can extend a suite that contains an only "type": "suite", "file": null, "invocationDetails": "{Object 8}", - "retries": -1 + "retries": -1, + "_slow": 10000 } ], [ @@ -1510,7 +1732,8 @@ exports['studio mocha events only test can extend a suite that contains an only "type": "suite", "file": null, "invocationDetails": "{Object 8}", - "retries": -1 + "retries": -1, + "_slow": 10000 } ], [ @@ -1536,7 +1759,8 @@ exports['studio mocha events only test can extend a suite that contains an only "invocationDetails": "{Object 8}", "final": true, "currentRetry": 0, - "retries": 0 + "retries": 0, + "_slow": 10000 } ], [ @@ -1548,7 +1772,8 @@ exports['studio mocha events only test can extend a suite that contains an only "root": true, "type": "suite", "file": "relative/path/to/spec.js", - "retries": -1 + "retries": -1, + "_slow": 10000 } ], [ @@ -1577,7 +1802,8 @@ exports['studio mocha events only suite can be added to #1'] = [ "root": true, "type": "suite", "file": "relative/path/to/spec.js", - "retries": -1 + "retries": -1, + "_slow": 10000 } ], [ @@ -1590,7 +1816,8 @@ exports['studio mocha events only suite can be added to #1'] = [ "type": "suite", "file": null, "invocationDetails": "{Object 8}", - "retries": -1 + "retries": -1, + "_slow": 10000 } ], [ @@ -1603,7 +1830,8 @@ exports['studio mocha events only suite can be added to #1'] = [ "type": "suite", "file": null, "invocationDetails": "{Object 8}", - "retries": -1 + "retries": -1, + "_slow": 10000 } ], [ @@ -1617,7 +1845,8 @@ exports['studio mocha events only suite can be added to #1'] = [ "type": "test", "invocationDetails": "{Object 8}", "currentRetry": 0, - "retries": -1 + "retries": -1, + "_slow": 10000 } ], [ @@ -1632,7 +1861,8 @@ exports['studio mocha events only suite can be added to #1'] = [ "wallClockStartedAt": "match.date", "invocationDetails": "{Object 8}", "currentRetry": 0, - "retries": -1 + "retries": -1, + "_slow": 10000 } ], [ @@ -1657,7 +1887,8 @@ exports['studio mocha events only suite can be added to #1'] = [ "invocationDetails": "{Object 8}", "final": true, "currentRetry": 0, - "retries": 0 + "retries": 0, + "_slow": 10000 } ], [ @@ -1682,7 +1913,8 @@ exports['studio mocha events only suite can be added to #1'] = [ "invocationDetails": "{Object 8}", "final": true, "currentRetry": 0, - "retries": 0 + "retries": 0, + "_slow": 10000 } ], [ @@ -1695,7 +1927,8 @@ exports['studio mocha events only suite can be added to #1'] = [ "type": "suite", "file": null, "invocationDetails": "{Object 8}", - "retries": -1 + "retries": -1, + "_slow": 10000 } ], [ @@ -1708,7 +1941,8 @@ exports['studio mocha events only suite can be added to #1'] = [ "type": "suite", "file": null, "invocationDetails": "{Object 8}", - "retries": -1 + "retries": -1, + "_slow": 10000 } ], [ @@ -1734,7 +1968,8 @@ exports['studio mocha events only suite can be added to #1'] = [ "invocationDetails": "{Object 8}", "final": true, "currentRetry": 0, - "retries": 0 + "retries": 0, + "_slow": 10000 } ], [ @@ -1746,7 +1981,8 @@ exports['studio mocha events only suite can be added to #1'] = [ "root": true, "type": "suite", "file": "relative/path/to/spec.js", - "retries": -1 + "retries": -1, + "_slow": 10000 } ], [ @@ -1775,7 +2011,8 @@ exports['studio mocha events only suite can be added to when there are multiple "root": true, "type": "suite", "file": "relative/path/to/spec.js", - "retries": -1 + "retries": -1, + "_slow": 10000 } ], [ @@ -1788,7 +2025,8 @@ exports['studio mocha events only suite can be added to when there are multiple "type": "suite", "file": null, "invocationDetails": "{Object 8}", - "retries": -1 + "retries": -1, + "_slow": 10000 } ], [ @@ -1801,7 +2039,8 @@ exports['studio mocha events only suite can be added to when there are multiple "type": "suite", "file": null, "invocationDetails": "{Object 8}", - "retries": -1 + "retries": -1, + "_slow": 10000 } ], [ @@ -1815,7 +2054,8 @@ exports['studio mocha events only suite can be added to when there are multiple "type": "test", "invocationDetails": "{Object 8}", "currentRetry": 0, - "retries": -1 + "retries": -1, + "_slow": 10000 } ], [ @@ -1830,7 +2070,8 @@ exports['studio mocha events only suite can be added to when there are multiple "wallClockStartedAt": "match.date", "invocationDetails": "{Object 8}", "currentRetry": 0, - "retries": -1 + "retries": -1, + "_slow": 10000 } ], [ @@ -1855,7 +2096,8 @@ exports['studio mocha events only suite can be added to when there are multiple "invocationDetails": "{Object 8}", "final": true, "currentRetry": 0, - "retries": 0 + "retries": 0, + "_slow": 10000 } ], [ @@ -1880,7 +2122,8 @@ exports['studio mocha events only suite can be added to when there are multiple "invocationDetails": "{Object 8}", "final": true, "currentRetry": 0, - "retries": 0 + "retries": 0, + "_slow": 10000 } ], [ @@ -1893,7 +2136,8 @@ exports['studio mocha events only suite can be added to when there are multiple "type": "suite", "file": null, "invocationDetails": "{Object 8}", - "retries": -1 + "retries": -1, + "_slow": 10000 } ], [ @@ -1906,7 +2150,8 @@ exports['studio mocha events only suite can be added to when there are multiple "type": "suite", "file": null, "invocationDetails": "{Object 8}", - "retries": -1 + "retries": -1, + "_slow": 10000 } ], [ @@ -1932,7 +2177,8 @@ exports['studio mocha events only suite can be added to when there are multiple "invocationDetails": "{Object 8}", "final": true, "currentRetry": 0, - "retries": 0 + "retries": 0, + "_slow": 10000 } ], [ @@ -1944,7 +2190,8 @@ exports['studio mocha events only suite can be added to when there are multiple "root": true, "type": "suite", "file": "relative/path/to/spec.js", - "retries": -1 + "retries": -1, + "_slow": 10000 } ], [ @@ -1973,7 +2220,8 @@ exports['studio mocha events only suite can extend a test within an only suite # "root": true, "type": "suite", "file": "relative/path/to/spec.js", - "retries": -1 + "retries": -1, + "_slow": 10000 } ], [ @@ -1986,7 +2234,8 @@ exports['studio mocha events only suite can extend a test within an only suite # "type": "suite", "file": null, "invocationDetails": "{Object 8}", - "retries": -1 + "retries": -1, + "_slow": 10000 } ], [ @@ -1999,7 +2248,8 @@ exports['studio mocha events only suite can extend a test within an only suite # "type": "suite", "file": null, "invocationDetails": "{Object 8}", - "retries": -1 + "retries": -1, + "_slow": 10000 } ], [ @@ -2014,7 +2264,8 @@ exports['studio mocha events only suite can extend a test within an only suite # "file": null, "invocationDetails": "{Object 8}", "currentRetry": 0, - "retries": -1 + "retries": -1, + "_slow": 10000 } ], [ @@ -2030,7 +2281,8 @@ exports['studio mocha events only suite can extend a test within an only suite # "file": null, "invocationDetails": "{Object 8}", "currentRetry": 0, - "retries": -1 + "retries": -1, + "_slow": 10000 } ], [ @@ -2056,7 +2308,8 @@ exports['studio mocha events only suite can extend a test within an only suite # "invocationDetails": "{Object 8}", "final": true, "currentRetry": 0, - "retries": 0 + "retries": 0, + "_slow": 10000 } ], [ @@ -2082,7 +2335,8 @@ exports['studio mocha events only suite can extend a test within an only suite # "invocationDetails": "{Object 8}", "final": true, "currentRetry": 0, - "retries": 0 + "retries": 0, + "_slow": 10000 } ], [ @@ -2095,7 +2349,8 @@ exports['studio mocha events only suite can extend a test within an only suite # "type": "suite", "file": null, "invocationDetails": "{Object 8}", - "retries": -1 + "retries": -1, + "_slow": 10000 } ], [ @@ -2108,7 +2363,8 @@ exports['studio mocha events only suite can extend a test within an only suite # "type": "suite", "file": null, "invocationDetails": "{Object 8}", - "retries": -1 + "retries": -1, + "_slow": 10000 } ], [ @@ -2135,7 +2391,8 @@ exports['studio mocha events only suite can extend a test within an only suite # "invocationDetails": "{Object 8}", "final": true, "currentRetry": 0, - "retries": 0 + "retries": 0, + "_slow": 10000 } ], [ @@ -2147,7 +2404,8 @@ exports['studio mocha events only suite can extend a test within an only suite # "root": true, "type": "suite", "file": "relative/path/to/spec.js", - "retries": -1 + "retries": -1, + "_slow": 10000 } ], [ @@ -2176,7 +2434,8 @@ exports['studio mocha events only suite can extend a test within an only suite w "root": true, "type": "suite", "file": "relative/path/to/spec.js", - "retries": -1 + "retries": -1, + "_slow": 10000 } ], [ @@ -2189,7 +2448,8 @@ exports['studio mocha events only suite can extend a test within an only suite w "type": "suite", "file": null, "invocationDetails": "{Object 8}", - "retries": -1 + "retries": -1, + "_slow": 10000 } ], [ @@ -2202,7 +2462,8 @@ exports['studio mocha events only suite can extend a test within an only suite w "type": "suite", "file": null, "invocationDetails": "{Object 8}", - "retries": -1 + "retries": -1, + "_slow": 10000 } ], [ @@ -2217,7 +2478,8 @@ exports['studio mocha events only suite can extend a test within an only suite w "file": null, "invocationDetails": "{Object 8}", "currentRetry": 0, - "retries": -1 + "retries": -1, + "_slow": 10000 } ], [ @@ -2233,7 +2495,8 @@ exports['studio mocha events only suite can extend a test within an only suite w "file": null, "invocationDetails": "{Object 8}", "currentRetry": 0, - "retries": -1 + "retries": -1, + "_slow": 10000 } ], [ @@ -2259,7 +2522,8 @@ exports['studio mocha events only suite can extend a test within an only suite w "invocationDetails": "{Object 8}", "final": true, "currentRetry": 0, - "retries": 0 + "retries": 0, + "_slow": 10000 } ], [ @@ -2285,7 +2549,8 @@ exports['studio mocha events only suite can extend a test within an only suite w "invocationDetails": "{Object 8}", "final": true, "currentRetry": 0, - "retries": 0 + "retries": 0, + "_slow": 10000 } ], [ @@ -2298,7 +2563,8 @@ exports['studio mocha events only suite can extend a test within an only suite w "type": "suite", "file": null, "invocationDetails": "{Object 8}", - "retries": -1 + "retries": -1, + "_slow": 10000 } ], [ @@ -2311,7 +2577,8 @@ exports['studio mocha events only suite can extend a test within an only suite w "type": "suite", "file": null, "invocationDetails": "{Object 8}", - "retries": -1 + "retries": -1, + "_slow": 10000 } ], [ @@ -2338,148 +2605,8 @@ exports['studio mocha events only suite can extend a test within an only suite w "invocationDetails": "{Object 8}", "final": true, "currentRetry": 0, - "retries": 0 - } - ], - [ - "mocha", - "suite end", - { - "id": "r1", - "title": "", - "root": true, - "type": "suite", - "file": "relative/path/to/spec.js", - "retries": -1 - } - ], - [ - "mocha", - "end", - { - "end": "match.date" - } - ] -] - -exports['studio mocha events can add new test to root runnable #1'] = [ - [ - "mocha", - "start", - { - "start": "match.date" - } - ], - [ - "mocha", - "suite", - { - "id": "r1", - "title": "", - "root": true, - "type": "suite", - "file": "relative/path/to/spec.js", - "retries": -1 - } - ], - [ - "mocha", - "test", - { - "id": "r2", - "order": 1, - "title": "New Test", - "body": "[body]", - "type": "test", - "currentRetry": 0, - "retries": -1 - } - ], - [ - "mocha", - "test:before:run", - { - "id": "r2", - "order": 1, - "title": "New Test", - "body": "[body]", - "type": "test", - "wallClockStartedAt": "match.date", - "currentRetry": 0, - "retries": -1 - } - ], - [ - "mocha", - "pass", - { - "id": "r2", - "order": 1, - "title": "New Test", - "state": "passed", - "body": "[body]", - "type": "test", - "duration": "match.number", - "wallClockStartedAt": "match.date", - "timings": { - "lifecycle": "match.number", - "test": { - "fnDuration": "match.number", - "afterFnDuration": "match.number" - } - }, - "final": true, - "currentRetry": 0, - "retries": 0 - } - ], - [ - "mocha", - "test end", - { - "id": "r2", - "order": 1, - "title": "New Test", - "state": "passed", - "body": "[body]", - "type": "test", - "duration": "match.number", - "wallClockStartedAt": "match.date", - "timings": { - "lifecycle": "match.number", - "test": { - "fnDuration": "match.number", - "afterFnDuration": "match.number" - } - }, - "final": true, - "currentRetry": 0, - "retries": 0 - } - ], - [ - "mocha", - "test:after:run", - { - "id": "r2", - "order": 1, - "title": "New Test", - "state": "passed", - "body": "[body]", - "type": "test", - "duration": "match.number", - "wallClockStartedAt": "match.date", - "wallClockDuration": "match.number", - "timings": { - "lifecycle": "match.number", - "test": { - "fnDuration": "match.number", - "afterFnDuration": "match.number" - } - }, - "final": true, - "currentRetry": 0, - "retries": 0 + "retries": 0, + "_slow": 10000 } ], [ @@ -2491,7 +2618,8 @@ exports['studio mocha events can add new test to root runnable #1'] = [ "root": true, "type": "suite", "file": "relative/path/to/spec.js", - "retries": -1 + "retries": -1, + "_slow": 10000 } ], [ diff --git a/packages/server/lib/config.ts b/packages/server/lib/config.ts index 16e460e93e94..4edf8fedc133 100644 --- a/packages/server/lib/config.ts +++ b/packages/server/lib/config.ts @@ -257,6 +257,11 @@ export function mergeDefaults (config: Record = {}, options: Record _.defaults(config, defaultValues) + // Default values can be functions, in which case they are evaluated + // at runtime - for example, slowTestThreshold where the default value + // varies between e2e and component testing. + config = _.mapValues(config, (value) => (typeof value === 'function' ? value(options) : value)) + // split out our own app wide env from user env variables // and delete envFile config.env = parseEnv(config, options.env, resolved) @@ -279,7 +284,7 @@ export function mergeDefaults (config: Record = {}, options: Record config.numTestsKeptInMemory = 0 } - config = setResolvedConfigValues(config, defaultValues, resolved) + config = setResolvedConfigValues(config, defaultValues, resolved, options) if (config.port) { config = setUrls(config) @@ -304,10 +309,10 @@ export function mergeDefaults (config: Record = {}, options: Record .then(_.partialRight(setNodeBinary, options.onWarning)) } -export function setResolvedConfigValues (config, defaults, resolved) { +export function setResolvedConfigValues (config, defaults, resolved, options) { const obj = _.clone(config) - obj.resolved = resolveConfigValues(config, defaults, resolved) + obj.resolved = resolveConfigValues(config, defaults, resolved, options) debug('resolved config is %o', obj.resolved.browsers) return obj @@ -412,7 +417,7 @@ export function updateWithPluginValues (cfg, overrides) { // combines the default configuration object with values specified in the // configuration file like "cypress.json". Values in configuration file // overwrite the defaults. -export function resolveConfigValues (config, defaults, resolved = {}) { +export function resolveConfigValues (config, defaults, resolved = {}, options = {}) { // pick out only known configuration keys return _ .chain(config) @@ -436,7 +441,9 @@ export function resolveConfigValues (config, defaults, resolved = {}) { return source(r) } - if (!(!_.isEqual(config[key], defaults[key]) && key !== 'browsers')) { + const defaultValue = typeof defaults[key] === 'function' ? defaults[key](options) : defaults[key] + + if (!(!_.isEqual(config[key], defaultValue) && key !== 'browsers')) { // "browsers" list is special, since it is dynamic by default // and can only be ovewritten via plugins file return source('default') diff --git a/packages/server/lib/config_options.ts b/packages/server/lib/config_options.ts index 2c02b10dada7..8a39f52b4b18 100644 --- a/packages/server/lib/config_options.ts +++ b/packages/server/lib/config_options.ts @@ -216,6 +216,10 @@ export const options = [ defaultValue: 'cypress/screenshots', validation: v.isStringOrFalse, isFolder: true, + }, { + name: 'slowTestThreshold', + defaultValue: (options: Record) => options.testingType === 'component' ? 250 : 10000, + validation: v.isNumber, }, { name: 'socketId', defaultValue: null, diff --git a/packages/server/lib/reporter.js b/packages/server/lib/reporter.js index f4b09fad4f2c..5c5b6135c87e 100644 --- a/packages/server/lib/reporter.js +++ b/packages/server/lib/reporter.js @@ -8,6 +8,7 @@ const Mocha = require('mocha-7.0.1') const mochaReporters = require('mocha-7.0.1/lib/reporters') const mochaCreateStatsCollector = require('mocha-7.0.1/lib/stats-collector') const mochaColor = mochaReporters.Base.color +const mochaSymbols = mochaReporters.Base.symbols const debug = require('debug')('cypress:server:reporter') const Promise = require('bluebird') @@ -293,6 +294,34 @@ class Reporter { reporterOptions: this.reporterOptions, }) + if (this.reporterName === 'spec') { + // Unfortunately the reporter doesn't expose its indentation logic, so we have to replicate it here + let indents = 0 + + this.runner.on('suite', function (suite) { + ++indents + }) + + this.runner.on('suite end', function () { + --indents + }) + + // Override the default reporter to always show test timing even for fast tests + // and display slow ones in yellow rather than red + this.runner._events.pass[2] = function (test) { + const durationColor = test.speed === 'slow' ? 'medium' : 'fast' + const fmt = + Array(indents).join(' ') + + mochaColor('checkmark', ` ${ mochaSymbols.ok}`) + + mochaColor('pass', ' %s') + + mochaColor(durationColor, ' (%dms)') + + // Log: `✓ test title (300ms)` when a test passes + // eslint-disable-next-line no-console + console.log(fmt, test.title, test.duration) + } + } + this.runner.ignoreLeaks = true } diff --git a/packages/server/test/unit/browsers/browsers_spec.js b/packages/server/test/unit/browsers/browsers_spec.js index 4633589351d5..f6fa070ba35b 100644 --- a/packages/server/test/unit/browsers/browsers_spec.js +++ b/packages/server/test/unit/browsers/browsers_spec.js @@ -5,7 +5,7 @@ const utils = require(`${root}../lib/browsers/utils`) const snapshot = require('snap-shot-it') const normalizeBrowsers = (message) => { - return message.replace(/(found on your system are:)((\n.*)*)/, '$1\n- chrome\n- firefox\n- electron') + return message.replace(/(found on your system are:)(?:\n- .*)*/, '$1\n- chrome\n- firefox\n- electron') } // When we added component testing mode, we added the option for electron to be omitted diff --git a/packages/server/test/unit/config_spec.js b/packages/server/test/unit/config_spec.js index 76b0819510b0..6805ce8badb4 100644 --- a/packages/server/test/unit/config_spec.js +++ b/packages/server/test/unit/config_spec.js @@ -1079,6 +1079,14 @@ describe('lib/config', () => { } }) + it('slowTestThreshold=10000 for e2e', function () { + return this.defaults('slowTestThreshold', 10000, {}, { testingType: 'e2e' }) + }) + + it('slowTestThreshold=250 for component', function () { + return this.defaults('slowTestThreshold', 250, {}, { testingType: 'component' }) + }) + it('port=null', function () { return this.defaults('port', null) }) @@ -1462,6 +1470,7 @@ describe('lib/config', () => { retries: { value: { runMode: 0, openMode: 0 }, from: 'default' }, screenshotOnRunFailure: { value: true, from: 'default' }, screenshotsFolder: { value: 'cypress/screenshots', from: 'default' }, + slowTestThreshold: { value: 10000, from: 'default' }, supportFile: { value: 'cypress/support', from: 'default' }, taskTimeout: { value: 60000, from: 'default' }, testFiles: { value: '**/*.*', from: 'default' }, @@ -1568,6 +1577,7 @@ describe('lib/config', () => { retries: { value: { runMode: 0, openMode: 0 }, from: 'default' }, screenshotOnRunFailure: { value: true, from: 'default' }, screenshotsFolder: { value: 'cypress/screenshots', from: 'default' }, + slowTestThreshold: { value: 10000, from: 'default' }, supportFile: { value: 'cypress/support', from: 'default' }, taskTimeout: { value: 60000, from: 'default' }, testFiles: { value: '**/*.*', from: 'default' }, diff --git a/packages/server/test/unit/reporter_spec.js b/packages/server/test/unit/reporter_spec.js index c84db90e43ce..5af7e89b044f 100644 --- a/packages/server/test/unit/reporter_spec.js +++ b/packages/server/test/unit/reporter_spec.js @@ -111,7 +111,6 @@ describe('lib/reporter', () => { it('recursively creates suites for fullTitle', function () { const args = this.reporter.parseArgs('fail', [this.testObj]) - console.log(args) expect(args[0]).to.eq('fail') const title = 'TodoMVC - React When page is initially opened should focus on the todo input field' diff --git a/system-tests/projects/e2e/cypress/integration/slowTestThreshold_spec.js b/system-tests/projects/e2e/cypress/integration/slowTestThreshold_spec.js new file mode 100644 index 000000000000..eac2617bed87 --- /dev/null +++ b/system-tests/projects/e2e/cypress/integration/slowTestThreshold_spec.js @@ -0,0 +1,16 @@ +/* eslint-disable no-undef */ +describe('slowTestThreshold', () => { + it('passes inherited', () => { + cy.wait(5) + cy.wrap(true).should('be.true') + }) + + it('passes quickly', { slowTestThreshold: 10000 }, () => { + cy.wrap(true).should('be.true') + }) + + it('passes slowly', { slowTestThreshold: 1 }, () => { + cy.wait(5) + cy.wrap(true).should('be.true') + }) +}) diff --git a/system-tests/test/reporters_spec.js b/system-tests/test/reporters_spec.js index eb0b65b943f7..1db4b1472658 100644 --- a/system-tests/test/reporters_spec.js +++ b/system-tests/test/reporters_spec.js @@ -145,4 +145,21 @@ describe('e2e reporters', () => { reporterOptions: 'topLevelSuite=top suite,flowId=12345,useStdError=\'true\',useStdError=\'true\',recordHookFailures=\'true\',actualVsExpected=\'true\'', }) }) + + it('shows slow tests in yellow', function () { + return systemTests.exec(this, { + spec: 'slowTestThreshold_spec.js', + snapshot: false, + config: { + slowTestThreshold: 1, + }, + processEnv: { + MOCHA_COLORS: 1, + }, + }).then((result) => { + expect(result.stdout.match(/passes inherited(.*)/)[1]).to.contain('\u001b[33m') + expect(result.stdout.match(/passes quickly(.*)/)[1]).not.to.contain('\u001b[33m') + expect(result.stdout.match(/passes slowly(.*)/)[1]).to.contain('\u001b[33m') + }) + }) }) From 2a7bfc900a7bacac56028d2d60fa00a4ab37c1a9 Mon Sep 17 00:00:00 2001 From: Zach Bloomquist Date: Mon, 25 Oct 2021 17:50:18 -0400 Subject: [PATCH 27/27] release 8.7.0 [skip ci] --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index 4a27a215f7ab..41de4e44d1ac 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "cypress", - "version": "8.6.0", + "version": "8.7.0", "description": "Cypress.io end to end testing tool", "private": true, "scripts": {