mirror of
https://github.com/ansible/awx.git
synced 2026-03-19 09:57:33 -02: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:
@@ -71,7 +71,7 @@ class LaunchButton extends React.Component {
|
|||||||
const { data: launchConfig } = await readLaunch;
|
const { data: launchConfig } = await readLaunch;
|
||||||
|
|
||||||
if (canLaunchWithoutPrompt(launchConfig)) {
|
if (canLaunchWithoutPrompt(launchConfig)) {
|
||||||
this.launchWithParams(null);
|
this.launchWithParams({});
|
||||||
} else {
|
} else {
|
||||||
this.setState({
|
this.setState({
|
||||||
showLaunchPrompt: true,
|
showLaunchPrompt: true,
|
||||||
|
|||||||
@@ -62,7 +62,7 @@ describe('LaunchButton', () => {
|
|||||||
button.prop('onClick')();
|
button.prop('onClick')();
|
||||||
expect(JobTemplatesAPI.readLaunch).toHaveBeenCalledWith(1);
|
expect(JobTemplatesAPI.readLaunch).toHaveBeenCalledWith(1);
|
||||||
await sleep(0);
|
await sleep(0);
|
||||||
expect(JobTemplatesAPI.launch).toHaveBeenCalledWith(1, null);
|
expect(JobTemplatesAPI.launch).toHaveBeenCalledWith(1, {});
|
||||||
expect(history.location.pathname).toEqual('/jobs/9000/output');
|
expect(history.location.pathname).toEqual('/jobs/9000/output');
|
||||||
});
|
});
|
||||||
|
|
||||||
@@ -99,7 +99,7 @@ describe('LaunchButton', () => {
|
|||||||
button.prop('onClick')();
|
button.prop('onClick')();
|
||||||
expect(WorkflowJobTemplatesAPI.readLaunch).toHaveBeenCalledWith(1);
|
expect(WorkflowJobTemplatesAPI.readLaunch).toHaveBeenCalledWith(1);
|
||||||
await sleep(0);
|
await sleep(0);
|
||||||
expect(WorkflowJobTemplatesAPI.launch).toHaveBeenCalledWith(1, null);
|
expect(WorkflowJobTemplatesAPI.launch).toHaveBeenCalledWith(1, {});
|
||||||
expect(history.location.pathname).toEqual('/jobs/workflow/9000/output');
|
expect(history.location.pathname).toEqual('/jobs/workflow/9000/output');
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user