From 7c202068627ad7fe76bed098fd37304aaa3c0282 Mon Sep 17 00:00:00 2001 From: Erik Witkowski <88332542+Erik-Outreach@users.noreply.github.com> Date: Wed, 29 Mar 2023 08:29:52 +0200 Subject: [PATCH] fix: Wait incorrectly reported as unsafe to chain --- lib/rules/unsafe-to-chain-command.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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) }