Sha256: 911c8323c930f9017e8e62b424cb70c4e8555be472b6c9162228f7e9a4aadc6e
Contents?: true
Size: 881 Bytes
Versions: 460
Compression:
Stored size: 881 Bytes
Contents
import React from 'react' import { render, screen } from '../utilities/test-utils' import Select from './_select' const testId = 'select1', kitClass = 'pb_select' const options = [ { value: '1', text: 'Burgers', }, { value: '2', text: 'Pizza', }, { value: '3', text: 'Tacos', }, ] test('returns namespaced class name', () => { render( <Select data={{ testid: testId }} label="Favorite Food" name="food" options={options} /> ) const kit = screen.getByTestId(testId) expect(kit).toHaveClass(kitClass) }) test('returns dark class name', () => { render( <Select dark data={{ testid: testId }} label="Favorite Food" name="food" options={options} /> ) const kit = screen.getByTestId(testId) expect(kit).toHaveClass(`${kitClass} dark`) })
Version data entries
460 entries across 460 versions & 1 rubygems