mirror of
https://github.com/ansible/awx.git
synced 2026-01-13 11:00:03 -03:30
Merge pull request #6660 from mabashian/6606-jt-launch
Pass empty params to launch endpoint rather than null Reviewed-by: https://github.com/apps/softwarefactory-project-zuul
This commit is contained in:
commit
907da2ae61
@ -71,7 +71,7 @@ class LaunchButton extends React.Component {
|
||||
const { data: launchConfig } = await readLaunch;
|
||||
|
||||
if (canLaunchWithoutPrompt(launchConfig)) {
|
||||
this.launchWithParams(null);
|
||||
this.launchWithParams({});
|
||||
} else {
|
||||
this.setState({
|
||||
showLaunchPrompt: true,
|
||||
|
||||
@ -62,7 +62,7 @@ describe('LaunchButton', () => {
|
||||
button.prop('onClick')();
|
||||
expect(JobTemplatesAPI.readLaunch).toHaveBeenCalledWith(1);
|
||||
await sleep(0);
|
||||
expect(JobTemplatesAPI.launch).toHaveBeenCalledWith(1, null);
|
||||
expect(JobTemplatesAPI.launch).toHaveBeenCalledWith(1, {});
|
||||
expect(history.location.pathname).toEqual('/jobs/9000/output');
|
||||
});
|
||||
|
||||
@ -99,7 +99,7 @@ describe('LaunchButton', () => {
|
||||
button.prop('onClick')();
|
||||
expect(WorkflowJobTemplatesAPI.readLaunch).toHaveBeenCalledWith(1);
|
||||
await sleep(0);
|
||||
expect(WorkflowJobTemplatesAPI.launch).toHaveBeenCalledWith(1, null);
|
||||
expect(WorkflowJobTemplatesAPI.launch).toHaveBeenCalledWith(1, {});
|
||||
expect(history.location.pathname).toEqual('/jobs/workflow/9000/output');
|
||||
});
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user