You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Due to the rule code for the cypress/unsafe-to-chain-command rule simply performing a substring check for its regex test, it displays false positives for any Cypress custom commands that just happen to include the same word as a stock command the rule looks for.
For example, our repo has a custom command called checkImageMatching. Since the rule looks for the check command, it flags any commands chained from this custom command as violating the rule (for the record, the custom command just compares two image files and doesn't even query the DOM, so this isn't a concern at all).
Example code that triggers the rule inappropriately:
Due to the rule code for the cypress/unsafe-to-chain-command rule simply performing a substring check for its regex test, it displays false positives for any Cypress custom commands that just happen to include the same word as a stock command the rule looks for.
For example, our repo has a custom command called checkImageMatching. Since the rule looks for the check command, it flags any commands chained from this custom command as violating the rule (for the record, the custom command just compares two image files and doesn't even query the DOM, so this isn't a concern at all).
Example code that triggers the rule inappropriately:
cy.checkImageMatching( './cypress/e2e/aya-logo-full-transparent.jpg',
${Cypress.config('downloadsFolder'
)}/Testjwlvh Testowszfnnb_7-1-2022 CHOCChildHealtCenteMissiViejo-1_1.jpg
).should('eq', 0);
The text was updated successfully, but these errors were encountered: