-
Notifications
You must be signed in to change notification settings - Fork 53
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Wizard: Add unleash flag and update tests
This gates the step behind an unleash flag and updates the existing tests so they pass with the new step added.
- Loading branch information
1 parent
e6bc0d4
commit 3167eff
Showing
22 changed files
with
112 additions
and
5 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
import React from 'react'; | ||
|
||
import { Text, Form, Title } from '@patternfly/react-core'; | ||
|
||
const FirewallStep = () => { | ||
return ( | ||
<Form> | ||
<Title headingLevel="h1" size="xl"> | ||
Firewall | ||
</Title> | ||
<Text>Customize firewall settings for your image.</Text> | ||
</Form> | ||
); | ||
}; | ||
|
||
export default FirewallStep; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
66 changes: 66 additions & 0 deletions
66
src/test/Components/CreateImageWizard/steps/Firewall/Firewall.test.tsx
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,66 @@ | ||
import type { Router as RemixRouter } from '@remix-run/router'; | ||
import { screen, waitFor } from '@testing-library/react'; | ||
import { userEvent } from '@testing-library/user-event'; | ||
|
||
import { | ||
clickBack, | ||
clickNext, | ||
verifyCancelButton, | ||
} from '../../wizardTestUtils'; | ||
import { clickRegisterLater, renderCreateMode } from '../../wizardTestUtils'; | ||
|
||
let router: RemixRouter | undefined = undefined; | ||
|
||
const goToFirewallStep = async () => { | ||
const user = userEvent.setup(); | ||
const guestImageCheckBox = await screen.findByRole('checkbox', { | ||
name: /virtualization guest image checkbox/i, | ||
}); | ||
await waitFor(() => user.click(guestImageCheckBox)); | ||
await clickNext(); // Registration | ||
await clickRegisterLater(); | ||
await clickNext(); // OpenSCAP | ||
await clickNext(); // File system configuration | ||
await clickNext(); // Snapshots | ||
await clickNext(); // Custom repositories | ||
await clickNext(); // Additional packages | ||
await clickNext(); // Users | ||
await clickNext(); // Timezone | ||
await clickNext(); // Locale | ||
await clickNext(); // Hostname | ||
await clickNext(); // Kernel | ||
await clickNext(); // Firewall | ||
}; | ||
|
||
describe('Step Firewall', () => { | ||
beforeEach(() => { | ||
vi.clearAllMocks(); | ||
router = undefined; | ||
}); | ||
|
||
test('clicking Next loads First boot', async () => { | ||
await renderCreateMode(); | ||
await goToFirewallStep(); | ||
await clickNext(); | ||
await screen.findByRole('heading', { | ||
name: 'First boot configuration', | ||
}); | ||
}); | ||
|
||
test('clicking Back loads Kernel', async () => { | ||
await renderCreateMode(); | ||
await goToFirewallStep(); | ||
await clickBack(); | ||
await screen.findByRole('heading', { name: 'Kernel' }); | ||
}); | ||
|
||
test('clicking Cancel loads landing page', async () => { | ||
await renderCreateMode(); | ||
await goToFirewallStep(); | ||
await verifyCancelButton(router); | ||
}); | ||
}); | ||
|
||
// TO DO Step Firewall -> revisit step button on Review works | ||
// TO DO Firewall request generated correctly | ||
// TO DO Firewall edit mode |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters