Tests: Fix flake in recreate image tests

The getBy selector in this test caused tests to flake in CI, changing to
findBy should prevent flakes.
This commit is contained in:
lucasgarfield 2023-11-16 16:16:06 +01:00 committed by Sanne Raymaekers
parent 0405eda319
commit d7bfb8efef

View file

@ -134,7 +134,7 @@ describe('On Recreate', () => {
// check that the FSC contains a /tmp partition
// There are two buttons with the same name but cannot easily select the DDF rendered sidenav.
// The sidenav will be the first node found out of all buttons.
const buttonsFSC = screen.getAllByRole('button', {
const buttonsFSC = await screen.findAllByRole('button', {
name: /file system configuration/i,
});
await user.click(buttonsFSC[0]);