Skip to content

Commit

Permalink
Merge pull request #211 from MikeMcC399/property-ordering
Browse files Browse the repository at this point in the history
test: add property ordering rules
  • Loading branch information
jennifer-shehane committed May 13, 2024
2 parents a109c4a + f53f7df commit c5b206b
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 4 deletions.
2 changes: 2 additions & 0 deletions eslint.config.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,8 @@ export default [
'eslint-plugin/require-meta-docs-url':
['error', { 'pattern': 'https://github.com/cypress-io/eslint-plugin-cypress/blob/master/docs/rules/{{name}}.md' }],
'eslint-plugin/require-meta-docs-description': 'error',
'eslint-plugin/meta-property-ordering': 'error',
'eslint-plugin/test-case-property-ordering': 'error',
'n/no-extraneous-require':
['error', { 'allowModules': ['jest-config'] }],
'mocha/no-mocha-arrows': 'off',
Expand Down
4 changes: 2 additions & 2 deletions tests-legacy/lib/rules/unsafe-to-chain-command.js
Original file line number Diff line number Diff line change
Expand Up @@ -42,15 +42,15 @@ ruleTester.run('action-ends-chain', rule, {
},
{
code: 'cy.get("new-todo").customType("todo A{enter}").customClick();',
options: [{ methods: ['customType', 'customClick'] }],
parserOptions,
errors,
options: [{ methods: ['customType', 'customClick'] }],
},
{
code: 'cy.get("new-todo").customPress("Enter").customScroll();',
options: [{ methods: [/customPress/, /customScroll/] }],
parserOptions,
errors,
options: [{ methods: [/customPress/, /customScroll/] }],
},
],
})
4 changes: 2 additions & 2 deletions tests/lib/rules/unsafe-to-chain-command.js
Original file line number Diff line number Diff line change
Expand Up @@ -22,13 +22,13 @@ ruleTester.run('action-ends-chain', rule, {
{ code: 'cy.get("new-todo").focus().should("have.class", "active");', errors },
{
code: 'cy.get("new-todo").customType("todo A{enter}").customClick();',
errors,
options: [{ methods: ['customType', 'customClick'] }],
errors,
},
{
code: 'cy.get("new-todo").customPress("Enter").customScroll();',
errors,
options: [{ methods: ['customPress', 'customScroll'] }],
errors,
},
],
})

0 comments on commit c5b206b

Please sign in to comment.