import {render, screen} from 'sentry-test/reactTestingLibrary'; import {KeyValueTable, KeyValueTableRow} from 'sentry/components/keyValueTable'; describe('KeyValueTable', function () { it('basic', function () { render( White cold drink} /> ); const terms = screen.getAllByRole('term'); const definitions = screen.getAllByRole('definition'); expect(terms[0]).toHaveTextContent('Coffee'); expect(definitions[0]).toHaveTextContent('Black hot drink'); expect(terms[1]).toHaveTextContent('Milk'); expect(definitions[1]).toHaveTextContent('White cold drink'); }); });