Skip to content

Commit

Permalink
Merge remote-tracking branch 'origin/issue-21908' into issue-21908
Browse files Browse the repository at this point in the history
  • Loading branch information
Manuel-Suarez-Abascal committed Dec 30, 2022
2 parents 58865d2 + 1f0f7eb commit fd2019d
Show file tree
Hide file tree
Showing 81 changed files with 933 additions and 2,612 deletions.
1 change: 1 addition & 0 deletions .eslintrc.js
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@ const validators = specifiedRules
)

module.exports = {
root: true,
plugins: [
'@cypress/dev',
'graphql',
Expand Down
1 change: 0 additions & 1 deletion cli/.eslintrc.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
{
"extends": "../.eslintrc.js",
"rules": {
"no-restricted-syntax": [
"error",
Expand Down
5 changes: 0 additions & 5 deletions cli/test/lib/exec/.eslintrc.json

This file was deleted.

11 changes: 1 addition & 10 deletions npm/angular/.eslintrc
Original file line number Diff line number Diff line change
Expand Up @@ -4,14 +4,5 @@
],
"extends": [
"plugin:@cypress/dev/tests"
],
"env": {
"cypress/globals": true
},
"rules": {
"mocha/no-global-tests": "off",
"no-unused-vars": "off",
"no-console": "off",
"@typescript-eslint/no-unused-vars": "off"
}
]
}
26 changes: 2 additions & 24 deletions npm/create-cypress-tests/.eslintrc
Original file line number Diff line number Diff line change
Expand Up @@ -7,32 +7,10 @@
"plugin:@cypress/dev/general",
"plugin:@cypress/dev/tests"
],
"parser": "@typescript-eslint/parser",
"env": {
"cypress/globals": true
},
"rules": {
"no-console": "off",
"mocha/no-global-tests": "off",
"@typescript-eslint/no-unused-vars": "off"
},
"overrides": [
{
"files": [
"lib/*"
],
"rules": {
"no-console": 1
}
},
{
"files": [
"**/*.json"
],
"rules": {
"quotes": "off",
"comma-dangle": "off"
}
}
]
"no-console": "off"
}
}
Original file line number Diff line number Diff line change
@@ -1,11 +1,7 @@
/// <reference path="../../../../../cli/types/mocha/index.d.ts" />

import * as path from 'path'
import { expect } from 'chai'

import * as fs from 'fs-extra'
import { insertValueInJSString, insertValuesInConfigFile } from './configFileUpdater'
const projectRoot = process.cwd()
import { insertValueInJSString } from './configFileUpdater'

// Test util - if needed outside the tests we can move it to utils
const stripIndent = (strings: any, ...args: any) => {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
import _ from 'lodash'
import { parse } from '@babel/parser'
import type { File } from '@babel/types'
import type { NodePath } from 'ast-types/lib/node-path'
Expand Down
3 changes: 1 addition & 2 deletions npm/eslint-plugin-dev/.eslintrc.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,5 @@
"extends": [
"plugin:promise/recommended",
"plugin:@cypress/dev/general"
],
"rules": {}
]
}
5 changes: 0 additions & 5 deletions npm/eslint-plugin-dev/lib/scripts/.eslintrc.json

This file was deleted.

6 changes: 0 additions & 6 deletions npm/eslint-plugin-dev/test/fixtures/.eslintrc

This file was deleted.

4 changes: 1 addition & 3 deletions npm/grep/.eslintrc
Original file line number Diff line number Diff line change
Expand Up @@ -10,9 +10,7 @@
},
"rules": {
"mocha/no-global-tests": "off",
"no-unused-vars": "off",
"no-console": "off",
"@typescript-eslint/no-unused-vars": "off",
"no-restricted-syntax": "off"
}
}
}
2 changes: 1 addition & 1 deletion npm/grep/cypress/e2e/nested-describe-spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ describe('grand', () => {
describe('top', { tags: '@smoke' }, () => {
describe('middle', () => {
context('bottom', { tags: ['@integration', '@fast'] }, () => {
it('runs too', () => {});
it('runs too', () => {})
})
})
})
1 change: 1 addition & 0 deletions npm/grep/cypress/e2e/omit-and-skip-spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
// @ts-check
describe('Page', () => {
describe('List', { tags: ['@us1'] }, () => {
// eslint-disable-next-line @cypress/dev/skip-comment
it.skip('first test', () => {})
it('second test', () => {})
it('third test', () => {})
Expand Down
1 change: 1 addition & 0 deletions npm/grep/cypress/e2e/skip-spec.js
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
/* eslint-disable @cypress/dev/skip-comment */
/// <reference types="cypress" />
describe('tests that use .skip', () => {
// use a template literal
Expand Down
2 changes: 2 additions & 0 deletions npm/grep/cypress/e2e/ts-spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ describe('TypeScript spec', () => {

it('loads', () => {
const n: number = 1

cy.wrap(n).should('eq', 1)
})

Expand All @@ -24,6 +25,7 @@ describe('TypeScript spec', () => {
const p: Person = {
name: 'Joe',
}

cy.wrap(p).should('have.property', 'name', 'Joe')
})
})
3 changes: 2 additions & 1 deletion npm/grep/cypress/support/e2e.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
/// <reference types="cypress" />

import cypressGrep from '../../src/support'

// register the grep feature
// /~https://github.com/cypress-io/cypress-grep
cypressGrep()
cypressGrep()
3 changes: 2 additions & 1 deletion npm/grep/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,8 @@
"main": "src/support.js",
"scripts": {
"cy:run": "node ../../scripts/cypress.js run --config specPattern='**/unit.js'",
"cy:open": "node ../../scripts/cypress.js open --e2e -b electron --config specPattern='**/unit.js'"
"cy:open": "node ../../scripts/cypress.js open --e2e -b electron --config specPattern='**/unit.js'",
"lint": "eslint . --ext .js,.ts"
},
"dependencies": {
"debug": "^4.3.2",
Expand Down
22 changes: 1 addition & 21 deletions npm/react/.eslintrc
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,6 @@
"rules": {
"no-console": "off",
"mocha/no-global-tests": "off",
"@typescript-eslint/no-unused-vars": "off",
"react/jsx-filename-extension": [
"warn",
{
Expand All @@ -30,24 +29,5 @@
]
}
]
},
"overrides": [
{
"files": [
"lib/*"
],
"rules": {
"no-console": 1
}
},
{
"files": [
"**/*.json"
],
"rules": {
"quotes": "off",
"comma-dangle": "off"
}
}
]
}
}
4 changes: 1 addition & 3 deletions npm/svelte/.eslintrc
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,6 @@
},
"rules": {
"mocha/no-global-tests": "off",
"no-unused-vars": "off",
"no-console": "off",
"@typescript-eslint/no-unused-vars": "off"
"no-console": "off"
}
}
2 changes: 1 addition & 1 deletion npm/svelte/src/mount.ts
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ const cleanup = () => {
// Extract the component name from the object passed to mount
const getComponentDisplayName = <T extends SvelteComponent>(Component: SvelteConstructor<T>): string => {
if (Component.name) {
const [_, match] = /Proxy\<(\w+)\>/.exec(Component.name) || []
const [, match] = /Proxy\<(\w+)\>/.exec(Component.name) || []

return match || Component.name
}
Expand Down
22 changes: 1 addition & 21 deletions npm/vite-dev-server/.eslintrc
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,6 @@
"rules": {
"no-console": "off",
"mocha/no-global-tests": "off",
"@typescript-eslint/no-unused-vars": "off",
"react/jsx-filename-extension": [
"warn",
{
Expand All @@ -32,24 +31,5 @@
]
}
]
},
"overrides": [
{
"files": [
"lib/*"
],
"rules": {
"no-console": 1
}
},
{
"files": [
"**/*.json"
],
"rules": {
"quotes": "off",
"comma-dangle": "off"
}
}
]
}
}
2 changes: 1 addition & 1 deletion npm/vite-dev-server/src/devServer.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import debugFn from 'debug'
import type { InlineConfig, UserConfig } from 'vite'
import type { UserConfig } from 'vite'
import { getVite, Vite } from './getVite'
import { createViteDevServerConfig } from './resolveConfig'

Expand Down
2 changes: 0 additions & 2 deletions npm/vue/.eslintrc
Original file line number Diff line number Diff line change
Expand Up @@ -19,9 +19,7 @@
},
"rules": {
"mocha/no-global-tests": "off",
"no-unused-vars": "off",
"no-console": "off",
"@typescript-eslint/no-unused-vars": "off",
"vue/multi-word-component-names": "off"
}
}
2 changes: 1 addition & 1 deletion npm/vue/cypress/component/tailwind/redbox.cy.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { mount, mountCallback } from '@cypress/vue'
import { mount } from '@cypress/vue'
import RedBox from './RedBox.vue'

const tailwindCdnLink = 'https://unpkg.com/tailwindcss@^1.0/dist/tailwind.min.css'
Expand Down
4 changes: 1 addition & 3 deletions npm/vue2/.eslintrc
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,6 @@
},
"rules": {
"mocha/no-global-tests": "off",
"no-unused-vars": "off",
"no-console": "off",
"@typescript-eslint/no-unused-vars": "off"
"no-console": "off"
}
}
1 change: 0 additions & 1 deletion npm/vue2/webpack.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@
// The default for running tests in this project
// https://vue-loader.vuejs.org/guide/#manual-setup
const VueLoaderPlugin = require('vue-loader/lib/plugin')
const HtmlWebpackPlugin = require('html-webpack-plugin')
const path = require('path')
const pkg = require('package.json')

Expand Down
11 changes: 0 additions & 11 deletions npm/webpack-batteries-included-preprocessor/.eslintrc.json

This file was deleted.

7 changes: 7 additions & 0 deletions npm/webpack-dev-server/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,10 @@
# [@cypress/webpack-dev-server-v3.2.1](/~https://github.com/cypress-io/cypress/compare/@cypress/webpack-dev-server-v3.2.0...@cypress/webpack-dev-server-v3.2.1) (2022-12-29)


### Bug Fixes

* Allow component tests with special characters in filepath ([#25299](/~https://github.com/cypress-io/cypress/issues/25299)) ([dc78750](/~https://github.com/cypress-io/cypress/commit/dc7875064bc1ff0193d1f46ef9411f753cf39600))

# [@cypress/webpack-dev-server-v3.2.0](/~https://github.com/cypress-io/cypress/compare/@cypress/webpack-dev-server-v3.1.2...@cypress/webpack-dev-server-v3.2.0) (2022-12-19)


Expand Down
2 changes: 1 addition & 1 deletion npm/webpack-dev-server/src/loader.ts
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ const makeImport = (file: Cypress.Cypress['spec'], filename: string, chunkName:
const magicComments = chunkName ? `/* webpackChunkName: "${chunkName}" */` : ''

return `"${filename}": {
shouldLoad: () => document.location.pathname.includes("${encodeURI(file.absolute)}"),
shouldLoad: () => decodeURI(document.location.pathname).includes("${file.absolute}"),
load: () => import("${file.absolute}" ${magicComments}),
absolute: "${file.absolute.split(path.sep).join(path.posix.sep)}",
relative: "${file.relative.split(path.sep).join(path.posix.sep)}",
Expand Down
11 changes: 0 additions & 11 deletions npm/webpack-preprocessor/.eslintrc.json

This file was deleted.

7 changes: 7 additions & 0 deletions npm/webpack-preprocessor/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,10 @@
# [@cypress/webpack-preprocessor-v5.16.1](/~https://github.com/cypress-io/cypress/compare/@cypress/webpack-preprocessor-v5.16.0...@cypress/webpack-preprocessor-v5.16.1) (2022-12-29)


### Bug Fixes

* added missing pending data which caused incorrect mochaawesome reports ([#25264](/~https://github.com/cypress-io/cypress/issues/25264)) ([6fc13e6](/~https://github.com/cypress-io/cypress/commit/6fc13e6f20f203fd58aa18c0a736414aea5e0556))

# [@cypress/webpack-preprocessor-v5.16.0](/~https://github.com/cypress-io/cypress/compare/@cypress/webpack-preprocessor-v5.15.7...@cypress/webpack-preprocessor-v5.16.0) (2022-12-19)


Expand Down
2 changes: 1 addition & 1 deletion npm/webpack-preprocessor/__snapshots__/compilation.spec.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
exports['webpack preprocessor - e2e correctly preprocesses the file 1'] = `
it("is a test",(function(){expect(1).to.equal(1),expect(2).to.equal(2),expect(Math.min.apply(Math,[3,4])).to.equal(3)}));
//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiZXhhbXBsZV9zcGVjX291dHB1dC5qcyIsIm1hcHBpbmdzIjoiQUFBQUEsR0FBRyxhQUFhLFdBR2RDLE9BRmdCLEdBRU5DLEdBQUdDLE1BQU0sR0FDbkJGLE9BSG1CLEdBR1RDLEdBQUdDLE1BQU0sR0FDbkJGLE9BQU9HLEtBQUtDLElBQUcsTUFBUkQsS0FBWSxDQUFDLEVBQUcsS0FBS0YsR0FBR0MsTUFBTSIsInNvdXJ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hbWVzIjpbIml0IiwiZXhwZWN0IiwidG8iLCJlcXVhbCIsIk1hdGgiLCJtaW4iXSwic291cmNlUm9vdCI6IiJ9
`

exports['webpack preprocessor - e2e has less verbose syntax error 1'] = `
Expand Down
5 changes: 1 addition & 4 deletions npm/xpath/.eslintrc
Original file line number Diff line number Diff line change
Expand Up @@ -9,9 +9,6 @@
"cypress/globals": true
},
"rules": {
"mocha/no-global-tests": "off",
"no-unused-vars": "off",
"no-console": "off",
"@typescript-eslint/no-unused-vars": "off"
"no-console": "off"
}
}
1 change: 1 addition & 0 deletions npm/xpath/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
"description": "Adds XPath command to Cypress.io test runner",
"main": "src",
"scripts": {
"lint": "eslint . --ext .ts,.js",
"cy:run": "node ../../scripts/cypress.js run --e2e",
"cy:open": "node ../../scripts/cypress.js open --e2e --project ${PWD}"
},
Expand Down
Loading

0 comments on commit fd2019d

Please sign in to comment.