Skip to content

Commit 2ae420d

Browse files
Fix simulation form
1 parent 85963f9 commit 2ae420d

File tree

2 files changed

+6
-6
lines changed

2 files changed

+6
-6
lines changed

app/javascript/components/automate-simulation-form/automate-simulation-form.schema.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ const loadTargets = (selectedTargetClass) => http.get(targetsURL(selectedTargetC
1212
})),
1313
];
1414
}
15-
return [];
15+
return [{ label: `<${__('None')}>`, value: '-1' }];
1616
});
1717

1818
const createSchema = (

cypress/e2e/ui/Embedded-Automate/simulation.cy.js

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -12,9 +12,9 @@ describe('Automation > Embedded Automate > Simulation', () => {
1212
it('Resets the form', () => {
1313
cy.get('#object_request').type('Test Request');
1414
cy.get('#target_class').click();
15-
cy.get('[class="bx--list-box__menu-item__option"]').contains('Availability Zone').click({force: true});
15+
cy.get('[class="bx--list-box__menu-item__option"]').contains('User').click({force: true});
1616

17-
cy.get('#selection_target').select('asia-northeast2-a');
17+
cy.get('#selection_target').select('Administrator');
1818
cy.get('#left_div').scrollTo('bottom');
1919
cy.contains('button', 'Reset').click();
2020

@@ -26,9 +26,9 @@ describe('Automation > Embedded Automate > Simulation', () => {
2626
it('Submits the form', () => {
2727
cy.get('#object_request').type('Test Request');
2828
cy.get('#target_class').click();
29-
cy.get('[class="bx--list-box__menu-item__option"]').contains('Availability Zone').click({force: true});
29+
cy.get('[class="bx--list-box__menu-item__option"]').contains('User').click({force: true});
3030

31-
cy.get('#selection_target').select('asia-northeast2-a');
31+
cy.get('#selection_target').select('Administrator');
3232
cy.get('#left_div').scrollTo('bottom');
3333

3434
cy.get('[name="attribute_1"]').type('attribute 1');
@@ -45,7 +45,7 @@ describe('Automation > Embedded Automate > Simulation', () => {
4545
});
4646
it('Loads the second dropdown', () => {
4747
cy.get('#target_class').click();
48-
cy.get('[class="bx--list-box__menu-item__option"]').contains('Availability Zone').click({force: true});
48+
cy.get('[class="bx--list-box__menu-item__option"]').contains('User').click({force: true});
4949
cy.get('#selection_target').should('exist');
5050
});
5151
});

0 commit comments

Comments
 (0)