Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
Cypress Matcher
<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
You can’t perform that action at this time.