Skip to content

Commit

Permalink
fix(pencil): illustrate the false positive of 'focus' regex matching …
Browse files Browse the repository at this point in the history
…'focused'
  • Loading branch information
dominicfraser committed Sep 15, 2023
1 parent b9f7a26 commit 4eedc6b
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 1 deletion.
2 changes: 1 addition & 1 deletion lib/rules/unsafe-to-chain-command.js
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ const unsafeToChainActions = [
'check',
'dblclick',
'each',
'focus',
'focus$',
'rightclick',
'screenshot',
'scrollIntoView',
Expand Down
4 changes: 4 additions & 0 deletions tests/lib/rules/unsafe-to-chain-command.js
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,10 @@ ruleTester.run('action-ends-chain', rule, {
code: 'cy.get("new-todo").type("todo A{enter}"); cy.get("new-todo").type("todo B{enter}"); cy.get("new-todo").should("have.class", "active");',
parserOptions,
},
{
code: 'cy.focused().should("be.visible");',
parserOptions,
},
],

invalid: [
Expand Down

0 comments on commit 4eedc6b

Please sign in to comment.