cypress-spellchecker
v1.0.4
Published
Cypress-spellchecker is a cypress custom command to check spelling/ typo error on a webpage.
Downloads
4
Maintainers
Readme
Cypress-spellchecker
This is a Cypress custom command to check spelling.
This repository is used to check common spelling error on a webpage.
Installation
Install the module.
npm install cypress-spellchecker
Add the following line to cypress/support/commands.js
.
require('Cypress-spellchecker/src/spellCheckCommand')
For Cypress 10 and above
Add the following lines to cypress.config.js
.
const { defineConfig } = require('cypress')
const spellcheck = require('Cypress-spellchecker/src/spellCheck')
module.exports = defineConfig({
// setupNodeEvents can be defined in either
// the e2e or component configuration
e2e: {
setupNodeEvents(on, config) {
spellcheck(on)
}
}
})
Example of basic command
cy.spellCheck('https://en.wikipedia.org/wiki/Wikipedia:Lists_of_common_misspellings')
With Filename
cy.spellCheck('https://en.wikipedia.org/wiki/Wikipedia:Lists_of_common_misspellings','filename')