From d7bfb8efefa68ce092f677bd9ca98fcea7de1f2a Mon Sep 17 00:00:00 2001 From: lucasgarfield Date: Thu, 16 Nov 2023 16:16:06 +0100 Subject: [PATCH] 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. --- .../CreateImageWizard/CreateImageWizard.compliance.test.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/test/Components/CreateImageWizard/CreateImageWizard.compliance.test.js b/src/test/Components/CreateImageWizard/CreateImageWizard.compliance.test.js index 6ecb0d4d..7809a359 100644 --- a/src/test/Components/CreateImageWizard/CreateImageWizard.compliance.test.js +++ b/src/test/Components/CreateImageWizard/CreateImageWizard.compliance.test.js @@ -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]);