Cypress Version
11.0.1
Node Version
16.16.0
Package Manager
Yarn version 1.22.19
Operating System
Windows 10 Pro Version 21H2
I've created a cypress_grep_test_project to practice this plugin and used the default sample spec files that Cypress provides during the first-time configuration. I just changed some spec files from "cy.js" to "cy.ts." I aim to use this plugin and test it out for Continuous Integration.
According to the Cypress docs, the plugins folder no longer exists. Following the current documentation of the plugin, the registerCypressGrep
method isn't available anymore.
I've added the @cypress/grep
to the ts.config
file.
//ts.config file
{
"compilerOptions": {
"target": "ES2022",
"module": "commonjs",
"types": [
"cypress",
"@cypress/grep" // Added this to prevent tags issue
],
"esModuleInterop": true,
"forceConsistentCasingInFileNames": true,
"strict": true,
"skipLibCheck": true
}
}
In the todo.cy.ts
file, I inserted the { tags: 'smoke' }
to the describe
block as shown in below snippet.
// todo.cy.ts
describe('example to-do app', { tags: 'smoke' }, () => {
beforeEach(() => {
cy.visit('https://example.cypress.io/todo')
})
Now I don't know what to do next, can someone please help me with this?
// cypress.config.ts
import { defineConfig } from 'cypress'
export default defineConfig({
e2e: {
video: false,
setupNodeEvents(on, config) {
// implement node event listeners here
// What next?
},
}
})