Skip to content

A collection of Cypress commands to help you with testing Mantine components

License

Notifications You must be signed in to change notification settings

Avenue3-dev/cypress-mantine-helpers

Repository files navigation

Cypress Mantine Helpers

MIT CI NPM

A collection of custom Cypress commands to work with Mantine components.

Installation

pnpm add @avenue3-dev/cypress-mantine-helpers

Usage

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"]);

About

A collection of Cypress commands to help you with testing Mantine components

Topics

Resources

License

Stars

Watchers

Forks

Contributors 2

  •  
  •