wizard: add GCP image sharing options
Adding GCP image sharing option according to the discussion on slack(https://redhat-internal.slack.com/archives/C03AZ0264LW/p1692789579814619) and mocks(https://issues.redhat.com/browse/HMS-2352). In summary, within our GCP sources, we store the project ID. Images cannot be shared directly with a project ID, but they can be shared with a service account or a Google account. Consequently, to launch instances in GCP, users are not required to provide their Google account; instead, the images should be shared with the provisioning service account. This ensures that the provisioning team has access to the necessary images, as sharing them with individual users would not allow that. After a thorough discussion, we have collectively decided to introduce an option. This option allows users to exclusively utilize the Launch service without the need to share the image with a Google account.
This commit is contained in:
parent
50b76751e7
commit
a890dc5666
5 changed files with 103 additions and 41 deletions
|
|
@ -458,7 +458,14 @@ describe('Step Upload to Google', () => {
|
|||
test('clicking Next loads Registration', async () => {
|
||||
await setUp();
|
||||
|
||||
await user.type(screen.getByTestId('input-google-email'), 'test@test.com');
|
||||
const shareRadioButton = await screen.findByRole('radio', {
|
||||
name: /share image with a google account/i,
|
||||
});
|
||||
await user.click(shareRadioButton);
|
||||
|
||||
const googleEmailInput = await screen.findByTestId('input-google-email');
|
||||
|
||||
await user.type(googleEmailInput, 'test@test.com');
|
||||
await clickNext();
|
||||
|
||||
await screen.findByRole('textbox', {
|
||||
|
|
@ -485,15 +492,22 @@ describe('Step Upload to Google', () => {
|
|||
test('the google account id field is shown and required', async () => {
|
||||
await setUp();
|
||||
|
||||
const accessKeyId = screen.getByTestId('input-google-email');
|
||||
await waitFor(() => {
|
||||
screen.getByTestId('account-sharing');
|
||||
});
|
||||
|
||||
user.click(screen.getByTestId('account-sharing'));
|
||||
const accessKeyId = await screen.findByTestId('input-google-email');
|
||||
expect(accessKeyId).toHaveValue('');
|
||||
expect(accessKeyId).toBeEnabled();
|
||||
|
||||
// expect(accessKeyId).toBeRequired(); // DDf does not support required value
|
||||
});
|
||||
|
||||
test('the google email field must be a valid email', async () => {
|
||||
await setUp();
|
||||
|
||||
await user.click(screen.getByTestId('account-sharing'));
|
||||
await user.type(screen.getByTestId('input-google-email'), 'a');
|
||||
expect(await getNextButton()).toHaveClass('pf-m-disabled');
|
||||
expect(await getNextButton()).toBeDisabled();
|
||||
|
|
@ -1033,7 +1047,11 @@ describe('Click through all steps', () => {
|
|||
await user.type(screen.getByTestId('aws-account-id'), '012345678901');
|
||||
await clickNext();
|
||||
|
||||
await user.click(screen.getByTestId('account-sharing'));
|
||||
|
||||
await user.type(screen.getByTestId('input-google-email'), 'test@test.com');
|
||||
|
||||
await user.click(await screen.findByTestId('image-sharing'));
|
||||
await clickNext();
|
||||
|
||||
await user.click(screen.getByTestId('azure-radio-manual'));
|
||||
|
|
@ -1391,10 +1409,8 @@ describe('Keyboard accessibility', () => {
|
|||
await clickNext();
|
||||
|
||||
// Target environment google
|
||||
const googleAccountRadio = screen.getByRole('radio', {
|
||||
name: /google account/i,
|
||||
});
|
||||
expect(googleAccountRadio).toHaveFocus();
|
||||
await user.click(screen.getByTestId('account-sharing'));
|
||||
expect(screen.getByTestId('account-sharing')).toHaveFocus();
|
||||
await user.type(screen.getByTestId('input-google-email'), 'test@test.com');
|
||||
await clickNext();
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue