Buttons are interactive elements that allow the user to perform an action on the page or serve as a prominent hyperlink.

Usage

import { PlumaTestHelpers } from '@customerio/pluma-components/react/test-helpers/pluma-test-helpers'

const button = PlumaTestHelpers.extract('Button', screen.getByRole('button', { name: 'Save' }));

Test Helpers

Clicks the button

Gets the href attribute (for link buttons)

Checks if the button is disabled

Checks if the button is in loading state

Gets the text content of the button

On this page