The Radio component renders a radio input, which allows selecting an option from a group of options. Usually you'll want to use the Radio component along with the RadioGroup component.

Usage

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

const radio = PlumaTestHelpers.extract('Radio', screen.getByRole('radio', { name: 'Option A' }));

Test Helpers

Clicks the radio

Checks if the radio is checked

Checks if the radio is disabled

Gets the label text of the radio

Gets the name attribute of the radio

Gets the value attribute of the radio

Whether the radio checked state matches the expected state

On this page