add eslint for cypress tests

Signed-off-by: Simon Hötten <s+git@hoetten.org>
This commit is contained in:
Simon Hötten
2022-11-10 21:03:20 +01:00
committed by Julius Härtl
parent 50ca4de351
commit 584675db21
8 changed files with 42 additions and 10 deletions

5
cypress/.eslintrc.js Normal file
View File

@@ -0,0 +1,5 @@
module.exports = {
extends: [
'plugin:cypress/recommended',
],
}

View File

@@ -1,4 +1,4 @@
import { randHash } from '../utils'
import { randHash } from '../utils/index.js'
const randUser = randHash()
describe('Board', function() {

View File

@@ -1,4 +1,4 @@
import { randHash } from '../utils'
import { randHash } from '../utils/index.js'
const randUser = randHash()
const testBoardData = {

View File

@@ -1,4 +1,4 @@
import { randHash } from '../utils'
import { randHash } from '../utils/index.js'
const randUser = randHash()
describe('Deck dashboard', function() {
@@ -14,8 +14,8 @@ describe('Deck dashboard', function() {
it('Can show the right title on the dashboard', function() {
cy.get('.board-title h2')
.should('have.length', 1).first()
.should('have.text', 'Upcoming cards')
.should('have.length', 1).first()
.should('have.text', 'Upcoming cards')
})
it('Can see the default "Personal Board" created for user by default', function() {

View File

@@ -1,4 +1,4 @@
import { randHash } from '../utils'
import { randHash } from '../utils/index.js'
const randUser = randHash()
describe('Stack', function() {

View File

@@ -14,7 +14,7 @@
// ***********************************************************
// Import commands.js using ES2015 syntax:
import './commands'
import './commands.js'
// Alternatively you can use CommonJS syntax:
// require('./commands')

31
package-lock.json generated
View File

@@ -53,6 +53,7 @@
"@relative-ci/agent": "^4.1.3",
"@vue/test-utils": "^1.3.3",
"cypress": "^12.2.0",
"eslint-plugin-cypress": "^2.12.1",
"eslint-webpack-plugin": "^3.2.0",
"jest": "^29.3.1",
"jest-serializer-vue": "^3.1.0",
@@ -7879,6 +7880,18 @@
"dev": true,
"peer": true
},
"node_modules/eslint-plugin-cypress": {
"version": "2.12.1",
"resolved": "https://registry.npmjs.org/eslint-plugin-cypress/-/eslint-plugin-cypress-2.12.1.tgz",
"integrity": "sha512-c2W/uPADl5kospNDihgiLc7n87t5XhUbFDoTl6CfVkmG+kDAb5Ux10V9PoLPu9N+r7znpc+iQlcmAqT1A/89HA==",
"dev": true,
"dependencies": {
"globals": "^11.12.0"
},
"peerDependencies": {
"eslint": ">= 3.2.1"
}
},
"node_modules/eslint-plugin-es": {
"version": "4.1.0",
"resolved": "https://registry.npmjs.org/eslint-plugin-es/-/eslint-plugin-es-4.1.0.tgz",
@@ -9673,9 +9686,10 @@
}
},
"node_modules/globals": {
"version": "11.9.0",
"version": "11.12.0",
"resolved": "https://registry.npmjs.org/globals/-/globals-11.12.0.tgz",
"integrity": "sha512-WOBp/EEGUiIsJSp7wcv/y6MO+lV9UoncWqxuFfm8eBwzWNgyfBd6Gz+IeKQ9jCmyhoH99g15M3T+QaVHFjizVA==",
"dev": true,
"license": "MIT",
"engines": {
"node": ">=4"
}
@@ -24810,6 +24824,15 @@
}
}
},
"eslint-plugin-cypress": {
"version": "2.12.1",
"resolved": "https://registry.npmjs.org/eslint-plugin-cypress/-/eslint-plugin-cypress-2.12.1.tgz",
"integrity": "sha512-c2W/uPADl5kospNDihgiLc7n87t5XhUbFDoTl6CfVkmG+kDAb5Ux10V9PoLPu9N+r7znpc+iQlcmAqT1A/89HA==",
"dev": true,
"requires": {
"globals": "^11.12.0"
}
},
"eslint-plugin-es": {
"version": "4.1.0",
"resolved": "https://registry.npmjs.org/eslint-plugin-es/-/eslint-plugin-es-4.1.0.tgz",
@@ -25873,7 +25896,9 @@
}
},
"globals": {
"version": "11.9.0",
"version": "11.12.0",
"resolved": "https://registry.npmjs.org/globals/-/globals-11.12.0.tgz",
"integrity": "sha512-WOBp/EEGUiIsJSp7wcv/y6MO+lV9UoncWqxuFfm8eBwzWNgyfBd6Gz+IeKQ9jCmyhoH99g15M3T+QaVHFjizVA==",
"dev": true
},
"globby": {

View File

@@ -22,6 +22,7 @@
"watch": "NODE_ENV=development webpack --progress --watch --config webpack.js",
"lint": "eslint --ext .js,.vue src",
"lint:fix": "eslint --ext .js,.vue src --fix",
"lint:cypress": "eslint --ext .js cypress",
"stylelint": "stylelint src",
"stylelint:fix": "stylelint src --fix",
"test": "jest",
@@ -79,6 +80,7 @@
"@relative-ci/agent": "^4.1.3",
"@vue/test-utils": "^1.3.3",
"cypress": "^12.2.0",
"eslint-plugin-cypress": "^2.12.1",
"eslint-webpack-plugin": "^3.2.0",
"jest": "^29.3.1",
"jest-serializer-vue": "^3.1.0",