mirror of
https://github.com/IT4Change/boilerplate-e2e-cypress-cucumber.git
synced 2025-12-12 20:55:48 +00:00
fix linting
This commit is contained in:
parent
f3a3b7ca30
commit
e4216a965a
@ -1,43 +1,18 @@
|
|||||||
/* eslint-disable @typescript-eslint/no-unsafe-argument */
|
|
||||||
/* eslint-disable @typescript-eslint/no-unsafe-call */
|
|
||||||
import { addCucumberPreprocessorPlugin } from '@badeball/cypress-cucumber-preprocessor'
|
import { addCucumberPreprocessorPlugin } from '@badeball/cypress-cucumber-preprocessor'
|
||||||
import webpack from '@cypress/webpack-preprocessor'
|
import { createEsbuildPlugin } from '@badeball/cypress-cucumber-preprocessor/esbuild'
|
||||||
|
import createBundler from '@bahmutov/cypress-esbuild-preprocessor'
|
||||||
import { defineConfig } from 'cypress'
|
import { defineConfig } from 'cypress'
|
||||||
|
|
||||||
const setupNodeEvents = async (on: Cypress.PluginEvents, config: Cypress.PluginConfigOptions) => {
|
async function setupNodeEvents(
|
||||||
await addCucumberPreprocessorPlugin(on, config, {
|
on: Cypress.PluginEvents,
|
||||||
omitAfterRunHandler: true,
|
config: Cypress.PluginConfigOptions,
|
||||||
})
|
): Promise<Cypress.PluginConfigOptions> {
|
||||||
|
await addCucumberPreprocessorPlugin(on, config)
|
||||||
|
|
||||||
on(
|
on(
|
||||||
'file:preprocessor',
|
'file:preprocessor',
|
||||||
webpack({
|
createBundler({
|
||||||
webpackOptions: {
|
plugins: [createEsbuildPlugin(config)],
|
||||||
resolve: {
|
|
||||||
extensions: ['.ts', '.js'],
|
|
||||||
},
|
|
||||||
module: {
|
|
||||||
rules: [
|
|
||||||
{
|
|
||||||
test: /\.ts$/,
|
|
||||||
exclude: [/node_modules/],
|
|
||||||
use: [
|
|
||||||
{
|
|
||||||
loader: 'ts-loader',
|
|
||||||
},
|
|
||||||
],
|
|
||||||
},
|
|
||||||
{
|
|
||||||
test: /\.feature$/,
|
|
||||||
use: [
|
|
||||||
{
|
|
||||||
loader: '@badeball/cypress-cucumber-preprocessor/webpack',
|
|
||||||
options: config,
|
|
||||||
},
|
|
||||||
],
|
|
||||||
},
|
|
||||||
],
|
|
||||||
},
|
|
||||||
},
|
|
||||||
}),
|
}),
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|||||||
@ -1,8 +1,10 @@
|
|||||||
/* eslint-disable @typescript-eslint/no-unsafe-call */
|
/* eslint-disable @typescript-eslint/no-unsafe-call */
|
||||||
|
/* eslint-disable @typescript-eslint/no-unsafe-member-access */
|
||||||
|
/* eslint-disable import/no-relative-parent-imports */
|
||||||
import { Given, When, Then } from '@badeball/cypress-cucumber-preprocessor'
|
import { Given, When, Then } from '@badeball/cypress-cucumber-preprocessor'
|
||||||
|
|
||||||
import { loginPage } from '#pages/LoginPage'
|
import { loginPage } from '../../pages/LoginPage'
|
||||||
import { welcomePage } from '#pages/WelcomePage'
|
import { welcomePage } from '../../pages/WelcomePage'
|
||||||
|
|
||||||
Given('The web browser is at the login page', () => {
|
Given('The web browser is at the login page', () => {
|
||||||
cy.visit('/login')
|
cy.visit('/login')
|
||||||
|
|||||||
@ -2,12 +2,7 @@
|
|||||||
"compilerOptions": {
|
"compilerOptions": {
|
||||||
"target": "es5",
|
"target": "es5",
|
||||||
"lib": ["es5", "dom"],
|
"lib": ["es5", "dom"],
|
||||||
"types": ["cypress", "node"],
|
"types": ["cypress", "node"]
|
||||||
"paths": {
|
|
||||||
"#pages/*": [
|
|
||||||
"../pages/*.ts"
|
|
||||||
]
|
|
||||||
}
|
|
||||||
},
|
},
|
||||||
"include": ["./**/*.ts"]
|
"include": ["./**/*.ts"]
|
||||||
}
|
}
|
||||||
@ -1,13 +1,10 @@
|
|||||||
{
|
{
|
||||||
"compilerOptions": {
|
"compilerOptions": {
|
||||||
"module": "ES2020",
|
"esModuleInterop": true,
|
||||||
"target": "ES2020",
|
"module": "nodenext",
|
||||||
"lib": ["ES2022", "dom"],
|
"lib": ["ES2022", "dom"],
|
||||||
"strict": true,
|
"strict": true,
|
||||||
"types": ["cypress", "node"],
|
"types": ["cypress", "node"]
|
||||||
"paths": {
|
|
||||||
"#pages/*": ["./cypress/pages/*"]
|
|
||||||
}
|
|
||||||
},
|
},
|
||||||
"include": ["**/*.ts"],
|
"include": ["**/*.ts"],
|
||||||
"exclude": ["node_modules"]
|
"exclude": ["node_modules"]
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user