CreateImageWizard: alphabetize upload destinations
The upload destinations now display in alphabetical order.
This commit is contained in:
parent
ebdfbbf57d
commit
93d0fdb6fc
3 changed files with 24 additions and 24 deletions
|
|
@ -241,31 +241,31 @@ class CreateImageWizard extends Component {
|
|||
errors={ this.state.uploadAWSErrors } />
|
||||
};
|
||||
|
||||
const StepUploadAzure = {
|
||||
name: 'Microsoft Azure',
|
||||
component: <WizardStepUploadAzure
|
||||
errors={ this.state.uploadAzureErrors } />
|
||||
};
|
||||
|
||||
const StepUploadGoogle = {
|
||||
name: 'Google Cloud Platform',
|
||||
component: <WizardStepUploadGoogle
|
||||
errors={ this.state.uploadGoogleErrors } />
|
||||
};
|
||||
|
||||
const StepUploadAzure = {
|
||||
name: 'Microsoft Azure',
|
||||
component: <WizardStepUploadAzure
|
||||
errors={ this.state.uploadAzureErrors } />
|
||||
};
|
||||
|
||||
const uploadDestinationSteps = [];
|
||||
if (this.props.uploadDestinations.aws) {
|
||||
uploadDestinationSteps.push(StepUploadAWS);
|
||||
}
|
||||
|
||||
if (this.props.uploadDestinations.azure) {
|
||||
uploadDestinationSteps.push(StepUploadAzure);
|
||||
}
|
||||
|
||||
if (this.props.uploadDestinations.google) {
|
||||
uploadDestinationSteps.push(StepUploadGoogle);
|
||||
}
|
||||
|
||||
if (this.props.uploadDestinations.azure) {
|
||||
uploadDestinationSteps.push(StepUploadAzure);
|
||||
}
|
||||
|
||||
const StepTargetEnv = {
|
||||
name: 'Target environment',
|
||||
steps: uploadDestinationSteps
|
||||
|
|
|
|||
|
|
@ -57,17 +57,6 @@ class WizardStepImageOutput extends Component {
|
|||
isDisplayLarge />
|
||||
<Tile
|
||||
className="tile pf-u-mr-sm"
|
||||
data-testid="upload-azure"
|
||||
title="Microsoft Azure"
|
||||
icon={ <img
|
||||
className='provider-icon'
|
||||
src={ '/apps/frontend-assets/partners-icons/microsoft-azure-short.svg' } /> }
|
||||
onClick={ () => this.toggleUploadDestination('azure') }
|
||||
isSelected={ this.props.uploadDestinations.azure }
|
||||
isStacked
|
||||
isDisplayLarge />
|
||||
<Tile
|
||||
className="tile"
|
||||
data-testid="upload-google"
|
||||
title="Google Cloud Platform"
|
||||
icon={ <img
|
||||
|
|
@ -77,6 +66,17 @@ class WizardStepImageOutput extends Component {
|
|||
isSelected={ this.props.uploadDestinations.google }
|
||||
isStacked
|
||||
isDisplayLarge />
|
||||
<Tile
|
||||
className="tile"
|
||||
data-testid="upload-azure"
|
||||
title="Microsoft Azure"
|
||||
icon={ <img
|
||||
className='provider-icon'
|
||||
src={ '/apps/frontend-assets/partners-icons/microsoft-azure-short.svg' } /> }
|
||||
onClick={ () => this.toggleUploadDestination('azure') }
|
||||
isSelected={ this.props.uploadDestinations.azure }
|
||||
isStacked
|
||||
isDisplayLarge />
|
||||
</div>
|
||||
</FormGroup>
|
||||
</Form>
|
||||
|
|
|
|||
|
|
@ -455,14 +455,14 @@ describe('Click through all steps', () => {
|
|||
userEvent.type(screen.getByTestId('aws-account-id'), '012345678901');
|
||||
next.click();
|
||||
|
||||
userEvent.type(screen.getByTestId('input-google-user'), 'test@test.com');
|
||||
next.click();
|
||||
|
||||
userEvent.type(screen.getByTestId('azure-tenant-id'), 'testTenant');
|
||||
userEvent.type(screen.getByTestId('azure-subscription-id'), 'testSubscriptionId');
|
||||
userEvent.type(screen.getByTestId('azure-resource-group'), 'testResourceGroup');
|
||||
next.click();
|
||||
|
||||
userEvent.type(screen.getByTestId('input-google-user'), 'test@test.com');
|
||||
next.click();
|
||||
|
||||
// registration
|
||||
screen
|
||||
.getByLabelText('Embed an activation key and register systems on first boot')
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue