mirror of
https://github.com/ansible/awx.git
synced 2026-03-25 21:05:03 -02:30
Fix unit test failures
This commit is contained in:
@@ -208,7 +208,7 @@ describe('<AdHocCommands />', () => {
|
|||||||
wrapper
|
wrapper
|
||||||
.find('td#check-action-item-2')
|
.find('td#check-action-item-2')
|
||||||
.find('input')
|
.find('input')
|
||||||
.simulate('change', { target: { checked: true } });
|
.simulate('click');
|
||||||
});
|
});
|
||||||
|
|
||||||
wrapper.update();
|
wrapper.update();
|
||||||
@@ -227,7 +227,7 @@ describe('<AdHocCommands />', () => {
|
|||||||
wrapper
|
wrapper
|
||||||
.find('td#check-action-item-4')
|
.find('td#check-action-item-4')
|
||||||
.find('input')
|
.find('input')
|
||||||
.simulate('change', { target: { checked: true } });
|
.simulate('click');
|
||||||
});
|
});
|
||||||
|
|
||||||
wrapper.update();
|
wrapper.update();
|
||||||
@@ -377,11 +377,7 @@ describe('<AdHocCommands />', () => {
|
|||||||
wrapper
|
wrapper
|
||||||
.find('td#check-action-item-2')
|
.find('td#check-action-item-2')
|
||||||
.find('input')
|
.find('input')
|
||||||
.simulate('change', {
|
.simulate('click');
|
||||||
target: {
|
|
||||||
checked: true,
|
|
||||||
},
|
|
||||||
});
|
|
||||||
});
|
});
|
||||||
|
|
||||||
wrapper.update();
|
wrapper.update();
|
||||||
@@ -400,11 +396,7 @@ describe('<AdHocCommands />', () => {
|
|||||||
wrapper
|
wrapper
|
||||||
.find('td#check-action-item-4')
|
.find('td#check-action-item-4')
|
||||||
.find('input')
|
.find('input')
|
||||||
.simulate('change', {
|
.simulate('click');
|
||||||
target: {
|
|
||||||
checked: true,
|
|
||||||
},
|
|
||||||
});
|
|
||||||
});
|
});
|
||||||
|
|
||||||
wrapper.update();
|
wrapper.update();
|
||||||
|
|||||||
@@ -155,7 +155,7 @@ describe('<AdHocCommandsWizard/>', () => {
|
|||||||
wrapper
|
wrapper
|
||||||
.find('td#check-action-item-1')
|
.find('td#check-action-item-1')
|
||||||
.find('input')
|
.find('input')
|
||||||
.simulate('change', { target: { checked: true } });
|
.simulate('click');
|
||||||
});
|
});
|
||||||
|
|
||||||
wrapper.update();
|
wrapper.update();
|
||||||
@@ -181,7 +181,7 @@ describe('<AdHocCommandsWizard/>', () => {
|
|||||||
wrapper
|
wrapper
|
||||||
.find('td#check-action-item-1')
|
.find('td#check-action-item-1')
|
||||||
.find('input')
|
.find('input')
|
||||||
.simulate('change', { target: { checked: true } });
|
.simulate('click');
|
||||||
});
|
});
|
||||||
|
|
||||||
wrapper.update();
|
wrapper.update();
|
||||||
|
|||||||
@@ -122,7 +122,7 @@ describe('<SelectResourceStep />', () => {
|
|||||||
checkboxListItemWrapper
|
checkboxListItemWrapper
|
||||||
.first()
|
.first()
|
||||||
.find('input[type="checkbox"]')
|
.find('input[type="checkbox"]')
|
||||||
.simulate('change', { target: { checked: true } });
|
.simulate('click');
|
||||||
expect(handleRowClick).toHaveBeenCalledWith(data.results[0]);
|
expect(handleRowClick).toHaveBeenCalledWith(data.results[0]);
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|||||||
@@ -183,7 +183,7 @@ describe('CredentialsStep', () => {
|
|||||||
wrapper
|
wrapper
|
||||||
.find('td#check-action-item-2')
|
.find('td#check-action-item-2')
|
||||||
.find('input')
|
.find('input')
|
||||||
.simulate('change', { target: { checked: true } });
|
.simulate('click');
|
||||||
});
|
});
|
||||||
wrapper.update();
|
wrapper.update();
|
||||||
expect(wrapper.find('Alert').length).toBe(1);
|
expect(wrapper.find('Alert').length).toBe(1);
|
||||||
@@ -244,7 +244,7 @@ describe('CredentialsStep', () => {
|
|||||||
wrapper
|
wrapper
|
||||||
.find('td#check-action-item-5')
|
.find('td#check-action-item-5')
|
||||||
.find('input')
|
.find('input')
|
||||||
.simulate('change', { target: { checked: true } });
|
.simulate('click');
|
||||||
});
|
});
|
||||||
wrapper.update();
|
wrapper.update();
|
||||||
expect(wrapper.find('Alert').length).toBe(0);
|
expect(wrapper.find('Alert').length).toBe(0);
|
||||||
@@ -321,7 +321,7 @@ describe('CredentialsStep', () => {
|
|||||||
wrapper
|
wrapper
|
||||||
.find('td#check-action-item-33')
|
.find('td#check-action-item-33')
|
||||||
.find('input')
|
.find('input')
|
||||||
.simulate('change', { target: { checked: true } });
|
.simulate('click');
|
||||||
});
|
});
|
||||||
wrapper.update();
|
wrapper.update();
|
||||||
expect(wrapper.find('Alert').length).toBe(0);
|
expect(wrapper.find('Alert').length).toBe(0);
|
||||||
|
|||||||
@@ -343,11 +343,7 @@ describe('<ScheduleAdd />', () => {
|
|||||||
wrapper
|
wrapper
|
||||||
.find('td#check-action-item-1')
|
.find('td#check-action-item-1')
|
||||||
.find('input')
|
.find('input')
|
||||||
.simulate('change', {
|
.simulate('click');
|
||||||
target: {
|
|
||||||
checked: true,
|
|
||||||
},
|
|
||||||
});
|
|
||||||
});
|
});
|
||||||
wrapper.update();
|
wrapper.update();
|
||||||
expect(
|
expect(
|
||||||
|
|||||||
@@ -475,11 +475,7 @@ describe('<ScheduleEdit />', () => {
|
|||||||
wrapper
|
wrapper
|
||||||
.find('td#check-action-item-1')
|
.find('td#check-action-item-1')
|
||||||
.find('input')
|
.find('input')
|
||||||
.simulate('change', {
|
.simulate('click');
|
||||||
target: {
|
|
||||||
checked: true,
|
|
||||||
},
|
|
||||||
});
|
|
||||||
});
|
});
|
||||||
wrapper.update();
|
wrapper.update();
|
||||||
|
|
||||||
@@ -607,11 +603,7 @@ describe('<ScheduleEdit />', () => {
|
|||||||
wrapper
|
wrapper
|
||||||
.find('td#check-action-item-2')
|
.find('td#check-action-item-2')
|
||||||
.find('input')
|
.find('input')
|
||||||
.simulate('change', {
|
.simulate('click');
|
||||||
target: {
|
|
||||||
checked: true,
|
|
||||||
},
|
|
||||||
});
|
|
||||||
});
|
});
|
||||||
wrapper.update();
|
wrapper.update();
|
||||||
|
|
||||||
|
|||||||
@@ -345,11 +345,7 @@ describe('<ScheduleForm />', () => {
|
|||||||
promptWrapper
|
promptWrapper
|
||||||
.find('td#check-action-item-1')
|
.find('td#check-action-item-1')
|
||||||
.find('input')
|
.find('input')
|
||||||
.simulate('change', {
|
.simulate('click');
|
||||||
target: {
|
|
||||||
checked: true,
|
|
||||||
},
|
|
||||||
});
|
|
||||||
});
|
});
|
||||||
promptWrapper.update();
|
promptWrapper.update();
|
||||||
expect(
|
expect(
|
||||||
|
|||||||
@@ -152,7 +152,7 @@ describe('<UserAndTeamAccessAdd/>', () => {
|
|||||||
.find('CheckboxListItem')
|
.find('CheckboxListItem')
|
||||||
.first()
|
.first()
|
||||||
.find('input[type="checkbox"]')
|
.find('input[type="checkbox"]')
|
||||||
.simulate('change', { target: { checked: true } })
|
.simulate('click')
|
||||||
);
|
);
|
||||||
|
|
||||||
wrapper.update();
|
wrapper.update();
|
||||||
@@ -235,7 +235,7 @@ describe('<UserAndTeamAccessAdd/>', () => {
|
|||||||
.find('CheckboxListItem')
|
.find('CheckboxListItem')
|
||||||
.first()
|
.first()
|
||||||
.find('input[type="checkbox"]')
|
.find('input[type="checkbox"]')
|
||||||
.simulate('change', { target: { checked: true } })
|
.simulate('click')
|
||||||
);
|
);
|
||||||
|
|
||||||
wrapper.update();
|
wrapper.update();
|
||||||
|
|||||||
@@ -1,7 +1,6 @@
|
|||||||
import React, { useCallback } from 'react';
|
import React, { useCallback } from 'react';
|
||||||
import { func, shape } from 'prop-types';
|
import { func, shape } from 'prop-types';
|
||||||
import { Formik, useField } from 'formik';
|
import { Formik, useField } from 'formik';
|
||||||
|
|
||||||
import { t } from '@lingui/macro';
|
import { t } from '@lingui/macro';
|
||||||
import {
|
import {
|
||||||
Button,
|
Button,
|
||||||
|
|||||||
@@ -134,7 +134,7 @@ describe('<CredentialPluginPrompt />', () => {
|
|||||||
wrapper
|
wrapper
|
||||||
.find('td#check-action-item-1')
|
.find('td#check-action-item-1')
|
||||||
.find('input')
|
.find('input')
|
||||||
.invoke('onChange')(true);
|
.simulate('click');
|
||||||
});
|
});
|
||||||
wrapper.update();
|
wrapper.update();
|
||||||
expect(
|
expect(
|
||||||
|
|||||||
@@ -267,7 +267,7 @@ describe('NodeModal', () => {
|
|||||||
wrapper
|
wrapper
|
||||||
.find('td#check-action-item-1')
|
.find('td#check-action-item-1')
|
||||||
.find('input')
|
.find('input')
|
||||||
.prop('onChange')(true);
|
.simulate('click');
|
||||||
});
|
});
|
||||||
wrapper.update();
|
wrapper.update();
|
||||||
await act(async () => {
|
await act(async () => {
|
||||||
@@ -337,7 +337,7 @@ describe('NodeModal', () => {
|
|||||||
wrapper
|
wrapper
|
||||||
.find('td#check-action-item-1')
|
.find('td#check-action-item-1')
|
||||||
.find('input')
|
.find('input')
|
||||||
.prop('onChange')(true);
|
.simulate('click');
|
||||||
});
|
});
|
||||||
wrapper.update();
|
wrapper.update();
|
||||||
await act(async () => {
|
await act(async () => {
|
||||||
@@ -376,7 +376,7 @@ describe('NodeModal', () => {
|
|||||||
wrapper
|
wrapper
|
||||||
.find('td#check-action-item-1')
|
.find('td#check-action-item-1')
|
||||||
.find('input')
|
.find('input')
|
||||||
.prop('onChange')(true);
|
.simulate('click');
|
||||||
});
|
});
|
||||||
wrapper.update();
|
wrapper.update();
|
||||||
await act(async () => {
|
await act(async () => {
|
||||||
@@ -415,7 +415,7 @@ describe('NodeModal', () => {
|
|||||||
wrapper
|
wrapper
|
||||||
.find('td#check-action-item-1')
|
.find('td#check-action-item-1')
|
||||||
.find('input')
|
.find('input')
|
||||||
.prop('onChange')(true)
|
.simulate('click')
|
||||||
);
|
);
|
||||||
wrapper.update();
|
wrapper.update();
|
||||||
|
|
||||||
@@ -673,7 +673,7 @@ describe('Edit existing node', () => {
|
|||||||
newWrapper
|
newWrapper
|
||||||
.find('td#check-action-item-1')
|
.find('td#check-action-item-1')
|
||||||
.find('input')
|
.find('input')
|
||||||
.prop('onChange')();
|
.simulate('click');
|
||||||
newWrapper.update();
|
newWrapper.update();
|
||||||
});
|
});
|
||||||
newWrapper.update();
|
newWrapper.update();
|
||||||
|
|||||||
Reference in New Issue
Block a user