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 webpack from '@cypress/webpack-preprocessor'
|
||||
import { createEsbuildPlugin } from '@badeball/cypress-cucumber-preprocessor/esbuild'
|
||||
import createBundler from '@bahmutov/cypress-esbuild-preprocessor'
|
||||
import { defineConfig } from 'cypress'
|
||||
|
||||
const setupNodeEvents = async (on: Cypress.PluginEvents, config: Cypress.PluginConfigOptions) => {
|
||||
await addCucumberPreprocessorPlugin(on, config, {
|
||||
omitAfterRunHandler: true,
|
||||
})
|
||||
async function setupNodeEvents(
|
||||
on: Cypress.PluginEvents,
|
||||
config: Cypress.PluginConfigOptions,
|
||||
): Promise<Cypress.PluginConfigOptions> {
|
||||
await addCucumberPreprocessorPlugin(on, config)
|
||||
|
||||
on(
|
||||
'file:preprocessor',
|
||||
webpack({
|
||||
webpackOptions: {
|
||||
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,
|
||||
},
|
||||
],
|
||||
},
|
||||
],
|
||||
},
|
||||
},
|
||||
createBundler({
|
||||
plugins: [createEsbuildPlugin(config)],
|
||||
}),
|
||||
)
|
||||
|
||||
|
||||
@ -1,8 +1,10 @@
|
||||
/* 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 { loginPage } from '#pages/LoginPage'
|
||||
import { welcomePage } from '#pages/WelcomePage'
|
||||
import { loginPage } from '../../pages/LoginPage'
|
||||
import { welcomePage } from '../../pages/WelcomePage'
|
||||
|
||||
Given('The web browser is at the login page', () => {
|
||||
cy.visit('/login')
|
||||
|
||||
@ -2,12 +2,7 @@
|
||||
"compilerOptions": {
|
||||
"target": "es5",
|
||||
"lib": ["es5", "dom"],
|
||||
"types": ["cypress", "node"],
|
||||
"paths": {
|
||||
"#pages/*": [
|
||||
"../pages/*.ts"
|
||||
]
|
||||
}
|
||||
"types": ["cypress", "node"]
|
||||
},
|
||||
"include": ["./**/*.ts"]
|
||||
}
|
||||
@ -1,13 +1,10 @@
|
||||
{
|
||||
"compilerOptions": {
|
||||
"module": "ES2020",
|
||||
"target": "ES2020",
|
||||
"esModuleInterop": true,
|
||||
"module": "nodenext",
|
||||
"lib": ["ES2022", "dom"],
|
||||
"strict": true,
|
||||
"types": ["cypress", "node"],
|
||||
"paths": {
|
||||
"#pages/*": ["./cypress/pages/*"]
|
||||
}
|
||||
"types": ["cypress", "node"]
|
||||
},
|
||||
"include": ["**/*.ts"],
|
||||
"exclude": ["node_modules"]
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user