fix unit tests

pull/51151/head
Ashley Harrison 3 years ago
parent c0cd5822da
commit eb40f3207a
No known key found for this signature in database
GPG Key ID: AEC29E54E8D7CD90
  1. 4
      packages/jaeger-ui-components/src/TraceTimelineViewer/SpanDetail/AccordianKeyValues.test.tsx
  2. 4
      public/app/core/components/NavBar/NavBarItem.test.tsx

@ -97,9 +97,7 @@ describe('AccordianKeyValues test', () => {
it('renders the summary instead of the table when it is not expanded', () => {
setupAccordian({ isOpen: false } as AccordianKeyValuesProps);
expect(
screen.getByRole('switch', { name: 'test accordian: span.kind = client omg = mos-def' })
).toBeInTheDocument();
expect(screen.getByRole('switch', { name: 'test accordian: span.kind = clientomg = mos-def' })).toBeInTheDocument();
expect(screen.queryByRole('table')).not.toBeInTheDocument();
expect(screen.queryAllByRole('cell')).toHaveLength(0);
});

@ -196,9 +196,9 @@ describe('NavBarItem', () => {
expect(screen.getAllByRole('menuitem')[2]).toHaveAttribute('tabIndex', '-1');
await userEvent.keyboard('{ArrowLeft}');
expect(screen.getAllByRole('link')[0]).toHaveFocus();
expect((await screen.findAllByRole('link'))[0]).toHaveFocus();
expect(screen.getAllByRole('menuitem')).toHaveLength(3);
expect(screen.getAllByRole('menuitem')[0]).toHaveAttribute('tabIndex', '-1');
expect(screen.getAllByRole('menuitem')[1]).toHaveAttribute('tabIndex', '-1');
expect(screen.getAllByRole('menuitem')[1]).toHaveAttribute('tabIndex', '-1');
expect(screen.getAllByRole('menuitem')[2]).toHaveAttribute('tabIndex', '-1');
});

Loading…
Cancel
Save