@avenue3-dev/cypress-mantine-helpers
v0.1.3
Published
A collection of helpers for testing Mantine components with Cypress
Readme
Cypress Mantine Helpers
A collection of custom Cypress commands to work with Mantine components.
Installation
pnpm add @avenue3-dev/cypress-mantine-helpersUsage
Add the following to your cypress/support/commands.ts file:
import '@avenue3-dev/cypress-mantine-helpers'Commands
mantineSelect
Selects an option or options from a Mantine Select, MultiSelect, or Autocomplete component.
// Select a single option by the label
cy.get('[data-testid="select"]').mantineSelect('Option 1')
// Select multiple options by the labels
cy.get('[data-testid="multiselect"]').mantineSelect(['Option 1', 'Option 2'])
// Select single by value
cy.get('[data-testid="select"]').mantineSelect('option-1')
// Select multiple by values
cy.get('[data-testid="multiselect"]').mantineSelect(['option-1', 'option-2'])