Commit 64eaba0 committed Mar 3, 2025 · 6 / 6
1 parent 1ae902a commit 64eaba0 Copy full SHA for 64eaba0
File tree 3 files changed +6
-3
lines changed
3 files changed +6
-3
lines changed Original file line number Diff line number Diff line change @@ -54,6 +54,7 @@ These rules enforce some of the [best practices recommended for using Cypress](h
54
54
| [ no-force] ( docs/rules/no-force.md ) | disallow using ` force: true ` with action commands | |
55
55
| [ no-pause] ( docs/rules/no-pause.md ) | disallow using ` cy.pause() ` calls | |
56
56
| [ no-unnecessary-waiting] ( docs/rules/no-unnecessary-waiting.md ) | disallow waiting for arbitrary time periods | ✅ |
57
+ | [ no-xpath] ( docs/rules/no-xpath.md ) | disallow usage of xpath in selector | |
57
58
| [ require-data-selectors] ( docs/rules/require-data-selectors.md ) | require ` data-* ` attribute selectors | |
58
59
| [ unsafe-to-chain-command] ( docs/rules/unsafe-to-chain-command.md ) | disallow actions within chains | ✅ |
59
60
Original file line number Diff line number Diff line change 1
- # Disallow usage of cypress xpath (` no-xpath ` )
1
+ # Disallow using ` cy.xpath() calls ( ` cypress/no-xpath`)
2
+
3
+ <!-- end auto-generated rule header -->
2
4
3
5
This rule disallow the usage of cypress-xpath for selecting elements.
4
6
@@ -21,7 +23,7 @@ cy.get('[data-cy="container"]').click();
21
23
22
24
## Further Reading
23
25
24
- ` cypress-xpath ` package has been deprecated since Oct 13, 2022.
26
+ Both ` @ cypress/xpath ` and ` cypress -xpath` packages have been deprecated since Oct 13, 2022.
25
27
26
28
27
29
See [ the Cypress Best Practices guide] ( https://docs.cypress.io/guides/references/best-practices.html#Selecting-Elements ) .
Original file line number Diff line number Diff line change @@ -4,7 +4,7 @@ module.exports = {
4
4
meta : {
5
5
type : 'suggestion' ,
6
6
docs : {
7
- description : "disallow usage of xpath in selector " ,
7
+ description : "disallow using cy. xpath() calls " ,
8
8
recommended : false ,
9
9
url : "https://github.com/cypress-io/eslint-plugin-cypress/blob/master/docs/rules/no-xpath.md"
10
10
} ,
You can’t perform that action at this time.
0 commit comments