test: Add a test checking if release lifecycle chart renders correctly

This adds a test that checks if the release lifecycle chart rendered only when RHEL 8 release is selected.
This commit is contained in:
regexowl 2023-12-07 11:23:12 +01:00 committed by Lucas Garfield
parent c11f80188e
commit 44bb6f62ff

View file

@ -240,6 +240,35 @@ describe('Step Image output', () => {
await user.click(releaseMenu);
});
test('release lifecycle chart appears only when RHEL 8 is chosen', async () => {
await setUp();
const releaseMenu = screen.getAllByRole('button', {
name: /options menu/i,
})[0];
await user.click(releaseMenu);
await user.click(
await screen.findByRole('option', {
name: /Red Hat Enterprise Linux \(RHEL\) 9/,
})
);
expect(
screen.queryByTestId('release-lifecycle-chart')
).not.toBeInTheDocument();
await user.click(releaseMenu);
await user.click(
await screen.findByRole('option', {
name: /Red Hat Enterprise Linux \(RHEL\) 8/,
})
);
expect(
await screen.findByTestId('release-lifecycle-chart')
).toBeInTheDocument();
});
test('CentOS acknowledgement appears', async () => {
await setUp();