diff --git a/lib/rules/unsafe-to-chain-command.js b/lib/rules/unsafe-to-chain-command.js index c1a9bf08..490e9585 100644 --- a/lib/rules/unsafe-to-chain-command.js +++ b/lib/rules/unsafe-to-chain-command.js @@ -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) }