Created
August 6, 2018 16:49
-
-
Save ElMassimo/0f3be42c04ff4528edde49f938f5f9f7 to your computer and use it in GitHub Desktop.
Cypress Matcher
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<snippet> | |
<content><![CDATA[ | |
import { createMatcher } from '@support/MatchersHelper' | |
export default createMatcher('${TM_FILEPATH/.*?(\w+).js/\1/}', { | |
// Selectors: Semantic aliases for elements, a very useful abstraction. | |
selectors: {$1 | |
}, | |
// Getters: A convenient way to get nested elements in the component. | |
getters: {$2 | |
}, | |
// Actions: Encapsulate complex actions to provide a cleaner interface. | |
actions: {$3 | |
}, | |
// Assertions: Allow to check on element properties while keeping it DRY. | |
assertions: {$4 | |
}, | |
}) | |
]]></content> | |
<!-- Optional: Set a tabTrigger to define how to trigger the snippet --> | |
<tabTrigger>matcher</tabTrigger> | |
<!-- Optional: Set a scope to limit where the snippet will trigger --> | |
<description>Cypress Test Matcher</description> | |
</snippet> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment