test: Await testTile function

The `testTile` function was improperly awaited, causing problems with tests that followed.
This commit is contained in:
regexowl 2024-03-01 16:56:30 +01:00 committed by Klara Simickova
parent 3493772672
commit 9629a7259d

View file

@ -1642,9 +1642,9 @@ describe('Keyboard accessibility', () => {
const testTile = async (tile) => {
tile.focus();
await user.keyboard('{space}');
expect(tile).toHaveClass('pf-m-selected');
await waitFor(() => expect(tile).toHaveClass('pf-m-selected'));
await user.keyboard('{space}');
expect(tile).not.toHaveClass('pf-m-selected');
await waitFor(() => expect(tile).not.toHaveClass('pf-m-selected'));
};
await setUp();