test: Wait for rendering to finish in keyboard accessability test

Waits for components to finish rendering before continuing. This gets
rid of the test warnings.
This commit is contained in:
Sanne Raymaekers 2022-04-11 14:55:53 +02:00 committed by jkozol
parent bbd3623414
commit 1b471b762d

View file

@ -1491,6 +1491,10 @@ describe('Keyboard accessibility', () => {
name: /register and connect image instances with red hat/i
});
expect(registerRadio).toHaveFocus();
await screen.findByRole('textbox', {
name: 'Select activation key'
});
clickNext();
// File system configuration
@ -1512,6 +1516,7 @@ describe('Keyboard accessibility', () => {
// Review
const targetEnvironmentTab = screen.getByTestId('tab-target');
expect(targetEnvironmentTab).toHaveFocus();
await screen.findByTestId('organization-id');
});
test('pressing Esc closes the wizard', async () => {