Skip to content

Commit

Permalink
Merge pull request #128 from Erik-Outreach/ewitkowski/wait-unsafe-to-…
Browse files Browse the repository at this point in the history
…chain

fix: Wait incorrectly reported as unsafe to chain
  • Loading branch information
Ben M committed Mar 29, 2023
2 parents 1fdfef7 + 7c20206 commit ba2bf7f
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/rules/unsafe-to-chain-command.js
Expand Up @@ -41,7 +41,7 @@ function isRootCypress (node) {

function isActionUnsafeToChain (node) {
// commands listed in the documentation with text: 'It is unsafe to chain further commands that rely on the subject after xxx'
const unsafeToChainActions = ['blur', 'clear', 'click', 'check', 'dblclick', 'each', 'focus', 'rightclick', 'screenshot', 'scrollIntoView', 'scrollTo', 'select', 'selectFile', 'spread', 'submit', 'type', 'trigger', 'uncheck', 'wait', 'within']
const unsafeToChainActions = ['blur', 'clear', 'click', 'check', 'dblclick', 'each', 'focus', 'rightclick', 'screenshot', 'scrollIntoView', 'scrollTo', 'select', 'selectFile', 'spread', 'submit', 'type', 'trigger', 'uncheck', 'within']

return node.callee && node.callee.property && node.callee.property.type === 'Identifier' && unsafeToChainActions.includes(node.callee.property.name)
}

0 comments on commit ba2bf7f

Please sign in to comment.