mirror of
https://github.com/ansible/awx.git
synced 2026-02-12 15:14:45 -03:30
Merge pull request #6238 from jakemcdermott/awaiting-for-godot
Remove some rogue awaits Reviewed-by: https://github.com/apps/softwarefactory-project-zuul
This commit is contained in:
@@ -77,7 +77,7 @@ describe('<SelectResourceStep />', () => {
|
|||||||
'/organizations/1/access?resource.page=1&resource.order_by=-username',
|
'/organizations/1/access?resource.page=1&resource.order_by=-username',
|
||||||
],
|
],
|
||||||
});
|
});
|
||||||
const wrapper = await mountWithContexts(
|
const wrapper = mountWithContexts(
|
||||||
<SelectResourceStep
|
<SelectResourceStep
|
||||||
searchColumns={searchColumns}
|
searchColumns={searchColumns}
|
||||||
sortColumns={sortColumns}
|
sortColumns={sortColumns}
|
||||||
|
|||||||
@@ -33,7 +33,7 @@ describe('<WorkflowJobTemplateAdd/>', () => {
|
|||||||
initialEntries: ['/templates/workflow_job_template/add'],
|
initialEntries: ['/templates/workflow_job_template/add'],
|
||||||
});
|
});
|
||||||
await act(async () => {
|
await act(async () => {
|
||||||
wrapper = await mountWithContexts(
|
wrapper = mountWithContexts(
|
||||||
<Route
|
<Route
|
||||||
path="/templates/workflow_job_template/add"
|
path="/templates/workflow_job_template/add"
|
||||||
component={() => <WorkflowJobTemplateAdd />}
|
component={() => <WorkflowJobTemplateAdd />}
|
||||||
|
|||||||
@@ -12,7 +12,7 @@ describe('<WorkflowJobTemplateDetail/>', () => {
|
|||||||
const template = {
|
const template = {
|
||||||
id: 1,
|
id: 1,
|
||||||
name: 'WFJT Template',
|
name: 'WFJT Template',
|
||||||
description: 'It is a wfjt template, yo!',
|
description: 'Yo, it is a wfjt template!',
|
||||||
type: 'workflow_job_template',
|
type: 'workflow_job_template',
|
||||||
extra_vars: '1: 2',
|
extra_vars: '1: 2',
|
||||||
created: '2015-07-07T17:21:26.429745Z',
|
created: '2015-07-07T17:21:26.429745Z',
|
||||||
@@ -35,7 +35,7 @@ describe('<WorkflowJobTemplateDetail/>', () => {
|
|||||||
{ id: 2, status: 'run' },
|
{ id: 2, status: 'run' },
|
||||||
{ id: 3, status: 'run' },
|
{ id: 3, status: 'run' },
|
||||||
],
|
],
|
||||||
webhook_credential: { id: '1', name: 'Credentaial', kind: 'machine' },
|
webhook_credential: { id: '1', name: 'Credential', kind: 'machine' },
|
||||||
user_capabilities: { edit: true, delete: true },
|
user_capabilities: { edit: true, delete: true },
|
||||||
},
|
},
|
||||||
webhook_service: 'Github',
|
webhook_service: 'Github',
|
||||||
@@ -46,7 +46,7 @@ describe('<WorkflowJobTemplateDetail/>', () => {
|
|||||||
initialEntries: ['/templates/workflow_job_template/1/details'],
|
initialEntries: ['/templates/workflow_job_template/1/details'],
|
||||||
});
|
});
|
||||||
await act(async () => {
|
await act(async () => {
|
||||||
wrapper = await mountWithContexts(
|
wrapper = mountWithContexts(
|
||||||
<Route
|
<Route
|
||||||
path="/templates/workflow_job_template/:id/details"
|
path="/templates/workflow_job_template/:id/details"
|
||||||
component={() => (
|
component={() => (
|
||||||
@@ -120,7 +120,7 @@ describe('<WorkflowJobTemplateDetail/>', () => {
|
|||||||
{
|
{
|
||||||
element: 'Detail[label="Description"]',
|
element: 'Detail[label="Description"]',
|
||||||
prop: 'value',
|
prop: 'value',
|
||||||
value: 'It is a wfjt template, yo!',
|
value: 'Yo, it is a wfjt template!',
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
element: 'Detail[label="Job Type"]',
|
element: 'Detail[label="Job Type"]',
|
||||||
|
|||||||
@@ -152,7 +152,7 @@ describe('<WorkflowJobTemplateEdit/>', () => {
|
|||||||
|
|
||||||
let newWrapper;
|
let newWrapper;
|
||||||
await act(async () => {
|
await act(async () => {
|
||||||
newWrapper = await mountWithContexts(
|
newWrapper = mountWithContexts(
|
||||||
<WorkflowJobTemplateEdit template={templateWithoutOrg} />,
|
<WorkflowJobTemplateEdit template={templateWithoutOrg} />,
|
||||||
{
|
{
|
||||||
context: {
|
context: {
|
||||||
|
|||||||
@@ -16,7 +16,7 @@ describe('<SurveyList />', () => {
|
|||||||
test('expect component to mount successfully', async () => {
|
test('expect component to mount successfully', async () => {
|
||||||
let wrapper;
|
let wrapper;
|
||||||
await act(async () => {
|
await act(async () => {
|
||||||
wrapper = await mountWithContexts(
|
wrapper = mountWithContexts(
|
||||||
<SurveyList template={mockJobTemplateData} />
|
<SurveyList template={mockJobTemplateData} />
|
||||||
);
|
);
|
||||||
});
|
});
|
||||||
@@ -25,7 +25,7 @@ describe('<SurveyList />', () => {
|
|||||||
test('expect api to be called to get survey', async () => {
|
test('expect api to be called to get survey', async () => {
|
||||||
let wrapper;
|
let wrapper;
|
||||||
await act(async () => {
|
await act(async () => {
|
||||||
wrapper = await mountWithContexts(
|
wrapper = mountWithContexts(
|
||||||
<SurveyList template={mockJobTemplateData} />
|
<SurveyList template={mockJobTemplateData} />
|
||||||
);
|
);
|
||||||
});
|
});
|
||||||
@@ -37,7 +37,7 @@ describe('<SurveyList />', () => {
|
|||||||
JobTemplatesAPI.readSurvey.mockRejectedValue(new Error());
|
JobTemplatesAPI.readSurvey.mockRejectedValue(new Error());
|
||||||
let wrapper;
|
let wrapper;
|
||||||
await act(async () => {
|
await act(async () => {
|
||||||
wrapper = await mountWithContexts(
|
wrapper = mountWithContexts(
|
||||||
<SurveyList template={{ ...mockJobTemplateData, id: 'a' }} />
|
<SurveyList template={{ ...mockJobTemplateData, id: 'a' }} />
|
||||||
);
|
);
|
||||||
});
|
});
|
||||||
|
|||||||
@@ -66,7 +66,7 @@ describe('<WorkflowJobTemplateForm/>', () => {
|
|||||||
initialEntries: ['/templates/workflow_job_template/6/edit'],
|
initialEntries: ['/templates/workflow_job_template/6/edit'],
|
||||||
});
|
});
|
||||||
await act(async () => {
|
await act(async () => {
|
||||||
wrapper = await mountWithContexts(
|
wrapper = mountWithContexts(
|
||||||
<Route
|
<Route
|
||||||
path="/templates/workflow_job_template/:id/edit"
|
path="/templates/workflow_job_template/:id/edit"
|
||||||
component={() => (
|
component={() => (
|
||||||
|
|||||||
Reference in New Issue
Block a user