From 7e83c8ecbb28c17aabcb487385332e7ced307357 Mon Sep 17 00:00:00 2001 From: regexowl Date: Tue, 19 Mar 2024 17:06:02 +0100 Subject: [PATCH] test: Enable OpenSCAP initialized packages tests This re-enables tests checking initialization of packages upon OpenSCAP profile selection. --- .../CreateImageWizard.compliance.test.tsx | 30 +++++++++++-------- 1 file changed, 18 insertions(+), 12 deletions(-) diff --git a/src/test/Components/CreateImageWizardV2/CreateImageWizard.compliance.test.tsx b/src/test/Components/CreateImageWizardV2/CreateImageWizard.compliance.test.tsx index 5659a2aa..6d2a28e2 100644 --- a/src/test/Components/CreateImageWizardV2/CreateImageWizard.compliance.test.tsx +++ b/src/test/Components/CreateImageWizardV2/CreateImageWizard.compliance.test.tsx @@ -106,12 +106,16 @@ describe('Step Compliance', () => { // }) // ).not.toBeInTheDocument(); + await clickNext(); // skip Repositories + // check that there are no Packages contained when selecting the "None" profile option - // await clickNext(); - // await screen.findByRole('heading', { - // name: /Additional Red Hat packages/i, - // }); - // await screen.findByText(/no packages added/i); + await clickNext(); + await screen.findByRole('heading', { + name: /Additional packages/i, + }); + await screen.findByText( + /Search above to add additionalpackages to your image/ + ); }); test('create an image with an oscap profile', async () => { @@ -165,14 +169,16 @@ describe('Step Compliance', () => { // await screen.findByRole('heading', { name: /File system configuration/i }); // await screen.findByText(/tmp/i); - // check that the Packages contain a nftable package - // await clickNext(); + await clickNext(); // skip Repositories - // await screen.findByRole('heading', { - // name: /Additional Red Hat packages/i, - // }); - // await screen.findByText(/nftables/i); - // await screen.findByText(/libselinux/i); + // check that the Packages contain a nftable package + await clickNext(); + await screen.findByRole('heading', { + name: /Additional packages/i, + }); + await user.click(await screen.findByText('Selected')); + await screen.findByText(/nftables/i); + await screen.findByText(/libselinux/i); }); }); //