| handleSelect(subscription),
isSelected: selected.some(
- row => row.pool_id === subscription.pool_id
+ (row) => row.pool_id === subscription.pool_id
),
variant: 'radio',
rowIndex: `row-${subscription.pool_id}`,
diff --git a/awx/ui_next/src/screens/Setting/Subscription/SubscriptionEdit/SubscriptionModal.test.js b/awx/ui_next/src/screens/Setting/Subscription/SubscriptionEdit/SubscriptionModal.test.js
index de30b7ce37..6667a776ff 100644
--- a/awx/ui_next/src/screens/Setting/Subscription/SubscriptionEdit/SubscriptionModal.test.js
+++ b/awx/ui_next/src/screens/Setting/Subscription/SubscriptionEdit/SubscriptionModal.test.js
@@ -48,7 +48,7 @@ describe('', () => {
onClose={onClose}
/>
);
- await waitForElement(wrapper, 'ContentLoading', el => el.length === 0);
+ await waitForElement(wrapper, 'ContentLoading', (el) => el.length === 0);
});
});
@@ -62,10 +62,7 @@ describe('', () => {
test('should render header', async () => {
wrapper.update();
- const header = wrapper
- .find('tr')
- .first()
- .find('th');
+ const header = wrapper.find('tr').first().find('th');
expect(header.at(0).text()).toEqual('');
expect(header.at(1).text()).toEqual('Name');
expect(header.at(2).text()).toEqual('Managed nodes');
@@ -115,7 +112,7 @@ describe('', () => {
}}
/>
);
- await waitForElement(wrapper, 'ContentEmpty', el => el.length === 1);
+ await waitForElement(wrapper, 'ContentEmpty', (el) => el.length === 1);
});
});
@@ -152,7 +149,7 @@ describe('', () => {
/>
);
});
- await waitForElement(wrapper, 'ContentLoading', el => el.length === 0);
- await waitForElement(wrapper, 'ErrorDetail', el => el.length === 1);
+ await waitForElement(wrapper, 'ContentLoading', (el) => el.length === 0);
+ await waitForElement(wrapper, 'ErrorDetail', (el) => el.length === 1);
});
});
diff --git a/awx/ui_next/src/screens/Setting/Subscription/SubscriptionEdit/SubscriptionStep.js b/awx/ui_next/src/screens/Setting/Subscription/SubscriptionEdit/SubscriptionStep.js
index c1aee40f57..a32a25aeee 100644
--- a/awx/ui_next/src/screens/Setting/Subscription/SubscriptionEdit/SubscriptionStep.js
+++ b/awx/ui_next/src/screens/Setting/Subscription/SubscriptionEdit/SubscriptionStep.js
@@ -41,9 +41,8 @@ function SubscriptionStep() {
);
const { isModalOpen, toggleModal, closeModal } = useModal();
const [manifest, manifestMeta, manifestHelpers] = useField('manifest_file');
- const [manifestFilename, , manifestFilenameHelpers] = useField(
- 'manifest_filename'
- );
+ const [manifestFilename, , manifestFilenameHelpers] =
+ useField('manifest_filename');
const [subscription, , subscriptionHelpers] = useField('subscription');
const [username, usernameMeta, usernameHelpers] = useField('username');
const [password, passwordMeta, passwordHelpers] = useField('password');
@@ -232,7 +231,7 @@ function SubscriptionStep() {
}}
selectedSubscripion={subscription?.value}
onClose={closeModal}
- onConfirm={value => subscriptionHelpers.setValue(value)}
+ onConfirm={(value) => subscriptionHelpers.setValue(value)}
/>
)}
diff --git a/awx/ui_next/src/screens/Setting/Subscription/SubscriptionEdit/SubscriptionStep.test.js b/awx/ui_next/src/screens/Setting/Subscription/SubscriptionEdit/SubscriptionStep.test.js
index c3a8bfa314..e539a06e08 100644
--- a/awx/ui_next/src/screens/Setting/Subscription/SubscriptionEdit/SubscriptionStep.test.js
+++ b/awx/ui_next/src/screens/Setting/Subscription/SubscriptionEdit/SubscriptionStep.test.js
@@ -91,22 +91,16 @@ describe('', () => {
});
test('Username/password toggle button should show username credential fields', async () => {
- expect(
- wrapper
- .find('ToggleGroupItem')
- .last()
- .props().isSelected
- ).toBe(false);
+ expect(wrapper.find('ToggleGroupItem').last().props().isSelected).toBe(
+ false
+ );
wrapper
.find('ToggleGroupItem[text="Username / password"] button')
.simulate('click');
wrapper.update();
- expect(
- wrapper
- .find('ToggleGroupItem')
- .last()
- .props().isSelected
- ).toBe(true);
+ expect(wrapper.find('ToggleGroupItem').last().props().isSelected).toBe(
+ true
+ );
await act(async () => {
wrapper.find('input#username-field').simulate('change', {
target: { value: 'username-cred', name: 'username' },
diff --git a/awx/ui_next/src/screens/Setting/TACACS/TACACSDetail/TACACSDetail.js b/awx/ui_next/src/screens/Setting/TACACS/TACACSDetail/TACACSDetail.js
index b8632a9d78..c3f64f5ac0 100644
--- a/awx/ui_next/src/screens/Setting/TACACS/TACACSDetail/TACACSDetail.js
+++ b/awx/ui_next/src/screens/Setting/TACACS/TACACSDetail/TACACSDetail.js
@@ -19,7 +19,12 @@ function TACACSDetail() {
const { me } = useConfig();
const { GET: options } = useSettings();
- const { isLoading, error, request, result: tacacs } = useRequest(
+ const {
+ isLoading,
+ error,
+ request,
+ result: tacacs,
+ } = useRequest(
useCallback(async () => {
const { data } = await SettingsAPI.readCategory('tacacsplus');
return data;
@@ -57,7 +62,7 @@ function TACACSDetail() {
{!isLoading && error && }
{!isLoading && tacacs && (
- {Object.keys(tacacs).map(key => {
+ {Object.keys(tacacs).map((key) => {
const record = options?.[key];
return (
', () => {
);
});
- await waitForElement(wrapper, 'ContentLoading', el => el.length === 0);
+ await waitForElement(wrapper, 'ContentLoading', (el) => el.length === 0);
});
afterAll(() => {
@@ -77,7 +77,7 @@ describe('', () => {
}
);
});
- await waitForElement(wrapper, 'ContentLoading', el => el.length === 0);
+ await waitForElement(wrapper, 'ContentLoading', (el) => el.length === 0);
expect(wrapper.find('Button[aria-label="Edit"]').exists()).toBeFalsy();
});
@@ -90,7 +90,7 @@ describe('', () => {
);
});
- await waitForElement(wrapper, 'ContentLoading', el => el.length === 0);
+ await waitForElement(wrapper, 'ContentLoading', (el) => el.length === 0);
expect(wrapper.find('ContentError').length).toBe(1);
});
});
diff --git a/awx/ui_next/src/screens/Setting/TACACS/TACACSEdit/TACACSEdit.js b/awx/ui_next/src/screens/Setting/TACACS/TACACSEdit/TACACSEdit.js
index dcf90ffc33..d1894b53c8 100644
--- a/awx/ui_next/src/screens/Setting/TACACS/TACACSEdit/TACACSEdit.js
+++ b/awx/ui_next/src/screens/Setting/TACACS/TACACSEdit/TACACSEdit.js
@@ -23,11 +23,16 @@ function TACACSEdit() {
const { isModalOpen, toggleModal, closeModal } = useModal();
const { PUT: options } = useSettings();
- const { isLoading, error, request: fetchTACACS, result: tacacs } = useRequest(
+ const {
+ isLoading,
+ error,
+ request: fetchTACACS,
+ result: tacacs,
+ } = useRequest(
useCallback(async () => {
const { data } = await SettingsAPI.readCategory('tacacsplus');
const mergedData = {};
- Object.keys(data).forEach(key => {
+ Object.keys(data).forEach((key) => {
mergedData[key] = options[key];
mergedData[key].value = data[key];
});
@@ -42,7 +47,7 @@ function TACACSEdit() {
const { error: submitError, request: submitForm } = useRequest(
useCallback(
- async values => {
+ async (values) => {
await SettingsAPI.updateAll(values);
history.push('/settings/tacacs/details');
},
@@ -58,7 +63,7 @@ function TACACSEdit() {
null
);
- const handleSubmit = async form => {
+ const handleSubmit = async (form) => {
await submitForm(form);
};
@@ -74,7 +79,7 @@ function TACACSEdit() {
history.push('/settings/tacacs/details');
};
- const initialValues = fields =>
+ const initialValues = (fields) =>
Object.keys(fields).reduce((acc, key) => {
acc[key] = fields[key].value ?? '';
return acc;
@@ -86,7 +91,7 @@ function TACACSEdit() {
{!isLoading && error && }
{!isLoading && tacacs && (
- {formik => (
+ {(formik) => (
|
- {user.first_name && {user.first_name}}
+ {user.first_name && <>{user.first_name}>}
|
- {user.last_name && {user.last_name}}
+ {user.last_name && <>{user.last_name}>}
|
{user_type} |
diff --git a/awx/ui_next/src/screens/User/UserOrganizations/UserOrganizationListItem.test.js b/awx/ui_next/src/screens/User/UserOrganizations/UserOrganizationListItem.test.js
index 672e196ad1..02bbe3d54e 100644
--- a/awx/ui_next/src/screens/User/UserOrganizations/UserOrganizationListItem.test.js
+++ b/awx/ui_next/src/screens/User/UserOrganizations/UserOrganizationListItem.test.js
@@ -33,18 +33,8 @@ describe('', () => {
);
});
- expect(
- wrapper
- .find('Td')
- .at(0)
- .text()
- ).toBe('foo');
- expect(
- wrapper
- .find('Td')
- .at(1)
- .text()
- ).toBe('Bar');
+ expect(wrapper.find('Td').at(0).text()).toBe('foo');
+ expect(wrapper.find('Td').at(1).text()).toBe('Bar');
expect(wrapper.find('Link').prop('to')).toBe('/organizations/1/details');
});
});
diff --git a/awx/ui_next/src/screens/User/UserRoles/UserRolesList.js b/awx/ui_next/src/screens/User/UserRoles/UserRolesList.js
index c24fdec91d..59002effee 100644
--- a/awx/ui_next/src/screens/User/UserRoles/UserRolesList.js
+++ b/awx/ui_next/src/screens/User/UserRoles/UserRolesList.js
@@ -66,10 +66,10 @@ function UserRolesList({ user }) {
actions: actionsResponse.data.actions,
relatedSearchableKeys: (
actionsResponse?.data?.related_search_fields || []
- ).map(val => val.slice(0, -8)),
+ ).map((val) => val.slice(0, -8)),
searchableKeys: Object.keys(
actionsResponse.data.actions?.GET || {}
- ).filter(key => actionsResponse.data.actions?.GET[key].filterable),
+ ).filter((key) => actionsResponse.data.actions?.GET[key].filterable),
};
}, [user.id, search]),
{
@@ -104,7 +104,7 @@ function UserRolesList({ user }) {
const canAdd =
actions && Object.prototype.hasOwnProperty.call(actions, 'POST');
- const detailUrl = role => {
+ const detailUrl = (role) => {
const { resource_id, resource_type } = role.summary_fields;
if (!role || !resource_type) {
@@ -119,7 +119,7 @@ function UserRolesList({ user }) {
}
return `/${resource_type}s/${resource_id}/details`;
};
- const isSysAdmin = roles.some(role => role.name === 'System Administrator');
+ const isSysAdmin = roles.some((role) => role.name === 'System Administrator');
if (isSysAdmin) {
return (
@@ -158,22 +158,20 @@ function UserRolesList({ user }) {
{t`Role`}
}
- renderRow={(role, index) => {
- return (
- {
- setRoleToDisassociate(item);
- }}
- rowIndex={index}
- />
- );
- }}
- renderToolbar={props => (
+ renderRow={(role, index) => (
+ {
+ setRoleToDisassociate(item);
+ }}
+ rowIndex={index}
+ />
+ )}
+ renderToolbar={(props) => (
setShowAddModal(false)}
- onError={err => setAssociateError(err)}
+ onError={(err) => setAssociateError(err)}
/>
)}
{roleToDisassociate && (
diff --git a/awx/ui_next/src/screens/User/UserRoles/UserRolesList.test.js b/awx/ui_next/src/screens/User/UserRoles/UserRolesList.test.js
index 08768c6589..a3a06ebdd4 100644
--- a/awx/ui_next/src/screens/User/UserRoles/UserRolesList.test.js
+++ b/awx/ui_next/src/screens/User/UserRoles/UserRolesList.test.js
@@ -345,7 +345,7 @@ describe('', () => {
waitForElement(
wrapper,
'EmptyState[title="System Administrator"]',
- el => el.length === 1
+ (el) => el.length === 1
);
});
});
diff --git a/awx/ui_next/src/screens/User/UserRoles/UserRolesListItem.test.js b/awx/ui_next/src/screens/User/UserRoles/UserRolesListItem.test.js
index 0b17d35d9c..54412f8e55 100644
--- a/awx/ui_next/src/screens/User/UserRoles/UserRolesListItem.test.js
+++ b/awx/ui_next/src/screens/User/UserRoles/UserRolesListItem.test.js
@@ -92,11 +92,6 @@ describe('', () => {