diff --git a/awx/ui_next/src/App.jsx b/awx/ui_next/src/App.jsx index e0f8482cec..df2291fbd5 100644 --- a/awx/ui_next/src/App.jsx +++ b/awx/ui_next/src/App.jsx @@ -12,14 +12,14 @@ import styled from 'styled-components'; import { t } from '@lingui/macro'; import { withI18n } from '@lingui/react'; -import { ConfigAPI, MeAPI, RootAPI } from '@api'; -import About from '@components/About'; -import AlertModal from '@components/AlertModal'; -import NavExpandableGroup from '@components/NavExpandableGroup'; -import BrandLogo from '@components/BrandLogo'; -import PageHeaderToolbar from '@components/PageHeaderToolbar'; -import ErrorDetail from '@components/ErrorDetail'; -import { ConfigProvider } from '@contexts/Config'; +import { ConfigAPI, MeAPI, RootAPI } from './api'; +import About from './components/About'; +import AlertModal from './components/AlertModal'; +import NavExpandableGroup from './components/NavExpandableGroup'; +import BrandLogo from './components/BrandLogo'; +import PageHeaderToolbar from './components/PageHeaderToolbar'; +import ErrorDetail from './components/ErrorDetail'; +import { ConfigProvider } from './contexts/Config'; const PageHeader = styled(PFPageHeader)` & .pf-c-page__header-brand-link { diff --git a/awx/ui_next/src/App.test.jsx b/awx/ui_next/src/App.test.jsx index 88a1f394a9..6f954a8fa2 100644 --- a/awx/ui_next/src/App.test.jsx +++ b/awx/ui_next/src/App.test.jsx @@ -1,7 +1,7 @@ import React from 'react'; -import { mountWithContexts, waitForElement } from '@testUtils/enzymeHelpers'; -import { ConfigAPI, MeAPI, RootAPI } from '@api'; +import { mountWithContexts, waitForElement } from '../testUtils/enzymeHelpers'; +import { ConfigAPI, MeAPI, RootAPI } from './api'; import { asyncFlush } from '../jest.setup'; import App from './App'; diff --git a/awx/ui_next/src/RootProvider.jsx b/awx/ui_next/src/RootProvider.jsx index 92b3e83776..f391f28619 100644 --- a/awx/ui_next/src/RootProvider.jsx +++ b/awx/ui_next/src/RootProvider.jsx @@ -3,7 +3,7 @@ import { I18nProvider } from '@lingui/react'; import { HashRouter } from 'react-router-dom'; -import { getLanguageWithoutRegionCode } from '@util/language'; +import { getLanguageWithoutRegionCode } from './util/language'; import ja from '../build/locales/ja/messages'; import en from '../build/locales/en/messages'; diff --git a/awx/ui_next/src/api/Base.js b/awx/ui_next/src/api/Base.js index fbb6182679..56492715fb 100644 --- a/awx/ui_next/src/api/Base.js +++ b/awx/ui_next/src/api/Base.js @@ -1,6 +1,6 @@ import axios from 'axios'; -import { encodeQueryString } from '@util/qs'; +import { encodeQueryString } from '../util/qs'; const defaultHttp = axios.create({ xsrfCookieName: 'csrftoken', diff --git a/awx/ui_next/src/api/models/Organizations.test.jsx b/awx/ui_next/src/api/models/Organizations.test.jsx index f1c4a05db6..d9f45c9548 100644 --- a/awx/ui_next/src/api/models/Organizations.test.jsx +++ b/awx/ui_next/src/api/models/Organizations.test.jsx @@ -1,4 +1,4 @@ -import { describeNotificationMixin } from '@testUtils/apiReusable'; +import { describeNotificationMixin } from '../../../testUtils/apiReusable'; import Organizations from './Organizations'; describe('OrganizationsAPI', () => { diff --git a/awx/ui_next/src/components/About/About.test.jsx b/awx/ui_next/src/components/About/About.test.jsx index 6e2b015c30..caed85e454 100644 --- a/awx/ui_next/src/components/About/About.test.jsx +++ b/awx/ui_next/src/components/About/About.test.jsx @@ -1,5 +1,5 @@ import React from 'react'; -import { mountWithContexts } from '@testUtils/enzymeHelpers'; +import { mountWithContexts } from '../../../testUtils/enzymeHelpers'; import About from './About'; describe('', () => { diff --git a/awx/ui_next/src/components/AddDropDownButton/AddDropDownButton.jsx b/awx/ui_next/src/components/AddDropDownButton/AddDropDownButton.jsx index 288a30733f..78655e44d9 100644 --- a/awx/ui_next/src/components/AddDropDownButton/AddDropDownButton.jsx +++ b/awx/ui_next/src/components/AddDropDownButton/AddDropDownButton.jsx @@ -2,7 +2,7 @@ import React, { useState, useRef, useEffect } from 'react'; import { Link } from 'react-router-dom'; import PropTypes from 'prop-types'; import { Dropdown, DropdownPosition } from '@patternfly/react-core'; -import { ToolbarAddButton } from '@components/PaginatedDataList'; +import { ToolbarAddButton } from '../PaginatedDataList'; function AddDropDownButton({ dropdownItems }) { const [isOpen, setIsOpen] = useState(false); diff --git a/awx/ui_next/src/components/AddDropDownButton/AddDropDownButton.test.jsx b/awx/ui_next/src/components/AddDropDownButton/AddDropDownButton.test.jsx index a30e3f9cd8..2c32607286 100644 --- a/awx/ui_next/src/components/AddDropDownButton/AddDropDownButton.test.jsx +++ b/awx/ui_next/src/components/AddDropDownButton/AddDropDownButton.test.jsx @@ -1,5 +1,5 @@ import React from 'react'; -import { mountWithContexts } from '@testUtils/enzymeHelpers'; +import { mountWithContexts } from '../../../testUtils/enzymeHelpers'; import AddDropDownButton from './AddDropDownButton'; describe('', () => { diff --git a/awx/ui_next/src/components/AddRole/AddResourceRole.jsx b/awx/ui_next/src/components/AddRole/AddResourceRole.jsx index af8fb4d9fb..6290f300f2 100644 --- a/awx/ui_next/src/components/AddRole/AddResourceRole.jsx +++ b/awx/ui_next/src/components/AddRole/AddResourceRole.jsx @@ -2,8 +2,8 @@ import React, { Fragment } from 'react'; import PropTypes from 'prop-types'; import { withI18n } from '@lingui/react'; import { t } from '@lingui/macro'; -import SelectableCard from '@components/SelectableCard'; -import Wizard from '@components/Wizard'; +import SelectableCard from '../SelectableCard'; +import Wizard from '../Wizard'; import SelectResourceStep from './SelectResourceStep'; import SelectRoleStep from './SelectRoleStep'; import { TeamsAPI, UsersAPI } from '../../api'; diff --git a/awx/ui_next/src/components/AddRole/AddResourceRole.test.jsx b/awx/ui_next/src/components/AddRole/AddResourceRole.test.jsx index 8def4bf887..8a17a10a97 100644 --- a/awx/ui_next/src/components/AddRole/AddResourceRole.test.jsx +++ b/awx/ui_next/src/components/AddRole/AddResourceRole.test.jsx @@ -1,11 +1,11 @@ /* eslint-disable react/jsx-pascal-case */ import React from 'react'; import { shallow } from 'enzyme'; -import { mountWithContexts } from '@testUtils/enzymeHelpers'; +import { mountWithContexts } from '../../../testUtils/enzymeHelpers'; import AddResourceRole, { _AddResourceRole } from './AddResourceRole'; -import { TeamsAPI, UsersAPI } from '@api'; +import { TeamsAPI, UsersAPI } from '../../api'; -jest.mock('@api'); +jest.mock('../../api'); describe('<_AddResourceRole />', () => { UsersAPI.read.mockResolvedValue({ diff --git a/awx/ui_next/src/components/AddRole/SelectResourceStep.jsx b/awx/ui_next/src/components/AddRole/SelectResourceStep.jsx index fd8f93bdf3..9427bca17b 100644 --- a/awx/ui_next/src/components/AddRole/SelectResourceStep.jsx +++ b/awx/ui_next/src/components/AddRole/SelectResourceStep.jsx @@ -3,7 +3,7 @@ import PropTypes from 'prop-types'; import { withRouter } from 'react-router-dom'; import { withI18n } from '@lingui/react'; import { t } from '@lingui/macro'; -import { SearchColumns, SortColumns } from '@types'; +import { SearchColumns, SortColumns } from '../../types'; import PaginatedDataList from '../PaginatedDataList'; import DataListToolbar from '../DataListToolbar'; import CheckboxListItem from '../CheckboxListItem'; diff --git a/awx/ui_next/src/components/AddRole/SelectResourceStep.test.jsx b/awx/ui_next/src/components/AddRole/SelectResourceStep.test.jsx index 1bc0e7a2c9..e925044ed5 100644 --- a/awx/ui_next/src/components/AddRole/SelectResourceStep.test.jsx +++ b/awx/ui_next/src/components/AddRole/SelectResourceStep.test.jsx @@ -1,8 +1,8 @@ import React from 'react'; import { createMemoryHistory } from 'history'; import { shallow } from 'enzyme'; -import { mountWithContexts } from '@testUtils/enzymeHelpers'; -import { sleep } from '@testUtils/testUtils'; +import { mountWithContexts } from '../../../testUtils/enzymeHelpers'; +import { sleep } from '../../../testUtils/testUtils'; import SelectResourceStep from './SelectResourceStep'; describe('', () => { diff --git a/awx/ui_next/src/components/AddRole/SelectRoleStep.test.jsx b/awx/ui_next/src/components/AddRole/SelectRoleStep.test.jsx index 957db15070..f280604328 100644 --- a/awx/ui_next/src/components/AddRole/SelectRoleStep.test.jsx +++ b/awx/ui_next/src/components/AddRole/SelectRoleStep.test.jsx @@ -1,6 +1,6 @@ import React from 'react'; import { shallow } from 'enzyme'; -import { mountWithContexts } from '@testUtils/enzymeHelpers'; +import { mountWithContexts } from '../../../testUtils/enzymeHelpers'; import SelectRoleStep from './SelectRoleStep'; describe('', () => { diff --git a/awx/ui_next/src/components/AnsibleSelect/AnsibleSelect.test.jsx b/awx/ui_next/src/components/AnsibleSelect/AnsibleSelect.test.jsx index 4df4c38471..d9bd7c669d 100644 --- a/awx/ui_next/src/components/AnsibleSelect/AnsibleSelect.test.jsx +++ b/awx/ui_next/src/components/AnsibleSelect/AnsibleSelect.test.jsx @@ -1,5 +1,5 @@ import React from 'react'; -import { mountWithContexts } from '@testUtils/enzymeHelpers'; +import { mountWithContexts } from '../../../testUtils/enzymeHelpers'; import AnsibleSelect, { _AnsibleSelect } from './AnsibleSelect'; const mockData = [ diff --git a/awx/ui_next/src/components/AssociateModal/AssociateModal.jsx b/awx/ui_next/src/components/AssociateModal/AssociateModal.jsx index 493056b50e..86aa534f12 100644 --- a/awx/ui_next/src/components/AssociateModal/AssociateModal.jsx +++ b/awx/ui_next/src/components/AssociateModal/AssociateModal.jsx @@ -3,10 +3,10 @@ import { useHistory } from 'react-router-dom'; import { withI18n } from '@lingui/react'; import { t } from '@lingui/macro'; import { Button, Modal } from '@patternfly/react-core'; -import OptionsList from '@components/OptionsList'; -import useRequest from '@util/useRequest'; -import { getQSConfig, parseQueryString } from '@util/qs'; -import useSelected from '@util/useSelected'; +import OptionsList from '../OptionsList'; +import useRequest from '../../util/useRequest'; +import { getQSConfig, parseQueryString } from '../../util/qs'; +import useSelected from '../../util/useSelected'; const QS_CONFIG = getQSConfig('associate', { page: 1, diff --git a/awx/ui_next/src/components/AssociateModal/AssociateModal.test.jsx b/awx/ui_next/src/components/AssociateModal/AssociateModal.test.jsx index f6c4fca934..2b2280b38b 100644 --- a/awx/ui_next/src/components/AssociateModal/AssociateModal.test.jsx +++ b/awx/ui_next/src/components/AssociateModal/AssociateModal.test.jsx @@ -1,11 +1,14 @@ import React from 'react'; import { act } from 'react-dom/test-utils'; -import { mountWithContexts, waitForElement } from '@testUtils/enzymeHelpers'; +import { + mountWithContexts, + waitForElement, +} from '../../../testUtils/enzymeHelpers'; import AssociateModal from './AssociateModal'; import mockHosts from './data.hosts.json'; -jest.mock('@api'); +jest.mock('../../api'); describe('', () => { let wrapper; diff --git a/awx/ui_next/src/components/BrandLogo/BrandLogo.test.jsx b/awx/ui_next/src/components/BrandLogo/BrandLogo.test.jsx index d0c36612ff..02ba644586 100644 --- a/awx/ui_next/src/components/BrandLogo/BrandLogo.test.jsx +++ b/awx/ui_next/src/components/BrandLogo/BrandLogo.test.jsx @@ -1,5 +1,5 @@ import React from 'react'; -import { mountWithContexts } from '@testUtils/enzymeHelpers'; +import { mountWithContexts } from '../../../testUtils/enzymeHelpers'; import BrandLogo from './BrandLogo'; let logoWrapper; diff --git a/awx/ui_next/src/components/CardCloseButton/CardCloseButton.test.jsx b/awx/ui_next/src/components/CardCloseButton/CardCloseButton.test.jsx index 9b79beef92..3564971c72 100644 --- a/awx/ui_next/src/components/CardCloseButton/CardCloseButton.test.jsx +++ b/awx/ui_next/src/components/CardCloseButton/CardCloseButton.test.jsx @@ -1,5 +1,5 @@ import React from 'react'; -import { mountWithContexts } from '@testUtils/enzymeHelpers'; +import { mountWithContexts } from '../../../testUtils/enzymeHelpers'; import CardCloseButton from './CardCloseButton'; describe('', () => { diff --git a/awx/ui_next/src/components/CheckboxListItem/CheckboxListItem.jsx b/awx/ui_next/src/components/CheckboxListItem/CheckboxListItem.jsx index d6ec3949d5..befaa10674 100644 --- a/awx/ui_next/src/components/CheckboxListItem/CheckboxListItem.jsx +++ b/awx/ui_next/src/components/CheckboxListItem/CheckboxListItem.jsx @@ -7,7 +7,7 @@ import { DataListCheck, Radio, } from '@patternfly/react-core'; -import DataListCell from '@components/DataListCell'; +import DataListCell from '../DataListCell'; const CheckboxListItem = ({ isDisabled = false, diff --git a/awx/ui_next/src/components/ChipGroup/ChipGroup.test.jsx b/awx/ui_next/src/components/ChipGroup/ChipGroup.test.jsx index e1193e26ce..9e36503706 100644 --- a/awx/ui_next/src/components/ChipGroup/ChipGroup.test.jsx +++ b/awx/ui_next/src/components/ChipGroup/ChipGroup.test.jsx @@ -1,5 +1,5 @@ import React from 'react'; -import { mountWithContexts } from '@testUtils/enzymeHelpers'; +import { mountWithContexts } from '../../../testUtils/enzymeHelpers'; import ChipGroup from './ChipGroup'; describe('ChipGroup', () => { diff --git a/awx/ui_next/src/components/ClipboardCopyButton/ClipboardCopyButton.test.jsx b/awx/ui_next/src/components/ClipboardCopyButton/ClipboardCopyButton.test.jsx index 0cdbab8302..4ba32fb51d 100644 --- a/awx/ui_next/src/components/ClipboardCopyButton/ClipboardCopyButton.test.jsx +++ b/awx/ui_next/src/components/ClipboardCopyButton/ClipboardCopyButton.test.jsx @@ -1,5 +1,5 @@ import React from 'react'; -import { mountWithContexts } from '@testUtils/enzymeHelpers'; +import { mountWithContexts } from '../../../testUtils/enzymeHelpers'; import ClipboardCopyButton from './ClipboardCopyButton'; document.execCommand = jest.fn(); diff --git a/awx/ui_next/src/components/CodeMirrorInput/VariablesDetail.jsx b/awx/ui_next/src/components/CodeMirrorInput/VariablesDetail.jsx index e7c2b00742..48bed46f4b 100644 --- a/awx/ui_next/src/components/CodeMirrorInput/VariablesDetail.jsx +++ b/awx/ui_next/src/components/CodeMirrorInput/VariablesDetail.jsx @@ -1,9 +1,9 @@ import React, { useState, useEffect } from 'react'; import { string, node, number } from 'prop-types'; import { Split, SplitItem, TextListItemVariants } from '@patternfly/react-core'; -import { DetailName, DetailValue } from '@components/DetailList'; -import MultiButtonToggle from '@components/MultiButtonToggle'; -import { yamlToJson, jsonToYaml, isJson } from '@util/yaml'; +import { DetailName, DetailValue } from '../DetailList'; +import MultiButtonToggle from '../MultiButtonToggle'; +import { yamlToJson, jsonToYaml, isJson } from '../../util/yaml'; import CodeMirrorInput from './CodeMirrorInput'; import { JSON_MODE, YAML_MODE } from './constants'; diff --git a/awx/ui_next/src/components/CodeMirrorInput/VariablesDetail.test.jsx b/awx/ui_next/src/components/CodeMirrorInput/VariablesDetail.test.jsx index 5ffdaeb1e7..d745236dc5 100644 --- a/awx/ui_next/src/components/CodeMirrorInput/VariablesDetail.test.jsx +++ b/awx/ui_next/src/components/CodeMirrorInput/VariablesDetail.test.jsx @@ -3,7 +3,7 @@ import { act } from 'react-dom/test-utils'; import { shallow, mount } from 'enzyme'; import VariablesDetail from './VariablesDetail'; -jest.mock('@api'); +jest.mock('../../api'); describe('', () => { test('should render readonly CodeMirrorInput', () => { diff --git a/awx/ui_next/src/components/CodeMirrorInput/VariablesField.jsx b/awx/ui_next/src/components/CodeMirrorInput/VariablesField.jsx index 54bd70bc2c..7be1a24de9 100644 --- a/awx/ui_next/src/components/CodeMirrorInput/VariablesField.jsx +++ b/awx/ui_next/src/components/CodeMirrorInput/VariablesField.jsx @@ -5,9 +5,9 @@ import { t } from '@lingui/macro'; import { useField } from 'formik'; import styled from 'styled-components'; import { Split, SplitItem } from '@patternfly/react-core'; -import { CheckboxField, FieldTooltip } from '@components/FormField'; -import MultiButtonToggle from '@components/MultiButtonToggle'; -import { yamlToJson, jsonToYaml, isJson } from '@util/yaml'; +import { CheckboxField, FieldTooltip } from '../FormField'; +import MultiButtonToggle from '../MultiButtonToggle'; +import { yamlToJson, jsonToYaml, isJson } from '../../util/yaml'; import CodeMirrorInput from './CodeMirrorInput'; import { JSON_MODE, YAML_MODE } from './constants'; diff --git a/awx/ui_next/src/components/CodeMirrorInput/VariablesInput.jsx b/awx/ui_next/src/components/CodeMirrorInput/VariablesInput.jsx index cf7758b53e..fda9bec4d1 100644 --- a/awx/ui_next/src/components/CodeMirrorInput/VariablesInput.jsx +++ b/awx/ui_next/src/components/CodeMirrorInput/VariablesInput.jsx @@ -2,8 +2,8 @@ import React, { useState } from 'react'; import { string, func, bool, number } from 'prop-types'; import { Split, SplitItem } from '@patternfly/react-core'; import styled from 'styled-components'; -import { yamlToJson, jsonToYaml, isJson } from '@util/yaml'; -import MultiButtonToggle from '@components/MultiButtonToggle'; +import { yamlToJson, jsonToYaml, isJson } from '../../util/yaml'; +import MultiButtonToggle from '../MultiButtonToggle'; import CodeMirrorInput from './CodeMirrorInput'; import { JSON_MODE, YAML_MODE } from './constants'; diff --git a/awx/ui_next/src/components/CollapsibleSection/CollapsibleSection.jsx b/awx/ui_next/src/components/CollapsibleSection/CollapsibleSection.jsx index 77ed5767e5..b9e60385b8 100644 --- a/awx/ui_next/src/components/CollapsibleSection/CollapsibleSection.jsx +++ b/awx/ui_next/src/components/CollapsibleSection/CollapsibleSection.jsx @@ -3,7 +3,7 @@ import { bool, string } from 'prop-types'; import styled from 'styled-components'; import { Button } from '@patternfly/react-core'; import { AngleRightIcon } from '@patternfly/react-icons'; -import omitProps from '@util/omitProps'; +import omitProps from '../../util/omitProps'; import ExpandingContainer from './ExpandingContainer'; // Make button findable by tests diff --git a/awx/ui_next/src/components/ContentEmpty/ContentEmpty.test.jsx b/awx/ui_next/src/components/ContentEmpty/ContentEmpty.test.jsx index a3f1176226..6498dc76cc 100644 --- a/awx/ui_next/src/components/ContentEmpty/ContentEmpty.test.jsx +++ b/awx/ui_next/src/components/ContentEmpty/ContentEmpty.test.jsx @@ -1,5 +1,5 @@ import React from 'react'; -import { mountWithContexts } from '@testUtils/enzymeHelpers'; +import { mountWithContexts } from '../../../testUtils/enzymeHelpers'; import ContentEmpty from './ContentEmpty'; diff --git a/awx/ui_next/src/components/ContentError/ContentError.jsx b/awx/ui_next/src/components/ContentError/ContentError.jsx index 7f766f7e91..f0d4f80a1d 100644 --- a/awx/ui_next/src/components/ContentError/ContentError.jsx +++ b/awx/ui_next/src/components/ContentError/ContentError.jsx @@ -10,8 +10,8 @@ import { EmptyStateBody, } from '@patternfly/react-core'; import { ExclamationTriangleIcon } from '@patternfly/react-icons'; -import { RootAPI } from '@api'; -import ErrorDetail from '@components/ErrorDetail'; +import { RootAPI } from '../../api'; +import ErrorDetail from '../ErrorDetail'; async function logout() { await RootAPI.logout(); diff --git a/awx/ui_next/src/components/ContentError/ContentError.test.jsx b/awx/ui_next/src/components/ContentError/ContentError.test.jsx index 8bd0751215..518f0ae8c6 100644 --- a/awx/ui_next/src/components/ContentError/ContentError.test.jsx +++ b/awx/ui_next/src/components/ContentError/ContentError.test.jsx @@ -1,5 +1,5 @@ import React from 'react'; -import { mountWithContexts } from '@testUtils/enzymeHelpers'; +import { mountWithContexts } from '../../../testUtils/enzymeHelpers'; import ContentError from './ContentError'; diff --git a/awx/ui_next/src/components/ContentLoading/ContentLoading.test.jsx b/awx/ui_next/src/components/ContentLoading/ContentLoading.test.jsx index 01bac1f3d0..c2816e2582 100644 --- a/awx/ui_next/src/components/ContentLoading/ContentLoading.test.jsx +++ b/awx/ui_next/src/components/ContentLoading/ContentLoading.test.jsx @@ -1,5 +1,5 @@ import React from 'react'; -import { mountWithContexts } from '@testUtils/enzymeHelpers'; +import { mountWithContexts } from '../../../testUtils/enzymeHelpers'; import ContentLoading from './ContentLoading'; diff --git a/awx/ui_next/src/components/CopyButton/CopyButton.jsx b/awx/ui_next/src/components/CopyButton/CopyButton.jsx index 500c0c1106..dd1e91a7aa 100644 --- a/awx/ui_next/src/components/CopyButton/CopyButton.jsx +++ b/awx/ui_next/src/components/CopyButton/CopyButton.jsx @@ -5,9 +5,9 @@ import PropTypes from 'prop-types'; import { Button, Tooltip } from '@patternfly/react-core'; import { CopyIcon } from '@patternfly/react-icons'; -import useRequest, { useDismissableError } from '@util/useRequest'; -import AlertModal from '@components/AlertModal'; -import ErrorDetail from '@components/ErrorDetail'; +import useRequest, { useDismissableError } from '../../util/useRequest'; +import AlertModal from '../AlertModal'; +import ErrorDetail from '../ErrorDetail'; function CopyButton({ i18n, copyItem, onLoading, onDoneLoading, helperText }) { const { isLoading, error: copyError, request: copyItemToAPI } = useRequest( diff --git a/awx/ui_next/src/components/CopyButton/CopyButton.test.jsx b/awx/ui_next/src/components/CopyButton/CopyButton.test.jsx index 30708ad16f..0660d57cd0 100644 --- a/awx/ui_next/src/components/CopyButton/CopyButton.test.jsx +++ b/awx/ui_next/src/components/CopyButton/CopyButton.test.jsx @@ -1,8 +1,8 @@ import React from 'react'; -import { mountWithContexts } from '@testUtils/enzymeHelpers'; +import { mountWithContexts } from '../../../testUtils/enzymeHelpers'; import CopyButton from './CopyButton'; -jest.mock('@api'); +jest.mock('../../api'); describe('', () => { test('shold mount properly', () => { diff --git a/awx/ui_next/src/components/CredentialChip/CredentialChip.jsx b/awx/ui_next/src/components/CredentialChip/CredentialChip.jsx index bc1cd89bed..13576fa750 100644 --- a/awx/ui_next/src/components/CredentialChip/CredentialChip.jsx +++ b/awx/ui_next/src/components/CredentialChip/CredentialChip.jsx @@ -1,10 +1,10 @@ import React from 'react'; import { shape } from 'prop-types'; -import { toTitleCase } from '@util/strings'; import { withI18n } from '@lingui/react'; import { t } from '@lingui/macro'; -import { Credential } from '@types'; import { Chip } from '@patternfly/react-core'; +import { Credential } from '../../types'; +import { toTitleCase } from '../../util/strings'; function CredentialChip({ credential, i18n, ...props }) { let type; diff --git a/awx/ui_next/src/components/CredentialChip/CredentialChip.test.jsx b/awx/ui_next/src/components/CredentialChip/CredentialChip.test.jsx index 7bcdc3dcd6..df678d5d23 100644 --- a/awx/ui_next/src/components/CredentialChip/CredentialChip.test.jsx +++ b/awx/ui_next/src/components/CredentialChip/CredentialChip.test.jsx @@ -1,5 +1,5 @@ import React from 'react'; -import { mountWithContexts } from '@testUtils/enzymeHelpers'; +import { mountWithContexts } from '../../../testUtils/enzymeHelpers'; import CredentialChip from './CredentialChip'; describe('CredentialChip', () => { diff --git a/awx/ui_next/src/components/DataListToolbar/DataListToolbar.jsx b/awx/ui_next/src/components/DataListToolbar/DataListToolbar.jsx index baf03ff89d..f8b7adfa8a 100644 --- a/awx/ui_next/src/components/DataListToolbar/DataListToolbar.jsx +++ b/awx/ui_next/src/components/DataListToolbar/DataListToolbar.jsx @@ -16,7 +16,7 @@ import ExpandCollapse from '../ExpandCollapse'; import Search from '../Search'; import Sort from '../Sort'; -import { SearchColumns, SortColumns, QSConfig } from '@types'; +import { SearchColumns, SortColumns, QSConfig } from '../../types'; const DataToolbarContent = styled(_DataToolbarContent)` --pf-c-data-toolbar__content--PaddingLeft: 24px; diff --git a/awx/ui_next/src/components/DataListToolbar/DataListToolbar.test.jsx b/awx/ui_next/src/components/DataListToolbar/DataListToolbar.test.jsx index 09fce3d548..b8b83ee6e2 100644 --- a/awx/ui_next/src/components/DataListToolbar/DataListToolbar.test.jsx +++ b/awx/ui_next/src/components/DataListToolbar/DataListToolbar.test.jsx @@ -1,5 +1,5 @@ import React from 'react'; -import { mountWithContexts } from '@testUtils/enzymeHelpers'; +import { mountWithContexts } from '../../../testUtils/enzymeHelpers'; import DataListToolbar from './DataListToolbar'; describe('', () => { diff --git a/awx/ui_next/src/components/DeleteButton/DeleteButton.jsx b/awx/ui_next/src/components/DeleteButton/DeleteButton.jsx index 184caf9ef9..f9fe6cb1ea 100644 --- a/awx/ui_next/src/components/DeleteButton/DeleteButton.jsx +++ b/awx/ui_next/src/components/DeleteButton/DeleteButton.jsx @@ -2,7 +2,7 @@ import React, { useState } from 'react'; import { withI18n } from '@lingui/react'; import { t } from '@lingui/macro'; import { Button } from '@patternfly/react-core'; -import AlertModal from '@components/AlertModal'; +import AlertModal from '../AlertModal'; function DeleteButton({ onConfirm, diff --git a/awx/ui_next/src/components/DetailList/UserDateDetail.jsx b/awx/ui_next/src/components/DetailList/UserDateDetail.jsx index f65ab665ed..29826175c5 100644 --- a/awx/ui_next/src/components/DetailList/UserDateDetail.jsx +++ b/awx/ui_next/src/components/DetailList/UserDateDetail.jsx @@ -3,7 +3,7 @@ import { node, string } from 'prop-types'; import { Trans } from '@lingui/macro'; import { Link } from 'react-router-dom'; import styled from 'styled-components'; -import { formatDateString } from '@util/dates'; +import { formatDateString } from '../../util/dates'; import _Detail from './Detail'; import { SummaryFieldUser } from '../../types'; diff --git a/awx/ui_next/src/components/DisassociateButton/DisassociateButton.jsx b/awx/ui_next/src/components/DisassociateButton/DisassociateButton.jsx index fdcddfb7e3..dacb44aaae 100644 --- a/awx/ui_next/src/components/DisassociateButton/DisassociateButton.jsx +++ b/awx/ui_next/src/components/DisassociateButton/DisassociateButton.jsx @@ -3,8 +3,8 @@ import { arrayOf, func, object, string } from 'prop-types'; import { withI18n } from '@lingui/react'; import { t } from '@lingui/macro'; import { Button, Tooltip } from '@patternfly/react-core'; -import AlertModal from '@components/AlertModal'; import styled from 'styled-components'; +import AlertModal from '../AlertModal'; const ModalNote = styled.div` margin-bottom: var(--pf-global--spacer--xl); diff --git a/awx/ui_next/src/components/DisassociateButton/DisassociateButton.test.jsx b/awx/ui_next/src/components/DisassociateButton/DisassociateButton.test.jsx index 06e6eedbe7..5f0b76d330 100644 --- a/awx/ui_next/src/components/DisassociateButton/DisassociateButton.test.jsx +++ b/awx/ui_next/src/components/DisassociateButton/DisassociateButton.test.jsx @@ -1,5 +1,5 @@ import React from 'react'; -import { mountWithContexts } from '@testUtils/enzymeHelpers'; +import { mountWithContexts } from '../../../testUtils/enzymeHelpers'; import DisassociateButton from './DisassociateButton'; describe('', () => { diff --git a/awx/ui_next/src/components/ErrorDetail/ErrorDetail.test.jsx b/awx/ui_next/src/components/ErrorDetail/ErrorDetail.test.jsx index 383c41e4ed..8accea199c 100644 --- a/awx/ui_next/src/components/ErrorDetail/ErrorDetail.test.jsx +++ b/awx/ui_next/src/components/ErrorDetail/ErrorDetail.test.jsx @@ -1,5 +1,5 @@ import React from 'react'; -import { mountWithContexts } from '@testUtils/enzymeHelpers'; +import { mountWithContexts } from '../../../testUtils/enzymeHelpers'; import ErrorDetail from './ErrorDetail'; diff --git a/awx/ui_next/src/components/ExpandCollapse/ExpandCollapse.test.jsx b/awx/ui_next/src/components/ExpandCollapse/ExpandCollapse.test.jsx index 6b68787b2e..74b37d6235 100644 --- a/awx/ui_next/src/components/ExpandCollapse/ExpandCollapse.test.jsx +++ b/awx/ui_next/src/components/ExpandCollapse/ExpandCollapse.test.jsx @@ -1,5 +1,5 @@ import React from 'react'; -import { mountWithContexts } from '@testUtils/enzymeHelpers'; +import { mountWithContexts } from '../../../testUtils/enzymeHelpers'; import ExpandCollapse from './ExpandCollapse'; describe('', () => { diff --git a/awx/ui_next/src/components/FieldWithPrompt/FieldWithPrompt.jsx b/awx/ui_next/src/components/FieldWithPrompt/FieldWithPrompt.jsx index 9050307c83..19ad76c796 100644 --- a/awx/ui_next/src/components/FieldWithPrompt/FieldWithPrompt.jsx +++ b/awx/ui_next/src/components/FieldWithPrompt/FieldWithPrompt.jsx @@ -2,8 +2,8 @@ import React from 'react'; import { bool, node, string } from 'prop-types'; import { withI18n } from '@lingui/react'; import { t } from '@lingui/macro'; -import { CheckboxField, FieldTooltip } from '@components/FormField'; import styled from 'styled-components'; +import { CheckboxField, FieldTooltip } from '../FormField'; const FieldHeader = styled.div` display: flex; diff --git a/awx/ui_next/src/components/FieldWithPrompt/FieldWithPrompt.test.jsx b/awx/ui_next/src/components/FieldWithPrompt/FieldWithPrompt.test.jsx index 4358737144..d99e5e7b41 100644 --- a/awx/ui_next/src/components/FieldWithPrompt/FieldWithPrompt.test.jsx +++ b/awx/ui_next/src/components/FieldWithPrompt/FieldWithPrompt.test.jsx @@ -1,6 +1,6 @@ import React from 'react'; -import { mountWithContexts } from '@testUtils/enzymeHelpers'; import { Field, Formik } from 'formik'; +import { mountWithContexts } from '../../../testUtils/enzymeHelpers'; import FieldWithPrompt from './FieldWithPrompt'; describe('FieldWithPrompt', () => { diff --git a/awx/ui_next/src/components/FormActionGroup/FormActionGroup.jsx b/awx/ui_next/src/components/FormActionGroup/FormActionGroup.jsx index 6d3760d0b7..07620204eb 100644 --- a/awx/ui_next/src/components/FormActionGroup/FormActionGroup.jsx +++ b/awx/ui_next/src/components/FormActionGroup/FormActionGroup.jsx @@ -3,7 +3,7 @@ import PropTypes from 'prop-types'; import { withI18n } from '@lingui/react'; import { t } from '@lingui/macro'; import { ActionGroup, Button } from '@patternfly/react-core'; -import { FormFullWidthLayout } from '@components/FormLayout'; +import { FormFullWidthLayout } from '../FormLayout'; const FormActionGroup = ({ onSubmit, submitDisabled, onCancel, i18n }) => ( diff --git a/awx/ui_next/src/components/FormActionGroup/FormActionGroup.test.jsx b/awx/ui_next/src/components/FormActionGroup/FormActionGroup.test.jsx index d81d9e9e59..5068a85226 100644 --- a/awx/ui_next/src/components/FormActionGroup/FormActionGroup.test.jsx +++ b/awx/ui_next/src/components/FormActionGroup/FormActionGroup.test.jsx @@ -1,5 +1,5 @@ import React from 'react'; -import { mountWithContexts } from '@testUtils/enzymeHelpers'; +import { mountWithContexts } from '../../../testUtils/enzymeHelpers'; import FormActionGroup from './FormActionGroup'; diff --git a/awx/ui_next/src/components/FormField/FormSubmitError.test.jsx b/awx/ui_next/src/components/FormField/FormSubmitError.test.jsx index a52211d667..7dd41922bd 100644 --- a/awx/ui_next/src/components/FormField/FormSubmitError.test.jsx +++ b/awx/ui_next/src/components/FormField/FormSubmitError.test.jsx @@ -1,7 +1,7 @@ import React from 'react'; import { act } from 'react-dom/test-utils'; -import { mountWithContexts } from '@testUtils/enzymeHelpers'; import { Formik } from 'formik'; +import { mountWithContexts } from '../../../testUtils/enzymeHelpers'; import FormSubmitError from './FormSubmitError'; describe('', () => { diff --git a/awx/ui_next/src/components/FormField/PasswordField.test.jsx b/awx/ui_next/src/components/FormField/PasswordField.test.jsx index 65fdd55501..2f2ceab52a 100644 --- a/awx/ui_next/src/components/FormField/PasswordField.test.jsx +++ b/awx/ui_next/src/components/FormField/PasswordField.test.jsx @@ -1,7 +1,7 @@ import React from 'react'; -import { mountWithContexts } from '@testUtils/enzymeHelpers'; -import { sleep } from '@testUtils/testUtils'; import { Formik } from 'formik'; +import { mountWithContexts } from '../../../testUtils/enzymeHelpers'; +import { sleep } from '../../../testUtils/testUtils'; import PasswordField from './PasswordField'; describe('PasswordField', () => { diff --git a/awx/ui_next/src/components/HostForm/HostForm.jsx b/awx/ui_next/src/components/HostForm/HostForm.jsx index 5e662ea313..8fa1c63bb2 100644 --- a/awx/ui_next/src/components/HostForm/HostForm.jsx +++ b/awx/ui_next/src/components/HostForm/HostForm.jsx @@ -5,15 +5,12 @@ import { withI18n } from '@lingui/react'; import { t } from '@lingui/macro'; import { Form, FormGroup } from '@patternfly/react-core'; -import FormField, { - FormSubmitError, - FieldTooltip, -} from '@components/FormField'; -import FormActionGroup from '@components/FormActionGroup/FormActionGroup'; -import { VariablesField } from '@components/CodeMirrorInput'; -import { InventoryLookup } from '@components/Lookup'; -import { FormColumnLayout, FormFullWidthLayout } from '@components/FormLayout'; -import { required } from '@util/validators'; +import FormField, { FormSubmitError, FieldTooltip } from '../FormField'; +import FormActionGroup from '../FormActionGroup/FormActionGroup'; +import { VariablesField } from '../CodeMirrorInput'; +import { InventoryLookup } from '../Lookup'; +import { FormColumnLayout, FormFullWidthLayout } from '../FormLayout'; +import { required } from '../../util/validators'; const InventoryLookupField = withI18n()(({ i18n, host }) => { const [inventory, setInventory] = useState( diff --git a/awx/ui_next/src/components/HostForm/HostForm.test.jsx b/awx/ui_next/src/components/HostForm/HostForm.test.jsx index c39867641e..23538ad933 100644 --- a/awx/ui_next/src/components/HostForm/HostForm.test.jsx +++ b/awx/ui_next/src/components/HostForm/HostForm.test.jsx @@ -1,10 +1,10 @@ import React from 'react'; import { act } from 'react-dom/test-utils'; -import { mountWithContexts } from '@testUtils/enzymeHelpers'; +import { mountWithContexts } from '../../../testUtils/enzymeHelpers'; import HostForm from './HostForm'; -jest.mock('@api'); +jest.mock('../../api'); const mockData = { id: 1, diff --git a/awx/ui_next/src/components/HostToggle/HostToggle.jsx b/awx/ui_next/src/components/HostToggle/HostToggle.jsx index eefdb76fe9..816b7979a3 100644 --- a/awx/ui_next/src/components/HostToggle/HostToggle.jsx +++ b/awx/ui_next/src/components/HostToggle/HostToggle.jsx @@ -2,10 +2,10 @@ import React, { Fragment, useState, useEffect, useCallback } from 'react'; import { withI18n } from '@lingui/react'; import { t } from '@lingui/macro'; import { Switch, Tooltip } from '@patternfly/react-core'; -import AlertModal from '@components/AlertModal'; -import ErrorDetail from '@components/ErrorDetail'; -import useRequest from '@util/useRequest'; -import { HostsAPI } from '@api'; +import AlertModal from '../AlertModal'; +import ErrorDetail from '../ErrorDetail'; +import useRequest from '../../util/useRequest'; +import { HostsAPI } from '../../api'; function HostToggle({ host, onToggle, className, i18n }) { const [isEnabled, setIsEnabled] = useState(host.enabled); diff --git a/awx/ui_next/src/components/HostToggle/HostToggle.test.jsx b/awx/ui_next/src/components/HostToggle/HostToggle.test.jsx index cef60fb34e..63dd971285 100644 --- a/awx/ui_next/src/components/HostToggle/HostToggle.test.jsx +++ b/awx/ui_next/src/components/HostToggle/HostToggle.test.jsx @@ -1,10 +1,10 @@ import React from 'react'; import { act } from 'react-dom/test-utils'; -import { HostsAPI } from '@api'; -import { mountWithContexts } from '@testUtils/enzymeHelpers'; +import { HostsAPI } from '../../api'; +import { mountWithContexts } from '../../../testUtils/enzymeHelpers'; import HostToggle from './HostToggle'; -jest.mock('@api'); +jest.mock('../../api'); const mockHost = { id: 1, diff --git a/awx/ui_next/src/components/JobList/JobList.jsx b/awx/ui_next/src/components/JobList/JobList.jsx index 41e0be21d1..a96e5f3924 100644 --- a/awx/ui_next/src/components/JobList/JobList.jsx +++ b/awx/ui_next/src/components/JobList/JobList.jsx @@ -4,14 +4,12 @@ import { withI18n } from '@lingui/react'; import { t } from '@lingui/macro'; import { Card } from '@patternfly/react-core'; -import AlertModal from '@components/AlertModal'; -import DatalistToolbar from '@components/DataListToolbar'; -import ErrorDetail from '@components/ErrorDetail'; -import PaginatedDataList, { - ToolbarDeleteButton, -} from '@components/PaginatedDataList'; -import useRequest, { useDeleteItems } from '@util/useRequest'; -import { getQSConfig, parseQueryString } from '@util/qs'; +import AlertModal from '../AlertModal'; +import DatalistToolbar from '../DataListToolbar'; +import ErrorDetail from '../ErrorDetail'; +import PaginatedDataList, { ToolbarDeleteButton } from '../PaginatedDataList'; +import useRequest, { useDeleteItems } from '../../util/useRequest'; +import { getQSConfig, parseQueryString } from '../../util/qs'; import JobListItem from './JobListItem'; import { AdHocCommandsAPI, @@ -21,7 +19,7 @@ import { SystemJobsAPI, UnifiedJobsAPI, WorkflowJobsAPI, -} from '@api'; +} from '../../api'; function JobList({ i18n, defaultParams, showTypeColumn = false }) { const QS_CONFIG = getQSConfig( diff --git a/awx/ui_next/src/components/JobList/JobList.test.jsx b/awx/ui_next/src/components/JobList/JobList.test.jsx index 75632f2f7b..f2d1e6f71d 100644 --- a/awx/ui_next/src/components/JobList/JobList.test.jsx +++ b/awx/ui_next/src/components/JobList/JobList.test.jsx @@ -1,6 +1,9 @@ import React from 'react'; import { act } from 'react-dom/test-utils'; -import { mountWithContexts, waitForElement } from '@testUtils/enzymeHelpers'; +import { + mountWithContexts, + waitForElement, +} from '../../../testUtils/enzymeHelpers'; import { AdHocCommandsAPI, InventoryUpdatesAPI, @@ -9,10 +12,10 @@ import { SystemJobsAPI, UnifiedJobsAPI, WorkflowJobsAPI, -} from '@api'; +} from '../../api'; import JobList from './JobList'; -jest.mock('@api'); +jest.mock('../../api'); const mockResults = [ { diff --git a/awx/ui_next/src/components/JobList/JobListItem.jsx b/awx/ui_next/src/components/JobList/JobListItem.jsx index 19e8089414..296ecba9c7 100644 --- a/awx/ui_next/src/components/JobList/JobListItem.jsx +++ b/awx/ui_next/src/components/JobList/JobListItem.jsx @@ -11,13 +11,13 @@ import { DataListItemCells, Tooltip, } from '@patternfly/react-core'; -import DataListCell from '@components/DataListCell'; import { RocketIcon } from '@patternfly/react-icons'; -import LaunchButton from '@components/LaunchButton'; -import StatusIcon from '@components/StatusIcon'; -import { formatDateString } from '@util/dates'; -import { JOB_TYPE_URL_SEGMENTS } from '@constants'; import styled from 'styled-components'; +import DataListCell from '../DataListCell'; +import LaunchButton from '../LaunchButton'; +import StatusIcon from '../StatusIcon'; +import { formatDateString } from '../../util/dates'; +import { JOB_TYPE_URL_SEGMENTS } from '../../constants'; const DataListAction = styled(_DataListAction)` align-items: center; diff --git a/awx/ui_next/src/components/JobList/JobListItem.test.jsx b/awx/ui_next/src/components/JobList/JobListItem.test.jsx index d087b23b95..fc453c3be4 100644 --- a/awx/ui_next/src/components/JobList/JobListItem.test.jsx +++ b/awx/ui_next/src/components/JobList/JobListItem.test.jsx @@ -1,7 +1,7 @@ import React from 'react'; import { createMemoryHistory } from 'history'; -import { mountWithContexts } from '@testUtils/enzymeHelpers'; +import { mountWithContexts } from '../../../testUtils/enzymeHelpers'; import JobListItem from './JobListItem'; diff --git a/awx/ui_next/src/components/LaunchButton/LaunchButton.jsx b/awx/ui_next/src/components/LaunchButton/LaunchButton.jsx index 7d48a7bba9..e2484abb5a 100644 --- a/awx/ui_next/src/components/LaunchButton/LaunchButton.jsx +++ b/awx/ui_next/src/components/LaunchButton/LaunchButton.jsx @@ -4,8 +4,8 @@ import { number, shape } from 'prop-types'; import { withI18n } from '@lingui/react'; import { t } from '@lingui/macro'; -import AlertModal from '@components/AlertModal'; -import ErrorDetail from '@components/ErrorDetail'; +import AlertModal from '../AlertModal'; +import ErrorDetail from '../ErrorDetail'; import { AdHocCommandsAPI, InventorySourcesAPI, @@ -14,8 +14,8 @@ import { ProjectsAPI, WorkflowJobsAPI, WorkflowJobTemplatesAPI, -} from '@api'; -import LaunchPrompt from '@components/LaunchPrompt'; +} from '../../api'; +import LaunchPrompt from '../LaunchPrompt'; function canLaunchWithoutPrompt(launchData) { return ( diff --git a/awx/ui_next/src/components/LaunchButton/LaunchButton.test.jsx b/awx/ui_next/src/components/LaunchButton/LaunchButton.test.jsx index 8ca2b3d167..10fbbd1bf4 100644 --- a/awx/ui_next/src/components/LaunchButton/LaunchButton.test.jsx +++ b/awx/ui_next/src/components/LaunchButton/LaunchButton.test.jsx @@ -1,13 +1,13 @@ import React from 'react'; import { createMemoryHistory } from 'history'; -import { mountWithContexts } from '@testUtils/enzymeHelpers'; -import { sleep } from '@testUtils/testUtils'; +import { mountWithContexts } from '../../../testUtils/enzymeHelpers'; +import { sleep } from '../../../testUtils/testUtils'; import LaunchButton from './LaunchButton'; -import { JobTemplatesAPI, WorkflowJobTemplatesAPI } from '@api'; +import { JobTemplatesAPI, WorkflowJobTemplatesAPI } from '../../api'; -jest.mock('@api/models/WorkflowJobTemplates'); -jest.mock('@api/models/JobTemplates'); +jest.mock('../../api/models/WorkflowJobTemplates'); +jest.mock('../../api/models/JobTemplates'); describe('LaunchButton', () => { JobTemplatesAPI.readLaunch.mockResolvedValue({ diff --git a/awx/ui_next/src/components/LaunchPrompt/LaunchPrompt.jsx b/awx/ui_next/src/components/LaunchPrompt/LaunchPrompt.jsx index 246c54fb91..f9d926d267 100644 --- a/awx/ui_next/src/components/LaunchPrompt/LaunchPrompt.jsx +++ b/awx/ui_next/src/components/LaunchPrompt/LaunchPrompt.jsx @@ -3,8 +3,8 @@ import { Wizard } from '@patternfly/react-core'; import { withI18n } from '@lingui/react'; import { t } from '@lingui/macro'; import { Formik } from 'formik'; -import ContentError from '@components/ContentError'; -import ContentLoading from '@components/ContentLoading'; +import ContentError from '../../components/ContentError'; +import ContentLoading from '../../components/ContentLoading'; import mergeExtraVars from './mergeExtraVars'; import useSteps from './useSteps'; import getSurveyValues from './getSurveyValues'; diff --git a/awx/ui_next/src/components/LaunchPrompt/LaunchPrompt.test.jsx b/awx/ui_next/src/components/LaunchPrompt/LaunchPrompt.test.jsx index 650e2cc640..5cab9562ff 100644 --- a/awx/ui_next/src/components/LaunchPrompt/LaunchPrompt.test.jsx +++ b/awx/ui_next/src/components/LaunchPrompt/LaunchPrompt.test.jsx @@ -1,6 +1,6 @@ import React from 'react'; import { act, isElementOfType } from 'react-dom/test-utils'; -import { mountWithContexts, waitForElement } from '@testUtils/enzymeHelpers'; +import { mountWithContexts, waitForElement } from '../../../testUtils/enzymeHelpers'; import LaunchPrompt from './LaunchPrompt'; import InventoryStep from './steps/InventoryStep'; import CredentialsStep from './steps/CredentialsStep'; @@ -11,12 +11,12 @@ import { CredentialsAPI, CredentialTypesAPI, JobTemplatesAPI, -} from '@api'; +} from '../../api'; -jest.mock('@api/models/Inventories'); -jest.mock('@api/models/CredentialTypes'); -jest.mock('@api/models/Credentials'); -jest.mock('@api/models/JobTemplates'); +jest.mock('../../api/models/Inventories'); +jest.mock('../../api/models/CredentialTypes'); +jest.mock('../../api/models/Credentials'); +jest.mock('../../api/models/JobTemplates'); let config; const resource = { diff --git a/awx/ui_next/src/components/LaunchPrompt/steps/CredentialsStep.jsx b/awx/ui_next/src/components/LaunchPrompt/steps/CredentialsStep.jsx index 5288e5f8cc..ccf6cc3178 100644 --- a/awx/ui_next/src/components/LaunchPrompt/steps/CredentialsStep.jsx +++ b/awx/ui_next/src/components/LaunchPrompt/steps/CredentialsStep.jsx @@ -4,15 +4,15 @@ import { withI18n } from '@lingui/react'; import { t } from '@lingui/macro'; import { useField } from 'formik'; import { ToolbarItem } from '@patternfly/react-core'; -import { CredentialsAPI, CredentialTypesAPI } from '@api'; -import AnsibleSelect from '@components/AnsibleSelect'; -import OptionsList from '@components/OptionsList'; -import ContentLoading from '@components/ContentLoading'; -import CredentialChip from '@components/CredentialChip'; -import ContentError from '@components/ContentError'; -import { getQSConfig, parseQueryString } from '@util/qs'; -import useRequest from '@util/useRequest'; -import { required } from '@util/validators'; +import { CredentialsAPI, CredentialTypesAPI } from '../../../api'; +import AnsibleSelect from '../../../components/AnsibleSelect'; +import OptionsList from '../../../components/OptionsList'; +import ContentLoading from '../../../components/ContentLoading'; +import CredentialChip from '../../../components/CredentialChip'; +import ContentError from '../../../components/ContentError'; +import { getQSConfig, parseQueryString } from '../../../util/qs'; +import useRequest from '../../../util/useRequest'; +import { required } from '../../../util/validators'; const QS_CONFIG = getQSConfig('credential', { page: 1, diff --git a/awx/ui_next/src/components/LaunchPrompt/steps/CredentialsStep.test.jsx b/awx/ui_next/src/components/LaunchPrompt/steps/CredentialsStep.test.jsx index 5038482125..af056990ce 100644 --- a/awx/ui_next/src/components/LaunchPrompt/steps/CredentialsStep.test.jsx +++ b/awx/ui_next/src/components/LaunchPrompt/steps/CredentialsStep.test.jsx @@ -1,12 +1,12 @@ import React from 'react'; import { act } from 'react-dom/test-utils'; import { Formik } from 'formik'; -import { mountWithContexts } from '@testUtils/enzymeHelpers'; +import { mountWithContexts } from '../../../testUtils/enzymeHelpers'; import CredentialsStep from './CredentialsStep'; -import { CredentialsAPI, CredentialTypesAPI } from '@api'; +import { CredentialsAPI, CredentialTypesAPI } from '../../api'; -jest.mock('@api/models/CredentialTypes'); -jest.mock('@api/models/Credentials'); +jest.mock('../../api/models/CredentialTypes'); +jest.mock('../../api/models/Credentials'); const types = [ { id: 1, kind: 'ssh', name: 'SSH' }, diff --git a/awx/ui_next/src/components/LaunchPrompt/steps/InventoryStep.jsx b/awx/ui_next/src/components/LaunchPrompt/steps/InventoryStep.jsx index d892e0c91b..535fdd19c8 100644 --- a/awx/ui_next/src/components/LaunchPrompt/steps/InventoryStep.jsx +++ b/awx/ui_next/src/components/LaunchPrompt/steps/InventoryStep.jsx @@ -3,13 +3,13 @@ import { useHistory } from 'react-router-dom'; import { withI18n } from '@lingui/react'; import { t } from '@lingui/macro'; import { useField } from 'formik'; -import { InventoriesAPI } from '@api'; -import { getQSConfig, parseQueryString } from '@util/qs'; -import useRequest from '@util/useRequest'; -import OptionsList from '@components/OptionsList'; -import ContentLoading from '@components/ContentLoading'; -import ContentError from '@components/ContentError'; -import { required } from '@util/validators'; +import { InventoriesAPI } from '../../../api'; +import { getQSConfig, parseQueryString } from '../../../util/qs'; +import useRequest from '../../../util/useRequest'; +import OptionsList from '../../../components/OptionsList'; +import ContentLoading from '../../../components/ContentLoading'; +import ContentError from '../../../components/ContentError'; +import { required } from '../../../util/validators'; const QS_CONFIG = getQSConfig('inventory', { page: 1, diff --git a/awx/ui_next/src/components/LaunchPrompt/steps/InventoryStep.test.jsx b/awx/ui_next/src/components/LaunchPrompt/steps/InventoryStep.test.jsx index 4bac24478c..260e48cae6 100644 --- a/awx/ui_next/src/components/LaunchPrompt/steps/InventoryStep.test.jsx +++ b/awx/ui_next/src/components/LaunchPrompt/steps/InventoryStep.test.jsx @@ -1,11 +1,11 @@ import React from 'react'; import { act } from 'react-dom/test-utils'; import { Formik } from 'formik'; -import { mountWithContexts } from '@testUtils/enzymeHelpers'; +import { mountWithContexts } from '../../../testUtils/enzymeHelpers'; import InventoryStep from './InventoryStep'; -import { InventoriesAPI } from '@api'; +import { InventoriesAPI } from '../../api'; -jest.mock('@api/models/Inventories'); +jest.mock('../../api/models/Inventories'); const inventories = [ { id: 1, name: 'inv one', url: '/inventories/1' }, diff --git a/awx/ui_next/src/components/LaunchPrompt/steps/OtherPromptsStep.jsx b/awx/ui_next/src/components/LaunchPrompt/steps/OtherPromptsStep.jsx index 0989368652..6705a4b576 100644 --- a/awx/ui_next/src/components/LaunchPrompt/steps/OtherPromptsStep.jsx +++ b/awx/ui_next/src/components/LaunchPrompt/steps/OtherPromptsStep.jsx @@ -3,11 +3,11 @@ import { withI18n } from '@lingui/react'; import { t } from '@lingui/macro'; import { useField } from 'formik'; import { Form, FormGroup, Switch } from '@patternfly/react-core'; -import FormField, { FieldTooltip } from '@components/FormField'; -import { TagMultiSelect } from '@components/MultiSelect'; -import AnsibleSelect from '@components/AnsibleSelect'; -import { VariablesField } from '@components/CodeMirrorInput'; import styled from 'styled-components'; +import FormField, { FieldTooltip } from '../FormField'; +import { TagMultiSelect } from '../MultiSelect'; +import AnsibleSelect from '../AnsibleSelect'; +import { VariablesField } from '../CodeMirrorInput'; const FieldHeader = styled.div` display: flex; diff --git a/awx/ui_next/src/components/LaunchPrompt/steps/OtherPromptsStep.test.jsx b/awx/ui_next/src/components/LaunchPrompt/steps/OtherPromptsStep.test.jsx index 58f0856131..76c87e8302 100644 --- a/awx/ui_next/src/components/LaunchPrompt/steps/OtherPromptsStep.test.jsx +++ b/awx/ui_next/src/components/LaunchPrompt/steps/OtherPromptsStep.test.jsx @@ -1,7 +1,7 @@ import React from 'react'; import { act } from 'react-dom/test-utils'; import { Formik } from 'formik'; -import { mountWithContexts } from '@testUtils/enzymeHelpers'; +import { mountWithContexts } from '../../../testUtils/enzymeHelpers'; import OtherPromptsStep from './OtherPromptsStep'; describe('OtherPromptsStep', () => { diff --git a/awx/ui_next/src/components/LaunchPrompt/steps/PreviewStep.jsx b/awx/ui_next/src/components/LaunchPrompt/steps/PreviewStep.jsx index e8df1ea8ff..2ab8b4f6f5 100644 --- a/awx/ui_next/src/components/LaunchPrompt/steps/PreviewStep.jsx +++ b/awx/ui_next/src/components/LaunchPrompt/steps/PreviewStep.jsx @@ -1,7 +1,7 @@ import React from 'react'; import { useFormikContext } from 'formik'; import yaml from 'js-yaml'; -import PromptDetail from '@components/PromptDetail'; +import PromptDetail from '../../../components/PromptDetail'; import mergeExtraVars, { maskPasswords } from '../mergeExtraVars'; import getSurveyValues from '../getSurveyValues'; diff --git a/awx/ui_next/src/components/LaunchPrompt/steps/SurveyStep.jsx b/awx/ui_next/src/components/LaunchPrompt/steps/SurveyStep.jsx index ba33b8ec11..dd74c202a5 100644 --- a/awx/ui_next/src/components/LaunchPrompt/steps/SurveyStep.jsx +++ b/awx/ui_next/src/components/LaunchPrompt/steps/SurveyStep.jsx @@ -8,8 +8,8 @@ import { SelectOption, SelectVariant, } from '@patternfly/react-core'; -import FormField, { FieldTooltip } from '@components/FormField'; -import AnsibleSelect from '@components/AnsibleSelect'; +import FormField, { FieldTooltip } from '../../../components/FormField'; +import AnsibleSelect from '../../../components/AnsibleSelect'; import { required, minMaxValue, @@ -17,8 +17,8 @@ import { minLength, integer, combine, -} from '@util/validators'; -import { Survey } from '@types'; +} from '../../../util/validators'; +import { Survey } from '../../../types'; function SurveyStep({ survey, i18n }) { const fieldTypes = { diff --git a/awx/ui_next/src/components/LaunchPrompt/steps/useSurveyStep.jsx b/awx/ui_next/src/components/LaunchPrompt/steps/useSurveyStep.jsx index 8b4014b251..7cee7f7f6d 100644 --- a/awx/ui_next/src/components/LaunchPrompt/steps/useSurveyStep.jsx +++ b/awx/ui_next/src/components/LaunchPrompt/steps/useSurveyStep.jsx @@ -1,7 +1,7 @@ import React, { useState, useEffect, useCallback } from 'react'; import { t } from '@lingui/macro'; -import useRequest from '@util/useRequest'; -import { JobTemplatesAPI, WorkflowJobTemplatesAPI } from '@api'; +import useRequest from '../../../util/useRequest'; +import { JobTemplatesAPI, WorkflowJobTemplatesAPI } from '../../../api'; import SurveyStep from './SurveyStep'; import StepName from './StepName'; diff --git a/awx/ui_next/src/components/ListHeader/ListHeader.jsx b/awx/ui_next/src/components/ListHeader/ListHeader.jsx index 5575caf351..ebc745174d 100644 --- a/awx/ui_next/src/components/ListHeader/ListHeader.jsx +++ b/awx/ui_next/src/components/ListHeader/ListHeader.jsx @@ -6,7 +6,7 @@ import { DataToolbar, DataToolbarContent, } from '@patternfly/react-core/dist/umd/experimental'; -import DataListToolbar from '@components/DataListToolbar'; +import DataListToolbar from '../DataListToolbar'; import { encodeNonDefaultQueryString, @@ -14,8 +14,8 @@ import { mergeParams, replaceParams, removeParams, -} from '@util/qs'; -import { QSConfig, SearchColumns, SortColumns } from '@types'; +} from '../../util/qs'; +import { QSConfig, SearchColumns, SortColumns } from '../../types'; const EmptyStateControlsWrapper = styled.div` display: flex; diff --git a/awx/ui_next/src/components/ListHeader/ListHeader.test.jsx b/awx/ui_next/src/components/ListHeader/ListHeader.test.jsx index dc45932333..52263d2ec7 100644 --- a/awx/ui_next/src/components/ListHeader/ListHeader.test.jsx +++ b/awx/ui_next/src/components/ListHeader/ListHeader.test.jsx @@ -1,6 +1,6 @@ import React from 'react'; import { createMemoryHistory } from 'history'; -import { mountWithContexts } from '@testUtils/enzymeHelpers'; +import { mountWithContexts } from '../../../testUtils/enzymeHelpers'; import ListHeader from './ListHeader'; describe('ListHeader', () => { diff --git a/awx/ui_next/src/components/Lookup/CredentialLookup.jsx b/awx/ui_next/src/components/Lookup/CredentialLookup.jsx index bb4629c697..5617ccb8ed 100644 --- a/awx/ui_next/src/components/Lookup/CredentialLookup.jsx +++ b/awx/ui_next/src/components/Lookup/CredentialLookup.jsx @@ -3,13 +3,13 @@ import { bool, func, node, number, string, oneOfType } from 'prop-types'; import { withRouter } from 'react-router-dom'; import { withI18n } from '@lingui/react'; import { t } from '@lingui/macro'; -import { CredentialsAPI } from '@api'; -import { Credential } from '@types'; -import { getQSConfig, parseQueryString, mergeParams } from '@util/qs'; -import { FieldTooltip } from '@components/FormField'; import { FormGroup } from '@patternfly/react-core'; -import Lookup from '@components/Lookup'; -import OptionsList from '@components/OptionsList'; +import { CredentialsAPI } from '../../api'; +import { Credential } from '../../types'; +import { getQSConfig, parseQueryString, mergeParams } from '../../util/qs'; +import { FieldTooltip } from '../FormField'; +import Lookup from '.'; +import OptionsList from '../OptionsList'; import LookupErrorMessage from './shared/LookupErrorMessage'; const QS_CONFIG = getQSConfig('credentials', { diff --git a/awx/ui_next/src/components/Lookup/CredentialLookup.test.jsx b/awx/ui_next/src/components/Lookup/CredentialLookup.test.jsx index 658229163e..6ef8bcb979 100644 --- a/awx/ui_next/src/components/Lookup/CredentialLookup.test.jsx +++ b/awx/ui_next/src/components/Lookup/CredentialLookup.test.jsx @@ -1,10 +1,10 @@ import React from 'react'; import { act } from 'react-dom/test-utils'; -import { mountWithContexts } from '@testUtils/enzymeHelpers'; +import { mountWithContexts } from '../../../testUtils/enzymeHelpers'; import CredentialLookup, { _CredentialLookup } from './CredentialLookup'; -import { CredentialsAPI } from '@api'; +import { CredentialsAPI } from '../../api'; -jest.mock('@api'); +jest.mock('../../api'); describe('CredentialLookup', () => { let wrapper; diff --git a/awx/ui_next/src/components/Lookup/InstanceGroupsLookup.jsx b/awx/ui_next/src/components/Lookup/InstanceGroupsLookup.jsx index d794ed252c..26d1760f57 100644 --- a/awx/ui_next/src/components/Lookup/InstanceGroupsLookup.jsx +++ b/awx/ui_next/src/components/Lookup/InstanceGroupsLookup.jsx @@ -4,10 +4,10 @@ import { withRouter } from 'react-router-dom'; import { withI18n } from '@lingui/react'; import { t } from '@lingui/macro'; import { FormGroup } from '@patternfly/react-core'; -import { InstanceGroupsAPI } from '@api'; -import { getQSConfig, parseQueryString } from '@util/qs'; -import { FieldTooltip } from '@components/FormField'; -import OptionsList from '@components/OptionsList'; +import { InstanceGroupsAPI } from '../../api'; +import { getQSConfig, parseQueryString } from '../../util/qs'; +import { FieldTooltip } from '../FormField'; +import OptionsList from '../OptionsList'; import Lookup from './Lookup'; import LookupErrorMessage from './shared/LookupErrorMessage'; diff --git a/awx/ui_next/src/components/Lookup/InventoryLookup.jsx b/awx/ui_next/src/components/Lookup/InventoryLookup.jsx index 92815d943d..b47f2aa583 100644 --- a/awx/ui_next/src/components/Lookup/InventoryLookup.jsx +++ b/awx/ui_next/src/components/Lookup/InventoryLookup.jsx @@ -3,11 +3,11 @@ import { func, bool } from 'prop-types'; import { withRouter } from 'react-router-dom'; import { withI18n } from '@lingui/react'; import { t } from '@lingui/macro'; -import { InventoriesAPI } from '@api'; -import { Inventory } from '@types'; -import Lookup from '@components/Lookup'; -import OptionsList from '@components/OptionsList'; -import { getQSConfig, parseQueryString } from '@util/qs'; +import { InventoriesAPI } from '../../api'; +import { Inventory } from '../../types'; +import Lookup from '.'; +import OptionsList from '../OptionsList'; +import { getQSConfig, parseQueryString } from '../../util/qs'; import LookupErrorMessage from './shared/LookupErrorMessage'; const QS_CONFIG = getQSConfig('inventory', { diff --git a/awx/ui_next/src/components/Lookup/Lookup.jsx b/awx/ui_next/src/components/Lookup/Lookup.jsx index 6494a35426..1397e7b776 100644 --- a/awx/ui_next/src/components/Lookup/Lookup.jsx +++ b/awx/ui_next/src/components/Lookup/Lookup.jsx @@ -17,13 +17,13 @@ import { InputGroup as PFInputGroup, Modal, } from '@patternfly/react-core'; -import ChipGroup from '@components/ChipGroup'; +import ChipGroup from '../../components/ChipGroup'; import { withI18n } from '@lingui/react'; import { t } from '@lingui/macro'; import styled from 'styled-components'; import reducer, { initReducer } from './shared/reducer'; -import { QSConfig } from '@types'; +import { QSConfig } from '../../types'; const SearchButton = styled(Button)` ::after { diff --git a/awx/ui_next/src/components/Lookup/Lookup.test.jsx b/awx/ui_next/src/components/Lookup/Lookup.test.jsx index 143ba5a709..7fb1ed464c 100644 --- a/awx/ui_next/src/components/Lookup/Lookup.test.jsx +++ b/awx/ui_next/src/components/Lookup/Lookup.test.jsx @@ -1,8 +1,11 @@ /* eslint-disable react/jsx-pascal-case */ import React from 'react'; import { act } from 'react-dom/test-utils'; -import { mountWithContexts, waitForElement } from '@testUtils/enzymeHelpers'; -import { getQSConfig } from '@util/qs'; +import { + mountWithContexts, + waitForElement, +} from '../../../testUtils/enzymeHelpers'; +import { getQSConfig } from '../../util/qs'; import Lookup from './Lookup'; /** diff --git a/awx/ui_next/src/components/Lookup/MultiCredentialsLookup.jsx b/awx/ui_next/src/components/Lookup/MultiCredentialsLookup.jsx index c153b1d610..5f1ffeea15 100644 --- a/awx/ui_next/src/components/Lookup/MultiCredentialsLookup.jsx +++ b/awx/ui_next/src/components/Lookup/MultiCredentialsLookup.jsx @@ -4,11 +4,11 @@ import PropTypes from 'prop-types'; import { withI18n } from '@lingui/react'; import { t } from '@lingui/macro'; import { ToolbarItem, Alert } from '@patternfly/react-core'; -import { CredentialsAPI, CredentialTypesAPI } from '@api'; -import AnsibleSelect from '@components/AnsibleSelect'; -import CredentialChip from '@components/CredentialChip'; -import OptionsList from '@components/OptionsList'; -import { getQSConfig, parseQueryString } from '@util/qs'; +import { CredentialsAPI, CredentialTypesAPI } from '../../api'; +import AnsibleSelect from '../AnsibleSelect'; +import CredentialChip from '../CredentialChip'; +import OptionsList from '../OptionsList'; +import { getQSConfig, parseQueryString } from '../../util/qs'; import Lookup from './Lookup'; const QS_CONFIG = getQSConfig('credentials', { diff --git a/awx/ui_next/src/components/Lookup/MultiCredentialsLookup.test.jsx b/awx/ui_next/src/components/Lookup/MultiCredentialsLookup.test.jsx index 08fcf87b18..a73a6b4025 100644 --- a/awx/ui_next/src/components/Lookup/MultiCredentialsLookup.test.jsx +++ b/awx/ui_next/src/components/Lookup/MultiCredentialsLookup.test.jsx @@ -1,10 +1,13 @@ import React from 'react'; import { act } from 'react-dom/test-utils'; -import { mountWithContexts, waitForElement } from '@testUtils/enzymeHelpers'; +import { + mountWithContexts, + waitForElement, +} from '../../../testUtils/enzymeHelpers'; import MultiCredentialsLookup from './MultiCredentialsLookup'; -import { CredentialsAPI, CredentialTypesAPI } from '@api'; +import { CredentialsAPI, CredentialTypesAPI } from '../../api'; -jest.mock('@api'); +jest.mock('../../api'); describe('', () => { let wrapper; diff --git a/awx/ui_next/src/components/Lookup/OrganizationLookup.jsx b/awx/ui_next/src/components/Lookup/OrganizationLookup.jsx index bf5a77aa0a..1290bca495 100644 --- a/awx/ui_next/src/components/Lookup/OrganizationLookup.jsx +++ b/awx/ui_next/src/components/Lookup/OrganizationLookup.jsx @@ -3,11 +3,11 @@ import { node, func, bool } from 'prop-types'; import { withRouter } from 'react-router-dom'; import { withI18n } from '@lingui/react'; import { t } from '@lingui/macro'; -import { OrganizationsAPI } from '@api'; -import { Organization } from '@types'; import { FormGroup } from '@patternfly/react-core'; -import { getQSConfig, parseQueryString } from '@util/qs'; -import OptionsList from '@components/OptionsList'; +import { OrganizationsAPI } from '../../api'; +import { Organization } from '../../types'; +import { getQSConfig, parseQueryString } from '../../util/qs'; +import OptionsList from '../OptionsList'; import Lookup from './Lookup'; import LookupErrorMessage from './shared/LookupErrorMessage'; diff --git a/awx/ui_next/src/components/Lookup/OrganizationLookup.test.jsx b/awx/ui_next/src/components/Lookup/OrganizationLookup.test.jsx index 1470537e29..999f8cdb4f 100644 --- a/awx/ui_next/src/components/Lookup/OrganizationLookup.test.jsx +++ b/awx/ui_next/src/components/Lookup/OrganizationLookup.test.jsx @@ -1,10 +1,10 @@ import React from 'react'; import { act } from 'react-dom/test-utils'; -import { mountWithContexts } from '@testUtils/enzymeHelpers'; +import { mountWithContexts } from '../../../testUtils/enzymeHelpers'; import OrganizationLookup, { _OrganizationLookup } from './OrganizationLookup'; -import { OrganizationsAPI } from '@api'; +import { OrganizationsAPI } from '../../api'; -jest.mock('@api'); +jest.mock('../../api'); describe('OrganizationLookup', () => { let wrapper; diff --git a/awx/ui_next/src/components/Lookup/ProjectLookup.jsx b/awx/ui_next/src/components/Lookup/ProjectLookup.jsx index 18dda578e2..a45a5b3429 100644 --- a/awx/ui_next/src/components/Lookup/ProjectLookup.jsx +++ b/awx/ui_next/src/components/Lookup/ProjectLookup.jsx @@ -4,11 +4,11 @@ import { withRouter } from 'react-router-dom'; import { withI18n } from '@lingui/react'; import { t } from '@lingui/macro'; import { FormGroup } from '@patternfly/react-core'; -import { ProjectsAPI } from '@api'; -import { Project } from '@types'; -import { FieldTooltip } from '@components/FormField'; -import OptionsList from '@components/OptionsList'; -import { getQSConfig, parseQueryString } from '@util/qs'; +import { ProjectsAPI } from '../../api'; +import { Project } from '../../types'; +import { FieldTooltip } from '../FormField'; +import OptionsList from '../OptionsList'; +import { getQSConfig, parseQueryString } from '../../util/qs'; import Lookup from './Lookup'; import LookupErrorMessage from './shared/LookupErrorMessage'; diff --git a/awx/ui_next/src/components/Lookup/ProjectLookup.test.jsx b/awx/ui_next/src/components/Lookup/ProjectLookup.test.jsx index 743067745e..b7be75a02e 100644 --- a/awx/ui_next/src/components/Lookup/ProjectLookup.test.jsx +++ b/awx/ui_next/src/components/Lookup/ProjectLookup.test.jsx @@ -1,11 +1,11 @@ import React from 'react'; import { act } from 'react-dom/test-utils'; -import { mountWithContexts } from '@testUtils/enzymeHelpers'; -import { sleep } from '@testUtils/testUtils'; -import { ProjectsAPI } from '@api'; +import { mountWithContexts } from '../../../testUtils/enzymeHelpers'; +import { sleep } from '../../../testUtils/testUtils'; +import { ProjectsAPI } from '../../api'; import ProjectLookup from './ProjectLookup'; -jest.mock('@api'); +jest.mock('../../api'); describe('', () => { test('should auto-select project when only one available', async () => { diff --git a/awx/ui_next/src/components/NotificationList/NotificationList.jsx b/awx/ui_next/src/components/NotificationList/NotificationList.jsx index 3d041dc507..0854c16f99 100644 --- a/awx/ui_next/src/components/NotificationList/NotificationList.jsx +++ b/awx/ui_next/src/components/NotificationList/NotificationList.jsx @@ -4,13 +4,13 @@ import { withRouter } from 'react-router-dom'; import { withI18n } from '@lingui/react'; import { t } from '@lingui/macro'; -import AlertModal from '@components/AlertModal'; -import ErrorDetail from '@components/ErrorDetail'; -import NotificationListItem from '@components/NotificationList/NotificationListItem'; -import PaginatedDataList from '@components/PaginatedDataList'; -import { getQSConfig, parseQueryString } from '@util/qs'; +import AlertModal from '../AlertModal'; +import ErrorDetail from '../ErrorDetail'; +import NotificationListItem from './NotificationListItem'; +import PaginatedDataList from '../PaginatedDataList'; +import { getQSConfig, parseQueryString } from '../../util/qs'; -import { NotificationTemplatesAPI } from '@api'; +import { NotificationTemplatesAPI } from '../../api'; const QS_CONFIG = getQSConfig('notification', { page: 1, diff --git a/awx/ui_next/src/components/NotificationList/NotificationList.test.jsx b/awx/ui_next/src/components/NotificationList/NotificationList.test.jsx index b0485542a3..c03f2396ce 100644 --- a/awx/ui_next/src/components/NotificationList/NotificationList.test.jsx +++ b/awx/ui_next/src/components/NotificationList/NotificationList.test.jsx @@ -1,13 +1,13 @@ import React from 'react'; -import { mountWithContexts } from '@testUtils/enzymeHelpers'; -import { sleep } from '@testUtils/testUtils'; +import { mountWithContexts } from '../../../testUtils/enzymeHelpers'; +import { sleep } from '../../../testUtils/testUtils'; -import { NotificationTemplatesAPI } from '@api'; +import { NotificationTemplatesAPI } from '../../api'; import NotificationList from './NotificationList'; -jest.mock('@api'); +jest.mock('../../api'); describe('', () => { const data = { diff --git a/awx/ui_next/src/components/NotificationList/NotificationListItem.jsx b/awx/ui_next/src/components/NotificationList/NotificationListItem.jsx index 8abed19246..d42f536084 100644 --- a/awx/ui_next/src/components/NotificationList/NotificationListItem.jsx +++ b/awx/ui_next/src/components/NotificationList/NotificationListItem.jsx @@ -10,9 +10,8 @@ import { DataListItemRow, Switch, } from '@patternfly/react-core'; -import DataListCell from '@components/DataListCell'; - import styled from 'styled-components'; +import DataListCell from '../DataListCell'; const DataListAction = styled(_DataListAction)` align-items: center; diff --git a/awx/ui_next/src/components/NotificationList/NotificationListItem.test.jsx b/awx/ui_next/src/components/NotificationList/NotificationListItem.test.jsx index 29b9bbd639..d954bb51b2 100644 --- a/awx/ui_next/src/components/NotificationList/NotificationListItem.test.jsx +++ b/awx/ui_next/src/components/NotificationList/NotificationListItem.test.jsx @@ -1,5 +1,5 @@ import React from 'react'; -import { mountWithContexts } from '@testUtils/enzymeHelpers'; +import { mountWithContexts } from '../../../testUtils/enzymeHelpers'; import NotificationListItem from './NotificationListItem'; describe('', () => { diff --git a/awx/ui_next/src/components/OptionsList/OptionsList.jsx b/awx/ui_next/src/components/OptionsList/OptionsList.jsx index e19e85a97c..ea106acbf8 100644 --- a/awx/ui_next/src/components/OptionsList/OptionsList.jsx +++ b/awx/ui_next/src/components/OptionsList/OptionsList.jsx @@ -15,7 +15,7 @@ import SelectedList from '../SelectedList'; import PaginatedDataList from '../PaginatedDataList'; import CheckboxListItem from '../CheckboxListItem'; import DataListToolbar from '../DataListToolbar'; -import { QSConfig, SearchColumns, SortColumns } from '@types'; +import { QSConfig, SearchColumns, SortColumns } from '../../types'; const ModalList = styled.div` .pf-c-data-toolbar__content { diff --git a/awx/ui_next/src/components/OptionsList/OptionsList.test.jsx b/awx/ui_next/src/components/OptionsList/OptionsList.test.jsx index 7d4574020e..34bfed560b 100644 --- a/awx/ui_next/src/components/OptionsList/OptionsList.test.jsx +++ b/awx/ui_next/src/components/OptionsList/OptionsList.test.jsx @@ -1,6 +1,6 @@ import React from 'react'; -import { mountWithContexts } from '@testUtils/enzymeHelpers'; -import { getQSConfig } from '@util/qs'; +import { mountWithContexts } from '../../../testUtils/enzymeHelpers'; +import { getQSConfig } from '../../util/qs'; import OptionsList from './OptionsList'; const qsConfig = getQSConfig('test', { order_by: 'foo' }); diff --git a/awx/ui_next/src/components/PageHeaderToolbar/PageHeaderToolbar.test.jsx b/awx/ui_next/src/components/PageHeaderToolbar/PageHeaderToolbar.test.jsx index 27e772891d..7c151d3dc5 100644 --- a/awx/ui_next/src/components/PageHeaderToolbar/PageHeaderToolbar.test.jsx +++ b/awx/ui_next/src/components/PageHeaderToolbar/PageHeaderToolbar.test.jsx @@ -1,5 +1,5 @@ import React from 'react'; -import { mountWithContexts } from '@testUtils/enzymeHelpers'; +import { mountWithContexts } from '../../../testUtils/enzymeHelpers'; import PageHeaderToolbar from './PageHeaderToolbar'; describe('PageHeaderToolbar', () => { diff --git a/awx/ui_next/src/components/PaginatedDataList/PaginatedDataList.jsx b/awx/ui_next/src/components/PaginatedDataList/PaginatedDataList.jsx index 3d42271c8c..e69775fd6f 100644 --- a/awx/ui_next/src/components/PaginatedDataList/PaginatedDataList.jsx +++ b/awx/ui_next/src/components/PaginatedDataList/PaginatedDataList.jsx @@ -5,20 +5,20 @@ import { withI18n } from '@lingui/react'; import { t } from '@lingui/macro'; import { withRouter } from 'react-router-dom'; -import ListHeader from '@components/ListHeader'; -import ContentEmpty from '@components/ContentEmpty'; -import ContentError from '@components/ContentError'; -import ContentLoading from '@components/ContentLoading'; -import Pagination from '@components/Pagination'; -import DataListToolbar from '@components/DataListToolbar'; +import ListHeader from '../ListHeader'; +import ContentEmpty from '../ContentEmpty'; +import ContentError from '../ContentError'; +import ContentLoading from '../ContentLoading'; +import Pagination from '../Pagination'; +import DataListToolbar from '../DataListToolbar'; import { encodeNonDefaultQueryString, parseQueryString, replaceParams, -} from '@util/qs'; +} from '../../util/qs'; -import { QSConfig, SearchColumns, SortColumns } from '@types'; +import { QSConfig, SearchColumns, SortColumns } from '../../types'; import PaginatedDataListItem from './PaginatedDataListItem'; diff --git a/awx/ui_next/src/components/PaginatedDataList/PaginatedDataList.test.jsx b/awx/ui_next/src/components/PaginatedDataList/PaginatedDataList.test.jsx index a3070ee78a..b3a60aa2da 100644 --- a/awx/ui_next/src/components/PaginatedDataList/PaginatedDataList.test.jsx +++ b/awx/ui_next/src/components/PaginatedDataList/PaginatedDataList.test.jsx @@ -1,6 +1,6 @@ import React from 'react'; import { createMemoryHistory } from 'history'; -import { mountWithContexts } from '@testUtils/enzymeHelpers'; +import { mountWithContexts } from '../../../testUtils/enzymeHelpers'; import PaginatedDataList from './PaginatedDataList'; const mockData = [ diff --git a/awx/ui_next/src/components/PaginatedDataList/PaginatedDataListItem.jsx b/awx/ui_next/src/components/PaginatedDataList/PaginatedDataListItem.jsx index 810d07c0db..6db53493cb 100644 --- a/awx/ui_next/src/components/PaginatedDataList/PaginatedDataListItem.jsx +++ b/awx/ui_next/src/components/PaginatedDataList/PaginatedDataListItem.jsx @@ -6,8 +6,8 @@ import { DataListItemCells, TextContent, } from '@patternfly/react-core'; -import DataListCell from '@components/DataListCell'; import styled from 'styled-components'; +import DataListCell from '../DataListCell'; const DetailWrapper = styled(TextContent)` display: grid; diff --git a/awx/ui_next/src/components/PaginatedDataList/ToolbarAddButton.test.jsx b/awx/ui_next/src/components/PaginatedDataList/ToolbarAddButton.test.jsx index 009baa3452..ad5bde5bd4 100644 --- a/awx/ui_next/src/components/PaginatedDataList/ToolbarAddButton.test.jsx +++ b/awx/ui_next/src/components/PaginatedDataList/ToolbarAddButton.test.jsx @@ -1,5 +1,5 @@ import React from 'react'; -import { mountWithContexts } from '@testUtils/enzymeHelpers'; +import { mountWithContexts } from '../../../testUtils/enzymeHelpers'; import ToolbarAddButton from './ToolbarAddButton'; describe('', () => { diff --git a/awx/ui_next/src/components/PaginatedDataList/ToolbarDeleteButton.test.jsx b/awx/ui_next/src/components/PaginatedDataList/ToolbarDeleteButton.test.jsx index 8383f4294f..843ffa5b4a 100644 --- a/awx/ui_next/src/components/PaginatedDataList/ToolbarDeleteButton.test.jsx +++ b/awx/ui_next/src/components/PaginatedDataList/ToolbarDeleteButton.test.jsx @@ -1,5 +1,5 @@ import React from 'react'; -import { mountWithContexts } from '@testUtils/enzymeHelpers'; +import { mountWithContexts } from '../../../testUtils/enzymeHelpers'; import ToolbarDeleteButton from './ToolbarDeleteButton'; const itemA = { diff --git a/awx/ui_next/src/components/Pagination/Pagination.test.jsx b/awx/ui_next/src/components/Pagination/Pagination.test.jsx index 2657464a75..20e3d3c482 100644 --- a/awx/ui_next/src/components/Pagination/Pagination.test.jsx +++ b/awx/ui_next/src/components/Pagination/Pagination.test.jsx @@ -1,5 +1,5 @@ import React from 'react'; -import { mountWithContexts } from '@testUtils/enzymeHelpers'; +import { mountWithContexts } from '../../../testUtils/enzymeHelpers'; import Pagination from './Pagination'; diff --git a/awx/ui_next/src/components/PromptDetail/PromptDetail.jsx b/awx/ui_next/src/components/PromptDetail/PromptDetail.jsx index 9e32e60ba2..aa6e1c76df 100644 --- a/awx/ui_next/src/components/PromptDetail/PromptDetail.jsx +++ b/awx/ui_next/src/components/PromptDetail/PromptDetail.jsx @@ -4,13 +4,13 @@ import { withI18n } from '@lingui/react'; import { t, Trans } from '@lingui/macro'; import { Link } from 'react-router-dom'; import styled from 'styled-components'; -import { toTitleCase } from '@util/strings'; +import { toTitleCase } from '../../util/strings'; import { Chip, Divider } from '@patternfly/react-core'; -import CredentialChip from '@components/CredentialChip'; -import ChipGroup from '@components/ChipGroup'; -import { DetailList, Detail, UserDateDetail } from '@components/DetailList'; -import { VariablesDetail } from '@components/CodeMirrorInput'; +import CredentialChip from '../../components/CredentialChip'; +import ChipGroup from '../../components/ChipGroup'; +import { DetailList, Detail, UserDateDetail } from '../../components/DetailList'; +import { VariablesDetail } from '../../components/CodeMirrorInput'; import PromptProjectDetail from './PromptProjectDetail'; import PromptInventorySourceDetail from './PromptInventorySourceDetail'; diff --git a/awx/ui_next/src/components/PromptDetail/PromptDetail.test.jsx b/awx/ui_next/src/components/PromptDetail/PromptDetail.test.jsx index ece4fe211d..52388e916a 100644 --- a/awx/ui_next/src/components/PromptDetail/PromptDetail.test.jsx +++ b/awx/ui_next/src/components/PromptDetail/PromptDetail.test.jsx @@ -1,5 +1,5 @@ import React from 'react'; -import { mountWithContexts } from '@testUtils/enzymeHelpers'; +import { mountWithContexts } from '../../../testUtils/enzymeHelpers'; import mockTemplate from './data.job_template.json'; import PromptDetail from './PromptDetail'; diff --git a/awx/ui_next/src/components/PromptDetail/PromptInventorySourceDetail.jsx b/awx/ui_next/src/components/PromptDetail/PromptInventorySourceDetail.jsx index 364646ec14..e4d61bf97c 100644 --- a/awx/ui_next/src/components/PromptDetail/PromptInventorySourceDetail.jsx +++ b/awx/ui_next/src/components/PromptDetail/PromptInventorySourceDetail.jsx @@ -4,10 +4,10 @@ import { t } from '@lingui/macro'; import { Link } from 'react-router-dom'; import { Chip, List, ListItem } from '@patternfly/react-core'; -import { Detail, DeletedDetail } from '@components/DetailList'; -import { VariablesDetail } from '@components/CodeMirrorInput'; -import CredentialChip from '@components/CredentialChip'; -import ChipGroup from '@components/ChipGroup'; +import { Detail, DeletedDetail } from '../../components/DetailList'; +import { VariablesDetail } from '../../components/CodeMirrorInput'; +import CredentialChip from '../../components/CredentialChip'; +import ChipGroup from '../../components/ChipGroup'; function PromptInventorySourceDetail({ i18n, resource }) { const { diff --git a/awx/ui_next/src/components/PromptDetail/PromptInventorySourceDetail.test.jsx b/awx/ui_next/src/components/PromptDetail/PromptInventorySourceDetail.test.jsx index 55558f1177..142ce6cf91 100644 --- a/awx/ui_next/src/components/PromptDetail/PromptInventorySourceDetail.test.jsx +++ b/awx/ui_next/src/components/PromptDetail/PromptInventorySourceDetail.test.jsx @@ -1,5 +1,5 @@ import React from 'react'; -import { mountWithContexts } from '@testUtils/enzymeHelpers'; +import { mountWithContexts } from '../../../testUtils/enzymeHelpers'; import PromptInventorySourceDetail from './PromptInventorySourceDetail'; import mockInvSource from './data.inventory_source.json'; diff --git a/awx/ui_next/src/components/PromptDetail/PromptJobTemplateDetail.jsx b/awx/ui_next/src/components/PromptDetail/PromptJobTemplateDetail.jsx index ffdf6c69ea..ce5ed6cc52 100644 --- a/awx/ui_next/src/components/PromptDetail/PromptJobTemplateDetail.jsx +++ b/awx/ui_next/src/components/PromptDetail/PromptJobTemplateDetail.jsx @@ -4,12 +4,12 @@ import { t } from '@lingui/macro'; import { Link } from 'react-router-dom'; import { Chip, List, ListItem } from '@patternfly/react-core'; -import CredentialChip from '@components/CredentialChip'; -import ChipGroup from '@components/ChipGroup'; -import Sparkline from '@components/Sparkline'; -import { Detail, DeletedDetail } from '@components/DetailList'; -import { VariablesDetail } from '@components/CodeMirrorInput'; -import { toTitleCase } from '@util/strings'; +import CredentialChip from '../../components/CredentialChip'; +import ChipGroup from '../../components/ChipGroup'; +import Sparkline from '../../components/Sparkline'; +import { Detail, DeletedDetail } from '../../components/DetailList'; +import { VariablesDetail } from '../../components/CodeMirrorInput'; +import { toTitleCase } from '../../util/strings'; function PromptJobTemplateDetail({ i18n, resource }) { const { diff --git a/awx/ui_next/src/components/PromptDetail/PromptJobTemplateDetail.test.jsx b/awx/ui_next/src/components/PromptDetail/PromptJobTemplateDetail.test.jsx index 7a536f4b73..cb35baafd5 100644 --- a/awx/ui_next/src/components/PromptDetail/PromptJobTemplateDetail.test.jsx +++ b/awx/ui_next/src/components/PromptDetail/PromptJobTemplateDetail.test.jsx @@ -1,5 +1,5 @@ import React from 'react'; -import { mountWithContexts } from '@testUtils/enzymeHelpers'; +import { mountWithContexts } from '../../../testUtils/enzymeHelpers'; import PromptJobTemplateDetail from './PromptJobTemplateDetail'; import mockData from './data.job_template.json'; diff --git a/awx/ui_next/src/components/PromptDetail/PromptProjectDetail.jsx b/awx/ui_next/src/components/PromptDetail/PromptProjectDetail.jsx index b783631d14..5c04b53d1a 100644 --- a/awx/ui_next/src/components/PromptDetail/PromptProjectDetail.jsx +++ b/awx/ui_next/src/components/PromptDetail/PromptProjectDetail.jsx @@ -1,13 +1,13 @@ import React from 'react'; import { withI18n } from '@lingui/react'; import { t } from '@lingui/macro'; -import { Config } from '@contexts/Config'; import { List, ListItem } from '@patternfly/react-core'; import { Link } from 'react-router-dom'; +import { Config } from '../../contexts/Config'; -import { Detail, DeletedDetail } from '@components/DetailList'; -import CredentialChip from '@components/CredentialChip'; -import { toTitleCase } from '@util/strings'; +import { Detail, DeletedDetail } from '../DetailList'; +import CredentialChip from '../CredentialChip'; +import { toTitleCase } from '../../util/strings'; function PromptProjectDetail({ i18n, resource }) { const { diff --git a/awx/ui_next/src/components/PromptDetail/PromptProjectDetail.test.jsx b/awx/ui_next/src/components/PromptDetail/PromptProjectDetail.test.jsx index 2dbf868754..de3ad6fc6e 100644 --- a/awx/ui_next/src/components/PromptDetail/PromptProjectDetail.test.jsx +++ b/awx/ui_next/src/components/PromptDetail/PromptProjectDetail.test.jsx @@ -1,5 +1,5 @@ import React from 'react'; -import { mountWithContexts } from '@testUtils/enzymeHelpers'; +import { mountWithContexts } from '../../../testUtils/enzymeHelpers'; import PromptProjectDetail from './PromptProjectDetail'; import mockProject from './data.project.json'; diff --git a/awx/ui_next/src/components/PromptDetail/PromptWFJobTemplateDetail.jsx b/awx/ui_next/src/components/PromptDetail/PromptWFJobTemplateDetail.jsx index 0f4cc60716..afa3c552e6 100644 --- a/awx/ui_next/src/components/PromptDetail/PromptWFJobTemplateDetail.jsx +++ b/awx/ui_next/src/components/PromptDetail/PromptWFJobTemplateDetail.jsx @@ -4,12 +4,12 @@ import { t } from '@lingui/macro'; import { Link } from 'react-router-dom'; import { Chip, List, ListItem } from '@patternfly/react-core'; -import CredentialChip from '@components/CredentialChip'; -import ChipGroup from '@components/ChipGroup'; -import { Detail } from '@components/DetailList'; -import { VariablesDetail } from '@components/CodeMirrorInput'; -import Sparkline from '@components/Sparkline'; -import { toTitleCase } from '@util/strings'; +import CredentialChip from '../../components/CredentialChip'; +import ChipGroup from '../../components/ChipGroup'; +import { Detail } from '../../components/DetailList'; +import { VariablesDetail } from '../../components/CodeMirrorInput'; +import Sparkline from '../../components/Sparkline'; +import { toTitleCase } from '../../util/strings'; function PromptWFJobTemplateDetail({ i18n, resource }) { const { diff --git a/awx/ui_next/src/components/PromptDetail/PromptWFJobTemplateDetail.test.jsx b/awx/ui_next/src/components/PromptDetail/PromptWFJobTemplateDetail.test.jsx index 952745fba9..dba9d90801 100644 --- a/awx/ui_next/src/components/PromptDetail/PromptWFJobTemplateDetail.test.jsx +++ b/awx/ui_next/src/components/PromptDetail/PromptWFJobTemplateDetail.test.jsx @@ -1,5 +1,5 @@ import React from 'react'; -import { mountWithContexts } from '@testUtils/enzymeHelpers'; +import { mountWithContexts } from '../../../testUtils/enzymeHelpers'; import PromptWFJobTemplateDetail from './PromptWFJobTemplateDetail'; import mockData from './data.workflow_template.json'; diff --git a/awx/ui_next/src/components/ResourceAccessList/DeleteRoleConfirmationModal.jsx b/awx/ui_next/src/components/ResourceAccessList/DeleteRoleConfirmationModal.jsx index 11b5e4a21f..8ac2f79bc4 100644 --- a/awx/ui_next/src/components/ResourceAccessList/DeleteRoleConfirmationModal.jsx +++ b/awx/ui_next/src/components/ResourceAccessList/DeleteRoleConfirmationModal.jsx @@ -4,8 +4,8 @@ import { Button } from '@patternfly/react-core'; import { withI18n } from '@lingui/react'; import { t } from '@lingui/macro'; -import AlertModal from '@components/AlertModal'; -import { Role } from '@types'; +import AlertModal from '../AlertModal'; +import { Role } from '../../types'; class DeleteRoleConfirmationModal extends React.Component { static propTypes = { diff --git a/awx/ui_next/src/components/ResourceAccessList/DeleteRoleConfirmationModal.test.jsx b/awx/ui_next/src/components/ResourceAccessList/DeleteRoleConfirmationModal.test.jsx index e9c46b979e..5a737fd1b9 100644 --- a/awx/ui_next/src/components/ResourceAccessList/DeleteRoleConfirmationModal.test.jsx +++ b/awx/ui_next/src/components/ResourceAccessList/DeleteRoleConfirmationModal.test.jsx @@ -1,6 +1,6 @@ import React from 'react'; -import { mountWithContexts } from '@testUtils/enzymeHelpers'; +import { mountWithContexts } from '../../../testUtils/enzymeHelpers'; import DeleteRoleConfirmationModal from './DeleteRoleConfirmationModal'; diff --git a/awx/ui_next/src/components/ResourceAccessList/ResourceAccessList.jsx b/awx/ui_next/src/components/ResourceAccessList/ResourceAccessList.jsx index 6ba012bc9b..d16ebf2a5b 100644 --- a/awx/ui_next/src/components/ResourceAccessList/ResourceAccessList.jsx +++ b/awx/ui_next/src/components/ResourceAccessList/ResourceAccessList.jsx @@ -3,14 +3,16 @@ import { withRouter } from 'react-router-dom'; import { withI18n } from '@lingui/react'; import { t } from '@lingui/macro'; -import { TeamsAPI, UsersAPI } from '@api'; -import AddResourceRole from '@components/AddRole/AddResourceRole'; -import AlertModal from '@components/AlertModal'; -import DataListToolbar from '@components/DataListToolbar'; -import PaginatedDataList, { - ToolbarAddButton, -} from '@components/PaginatedDataList'; -import { getQSConfig, encodeQueryString, parseQueryString } from '@util/qs'; +import { TeamsAPI, UsersAPI } from '../../api'; +import AddResourceRole from '../AddRole/AddResourceRole'; +import AlertModal from '../AlertModal'; +import DataListToolbar from '../DataListToolbar'; +import PaginatedDataList, { ToolbarAddButton } from '../PaginatedDataList'; +import { + getQSConfig, + encodeQueryString, + parseQueryString, +} from '../../util/qs'; import DeleteRoleConfirmationModal from './DeleteRoleConfirmationModal'; import ResourceAccessListItem from './ResourceAccessListItem'; diff --git a/awx/ui_next/src/components/ResourceAccessList/ResourceAccessList.test.jsx b/awx/ui_next/src/components/ResourceAccessList/ResourceAccessList.test.jsx index 61dfa38723..be126a7ecc 100644 --- a/awx/ui_next/src/components/ResourceAccessList/ResourceAccessList.test.jsx +++ b/awx/ui_next/src/components/ResourceAccessList/ResourceAccessList.test.jsx @@ -1,13 +1,16 @@ import React from 'react'; -import { sleep } from '@testUtils/testUtils'; -import { mountWithContexts, waitForElement } from '@testUtils/enzymeHelpers'; +import { sleep } from '../../../testUtils/testUtils'; +import { + mountWithContexts, + waitForElement, +} from '../../../testUtils/enzymeHelpers'; -import { OrganizationsAPI, TeamsAPI, UsersAPI } from '@api'; +import { OrganizationsAPI, TeamsAPI, UsersAPI } from '../../api'; import ResourceAccessList from './ResourceAccessList'; -jest.mock('@api'); +jest.mock('../../api'); describe('', () => { const organization = { diff --git a/awx/ui_next/src/components/ResourceAccessList/ResourceAccessListItem.jsx b/awx/ui_next/src/components/ResourceAccessList/ResourceAccessListItem.jsx index 99ed696e0c..689b2c72ce 100644 --- a/awx/ui_next/src/components/ResourceAccessList/ResourceAccessListItem.jsx +++ b/awx/ui_next/src/components/ResourceAccessList/ResourceAccessListItem.jsx @@ -11,13 +11,13 @@ import { TextContent, TextVariants, } from '@patternfly/react-core'; -import DataListCell from '@components/DataListCell'; import { Link } from 'react-router-dom'; import styled from 'styled-components'; +import DataListCell from '../DataListCell'; -import ChipGroup from '@components/ChipGroup'; -import { DetailList, Detail } from '@components/DetailList'; -import { AccessRecord } from '@types'; +import ChipGroup from '../../components/ChipGroup'; +import { DetailList, Detail } from '../../components/DetailList'; +import { AccessRecord } from '../../types'; const DataListItemCells = styled(PFDataListItemCells)` align-items: start; diff --git a/awx/ui_next/src/components/ResourceAccessList/ResourceAccessListItem.test.jsx b/awx/ui_next/src/components/ResourceAccessList/ResourceAccessListItem.test.jsx index 203564d0d0..9de6f49813 100644 --- a/awx/ui_next/src/components/ResourceAccessList/ResourceAccessListItem.test.jsx +++ b/awx/ui_next/src/components/ResourceAccessList/ResourceAccessListItem.test.jsx @@ -1,6 +1,6 @@ import React from 'react'; -import { mountWithContexts } from '@testUtils/enzymeHelpers'; +import { mountWithContexts } from '../../../testUtils/enzymeHelpers'; import ResourceAccessListItem from './ResourceAccessListItem'; diff --git a/awx/ui_next/src/components/Schedule/Schedule.jsx b/awx/ui_next/src/components/Schedule/Schedule.jsx index 9c3c741688..3a3a24def4 100644 --- a/awx/ui_next/src/components/Schedule/Schedule.jsx +++ b/awx/ui_next/src/components/Schedule/Schedule.jsx @@ -12,13 +12,13 @@ import { } from 'react-router-dom'; import { CardActions } from '@patternfly/react-core'; import { CaretLeftIcon } from '@patternfly/react-icons'; -import CardCloseButton from '@components/CardCloseButton'; -import RoutedTabs from '@components/RoutedTabs'; -import ContentError from '@components/ContentError'; -import ContentLoading from '@components/ContentLoading'; -import { TabbedCardHeader } from '@components/Card'; -import { ScheduleDetail, ScheduleEdit } from '@components/Schedule'; -import { SchedulesAPI } from '@api'; +import CardCloseButton from '../CardCloseButton'; +import RoutedTabs from '../RoutedTabs'; +import ContentError from '../ContentError'; +import ContentLoading from '../ContentLoading'; +import { TabbedCardHeader } from '../Card'; +import { ScheduleDetail, ScheduleEdit } from '.'; +import { SchedulesAPI } from '../../api'; function Schedule({ i18n, setBreadcrumb, unifiedJobTemplate }) { const [schedule, setSchedule] = useState(null); diff --git a/awx/ui_next/src/components/Schedule/Schedule.test.jsx b/awx/ui_next/src/components/Schedule/Schedule.test.jsx index 3ed3c5b025..f0f58c0710 100644 --- a/awx/ui_next/src/components/Schedule/Schedule.test.jsx +++ b/awx/ui_next/src/components/Schedule/Schedule.test.jsx @@ -1,12 +1,15 @@ import React from 'react'; -import { SchedulesAPI } from '@api'; import { Route } from 'react-router-dom'; -import { mountWithContexts, waitForElement } from '@testUtils/enzymeHelpers'; import { act } from 'react-dom/test-utils'; import { createMemoryHistory } from 'history'; +import { + mountWithContexts, + waitForElement, +} from '../../../testUtils/enzymeHelpers'; +import { SchedulesAPI } from '../../api'; import Schedule from './Schedule'; -jest.mock('@api/models/Schedules'); +jest.mock('../../api/models/Schedules'); SchedulesAPI.readDetail.mockResolvedValue({ data: { diff --git a/awx/ui_next/src/components/Schedule/ScheduleAdd/ScheduleAdd.jsx b/awx/ui_next/src/components/Schedule/ScheduleAdd/ScheduleAdd.jsx index 8e6d150ea0..7285e760a2 100644 --- a/awx/ui_next/src/components/Schedule/ScheduleAdd/ScheduleAdd.jsx +++ b/awx/ui_next/src/components/Schedule/ScheduleAdd/ScheduleAdd.jsx @@ -4,7 +4,7 @@ import { withI18n } from '@lingui/react'; import { useHistory, useLocation } from 'react-router-dom'; import { RRule } from 'rrule'; import { Card } from '@patternfly/react-core'; -import { CardBody } from '@components/Card'; +import { CardBody } from '../../Card'; import buildRuleObj from '../shared/buildRuleObj'; import ScheduleForm from '../shared/ScheduleForm'; diff --git a/awx/ui_next/src/components/Schedule/ScheduleAdd/ScheduleAdd.test.jsx b/awx/ui_next/src/components/Schedule/ScheduleAdd/ScheduleAdd.test.jsx index 0438a01497..176462f31e 100644 --- a/awx/ui_next/src/components/Schedule/ScheduleAdd/ScheduleAdd.test.jsx +++ b/awx/ui_next/src/components/Schedule/ScheduleAdd/ScheduleAdd.test.jsx @@ -1,11 +1,14 @@ import React from 'react'; import { act } from 'react-dom/test-utils'; -import { mountWithContexts, waitForElement } from '@testUtils/enzymeHelpers'; import { RRule } from 'rrule'; -import { SchedulesAPI } from '@api'; +import { + mountWithContexts, + waitForElement, +} from '../../../../testUtils/enzymeHelpers'; +import { SchedulesAPI } from '../../../api'; import ScheduleAdd from './ScheduleAdd'; -jest.mock('@api/models/Schedules'); +jest.mock('../../../api/models/Schedules'); SchedulesAPI.readZoneInfo.mockResolvedValue({ data: [ diff --git a/awx/ui_next/src/components/Schedule/ScheduleDetail/ScheduleDetail.jsx b/awx/ui_next/src/components/Schedule/ScheduleDetail/ScheduleDetail.jsx index 60394e21f8..8d398a86b4 100644 --- a/awx/ui_next/src/components/Schedule/ScheduleDetail/ScheduleDetail.jsx +++ b/awx/ui_next/src/components/Schedule/ScheduleDetail/ScheduleDetail.jsx @@ -4,21 +4,21 @@ import { RRule, rrulestr } from 'rrule'; import styled from 'styled-components'; import { withI18n } from '@lingui/react'; import { t } from '@lingui/macro'; -import { Schedule } from '@types'; +import { Schedule } from '../../../types'; import { Chip, Title, Button } from '@patternfly/react-core'; -import AlertModal from '@components/AlertModal'; -import { CardBody, CardActionsRow } from '@components/Card'; -import ContentError from '@components/ContentError'; -import ContentLoading from '@components/ContentLoading'; -import CredentialChip from '@components/CredentialChip'; -import { DetailList, Detail, UserDateDetail } from '@components/DetailList'; -import { ScheduleOccurrences, ScheduleToggle } from '@components/Schedule'; -import { formatDateString } from '@util/dates'; -import useRequest from '@util/useRequest'; -import { SchedulesAPI } from '@api'; -import DeleteButton from '@components/DeleteButton'; -import ErrorDetail from '@components/ErrorDetail'; -import ChipGroup from '@components/ChipGroup'; +import AlertModal from '../../../components/AlertModal'; +import { CardBody, CardActionsRow } from '../../../components/Card'; +import ContentError from '../../../components/ContentError'; +import ContentLoading from '../../../components/ContentLoading'; +import CredentialChip from '../../../components/CredentialChip'; +import { DetailList, Detail, UserDateDetail } from '../../../components/DetailList'; +import { ScheduleOccurrences, ScheduleToggle } from '../../../components/Schedule'; +import { formatDateString } from '../../../util/dates'; +import useRequest from '../../../util/useRequest'; +import { SchedulesAPI } from '../../../api'; +import DeleteButton from '../../../components/DeleteButton'; +import ErrorDetail from '../../../components/ErrorDetail'; +import ChipGroup from '../../../components/ChipGroup'; const PromptTitle = styled(Title)` --pf-c-title--m-md--FontWeight: 700; diff --git a/awx/ui_next/src/components/Schedule/ScheduleDetail/ScheduleDetail.test.jsx b/awx/ui_next/src/components/Schedule/ScheduleDetail/ScheduleDetail.test.jsx index e0893f150a..a1739e8c3a 100644 --- a/awx/ui_next/src/components/Schedule/ScheduleDetail/ScheduleDetail.test.jsx +++ b/awx/ui_next/src/components/Schedule/ScheduleDetail/ScheduleDetail.test.jsx @@ -1,12 +1,15 @@ import React from 'react'; -import { SchedulesAPI } from '@api'; import { Route } from 'react-router-dom'; import { createMemoryHistory } from 'history'; import { act } from 'react-dom/test-utils'; -import { mountWithContexts, waitForElement } from '@testUtils/enzymeHelpers'; +import { SchedulesAPI } from '../../../api'; +import { + mountWithContexts, + waitForElement, +} from '../../../../testUtils/enzymeHelpers'; import ScheduleDetail from './ScheduleDetail'; -jest.mock('@api/models/Schedules'); +jest.mock('../../../api/models/Schedules'); const schedule = { url: '/api/v2/schedules/1', diff --git a/awx/ui_next/src/components/Schedule/ScheduleEdit/ScheduleEdit.jsx b/awx/ui_next/src/components/Schedule/ScheduleEdit/ScheduleEdit.jsx index 3e12bd9a58..5887ef9afa 100644 --- a/awx/ui_next/src/components/Schedule/ScheduleEdit/ScheduleEdit.jsx +++ b/awx/ui_next/src/components/Schedule/ScheduleEdit/ScheduleEdit.jsx @@ -4,8 +4,8 @@ import { useHistory, useLocation } from 'react-router-dom'; import { RRule } from 'rrule'; import { shape } from 'prop-types'; import { Card } from '@patternfly/react-core'; -import { CardBody } from '@components/Card'; -import { SchedulesAPI } from '@api'; +import { CardBody } from '../../Card'; +import { SchedulesAPI } from '../../../api'; import buildRuleObj from '../shared/buildRuleObj'; import ScheduleForm from '../shared/ScheduleForm'; diff --git a/awx/ui_next/src/components/Schedule/ScheduleEdit/ScheduleEdit.test.jsx b/awx/ui_next/src/components/Schedule/ScheduleEdit/ScheduleEdit.test.jsx index 21c7b700b6..ed8b2c44e0 100644 --- a/awx/ui_next/src/components/Schedule/ScheduleEdit/ScheduleEdit.test.jsx +++ b/awx/ui_next/src/components/Schedule/ScheduleEdit/ScheduleEdit.test.jsx @@ -1,11 +1,14 @@ import React from 'react'; import { act } from 'react-dom/test-utils'; -import { mountWithContexts, waitForElement } from '@testUtils/enzymeHelpers'; import { RRule } from 'rrule'; -import { SchedulesAPI } from '@api'; +import { + mountWithContexts, + waitForElement, +} from '../../../../testUtils/enzymeHelpers'; +import { SchedulesAPI } from '../../../api'; import ScheduleEdit from './ScheduleEdit'; -jest.mock('@api/models/Schedules'); +jest.mock('../../../api/models/Schedules'); SchedulesAPI.readZoneInfo.mockResolvedValue({ data: [ diff --git a/awx/ui_next/src/components/Schedule/ScheduleList/ScheduleList.jsx b/awx/ui_next/src/components/Schedule/ScheduleList/ScheduleList.jsx index 999f28a6b9..16ce15c4b4 100644 --- a/awx/ui_next/src/components/Schedule/ScheduleList/ScheduleList.jsx +++ b/awx/ui_next/src/components/Schedule/ScheduleList/ScheduleList.jsx @@ -3,16 +3,16 @@ import { useLocation } from 'react-router-dom'; import { bool, func } from 'prop-types'; import { withI18n } from '@lingui/react'; import { t } from '@lingui/macro'; -import { SchedulesAPI } from '@api'; -import AlertModal from '@components/AlertModal'; -import ErrorDetail from '@components/ErrorDetail'; -import DataListToolbar from '@components/DataListToolbar'; +import { SchedulesAPI } from '../../../api'; +import AlertModal from '../../AlertModal'; +import ErrorDetail from '../../ErrorDetail'; +import DataListToolbar from '../../DataListToolbar'; import PaginatedDataList, { ToolbarAddButton, ToolbarDeleteButton, -} from '@components/PaginatedDataList'; -import useRequest, { useDeleteItems } from '@util/useRequest'; -import { getQSConfig, parseQueryString } from '@util/qs'; +} from '../../PaginatedDataList'; +import useRequest, { useDeleteItems } from '../../../util/useRequest'; +import { getQSConfig, parseQueryString } from '../../../util/qs'; import ScheduleListItem from './ScheduleListItem'; const QS_CONFIG = getQSConfig('schedule', { diff --git a/awx/ui_next/src/components/Schedule/ScheduleList/ScheduleList.test.jsx b/awx/ui_next/src/components/Schedule/ScheduleList/ScheduleList.test.jsx index 85ceffb759..55440d4a71 100644 --- a/awx/ui_next/src/components/Schedule/ScheduleList/ScheduleList.test.jsx +++ b/awx/ui_next/src/components/Schedule/ScheduleList/ScheduleList.test.jsx @@ -1,11 +1,11 @@ import React from 'react'; import { act } from 'react-dom/test-utils'; -import { mountWithContexts } from '@testUtils/enzymeHelpers'; -import { SchedulesAPI } from '@api'; +import { mountWithContexts } from '../../../../testUtils/enzymeHelpers'; +import { SchedulesAPI } from '../../../api'; import ScheduleList from './ScheduleList'; import mockSchedules from '../data.schedules.json'; -jest.mock('@api/models/Schedules'); +jest.mock('../../../api/models/Schedules'); SchedulesAPI.destroy = jest.fn(); SchedulesAPI.update.mockResolvedValue({ diff --git a/awx/ui_next/src/components/Schedule/ScheduleList/ScheduleListItem.jsx b/awx/ui_next/src/components/Schedule/ScheduleList/ScheduleListItem.jsx index 9d7f34dc03..03198d9503 100644 --- a/awx/ui_next/src/components/Schedule/ScheduleList/ScheduleListItem.jsx +++ b/awx/ui_next/src/components/Schedule/ScheduleList/ScheduleListItem.jsx @@ -12,13 +12,13 @@ import { DataListItemCells, Tooltip, } from '@patternfly/react-core'; -import DataListCell from '@components/DataListCell'; import { PencilAltIcon } from '@patternfly/react-icons'; -import { DetailList, Detail } from '@components/DetailList'; -import { ScheduleToggle } from '@components/Schedule'; import styled from 'styled-components'; -import { Schedule } from '@types'; -import { formatDateString } from '@util/dates'; +import DataListCell from '../../DataListCell'; +import { DetailList, Detail } from '../../DetailList'; +import { ScheduleToggle } from '..'; +import { Schedule } from '../../../types'; +import { formatDateString } from '../../../util/dates'; const DataListAction = styled(_DataListAction)` align-items: center; diff --git a/awx/ui_next/src/components/Schedule/ScheduleList/ScheduleListItem.test.jsx b/awx/ui_next/src/components/Schedule/ScheduleList/ScheduleListItem.test.jsx index 8e64b651a2..f9f7ae5d32 100644 --- a/awx/ui_next/src/components/Schedule/ScheduleList/ScheduleListItem.test.jsx +++ b/awx/ui_next/src/components/Schedule/ScheduleList/ScheduleListItem.test.jsx @@ -1,5 +1,5 @@ import React from 'react'; -import { mountWithContexts } from '@testUtils/enzymeHelpers'; +import { mountWithContexts } from '../../../../testUtils/enzymeHelpers'; import ScheduleListItem from './ScheduleListItem'; const mockSchedule = { diff --git a/awx/ui_next/src/components/Schedule/ScheduleOccurrences/ScheduleOccurrences.jsx b/awx/ui_next/src/components/Schedule/ScheduleOccurrences/ScheduleOccurrences.jsx index 13e7835eec..e2ba223943 100644 --- a/awx/ui_next/src/components/Schedule/ScheduleOccurrences/ScheduleOccurrences.jsx +++ b/awx/ui_next/src/components/Schedule/ScheduleOccurrences/ScheduleOccurrences.jsx @@ -3,10 +3,10 @@ import { shape } from 'prop-types'; import styled from 'styled-components'; import { withI18n } from '@lingui/react'; import { t } from '@lingui/macro'; -import { formatDateString, formatDateStringUTC } from '@util/dates'; import { Split, SplitItem, TextListItemVariants } from '@patternfly/react-core'; -import { DetailName, DetailValue } from '@components/DetailList'; -import MultiButtonToggle from '@components/MultiButtonToggle'; +import { formatDateString, formatDateStringUTC } from '../../../util/dates'; +import { DetailName, DetailValue } from '../../DetailList'; +import MultiButtonToggle from '../../MultiButtonToggle'; const OccurrencesLabel = styled.div` display: inline-block; diff --git a/awx/ui_next/src/components/Schedule/ScheduleOccurrences/ScheduleOccurrences.test.jsx b/awx/ui_next/src/components/Schedule/ScheduleOccurrences/ScheduleOccurrences.test.jsx index 46cc795995..199cb3d1b0 100644 --- a/awx/ui_next/src/components/Schedule/ScheduleOccurrences/ScheduleOccurrences.test.jsx +++ b/awx/ui_next/src/components/Schedule/ScheduleOccurrences/ScheduleOccurrences.test.jsx @@ -1,5 +1,5 @@ import React from 'react'; -import { mountWithContexts } from '@testUtils/enzymeHelpers'; +import { mountWithContexts } from '../../../../testUtils/enzymeHelpers'; import ScheduleOccurrences from './ScheduleOccurrences'; describe('', () => { diff --git a/awx/ui_next/src/components/Schedule/ScheduleToggle/ScheduleToggle.jsx b/awx/ui_next/src/components/Schedule/ScheduleToggle/ScheduleToggle.jsx index 699bb138ed..af72e12b38 100644 --- a/awx/ui_next/src/components/Schedule/ScheduleToggle/ScheduleToggle.jsx +++ b/awx/ui_next/src/components/Schedule/ScheduleToggle/ScheduleToggle.jsx @@ -2,10 +2,10 @@ import React, { Fragment, useState, useEffect, useCallback } from 'react'; import { withI18n } from '@lingui/react'; import { t } from '@lingui/macro'; import { Switch, Tooltip } from '@patternfly/react-core'; -import AlertModal from '@components/AlertModal'; -import ErrorDetail from '@components/ErrorDetail'; -import useRequest from '@util/useRequest'; -import { SchedulesAPI } from '@api'; +import AlertModal from '../../AlertModal'; +import ErrorDetail from '../../ErrorDetail'; +import useRequest from '../../../util/useRequest'; +import { SchedulesAPI } from '../../../api'; function ScheduleToggle({ schedule, onToggle, className, i18n }) { const [isEnabled, setIsEnabled] = useState(schedule.enabled); diff --git a/awx/ui_next/src/components/Schedule/ScheduleToggle/ScheduleToggle.test.jsx b/awx/ui_next/src/components/Schedule/ScheduleToggle/ScheduleToggle.test.jsx index 61828cfda9..205ba92679 100644 --- a/awx/ui_next/src/components/Schedule/ScheduleToggle/ScheduleToggle.test.jsx +++ b/awx/ui_next/src/components/Schedule/ScheduleToggle/ScheduleToggle.test.jsx @@ -1,10 +1,10 @@ import React from 'react'; import { act } from 'react-dom/test-utils'; -import { SchedulesAPI } from '@api'; -import { mountWithContexts } from '@testUtils/enzymeHelpers'; +import { SchedulesAPI } from '../../../api'; +import { mountWithContexts } from '../../../../testUtils/enzymeHelpers'; import ScheduleToggle from './ScheduleToggle'; -jest.mock('@api'); +jest.mock('../../../api'); const mockSchedule = { url: '/api/v2/schedules/1', diff --git a/awx/ui_next/src/components/Schedule/Schedules.jsx b/awx/ui_next/src/components/Schedule/Schedules.jsx index a615fa89a9..3d818d8740 100644 --- a/awx/ui_next/src/components/Schedule/Schedules.jsx +++ b/awx/ui_next/src/components/Schedule/Schedules.jsx @@ -1,7 +1,7 @@ import React from 'react'; import { withI18n } from '@lingui/react'; import { Switch, Route, useRouteMatch } from 'react-router-dom'; -import { Schedule, ScheduleAdd, ScheduleList } from '@components/Schedule'; +import { Schedule, ScheduleAdd, ScheduleList } from '.'; function Schedules({ createSchedule, diff --git a/awx/ui_next/src/components/Schedule/Schedules.test.jsx b/awx/ui_next/src/components/Schedule/Schedules.test.jsx index 4589403c01..3efd1a7754 100644 --- a/awx/ui_next/src/components/Schedule/Schedules.test.jsx +++ b/awx/ui_next/src/components/Schedule/Schedules.test.jsx @@ -1,7 +1,7 @@ import React from 'react'; -import { mountWithContexts } from '@testUtils/enzymeHelpers'; import { act } from 'react-dom/test-utils'; import { createMemoryHistory } from 'history'; +import { mountWithContexts } from '../../../testUtils/enzymeHelpers'; import Schedules from './Schedules'; describe('', () => { diff --git a/awx/ui_next/src/components/Schedule/shared/FrequencyDetailSubform.jsx b/awx/ui_next/src/components/Schedule/shared/FrequencyDetailSubform.jsx index c062258354..b350b50560 100644 --- a/awx/ui_next/src/components/Schedule/shared/FrequencyDetailSubform.jsx +++ b/awx/ui_next/src/components/Schedule/shared/FrequencyDetailSubform.jsx @@ -10,9 +10,9 @@ import { Radio, TextInput, } from '@patternfly/react-core'; -import AnsibleSelect from '@components/AnsibleSelect'; -import FormField from '@components/FormField'; -import { required } from '@util/validators'; +import AnsibleSelect from '../../AnsibleSelect'; +import FormField from '../../FormField'; +import { required } from '../../../util/validators'; const RunOnRadio = styled(Radio)` label { diff --git a/awx/ui_next/src/components/Schedule/shared/ScheduleForm.jsx b/awx/ui_next/src/components/Schedule/shared/ScheduleForm.jsx index ddb00ccbbf..795af0035a 100644 --- a/awx/ui_next/src/components/Schedule/shared/ScheduleForm.jsx +++ b/awx/ui_next/src/components/Schedule/shared/ScheduleForm.jsx @@ -4,18 +4,18 @@ import { withI18n } from '@lingui/react'; import { t } from '@lingui/macro'; import { Formik, useField } from 'formik'; import { RRule } from 'rrule'; -import { Config } from '@contexts/Config'; import { Form, FormGroup, Title } from '@patternfly/react-core'; -import { SchedulesAPI } from '@api'; -import AnsibleSelect from '@components/AnsibleSelect'; -import ContentError from '@components/ContentError'; -import ContentLoading from '@components/ContentLoading'; -import FormActionGroup from '@components/FormActionGroup/FormActionGroup'; -import FormField, { FormSubmitError } from '@components/FormField'; -import { FormColumnLayout, SubFormLayout } from '@components/FormLayout'; -import { dateToInputDateTime, formatDateStringUTC } from '@util/dates'; -import useRequest from '@util/useRequest'; -import { required } from '@util/validators'; +import { Config } from '../../../contexts/Config'; +import { SchedulesAPI } from '../../../api'; +import AnsibleSelect from '../../AnsibleSelect'; +import ContentError from '../../ContentError'; +import ContentLoading from '../../ContentLoading'; +import FormActionGroup from '../../FormActionGroup/FormActionGroup'; +import FormField, { FormSubmitError } from '../../FormField'; +import { FormColumnLayout, SubFormLayout } from '../../FormLayout'; +import { dateToInputDateTime, formatDateStringUTC } from '../../../util/dates'; +import useRequest from '../../../util/useRequest'; +import { required } from '../../../util/validators'; import FrequencyDetailSubform from './FrequencyDetailSubform'; const generateRunOnTheDay = (days = []) => { diff --git a/awx/ui_next/src/components/Schedule/shared/ScheduleForm.test.jsx b/awx/ui_next/src/components/Schedule/shared/ScheduleForm.test.jsx index 45b802dd0f..771a129b9e 100644 --- a/awx/ui_next/src/components/Schedule/shared/ScheduleForm.test.jsx +++ b/awx/ui_next/src/components/Schedule/shared/ScheduleForm.test.jsx @@ -1,10 +1,10 @@ import React from 'react'; import { act } from 'react-dom/test-utils'; -import { mountWithContexts } from '@testUtils/enzymeHelpers'; -import { SchedulesAPI } from '@api'; +import { mountWithContexts } from '../../../../testUtils/enzymeHelpers'; +import { SchedulesAPI } from '../../../api'; import ScheduleForm from './ScheduleForm'; -jest.mock('@api/models/Schedules'); +jest.mock('../../../api/models/Schedules'); const mockSchedule = { rrule: diff --git a/awx/ui_next/src/components/Schedule/shared/buildRuleObj.js b/awx/ui_next/src/components/Schedule/shared/buildRuleObj.js index 38828b60ab..701fc65080 100644 --- a/awx/ui_next/src/components/Schedule/shared/buildRuleObj.js +++ b/awx/ui_next/src/components/Schedule/shared/buildRuleObj.js @@ -1,6 +1,6 @@ import { t } from '@lingui/macro'; import { RRule } from 'rrule'; -import { getRRuleDayConstants } from '@util/dates'; +import { getRRuleDayConstants } from '../../../util/dates'; export default function buildRuleObj(values, i18n) { const [startDate, startTime] = values.startDateTime.split('T'); diff --git a/awx/ui_next/src/components/Search/Search.jsx b/awx/ui_next/src/components/Search/Search.jsx index d24bd1273c..05cbed85b1 100644 --- a/awx/ui_next/src/components/Search/Search.jsx +++ b/awx/ui_next/src/components/Search/Search.jsx @@ -22,9 +22,9 @@ import { DataToolbarFilter, } from '@patternfly/react-core/dist/umd/experimental'; import { SearchIcon } from '@patternfly/react-icons'; -import { parseQueryString } from '@util/qs'; -import { QSConfig, SearchColumns } from '@types'; import styled from 'styled-components'; +import { parseQueryString } from '../../util/qs'; +import { QSConfig, SearchColumns } from '../../types'; const NoOptionDropdown = styled.div` align-self: stretch; diff --git a/awx/ui_next/src/components/Search/Search.test.jsx b/awx/ui_next/src/components/Search/Search.test.jsx index bf4567320b..503fa9ec58 100644 --- a/awx/ui_next/src/components/Search/Search.test.jsx +++ b/awx/ui_next/src/components/Search/Search.test.jsx @@ -4,8 +4,8 @@ import { DataToolbarContent, } from '@patternfly/react-core/dist/umd/experimental'; import { createMemoryHistory } from 'history'; -import { mountWithContexts } from '@testUtils/enzymeHelpers'; import { act } from 'react-dom/test-utils'; +import { mountWithContexts } from '../../../testUtils/enzymeHelpers'; import Search from './Search'; describe('', () => { diff --git a/awx/ui_next/src/components/SelectedList/SelectedList.jsx b/awx/ui_next/src/components/SelectedList/SelectedList.jsx index 870b7f334d..fd4624ba3c 100644 --- a/awx/ui_next/src/components/SelectedList/SelectedList.jsx +++ b/awx/ui_next/src/components/SelectedList/SelectedList.jsx @@ -2,7 +2,7 @@ import React, { Component } from 'react'; import PropTypes from 'prop-types'; import { Chip, Split as PFSplit, SplitItem } from '@patternfly/react-core'; -import ChipGroup from '@components/ChipGroup'; +import ChipGroup from '../../components/ChipGroup'; import styled from 'styled-components'; const Split = styled(PFSplit)` diff --git a/awx/ui_next/src/components/SelectedList/SelectedList.test.jsx b/awx/ui_next/src/components/SelectedList/SelectedList.test.jsx index e4c886c5cc..2540fe8b76 100644 --- a/awx/ui_next/src/components/SelectedList/SelectedList.test.jsx +++ b/awx/ui_next/src/components/SelectedList/SelectedList.test.jsx @@ -1,6 +1,6 @@ import React from 'react'; -import { mountWithContexts } from '@testUtils/enzymeHelpers'; -import ChipGroup from '@components/ChipGroup'; +import { mountWithContexts } from '../../../testUtils/enzymeHelpers'; +import ChipGroup from '../../components/ChipGroup'; import SelectedList from './SelectedList'; diff --git a/awx/ui_next/src/components/Sort/Sort.jsx b/awx/ui_next/src/components/Sort/Sort.jsx index 79e4eda02f..c90d120055 100644 --- a/awx/ui_next/src/components/Sort/Sort.jsx +++ b/awx/ui_next/src/components/Sort/Sort.jsx @@ -19,9 +19,9 @@ import { SortNumericDownAltIcon, } from '@patternfly/react-icons'; -import { parseQueryString } from '@util/qs'; -import { SortColumns, QSConfig } from '@types'; import styled from 'styled-components'; +import { parseQueryString } from '../../util/qs'; +import { SortColumns, QSConfig } from '../../types'; const NoOptionDropdown = styled.div` align-self: stretch; diff --git a/awx/ui_next/src/components/Sort/Sort.test.jsx b/awx/ui_next/src/components/Sort/Sort.test.jsx index ebd4b3696b..1764cf0298 100644 --- a/awx/ui_next/src/components/Sort/Sort.test.jsx +++ b/awx/ui_next/src/components/Sort/Sort.test.jsx @@ -1,5 +1,5 @@ import React from 'react'; -import { mountWithContexts } from '@testUtils/enzymeHelpers'; +import { mountWithContexts } from '../../../testUtils/enzymeHelpers'; import Sort from './Sort'; describe('', () => { diff --git a/awx/ui_next/src/components/Sparkline/Sparkline.jsx b/awx/ui_next/src/components/Sparkline/Sparkline.jsx index e4faa123df..b76dc0b30c 100644 --- a/awx/ui_next/src/components/Sparkline/Sparkline.jsx +++ b/awx/ui_next/src/components/Sparkline/Sparkline.jsx @@ -2,12 +2,12 @@ import React, { Fragment } from 'react'; import { arrayOf, object } from 'prop-types'; import { withI18n } from '@lingui/react'; import { Link as _Link } from 'react-router-dom'; -import StatusIcon from '@components/StatusIcon'; import { Tooltip } from '@patternfly/react-core'; import styled from 'styled-components'; import { t } from '@lingui/macro'; -import { formatDateString } from '@util/dates'; -import { JOB_TYPE_URL_SEGMENTS } from '@constants'; +import StatusIcon from '../StatusIcon'; +import { formatDateString } from '../../util/dates'; +import { JOB_TYPE_URL_SEGMENTS } from '../../constants'; /* eslint-disable react/jsx-pascal-case */ const Link = styled(props => <_Link {...props} />)` diff --git a/awx/ui_next/src/components/Sparkline/Sparkline.test.jsx b/awx/ui_next/src/components/Sparkline/Sparkline.test.jsx index 62e759226f..0d4d5579e9 100644 --- a/awx/ui_next/src/components/Sparkline/Sparkline.test.jsx +++ b/awx/ui_next/src/components/Sparkline/Sparkline.test.jsx @@ -1,6 +1,6 @@ import React from 'react'; import { mount } from 'enzyme'; -import { mountWithContexts } from '@testUtils/enzymeHelpers'; +import { mountWithContexts } from '../../../testUtils/enzymeHelpers'; import Sparkline from './Sparkline'; diff --git a/awx/ui_next/src/components/Workflow/WorkflowLegend.jsx b/awx/ui_next/src/components/Workflow/WorkflowLegend.jsx index 79951d4bf7..c571d0c9b4 100644 --- a/awx/ui_next/src/components/Workflow/WorkflowLegend.jsx +++ b/awx/ui_next/src/components/Workflow/WorkflowLegend.jsx @@ -1,5 +1,4 @@ import React, { useContext } from 'react'; -import { WorkflowDispatchContext } from '@contexts/Workflow'; import { withI18n } from '@lingui/react'; import { t } from '@lingui/macro'; import styled from 'styled-components'; @@ -8,6 +7,7 @@ import { PauseIcon, TimesIcon, } from '@patternfly/react-icons'; +import { WorkflowDispatchContext } from '../../contexts/Workflow'; const Wrapper = styled.div` background-color: white; diff --git a/awx/ui_next/src/components/Workflow/WorkflowLegend.test.jsx b/awx/ui_next/src/components/Workflow/WorkflowLegend.test.jsx index 19b27bd1c6..86795ec06f 100644 --- a/awx/ui_next/src/components/Workflow/WorkflowLegend.test.jsx +++ b/awx/ui_next/src/components/Workflow/WorkflowLegend.test.jsx @@ -1,5 +1,5 @@ import React from 'react'; -import { mountWithContexts } from '@testUtils/enzymeHelpers'; +import { mountWithContexts } from '../../../testUtils/enzymeHelpers'; import WorkflowLegend from './WorkflowLegend'; describe('WorkflowLegend', () => { diff --git a/awx/ui_next/src/components/Workflow/WorkflowLinkHelp.test.jsx b/awx/ui_next/src/components/Workflow/WorkflowLinkHelp.test.jsx index 8bf8779243..d941c350f9 100644 --- a/awx/ui_next/src/components/Workflow/WorkflowLinkHelp.test.jsx +++ b/awx/ui_next/src/components/Workflow/WorkflowLinkHelp.test.jsx @@ -1,5 +1,5 @@ import React from 'react'; -import { mountWithContexts } from '@testUtils/enzymeHelpers'; +import { mountWithContexts } from '../../../testUtils/enzymeHelpers'; import WorkflowLinkHelp from './WorkflowLinkHelp'; describe('WorkflowLinkHelp', () => { diff --git a/awx/ui_next/src/components/Workflow/WorkflowNodeHelp.jsx b/awx/ui_next/src/components/Workflow/WorkflowNodeHelp.jsx index a888640f6a..9faa331f53 100644 --- a/awx/ui_next/src/components/Workflow/WorkflowNodeHelp.jsx +++ b/awx/ui_next/src/components/Workflow/WorkflowNodeHelp.jsx @@ -4,7 +4,7 @@ import { t, Trans } from '@lingui/macro'; import styled from 'styled-components'; import { ExclamationTriangleIcon } from '@patternfly/react-icons'; import { shape } from 'prop-types'; -import { secondsToHHMMSS } from '@util/dates'; +import { secondsToHHMMSS } from '../../util/dates'; const GridDL = styled.dl` column-gap: 15px; diff --git a/awx/ui_next/src/components/Workflow/WorkflowNodeHelp.test.jsx b/awx/ui_next/src/components/Workflow/WorkflowNodeHelp.test.jsx index 4c0c94858c..183119f5e3 100644 --- a/awx/ui_next/src/components/Workflow/WorkflowNodeHelp.test.jsx +++ b/awx/ui_next/src/components/Workflow/WorkflowNodeHelp.test.jsx @@ -1,5 +1,5 @@ import React from 'react'; -import { mountWithContexts } from '@testUtils/enzymeHelpers'; +import { mountWithContexts } from '../../../testUtils/enzymeHelpers'; import WorkflowNodeHelp from './WorkflowNodeHelp'; describe('WorkflowNodeHelp', () => { diff --git a/awx/ui_next/src/components/Workflow/WorkflowStartNode.jsx b/awx/ui_next/src/components/Workflow/WorkflowStartNode.jsx index a13e628518..e4eb70ea26 100644 --- a/awx/ui_next/src/components/Workflow/WorkflowStartNode.jsx +++ b/awx/ui_next/src/components/Workflow/WorkflowStartNode.jsx @@ -1,18 +1,15 @@ import React, { useContext, useRef, useState } from 'react'; -import { - WorkflowDispatchContext, - WorkflowStateContext, -} from '@contexts/Workflow'; import styled from 'styled-components'; import { withI18n } from '@lingui/react'; import { t } from '@lingui/macro'; import { bool, func } from 'prop-types'; import { PlusIcon } from '@patternfly/react-icons'; -import { constants as wfConstants } from '@components/Workflow/WorkflowUtils'; import { - WorkflowActionTooltip, - WorkflowActionTooltipItem, -} from '@components/Workflow'; + WorkflowDispatchContext, + WorkflowStateContext, +} from '../../contexts/Workflow'; +import { constants as wfConstants } from './WorkflowUtils'; +import { WorkflowActionTooltip, WorkflowActionTooltipItem } from '.'; const StartG = styled.g` pointer-events: ${props => (props.ignorePointerEvents ? 'none' : 'auto')}; diff --git a/awx/ui_next/src/components/Workflow/WorkflowStartNode.test.jsx b/awx/ui_next/src/components/Workflow/WorkflowStartNode.test.jsx index 1079694012..5f5284e176 100644 --- a/awx/ui_next/src/components/Workflow/WorkflowStartNode.test.jsx +++ b/awx/ui_next/src/components/Workflow/WorkflowStartNode.test.jsx @@ -1,6 +1,6 @@ import React from 'react'; import { mount } from 'enzyme'; -import { WorkflowStateContext } from '@contexts/Workflow'; +import { WorkflowStateContext } from '../../contexts/Workflow'; import WorkflowStartNode from './WorkflowStartNode'; const nodePositions = { diff --git a/awx/ui_next/src/components/Workflow/WorkflowTools.jsx b/awx/ui_next/src/components/Workflow/WorkflowTools.jsx index 1ff435f824..cb5c9df50f 100644 --- a/awx/ui_next/src/components/Workflow/WorkflowTools.jsx +++ b/awx/ui_next/src/components/Workflow/WorkflowTools.jsx @@ -1,5 +1,4 @@ import React, { useContext } from 'react'; -import { WorkflowDispatchContext } from '@contexts/Workflow'; import { withI18n } from '@lingui/react'; import { t } from '@lingui/macro'; import styled from 'styled-components'; @@ -16,6 +15,7 @@ import { PlusIcon, TimesIcon, } from '@patternfly/react-icons'; +import { WorkflowDispatchContext } from '../../contexts/Workflow'; const Wrapper = styled.div` background-color: white; diff --git a/awx/ui_next/src/components/Workflow/WorkflowTools.test.jsx b/awx/ui_next/src/components/Workflow/WorkflowTools.test.jsx index 7759495d4b..996956d276 100644 --- a/awx/ui_next/src/components/Workflow/WorkflowTools.test.jsx +++ b/awx/ui_next/src/components/Workflow/WorkflowTools.test.jsx @@ -1,5 +1,5 @@ import React from 'react'; -import { mountWithContexts } from '@testUtils/enzymeHelpers'; +import { mountWithContexts } from '../../../testUtils/enzymeHelpers'; import WorkflowTools from './WorkflowTools'; describe('WorkflowTools', () => { diff --git a/awx/ui_next/src/index.jsx b/awx/ui_next/src/index.jsx index f2abdbc1ff..779b12b772 100644 --- a/awx/ui_next/src/index.jsx +++ b/awx/ui_next/src/index.jsx @@ -6,33 +6,33 @@ import { t } from '@lingui/macro'; import '@patternfly/react-core/dist/styles/base.css'; -import { isAuthenticated } from '@util/auth'; -import Background from '@components/Background'; -import Applications from '@screens/Application'; -import Credentials from '@screens/Credential'; -import CredentialTypes from '@screens/CredentialType'; -import Dashboard from '@screens/Dashboard'; -import Hosts from '@screens/Host'; -import InstanceGroups from '@screens/InstanceGroup'; -import Inventory from '@screens/Inventory'; -import InventoryScripts from '@screens/InventoryScript'; -import { Jobs } from '@screens/Job'; -import Login from '@screens/Login'; -import ManagementJobs from '@screens/ManagementJob'; -import NotificationTemplates from '@screens/NotificationTemplate'; -import Organizations from '@screens/Organization'; -import Portal from '@screens/Portal'; -import Projects from '@screens/Project'; -import Schedules from '@screens/Schedule'; -import AuthSettings from '@screens/AuthSetting'; -import JobsSettings from '@screens/JobsSetting'; -import SystemSettings from '@screens/SystemSetting'; -import UISettings from '@screens/UISetting'; -import License from '@screens/License'; -import Teams from '@screens/Team'; -import Templates from '@screens/Template'; -import Users from '@screens/User'; -import NotFound from '@screens/NotFound'; +import { isAuthenticated } from './util/auth'; +import Background from './components/Background'; +import Applications from './screens/Application'; +import Credentials from './screens/Credential'; +import CredentialTypes from './screens/CredentialType'; +import Dashboard from './screens/Dashboard'; +import Hosts from './screens/Host'; +import InstanceGroups from './screens/InstanceGroup'; +import Inventory from './screens/Inventory'; +import InventoryScripts from './screens/InventoryScript'; +import { Jobs } from './screens/Job'; +import Login from './screens/Login'; +import ManagementJobs from './screens/ManagementJob'; +import NotificationTemplates from './screens/NotificationTemplate'; +import Organizations from './screens/Organization'; +import Portal from './screens/Portal'; +import Projects from './screens/Project'; +import Schedules from './screens/Schedule'; +import AuthSettings from './screens/AuthSetting'; +import JobsSettings from './screens/JobsSetting'; +import SystemSettings from './screens/SystemSetting'; +import UISettings from './screens/UISetting'; +import License from './screens/License'; +import Teams from './screens/Team'; +import Templates from './screens/Template'; +import Users from './screens/User'; +import NotFound from './screens/NotFound'; import App from './App'; import RootProvider from './RootProvider'; diff --git a/awx/ui_next/src/screens/Application/Applications.test.jsx b/awx/ui_next/src/screens/Application/Applications.test.jsx index 6426cffd5b..cb747a920b 100644 --- a/awx/ui_next/src/screens/Application/Applications.test.jsx +++ b/awx/ui_next/src/screens/Application/Applications.test.jsx @@ -1,6 +1,6 @@ import React from 'react'; -import { mountWithContexts } from '@testUtils/enzymeHelpers'; +import { mountWithContexts } from '../../../testUtils/enzymeHelpers'; import Applications from './Applications'; diff --git a/awx/ui_next/src/screens/AuthSetting/AuthSettings.test.jsx b/awx/ui_next/src/screens/AuthSetting/AuthSettings.test.jsx index 2ad6ce1926..0c0ca67b4b 100644 --- a/awx/ui_next/src/screens/AuthSetting/AuthSettings.test.jsx +++ b/awx/ui_next/src/screens/AuthSetting/AuthSettings.test.jsx @@ -1,6 +1,6 @@ import React from 'react'; -import { mountWithContexts } from '@testUtils/enzymeHelpers'; +import { mountWithContexts } from '../../../testUtils/enzymeHelpers'; import AuthSettings from './AuthSettings'; diff --git a/awx/ui_next/src/screens/Credential/Credential.jsx b/awx/ui_next/src/screens/Credential/Credential.jsx index 3e1d831ced..fd318bc07c 100644 --- a/awx/ui_next/src/screens/Credential/Credential.jsx +++ b/awx/ui_next/src/screens/Credential/Credential.jsx @@ -11,14 +11,14 @@ import { Redirect, Link, } from 'react-router-dom'; -import { TabbedCardHeader } from '@components/Card'; -import CardCloseButton from '@components/CardCloseButton'; -import { ResourceAccessList } from '@components/ResourceAccessList'; -import ContentError from '@components/ContentError'; -import RoutedTabs from '@components/RoutedTabs'; +import { TabbedCardHeader } from '../../components/Card'; +import CardCloseButton from '../../components/CardCloseButton'; +import { ResourceAccessList } from '../../components/ResourceAccessList'; +import ContentError from '../../components/ContentError'; +import RoutedTabs from '../../components/RoutedTabs'; import CredentialDetail from './CredentialDetail'; import CredentialEdit from './CredentialEdit'; -import { CredentialsAPI } from '@api'; +import { CredentialsAPI } from '../../api'; function Credential({ i18n, setBreadcrumb }) { const [credential, setCredential] = useState(null); diff --git a/awx/ui_next/src/screens/Credential/Credential.test.jsx b/awx/ui_next/src/screens/Credential/Credential.test.jsx index cb67df0b1b..36d4595bb0 100644 --- a/awx/ui_next/src/screens/Credential/Credential.test.jsx +++ b/awx/ui_next/src/screens/Credential/Credential.test.jsx @@ -1,13 +1,16 @@ import React from 'react'; import { act } from 'react-dom/test-utils'; import { createMemoryHistory } from 'history'; -import { CredentialsAPI } from '@api'; -import { mountWithContexts, waitForElement } from '@testUtils/enzymeHelpers'; +import { CredentialsAPI } from '../../api'; +import { + mountWithContexts, + waitForElement, +} from '../../../testUtils/enzymeHelpers'; import mockCredential from './shared/data.credential.json'; import mockOrgCredential from './shared/data.orgCredential.json'; import Credential from './Credential'; -jest.mock('@api'); +jest.mock('../../api'); jest.mock('react-router-dom', () => ({ ...jest.requireActual('react-router-dom'), useRouteMatch: () => ({ diff --git a/awx/ui_next/src/screens/Credential/CredentialAdd/CredentialAdd.jsx b/awx/ui_next/src/screens/Credential/CredentialAdd/CredentialAdd.jsx index cc0d89313f..092abd1e1c 100644 --- a/awx/ui_next/src/screens/Credential/CredentialAdd/CredentialAdd.jsx +++ b/awx/ui_next/src/screens/Credential/CredentialAdd/CredentialAdd.jsx @@ -1,11 +1,11 @@ import React, { useState, useEffect } from 'react'; import { useHistory } from 'react-router-dom'; import { PageSection, Card } from '@patternfly/react-core'; -import { CardBody } from '@components/Card'; -import ContentError from '@components/ContentError'; -import ContentLoading from '@components/ContentLoading'; +import { CardBody } from '../../../components/Card'; +import ContentError from '../../../components/ContentError'; +import ContentLoading from '../../../components/ContentLoading'; -import { CredentialTypesAPI, CredentialsAPI } from '@api'; +import { CredentialTypesAPI, CredentialsAPI } from '../../../api'; import CredentialForm from '../shared/CredentialForm'; function CredentialAdd({ me }) { diff --git a/awx/ui_next/src/screens/Credential/CredentialAdd/CredentialAdd.test.jsx b/awx/ui_next/src/screens/Credential/CredentialAdd/CredentialAdd.test.jsx index 5b623062fa..c348c6e252 100644 --- a/awx/ui_next/src/screens/Credential/CredentialAdd/CredentialAdd.test.jsx +++ b/awx/ui_next/src/screens/Credential/CredentialAdd/CredentialAdd.test.jsx @@ -1,13 +1,16 @@ import React from 'react'; import { act } from 'react-dom/test-utils'; import { createMemoryHistory } from 'history'; -import { mountWithContexts, waitForElement } from '@testUtils/enzymeHelpers'; -import { sleep } from '@testUtils/testUtils'; +import { + mountWithContexts, + waitForElement, +} from '../../../../testUtils/enzymeHelpers'; +import { sleep } from '../../../../testUtils/testUtils'; -import { CredentialsAPI, CredentialTypesAPI } from '@api'; +import { CredentialsAPI, CredentialTypesAPI } from '../../../api'; import CredentialAdd from './CredentialAdd'; -jest.mock('@api'); +jest.mock('../../../api'); CredentialTypesAPI.read.mockResolvedValue({ data: { diff --git a/awx/ui_next/src/screens/Credential/CredentialDetail/CredentialDetail.jsx b/awx/ui_next/src/screens/Credential/CredentialDetail/CredentialDetail.jsx index 520ca61263..18b01bd0f9 100644 --- a/awx/ui_next/src/screens/Credential/CredentialDetail/CredentialDetail.jsx +++ b/awx/ui_next/src/screens/Credential/CredentialDetail/CredentialDetail.jsx @@ -5,15 +5,19 @@ import { t } from '@lingui/macro'; import { shape } from 'prop-types'; import { Button, List, ListItem } from '@patternfly/react-core'; -import AlertModal from '@components/AlertModal'; -import { CardBody, CardActionsRow } from '@components/Card'; -import ContentError from '@components/ContentError'; -import ContentLoading from '@components/ContentLoading'; -import DeleteButton from '@components/DeleteButton'; -import { DetailList, Detail, UserDateDetail } from '@components/DetailList'; -import ErrorDetail from '@components/ErrorDetail'; -import { CredentialsAPI, CredentialTypesAPI } from '@api'; -import { Credential } from '@types'; +import AlertModal from '../../../components/AlertModal'; +import { CardBody, CardActionsRow } from '../../../components/Card'; +import ContentError from '../../../components/ContentError'; +import ContentLoading from '../../../components/ContentLoading'; +import DeleteButton from '../../../components/DeleteButton'; +import { + DetailList, + Detail, + UserDateDetail, +} from '../../../components/DetailList'; +import ErrorDetail from '../../../components/ErrorDetail'; +import { CredentialsAPI, CredentialTypesAPI } from '../../../api'; +import { Credential } from '../../../types'; function CredentialDetail({ i18n, credential }) { const { diff --git a/awx/ui_next/src/screens/Credential/CredentialDetail/CredentialDetail.test.jsx b/awx/ui_next/src/screens/Credential/CredentialDetail/CredentialDetail.test.jsx index 1411eb70fa..cfb00e331e 100644 --- a/awx/ui_next/src/screens/Credential/CredentialDetail/CredentialDetail.test.jsx +++ b/awx/ui_next/src/screens/Credential/CredentialDetail/CredentialDetail.test.jsx @@ -1,11 +1,14 @@ import React from 'react'; import { act } from 'react-dom/test-utils'; -import { CredentialsAPI, CredentialTypesAPI } from '@api'; -import { mountWithContexts, waitForElement } from '@testUtils/enzymeHelpers'; +import { CredentialsAPI, CredentialTypesAPI } from '../../../api'; +import { + mountWithContexts, + waitForElement, +} from '../../../../testUtils/enzymeHelpers'; import CredentialDetail from './CredentialDetail'; import { mockCredentials, mockCredentialType } from '../shared'; -jest.mock('@api'); +jest.mock('../../../api'); const mockCredential = mockCredentials.results[0]; diff --git a/awx/ui_next/src/screens/Credential/CredentialEdit/CredentialEdit.jsx b/awx/ui_next/src/screens/Credential/CredentialEdit/CredentialEdit.jsx index 175fd981e1..636431d3fd 100644 --- a/awx/ui_next/src/screens/Credential/CredentialEdit/CredentialEdit.jsx +++ b/awx/ui_next/src/screens/Credential/CredentialEdit/CredentialEdit.jsx @@ -2,10 +2,10 @@ import React, { useState, useEffect } from 'react'; import { useHistory } from 'react-router-dom'; import { object } from 'prop-types'; -import { CardBody } from '@components/Card'; -import { CredentialsAPI, CredentialTypesAPI } from '@api'; -import ContentError from '@components/ContentError'; -import ContentLoading from '@components/ContentLoading'; +import { CardBody } from '../../../components/Card'; +import { CredentialsAPI, CredentialTypesAPI } from '../../../api'; +import ContentError from '../../../components/ContentError'; +import ContentLoading from '../../../components/ContentLoading'; import CredentialForm from '../shared/CredentialForm'; function CredentialEdit({ credential, me }) { diff --git a/awx/ui_next/src/screens/Credential/CredentialEdit/CredentialEdit.test.jsx b/awx/ui_next/src/screens/Credential/CredentialEdit/CredentialEdit.test.jsx index e85e2e69ef..4b0ab68187 100644 --- a/awx/ui_next/src/screens/Credential/CredentialEdit/CredentialEdit.test.jsx +++ b/awx/ui_next/src/screens/Credential/CredentialEdit/CredentialEdit.test.jsx @@ -1,13 +1,16 @@ import React from 'react'; import { act } from 'react-dom/test-utils'; import { createMemoryHistory } from 'history'; -import { mountWithContexts, waitForElement } from '@testUtils/enzymeHelpers'; -import { sleep } from '@testUtils/testUtils'; +import { + mountWithContexts, + waitForElement, +} from '../../../../testUtils/enzymeHelpers'; +import { sleep } from '../../../../testUtils/testUtils'; -import { CredentialsAPI, CredentialTypesAPI } from '@api'; +import { CredentialsAPI, CredentialTypesAPI } from '../../../api'; import CredentialEdit from './CredentialEdit'; -jest.mock('@api'); +jest.mock('../../../api'); const mockCredential = { id: 3, diff --git a/awx/ui_next/src/screens/Credential/CredentialList/CredentialList.jsx b/awx/ui_next/src/screens/Credential/CredentialList/CredentialList.jsx index 56fda42cf2..063b5efd04 100644 --- a/awx/ui_next/src/screens/Credential/CredentialList/CredentialList.jsx +++ b/awx/ui_next/src/screens/Credential/CredentialList/CredentialList.jsx @@ -2,17 +2,17 @@ import React, { useState, useEffect, useCallback } from 'react'; import { useLocation } from 'react-router-dom'; import { withI18n } from '@lingui/react'; import { t } from '@lingui/macro'; -import { CredentialsAPI } from '@api'; import { Card, PageSection } from '@patternfly/react-core'; -import AlertModal from '@components/AlertModal'; -import ErrorDetail from '@components/ErrorDetail'; -import DataListToolbar from '@components/DataListToolbar'; +import { CredentialsAPI } from '../../../api'; +import AlertModal from '../../../components/AlertModal'; +import ErrorDetail from '../../../components/ErrorDetail'; +import DataListToolbar from '../../../components/DataListToolbar'; import PaginatedDataList, { ToolbarAddButton, ToolbarDeleteButton, -} from '@components/PaginatedDataList'; -import useRequest, { useDeleteItems } from '@util/useRequest'; -import { getQSConfig, parseQueryString } from '@util/qs'; +} from '../../../components/PaginatedDataList'; +import useRequest, { useDeleteItems } from '../../../util/useRequest'; +import { getQSConfig, parseQueryString } from '../../../util/qs'; import { CredentialListItem } from '.'; const QS_CONFIG = getQSConfig('credential', { diff --git a/awx/ui_next/src/screens/Credential/CredentialList/CredentialList.test.jsx b/awx/ui_next/src/screens/Credential/CredentialList/CredentialList.test.jsx index abb14da988..88c52ff228 100644 --- a/awx/ui_next/src/screens/Credential/CredentialList/CredentialList.test.jsx +++ b/awx/ui_next/src/screens/Credential/CredentialList/CredentialList.test.jsx @@ -1,11 +1,14 @@ import React from 'react'; import { act } from 'react-dom/test-utils'; -import { CredentialsAPI } from '@api'; -import { mountWithContexts, waitForElement } from '@testUtils/enzymeHelpers'; +import { CredentialsAPI } from '../../../api'; +import { + mountWithContexts, + waitForElement, +} from '../../../../testUtils/enzymeHelpers'; import { CredentialList } from '.'; import { mockCredentials } from '../shared'; -jest.mock('@api'); +jest.mock('../../../api'); describe('', () => { let wrapper; diff --git a/awx/ui_next/src/screens/Credential/CredentialList/CredentialListItem.jsx b/awx/ui_next/src/screens/Credential/CredentialList/CredentialListItem.jsx index dd96480f00..69f01d49d8 100644 --- a/awx/ui_next/src/screens/Credential/CredentialList/CredentialListItem.jsx +++ b/awx/ui_next/src/screens/Credential/CredentialList/CredentialListItem.jsx @@ -12,14 +12,14 @@ import { DataListItemCells, Tooltip, } from '@patternfly/react-core'; -import DataListCell from '@components/DataListCell'; -import { timeOfDay } from '@util/dates'; - import { PencilAltIcon } from '@patternfly/react-icons'; -import { Credential } from '@types'; -import { CredentialsAPI } from '@api'; import styled from 'styled-components'; -import CopyButton from '@components/CopyButton'; +import DataListCell from '../../../components/DataListCell'; +import { timeOfDay } from '../../../util/dates'; + +import { Credential } from '../../../types'; +import { CredentialsAPI } from '../../../api'; +import CopyButton from '../../../components/CopyButton'; const DataListAction = styled(_DataListAction)` align-items: center; diff --git a/awx/ui_next/src/screens/Credential/CredentialList/CredentialListItem.test.jsx b/awx/ui_next/src/screens/Credential/CredentialList/CredentialListItem.test.jsx index 66e85007c0..fcfc085d2d 100644 --- a/awx/ui_next/src/screens/Credential/CredentialList/CredentialListItem.test.jsx +++ b/awx/ui_next/src/screens/Credential/CredentialList/CredentialListItem.test.jsx @@ -1,11 +1,11 @@ import React from 'react'; -import { mountWithContexts } from '@testUtils/enzymeHelpers'; -import { CredentialListItem } from '.'; import { act } from 'react-dom/test-utils'; +import { mountWithContexts } from '../../../../testUtils/enzymeHelpers'; +import { CredentialListItem } from '.'; import { mockCredentials } from '../shared'; -import { CredentialsAPI } from '@api'; +import { CredentialsAPI } from '../../../api'; -jest.mock('@api'); +jest.mock('../../../api'); describe('', () => { let wrapper; diff --git a/awx/ui_next/src/screens/Credential/Credentials.jsx b/awx/ui_next/src/screens/Credential/Credentials.jsx index ce82540615..beca652fd5 100644 --- a/awx/ui_next/src/screens/Credential/Credentials.jsx +++ b/awx/ui_next/src/screens/Credential/Credentials.jsx @@ -2,8 +2,8 @@ import React, { useState, useCallback } from 'react'; import { Route, Switch } from 'react-router-dom'; import { withI18n } from '@lingui/react'; import { t } from '@lingui/macro'; -import { Config } from '@contexts/Config'; -import Breadcrumbs from '@components/Breadcrumbs'; +import { Config } from '../../contexts/Config'; +import Breadcrumbs from '../../components/Breadcrumbs'; import Credential from './Credential'; import CredentialAdd from './CredentialAdd'; import { CredentialList } from './CredentialList'; diff --git a/awx/ui_next/src/screens/Credential/Credentials.test.jsx b/awx/ui_next/src/screens/Credential/Credentials.test.jsx index b87815c9d8..f63c9d9b65 100644 --- a/awx/ui_next/src/screens/Credential/Credentials.test.jsx +++ b/awx/ui_next/src/screens/Credential/Credentials.test.jsx @@ -1,6 +1,6 @@ import React from 'react'; -import { mountWithContexts } from '@testUtils/enzymeHelpers'; import { createMemoryHistory } from 'history'; +import { mountWithContexts } from '../../../testUtils/enzymeHelpers'; import Credentials from './Credentials'; describe('', () => { diff --git a/awx/ui_next/src/screens/Credential/shared/CredentialForm.jsx b/awx/ui_next/src/screens/Credential/shared/CredentialForm.jsx index 280630c815..ef8dc686b5 100644 --- a/awx/ui_next/src/screens/Credential/shared/CredentialForm.jsx +++ b/awx/ui_next/src/screens/Credential/shared/CredentialForm.jsx @@ -4,12 +4,15 @@ import { withI18n } from '@lingui/react'; import { t } from '@lingui/macro'; import { func, shape } from 'prop-types'; import { Form, FormGroup, Title } from '@patternfly/react-core'; -import FormField, { FormSubmitError } from '@components/FormField'; -import FormActionGroup from '@components/FormActionGroup/FormActionGroup'; -import AnsibleSelect from '@components/AnsibleSelect'; -import { required } from '@util/validators'; -import OrganizationLookup from '@components/Lookup/OrganizationLookup'; -import { FormColumnLayout, SubFormLayout } from '@components/FormLayout'; +import FormField, { FormSubmitError } from '../../../components/FormField'; +import FormActionGroup from '../../../components/FormActionGroup/FormActionGroup'; +import AnsibleSelect from '../../../components/AnsibleSelect'; +import { required } from '../../../util/validators'; +import OrganizationLookup from '../../../components/Lookup/OrganizationLookup'; +import { + FormColumnLayout, + SubFormLayout, +} from '../../../components/FormLayout'; import { ManualSubForm, SourceControlSubForm } from './CredentialSubForms'; function CredentialFormFields({ diff --git a/awx/ui_next/src/screens/Credential/shared/CredentialForm.test.jsx b/awx/ui_next/src/screens/Credential/shared/CredentialForm.test.jsx index 11753919e0..de441f954a 100644 --- a/awx/ui_next/src/screens/Credential/shared/CredentialForm.test.jsx +++ b/awx/ui_next/src/screens/Credential/shared/CredentialForm.test.jsx @@ -1,6 +1,6 @@ import React from 'react'; import { act } from 'react-dom/test-utils'; -import { mountWithContexts } from '@testUtils/enzymeHelpers'; +import { mountWithContexts } from '../../../../testUtils/enzymeHelpers'; import CredentialForm from './CredentialForm'; diff --git a/awx/ui_next/src/screens/Credential/shared/CredentialSubForms/ManualSubForm.jsx b/awx/ui_next/src/screens/Credential/shared/CredentialSubForms/ManualSubForm.jsx index 29f37547af..49517353f4 100644 --- a/awx/ui_next/src/screens/Credential/shared/CredentialSubForms/ManualSubForm.jsx +++ b/awx/ui_next/src/screens/Credential/shared/CredentialSubForms/ManualSubForm.jsx @@ -2,10 +2,13 @@ import React from 'react'; import { useField } from 'formik'; import { withI18n } from '@lingui/react'; import { t } from '@lingui/macro'; -import FormField, { PasswordField } from '@components/FormField'; import { FormGroup } from '@patternfly/react-core'; -import AnsibleSelect from '@components/AnsibleSelect'; -import { FormColumnLayout, FormFullWidthLayout } from '@components/FormLayout'; +import FormField, { PasswordField } from '../../../../components/FormField'; +import AnsibleSelect from '../../../../components/AnsibleSelect'; +import { + FormColumnLayout, + FormFullWidthLayout, +} from '../../../../components/FormLayout'; import { UsernameFormField, PasswordFormField, diff --git a/awx/ui_next/src/screens/Credential/shared/CredentialSubForms/SharedFields.jsx b/awx/ui_next/src/screens/Credential/shared/CredentialSubForms/SharedFields.jsx index d6fcc37231..0073d30a1f 100644 --- a/awx/ui_next/src/screens/Credential/shared/CredentialSubForms/SharedFields.jsx +++ b/awx/ui_next/src/screens/Credential/shared/CredentialSubForms/SharedFields.jsx @@ -1,7 +1,7 @@ import React from 'react'; import { withI18n } from '@lingui/react'; import { t } from '@lingui/macro'; -import FormField, { PasswordField } from '@components/FormField'; +import FormField, { PasswordField } from '../../../../components/FormField'; export const UsernameFormField = withI18n()(({ i18n }) => ( ({ ...jest.requireActual('react-router-dom'), useRouteMatch: () => ({ diff --git a/awx/ui_next/src/screens/Host/HostAdd/HostAdd.jsx b/awx/ui_next/src/screens/Host/HostAdd/HostAdd.jsx index e6de69f823..17055bcced 100644 --- a/awx/ui_next/src/screens/Host/HostAdd/HostAdd.jsx +++ b/awx/ui_next/src/screens/Host/HostAdd/HostAdd.jsx @@ -1,9 +1,9 @@ import React, { useState } from 'react'; import { useHistory } from 'react-router-dom'; -import { CardBody } from '@components/Card'; -import HostForm from '@components/HostForm'; -import { HostsAPI } from '@api'; import { PageSection, Card } from '@patternfly/react-core'; +import { CardBody } from '../../../components/Card'; +import HostForm from '../../../components/HostForm'; +import { HostsAPI } from '../../../api'; function HostAdd() { const [formError, setFormError] = useState(null); diff --git a/awx/ui_next/src/screens/Host/HostAdd/HostAdd.test.jsx b/awx/ui_next/src/screens/Host/HostAdd/HostAdd.test.jsx index f6a9362344..5c1b98a32e 100644 --- a/awx/ui_next/src/screens/Host/HostAdd/HostAdd.test.jsx +++ b/awx/ui_next/src/screens/Host/HostAdd/HostAdd.test.jsx @@ -1,11 +1,11 @@ import React from 'react'; import { act } from 'react-dom/test-utils'; import { createMemoryHistory } from 'history'; -import { mountWithContexts } from '@testUtils/enzymeHelpers'; +import { mountWithContexts } from '../../../../testUtils/enzymeHelpers'; import HostAdd from './HostAdd'; -import { HostsAPI } from '@api'; +import { HostsAPI } from '../../../api'; -jest.mock('@api'); +jest.mock('../../../api'); const hostData = { name: 'new name', diff --git a/awx/ui_next/src/screens/Host/HostDetail/HostDetail.jsx b/awx/ui_next/src/screens/Host/HostDetail/HostDetail.jsx index 41a2dec2a8..594799e553 100644 --- a/awx/ui_next/src/screens/Host/HostDetail/HostDetail.jsx +++ b/awx/ui_next/src/screens/Host/HostDetail/HostDetail.jsx @@ -2,17 +2,21 @@ import React, { useState } from 'react'; import { Link, useHistory } from 'react-router-dom'; import { withI18n } from '@lingui/react'; import { t } from '@lingui/macro'; -import { Host } from '@types'; import { Button } from '@patternfly/react-core'; -import { CardBody, CardActionsRow } from '@components/Card'; -import AlertModal from '@components/AlertModal'; -import ErrorDetail from '@components/ErrorDetail'; -import { DetailList, Detail, UserDateDetail } from '@components/DetailList'; -import { VariablesDetail } from '@components/CodeMirrorInput'; -import Sparkline from '@components/Sparkline'; -import DeleteButton from '@components/DeleteButton'; -import { HostsAPI } from '@api'; -import HostToggle from '@components/HostToggle'; +import { Host } from '../../../types'; +import { CardBody, CardActionsRow } from '../../../components/Card'; +import AlertModal from '../../../components/AlertModal'; +import ErrorDetail from '../../../components/ErrorDetail'; +import { + DetailList, + Detail, + UserDateDetail, +} from '../../../components/DetailList'; +import { VariablesDetail } from '../../../components/CodeMirrorInput'; +import Sparkline from '../../../components/Sparkline'; +import DeleteButton from '../../../components/DeleteButton'; +import { HostsAPI } from '../../../api'; +import HostToggle from '../../../components/HostToggle'; function HostDetail({ i18n, host }) { const { diff --git a/awx/ui_next/src/screens/Host/HostDetail/HostDetail.test.jsx b/awx/ui_next/src/screens/Host/HostDetail/HostDetail.test.jsx index d809bf1732..340207ab9c 100644 --- a/awx/ui_next/src/screens/Host/HostDetail/HostDetail.test.jsx +++ b/awx/ui_next/src/screens/Host/HostDetail/HostDetail.test.jsx @@ -1,12 +1,15 @@ import React from 'react'; import { act } from 'react-dom/test-utils'; -import { mountWithContexts, waitForElement } from '@testUtils/enzymeHelpers'; +import { + mountWithContexts, + waitForElement, +} from '../../../../testUtils/enzymeHelpers'; import HostDetail from './HostDetail'; -import { HostsAPI } from '@api'; +import { HostsAPI } from '../../../api'; import mockHost from '../data.host.json'; -jest.mock('@api'); +jest.mock('../../../api'); describe('', () => { let wrapper; diff --git a/awx/ui_next/src/screens/Host/HostEdit/HostEdit.jsx b/awx/ui_next/src/screens/Host/HostEdit/HostEdit.jsx index bddb692b14..7d7ca290df 100644 --- a/awx/ui_next/src/screens/Host/HostEdit/HostEdit.jsx +++ b/awx/ui_next/src/screens/Host/HostEdit/HostEdit.jsx @@ -1,9 +1,9 @@ import React, { useState } from 'react'; import PropTypes from 'prop-types'; import { useHistory } from 'react-router-dom'; -import { CardBody } from '@components/Card'; -import HostForm from '@components/HostForm'; -import { HostsAPI } from '@api'; +import { CardBody } from '../../../components/Card'; +import HostForm from '../../../components/HostForm'; +import { HostsAPI } from '../../../api'; function HostEdit({ host }) { const [formError, setFormError] = useState(null); diff --git a/awx/ui_next/src/screens/Host/HostEdit/HostEdit.test.jsx b/awx/ui_next/src/screens/Host/HostEdit/HostEdit.test.jsx index 038ee90bbf..f9cb0a90af 100644 --- a/awx/ui_next/src/screens/Host/HostEdit/HostEdit.test.jsx +++ b/awx/ui_next/src/screens/Host/HostEdit/HostEdit.test.jsx @@ -1,12 +1,12 @@ import React from 'react'; import { act } from 'react-dom/test-utils'; import { createMemoryHistory } from 'history'; -import { HostsAPI } from '@api'; -import { mountWithContexts } from '@testUtils/enzymeHelpers'; +import { HostsAPI } from '../../../api'; +import { mountWithContexts } from '../../../../testUtils/enzymeHelpers'; import mockHost from '../data.host.json'; import HostEdit from './HostEdit'; -jest.mock('@api'); +jest.mock('../../../api'); describe('', () => { let wrapper; diff --git a/awx/ui_next/src/screens/Host/HostFacts/HostFacts.jsx b/awx/ui_next/src/screens/Host/HostFacts/HostFacts.jsx index ff336a4165..1a107ab28e 100644 --- a/awx/ui_next/src/screens/Host/HostFacts/HostFacts.jsx +++ b/awx/ui_next/src/screens/Host/HostFacts/HostFacts.jsx @@ -1,14 +1,14 @@ import React, { useCallback, useEffect } from 'react'; import { withI18n } from '@lingui/react'; import { t } from '@lingui/macro'; -import { Host } from '@types'; -import { CardBody } from '@components/Card'; -import { DetailList } from '@components/DetailList'; -import { VariablesDetail } from '@components/CodeMirrorInput'; -import ContentError from '@components/ContentError'; -import ContentLoading from '@components/ContentLoading'; -import useRequest from '@util/useRequest'; -import { HostsAPI } from '@api'; +import { Host } from '../../../types'; +import { CardBody } from '../../../components/Card'; +import { DetailList } from '../../../components/DetailList'; +import { VariablesDetail } from '../../../components/CodeMirrorInput'; +import ContentError from '../../../components/ContentError'; +import ContentLoading from '../../../components/ContentLoading'; +import useRequest from '../../../util/useRequest'; +import { HostsAPI } from '../../../api'; function HostFacts({ i18n, host }) { const { result: facts, isLoading, error, request: fetchFacts } = useRequest( diff --git a/awx/ui_next/src/screens/Host/HostFacts/HostFacts.test.jsx b/awx/ui_next/src/screens/Host/HostFacts/HostFacts.test.jsx index 3288c0cb93..038233c875 100644 --- a/awx/ui_next/src/screens/Host/HostFacts/HostFacts.test.jsx +++ b/awx/ui_next/src/screens/Host/HostFacts/HostFacts.test.jsx @@ -1,12 +1,15 @@ import React from 'react'; import { act } from 'react-dom/test-utils'; -import { mountWithContexts, waitForElement } from '@testUtils/enzymeHelpers'; +import { + mountWithContexts, + waitForElement, +} from '../../../../testUtils/enzymeHelpers'; import HostFacts from './HostFacts'; -import { HostsAPI } from '@api'; +import { HostsAPI } from '../../../api'; import mockHost from '../data.host.json'; import mockHostFacts from '../data.hostFacts.json'; -jest.mock('@api/models/Hosts'); +jest.mock('../../../api/models/Hosts'); jest.mock('react-router-dom', () => ({ ...jest.requireActual('react-router-dom'), useParams: () => ({ diff --git a/awx/ui_next/src/screens/Host/HostGroups/HostGroupItem.jsx b/awx/ui_next/src/screens/Host/HostGroups/HostGroupItem.jsx index 35bb495e82..7df50c323f 100644 --- a/awx/ui_next/src/screens/Host/HostGroups/HostGroupItem.jsx +++ b/awx/ui_next/src/screens/Host/HostGroups/HostGroupItem.jsx @@ -2,7 +2,6 @@ import React from 'react'; import { bool, func, number, oneOfType, string } from 'prop-types'; import { withI18n } from '@lingui/react'; import { t } from '@lingui/macro'; -import { Group } from '@types'; import { Button, @@ -13,10 +12,11 @@ import { DataListItemRow, Tooltip, } from '@patternfly/react-core'; -import DataListCell from '@components/DataListCell'; import { Link } from 'react-router-dom'; import { PencilAltIcon } from '@patternfly/react-icons'; +import DataListCell from '../../../components/DataListCell'; +import { Group } from '../../../types'; function HostGroupItem({ i18n, group, inventoryId, isSelected, onSelect }) { const labelId = `check-action-${group.id}`; diff --git a/awx/ui_next/src/screens/Host/HostGroups/HostGroupItem.test.jsx b/awx/ui_next/src/screens/Host/HostGroups/HostGroupItem.test.jsx index ede2d506f3..65946f4e08 100644 --- a/awx/ui_next/src/screens/Host/HostGroups/HostGroupItem.test.jsx +++ b/awx/ui_next/src/screens/Host/HostGroups/HostGroupItem.test.jsx @@ -1,5 +1,5 @@ import React from 'react'; -import { mountWithContexts } from '@testUtils/enzymeHelpers'; +import { mountWithContexts } from '../../../../testUtils/enzymeHelpers'; import HostGroupItem from './HostGroupItem'; describe('', () => { diff --git a/awx/ui_next/src/screens/Host/HostGroups/HostGroups.test.jsx b/awx/ui_next/src/screens/Host/HostGroups/HostGroups.test.jsx index bc13293622..850a4965da 100644 --- a/awx/ui_next/src/screens/Host/HostGroups/HostGroups.test.jsx +++ b/awx/ui_next/src/screens/Host/HostGroups/HostGroups.test.jsx @@ -1,10 +1,10 @@ import React from 'react'; -import { mountWithContexts } from '@testUtils/enzymeHelpers'; import { act } from 'react-dom/test-utils'; import { createMemoryHistory } from 'history'; +import { mountWithContexts } from '../../../../testUtils/enzymeHelpers'; import HostGroups from './HostGroups'; -jest.mock('@api'); +jest.mock('../../../api'); describe('', () => { test('initially renders successfully', async () => { diff --git a/awx/ui_next/src/screens/Host/HostGroups/HostGroupsList.jsx b/awx/ui_next/src/screens/Host/HostGroups/HostGroupsList.jsx index aa813b24a3..9e8737912d 100644 --- a/awx/ui_next/src/screens/Host/HostGroups/HostGroupsList.jsx +++ b/awx/ui_next/src/screens/Host/HostGroups/HostGroupsList.jsx @@ -2,21 +2,21 @@ import React, { useState, useEffect, useCallback } from 'react'; import { useParams, useLocation } from 'react-router-dom'; import { withI18n } from '@lingui/react'; import { t } from '@lingui/macro'; -import { getQSConfig, parseQueryString, mergeParams } from '@util/qs'; +import { getQSConfig, parseQueryString, mergeParams } from '../../../util/qs'; import useRequest, { useDismissableError, useDeleteItems, -} from '@util/useRequest'; -import useSelected from '@util/useSelected'; -import { HostsAPI, InventoriesAPI } from '@api'; -import AlertModal from '@components/AlertModal'; -import ErrorDetail from '@components/ErrorDetail'; +} from '../../../util/useRequest'; +import useSelected from '../../../util/useSelected'; +import { HostsAPI, InventoriesAPI } from '../../../api'; +import AlertModal from '../../../components/AlertModal'; +import ErrorDetail from '../../../components/ErrorDetail'; import PaginatedDataList, { ToolbarAddButton, -} from '@components/PaginatedDataList'; -import AssociateModal from '@components/AssociateModal'; -import DisassociateButton from '@components/DisassociateButton'; -import DataListToolbar from '@components/DataListToolbar'; +} from '../../../components/PaginatedDataList'; +import AssociateModal from '../../../components/AssociateModal'; +import DisassociateButton from '../../../components/DisassociateButton'; +import DataListToolbar from '../../../components/DataListToolbar'; import HostGroupItem from './HostGroupItem'; const QS_CONFIG = getQSConfig('group', { diff --git a/awx/ui_next/src/screens/Host/HostGroups/HostGroupsList.test.jsx b/awx/ui_next/src/screens/Host/HostGroups/HostGroupsList.test.jsx index 82f3bf61ab..1b2984ed81 100644 --- a/awx/ui_next/src/screens/Host/HostGroups/HostGroupsList.test.jsx +++ b/awx/ui_next/src/screens/Host/HostGroups/HostGroupsList.test.jsx @@ -2,11 +2,14 @@ import React from 'react'; import { act } from 'react-dom/test-utils'; import { Route } from 'react-router-dom'; import { createMemoryHistory } from 'history'; -import { mountWithContexts, waitForElement } from '@testUtils/enzymeHelpers'; -import { HostsAPI, InventoriesAPI } from '@api'; +import { + mountWithContexts, + waitForElement, +} from '../../../../testUtils/enzymeHelpers'; +import { HostsAPI, InventoriesAPI } from '../../../api'; import HostGroupsList from './HostGroupsList'; -jest.mock('@api'); +jest.mock('../../../api'); const host = { summary_fields: { diff --git a/awx/ui_next/src/screens/Host/HostList/HostList.jsx b/awx/ui_next/src/screens/Host/HostList/HostList.jsx index b183d402c5..3e65c49ce5 100644 --- a/awx/ui_next/src/screens/Host/HostList/HostList.jsx +++ b/awx/ui_next/src/screens/Host/HostList/HostList.jsx @@ -4,16 +4,16 @@ import { withI18n } from '@lingui/react'; import { t } from '@lingui/macro'; import { Card, PageSection } from '@patternfly/react-core'; -import { HostsAPI } from '@api'; -import AlertModal from '@components/AlertModal'; -import DataListToolbar from '@components/DataListToolbar'; -import ErrorDetail from '@components/ErrorDetail'; +import { HostsAPI } from '../../../api'; +import AlertModal from '../../../components/AlertModal'; +import DataListToolbar from '../../../components/DataListToolbar'; +import ErrorDetail from '../../../components/ErrorDetail'; import PaginatedDataList, { ToolbarAddButton, ToolbarDeleteButton, -} from '@components/PaginatedDataList'; -import useRequest, { useDeleteItems } from '@util/useRequest'; -import { getQSConfig, parseQueryString } from '@util/qs'; +} from '../../../components/PaginatedDataList'; +import useRequest, { useDeleteItems } from '../../../util/useRequest'; +import { getQSConfig, parseQueryString } from '../../../util/qs'; import HostListItem from './HostListItem'; diff --git a/awx/ui_next/src/screens/Host/HostList/HostList.test.jsx b/awx/ui_next/src/screens/Host/HostList/HostList.test.jsx index 89bc038deb..b65c98b67b 100644 --- a/awx/ui_next/src/screens/Host/HostList/HostList.test.jsx +++ b/awx/ui_next/src/screens/Host/HostList/HostList.test.jsx @@ -1,11 +1,14 @@ import React from 'react'; import { act } from 'react-dom/test-utils'; -import { HostsAPI } from '@api'; -import { mountWithContexts, waitForElement } from '@testUtils/enzymeHelpers'; +import { HostsAPI } from '../../../api'; +import { + mountWithContexts, + waitForElement, +} from '../../../../testUtils/enzymeHelpers'; import HostList from './HostList'; -jest.mock('@api'); +jest.mock('../../../api'); const mockHosts = [ { diff --git a/awx/ui_next/src/screens/Host/HostList/HostListItem.jsx b/awx/ui_next/src/screens/Host/HostList/HostListItem.jsx index fd2c6b0335..5482bb5f19 100644 --- a/awx/ui_next/src/screens/Host/HostList/HostListItem.jsx +++ b/awx/ui_next/src/screens/Host/HostList/HostListItem.jsx @@ -11,15 +11,14 @@ import { DataListItemCells, Tooltip, } from '@patternfly/react-core'; -import DataListCell from '@components/DataListCell'; - import { Link } from 'react-router-dom'; import { PencilAltIcon } from '@patternfly/react-icons'; - -import Sparkline from '@components/Sparkline'; -import { Host } from '@types'; import styled from 'styled-components'; -import HostToggle from '@components/HostToggle'; +import DataListCell from '../../../components/DataListCell'; + +import Sparkline from '../../../components/Sparkline'; +import { Host } from '../../../types'; +import HostToggle from '../../../components/HostToggle'; const DataListAction = styled(_DataListAction)` align-items: center; diff --git a/awx/ui_next/src/screens/Host/HostList/HostListItem.test.jsx b/awx/ui_next/src/screens/Host/HostList/HostListItem.test.jsx index a241f319cb..aee5b91127 100644 --- a/awx/ui_next/src/screens/Host/HostList/HostListItem.test.jsx +++ b/awx/ui_next/src/screens/Host/HostList/HostListItem.test.jsx @@ -1,5 +1,5 @@ import React from 'react'; -import { mountWithContexts } from '@testUtils/enzymeHelpers'; +import { mountWithContexts } from '../../../../testUtils/enzymeHelpers'; import HostsListItem from './HostListItem'; diff --git a/awx/ui_next/src/screens/Host/Hosts.jsx b/awx/ui_next/src/screens/Host/Hosts.jsx index b6ec6cd62d..f66a28aa94 100644 --- a/awx/ui_next/src/screens/Host/Hosts.jsx +++ b/awx/ui_next/src/screens/Host/Hosts.jsx @@ -3,8 +3,8 @@ import { Route, Switch } from 'react-router-dom'; import { withI18n } from '@lingui/react'; import { t } from '@lingui/macro'; -import { Config } from '@contexts/Config'; -import Breadcrumbs from '@components/Breadcrumbs/Breadcrumbs'; +import { Config } from '../../contexts/Config'; +import Breadcrumbs from '../../components/Breadcrumbs/Breadcrumbs'; import HostList from './HostList'; import HostAdd from './HostAdd'; diff --git a/awx/ui_next/src/screens/Host/Hosts.test.jsx b/awx/ui_next/src/screens/Host/Hosts.test.jsx index 7db85fbb84..ba199f842f 100644 --- a/awx/ui_next/src/screens/Host/Hosts.test.jsx +++ b/awx/ui_next/src/screens/Host/Hosts.test.jsx @@ -1,7 +1,7 @@ import React from 'react'; import { createMemoryHistory } from 'history'; -import { mountWithContexts } from '@testUtils/enzymeHelpers'; +import { mountWithContexts } from '../../../testUtils/enzymeHelpers'; import Hosts from './Hosts'; diff --git a/awx/ui_next/src/screens/InstanceGroup/InstanceGroups.test.jsx b/awx/ui_next/src/screens/InstanceGroup/InstanceGroups.test.jsx index 93d095688b..dfc33e37de 100644 --- a/awx/ui_next/src/screens/InstanceGroup/InstanceGroups.test.jsx +++ b/awx/ui_next/src/screens/InstanceGroup/InstanceGroups.test.jsx @@ -1,6 +1,6 @@ import React from 'react'; -import { mountWithContexts } from '@testUtils/enzymeHelpers'; +import { mountWithContexts } from '../../../testUtils/enzymeHelpers'; import InstanceGroups from './InstanceGroups'; diff --git a/awx/ui_next/src/screens/Inventory/Inventories.jsx b/awx/ui_next/src/screens/Inventory/Inventories.jsx index f4e9f8c6f3..d1a46ca8de 100644 --- a/awx/ui_next/src/screens/Inventory/Inventories.jsx +++ b/awx/ui_next/src/screens/Inventory/Inventories.jsx @@ -3,8 +3,8 @@ import { withI18n } from '@lingui/react'; import { t } from '@lingui/macro'; import { Route, withRouter, Switch } from 'react-router-dom'; -import { Config } from '@contexts/Config'; -import Breadcrumbs from '@components/Breadcrumbs/Breadcrumbs'; +import { Config } from '../../contexts/Config'; +import Breadcrumbs from '../../components/Breadcrumbs/Breadcrumbs'; import { InventoryList } from './InventoryList'; import Inventory from './Inventory'; import SmartInventory from './SmartInventory'; diff --git a/awx/ui_next/src/screens/Inventory/Inventories.test.jsx b/awx/ui_next/src/screens/Inventory/Inventories.test.jsx index 9b7579c043..ca452f877a 100644 --- a/awx/ui_next/src/screens/Inventory/Inventories.test.jsx +++ b/awx/ui_next/src/screens/Inventory/Inventories.test.jsx @@ -1,6 +1,6 @@ import React from 'react'; -import { mountWithContexts } from '@testUtils/enzymeHelpers'; +import { mountWithContexts } from '../../../testUtils/enzymeHelpers'; import Inventories from './Inventories'; diff --git a/awx/ui_next/src/screens/Inventory/Inventory.jsx b/awx/ui_next/src/screens/Inventory/Inventory.jsx index b062817ea9..8515029f4e 100644 --- a/awx/ui_next/src/screens/Inventory/Inventory.jsx +++ b/awx/ui_next/src/screens/Inventory/Inventory.jsx @@ -11,19 +11,19 @@ import { } from 'react-router-dom'; import { Card, CardActions, PageSection } from '@patternfly/react-core'; -import { TabbedCardHeader } from '@components/Card'; -import CardCloseButton from '@components/CardCloseButton'; -import ContentError from '@components/ContentError'; -import ContentLoading from '@components/ContentLoading'; -import JobList from '@components/JobList'; -import RoutedTabs from '@components/RoutedTabs'; -import { ResourceAccessList } from '@components/ResourceAccessList'; +import { TabbedCardHeader } from '../../components/Card'; +import CardCloseButton from '../../components/CardCloseButton'; +import ContentError from '../../components/ContentError'; +import ContentLoading from '../../components/ContentLoading'; +import JobList from '../../components/JobList'; +import RoutedTabs from '../../components/RoutedTabs'; +import { ResourceAccessList } from '../../components/ResourceAccessList'; import InventoryDetail from './InventoryDetail'; import InventoryEdit from './InventoryEdit'; import InventoryGroups from './InventoryGroups'; import InventoryHosts from './InventoryHosts/InventoryHosts'; import InventorySources from './InventorySources'; -import { InventoriesAPI } from '@api'; +import { InventoriesAPI } from '../../api'; function Inventory({ i18n, setBreadcrumb }) { const [contentError, setContentError] = useState(null); diff --git a/awx/ui_next/src/screens/Inventory/Inventory.test.jsx b/awx/ui_next/src/screens/Inventory/Inventory.test.jsx index 2ec0aa040e..652ba4cf88 100644 --- a/awx/ui_next/src/screens/Inventory/Inventory.test.jsx +++ b/awx/ui_next/src/screens/Inventory/Inventory.test.jsx @@ -1,12 +1,15 @@ import React from 'react'; import { act } from 'react-dom/test-utils'; import { createMemoryHistory } from 'history'; -import { InventoriesAPI } from '@api'; -import { mountWithContexts, waitForElement } from '@testUtils/enzymeHelpers'; +import { InventoriesAPI } from '../../api'; +import { + mountWithContexts, + waitForElement, +} from '../../../testUtils/enzymeHelpers'; import mockInventory from './shared/data.inventory.json'; import Inventory from './Inventory'; -jest.mock('@api'); +jest.mock('../../api'); jest.mock('react-router-dom', () => ({ ...jest.requireActual('react-router-dom'), useRouteMatch: () => ({ diff --git a/awx/ui_next/src/screens/Inventory/InventoryAdd/InventoryAdd.jsx b/awx/ui_next/src/screens/Inventory/InventoryAdd/InventoryAdd.jsx index a0afa8520b..3f4a5b53db 100644 --- a/awx/ui_next/src/screens/Inventory/InventoryAdd/InventoryAdd.jsx +++ b/awx/ui_next/src/screens/Inventory/InventoryAdd/InventoryAdd.jsx @@ -1,10 +1,10 @@ import React, { useState, useEffect } from 'react'; import { useHistory } from 'react-router-dom'; import { PageSection, Card } from '@patternfly/react-core'; -import { CardBody } from '@components/Card'; -import ContentLoading from '@components/ContentLoading'; +import { CardBody } from '../../../components/Card'; +import ContentLoading from '../../../components/ContentLoading'; -import { InventoriesAPI, CredentialTypesAPI } from '@api'; +import { InventoriesAPI, CredentialTypesAPI } from '../../../api'; import InventoryForm from '../shared/InventoryForm'; function InventoryAdd() { diff --git a/awx/ui_next/src/screens/Inventory/InventoryAdd/InventoryAdd.test.jsx b/awx/ui_next/src/screens/Inventory/InventoryAdd/InventoryAdd.test.jsx index 26b0619a7d..07941c0997 100644 --- a/awx/ui_next/src/screens/Inventory/InventoryAdd/InventoryAdd.test.jsx +++ b/awx/ui_next/src/screens/Inventory/InventoryAdd/InventoryAdd.test.jsx @@ -1,13 +1,16 @@ import React from 'react'; import { act } from 'react-dom/test-utils'; import { createMemoryHistory } from 'history'; -import { mountWithContexts, waitForElement } from '@testUtils/enzymeHelpers'; -import { sleep } from '@testUtils/testUtils'; +import { + mountWithContexts, + waitForElement, +} from '../../../../testUtils/enzymeHelpers'; +import { sleep } from '../../../../testUtils/testUtils'; -import { InventoriesAPI, CredentialTypesAPI } from '@api'; +import { InventoriesAPI, CredentialTypesAPI } from '../../../api'; import InventoryAdd from './InventoryAdd'; -jest.mock('@api'); +jest.mock('../../../api'); CredentialTypesAPI.read.mockResolvedValue({ data: { diff --git a/awx/ui_next/src/screens/Inventory/InventoryDetail/InventoryDetail.jsx b/awx/ui_next/src/screens/Inventory/InventoryDetail/InventoryDetail.jsx index 2bd0b8045c..e82d78fdb2 100644 --- a/awx/ui_next/src/screens/Inventory/InventoryDetail/InventoryDetail.jsx +++ b/awx/ui_next/src/screens/Inventory/InventoryDetail/InventoryDetail.jsx @@ -3,15 +3,15 @@ import { Link, useHistory } from 'react-router-dom'; import { withI18n } from '@lingui/react'; import { t } from '@lingui/macro'; import { Button, Chip } from '@patternfly/react-core'; -import { CardBody, CardActionsRow } from '@components/Card'; -import { DetailList, Detail, UserDateDetail } from '@components/DetailList'; -import { VariablesDetail } from '@components/CodeMirrorInput'; -import DeleteButton from '@components/DeleteButton'; -import ContentError from '@components/ContentError'; -import ContentLoading from '@components/ContentLoading'; -import ChipGroup from '@components/ChipGroup'; -import { InventoriesAPI } from '@api'; -import useRequest from '@util/useRequest'; +import { CardBody, CardActionsRow } from '../../../components/Card'; +import { DetailList, Detail, UserDateDetail } from '../../../components/DetailList'; +import { VariablesDetail } from '../../../components/CodeMirrorInput'; +import DeleteButton from '../../../components/DeleteButton'; +import ContentError from '../../../components/ContentError'; +import ContentLoading from '../../../components/ContentLoading'; +import ChipGroup from '../../../components/ChipGroup'; +import { InventoriesAPI } from '../../../api'; +import useRequest from '../../../util/useRequest'; import { Inventory } from '../../../types'; function InventoryDetail({ inventory, i18n }) { diff --git a/awx/ui_next/src/screens/Inventory/InventoryDetail/InventoryDetail.test.jsx b/awx/ui_next/src/screens/Inventory/InventoryDetail/InventoryDetail.test.jsx index 9fc42e70ce..1ceeca5ba9 100644 --- a/awx/ui_next/src/screens/Inventory/InventoryDetail/InventoryDetail.test.jsx +++ b/awx/ui_next/src/screens/Inventory/InventoryDetail/InventoryDetail.test.jsx @@ -1,10 +1,10 @@ import React from 'react'; import { act } from 'react-dom/test-utils'; -import { mountWithContexts } from '@testUtils/enzymeHelpers'; -import { InventoriesAPI, CredentialTypesAPI } from '@api'; +import { mountWithContexts } from '../../../../testUtils/enzymeHelpers'; +import { InventoriesAPI, CredentialTypesAPI } from '../../../api'; import InventoryDetail from './InventoryDetail'; -jest.mock('@api'); +jest.mock('../../../api'); const mockInventory = { id: 1, diff --git a/awx/ui_next/src/screens/Inventory/InventoryEdit/InventoryEdit.jsx b/awx/ui_next/src/screens/Inventory/InventoryEdit/InventoryEdit.jsx index cbc1b2126d..9e667a5ea6 100644 --- a/awx/ui_next/src/screens/Inventory/InventoryEdit/InventoryEdit.jsx +++ b/awx/ui_next/src/screens/Inventory/InventoryEdit/InventoryEdit.jsx @@ -2,9 +2,9 @@ import React, { useState, useEffect, useRef } from 'react'; import { useHistory } from 'react-router-dom'; import { object } from 'prop-types'; -import { CardBody } from '@components/Card'; -import { InventoriesAPI, CredentialTypesAPI } from '@api'; -import ContentLoading from '@components/ContentLoading'; +import { CardBody } from '../../../components/Card'; +import { InventoriesAPI, CredentialTypesAPI } from '../../../api'; +import ContentLoading from '../../../components/ContentLoading'; import InventoryForm from '../shared/InventoryForm'; import { getAddedAndRemoved } from '../../../util/lists'; diff --git a/awx/ui_next/src/screens/Inventory/InventoryEdit/InventoryEdit.test.jsx b/awx/ui_next/src/screens/Inventory/InventoryEdit/InventoryEdit.test.jsx index 5c312f98cc..67d2a6f249 100644 --- a/awx/ui_next/src/screens/Inventory/InventoryEdit/InventoryEdit.test.jsx +++ b/awx/ui_next/src/screens/Inventory/InventoryEdit/InventoryEdit.test.jsx @@ -1,13 +1,16 @@ import React from 'react'; import { act } from 'react-dom/test-utils'; import { createMemoryHistory } from 'history'; -import { mountWithContexts, waitForElement } from '@testUtils/enzymeHelpers'; -import { sleep } from '@testUtils/testUtils'; +import { + mountWithContexts, + waitForElement, +} from '../../../../testUtils/enzymeHelpers'; +import { sleep } from '../../../../testUtils/testUtils'; -import { InventoriesAPI, CredentialTypesAPI } from '@api'; +import { InventoriesAPI, CredentialTypesAPI } from '../../../api'; import InventoryEdit from './InventoryEdit'; -jest.mock('@api'); +jest.mock('../../../api'); const mockInventory = { id: 1, diff --git a/awx/ui_next/src/screens/Inventory/InventoryGroup/InventoryGroup.jsx b/awx/ui_next/src/screens/Inventory/InventoryGroup/InventoryGroup.jsx index c05e53a675..28ac2daded 100644 --- a/awx/ui_next/src/screens/Inventory/InventoryGroup/InventoryGroup.jsx +++ b/awx/ui_next/src/screens/Inventory/InventoryGroup/InventoryGroup.jsx @@ -12,16 +12,16 @@ import { } from 'react-router-dom'; import { CardActions } from '@patternfly/react-core'; import { CaretLeftIcon } from '@patternfly/react-icons'; -import CardCloseButton from '@components/CardCloseButton'; -import RoutedTabs from '@components/RoutedTabs'; -import ContentError from '@components/ContentError'; -import ContentLoading from '@components/ContentLoading'; -import { TabbedCardHeader } from '@components/Card'; +import CardCloseButton from '../../../components/CardCloseButton'; +import RoutedTabs from '../../../components/RoutedTabs'; +import ContentError from '../../../components/ContentError'; +import ContentLoading from '../../../components/ContentLoading'; +import { TabbedCardHeader } from '../../../components/Card'; import InventoryGroupEdit from '../InventoryGroupEdit/InventoryGroupEdit'; import InventoryGroupDetail from '../InventoryGroupDetail/InventoryGroupDetail'; import InventoryGroupHosts from '../InventoryGroupHosts'; -import { GroupsAPI } from '@api'; +import { GroupsAPI } from '../../../api'; function InventoryGroup({ i18n, setBreadcrumb, inventory }) { const [inventoryGroup, setInventoryGroup] = useState(null); diff --git a/awx/ui_next/src/screens/Inventory/InventoryGroup/InventoryGroup.test.jsx b/awx/ui_next/src/screens/Inventory/InventoryGroup/InventoryGroup.test.jsx index af9182d936..6087abd9ac 100644 --- a/awx/ui_next/src/screens/Inventory/InventoryGroup/InventoryGroup.test.jsx +++ b/awx/ui_next/src/screens/Inventory/InventoryGroup/InventoryGroup.test.jsx @@ -1,13 +1,16 @@ import React from 'react'; -import { GroupsAPI } from '@api'; import { Route } from 'react-router-dom'; -import { mountWithContexts, waitForElement } from '@testUtils/enzymeHelpers'; import { act } from 'react-dom/test-utils'; import { createMemoryHistory } from 'history'; +import { + mountWithContexts, + waitForElement, +} from '../../../../testUtils/enzymeHelpers'; +import { GroupsAPI } from '../../../api'; import InventoryGroup from './InventoryGroup'; -jest.mock('@api'); +jest.mock('../../../api'); jest.mock('react-router-dom', () => ({ ...jest.requireActual('react-router-dom'), useParams: () => ({ diff --git a/awx/ui_next/src/screens/Inventory/InventoryGroupAdd/InventoryGroupAdd.jsx b/awx/ui_next/src/screens/Inventory/InventoryGroupAdd/InventoryGroupAdd.jsx index ede9a5abf2..29bfb016dd 100644 --- a/awx/ui_next/src/screens/Inventory/InventoryGroupAdd/InventoryGroupAdd.jsx +++ b/awx/ui_next/src/screens/Inventory/InventoryGroupAdd/InventoryGroupAdd.jsx @@ -1,8 +1,8 @@ import React, { useState } from 'react'; import { withI18n } from '@lingui/react'; import { useHistory, useParams } from 'react-router-dom'; -import { GroupsAPI } from '@api'; import { Card } from '@patternfly/react-core'; +import { GroupsAPI } from '../../../api'; import InventoryGroupForm from '../shared/InventoryGroupForm'; diff --git a/awx/ui_next/src/screens/Inventory/InventoryGroupAdd/InventoryGroupAdd.test.jsx b/awx/ui_next/src/screens/Inventory/InventoryGroupAdd/InventoryGroupAdd.test.jsx index f5ad16dabf..b3fbcdf16c 100644 --- a/awx/ui_next/src/screens/Inventory/InventoryGroupAdd/InventoryGroupAdd.test.jsx +++ b/awx/ui_next/src/screens/Inventory/InventoryGroupAdd/InventoryGroupAdd.test.jsx @@ -1,14 +1,14 @@ import React from 'react'; import { Route } from 'react-router-dom'; -import { GroupsAPI } from '@api'; import { createMemoryHistory } from 'history'; import { act } from 'react-dom/test-utils'; -import { mountWithContexts } from '@testUtils/enzymeHelpers'; +import { GroupsAPI } from '../../../api'; +import { mountWithContexts } from '../../../../testUtils/enzymeHelpers'; import InventoryGroupAdd from './InventoryGroupAdd'; -jest.mock('@api'); +jest.mock('../../../api'); describe('', () => { let wrapper; diff --git a/awx/ui_next/src/screens/Inventory/InventoryGroupDetail/InventoryGroupDetail.jsx b/awx/ui_next/src/screens/Inventory/InventoryGroupDetail/InventoryGroupDetail.jsx index eaee439dfe..7b5355d201 100644 --- a/awx/ui_next/src/screens/Inventory/InventoryGroupDetail/InventoryGroupDetail.jsx +++ b/awx/ui_next/src/screens/Inventory/InventoryGroupDetail/InventoryGroupDetail.jsx @@ -4,13 +4,17 @@ import { t } from '@lingui/macro'; import { Button } from '@patternfly/react-core'; import { withI18n } from '@lingui/react'; import { useHistory, useParams } from 'react-router-dom'; -import { VariablesDetail } from '@components/CodeMirrorInput'; -import { CardBody, CardActionsRow } from '@components/Card'; -import ErrorDetail from '@components/ErrorDetail'; -import AlertModal from '@components/AlertModal'; -import { DetailList, Detail, UserDateDetail } from '@components/DetailList'; +import { VariablesDetail } from '../../../components/CodeMirrorInput'; +import { CardBody, CardActionsRow } from '../../../components/Card'; +import ErrorDetail from '../../../components/ErrorDetail'; +import AlertModal from '../../../components/AlertModal'; +import { + DetailList, + Detail, + UserDateDetail, +} from '../../../components/DetailList'; import InventoryGroupsDeleteModal from '../shared/InventoryGroupsDeleteModal'; -import { GroupsAPI, InventoriesAPI } from '@api'; +import { GroupsAPI, InventoriesAPI } from '../../../api'; function InventoryGroupDetail({ i18n, inventoryGroup }) { const { diff --git a/awx/ui_next/src/screens/Inventory/InventoryGroupDetail/InventoryGroupDetail.test.jsx b/awx/ui_next/src/screens/Inventory/InventoryGroupDetail/InventoryGroupDetail.test.jsx index 427a30522f..fbe063783f 100644 --- a/awx/ui_next/src/screens/Inventory/InventoryGroupDetail/InventoryGroupDetail.test.jsx +++ b/awx/ui_next/src/screens/Inventory/InventoryGroupDetail/InventoryGroupDetail.test.jsx @@ -1,12 +1,15 @@ import React from 'react'; -import { GroupsAPI } from '@api'; import { Route } from 'react-router-dom'; import { createMemoryHistory } from 'history'; import { act } from 'react-dom/test-utils'; -import { mountWithContexts, waitForElement } from '@testUtils/enzymeHelpers'; +import { GroupsAPI } from '../../../api'; +import { + mountWithContexts, + waitForElement, +} from '../../../../testUtils/enzymeHelpers'; import InventoryGroupDetail from './InventoryGroupDetail'; -jest.mock('@api'); +jest.mock('../../../api'); const inventoryGroup = { name: 'Foo', diff --git a/awx/ui_next/src/screens/Inventory/InventoryGroupEdit/InventoryGroupEdit.jsx b/awx/ui_next/src/screens/Inventory/InventoryGroupEdit/InventoryGroupEdit.jsx index aa1ddde74f..1e88b12795 100644 --- a/awx/ui_next/src/screens/Inventory/InventoryGroupEdit/InventoryGroupEdit.jsx +++ b/awx/ui_next/src/screens/Inventory/InventoryGroupEdit/InventoryGroupEdit.jsx @@ -1,7 +1,7 @@ import React, { useState } from 'react'; import { withI18n } from '@lingui/react'; import { useParams, useHistory } from 'react-router-dom'; -import { GroupsAPI } from '@api'; +import { GroupsAPI } from '../../../api'; import InventoryGroupForm from '../shared/InventoryGroupForm'; diff --git a/awx/ui_next/src/screens/Inventory/InventoryGroupEdit/InventoryGroupEdit.test.jsx b/awx/ui_next/src/screens/Inventory/InventoryGroupEdit/InventoryGroupEdit.test.jsx index 4e0056d095..870a79de02 100644 --- a/awx/ui_next/src/screens/Inventory/InventoryGroupEdit/InventoryGroupEdit.test.jsx +++ b/awx/ui_next/src/screens/Inventory/InventoryGroupEdit/InventoryGroupEdit.test.jsx @@ -1,13 +1,13 @@ import React from 'react'; import { Route } from 'react-router-dom'; -import { GroupsAPI } from '@api'; import { createMemoryHistory } from 'history'; import { act } from 'react-dom/test-utils'; -import { mountWithContexts } from '@testUtils/enzymeHelpers'; +import { GroupsAPI } from '../../../api'; +import { mountWithContexts } from '../../../../testUtils/enzymeHelpers'; import InventoryGroupEdit from './InventoryGroupEdit'; -jest.mock('@api'); +jest.mock('../../../api'); GroupsAPI.readDetail.mockResolvedValue({ data: { name: 'Foo', diff --git a/awx/ui_next/src/screens/Inventory/InventoryGroupHostAdd/InventoryGroupHostAdd.jsx b/awx/ui_next/src/screens/Inventory/InventoryGroupHostAdd/InventoryGroupHostAdd.jsx index e8bfea7cd7..8f3df68a2c 100644 --- a/awx/ui_next/src/screens/Inventory/InventoryGroupHostAdd/InventoryGroupHostAdd.jsx +++ b/awx/ui_next/src/screens/Inventory/InventoryGroupHostAdd/InventoryGroupHostAdd.jsx @@ -1,9 +1,9 @@ import React, { useState } from 'react'; import { useHistory } from 'react-router-dom'; -import { CardBody } from '@components/Card'; -import HostForm from '@components/HostForm'; +import { CardBody } from '../../../components/Card'; +import HostForm from '../../../components/HostForm'; -import { GroupsAPI } from '@api'; +import { GroupsAPI } from '../../../api'; function InventoryGroupHostAdd({ inventoryGroup }) { const [formError, setFormError] = useState(null); diff --git a/awx/ui_next/src/screens/Inventory/InventoryGroupHostAdd/InventoryGroupHostAdd.test.jsx b/awx/ui_next/src/screens/Inventory/InventoryGroupHostAdd/InventoryGroupHostAdd.test.jsx index 2b10e8c5a7..37f82cd2bd 100644 --- a/awx/ui_next/src/screens/Inventory/InventoryGroupHostAdd/InventoryGroupHostAdd.test.jsx +++ b/awx/ui_next/src/screens/Inventory/InventoryGroupHostAdd/InventoryGroupHostAdd.test.jsx @@ -1,12 +1,12 @@ import React from 'react'; import { act } from 'react-dom/test-utils'; import { createMemoryHistory } from 'history'; -import { mountWithContexts } from '@testUtils/enzymeHelpers'; +import { mountWithContexts } from '../../../../testUtils/enzymeHelpers'; import InventoryGroupHostAdd from './InventoryGroupHostAdd'; import mockHost from '../shared/data.host.json'; -import { GroupsAPI } from '@api'; +import { GroupsAPI } from '../../../api'; -jest.mock('@api'); +jest.mock('../../../api'); GroupsAPI.createHost.mockResolvedValue({ data: { diff --git a/awx/ui_next/src/screens/Inventory/InventoryGroupHosts/AddHostDropdown.test.jsx b/awx/ui_next/src/screens/Inventory/InventoryGroupHosts/AddHostDropdown.test.jsx index c72e505ea2..8a7d2c11d4 100644 --- a/awx/ui_next/src/screens/Inventory/InventoryGroupHosts/AddHostDropdown.test.jsx +++ b/awx/ui_next/src/screens/Inventory/InventoryGroupHosts/AddHostDropdown.test.jsx @@ -1,5 +1,5 @@ import React from 'react'; -import { mountWithContexts } from '@testUtils/enzymeHelpers'; +import { mountWithContexts } from '../../../../testUtils/enzymeHelpers'; import AddHostDropdown from './AddHostDropdown'; describe('', () => { diff --git a/awx/ui_next/src/screens/Inventory/InventoryGroupHosts/InventoryGroupHostList.jsx b/awx/ui_next/src/screens/Inventory/InventoryGroupHosts/InventoryGroupHostList.jsx index 45107964f1..cdf8490ec4 100644 --- a/awx/ui_next/src/screens/Inventory/InventoryGroupHosts/InventoryGroupHostList.jsx +++ b/awx/ui_next/src/screens/Inventory/InventoryGroupHosts/InventoryGroupHostList.jsx @@ -2,20 +2,20 @@ import React, { useEffect, useCallback, useState } from 'react'; import { useHistory, useLocation, useParams } from 'react-router-dom'; import { withI18n } from '@lingui/react'; import { t } from '@lingui/macro'; -import { getQSConfig, mergeParams, parseQueryString } from '@util/qs'; -import { GroupsAPI, InventoriesAPI } from '@api'; +import { getQSConfig, mergeParams, parseQueryString } from '../../../util/qs'; +import { GroupsAPI, InventoriesAPI } from '../../../api'; import useRequest, { useDeleteItems, useDismissableError, -} from '@util/useRequest'; -import useSelected from '@util/useSelected'; -import AlertModal from '@components/AlertModal'; -import DataListToolbar from '@components/DataListToolbar'; -import ErrorDetail from '@components/ErrorDetail'; -import PaginatedDataList from '@components/PaginatedDataList'; -import AssociateModal from '@components/AssociateModal'; -import DisassociateButton from '@components/DisassociateButton'; +} from '../../../util/useRequest'; +import useSelected from '../../../util/useSelected'; +import AlertModal from '../../../components/AlertModal'; +import DataListToolbar from '../../../components/DataListToolbar'; +import ErrorDetail from '../../../components/ErrorDetail'; +import PaginatedDataList from '../../../components/PaginatedDataList'; +import AssociateModal from '../../../components/AssociateModal'; +import DisassociateButton from '../../../components/DisassociateButton'; import InventoryGroupHostListItem from './InventoryGroupHostListItem'; import AddHostDropdown from './AddHostDropdown'; diff --git a/awx/ui_next/src/screens/Inventory/InventoryGroupHosts/InventoryGroupHostList.test.jsx b/awx/ui_next/src/screens/Inventory/InventoryGroupHosts/InventoryGroupHostList.test.jsx index f51c48bb2a..06b4d823e0 100644 --- a/awx/ui_next/src/screens/Inventory/InventoryGroupHosts/InventoryGroupHostList.test.jsx +++ b/awx/ui_next/src/screens/Inventory/InventoryGroupHosts/InventoryGroupHostList.test.jsx @@ -1,13 +1,16 @@ import React from 'react'; import { act } from 'react-dom/test-utils'; import { createMemoryHistory } from 'history'; -import { GroupsAPI, InventoriesAPI } from '@api'; -import { mountWithContexts, waitForElement } from '@testUtils/enzymeHelpers'; +import { GroupsAPI, InventoriesAPI } from '../../../api'; +import { + mountWithContexts, + waitForElement, +} from '../../../../testUtils/enzymeHelpers'; import InventoryGroupHostList from './InventoryGroupHostList'; import mockHosts from '../shared/data.hosts.json'; -jest.mock('@api/models/Groups'); -jest.mock('@api/models/Inventories'); +jest.mock('../../../api/models/Groups'); +jest.mock('../../../api/models/Inventories'); jest.mock('react-router-dom', () => ({ ...jest.requireActual('react-router-dom'), useParams: () => ({ diff --git a/awx/ui_next/src/screens/Inventory/InventoryGroupHosts/InventoryGroupHostListItem.jsx b/awx/ui_next/src/screens/Inventory/InventoryGroupHosts/InventoryGroupHostListItem.jsx index 974595214e..9f6f4a32a0 100644 --- a/awx/ui_next/src/screens/Inventory/InventoryGroupHosts/InventoryGroupHostListItem.jsx +++ b/awx/ui_next/src/screens/Inventory/InventoryGroupHosts/InventoryGroupHostListItem.jsx @@ -13,13 +13,13 @@ import { DataListItemRow, Tooltip, } from '@patternfly/react-core'; -import DataListCell from '@components/DataListCell'; - import { PencilAltIcon } from '@patternfly/react-icons'; -import HostToggle from '@components/HostToggle'; -import Sparkline from '@components/Sparkline'; -import { Host } from '@types'; import styled from 'styled-components'; +import DataListCell from '../../../components/DataListCell'; + +import HostToggle from '../../../components/HostToggle'; +import Sparkline from '../../../components/Sparkline'; +import { Host } from '../../../types'; const DataListAction = styled(_DataListAction)` align-items: center; diff --git a/awx/ui_next/src/screens/Inventory/InventoryGroupHosts/InventoryGroupHostListItem.test.jsx b/awx/ui_next/src/screens/Inventory/InventoryGroupHosts/InventoryGroupHostListItem.test.jsx index 830bd5540e..d16173868e 100644 --- a/awx/ui_next/src/screens/Inventory/InventoryGroupHosts/InventoryGroupHostListItem.test.jsx +++ b/awx/ui_next/src/screens/Inventory/InventoryGroupHosts/InventoryGroupHostListItem.test.jsx @@ -1,9 +1,9 @@ import React from 'react'; -import { mountWithContexts } from '@testUtils/enzymeHelpers'; +import { mountWithContexts } from '../../../../testUtils/enzymeHelpers'; import InventoryGroupHostListItem from './InventoryGroupHostListItem'; import mockHosts from '../shared/data.hosts.json'; -jest.mock('@api'); +jest.mock('../../../api'); describe('', () => { let wrapper; diff --git a/awx/ui_next/src/screens/Inventory/InventoryGroupHosts/InventoryGroupHosts.test.jsx b/awx/ui_next/src/screens/Inventory/InventoryGroupHosts/InventoryGroupHosts.test.jsx index 0a4cecc19d..ee955fcbca 100644 --- a/awx/ui_next/src/screens/Inventory/InventoryGroupHosts/InventoryGroupHosts.test.jsx +++ b/awx/ui_next/src/screens/Inventory/InventoryGroupHosts/InventoryGroupHosts.test.jsx @@ -1,10 +1,10 @@ import React from 'react'; -import { mountWithContexts } from '@testUtils/enzymeHelpers'; import { act } from 'react-dom/test-utils'; import { createMemoryHistory } from 'history'; +import { mountWithContexts } from '../../../../testUtils/enzymeHelpers'; import InventoryGroupHosts from './InventoryGroupHosts'; -jest.mock('@api'); +jest.mock('../../../api'); describe('', () => { let wrapper; diff --git a/awx/ui_next/src/screens/Inventory/InventoryGroups/InventoryGroupItem.jsx b/awx/ui_next/src/screens/Inventory/InventoryGroups/InventoryGroupItem.jsx index 9ea542dad7..ae52ca6f4d 100644 --- a/awx/ui_next/src/screens/Inventory/InventoryGroups/InventoryGroupItem.jsx +++ b/awx/ui_next/src/screens/Inventory/InventoryGroups/InventoryGroupItem.jsx @@ -2,7 +2,6 @@ import React from 'react'; import { bool, func, number, oneOfType, string } from 'prop-types'; import { withI18n } from '@lingui/react'; import { t } from '@lingui/macro'; -import { Group } from '@types'; import { Button, @@ -13,10 +12,11 @@ import { DataListItemRow, Tooltip, } from '@patternfly/react-core'; -import DataListCell from '@components/DataListCell'; import { Link } from 'react-router-dom'; import { PencilAltIcon } from '@patternfly/react-icons'; +import DataListCell from '../../../components/DataListCell'; +import { Group } from '../../../types'; function InventoryGroupItem({ i18n, diff --git a/awx/ui_next/src/screens/Inventory/InventoryGroups/InventoryGroupItem.test.jsx b/awx/ui_next/src/screens/Inventory/InventoryGroups/InventoryGroupItem.test.jsx index fdf275c358..db0b2a0bd4 100644 --- a/awx/ui_next/src/screens/Inventory/InventoryGroups/InventoryGroupItem.test.jsx +++ b/awx/ui_next/src/screens/Inventory/InventoryGroups/InventoryGroupItem.test.jsx @@ -1,5 +1,5 @@ import React from 'react'; -import { mountWithContexts } from '@testUtils/enzymeHelpers'; +import { mountWithContexts } from '../../../../testUtils/enzymeHelpers'; import InventoryGroupItem from './InventoryGroupItem'; describe('', () => { diff --git a/awx/ui_next/src/screens/Inventory/InventoryGroups/InventoryGroups.test.jsx b/awx/ui_next/src/screens/Inventory/InventoryGroups/InventoryGroups.test.jsx index 935ef7bb04..97fff4596c 100644 --- a/awx/ui_next/src/screens/Inventory/InventoryGroups/InventoryGroups.test.jsx +++ b/awx/ui_next/src/screens/Inventory/InventoryGroups/InventoryGroups.test.jsx @@ -1,10 +1,10 @@ import React from 'react'; -import { mountWithContexts } from '@testUtils/enzymeHelpers'; import { act } from 'react-dom/test-utils'; import { createMemoryHistory } from 'history'; +import { mountWithContexts } from '../../../../testUtils/enzymeHelpers'; import InventoryGroups from './InventoryGroups'; -jest.mock('@api'); +jest.mock('../../../api'); describe('', () => { test('initially renders successfully', async () => { diff --git a/awx/ui_next/src/screens/Inventory/InventoryGroups/InventoryGroupsList.jsx b/awx/ui_next/src/screens/Inventory/InventoryGroups/InventoryGroupsList.jsx index 92576a9573..0122fe8ae0 100644 --- a/awx/ui_next/src/screens/Inventory/InventoryGroups/InventoryGroupsList.jsx +++ b/awx/ui_next/src/screens/Inventory/InventoryGroups/InventoryGroupsList.jsx @@ -2,15 +2,15 @@ import React, { useState, useEffect } from 'react'; import { useParams, useLocation } from 'react-router-dom'; import { withI18n } from '@lingui/react'; import { t } from '@lingui/macro'; -import { getQSConfig, parseQueryString } from '@util/qs'; -import { InventoriesAPI, GroupsAPI } from '@api'; import { Button, Tooltip } from '@patternfly/react-core'; -import AlertModal from '@components/AlertModal'; -import ErrorDetail from '@components/ErrorDetail'; -import DataListToolbar from '@components/DataListToolbar'; +import { getQSConfig, parseQueryString } from '../../../util/qs'; +import { InventoriesAPI, GroupsAPI } from '../../../api'; +import AlertModal from '../../../components/AlertModal'; +import ErrorDetail from '../../../components/ErrorDetail'; +import DataListToolbar from '../../../components/DataListToolbar'; import PaginatedDataList, { ToolbarAddButton, -} from '@components/PaginatedDataList'; +} from '../../../components/PaginatedDataList'; import InventoryGroupItem from './InventoryGroupItem'; import InventoryGroupsDeleteModal from '../shared/InventoryGroupsDeleteModal'; diff --git a/awx/ui_next/src/screens/Inventory/InventoryGroups/InventoryGroupsList.test.jsx b/awx/ui_next/src/screens/Inventory/InventoryGroups/InventoryGroupsList.test.jsx index a10cd22160..fbd02a9ad4 100644 --- a/awx/ui_next/src/screens/Inventory/InventoryGroups/InventoryGroupsList.test.jsx +++ b/awx/ui_next/src/screens/Inventory/InventoryGroups/InventoryGroupsList.test.jsx @@ -2,11 +2,14 @@ import React from 'react'; import { act } from 'react-dom/test-utils'; import { Route } from 'react-router-dom'; import { createMemoryHistory } from 'history'; -import { mountWithContexts, waitForElement } from '@testUtils/enzymeHelpers'; -import { InventoriesAPI, GroupsAPI } from '@api'; +import { + mountWithContexts, + waitForElement, +} from '../../../../testUtils/enzymeHelpers'; +import { InventoriesAPI, GroupsAPI } from '../../../api'; import InventoryGroupsList from './InventoryGroupsList'; -jest.mock('@api'); +jest.mock('../../../api'); const mockGroups = [ { diff --git a/awx/ui_next/src/screens/Inventory/InventoryHost/InventoryHost.jsx b/awx/ui_next/src/screens/Inventory/InventoryHost/InventoryHost.jsx index df994b33e6..ef674bc146 100644 --- a/awx/ui_next/src/screens/Inventory/InventoryHost/InventoryHost.jsx +++ b/awx/ui_next/src/screens/Inventory/InventoryHost/InventoryHost.jsx @@ -9,17 +9,17 @@ import { useRouteMatch, useLocation, } from 'react-router-dom'; -import useRequest from '@util/useRequest'; - -import { InventoriesAPI } from '@api'; import { Card, CardActions } from '@patternfly/react-core'; import { CaretLeftIcon } from '@patternfly/react-icons'; -import { TabbedCardHeader } from '@components/Card'; -import CardCloseButton from '@components/CardCloseButton'; -import ContentError from '@components/ContentError'; -import ContentLoading from '@components/ContentLoading'; -import RoutedTabs from '@components/RoutedTabs'; -import JobList from '@components/JobList'; +import useRequest from '../../../util/useRequest'; + +import { InventoriesAPI } from '../../../api'; +import { TabbedCardHeader } from '../../../components/Card'; +import CardCloseButton from '../../../components/CardCloseButton'; +import ContentError from '../../../components/ContentError'; +import ContentLoading from '../../../components/ContentLoading'; +import RoutedTabs from '../../../components/RoutedTabs'; +import JobList from '../../../components/JobList'; import InventoryHostDetail from '../InventoryHostDetail'; import InventoryHostEdit from '../InventoryHostEdit'; import InventoryHostFacts from '../InventoryHostFacts'; diff --git a/awx/ui_next/src/screens/Inventory/InventoryHost/InventoryHost.test.jsx b/awx/ui_next/src/screens/Inventory/InventoryHost/InventoryHost.test.jsx index 0d73f4d04a..a351efb25c 100644 --- a/awx/ui_next/src/screens/Inventory/InventoryHost/InventoryHost.test.jsx +++ b/awx/ui_next/src/screens/Inventory/InventoryHost/InventoryHost.test.jsx @@ -1,12 +1,15 @@ import React from 'react'; import { act } from 'react-dom/test-utils'; import { createMemoryHistory } from 'history'; -import { InventoriesAPI } from '@api'; -import { mountWithContexts, waitForElement } from '@testUtils/enzymeHelpers'; +import { InventoriesAPI } from '../../../api'; +import { + mountWithContexts, + waitForElement, +} from '../../../../testUtils/enzymeHelpers'; import mockHost from '../shared/data.host.json'; import InventoryHost from './InventoryHost'; -jest.mock('@api'); +jest.mock('../../../api'); jest.mock('react-router-dom', () => ({ ...jest.requireActual('react-router-dom'), useRouteMatch: () => ({ diff --git a/awx/ui_next/src/screens/Inventory/InventoryHostAdd/InventoryHostAdd.jsx b/awx/ui_next/src/screens/Inventory/InventoryHostAdd/InventoryHostAdd.jsx index 9afb38c90b..4fc1360f27 100644 --- a/awx/ui_next/src/screens/Inventory/InventoryHostAdd/InventoryHostAdd.jsx +++ b/awx/ui_next/src/screens/Inventory/InventoryHostAdd/InventoryHostAdd.jsx @@ -1,9 +1,9 @@ import React, { useState } from 'react'; import { useHistory } from 'react-router-dom'; -import { CardBody } from '@components/Card'; -import HostForm from '@components/HostForm'; +import { CardBody } from '../../../components/Card'; +import HostForm from '../../../components/HostForm'; -import { HostsAPI } from '@api'; +import { HostsAPI } from '../../../api'; function InventoryHostAdd({ inventory }) { const [formError, setFormError] = useState(null); diff --git a/awx/ui_next/src/screens/Inventory/InventoryHostAdd/InventoryHostAdd.test.jsx b/awx/ui_next/src/screens/Inventory/InventoryHostAdd/InventoryHostAdd.test.jsx index d17216ac10..df616dcc78 100644 --- a/awx/ui_next/src/screens/Inventory/InventoryHostAdd/InventoryHostAdd.test.jsx +++ b/awx/ui_next/src/screens/Inventory/InventoryHostAdd/InventoryHostAdd.test.jsx @@ -1,12 +1,12 @@ import React from 'react'; import { act } from 'react-dom/test-utils'; import { createMemoryHistory } from 'history'; -import { mountWithContexts } from '@testUtils/enzymeHelpers'; +import { mountWithContexts } from '../../../../testUtils/enzymeHelpers'; import InventoryHostAdd from './InventoryHostAdd'; import mockHost from '../shared/data.host.json'; -import { HostsAPI } from '@api'; +import { HostsAPI } from '../../../api'; -jest.mock('@api'); +jest.mock('../../../api'); HostsAPI.create.mockResolvedValue({ data: { diff --git a/awx/ui_next/src/screens/Inventory/InventoryHostDetail/InventoryHostDetail.jsx b/awx/ui_next/src/screens/Inventory/InventoryHostDetail/InventoryHostDetail.jsx index cfa36e4e83..1034ec9551 100644 --- a/awx/ui_next/src/screens/Inventory/InventoryHostDetail/InventoryHostDetail.jsx +++ b/awx/ui_next/src/screens/Inventory/InventoryHostDetail/InventoryHostDetail.jsx @@ -2,17 +2,21 @@ import React, { useState } from 'react'; import { Link, useHistory } from 'react-router-dom'; import { withI18n } from '@lingui/react'; import { t } from '@lingui/macro'; -import { Host } from '@types'; import { Button } from '@patternfly/react-core'; -import { CardBody, CardActionsRow } from '@components/Card'; -import AlertModal from '@components/AlertModal'; -import ErrorDetail from '@components/ErrorDetail'; -import { DetailList, Detail, UserDateDetail } from '@components/DetailList'; -import { VariablesDetail } from '@components/CodeMirrorInput'; -import Sparkline from '@components/Sparkline'; -import DeleteButton from '@components/DeleteButton'; -import { HostsAPI } from '@api'; -import HostToggle from '@components/HostToggle'; +import { Host } from '../../../types'; +import { CardBody, CardActionsRow } from '../../../components/Card'; +import AlertModal from '../../../components/AlertModal'; +import ErrorDetail from '../../../components/ErrorDetail'; +import { + DetailList, + Detail, + UserDateDetail, +} from '../../../components/DetailList'; +import { VariablesDetail } from '../../../components/CodeMirrorInput'; +import Sparkline from '../../../components/Sparkline'; +import DeleteButton from '../../../components/DeleteButton'; +import { HostsAPI } from '../../../api'; +import HostToggle from '../../../components/HostToggle'; function InventoryHostDetail({ i18n, host }) { const { diff --git a/awx/ui_next/src/screens/Inventory/InventoryHostDetail/InventoryHostDetail.test.jsx b/awx/ui_next/src/screens/Inventory/InventoryHostDetail/InventoryHostDetail.test.jsx index 66735e19cb..11dad5add4 100644 --- a/awx/ui_next/src/screens/Inventory/InventoryHostDetail/InventoryHostDetail.test.jsx +++ b/awx/ui_next/src/screens/Inventory/InventoryHostDetail/InventoryHostDetail.test.jsx @@ -1,11 +1,14 @@ import React from 'react'; import { act } from 'react-dom/test-utils'; -import { mountWithContexts, waitForElement } from '@testUtils/enzymeHelpers'; +import { + mountWithContexts, + waitForElement, +} from '../../../../testUtils/enzymeHelpers'; import InventoryHostDetail from './InventoryHostDetail'; -import { HostsAPI } from '@api'; +import { HostsAPI } from '../../../api'; import mockHost from '../shared/data.host.json'; -jest.mock('@api'); +jest.mock('../../../api'); describe('', () => { let wrapper; diff --git a/awx/ui_next/src/screens/Inventory/InventoryHostEdit/InventoryHostEdit.jsx b/awx/ui_next/src/screens/Inventory/InventoryHostEdit/InventoryHostEdit.jsx index c7f0845bd4..33cd7dfce3 100644 --- a/awx/ui_next/src/screens/Inventory/InventoryHostEdit/InventoryHostEdit.jsx +++ b/awx/ui_next/src/screens/Inventory/InventoryHostEdit/InventoryHostEdit.jsx @@ -1,10 +1,10 @@ import React, { useState } from 'react'; import PropTypes from 'prop-types'; import { useHistory } from 'react-router-dom'; -import { CardBody } from '@components/Card'; -import HostForm from '@components/HostForm'; +import { CardBody } from '../../../components/Card'; +import HostForm from '../../../components/HostForm'; -import { HostsAPI } from '@api'; +import { HostsAPI } from '../../../api'; function InventoryHostEdit({ host, inventory }) { const [formError, setFormError] = useState(null); diff --git a/awx/ui_next/src/screens/Inventory/InventoryHostEdit/InventoryHostEdit.test.jsx b/awx/ui_next/src/screens/Inventory/InventoryHostEdit/InventoryHostEdit.test.jsx index f6a6ccb849..07988c575a 100644 --- a/awx/ui_next/src/screens/Inventory/InventoryHostEdit/InventoryHostEdit.test.jsx +++ b/awx/ui_next/src/screens/Inventory/InventoryHostEdit/InventoryHostEdit.test.jsx @@ -1,12 +1,12 @@ import React from 'react'; import { act } from 'react-dom/test-utils'; import { createMemoryHistory } from 'history'; -import { HostsAPI } from '@api'; -import { mountWithContexts } from '@testUtils/enzymeHelpers'; +import { HostsAPI } from '../../../api'; +import { mountWithContexts } from '../../../../testUtils/enzymeHelpers'; import InventoryHostEdit from './InventoryHostEdit'; import mockHost from '../shared/data.host.json'; -jest.mock('@api'); +jest.mock('../../../api'); describe('', () => { let wrapper; diff --git a/awx/ui_next/src/screens/Inventory/InventoryHostFacts/InventoryHostFacts.jsx b/awx/ui_next/src/screens/Inventory/InventoryHostFacts/InventoryHostFacts.jsx index 8c10b00104..e0940a4531 100644 --- a/awx/ui_next/src/screens/Inventory/InventoryHostFacts/InventoryHostFacts.jsx +++ b/awx/ui_next/src/screens/Inventory/InventoryHostFacts/InventoryHostFacts.jsx @@ -1,14 +1,14 @@ import React, { useCallback, useEffect } from 'react'; import { withI18n } from '@lingui/react'; import { t } from '@lingui/macro'; -import { Host } from '@types'; -import { CardBody } from '@components/Card'; -import { DetailList } from '@components/DetailList'; -import { VariablesDetail } from '@components/CodeMirrorInput'; -import ContentError from '@components/ContentError'; -import ContentLoading from '@components/ContentLoading'; -import useRequest from '@util/useRequest'; -import { HostsAPI } from '@api'; +import { Host } from '../../../types'; +import { CardBody } from '../../../components/Card'; +import { DetailList } from '../../../components/DetailList'; +import { VariablesDetail } from '../../../components/CodeMirrorInput'; +import ContentError from '../../../components/ContentError'; +import ContentLoading from '../../../components/ContentLoading'; +import useRequest from '../../../util/useRequest'; +import { HostsAPI } from '../../../api'; function InventoryHostFacts({ i18n, host }) { const { result: facts, isLoading, error, request: fetchFacts } = useRequest( diff --git a/awx/ui_next/src/screens/Inventory/InventoryHostFacts/InventoryHostFacts.test.jsx b/awx/ui_next/src/screens/Inventory/InventoryHostFacts/InventoryHostFacts.test.jsx index 96b4c8ec27..50e0e75d06 100644 --- a/awx/ui_next/src/screens/Inventory/InventoryHostFacts/InventoryHostFacts.test.jsx +++ b/awx/ui_next/src/screens/Inventory/InventoryHostFacts/InventoryHostFacts.test.jsx @@ -1,12 +1,15 @@ import React from 'react'; import { act } from 'react-dom/test-utils'; -import { mountWithContexts, waitForElement } from '@testUtils/enzymeHelpers'; +import { + mountWithContexts, + waitForElement, +} from '../../../../testUtils/enzymeHelpers'; import InventoryHostFacts from './InventoryHostFacts'; -import { HostsAPI } from '@api'; +import { HostsAPI } from '../../../api'; import mockHost from '../shared/data.host.json'; import mockHostFacts from '../shared/data.hostFacts.json'; -jest.mock('@api/models/Hosts'); +jest.mock('../../../api/models/Hosts'); jest.mock('react-router-dom', () => ({ ...jest.requireActual('react-router-dom'), useParams: () => ({ diff --git a/awx/ui_next/src/screens/Inventory/InventoryHostGroups/InventoryHostGroupItem.jsx b/awx/ui_next/src/screens/Inventory/InventoryHostGroups/InventoryHostGroupItem.jsx index 66ca5d4aaf..1a8f14216a 100644 --- a/awx/ui_next/src/screens/Inventory/InventoryHostGroups/InventoryHostGroupItem.jsx +++ b/awx/ui_next/src/screens/Inventory/InventoryHostGroups/InventoryHostGroupItem.jsx @@ -2,7 +2,6 @@ import React from 'react'; import { bool, func, number, oneOfType, string } from 'prop-types'; import { withI18n } from '@lingui/react'; import { t } from '@lingui/macro'; -import { Group } from '@types'; import { Button, @@ -13,10 +12,11 @@ import { DataListItemRow, Tooltip, } from '@patternfly/react-core'; -import DataListCell from '@components/DataListCell'; import { Link } from 'react-router-dom'; import { PencilAltIcon } from '@patternfly/react-icons'; +import DataListCell from '../../../components/DataListCell'; +import { Group } from '../../../types'; function InventoryHostGroupItem({ i18n, diff --git a/awx/ui_next/src/screens/Inventory/InventoryHostGroups/InventoryHostGroupItem.test.jsx b/awx/ui_next/src/screens/Inventory/InventoryHostGroups/InventoryHostGroupItem.test.jsx index 9a06f73336..6092de88c7 100644 --- a/awx/ui_next/src/screens/Inventory/InventoryHostGroups/InventoryHostGroupItem.test.jsx +++ b/awx/ui_next/src/screens/Inventory/InventoryHostGroups/InventoryHostGroupItem.test.jsx @@ -1,5 +1,5 @@ import React from 'react'; -import { mountWithContexts } from '@testUtils/enzymeHelpers'; +import { mountWithContexts } from '../../../../testUtils/enzymeHelpers'; import InventoryHostGroupItem from './InventoryHostGroupItem'; describe('', () => { diff --git a/awx/ui_next/src/screens/Inventory/InventoryHostGroups/InventoryHostGroups.test.jsx b/awx/ui_next/src/screens/Inventory/InventoryHostGroups/InventoryHostGroups.test.jsx index fff99cddaf..6f90c82613 100644 --- a/awx/ui_next/src/screens/Inventory/InventoryHostGroups/InventoryHostGroups.test.jsx +++ b/awx/ui_next/src/screens/Inventory/InventoryHostGroups/InventoryHostGroups.test.jsx @@ -1,11 +1,11 @@ import React from 'react'; -import { mountWithContexts } from '@testUtils/enzymeHelpers'; import { act } from 'react-dom/test-utils'; import { createMemoryHistory } from 'history'; -import { HostsAPI } from '@api'; +import { mountWithContexts } from '../../../../testUtils/enzymeHelpers'; +import { HostsAPI } from '../../../api'; import InventoryHostGroups from './InventoryHostGroups'; -jest.mock('@api'); +jest.mock('../../../api'); HostsAPI.readAllGroups.mockResolvedValue({ data: { count: 1, diff --git a/awx/ui_next/src/screens/Inventory/InventoryHostGroups/InventoryHostGroupsList.jsx b/awx/ui_next/src/screens/Inventory/InventoryHostGroups/InventoryHostGroupsList.jsx index f4c8212e1e..7d38451bb6 100644 --- a/awx/ui_next/src/screens/Inventory/InventoryHostGroups/InventoryHostGroupsList.jsx +++ b/awx/ui_next/src/screens/Inventory/InventoryHostGroups/InventoryHostGroupsList.jsx @@ -2,21 +2,21 @@ import React, { useState, useEffect, useCallback } from 'react'; import { useParams, useLocation } from 'react-router-dom'; import { withI18n } from '@lingui/react'; import { t } from '@lingui/macro'; -import { getQSConfig, parseQueryString, mergeParams } from '@util/qs'; +import { getQSConfig, parseQueryString, mergeParams } from '../../../util/qs'; import useRequest, { useDismissableError, useDeleteItems, -} from '@util/useRequest'; -import useSelected from '@util/useSelected'; -import { HostsAPI, InventoriesAPI } from '@api'; -import DataListToolbar from '@components/DataListToolbar'; -import AlertModal from '@components/AlertModal'; -import ErrorDetail from '@components/ErrorDetail'; +} from '../../../util/useRequest'; +import useSelected from '../../../util/useSelected'; +import { HostsAPI, InventoriesAPI } from '../../../api'; +import DataListToolbar from '../../../components/DataListToolbar'; +import AlertModal from '../../../components/AlertModal'; +import ErrorDetail from '../../../components/ErrorDetail'; import PaginatedDataList, { ToolbarAddButton, -} from '@components/PaginatedDataList'; -import AssociateModal from '@components/AssociateModal'; -import DisassociateButton from '@components/DisassociateButton'; +} from '../../../components/PaginatedDataList'; +import AssociateModal from '../../../components/AssociateModal'; +import DisassociateButton from '../../../components/DisassociateButton'; import InventoryHostGroupItem from './InventoryHostGroupItem'; const QS_CONFIG = getQSConfig('group', { diff --git a/awx/ui_next/src/screens/Inventory/InventoryHostGroups/InventoryHostGroupsList.test.jsx b/awx/ui_next/src/screens/Inventory/InventoryHostGroups/InventoryHostGroupsList.test.jsx index c20be91121..1b72f73bd1 100644 --- a/awx/ui_next/src/screens/Inventory/InventoryHostGroups/InventoryHostGroupsList.test.jsx +++ b/awx/ui_next/src/screens/Inventory/InventoryHostGroups/InventoryHostGroupsList.test.jsx @@ -2,11 +2,14 @@ import React from 'react'; import { act } from 'react-dom/test-utils'; import { Route } from 'react-router-dom'; import { createMemoryHistory } from 'history'; -import { mountWithContexts, waitForElement } from '@testUtils/enzymeHelpers'; -import { HostsAPI, InventoriesAPI } from '@api'; +import { + mountWithContexts, + waitForElement, +} from '../../../../testUtils/enzymeHelpers'; +import { HostsAPI, InventoriesAPI } from '../../../api'; import InventoryHostGroupsList from './InventoryHostGroupsList'; -jest.mock('@api'); +jest.mock('../../../api'); const mockGroups = [ { diff --git a/awx/ui_next/src/screens/Inventory/InventoryHosts/InventoryHostItem.jsx b/awx/ui_next/src/screens/Inventory/InventoryHosts/InventoryHostItem.jsx index 96ce10bbdb..61d2c493cb 100644 --- a/awx/ui_next/src/screens/Inventory/InventoryHosts/InventoryHostItem.jsx +++ b/awx/ui_next/src/screens/Inventory/InventoryHosts/InventoryHostItem.jsx @@ -11,14 +11,14 @@ import { DataListItemRow, Tooltip, } from '@patternfly/react-core'; -import DataListCell from '@components/DataListCell'; - import { Link } from 'react-router-dom'; import { PencilAltIcon } from '@patternfly/react-icons'; -import HostToggle from '@components/HostToggle'; -import Sparkline from '@components/Sparkline'; -import { Host } from '@types'; import styled from 'styled-components'; +import DataListCell from '../../../components/DataListCell'; + +import HostToggle from '../../../components/HostToggle'; +import Sparkline from '../../../components/Sparkline'; +import { Host } from '../../../types'; const DataListAction = styled(_DataListAction)` align-items: center; diff --git a/awx/ui_next/src/screens/Inventory/InventoryHosts/InventoryHostItem.test.jsx b/awx/ui_next/src/screens/Inventory/InventoryHosts/InventoryHostItem.test.jsx index 8a1af7a6ba..a135aae9e6 100644 --- a/awx/ui_next/src/screens/Inventory/InventoryHosts/InventoryHostItem.test.jsx +++ b/awx/ui_next/src/screens/Inventory/InventoryHosts/InventoryHostItem.test.jsx @@ -1,5 +1,5 @@ import React from 'react'; -import { mountWithContexts } from '@testUtils/enzymeHelpers'; +import { mountWithContexts } from '../../../../testUtils/enzymeHelpers'; import InventoryHostItem from './InventoryHostItem'; const mockHost = { diff --git a/awx/ui_next/src/screens/Inventory/InventoryHosts/InventoryHostList.jsx b/awx/ui_next/src/screens/Inventory/InventoryHosts/InventoryHostList.jsx index 3b82d513a5..6e0168330d 100644 --- a/awx/ui_next/src/screens/Inventory/InventoryHosts/InventoryHostList.jsx +++ b/awx/ui_next/src/screens/Inventory/InventoryHosts/InventoryHostList.jsx @@ -2,16 +2,16 @@ import React, { useEffect, useState } from 'react'; import { useParams, useLocation } from 'react-router-dom'; import { withI18n } from '@lingui/react'; import { t } from '@lingui/macro'; -import { getQSConfig, parseQueryString } from '@util/qs'; -import { InventoriesAPI, HostsAPI } from '@api'; +import { getQSConfig, parseQueryString } from '../../../util/qs'; +import { InventoriesAPI, HostsAPI } from '../../../api'; -import AlertModal from '@components/AlertModal'; -import DataListToolbar from '@components/DataListToolbar'; -import ErrorDetail from '@components/ErrorDetail'; +import AlertModal from '../../../components/AlertModal'; +import DataListToolbar from '../../../components/DataListToolbar'; +import ErrorDetail from '../../../components/ErrorDetail'; import PaginatedDataList, { ToolbarAddButton, ToolbarDeleteButton, -} from '@components/PaginatedDataList'; +} from '../../../components/PaginatedDataList'; import InventoryHostItem from './InventoryHostItem'; const QS_CONFIG = getQSConfig('host', { diff --git a/awx/ui_next/src/screens/Inventory/InventoryHosts/InventoryHostList.test.jsx b/awx/ui_next/src/screens/Inventory/InventoryHosts/InventoryHostList.test.jsx index 7456fe99f8..66ba9d992d 100644 --- a/awx/ui_next/src/screens/Inventory/InventoryHosts/InventoryHostList.test.jsx +++ b/awx/ui_next/src/screens/Inventory/InventoryHosts/InventoryHostList.test.jsx @@ -1,11 +1,14 @@ import React from 'react'; import { act } from 'react-dom/test-utils'; -import { InventoriesAPI, HostsAPI } from '@api'; -import { mountWithContexts, waitForElement } from '@testUtils/enzymeHelpers'; +import { InventoriesAPI, HostsAPI } from '../../../api'; +import { + mountWithContexts, + waitForElement, +} from '../../../../testUtils/enzymeHelpers'; import InventoryHostList from './InventoryHostList'; import mockInventory from '../shared/data.inventory.json'; -jest.mock('@api'); +jest.mock('../../../api'); const mockHosts = [ { diff --git a/awx/ui_next/src/screens/Inventory/InventoryHosts/InventoryHosts.test.jsx b/awx/ui_next/src/screens/Inventory/InventoryHosts/InventoryHosts.test.jsx index 140a6e57ea..4b25da701b 100644 --- a/awx/ui_next/src/screens/Inventory/InventoryHosts/InventoryHosts.test.jsx +++ b/awx/ui_next/src/screens/Inventory/InventoryHosts/InventoryHosts.test.jsx @@ -1,6 +1,6 @@ import React from 'react'; import { createMemoryHistory } from 'history'; -import { mountWithContexts } from '@testUtils/enzymeHelpers'; +import { mountWithContexts } from '../../../../testUtils/enzymeHelpers'; import InventoryHosts from './InventoryHosts'; describe('', () => { diff --git a/awx/ui_next/src/screens/Inventory/InventoryList/InventoryList.jsx b/awx/ui_next/src/screens/Inventory/InventoryList/InventoryList.jsx index cbcb6a3b09..dcb817fe59 100644 --- a/awx/ui_next/src/screens/Inventory/InventoryList/InventoryList.jsx +++ b/awx/ui_next/src/screens/Inventory/InventoryList/InventoryList.jsx @@ -5,17 +5,17 @@ import { withI18n } from '@lingui/react'; import { t } from '@lingui/macro'; import { Card, PageSection } from '@patternfly/react-core'; -import { InventoriesAPI } from '@api'; -import useRequest, { useDeleteItems } from '@util/useRequest'; -import AlertModal from '@components/AlertModal'; -import DatalistToolbar from '@components/DataListToolbar'; -import ErrorDetail from '@components/ErrorDetail'; +import { InventoriesAPI } from '../../../api'; +import useRequest, { useDeleteItems } from '../../../util/useRequest'; +import AlertModal from '../../../components/AlertModal'; +import DatalistToolbar from '../../../components/DataListToolbar'; +import ErrorDetail from '../../../components/ErrorDetail'; import PaginatedDataList, { ToolbarDeleteButton, -} from '@components/PaginatedDataList'; +} from '../../../components/PaginatedDataList'; -import { getQSConfig, parseQueryString } from '@util/qs'; -import AddDropDownButton from '@components/AddDropDownButton'; +import { getQSConfig, parseQueryString } from '../../../util/qs'; +import AddDropDownButton from '../../../components/AddDropDownButton'; import InventoryListItem from './InventoryListItem'; const QS_CONFIG = getQSConfig('inventory', { diff --git a/awx/ui_next/src/screens/Inventory/InventoryList/InventoryList.test.jsx b/awx/ui_next/src/screens/Inventory/InventoryList/InventoryList.test.jsx index 641ed0154f..0db85887bb 100644 --- a/awx/ui_next/src/screens/Inventory/InventoryList/InventoryList.test.jsx +++ b/awx/ui_next/src/screens/Inventory/InventoryList/InventoryList.test.jsx @@ -1,11 +1,11 @@ import React from 'react'; import { act } from 'react-dom/test-utils'; -import { InventoriesAPI } from '@api'; -import { mountWithContexts } from '@testUtils/enzymeHelpers'; +import { InventoriesAPI } from '../../../api'; +import { mountWithContexts } from '../../../../testUtils/enzymeHelpers'; import InventoryList from './InventoryList'; -jest.mock('@api'); +jest.mock('../../../api'); const mockInventories = [ { diff --git a/awx/ui_next/src/screens/Inventory/InventoryList/InventoryListItem.jsx b/awx/ui_next/src/screens/Inventory/InventoryList/InventoryListItem.jsx index d667345ff1..f71e929eeb 100644 --- a/awx/ui_next/src/screens/Inventory/InventoryList/InventoryListItem.jsx +++ b/awx/ui_next/src/screens/Inventory/InventoryList/InventoryListItem.jsx @@ -10,15 +10,14 @@ import { DataListItemRow, Tooltip, } from '@patternfly/react-core'; -import DataListCell from '@components/DataListCell'; import { t } from '@lingui/macro'; import { Link } from 'react-router-dom'; import styled from 'styled-components'; import { PencilAltIcon } from '@patternfly/react-icons'; -import { timeOfDay } from '@util/dates'; -import { InventoriesAPI } from '@api'; -import { Inventory } from '@types'; +import { timeOfDay } from '../../../util/dates'; +import { InventoriesAPI } from '../../../api'; +import { Inventory } from '../../../types'; import CopyButton from '../../../components/CopyButton/CopyButton'; const DataListAction = styled(_DataListAction)` diff --git a/awx/ui_next/src/screens/Inventory/InventoryList/InventoryListItem.test.jsx b/awx/ui_next/src/screens/Inventory/InventoryList/InventoryListItem.test.jsx index b67b2a5070..fc5bf838f2 100644 --- a/awx/ui_next/src/screens/Inventory/InventoryList/InventoryListItem.test.jsx +++ b/awx/ui_next/src/screens/Inventory/InventoryList/InventoryListItem.test.jsx @@ -2,11 +2,11 @@ import React from 'react'; import { MemoryRouter } from 'react-router-dom'; import { I18nProvider } from '@lingui/react'; import { act } from 'react-dom/test-utils'; -import { mountWithContexts } from '@testUtils/enzymeHelpers'; -import { InventoriesAPI } from '@api'; +import { mountWithContexts } from '../../../../testUtils/enzymeHelpers'; +import { InventoriesAPI } from '../../../api'; import InventoryListItem from './InventoryListItem'; -jest.mock('@api/models/Inventories'); +jest.mock('../../../api/models/Inventories'); describe('', () => { test('initially renders succesfully', () => { diff --git a/awx/ui_next/src/screens/Inventory/InventorySource/InventorySource.jsx b/awx/ui_next/src/screens/Inventory/InventorySource/InventorySource.jsx index aecc3f7d83..f8fb0b9695 100644 --- a/awx/ui_next/src/screens/Inventory/InventorySource/InventorySource.jsx +++ b/awx/ui_next/src/screens/Inventory/InventorySource/InventorySource.jsx @@ -9,16 +9,16 @@ import { useRouteMatch, useLocation, } from 'react-router-dom'; -import useRequest from '@util/useRequest'; +import useRequest from '../../../util/useRequest'; -import { InventoriesAPI } from '@api'; +import { InventoriesAPI } from '../../../api'; import { CaretLeftIcon } from '@patternfly/react-icons'; import { CardActions } from '@patternfly/react-core'; -import { TabbedCardHeader } from '@components/Card'; -import CardCloseButton from '@components/CardCloseButton'; -import ContentError from '@components/ContentError'; -import ContentLoading from '@components/ContentLoading'; -import RoutedTabs from '@components/RoutedTabs'; +import { TabbedCardHeader } from '../../../components/Card'; +import CardCloseButton from '../../../components/CardCloseButton'; +import ContentError from '../../../components/ContentError'; +import ContentLoading from '../../../components/ContentLoading'; +import RoutedTabs from '../../../components/RoutedTabs'; import InventorySourceDetail from '../InventorySourceDetail'; function InventorySource({ i18n, inventory, setBreadcrumb }) { diff --git a/awx/ui_next/src/screens/Inventory/InventorySource/InventorySource.test.jsx b/awx/ui_next/src/screens/Inventory/InventorySource/InventorySource.test.jsx index 39706bf56b..84df4fbb0b 100644 --- a/awx/ui_next/src/screens/Inventory/InventorySource/InventorySource.test.jsx +++ b/awx/ui_next/src/screens/Inventory/InventorySource/InventorySource.test.jsx @@ -1,12 +1,12 @@ import React from 'react'; import { act } from 'react-dom/test-utils'; import { createMemoryHistory } from 'history'; -import { InventoriesAPI } from '@api'; -import { mountWithContexts, waitForElement } from '@testUtils/enzymeHelpers'; +import { InventoriesAPI } from '../../../api'; +import { mountWithContexts, waitForElement } from '../../../../testUtils/enzymeHelpers'; import mockInventorySource from '../shared/data.inventory_source.json'; import InventorySource from './InventorySource'; -jest.mock('@api/models/Inventories'); +jest.mock('../../../api/models/Inventories'); jest.mock('react-router-dom', () => ({ ...jest.requireActual('react-router-dom'), useRouteMatch: () => ({ diff --git a/awx/ui_next/src/screens/Inventory/InventorySourceAdd/InventorySourceAdd.jsx b/awx/ui_next/src/screens/Inventory/InventorySourceAdd/InventorySourceAdd.jsx index df12500a91..f1a90bcca6 100644 --- a/awx/ui_next/src/screens/Inventory/InventorySourceAdd/InventorySourceAdd.jsx +++ b/awx/ui_next/src/screens/Inventory/InventorySourceAdd/InventorySourceAdd.jsx @@ -1,9 +1,9 @@ import React, { useCallback, useEffect } from 'react'; import { useHistory, useParams } from 'react-router-dom'; -import { InventorySourcesAPI } from '@api'; -import useRequest from '@util/useRequest'; import { Card } from '@patternfly/react-core'; -import { CardBody } from '@components/Card'; +import { InventorySourcesAPI } from '../../../api'; +import useRequest from '../../../util/useRequest'; +import { CardBody } from '../../../components/Card'; import InventorySourceForm from '../shared/InventorySourceForm'; function InventorySourceAdd() { diff --git a/awx/ui_next/src/screens/Inventory/InventorySourceAdd/InventorySourceAdd.test.jsx b/awx/ui_next/src/screens/Inventory/InventorySourceAdd/InventorySourceAdd.test.jsx index 80bd08c902..8d26c48560 100644 --- a/awx/ui_next/src/screens/Inventory/InventorySourceAdd/InventorySourceAdd.test.jsx +++ b/awx/ui_next/src/screens/Inventory/InventorySourceAdd/InventorySourceAdd.test.jsx @@ -1,11 +1,11 @@ import React from 'react'; import { act } from 'react-dom/test-utils'; import { createMemoryHistory } from 'history'; -import { mountWithContexts } from '@testUtils/enzymeHelpers'; +import { mountWithContexts } from '../../../../testUtils/enzymeHelpers'; import InventorySourceAdd from './InventorySourceAdd'; -import { InventorySourcesAPI, ProjectsAPI } from '@api'; +import { InventorySourcesAPI, ProjectsAPI } from '../../../api'; -jest.mock('@api'); +jest.mock('../../../api'); jest.mock('react-router-dom', () => ({ ...jest.requireActual('react-router-dom'), useParams: () => ({ diff --git a/awx/ui_next/src/screens/Inventory/InventorySourceDetail/InventorySourceDetail.jsx b/awx/ui_next/src/screens/Inventory/InventorySourceDetail/InventorySourceDetail.jsx index 7840007fca..1921d378ad 100644 --- a/awx/ui_next/src/screens/Inventory/InventorySourceDetail/InventorySourceDetail.jsx +++ b/awx/ui_next/src/screens/Inventory/InventorySourceDetail/InventorySourceDetail.jsx @@ -10,14 +10,14 @@ import { List, ListItem, } from '@patternfly/react-core'; -import AlertModal from '@components/AlertModal'; -import { CardBody, CardActionsRow } from '@components/Card'; -import { VariablesDetail } from '@components/CodeMirrorInput'; -import CredentialChip from '@components/CredentialChip'; -import DeleteButton from '@components/DeleteButton'; -import { DetailList, Detail, UserDateDetail } from '@components/DetailList'; -import ErrorDetail from '@components/ErrorDetail'; -import { InventorySourcesAPI } from '@api'; +import AlertModal from '../../../components/AlertModal'; +import { CardBody, CardActionsRow } from '../../../components/Card'; +import { VariablesDetail } from '../../../components/CodeMirrorInput'; +import CredentialChip from '../../../components/CredentialChip'; +import DeleteButton from '../../../components/DeleteButton'; +import { DetailList, Detail, UserDateDetail } from '../../../components/DetailList'; +import ErrorDetail from '../../../components/ErrorDetail'; +import { InventorySourcesAPI } from '../../../api'; function InventorySourceDetail({ inventorySource, i18n }) { const { diff --git a/awx/ui_next/src/screens/Inventory/InventorySourceDetail/InventorySourceDetail.test.jsx b/awx/ui_next/src/screens/Inventory/InventorySourceDetail/InventorySourceDetail.test.jsx index 3d4d4482a6..0118d5a16b 100644 --- a/awx/ui_next/src/screens/Inventory/InventorySourceDetail/InventorySourceDetail.test.jsx +++ b/awx/ui_next/src/screens/Inventory/InventorySourceDetail/InventorySourceDetail.test.jsx @@ -1,12 +1,12 @@ import React from 'react'; import { act } from 'react-dom/test-utils'; import { createMemoryHistory } from 'history'; -import { mountWithContexts, waitForElement } from '@testUtils/enzymeHelpers'; +import { mountWithContexts, waitForElement } from '../../../../testUtils/enzymeHelpers'; import InventorySourceDetail from './InventorySourceDetail'; import mockInvSource from '../shared/data.inventory_source.json'; -import { InventorySourcesAPI } from '@api'; +import { InventorySourcesAPI } from '../../../api'; -jest.mock('@api/models/InventorySources'); +jest.mock('../../../api/models/InventorySources'); function assertDetail(wrapper, label, value) { expect(wrapper.find(`Detail[label="${label}"] dt`).text()).toBe(label); diff --git a/awx/ui_next/src/screens/Inventory/InventorySources/InventorySourceList.jsx b/awx/ui_next/src/screens/Inventory/InventorySources/InventorySourceList.jsx index 0a759b94e6..8d5b11ebf9 100644 --- a/awx/ui_next/src/screens/Inventory/InventorySources/InventorySourceList.jsx +++ b/awx/ui_next/src/screens/Inventory/InventorySources/InventorySourceList.jsx @@ -2,17 +2,17 @@ import React, { useCallback, useEffect } from 'react'; import { useParams, useLocation } from 'react-router-dom'; import { withI18n } from '@lingui/react'; import { t } from '@lingui/macro'; -import useRequest, { useDeleteItems } from '@util/useRequest'; -import { getQSConfig, parseQueryString } from '@util/qs'; -import { InventoriesAPI, InventorySourcesAPI } from '@api'; +import useRequest, { useDeleteItems } from '../../../util/useRequest'; +import { getQSConfig, parseQueryString } from '../../../util/qs'; +import { InventoriesAPI, InventorySourcesAPI } from '../../../api'; import PaginatedDataList, { ToolbarAddButton, ToolbarDeleteButton, -} from '@components/PaginatedDataList'; -import useSelected from '@util/useSelected'; -import DatalistToolbar from '@components/DataListToolbar'; -import AlertModal from '@components/AlertModal/AlertModal'; -import ErrorDetail from '@components/ErrorDetail/ErrorDetail'; +} from '../../../components/PaginatedDataList'; +import useSelected from '../../../util/useSelected'; +import DatalistToolbar from '../../../components/DataListToolbar'; +import AlertModal from '../../../components/AlertModal/AlertModal'; +import ErrorDetail from '../../../components/ErrorDetail/ErrorDetail'; import InventorySourceListItem from './InventorySourceListItem'; const QS_CONFIG = getQSConfig('inventory', { diff --git a/awx/ui_next/src/screens/Inventory/InventorySources/InventorySourceList.test.jsx b/awx/ui_next/src/screens/Inventory/InventorySources/InventorySourceList.test.jsx index c253f4b83f..f7c98695bb 100644 --- a/awx/ui_next/src/screens/Inventory/InventorySources/InventorySourceList.test.jsx +++ b/awx/ui_next/src/screens/Inventory/InventorySources/InventorySourceList.test.jsx @@ -1,14 +1,17 @@ import React from 'react'; import { Route } from 'react-router-dom'; import { createMemoryHistory } from 'history'; -import { InventoriesAPI, InventorySourcesAPI } from '@api'; import { act } from 'react-dom/test-utils'; -import { mountWithContexts, waitForElement } from '@testUtils/enzymeHelpers'; +import { InventoriesAPI, InventorySourcesAPI } from '../../../api'; +import { + mountWithContexts, + waitForElement, +} from '../../../../testUtils/enzymeHelpers'; import InventorySourceList from './InventorySourceList'; -jest.mock('@api/models/InventorySources'); -jest.mock('@api/models/Inventories'); -jest.mock('@api/models/InventoryUpdates'); +jest.mock('../../../api/models/InventorySources'); +jest.mock('../../../api/models/Inventories'); +jest.mock('../../../api/models/InventoryUpdates'); describe('', () => { let wrapper; diff --git a/awx/ui_next/src/screens/Inventory/InventorySources/InventorySourceListItem.jsx b/awx/ui_next/src/screens/Inventory/InventorySources/InventorySourceListItem.jsx index 4437daf67d..4af6cf0c97 100644 --- a/awx/ui_next/src/screens/Inventory/InventorySources/InventorySourceListItem.jsx +++ b/awx/ui_next/src/screens/Inventory/InventorySources/InventorySourceListItem.jsx @@ -13,7 +13,7 @@ import { Tooltip, } from '@patternfly/react-core'; import { PencilAltIcon } from '@patternfly/react-icons'; -import StatusIcon from '@components/StatusIcon'; +import StatusIcon from '../../../components/StatusIcon'; import InventorySourceSyncButton from './InventorySourceSyncButton'; diff --git a/awx/ui_next/src/screens/Inventory/InventorySources/InventorySourceListItem.test.jsx b/awx/ui_next/src/screens/Inventory/InventorySources/InventorySourceListItem.test.jsx index 86b4a48d2e..8a3787f4b9 100644 --- a/awx/ui_next/src/screens/Inventory/InventorySources/InventorySourceListItem.test.jsx +++ b/awx/ui_next/src/screens/Inventory/InventorySources/InventorySourceListItem.test.jsx @@ -1,5 +1,5 @@ import React from 'react'; -import { mountWithContexts } from '@testUtils/enzymeHelpers'; +import { mountWithContexts } from '../../../../testUtils/enzymeHelpers'; import InventorySourceListItem from './InventorySourceListItem'; const source = { diff --git a/awx/ui_next/src/screens/Inventory/InventorySources/InventorySourceSyncButton.jsx b/awx/ui_next/src/screens/Inventory/InventorySources/InventorySourceSyncButton.jsx index 801f8c170a..54f6f633e6 100644 --- a/awx/ui_next/src/screens/Inventory/InventorySources/InventorySourceSyncButton.jsx +++ b/awx/ui_next/src/screens/Inventory/InventorySources/InventorySourceSyncButton.jsx @@ -4,10 +4,10 @@ import { t } from '@lingui/macro'; import PropTypes from 'prop-types'; import { Button, Tooltip } from '@patternfly/react-core'; import { SyncIcon, MinusCircleIcon } from '@patternfly/react-icons'; -import useRequest, { useDismissableError } from '@util/useRequest'; -import AlertModal from '@components/AlertModal/AlertModal'; -import ErrorDetail from '@components/ErrorDetail/ErrorDetail'; -import { InventoryUpdatesAPI, InventorySourcesAPI } from '@api'; +import useRequest, { useDismissableError } from '../../../util/useRequest'; +import AlertModal from '../../../components/AlertModal/AlertModal'; +import ErrorDetail from '../../../components/ErrorDetail/ErrorDetail'; +import { InventoryUpdatesAPI, InventorySourcesAPI } from '../../../api'; function InventorySourceSyncButton({ onSyncLoading, source, i18n }) { const [updateStatus, setUpdateStatus] = useState(source.status); diff --git a/awx/ui_next/src/screens/Inventory/InventorySources/InventorySourceSyncButton.test.jsx b/awx/ui_next/src/screens/Inventory/InventorySources/InventorySourceSyncButton.test.jsx index f31a300089..6cce81c3e0 100644 --- a/awx/ui_next/src/screens/Inventory/InventorySources/InventorySourceSyncButton.test.jsx +++ b/awx/ui_next/src/screens/Inventory/InventorySources/InventorySourceSyncButton.test.jsx @@ -1,11 +1,11 @@ import React from 'react'; -import { InventoryUpdatesAPI, InventorySourcesAPI } from '@api'; import { act } from 'react-dom/test-utils'; -import { mountWithContexts } from '@testUtils/enzymeHelpers'; +import { InventoryUpdatesAPI, InventorySourcesAPI } from '../../../api'; +import { mountWithContexts } from '../../../../testUtils/enzymeHelpers'; import InventorySourceSyncButton from './InventorySourceSyncButton'; -jest.mock('@api/models/InventoryUpdates'); -jest.mock('@api/models/InventorySources'); +jest.mock('../../../api/models/InventoryUpdates'); +jest.mock('../../../api/models/InventorySources'); const source = { id: 1, name: 'Foo', source: 'Source Bar' }; const onSyncLoading = jest.fn(); diff --git a/awx/ui_next/src/screens/Inventory/SmartInventory.jsx b/awx/ui_next/src/screens/Inventory/SmartInventory.jsx index e37cd1c4d6..29e503faa9 100644 --- a/awx/ui_next/src/screens/Inventory/SmartInventory.jsx +++ b/awx/ui_next/src/screens/Inventory/SmartInventory.jsx @@ -3,15 +3,15 @@ import { t } from '@lingui/macro'; import { withI18n } from '@lingui/react'; import { Card, CardActions, PageSection } from '@patternfly/react-core'; import { Switch, Route, Redirect, withRouter, Link } from 'react-router-dom'; -import { TabbedCardHeader } from '@components/Card'; -import CardCloseButton from '@components/CardCloseButton'; -import ContentError from '@components/ContentError'; -import JobList from '@components/JobList'; -import RoutedTabs from '@components/RoutedTabs'; -import { ResourceAccessList } from '@components/ResourceAccessList'; +import { TabbedCardHeader } from '../../components/Card'; +import CardCloseButton from '../../components/CardCloseButton'; +import ContentError from '../../components/ContentError'; +import JobList from '../../components/JobList'; +import RoutedTabs from '../../components/RoutedTabs'; +import { ResourceAccessList } from '../../components/ResourceAccessList'; import SmartInventoryDetail from './SmartInventoryDetail'; import SmartInventoryHosts from './SmartInventoryHosts'; -import { InventoriesAPI } from '@api'; +import { InventoriesAPI } from '../../api'; import SmartInventoryEdit from './SmartInventoryEdit'; class SmartInventory extends Component { diff --git a/awx/ui_next/src/screens/Inventory/SmartInventory.test.jsx b/awx/ui_next/src/screens/Inventory/SmartInventory.test.jsx index 33a4035b3c..6483543fd7 100644 --- a/awx/ui_next/src/screens/Inventory/SmartInventory.test.jsx +++ b/awx/ui_next/src/screens/Inventory/SmartInventory.test.jsx @@ -1,11 +1,14 @@ import React from 'react'; import { createMemoryHistory } from 'history'; -import { InventoriesAPI } from '@api'; -import { mountWithContexts, waitForElement } from '@testUtils/enzymeHelpers'; +import { InventoriesAPI } from '../../api'; +import { + mountWithContexts, + waitForElement, +} from '../../../testUtils/enzymeHelpers'; import mockSmartInventory from './shared/data.smart_inventory.json'; import SmartInventory from './SmartInventory'; -jest.mock('@api'); +jest.mock('../../api'); InventoriesAPI.readDetail.mockResolvedValue({ data: mockSmartInventory, diff --git a/awx/ui_next/src/screens/Inventory/SmartInventoryDetail/SmartInventoryDetail.jsx b/awx/ui_next/src/screens/Inventory/SmartInventoryDetail/SmartInventoryDetail.jsx index b661ea6f17..be767f9746 100644 --- a/awx/ui_next/src/screens/Inventory/SmartInventoryDetail/SmartInventoryDetail.jsx +++ b/awx/ui_next/src/screens/Inventory/SmartInventoryDetail/SmartInventoryDetail.jsx @@ -1,5 +1,5 @@ import React, { Component } from 'react'; -import { CardBody } from '@components/Card'; +import { CardBody } from '../../../components/Card'; class SmartInventoryDetail extends Component { render() { diff --git a/awx/ui_next/src/screens/Inventory/SmartInventoryHosts/SmartInventoryHosts.jsx b/awx/ui_next/src/screens/Inventory/SmartInventoryHosts/SmartInventoryHosts.jsx index dc5b46deb5..608e664e95 100644 --- a/awx/ui_next/src/screens/Inventory/SmartInventoryHosts/SmartInventoryHosts.jsx +++ b/awx/ui_next/src/screens/Inventory/SmartInventoryHosts/SmartInventoryHosts.jsx @@ -1,5 +1,5 @@ import React, { Component } from 'react'; -import { CardBody } from '@components/Card'; +import { CardBody } from '../../../components/Card'; class SmartInventoryHosts extends Component { render() { diff --git a/awx/ui_next/src/screens/Inventory/shared/InventoryForm.jsx b/awx/ui_next/src/screens/Inventory/shared/InventoryForm.jsx index dca8b78102..f0d779afaa 100644 --- a/awx/ui_next/src/screens/Inventory/shared/InventoryForm.jsx +++ b/awx/ui_next/src/screens/Inventory/shared/InventoryForm.jsx @@ -4,15 +4,18 @@ import { withI18n } from '@lingui/react'; import { t } from '@lingui/macro'; import { func, number, shape } from 'prop-types'; -import { VariablesField } from '@components/CodeMirrorInput'; import { Form } from '@patternfly/react-core'; -import FormField, { FormSubmitError } from '@components/FormField'; -import FormActionGroup from '@components/FormActionGroup'; -import { required } from '@util/validators'; -import InstanceGroupsLookup from '@components/Lookup/InstanceGroupsLookup'; -import OrganizationLookup from '@components/Lookup/OrganizationLookup'; -import CredentialLookup from '@components/Lookup/CredentialLookup'; -import { FormColumnLayout, FormFullWidthLayout } from '@components/FormLayout'; +import { VariablesField } from '../../../components/CodeMirrorInput'; +import FormField, { FormSubmitError } from '../../../components/FormField'; +import FormActionGroup from '../../../components/FormActionGroup'; +import { required } from '../../../util/validators'; +import InstanceGroupsLookup from '../../../components/Lookup/InstanceGroupsLookup'; +import OrganizationLookup from '../../../components/Lookup/OrganizationLookup'; +import CredentialLookup from '../../../components/Lookup/CredentialLookup'; +import { + FormColumnLayout, + FormFullWidthLayout, +} from '../../../components/FormLayout'; function InventoryFormFields({ i18n, credentialTypeId }) { const [organizationField, organizationMeta, organizationHelpers] = useField({ diff --git a/awx/ui_next/src/screens/Inventory/shared/InventoryForm.test.jsx b/awx/ui_next/src/screens/Inventory/shared/InventoryForm.test.jsx index 1cc056d5a4..580ebb79a6 100644 --- a/awx/ui_next/src/screens/Inventory/shared/InventoryForm.test.jsx +++ b/awx/ui_next/src/screens/Inventory/shared/InventoryForm.test.jsx @@ -1,10 +1,10 @@ import React from 'react'; import { act } from 'react-dom/test-utils'; -import { mountWithContexts, waitForElement } from '@testUtils/enzymeHelpers'; +import { mountWithContexts, waitForElement } from '../../../../testUtils/enzymeHelpers'; import InventoryForm from './InventoryForm'; -jest.mock('@api'); +jest.mock('../../../api'); const inventory = { id: 1, diff --git a/awx/ui_next/src/screens/Inventory/shared/InventoryGroupForm.jsx b/awx/ui_next/src/screens/Inventory/shared/InventoryGroupForm.jsx index 92859b0162..495cf415f2 100644 --- a/awx/ui_next/src/screens/Inventory/shared/InventoryGroupForm.jsx +++ b/awx/ui_next/src/screens/Inventory/shared/InventoryGroupForm.jsx @@ -4,12 +4,15 @@ import { Formik } from 'formik'; import { Form, Card } from '@patternfly/react-core'; import { t } from '@lingui/macro'; -import { CardBody } from '@components/Card'; -import FormField from '@components/FormField'; -import FormActionGroup from '@components/FormActionGroup/FormActionGroup'; -import { VariablesField } from '@components/CodeMirrorInput'; -import { required } from '@util/validators'; -import { FormColumnLayout, FormFullWidthLayout } from '@components/FormLayout'; +import { CardBody } from '../../../components/Card'; +import FormField from '../../../components/FormField'; +import FormActionGroup from '../../../components/FormActionGroup/FormActionGroup'; +import { VariablesField } from '../../../components/CodeMirrorInput'; +import { required } from '../../../util/validators'; +import { + FormColumnLayout, + FormFullWidthLayout, +} from '../../../components/FormLayout'; function InventoryGroupForm({ i18n, diff --git a/awx/ui_next/src/screens/Inventory/shared/InventoryGroupForm.test.jsx b/awx/ui_next/src/screens/Inventory/shared/InventoryGroupForm.test.jsx index ebf459f76f..a44b594af6 100644 --- a/awx/ui_next/src/screens/Inventory/shared/InventoryGroupForm.test.jsx +++ b/awx/ui_next/src/screens/Inventory/shared/InventoryGroupForm.test.jsx @@ -1,5 +1,5 @@ import React from 'react'; -import { mountWithContexts } from '@testUtils/enzymeHelpers'; +import { mountWithContexts } from '../../../../testUtils/enzymeHelpers'; import InventoryGroupForm from './InventoryGroupForm'; const group = { diff --git a/awx/ui_next/src/screens/Inventory/shared/InventoryGroupsDeleteModal.jsx b/awx/ui_next/src/screens/Inventory/shared/InventoryGroupsDeleteModal.jsx index 5ce7f635c4..6896628360 100644 --- a/awx/ui_next/src/screens/Inventory/shared/InventoryGroupsDeleteModal.jsx +++ b/awx/ui_next/src/screens/Inventory/shared/InventoryGroupsDeleteModal.jsx @@ -1,11 +1,11 @@ import React, { useState } from 'react'; import ReactDOM from 'react-dom'; import { func, bool, arrayOf, object } from 'prop-types'; -import AlertModal from '@components/AlertModal'; import { withI18n } from '@lingui/react'; import { t } from '@lingui/macro'; import { Button, Radio } from '@patternfly/react-core'; import styled from 'styled-components'; +import AlertModal from '../../../components/AlertModal'; const ListItem = styled.li` display: flex; diff --git a/awx/ui_next/src/screens/Inventory/shared/InventorySourceForm.jsx b/awx/ui_next/src/screens/Inventory/shared/InventorySourceForm.jsx index 3e76f1b223..53f51a8f05 100644 --- a/awx/ui_next/src/screens/Inventory/shared/InventorySourceForm.jsx +++ b/awx/ui_next/src/screens/Inventory/shared/InventorySourceForm.jsx @@ -3,21 +3,24 @@ import { Formik, useField, useFormikContext } from 'formik'; import { func, shape } from 'prop-types'; import { withI18n } from '@lingui/react'; import { t } from '@lingui/macro'; -import { InventorySourcesAPI } from '@api'; -import { ConfigContext } from '@contexts/Config'; -import useRequest from '@util/useRequest'; -import { required } from '@util/validators'; - import { Form, FormGroup, Title } from '@patternfly/react-core'; -import AnsibleSelect from '@components/AnsibleSelect'; -import ContentError from '@components/ContentError'; -import ContentLoading from '@components/ContentLoading'; -import FormActionGroup from '@components/FormActionGroup/FormActionGroup'; +import { InventorySourcesAPI } from '../../../api'; +import { ConfigContext } from '../../../contexts/Config'; +import useRequest from '../../../util/useRequest'; +import { required } from '../../../util/validators'; + +import AnsibleSelect from '../../../components/AnsibleSelect'; +import ContentError from '../../../components/ContentError'; +import ContentLoading from '../../../components/ContentLoading'; +import FormActionGroup from '../../../components/FormActionGroup/FormActionGroup'; import FormField, { FieldTooltip, FormSubmitError, -} from '@components/FormField'; -import { FormColumnLayout, SubFormLayout } from '@components/FormLayout'; +} from '../../../components/FormField'; +import { + FormColumnLayout, + SubFormLayout, +} from '../../../components/FormLayout'; import SCMSubForm from './InventorySourceSubForms'; diff --git a/awx/ui_next/src/screens/Inventory/shared/InventorySourceForm.test.jsx b/awx/ui_next/src/screens/Inventory/shared/InventorySourceForm.test.jsx index d79cf457c9..2eb183f441 100644 --- a/awx/ui_next/src/screens/Inventory/shared/InventorySourceForm.test.jsx +++ b/awx/ui_next/src/screens/Inventory/shared/InventorySourceForm.test.jsx @@ -1,12 +1,15 @@ import React from 'react'; import { act } from 'react-dom/test-utils'; -import { mountWithContexts, waitForElement } from '@testUtils/enzymeHelpers'; +import { + mountWithContexts, + waitForElement, +} from '../../../../testUtils/enzymeHelpers'; import InventorySourceForm from './InventorySourceForm'; -import { InventorySourcesAPI, ProjectsAPI, CredentialsAPI } from '@api'; +import { InventorySourcesAPI, ProjectsAPI, CredentialsAPI } from '../../../api'; -jest.mock('@api/models/Credentials'); -jest.mock('@api/models/InventorySources'); -jest.mock('@api/models/Projects'); +jest.mock('../../../api/models/Credentials'); +jest.mock('../../../api/models/InventorySources'); +jest.mock('../../../api/models/Projects'); describe('', () => { let wrapper; diff --git a/awx/ui_next/src/screens/Inventory/shared/InventorySourceSubForms/SCMSubForm.jsx b/awx/ui_next/src/screens/Inventory/shared/InventorySourceSubForms/SCMSubForm.jsx index dbc36f19ca..c65036f8ae 100644 --- a/awx/ui_next/src/screens/Inventory/shared/InventorySourceSubForms/SCMSubForm.jsx +++ b/awx/ui_next/src/screens/Inventory/shared/InventorySourceSubForms/SCMSubForm.jsx @@ -2,15 +2,15 @@ import React, { useCallback } from 'react'; import { useField } from 'formik'; import { withI18n } from '@lingui/react'; import { t } from '@lingui/macro'; -import { ProjectsAPI } from '@api'; -import useRequest from '@util/useRequest'; -import { required } from '@util/validators'; - import { FormGroup } from '@patternfly/react-core'; -import AnsibleSelect from '@components/AnsibleSelect'; -import { FieldTooltip } from '@components/FormField'; -import CredentialLookup from '@components/Lookup/CredentialLookup'; -import ProjectLookup from '@components/Lookup/ProjectLookup'; +import { ProjectsAPI } from '../../../../api'; +import useRequest from '../../../../util/useRequest'; +import { required } from '../../../../util/validators'; + +import AnsibleSelect from '../../../../components/AnsibleSelect'; +import { FieldTooltip } from '../../../../components/FormField'; +import CredentialLookup from '../../../../components/Lookup/CredentialLookup'; +import ProjectLookup from '../../../../components/Lookup/ProjectLookup'; import { VerbosityField, OptionsField, SourceVarsField } from './SharedFields'; const SCMSubForm = ({ i18n }) => { diff --git a/awx/ui_next/src/screens/Inventory/shared/InventorySourceSubForms/SCMSubForm.test.jsx b/awx/ui_next/src/screens/Inventory/shared/InventorySourceSubForms/SCMSubForm.test.jsx index 78ec81ad55..4e9f541a9b 100644 --- a/awx/ui_next/src/screens/Inventory/shared/InventorySourceSubForms/SCMSubForm.test.jsx +++ b/awx/ui_next/src/screens/Inventory/shared/InventorySourceSubForms/SCMSubForm.test.jsx @@ -1,12 +1,12 @@ import React from 'react'; import { act } from 'react-dom/test-utils'; -import { mountWithContexts } from '@testUtils/enzymeHelpers'; import { Formik } from 'formik'; +import { mountWithContexts } from '../../../../../testUtils/enzymeHelpers'; import SCMSubForm from './SCMSubForm'; -import { ProjectsAPI, CredentialsAPI } from '@api'; +import { ProjectsAPI, CredentialsAPI } from '../../../../api'; -jest.mock('@api/models/Projects'); -jest.mock('@api/models/Credentials'); +jest.mock('../../../../api/models/Projects'); +jest.mock('../../../../api/models/Credentials'); const initialValues = { credential: null, diff --git a/awx/ui_next/src/screens/Inventory/shared/InventorySourceSubForms/SharedFields.jsx b/awx/ui_next/src/screens/Inventory/shared/InventorySourceSubForms/SharedFields.jsx index 92d0933073..b4b6d05f5b 100644 --- a/awx/ui_next/src/screens/Inventory/shared/InventorySourceSubForms/SharedFields.jsx +++ b/awx/ui_next/src/screens/Inventory/shared/InventorySourceSubForms/SharedFields.jsx @@ -2,15 +2,18 @@ import React, { useEffect } from 'react'; import { withI18n } from '@lingui/react'; import { t } from '@lingui/macro'; import { useField } from 'formik'; -import { minMaxValue } from '@util/validators'; import { FormGroup } from '@patternfly/react-core'; -import AnsibleSelect from '@components/AnsibleSelect'; -import { VariablesField } from '@components/CodeMirrorInput'; -import FormField, { CheckboxField, FieldTooltip } from '@components/FormField'; +import { minMaxValue } from '../../../../util/validators'; +import AnsibleSelect from '../../../../components/AnsibleSelect'; +import { VariablesField } from '../../../../components/CodeMirrorInput'; +import FormField, { + CheckboxField, + FieldTooltip, +} from '../../../../components/FormField'; import { FormFullWidthLayout, FormCheckboxLayout, -} from '@components/FormLayout'; +} from '../../../../components/FormLayout'; export const SourceVarsField = withI18n()(({ i18n }) => ( diff --git a/awx/ui_next/src/screens/InventoryScript/InventoryScripts.test.jsx b/awx/ui_next/src/screens/InventoryScript/InventoryScripts.test.jsx index c91c21fff2..2c981361bb 100644 --- a/awx/ui_next/src/screens/InventoryScript/InventoryScripts.test.jsx +++ b/awx/ui_next/src/screens/InventoryScript/InventoryScripts.test.jsx @@ -1,6 +1,6 @@ import React from 'react'; -import { mountWithContexts } from '@testUtils/enzymeHelpers'; +import { mountWithContexts } from '../../../testUtils/enzymeHelpers'; import InventoryScripts from './InventoryScripts'; diff --git a/awx/ui_next/src/screens/Job/Job.jsx b/awx/ui_next/src/screens/Job/Job.jsx index e945b284c8..624f7443ff 100644 --- a/awx/ui_next/src/screens/Job/Job.jsx +++ b/awx/ui_next/src/screens/Job/Job.jsx @@ -3,17 +3,17 @@ import { Route, withRouter, Switch, Redirect, Link } from 'react-router-dom'; import { withI18n } from '@lingui/react'; import { t } from '@lingui/macro'; import { Card, CardActions, PageSection } from '@patternfly/react-core'; -import { JobsAPI } from '@api'; -import { TabbedCardHeader } from '@components/Card'; -import ContentError from '@components/ContentError'; -import CardCloseButton from '@components/CardCloseButton'; -import RoutedTabs from '@components/RoutedTabs'; +import { JobsAPI } from '../../api'; +import { TabbedCardHeader } from '../../components/Card'; +import ContentError from '../../components/ContentError'; +import CardCloseButton from '../../components/CardCloseButton'; +import RoutedTabs from '../../components/RoutedTabs'; import JobDetail from './JobDetail'; import JobOutput from './JobOutput'; import WorkflowDetail from './WorkflowDetail'; import { WorkflowOutput } from './WorkflowOutput'; -import { JOB_TYPE_URL_SEGMENTS } from '@constants'; +import { JOB_TYPE_URL_SEGMENTS } from '../../constants'; class Job extends Component { constructor(props) { diff --git a/awx/ui_next/src/screens/Job/Job.test.jsx b/awx/ui_next/src/screens/Job/Job.test.jsx index 8da74a8e03..7b902984f0 100644 --- a/awx/ui_next/src/screens/Job/Job.test.jsx +++ b/awx/ui_next/src/screens/Job/Job.test.jsx @@ -1,6 +1,6 @@ import React from 'react'; -import { mountWithContexts } from '@testUtils/enzymeHelpers'; +import { mountWithContexts } from '../../../testUtils/enzymeHelpers'; import Job from './Jobs'; diff --git a/awx/ui_next/src/screens/Job/JobDetail/JobDetail.jsx b/awx/ui_next/src/screens/Job/JobDetail/JobDetail.jsx index 7a0d06618e..5db2ce70e0 100644 --- a/awx/ui_next/src/screens/Job/JobDetail/JobDetail.jsx +++ b/awx/ui_next/src/screens/Job/JobDetail/JobDetail.jsx @@ -5,19 +5,19 @@ import { t } from '@lingui/macro'; import { Button, Chip } from '@patternfly/react-core'; import styled from 'styled-components'; -import AlertModal from '@components/AlertModal'; -import { DetailList, Detail } from '@components/DetailList'; -import { CardBody, CardActionsRow } from '@components/Card'; -import ChipGroup from '@components/ChipGroup'; -import CredentialChip from '@components/CredentialChip'; -import { VariablesInput as _VariablesInput } from '@components/CodeMirrorInput'; -import DeleteButton from '@components/DeleteButton'; -import ErrorDetail from '@components/ErrorDetail'; -import LaunchButton from '@components/LaunchButton'; -import StatusIcon from '@components/StatusIcon'; -import { toTitleCase } from '@util/strings'; -import { formatDateString } from '@util/dates'; -import { Job } from '@types'; +import AlertModal from '../../../components/AlertModal'; +import { DetailList, Detail } from '../../../components/DetailList'; +import { CardBody, CardActionsRow } from '../../../components/Card'; +import ChipGroup from '../../../components/ChipGroup'; +import CredentialChip from '../../../components/CredentialChip'; +import { VariablesInput as _VariablesInput } from '../../../components/CodeMirrorInput'; +import DeleteButton from '../../../components/DeleteButton'; +import ErrorDetail from '../../../components/ErrorDetail'; +import LaunchButton from '../../../components/LaunchButton'; +import StatusIcon from '../../../components/StatusIcon'; +import { toTitleCase } from '../../../util/strings'; +import { formatDateString } from '../../../util/dates'; +import { Job } from '../../../types'; import { JobsAPI, ProjectUpdatesAPI, @@ -25,7 +25,7 @@ import { WorkflowJobsAPI, InventoriesAPI, AdHocCommandsAPI, -} from '@api'; +} from '../../../api'; const VariablesInput = styled(_VariablesInput)` .pf-c-form__label { diff --git a/awx/ui_next/src/screens/Job/JobDetail/JobDetail.test.jsx b/awx/ui_next/src/screens/Job/JobDetail/JobDetail.test.jsx index 239ea21a28..a27434900f 100644 --- a/awx/ui_next/src/screens/Job/JobDetail/JobDetail.test.jsx +++ b/awx/ui_next/src/screens/Job/JobDetail/JobDetail.test.jsx @@ -1,12 +1,12 @@ import React from 'react'; import { act } from 'react-dom/test-utils'; -import { mountWithContexts } from '@testUtils/enzymeHelpers'; -import { sleep } from '@testUtils/testUtils'; +import { mountWithContexts } from '../../../../testUtils/enzymeHelpers'; +import { sleep } from '../../../../testUtils/testUtils'; import JobDetail from './JobDetail'; -import { JobsAPI, ProjectUpdatesAPI } from '@api'; +import { JobsAPI, ProjectUpdatesAPI } from '../../../api'; import mockJobData from '../shared/data.job.json'; -jest.mock('@api'); +jest.mock('../../../api'); describe('', () => { let wrapper; diff --git a/awx/ui_next/src/screens/Job/JobOutput/HostEventModal.jsx b/awx/ui_next/src/screens/Job/JobOutput/HostEventModal.jsx index 1d5a10012a..baa9fe3e86 100644 --- a/awx/ui_next/src/screens/Job/JobOutput/HostEventModal.jsx +++ b/awx/ui_next/src/screens/Job/JobOutput/HostEventModal.jsx @@ -1,14 +1,14 @@ import React, { useEffect, useState } from 'react'; import { Modal as PFModal, Tab, Tabs as PFTabs } from '@patternfly/react-core'; -import CodeMirrorInput from '@components/CodeMirrorInput'; -import ContentEmpty from '@components/ContentEmpty'; import PropTypes from 'prop-types'; -import { DetailList, Detail } from '@components/DetailList'; -import StatusIcon from '@components/StatusIcon'; import { withI18n } from '@lingui/react'; import { t } from '@lingui/macro'; import styled from 'styled-components'; import Entities from 'html-entities'; +import StatusIcon from '../../../components/StatusIcon'; +import { DetailList, Detail } from '../../../components/DetailList'; +import ContentEmpty from '../../../components/ContentEmpty'; +import CodeMirrorInput from '../../../components/CodeMirrorInput'; const entities = new Entities.AllHtmlEntities(); diff --git a/awx/ui_next/src/screens/Job/JobOutput/HostEventModal.test.jsx b/awx/ui_next/src/screens/Job/JobOutput/HostEventModal.test.jsx index c4bbc72c40..8706189a04 100644 --- a/awx/ui_next/src/screens/Job/JobOutput/HostEventModal.test.jsx +++ b/awx/ui_next/src/screens/Job/JobOutput/HostEventModal.test.jsx @@ -1,5 +1,5 @@ import React from 'react'; -import { mountWithContexts } from '@testUtils/enzymeHelpers'; +import { mountWithContexts } from '../../../../testUtils/enzymeHelpers'; import HostEventModal from './HostEventModal'; const hostEvent = { diff --git a/awx/ui_next/src/screens/Job/JobOutput/JobEvent.test.jsx b/awx/ui_next/src/screens/Job/JobOutput/JobEvent.test.jsx index 21de9847e2..baceb1c6f4 100644 --- a/awx/ui_next/src/screens/Job/JobOutput/JobEvent.test.jsx +++ b/awx/ui_next/src/screens/Job/JobOutput/JobEvent.test.jsx @@ -1,5 +1,5 @@ import React from 'react'; -import { mountWithContexts } from '@testUtils/enzymeHelpers'; +import { mountWithContexts } from '../../../../testUtils/enzymeHelpers'; import JobEvent from './JobEvent'; diff --git a/awx/ui_next/src/screens/Job/JobOutput/JobEventSkeleton.test.jsx b/awx/ui_next/src/screens/Job/JobOutput/JobEventSkeleton.test.jsx index acf17ed168..b4a069e037 100644 --- a/awx/ui_next/src/screens/Job/JobOutput/JobEventSkeleton.test.jsx +++ b/awx/ui_next/src/screens/Job/JobOutput/JobEventSkeleton.test.jsx @@ -1,5 +1,5 @@ import React from 'react'; -import { mountWithContexts } from '@testUtils/enzymeHelpers'; +import { mountWithContexts } from '../../../../testUtils/enzymeHelpers'; import JobEventSkeleton from './JobEventSkeleton'; diff --git a/awx/ui_next/src/screens/Job/JobOutput/JobOutput.jsx b/awx/ui_next/src/screens/Job/JobOutput/JobOutput.jsx index da850b6878..724fd845b2 100644 --- a/awx/ui_next/src/screens/Job/JobOutput/JobOutput.jsx +++ b/awx/ui_next/src/screens/Job/JobOutput/JobOutput.jsx @@ -11,12 +11,12 @@ import { List, } from 'react-virtualized'; -import AlertModal from '@components/AlertModal'; -import { CardBody } from '@components/Card'; -import ContentError from '@components/ContentError'; -import ContentLoading from '@components/ContentLoading'; -import ErrorDetail from '@components/ErrorDetail'; -import StatusIcon from '@components/StatusIcon'; +import AlertModal from '../../../components/AlertModal'; +import { CardBody } from '../../../components/Card'; +import ContentError from '../../../components/ContentError'; +import ContentLoading from '../../../components/ContentLoading'; +import ErrorDetail from '../../../components/ErrorDetail'; +import StatusIcon from '../../../components/StatusIcon'; import JobEvent from './JobEvent'; import JobEventSkeleton from './JobEventSkeleton'; @@ -30,7 +30,7 @@ import { WorkflowJobsAPI, InventoriesAPI, AdHocCommandsAPI, -} from '@api'; +} from '../../../api'; const HeaderTitle = styled.div` display: inline-flex; diff --git a/awx/ui_next/src/screens/Job/JobOutput/JobOutput.test.jsx b/awx/ui_next/src/screens/Job/JobOutput/JobOutput.test.jsx index 3e16411866..8771ce63ac 100644 --- a/awx/ui_next/src/screens/Job/JobOutput/JobOutput.test.jsx +++ b/awx/ui_next/src/screens/Job/JobOutput/JobOutput.test.jsx @@ -1,11 +1,14 @@ import React from 'react'; -import { mountWithContexts, waitForElement } from '@testUtils/enzymeHelpers'; +import { + mountWithContexts, + waitForElement, +} from '../../../../testUtils/enzymeHelpers'; import JobOutput, { _JobOutput } from './JobOutput'; -import { JobsAPI } from '@api'; +import { JobsAPI } from '../../../api'; import mockJobData from '../shared/data.job.json'; import mockJobEventsData from './data.job_events.json'; -jest.mock('@api'); +jest.mock('../../../api'); async function checkOutput(wrapper, expectedLines) { await waitForElement(wrapper, 'div[type="job_event"]', el => el.length > 1); diff --git a/awx/ui_next/src/screens/Job/JobOutput/PageControls.test.jsx b/awx/ui_next/src/screens/Job/JobOutput/PageControls.test.jsx index 86df76448f..ea83d2f9e9 100644 --- a/awx/ui_next/src/screens/Job/JobOutput/PageControls.test.jsx +++ b/awx/ui_next/src/screens/Job/JobOutput/PageControls.test.jsx @@ -1,5 +1,5 @@ import React from 'react'; -import { mountWithContexts } from '@testUtils/enzymeHelpers'; +import { mountWithContexts } from '../../../../testUtils/enzymeHelpers'; import PageControls from './PageControls'; let wrapper; diff --git a/awx/ui_next/src/screens/Job/JobOutput/shared/HostStatusBar.test.jsx b/awx/ui_next/src/screens/Job/JobOutput/shared/HostStatusBar.test.jsx index c1fae8c6a0..e97cb598f0 100644 --- a/awx/ui_next/src/screens/Job/JobOutput/shared/HostStatusBar.test.jsx +++ b/awx/ui_next/src/screens/Job/JobOutput/shared/HostStatusBar.test.jsx @@ -1,5 +1,5 @@ import React from 'react'; -import { mountWithContexts } from '@testUtils/enzymeHelpers'; +import { mountWithContexts } from '../../../../../testUtils/enzymeHelpers'; import { HostStatusBar } from '.'; describe('', () => { diff --git a/awx/ui_next/src/screens/Job/JobOutput/shared/OutputToolbar.jsx b/awx/ui_next/src/screens/Job/JobOutput/shared/OutputToolbar.jsx index c09728c5ae..d98d2f72b2 100644 --- a/awx/ui_next/src/screens/Job/JobOutput/shared/OutputToolbar.jsx +++ b/awx/ui_next/src/screens/Job/JobOutput/shared/OutputToolbar.jsx @@ -9,8 +9,8 @@ import { TrashAltIcon, } from '@patternfly/react-icons'; import { Badge as PFBadge, Button, Tooltip } from '@patternfly/react-core'; -import DeleteButton from '@components/DeleteButton'; -import LaunchButton from '@components/LaunchButton'; +import DeleteButton from '../../../../components/DeleteButton'; +import LaunchButton from '../../../../components/LaunchButton'; const BadgeGroup = styled.div` margin-left: 20px; diff --git a/awx/ui_next/src/screens/Job/JobOutput/shared/OutputToolbar.test.jsx b/awx/ui_next/src/screens/Job/JobOutput/shared/OutputToolbar.test.jsx index 49b9c62678..d5a246b82a 100644 --- a/awx/ui_next/src/screens/Job/JobOutput/shared/OutputToolbar.test.jsx +++ b/awx/ui_next/src/screens/Job/JobOutput/shared/OutputToolbar.test.jsx @@ -1,5 +1,5 @@ import React from 'react'; -import { mountWithContexts } from '@testUtils/enzymeHelpers'; +import { mountWithContexts } from '../../../../../testUtils/enzymeHelpers'; import { OutputToolbar } from '.'; import mockJobData from '../../shared/data.job.json'; diff --git a/awx/ui_next/src/screens/Job/JobTypeRedirect.jsx b/awx/ui_next/src/screens/Job/JobTypeRedirect.jsx index aeb8ee6efe..57f39730c4 100644 --- a/awx/ui_next/src/screens/Job/JobTypeRedirect.jsx +++ b/awx/ui_next/src/screens/Job/JobTypeRedirect.jsx @@ -2,9 +2,9 @@ import React, { Component } from 'react'; import { Redirect, Link } from 'react-router-dom'; import { PageSection, Card } from '@patternfly/react-core'; import { withI18n } from '@lingui/react'; -import { UnifiedJobsAPI } from '@api'; -import ContentError from '@components/ContentError'; -import { JOB_TYPE_URL_SEGMENTS } from '@constants'; +import { UnifiedJobsAPI } from '../../api'; +import ContentError from '../../components/ContentError'; +import { JOB_TYPE_URL_SEGMENTS } from '../../constants'; const NOT_FOUND = 'not found'; diff --git a/awx/ui_next/src/screens/Job/Jobs.jsx b/awx/ui_next/src/screens/Job/Jobs.jsx index 92b19802b4..98890ccd12 100644 --- a/awx/ui_next/src/screens/Job/Jobs.jsx +++ b/awx/ui_next/src/screens/Job/Jobs.jsx @@ -10,11 +10,11 @@ import { import { withI18n } from '@lingui/react'; import { t } from '@lingui/macro'; import { PageSection } from '@patternfly/react-core'; -import Breadcrumbs from '@components/Breadcrumbs/Breadcrumbs'; +import Breadcrumbs from '../../components/Breadcrumbs/Breadcrumbs'; import Job from './Job'; import JobTypeRedirect from './JobTypeRedirect'; -import JobList from '@components/JobList'; -import { JOB_TYPE_URL_SEGMENTS } from '@constants'; +import JobList from '../../components/JobList'; +import { JOB_TYPE_URL_SEGMENTS } from '../../constants'; function Jobs({ i18n }) { const history = useHistory(); diff --git a/awx/ui_next/src/screens/Job/Jobs.test.jsx b/awx/ui_next/src/screens/Job/Jobs.test.jsx index 1b7dd8ddf3..5782335404 100644 --- a/awx/ui_next/src/screens/Job/Jobs.test.jsx +++ b/awx/ui_next/src/screens/Job/Jobs.test.jsx @@ -1,7 +1,7 @@ import React from 'react'; import { createMemoryHistory } from 'history'; -import { mountWithContexts } from '@testUtils/enzymeHelpers'; +import { mountWithContexts } from '../../../testUtils/enzymeHelpers'; import Jobs from './Jobs'; diff --git a/awx/ui_next/src/screens/Job/WorkflowOutput/WorkflowOutput.jsx b/awx/ui_next/src/screens/Job/WorkflowOutput/WorkflowOutput.jsx index b304348cb9..23a87207a6 100644 --- a/awx/ui_next/src/screens/Job/WorkflowOutput/WorkflowOutput.jsx +++ b/awx/ui_next/src/screens/Job/WorkflowOutput/WorkflowOutput.jsx @@ -6,14 +6,14 @@ import { CardBody as PFCardBody } from '@patternfly/react-core'; import { WorkflowDispatchContext, WorkflowStateContext, -} from '@contexts/Workflow'; -import { layoutGraph } from '@components/Workflow/WorkflowUtils'; -import ContentError from '@components/ContentError'; -import ContentLoading from '@components/ContentLoading'; +} from '../../../contexts/Workflow'; +import { layoutGraph } from '../../../components/Workflow/WorkflowUtils'; +import ContentError from '../../../components/ContentError'; +import ContentLoading from '../../../components/ContentLoading'; import workflowReducer, { initReducer, -} from '@components/Workflow/workflowReducer'; -import { WorkflowJobsAPI } from '@api'; +} from '../../../components/Workflow/workflowReducer'; +import { WorkflowJobsAPI } from '../../../api'; import WorkflowOutputGraph from './WorkflowOutputGraph'; import WorkflowOutputToolbar from './WorkflowOutputToolbar'; diff --git a/awx/ui_next/src/screens/Job/WorkflowOutput/WorkflowOutput.test.jsx b/awx/ui_next/src/screens/Job/WorkflowOutput/WorkflowOutput.test.jsx index 39bc048a6a..eaea9a2162 100644 --- a/awx/ui_next/src/screens/Job/WorkflowOutput/WorkflowOutput.test.jsx +++ b/awx/ui_next/src/screens/Job/WorkflowOutput/WorkflowOutput.test.jsx @@ -1,10 +1,10 @@ import React from 'react'; import { act } from 'react-dom/test-utils'; -import { mountWithContexts } from '@testUtils/enzymeHelpers'; -import { WorkflowJobsAPI } from '@api'; +import { mountWithContexts } from '../../../../testUtils/enzymeHelpers'; +import { WorkflowJobsAPI } from '../../../api'; import WorkflowOutput from './WorkflowOutput'; -jest.mock('@api'); +jest.mock('../../../api'); const job = { id: 1, diff --git a/awx/ui_next/src/screens/Job/WorkflowOutput/WorkflowOutputGraph.jsx b/awx/ui_next/src/screens/Job/WorkflowOutput/WorkflowOutputGraph.jsx index 40aca8f683..8f752131f1 100644 --- a/awx/ui_next/src/screens/Job/WorkflowOutput/WorkflowOutputGraph.jsx +++ b/awx/ui_next/src/screens/Job/WorkflowOutput/WorkflowOutputGraph.jsx @@ -1,14 +1,11 @@ import React, { useContext, useEffect, useRef, useState } from 'react'; -import { WorkflowStateContext } from '@contexts/Workflow'; import * as d3 from 'd3'; +import { WorkflowStateContext } from '../../../contexts/Workflow'; import { getScaleAndOffsetToFit, getTranslatePointsForZoom, -} from '@components/Workflow/WorkflowUtils'; -import { - WorkflowOutputLink, - WorkflowOutputNode, -} from '@screens/Job/WorkflowOutput'; +} from '../../../components/Workflow/WorkflowUtils'; +import { WorkflowOutputLink, WorkflowOutputNode } from '.'; import { WorkflowHelp, WorkflowLegend, @@ -16,7 +13,7 @@ import { WorkflowNodeHelp, WorkflowStartNode, WorkflowTools, -} from '@components/Workflow'; +} from '../../../components/Workflow'; function WorkflowOutputGraph() { const [linkHelp, setLinkHelp] = useState(); diff --git a/awx/ui_next/src/screens/Job/WorkflowOutput/WorkflowOutputGraph.test.jsx b/awx/ui_next/src/screens/Job/WorkflowOutput/WorkflowOutputGraph.test.jsx index 19e7e9a976..39de8a7c08 100644 --- a/awx/ui_next/src/screens/Job/WorkflowOutput/WorkflowOutputGraph.test.jsx +++ b/awx/ui_next/src/screens/Job/WorkflowOutput/WorkflowOutputGraph.test.jsx @@ -1,6 +1,6 @@ import React from 'react'; -import { mountWithContexts } from '@testUtils/enzymeHelpers'; -import { WorkflowStateContext } from '@contexts/Workflow'; +import { mountWithContexts } from '../../../../testUtils/enzymeHelpers'; +import { WorkflowStateContext } from '../../../contexts/Workflow'; import WorkflowOutputGraph from './WorkflowOutputGraph'; const workflowContext = { diff --git a/awx/ui_next/src/screens/Job/WorkflowOutput/WorkflowOutputLink.jsx b/awx/ui_next/src/screens/Job/WorkflowOutput/WorkflowOutputLink.jsx index b7ae3028dc..682b576ab6 100644 --- a/awx/ui_next/src/screens/Job/WorkflowOutput/WorkflowOutputLink.jsx +++ b/awx/ui_next/src/screens/Job/WorkflowOutput/WorkflowOutputLink.jsx @@ -1,11 +1,11 @@ import React, { useContext, useEffect, useRef, useState } from 'react'; -import { WorkflowStateContext } from '@contexts/Workflow'; import { func, shape } from 'prop-types'; +import { WorkflowStateContext } from '../../../contexts/Workflow'; import { generateLine, getLinePoints, getLinkOverlayPoints, -} from '@components/Workflow/WorkflowUtils'; +} from '../../../components/Workflow/WorkflowUtils'; function WorkflowOutputLink({ link, mouseEnter, mouseLeave }) { const ref = useRef(null); diff --git a/awx/ui_next/src/screens/Job/WorkflowOutput/WorkflowOutputLink.test.jsx b/awx/ui_next/src/screens/Job/WorkflowOutput/WorkflowOutputLink.test.jsx index 1fe47c070e..23ed083c29 100644 --- a/awx/ui_next/src/screens/Job/WorkflowOutput/WorkflowOutputLink.test.jsx +++ b/awx/ui_next/src/screens/Job/WorkflowOutput/WorkflowOutputLink.test.jsx @@ -1,6 +1,6 @@ import React from 'react'; import { mount } from 'enzyme'; -import { WorkflowStateContext } from '@contexts/Workflow'; +import { WorkflowStateContext } from '../../../contexts/Workflow'; import WorkflowOutputLink from './WorkflowOutputLink'; const link = { diff --git a/awx/ui_next/src/screens/Job/WorkflowOutput/WorkflowOutputNode.jsx b/awx/ui_next/src/screens/Job/WorkflowOutput/WorkflowOutputNode.jsx index a0d8fd361a..b8551e872e 100644 --- a/awx/ui_next/src/screens/Job/WorkflowOutput/WorkflowOutputNode.jsx +++ b/awx/ui_next/src/screens/Job/WorkflowOutput/WorkflowOutputNode.jsx @@ -1,14 +1,14 @@ import React, { useContext } from 'react'; -import { WorkflowStateContext } from '@contexts/Workflow'; import { useHistory } from 'react-router-dom'; import { withI18n } from '@lingui/react'; import { t } from '@lingui/macro'; import styled from 'styled-components'; import { func, shape } from 'prop-types'; -import StatusIcon from '@components/StatusIcon'; -import { WorkflowNodeTypeLetter } from '@components/Workflow'; -import { secondsToHHMMSS } from '@util/dates'; -import { constants as wfConstants } from '@components/Workflow/WorkflowUtils'; +import { WorkflowStateContext } from '../../../contexts/Workflow'; +import StatusIcon from '../../../components/StatusIcon'; +import { WorkflowNodeTypeLetter } from '../../../components/Workflow'; +import { secondsToHHMMSS } from '../../../util/dates'; +import { constants as wfConstants } from '../../../components/Workflow/WorkflowUtils'; const NodeG = styled.g` cursor: ${props => diff --git a/awx/ui_next/src/screens/Job/WorkflowOutput/WorkflowOutputNode.test.jsx b/awx/ui_next/src/screens/Job/WorkflowOutput/WorkflowOutputNode.test.jsx index 198c01c3d1..3c982f8e86 100644 --- a/awx/ui_next/src/screens/Job/WorkflowOutput/WorkflowOutputNode.test.jsx +++ b/awx/ui_next/src/screens/Job/WorkflowOutput/WorkflowOutputNode.test.jsx @@ -1,6 +1,6 @@ import React from 'react'; -import { WorkflowStateContext } from '@contexts/Workflow'; -import { mountWithContexts } from '@testUtils/enzymeHelpers'; +import { WorkflowStateContext } from '../../../contexts/Workflow'; +import { mountWithContexts } from '../../../../testUtils/enzymeHelpers'; import WorkflowOutputNode from './WorkflowOutputNode'; const nodeWithJT = { diff --git a/awx/ui_next/src/screens/Job/WorkflowOutput/WorkflowOutputToolbar.jsx b/awx/ui_next/src/screens/Job/WorkflowOutput/WorkflowOutputToolbar.jsx index a2127fd800..f70b17930f 100644 --- a/awx/ui_next/src/screens/Job/WorkflowOutput/WorkflowOutputToolbar.jsx +++ b/awx/ui_next/src/screens/Job/WorkflowOutput/WorkflowOutputToolbar.jsx @@ -1,15 +1,15 @@ import React, { useContext } from 'react'; -import { - WorkflowDispatchContext, - WorkflowStateContext, -} from '@contexts/Workflow'; import { withI18n } from '@lingui/react'; import { t } from '@lingui/macro'; import { shape } from 'prop-types'; import { Badge as PFBadge, Button, Tooltip } from '@patternfly/react-core'; import { CompassIcon, WrenchIcon } from '@patternfly/react-icons'; -import StatusIcon from '@components/StatusIcon'; import styled from 'styled-components'; +import StatusIcon from '../../../components/StatusIcon'; +import { + WorkflowDispatchContext, + WorkflowStateContext, +} from '../../../contexts/Workflow'; const Toolbar = styled.div` align-items: center; diff --git a/awx/ui_next/src/screens/Job/WorkflowOutput/WorkflowOutputToolbar.test.jsx b/awx/ui_next/src/screens/Job/WorkflowOutput/WorkflowOutputToolbar.test.jsx index 3523e08f32..6fbe4ff9eb 100644 --- a/awx/ui_next/src/screens/Job/WorkflowOutput/WorkflowOutputToolbar.test.jsx +++ b/awx/ui_next/src/screens/Job/WorkflowOutput/WorkflowOutputToolbar.test.jsx @@ -2,8 +2,8 @@ import React from 'react'; import { WorkflowDispatchContext, WorkflowStateContext, -} from '@contexts/Workflow'; -import { mountWithContexts } from '@testUtils/enzymeHelpers'; +} from '../../../contexts/Workflow'; +import { mountWithContexts } from '../../../../testUtils/enzymeHelpers'; import WorkflowOutputToolbar from './WorkflowOutputToolbar'; let wrapper; diff --git a/awx/ui_next/src/screens/JobsSetting/JobsSettings.test.jsx b/awx/ui_next/src/screens/JobsSetting/JobsSettings.test.jsx index 7ef6442c32..c57567c5c4 100644 --- a/awx/ui_next/src/screens/JobsSetting/JobsSettings.test.jsx +++ b/awx/ui_next/src/screens/JobsSetting/JobsSettings.test.jsx @@ -1,6 +1,6 @@ import React from 'react'; -import { mountWithContexts } from '@testUtils/enzymeHelpers'; +import { mountWithContexts } from '../../../testUtils/enzymeHelpers'; import JobsSettings from './JobsSettings'; diff --git a/awx/ui_next/src/screens/License/License.test.jsx b/awx/ui_next/src/screens/License/License.test.jsx index 038815d255..58e3cbfa90 100644 --- a/awx/ui_next/src/screens/License/License.test.jsx +++ b/awx/ui_next/src/screens/License/License.test.jsx @@ -1,6 +1,6 @@ import React from 'react'; -import { mountWithContexts } from '@testUtils/enzymeHelpers'; +import { mountWithContexts } from '../../../testUtils/enzymeHelpers'; import License from './License'; diff --git a/awx/ui_next/src/screens/Login/Login.test.jsx b/awx/ui_next/src/screens/Login/Login.test.jsx index b68b3a025f..1a3dd47ec5 100644 --- a/awx/ui_next/src/screens/Login/Login.test.jsx +++ b/awx/ui_next/src/screens/Login/Login.test.jsx @@ -1,11 +1,14 @@ import React from 'react'; -import { RootAPI } from '@api'; -import { mountWithContexts, waitForElement } from '@testUtils/enzymeHelpers'; +import { RootAPI } from '../../api'; +import { + mountWithContexts, + waitForElement, +} from '../../../testUtils/enzymeHelpers'; import AWXLogin from './Login'; -jest.mock('@api'); +jest.mock('../../api'); describe('', () => { async function findChildren(wrapper) { diff --git a/awx/ui_next/src/screens/ManagementJob/ManagementJobs.test.jsx b/awx/ui_next/src/screens/ManagementJob/ManagementJobs.test.jsx index 452e1c3d1d..f6b6ecfbf9 100644 --- a/awx/ui_next/src/screens/ManagementJob/ManagementJobs.test.jsx +++ b/awx/ui_next/src/screens/ManagementJob/ManagementJobs.test.jsx @@ -1,6 +1,6 @@ import React from 'react'; -import { mountWithContexts } from '@testUtils/enzymeHelpers'; +import { mountWithContexts } from '../../../testUtils/enzymeHelpers'; import ManagementJobs from './ManagementJobs'; diff --git a/awx/ui_next/src/screens/NotFound.jsx b/awx/ui_next/src/screens/NotFound.jsx index 16be2e5b7e..14e04cd1ab 100644 --- a/awx/ui_next/src/screens/NotFound.jsx +++ b/awx/ui_next/src/screens/NotFound.jsx @@ -1,6 +1,6 @@ import React from 'react'; import { PageSection, Card } from '@patternfly/react-core'; -import ContentError from '@components/ContentError'; +import ContentError from '../components/ContentError'; function NotFound() { return ( diff --git a/awx/ui_next/src/screens/NotificationTemplate/NotificationTemplates.test.jsx b/awx/ui_next/src/screens/NotificationTemplate/NotificationTemplates.test.jsx index db47d7c965..93babc8e06 100644 --- a/awx/ui_next/src/screens/NotificationTemplate/NotificationTemplates.test.jsx +++ b/awx/ui_next/src/screens/NotificationTemplate/NotificationTemplates.test.jsx @@ -1,6 +1,6 @@ import React from 'react'; -import { mountWithContexts } from '@testUtils/enzymeHelpers'; +import { mountWithContexts } from '../../../testUtils/enzymeHelpers'; import NotificationTemplates from './NotificationTemplates'; diff --git a/awx/ui_next/src/screens/Organization/Organization.jsx b/awx/ui_next/src/screens/Organization/Organization.jsx index f2bcd6f91e..6dfb120c29 100644 --- a/awx/ui_next/src/screens/Organization/Organization.jsx +++ b/awx/ui_next/src/screens/Organization/Organization.jsx @@ -3,16 +3,16 @@ import { withI18n } from '@lingui/react'; import { t } from '@lingui/macro'; import { Switch, Route, withRouter, Redirect, Link } from 'react-router-dom'; import { Card, CardActions, PageSection } from '@patternfly/react-core'; -import CardCloseButton from '@components/CardCloseButton'; -import { TabbedCardHeader } from '@components/Card'; -import RoutedTabs from '@components/RoutedTabs'; -import ContentError from '@components/ContentError'; -import NotificationList from '@components/NotificationList/NotificationList'; -import { ResourceAccessList } from '@components/ResourceAccessList'; +import CardCloseButton from '../../components/CardCloseButton'; +import { TabbedCardHeader } from '../../components/Card'; +import RoutedTabs from '../../components/RoutedTabs'; +import ContentError from '../../components/ContentError'; +import NotificationList from '../../components/NotificationList/NotificationList'; +import { ResourceAccessList } from '../../components/ResourceAccessList'; import OrganizationDetail from './OrganizationDetail'; import OrganizationEdit from './OrganizationEdit'; import OrganizationTeams from './OrganizationTeams'; -import { OrganizationsAPI } from '@api'; +import { OrganizationsAPI } from '../../api'; class Organization extends Component { constructor(props) { diff --git a/awx/ui_next/src/screens/Organization/Organization.test.jsx b/awx/ui_next/src/screens/Organization/Organization.test.jsx index 4fda6bcffc..a287b87f85 100644 --- a/awx/ui_next/src/screens/Organization/Organization.test.jsx +++ b/awx/ui_next/src/screens/Organization/Organization.test.jsx @@ -1,11 +1,14 @@ import React from 'react'; import { createMemoryHistory } from 'history'; -import { OrganizationsAPI } from '@api'; -import { mountWithContexts, waitForElement } from '@testUtils/enzymeHelpers'; -import mockOrganization from '@util/data.organization.json'; +import { OrganizationsAPI } from '../../api'; +import { + mountWithContexts, + waitForElement, +} from '../../../testUtils/enzymeHelpers'; +import mockOrganization from '../../util/data.organization.json'; import Organization from './Organization'; -jest.mock('@api'); +jest.mock('../../api'); const mockMe = { is_super_user: true, diff --git a/awx/ui_next/src/screens/Organization/OrganizationAdd/OrganizationAdd.jsx b/awx/ui_next/src/screens/Organization/OrganizationAdd/OrganizationAdd.jsx index 90ffdfccd2..b0831829b0 100644 --- a/awx/ui_next/src/screens/Organization/OrganizationAdd/OrganizationAdd.jsx +++ b/awx/ui_next/src/screens/Organization/OrganizationAdd/OrganizationAdd.jsx @@ -3,9 +3,9 @@ import PropTypes from 'prop-types'; import { useHistory } from 'react-router-dom'; import { PageSection, Card } from '@patternfly/react-core'; -import { OrganizationsAPI } from '@api'; -import { Config } from '@contexts/Config'; -import { CardBody } from '@components/Card'; +import { OrganizationsAPI } from '../../../api'; +import { Config } from '../../../contexts/Config'; +import { CardBody } from '../../../components/Card'; import OrganizationForm from '../shared/OrganizationForm'; function OrganizationAdd() { diff --git a/awx/ui_next/src/screens/Organization/OrganizationAdd/OrganizationAdd.test.jsx b/awx/ui_next/src/screens/Organization/OrganizationAdd/OrganizationAdd.test.jsx index 4618508afc..978fbeed86 100644 --- a/awx/ui_next/src/screens/Organization/OrganizationAdd/OrganizationAdd.test.jsx +++ b/awx/ui_next/src/screens/Organization/OrganizationAdd/OrganizationAdd.test.jsx @@ -1,11 +1,14 @@ import React from 'react'; import { act } from 'react-dom/test-utils'; import { createMemoryHistory } from 'history'; -import { mountWithContexts, waitForElement } from '@testUtils/enzymeHelpers'; +import { + mountWithContexts, + waitForElement, +} from '../../../../testUtils/enzymeHelpers'; import OrganizationAdd from './OrganizationAdd'; -import { OrganizationsAPI } from '@api'; +import { OrganizationsAPI } from '../../../api'; -jest.mock('@api'); +jest.mock('../../../api'); describe('', () => { test('onSubmit should post to api', async () => { diff --git a/awx/ui_next/src/screens/Organization/OrganizationDetail/OrganizationDetail.jsx b/awx/ui_next/src/screens/Organization/OrganizationDetail/OrganizationDetail.jsx index 61183eecab..58444a3d19 100644 --- a/awx/ui_next/src/screens/Organization/OrganizationDetail/OrganizationDetail.jsx +++ b/awx/ui_next/src/screens/Organization/OrganizationDetail/OrganizationDetail.jsx @@ -3,15 +3,15 @@ import { Link, useHistory, useRouteMatch } from 'react-router-dom'; import { withI18n } from '@lingui/react'; import { t } from '@lingui/macro'; import { Button, Chip } from '@patternfly/react-core'; -import { OrganizationsAPI } from '@api'; -import { DetailList, Detail, UserDateDetail } from '@components/DetailList'; -import { CardBody, CardActionsRow } from '@components/Card'; -import AlertModal from '@components/AlertModal'; -import ChipGroup from '@components/ChipGroup'; -import ContentError from '@components/ContentError'; -import ContentLoading from '@components/ContentLoading'; -import DeleteButton from '@components/DeleteButton'; -import ErrorDetail from '@components/ErrorDetail'; +import { OrganizationsAPI } from '../../../api'; +import { DetailList, Detail, UserDateDetail } from '../../../components/DetailList'; +import { CardBody, CardActionsRow } from '../../../components/Card'; +import AlertModal from '../../../components/AlertModal'; +import ChipGroup from '../../../components/ChipGroup'; +import ContentError from '../../../components/ContentError'; +import ContentLoading from '../../../components/ContentLoading'; +import DeleteButton from '../../../components/DeleteButton'; +import ErrorDetail from '../../../components/ErrorDetail'; function OrganizationDetail({ i18n, organization }) { const { diff --git a/awx/ui_next/src/screens/Organization/OrganizationDetail/OrganizationDetail.test.jsx b/awx/ui_next/src/screens/Organization/OrganizationDetail/OrganizationDetail.test.jsx index 19ecdb7612..f1c3b3875f 100644 --- a/awx/ui_next/src/screens/Organization/OrganizationDetail/OrganizationDetail.test.jsx +++ b/awx/ui_next/src/screens/Organization/OrganizationDetail/OrganizationDetail.test.jsx @@ -1,12 +1,15 @@ import React from 'react'; import { act } from 'react-dom/test-utils'; -import { OrganizationsAPI } from '@api'; -import { mountWithContexts, waitForElement } from '@testUtils/enzymeHelpers'; +import { OrganizationsAPI } from '../../../api'; +import { + mountWithContexts, + waitForElement, +} from '../../../../testUtils/enzymeHelpers'; import OrganizationDetail from './OrganizationDetail'; -jest.mock('@api'); +jest.mock('../../../api'); describe('', () => { const mockOrganization = { diff --git a/awx/ui_next/src/screens/Organization/OrganizationEdit/OrganizationEdit.jsx b/awx/ui_next/src/screens/Organization/OrganizationEdit/OrganizationEdit.jsx index 04c13c8848..c95c47faf2 100644 --- a/awx/ui_next/src/screens/Organization/OrganizationEdit/OrganizationEdit.jsx +++ b/awx/ui_next/src/screens/Organization/OrganizationEdit/OrganizationEdit.jsx @@ -1,9 +1,9 @@ import React, { useState } from 'react'; import PropTypes from 'prop-types'; import { useHistory } from 'react-router-dom'; -import { CardBody } from '@components/Card'; -import { OrganizationsAPI } from '@api'; -import { Config } from '@contexts/Config'; +import { CardBody } from '../../../components/Card'; +import { OrganizationsAPI } from '../../../api'; +import { Config } from '../../../contexts/Config'; import OrganizationForm from '../shared/OrganizationForm'; diff --git a/awx/ui_next/src/screens/Organization/OrganizationEdit/OrganizationEdit.test.jsx b/awx/ui_next/src/screens/Organization/OrganizationEdit/OrganizationEdit.test.jsx index 8defe7ccc6..7e8b16fe49 100644 --- a/awx/ui_next/src/screens/Organization/OrganizationEdit/OrganizationEdit.test.jsx +++ b/awx/ui_next/src/screens/Organization/OrganizationEdit/OrganizationEdit.test.jsx @@ -1,11 +1,14 @@ import React from 'react'; import { act } from 'react-dom/test-utils'; import { createMemoryHistory } from 'history'; -import { OrganizationsAPI } from '@api'; -import { mountWithContexts, waitForElement } from '@testUtils/enzymeHelpers'; +import { OrganizationsAPI } from '../../../api'; +import { + mountWithContexts, + waitForElement, +} from '../../../../testUtils/enzymeHelpers'; import OrganizationEdit from './OrganizationEdit'; -jest.mock('@api'); +jest.mock('../../../api'); describe('', () => { const mockData = { diff --git a/awx/ui_next/src/screens/Organization/OrganizationList/OrganizationList.jsx b/awx/ui_next/src/screens/Organization/OrganizationList/OrganizationList.jsx index b72c9511f0..ce4c11fe0f 100644 --- a/awx/ui_next/src/screens/Organization/OrganizationList/OrganizationList.jsx +++ b/awx/ui_next/src/screens/Organization/OrganizationList/OrganizationList.jsx @@ -4,16 +4,16 @@ import { withI18n } from '@lingui/react'; import { t } from '@lingui/macro'; import { Card, PageSection } from '@patternfly/react-core'; -import { OrganizationsAPI } from '@api'; -import useRequest, { useDeleteItems } from '@util/useRequest'; -import AlertModal from '@components/AlertModal'; -import DataListToolbar from '@components/DataListToolbar'; -import ErrorDetail from '@components/ErrorDetail'; +import { OrganizationsAPI } from '../../../api'; +import useRequest, { useDeleteItems } from '../../../util/useRequest'; +import AlertModal from '../../../components/AlertModal'; +import DataListToolbar from '../../../components/DataListToolbar'; +import ErrorDetail from '../../../components/ErrorDetail'; import PaginatedDataList, { ToolbarAddButton, ToolbarDeleteButton, -} from '@components/PaginatedDataList'; -import { getQSConfig, parseQueryString } from '@util/qs'; +} from '../../../components/PaginatedDataList'; +import { getQSConfig, parseQueryString } from '../../../util/qs'; import OrganizationListItem from './OrganizationListItem'; const QS_CONFIG = getQSConfig('organization', { diff --git a/awx/ui_next/src/screens/Organization/OrganizationList/OrganizationList.test.jsx b/awx/ui_next/src/screens/Organization/OrganizationList/OrganizationList.test.jsx index 8151033123..963b205d62 100644 --- a/awx/ui_next/src/screens/Organization/OrganizationList/OrganizationList.test.jsx +++ b/awx/ui_next/src/screens/Organization/OrganizationList/OrganizationList.test.jsx @@ -1,12 +1,15 @@ import React from 'react'; import { act } from 'react-dom/test-utils'; -import { OrganizationsAPI } from '@api'; -import { mountWithContexts, waitForElement } from '@testUtils/enzymeHelpers'; +import { OrganizationsAPI } from '../../../api'; +import { + mountWithContexts, + waitForElement, +} from '../../../../testUtils/enzymeHelpers'; import OrganizationsList from './OrganizationList'; -jest.mock('@api'); +jest.mock('../../../api'); const mockOrganizations = { data: { diff --git a/awx/ui_next/src/screens/Organization/OrganizationList/OrganizationListItem.jsx b/awx/ui_next/src/screens/Organization/OrganizationList/OrganizationListItem.jsx index 9c1f66ae11..51f78c173c 100644 --- a/awx/ui_next/src/screens/Organization/OrganizationList/OrganizationListItem.jsx +++ b/awx/ui_next/src/screens/Organization/OrganizationList/OrganizationListItem.jsx @@ -12,13 +12,13 @@ import { DataListItemRow, Tooltip, } from '@patternfly/react-core'; -import DataListCell from '@components/DataListCell'; import { Link } from 'react-router-dom'; import styled from 'styled-components'; import { PencilAltIcon } from '@patternfly/react-icons'; +import DataListCell from '../../../components/DataListCell'; -import { Organization } from '@types'; +import { Organization } from '../../../types'; const Badge = styled(PFBadge)` margin-left: 8px; diff --git a/awx/ui_next/src/screens/Organization/OrganizationList/OrganizationListItem.test.jsx b/awx/ui_next/src/screens/Organization/OrganizationList/OrganizationListItem.test.jsx index 410dac6cfb..e439714dfe 100644 --- a/awx/ui_next/src/screens/Organization/OrganizationList/OrganizationListItem.test.jsx +++ b/awx/ui_next/src/screens/Organization/OrganizationList/OrganizationListItem.test.jsx @@ -2,7 +2,7 @@ import React from 'react'; import { MemoryRouter } from 'react-router-dom'; import { I18nProvider } from '@lingui/react'; -import { mountWithContexts } from '@testUtils/enzymeHelpers'; +import { mountWithContexts } from '../../../../testUtils/enzymeHelpers'; import OrganizationListItem from './OrganizationListItem'; diff --git a/awx/ui_next/src/screens/Organization/OrganizationTeams/OrganizationTeams.jsx b/awx/ui_next/src/screens/Organization/OrganizationTeams/OrganizationTeams.jsx index a94215dcd0..1fb0e88c89 100644 --- a/awx/ui_next/src/screens/Organization/OrganizationTeams/OrganizationTeams.jsx +++ b/awx/ui_next/src/screens/Organization/OrganizationTeams/OrganizationTeams.jsx @@ -3,9 +3,9 @@ import PropTypes from 'prop-types'; import { useLocation } from 'react-router-dom'; import { withI18n } from '@lingui/react'; import { t } from '@lingui/macro'; -import { OrganizationsAPI } from '@api'; -import PaginatedDataList from '@components/PaginatedDataList'; -import { getQSConfig, parseQueryString } from '@util/qs'; +import { OrganizationsAPI } from '../../../api'; +import PaginatedDataList from '../../../components/PaginatedDataList'; +import { getQSConfig, parseQueryString } from '../../../util/qs'; const QS_CONFIG = getQSConfig('team', { page: 1, diff --git a/awx/ui_next/src/screens/Organization/OrganizationTeams/OrganizationTeams.test.jsx b/awx/ui_next/src/screens/Organization/OrganizationTeams/OrganizationTeams.test.jsx index fbc5b48a59..c21ec13622 100644 --- a/awx/ui_next/src/screens/Organization/OrganizationTeams/OrganizationTeams.test.jsx +++ b/awx/ui_next/src/screens/Organization/OrganizationTeams/OrganizationTeams.test.jsx @@ -1,13 +1,16 @@ import React from 'react'; import { act } from 'react-dom/test-utils'; -import { OrganizationsAPI } from '@api'; -import { mountWithContexts, waitForElement } from '@testUtils/enzymeHelpers'; -import { sleep } from '@testUtils/testUtils'; +import { OrganizationsAPI } from '../../../api'; +import { + mountWithContexts, + waitForElement, +} from '../../../../testUtils/enzymeHelpers'; +import { sleep } from '../../../../testUtils/testUtils'; import OrganizationTeams from './OrganizationTeams'; -jest.mock('@api'); +jest.mock('../../../api'); const listData = { data: { diff --git a/awx/ui_next/src/screens/Organization/Organizations.jsx b/awx/ui_next/src/screens/Organization/Organizations.jsx index 1cc09a68ba..2a289b6be6 100644 --- a/awx/ui_next/src/screens/Organization/Organizations.jsx +++ b/awx/ui_next/src/screens/Organization/Organizations.jsx @@ -3,8 +3,8 @@ import { Route, withRouter, Switch } from 'react-router-dom'; import { withI18n } from '@lingui/react'; import { t } from '@lingui/macro'; -import { Config } from '@contexts/Config'; -import Breadcrumbs from '@components/Breadcrumbs/Breadcrumbs'; +import { Config } from '../../contexts/Config'; +import Breadcrumbs from '../../components/Breadcrumbs/Breadcrumbs'; import OrganizationsList from './OrganizationList/OrganizationList'; import OrganizationAdd from './OrganizationAdd/OrganizationAdd'; diff --git a/awx/ui_next/src/screens/Organization/Organizations.test.jsx b/awx/ui_next/src/screens/Organization/Organizations.test.jsx index 6a9a07ba19..4f510463a4 100644 --- a/awx/ui_next/src/screens/Organization/Organizations.test.jsx +++ b/awx/ui_next/src/screens/Organization/Organizations.test.jsx @@ -1,10 +1,10 @@ import React from 'react'; import { act } from 'react-dom/test-utils'; -import { mountWithContexts } from '@testUtils/enzymeHelpers'; +import { mountWithContexts } from '../../../testUtils/enzymeHelpers'; import Organizations from './Organizations'; -jest.mock('@api'); +jest.mock('../../api'); describe('', () => { test('initially renders succesfully', async () => { diff --git a/awx/ui_next/src/screens/Organization/shared/OrganizationForm.jsx b/awx/ui_next/src/screens/Organization/shared/OrganizationForm.jsx index 5618846da5..f164b19a6e 100644 --- a/awx/ui_next/src/screens/Organization/shared/OrganizationForm.jsx +++ b/awx/ui_next/src/screens/Organization/shared/OrganizationForm.jsx @@ -5,17 +5,17 @@ import { withI18n } from '@lingui/react'; import { t } from '@lingui/macro'; import { Form, FormGroup } from '@patternfly/react-core'; -import { OrganizationsAPI } from '@api'; -import { ConfigContext } from '@contexts/Config'; -import AnsibleSelect from '@components/AnsibleSelect'; -import ContentError from '@components/ContentError'; -import ContentLoading from '@components/ContentLoading'; -import FormField, { FormSubmitError } from '@components/FormField'; -import FormActionGroup from '@components/FormActionGroup/FormActionGroup'; -import { InstanceGroupsLookup } from '@components/Lookup/'; -import { getAddedAndRemoved } from '@util/lists'; -import { required, minMaxValue } from '@util/validators'; -import { FormColumnLayout } from '@components/FormLayout'; +import { OrganizationsAPI } from '../../../api'; +import { ConfigContext } from '../../../contexts/Config'; +import AnsibleSelect from '../../../components/AnsibleSelect'; +import ContentError from '../../../components/ContentError'; +import ContentLoading from '../../../components/ContentLoading'; +import FormField, { FormSubmitError } from '../../../components/FormField'; +import FormActionGroup from '../../../components/FormActionGroup/FormActionGroup'; +import { InstanceGroupsLookup } from '../../../components/Lookup'; +import { getAddedAndRemoved } from '../../../util/lists'; +import { required, minMaxValue } from '../../../util/validators'; +import { FormColumnLayout } from '../../../components/FormLayout'; function OrganizationFormFields({ i18n, diff --git a/awx/ui_next/src/screens/Organization/shared/OrganizationForm.test.jsx b/awx/ui_next/src/screens/Organization/shared/OrganizationForm.test.jsx index 40e0844d9e..abd55fcc44 100644 --- a/awx/ui_next/src/screens/Organization/shared/OrganizationForm.test.jsx +++ b/awx/ui_next/src/screens/Organization/shared/OrganizationForm.test.jsx @@ -1,11 +1,14 @@ import React from 'react'; import { act } from 'react-dom/test-utils'; -import { mountWithContexts, waitForElement } from '@testUtils/enzymeHelpers'; -import { OrganizationsAPI } from '@api'; +import { + mountWithContexts, + waitForElement, +} from '../../../../testUtils/enzymeHelpers'; +import { OrganizationsAPI } from '../../../api'; import OrganizationForm from './OrganizationForm'; -jest.mock('@api'); +jest.mock('../../../api'); describe('', () => { const network = {}; diff --git a/awx/ui_next/src/screens/Portal/Portal.test.jsx b/awx/ui_next/src/screens/Portal/Portal.test.jsx index fc51cec4d7..cee4a93678 100644 --- a/awx/ui_next/src/screens/Portal/Portal.test.jsx +++ b/awx/ui_next/src/screens/Portal/Portal.test.jsx @@ -1,6 +1,6 @@ import React from 'react'; -import { mountWithContexts } from '@testUtils/enzymeHelpers'; +import { mountWithContexts } from '../../../testUtils/enzymeHelpers'; import Portal from './Portal'; diff --git a/awx/ui_next/src/screens/Project/Project.jsx b/awx/ui_next/src/screens/Project/Project.jsx index debd3aaae6..f20b66e3ca 100644 --- a/awx/ui_next/src/screens/Project/Project.jsx +++ b/awx/ui_next/src/screens/Project/Project.jsx @@ -3,17 +3,17 @@ import { withI18n } from '@lingui/react'; import { t } from '@lingui/macro'; import { Switch, Route, withRouter, Redirect, Link } from 'react-router-dom'; import { Card, CardActions, PageSection } from '@patternfly/react-core'; -import { TabbedCardHeader } from '@components/Card'; -import CardCloseButton from '@components/CardCloseButton'; -import RoutedTabs from '@components/RoutedTabs'; -import ContentError from '@components/ContentError'; -import NotificationList from '@components/NotificationList'; -import { ResourceAccessList } from '@components/ResourceAccessList'; -import { Schedules } from '@components/Schedule'; +import { TabbedCardHeader } from '../../components/Card'; +import CardCloseButton from '../../components/CardCloseButton'; +import RoutedTabs from '../../components/RoutedTabs'; +import ContentError from '../../components/ContentError'; +import NotificationList from '../../components/NotificationList'; +import { ResourceAccessList } from '../../components/ResourceAccessList'; +import { Schedules } from '../../components/Schedule'; import ProjectDetail from './ProjectDetail'; import ProjectEdit from './ProjectEdit'; import ProjectJobTemplatesList from './ProjectJobTemplatesList'; -import { OrganizationsAPI, ProjectsAPI } from '@api'; +import { OrganizationsAPI, ProjectsAPI } from '../../api'; class Project extends Component { constructor(props) { diff --git a/awx/ui_next/src/screens/Project/Project.test.jsx b/awx/ui_next/src/screens/Project/Project.test.jsx index f4926be0fd..f2ecf09cc7 100644 --- a/awx/ui_next/src/screens/Project/Project.test.jsx +++ b/awx/ui_next/src/screens/Project/Project.test.jsx @@ -1,12 +1,15 @@ import React from 'react'; import { createMemoryHistory } from 'history'; -import { OrganizationsAPI, ProjectsAPI } from '@api'; -import { mountWithContexts, waitForElement } from '@testUtils/enzymeHelpers'; -import mockOrganization from '@util/data.organization.json'; +import { OrganizationsAPI, ProjectsAPI } from '../../api'; +import { + mountWithContexts, + waitForElement, +} from '../../../testUtils/enzymeHelpers'; +import mockOrganization from '../../util/data.organization.json'; import mockDetails from './data.project.json'; import Project from './Project'; -jest.mock('@api'); +jest.mock('../../api'); const mockMe = { is_super_user: true, diff --git a/awx/ui_next/src/screens/Project/ProjectAdd/ProjectAdd.jsx b/awx/ui_next/src/screens/Project/ProjectAdd/ProjectAdd.jsx index cb55541240..d0190830e6 100644 --- a/awx/ui_next/src/screens/Project/ProjectAdd/ProjectAdd.jsx +++ b/awx/ui_next/src/screens/Project/ProjectAdd/ProjectAdd.jsx @@ -1,9 +1,9 @@ import React, { useState } from 'react'; import { useHistory } from 'react-router-dom'; import { Card, PageSection } from '@patternfly/react-core'; -import { CardBody } from '@components/Card'; +import { CardBody } from '../../../components/Card'; import ProjectForm from '../shared/ProjectForm'; -import { ProjectsAPI } from '@api'; +import { ProjectsAPI } from '../../../api'; function ProjectAdd() { const [formSubmitError, setFormSubmitError] = useState(null); diff --git a/awx/ui_next/src/screens/Project/ProjectAdd/ProjectAdd.test.jsx b/awx/ui_next/src/screens/Project/ProjectAdd/ProjectAdd.test.jsx index b4048ed55c..a47bb424bf 100644 --- a/awx/ui_next/src/screens/Project/ProjectAdd/ProjectAdd.test.jsx +++ b/awx/ui_next/src/screens/Project/ProjectAdd/ProjectAdd.test.jsx @@ -1,11 +1,14 @@ import React from 'react'; import { act } from 'react-dom/test-utils'; import { createMemoryHistory } from 'history'; -import { mountWithContexts, waitForElement } from '@testUtils/enzymeHelpers'; +import { + mountWithContexts, + waitForElement, +} from '../../../../testUtils/enzymeHelpers'; import ProjectAdd from './ProjectAdd'; -import { ProjectsAPI, CredentialTypesAPI } from '@api'; +import { ProjectsAPI, CredentialTypesAPI } from '../../../api'; -jest.mock('@api'); +jest.mock('../../../api'); describe('', () => { let wrapper; diff --git a/awx/ui_next/src/screens/Project/ProjectDetail/ProjectDetail.jsx b/awx/ui_next/src/screens/Project/ProjectDetail/ProjectDetail.jsx index 4926d72c62..a549c7adba 100644 --- a/awx/ui_next/src/screens/Project/ProjectDetail/ProjectDetail.jsx +++ b/awx/ui_next/src/screens/Project/ProjectDetail/ProjectDetail.jsx @@ -2,19 +2,23 @@ import React, { useState } from 'react'; import { Link, useHistory } from 'react-router-dom'; import { withI18n } from '@lingui/react'; import { t } from '@lingui/macro'; -import { Project } from '@types'; -import { Config } from '@contexts/Config'; - import { Button, List, ListItem } from '@patternfly/react-core'; -import AlertModal from '@components/AlertModal'; -import { CardBody, CardActionsRow } from '@components/Card'; -import ContentLoading from '@components/ContentLoading'; -import DeleteButton from '@components/DeleteButton'; -import { DetailList, Detail, UserDateDetail } from '@components/DetailList'; -import ErrorDetail from '@components/ErrorDetail'; -import CredentialChip from '@components/CredentialChip'; -import { ProjectsAPI } from '@api'; -import { toTitleCase } from '@util/strings'; +import { Project } from '../../../types'; +import { Config } from '../../../contexts/Config'; + +import AlertModal from '../../../components/AlertModal'; +import { CardBody, CardActionsRow } from '../../../components/Card'; +import ContentLoading from '../../../components/ContentLoading'; +import DeleteButton from '../../../components/DeleteButton'; +import { + DetailList, + Detail, + UserDateDetail, +} from '../../../components/DetailList'; +import ErrorDetail from '../../../components/ErrorDetail'; +import CredentialChip from '../../../components/CredentialChip'; +import { ProjectsAPI } from '../../../api'; +import { toTitleCase } from '../../../util/strings'; function ProjectDetail({ project, i18n }) { const { diff --git a/awx/ui_next/src/screens/Project/ProjectDetail/ProjectDetail.test.jsx b/awx/ui_next/src/screens/Project/ProjectDetail/ProjectDetail.test.jsx index 809a4b2962..3139e2b14c 100644 --- a/awx/ui_next/src/screens/Project/ProjectDetail/ProjectDetail.test.jsx +++ b/awx/ui_next/src/screens/Project/ProjectDetail/ProjectDetail.test.jsx @@ -1,11 +1,14 @@ import React from 'react'; import { act } from 'react-dom/test-utils'; import { createMemoryHistory } from 'history'; -import { mountWithContexts, waitForElement } from '@testUtils/enzymeHelpers'; -import { ProjectsAPI } from '@api'; +import { + mountWithContexts, + waitForElement, +} from '../../../../testUtils/enzymeHelpers'; +import { ProjectsAPI } from '../../../api'; import ProjectDetail from './ProjectDetail'; -jest.mock('@api'); +jest.mock('../../../api'); describe('', () => { const mockProject = { diff --git a/awx/ui_next/src/screens/Project/ProjectEdit/ProjectEdit.jsx b/awx/ui_next/src/screens/Project/ProjectEdit/ProjectEdit.jsx index 8669af4ede..6642e03503 100644 --- a/awx/ui_next/src/screens/Project/ProjectEdit/ProjectEdit.jsx +++ b/awx/ui_next/src/screens/Project/ProjectEdit/ProjectEdit.jsx @@ -1,9 +1,9 @@ import React, { useState } from 'react'; import { useHistory } from 'react-router-dom'; import { Card } from '@patternfly/react-core'; -import { CardBody } from '@components/Card'; +import { CardBody } from '../../../components/Card'; import ProjectForm from '../shared/ProjectForm'; -import { ProjectsAPI } from '@api'; +import { ProjectsAPI } from '../../../api'; function ProjectEdit({ project }) { const [formSubmitError, setFormSubmitError] = useState(null); diff --git a/awx/ui_next/src/screens/Project/ProjectEdit/ProjectEdit.test.jsx b/awx/ui_next/src/screens/Project/ProjectEdit/ProjectEdit.test.jsx index 6ab0602b53..5b75396d65 100644 --- a/awx/ui_next/src/screens/Project/ProjectEdit/ProjectEdit.test.jsx +++ b/awx/ui_next/src/screens/Project/ProjectEdit/ProjectEdit.test.jsx @@ -1,11 +1,14 @@ import React from 'react'; import { act } from 'react-dom/test-utils'; import { createMemoryHistory } from 'history'; -import { mountWithContexts, waitForElement } from '@testUtils/enzymeHelpers'; +import { + mountWithContexts, + waitForElement, +} from '../../../../testUtils/enzymeHelpers'; import ProjectEdit from './ProjectEdit'; -import { ProjectsAPI, CredentialTypesAPI } from '@api'; +import { ProjectsAPI, CredentialTypesAPI } from '../../../api'; -jest.mock('@api'); +jest.mock('../../../api'); describe('', () => { let wrapper; diff --git a/awx/ui_next/src/screens/Project/ProjectJobTemplatesList/ProjectJobTemplatesList.jsx b/awx/ui_next/src/screens/Project/ProjectJobTemplatesList/ProjectJobTemplatesList.jsx index c0585ec957..defb79bab7 100644 --- a/awx/ui_next/src/screens/Project/ProjectJobTemplatesList/ProjectJobTemplatesList.jsx +++ b/awx/ui_next/src/screens/Project/ProjectJobTemplatesList/ProjectJobTemplatesList.jsx @@ -8,15 +8,15 @@ import { JobTemplatesAPI, UnifiedJobTemplatesAPI, WorkflowJobTemplatesAPI, -} from '@api'; -import AlertModal from '@components/AlertModal'; -import DatalistToolbar from '@components/DataListToolbar'; -import ErrorDetail from '@components/ErrorDetail'; +} from '../../../api'; +import AlertModal from '../../../components/AlertModal'; +import DatalistToolbar from '../../../components/DataListToolbar'; +import ErrorDetail from '../../../components/ErrorDetail'; import PaginatedDataList, { ToolbarAddButton, ToolbarDeleteButton, -} from '@components/PaginatedDataList'; -import { getQSConfig, parseQueryString } from '@util/qs'; +} from '../../../components/PaginatedDataList'; +import { getQSConfig, parseQueryString } from '../../../util/qs'; import ProjectTemplatesListItem from './ProjectJobTemplatesListItem'; // The type value in const QS_CONFIG below does not have a space between job_template and diff --git a/awx/ui_next/src/screens/Project/ProjectJobTemplatesList/ProjectJobTemplatesListItem.jsx b/awx/ui_next/src/screens/Project/ProjectJobTemplatesList/ProjectJobTemplatesListItem.jsx index 2932969178..4d185e4b5f 100644 --- a/awx/ui_next/src/screens/Project/ProjectJobTemplatesList/ProjectJobTemplatesListItem.jsx +++ b/awx/ui_next/src/screens/Project/ProjectJobTemplatesList/ProjectJobTemplatesListItem.jsx @@ -9,8 +9,6 @@ import { DataListItemCells, Tooltip, } from '@patternfly/react-core'; -import DataListCell from '@components/DataListCell'; - import { t } from '@lingui/macro'; import { withI18n } from '@lingui/react'; import { @@ -18,11 +16,12 @@ import { PencilAltIcon, RocketIcon, } from '@patternfly/react-icons'; - -import LaunchButton from '@components/LaunchButton'; -import Sparkline from '@components/Sparkline'; -import { toTitleCase } from '@util/strings'; import styled from 'styled-components'; +import DataListCell from '../../../components/DataListCell'; + +import LaunchButton from '../../../components/LaunchButton'; +import Sparkline from '../../../components/Sparkline'; +import { toTitleCase } from '../../../util/strings'; const DataListAction = styled(_DataListAction)` align-items: center; diff --git a/awx/ui_next/src/screens/Project/ProjectJobTemplatesList/ProjectJobTemplatesListItem.test.jsx b/awx/ui_next/src/screens/Project/ProjectJobTemplatesList/ProjectJobTemplatesListItem.test.jsx index f94fc1a6e2..eb03999b6c 100644 --- a/awx/ui_next/src/screens/Project/ProjectJobTemplatesList/ProjectJobTemplatesListItem.test.jsx +++ b/awx/ui_next/src/screens/Project/ProjectJobTemplatesList/ProjectJobTemplatesListItem.test.jsx @@ -1,7 +1,7 @@ import React from 'react'; -import { mountWithContexts } from '@testUtils/enzymeHelpers'; import { createMemoryHistory } from 'history'; +import { mountWithContexts } from '../../../../testUtils/enzymeHelpers'; import ProjectJobTemplatesListItem from './ProjectJobTemplatesListItem'; describe('', () => { diff --git a/awx/ui_next/src/screens/Project/ProjectList/ProjectList.jsx b/awx/ui_next/src/screens/Project/ProjectList/ProjectList.jsx index 77db42660b..e82a31c4ae 100644 --- a/awx/ui_next/src/screens/Project/ProjectList/ProjectList.jsx +++ b/awx/ui_next/src/screens/Project/ProjectList/ProjectList.jsx @@ -4,16 +4,16 @@ import { withI18n } from '@lingui/react'; import { t } from '@lingui/macro'; import { Card, PageSection } from '@patternfly/react-core'; -import { ProjectsAPI } from '@api'; -import useRequest, { useDeleteItems } from '@util/useRequest'; -import AlertModal from '@components/AlertModal'; -import DataListToolbar from '@components/DataListToolbar'; -import ErrorDetail from '@components/ErrorDetail'; +import { ProjectsAPI } from '../../../api'; +import useRequest, { useDeleteItems } from '../../../util/useRequest'; +import AlertModal from '../../../components/AlertModal'; +import DataListToolbar from '../../../components/DataListToolbar'; +import ErrorDetail from '../../../components/ErrorDetail'; import PaginatedDataList, { ToolbarAddButton, ToolbarDeleteButton, -} from '@components/PaginatedDataList'; -import { getQSConfig, parseQueryString } from '@util/qs'; +} from '../../../components/PaginatedDataList'; +import { getQSConfig, parseQueryString } from '../../../util/qs'; import ProjectListItem from './ProjectListItem'; diff --git a/awx/ui_next/src/screens/Project/ProjectList/ProjectList.test.jsx b/awx/ui_next/src/screens/Project/ProjectList/ProjectList.test.jsx index 6fcebf02ea..945fbfc8e4 100644 --- a/awx/ui_next/src/screens/Project/ProjectList/ProjectList.test.jsx +++ b/awx/ui_next/src/screens/Project/ProjectList/ProjectList.test.jsx @@ -1,10 +1,10 @@ import React from 'react'; import { act } from 'react-dom/test-utils'; -import { ProjectsAPI } from '@api'; -import { mountWithContexts } from '@testUtils/enzymeHelpers'; +import { ProjectsAPI } from '../../../api'; +import { mountWithContexts } from '../../../../testUtils/enzymeHelpers'; import ProjectList from './ProjectList'; -jest.mock('@api'); +jest.mock('../../../api'); const mockProjects = [ { diff --git a/awx/ui_next/src/screens/Project/ProjectList/ProjectListItem.jsx b/awx/ui_next/src/screens/Project/ProjectList/ProjectListItem.jsx index b59435e5a6..c506b0f548 100644 --- a/awx/ui_next/src/screens/Project/ProjectList/ProjectListItem.jsx +++ b/awx/ui_next/src/screens/Project/ProjectList/ProjectListItem.jsx @@ -10,20 +10,19 @@ import { DataListItemCells, Tooltip, } from '@patternfly/react-core'; -import DataListCell from '@components/DataListCell'; import { t } from '@lingui/macro'; import { Link } from 'react-router-dom'; import { PencilAltIcon, SyncIcon } from '@patternfly/react-icons'; import styled from 'styled-components'; -import { timeOfDay } from '@util/dates'; -import { ProjectsAPI } from '@api'; -import ClipboardCopyButton from '@components/ClipboardCopyButton'; -import StatusIcon from '@components/StatusIcon'; -import { toTitleCase } from '@util/strings'; -import CopyButton from '@components/CopyButton'; +import { timeOfDay } from '../../../util/dates'; +import { ProjectsAPI } from '../../../api'; +import ClipboardCopyButton from '../../../components/ClipboardCopyButton'; +import StatusIcon from '../../../components/StatusIcon'; +import { toTitleCase } from '../../../util/strings'; +import CopyButton from '../../../components/CopyButton'; import ProjectSyncButton from '../shared/ProjectSyncButton'; -import { Project } from '@types'; +import { Project } from '../../../types'; const DataListAction = styled(_DataListAction)` align-items: center; diff --git a/awx/ui_next/src/screens/Project/ProjectList/ProjectListItem.test.jsx b/awx/ui_next/src/screens/Project/ProjectList/ProjectListItem.test.jsx index 9beb03cf09..74c61fbed5 100644 --- a/awx/ui_next/src/screens/Project/ProjectList/ProjectListItem.test.jsx +++ b/awx/ui_next/src/screens/Project/ProjectList/ProjectListItem.test.jsx @@ -1,11 +1,11 @@ import React from 'react'; -import { mountWithContexts } from '@testUtils/enzymeHelpers'; +import { mountWithContexts } from '../../../../testUtils/enzymeHelpers'; import { act } from 'react-dom/test-utils'; import ProjectsListItem from './ProjectListItem'; -import { ProjectsAPI } from '@api'; +import { ProjectsAPI } from '../../../api'; -jest.mock('@api/models/Projects'); +jest.mock('../../../api/models/Projects'); describe('', () => { test('launch button shown to users with start capabilities', () => { diff --git a/awx/ui_next/src/screens/Project/ProjectSchedules/ProjectSchedules.jsx b/awx/ui_next/src/screens/Project/ProjectSchedules/ProjectSchedules.jsx index 390426b03a..f0667f035a 100644 --- a/awx/ui_next/src/screens/Project/ProjectSchedules/ProjectSchedules.jsx +++ b/awx/ui_next/src/screens/Project/ProjectSchedules/ProjectSchedules.jsx @@ -1,5 +1,5 @@ import React, { Component } from 'react'; -import { CardBody } from '@components/Card'; +import { CardBody } from '../../../components/Card'; class ProjectSchedules extends Component { render() { diff --git a/awx/ui_next/src/screens/Project/Projects.jsx b/awx/ui_next/src/screens/Project/Projects.jsx index a5bcddd4f0..0bb53de606 100644 --- a/awx/ui_next/src/screens/Project/Projects.jsx +++ b/awx/ui_next/src/screens/Project/Projects.jsx @@ -3,8 +3,8 @@ import { Route, withRouter, Switch } from 'react-router-dom'; import { withI18n } from '@lingui/react'; import { t } from '@lingui/macro'; -import { Config } from '@contexts/Config'; -import Breadcrumbs from '@components/Breadcrumbs/Breadcrumbs'; +import { Config } from '../../contexts/Config'; +import Breadcrumbs from '../../components/Breadcrumbs/Breadcrumbs'; import ProjectsList from './ProjectList/ProjectList'; import ProjectAdd from './ProjectAdd/ProjectAdd'; diff --git a/awx/ui_next/src/screens/Project/Projects.test.jsx b/awx/ui_next/src/screens/Project/Projects.test.jsx index c901fc5290..b46f37ae23 100644 --- a/awx/ui_next/src/screens/Project/Projects.test.jsx +++ b/awx/ui_next/src/screens/Project/Projects.test.jsx @@ -1,7 +1,7 @@ import React from 'react'; import { createMemoryHistory } from 'history'; -import { mountWithContexts } from '@testUtils/enzymeHelpers'; +import { mountWithContexts } from '../../../testUtils/enzymeHelpers'; import Projects from './Projects'; diff --git a/awx/ui_next/src/screens/Project/shared/ProjectForm.jsx b/awx/ui_next/src/screens/Project/shared/ProjectForm.jsx index d37de3ef65..eee485d646 100644 --- a/awx/ui_next/src/screens/Project/shared/ProjectForm.jsx +++ b/awx/ui_next/src/screens/Project/shared/ProjectForm.jsx @@ -4,20 +4,23 @@ import PropTypes from 'prop-types'; import { withI18n } from '@lingui/react'; import { t } from '@lingui/macro'; import { Formik, useField } from 'formik'; -import { Config } from '@contexts/Config'; import { Form, FormGroup, Title } from '@patternfly/react-core'; -import AnsibleSelect from '@components/AnsibleSelect'; -import ContentError from '@components/ContentError'; -import ContentLoading from '@components/ContentLoading'; -import FormActionGroup from '@components/FormActionGroup/FormActionGroup'; +import { Config } from '../../../contexts/Config'; +import AnsibleSelect from '../../../components/AnsibleSelect'; +import ContentError from '../../../components/ContentError'; +import ContentLoading from '../../../components/ContentLoading'; +import FormActionGroup from '../../../components/FormActionGroup/FormActionGroup'; import FormField, { FieldTooltip, FormSubmitError, -} from '@components/FormField'; -import OrganizationLookup from '@components/Lookup/OrganizationLookup'; -import { CredentialTypesAPI, ProjectsAPI } from '@api'; -import { required } from '@util/validators'; -import { FormColumnLayout, SubFormLayout } from '@components/FormLayout'; +} from '../../../components/FormField'; +import OrganizationLookup from '../../../components/Lookup/OrganizationLookup'; +import { CredentialTypesAPI, ProjectsAPI } from '../../../api'; +import { required } from '../../../util/validators'; +import { + FormColumnLayout, + SubFormLayout, +} from '../../../components/FormLayout'; import { GitSubForm, HgSubForm, diff --git a/awx/ui_next/src/screens/Project/shared/ProjectForm.test.jsx b/awx/ui_next/src/screens/Project/shared/ProjectForm.test.jsx index e2d82c6653..d354653f41 100644 --- a/awx/ui_next/src/screens/Project/shared/ProjectForm.test.jsx +++ b/awx/ui_next/src/screens/Project/shared/ProjectForm.test.jsx @@ -1,10 +1,13 @@ import React from 'react'; import { act } from 'react-dom/test-utils'; -import { mountWithContexts, waitForElement } from '@testUtils/enzymeHelpers'; +import { + mountWithContexts, + waitForElement, +} from '../../../../testUtils/enzymeHelpers'; import ProjectForm from './ProjectForm'; -import { CredentialTypesAPI, ProjectsAPI } from '@api'; +import { CredentialTypesAPI, ProjectsAPI } from '../../../api'; -jest.mock('@api'); +jest.mock('../../../api'); describe('', () => { let wrapper; diff --git a/awx/ui_next/src/screens/Project/shared/ProjectSubForms/GitSubForm.jsx b/awx/ui_next/src/screens/Project/shared/ProjectSubForms/GitSubForm.jsx index 21695e45d9..69c54cbb73 100644 --- a/awx/ui_next/src/screens/Project/shared/ProjectSubForms/GitSubForm.jsx +++ b/awx/ui_next/src/screens/Project/shared/ProjectSubForms/GitSubForm.jsx @@ -1,7 +1,7 @@ import React from 'react'; import { withI18n } from '@lingui/react'; import { t } from '@lingui/macro'; -import FormField from '@components/FormField'; +import FormField from '../../../../components/FormField'; import { UrlFormField, BranchFormField, diff --git a/awx/ui_next/src/screens/Project/shared/ProjectSubForms/InsightsSubForm.jsx b/awx/ui_next/src/screens/Project/shared/ProjectSubForms/InsightsSubForm.jsx index e0b50a2844..8504feed7b 100644 --- a/awx/ui_next/src/screens/Project/shared/ProjectSubForms/InsightsSubForm.jsx +++ b/awx/ui_next/src/screens/Project/shared/ProjectSubForms/InsightsSubForm.jsx @@ -2,8 +2,8 @@ import React from 'react'; import { withI18n } from '@lingui/react'; import { t } from '@lingui/macro'; import { useField } from 'formik'; -import CredentialLookup from '@components/Lookup/CredentialLookup'; -import { required } from '@util/validators'; +import CredentialLookup from '../../../../components/Lookup/CredentialLookup'; +import { required } from '../../../../util/validators'; import { ScmTypeOptions } from './SharedFields'; const InsightsSubForm = ({ diff --git a/awx/ui_next/src/screens/Project/shared/ProjectSubForms/ManualSubForm.jsx b/awx/ui_next/src/screens/Project/shared/ProjectSubForms/ManualSubForm.jsx index d8664654fb..a5bdaefcfd 100644 --- a/awx/ui_next/src/screens/Project/shared/ProjectSubForms/ManualSubForm.jsx +++ b/awx/ui_next/src/screens/Project/shared/ProjectSubForms/ManualSubForm.jsx @@ -2,10 +2,10 @@ import React from 'react'; import { withI18n } from '@lingui/react'; import { t } from '@lingui/macro'; import { useField } from 'formik'; -import { required } from '@util/validators'; -import AnsibleSelect from '@components/AnsibleSelect'; -import FormField, { FieldTooltip } from '@components/FormField'; import { FormGroup, Alert } from '@patternfly/react-core'; +import { required } from '../../../../util/validators'; +import AnsibleSelect from '../../../../components/AnsibleSelect'; +import FormField, { FieldTooltip } from '../../../../components/FormField'; import { BrandName } from '../../../../variables'; // Setting BrandName to a variable here is necessary to get the jest tests diff --git a/awx/ui_next/src/screens/Project/shared/ProjectSubForms/SharedFields.jsx b/awx/ui_next/src/screens/Project/shared/ProjectSubForms/SharedFields.jsx index fe3b1f934d..0833c9e49d 100644 --- a/awx/ui_next/src/screens/Project/shared/ProjectSubForms/SharedFields.jsx +++ b/awx/ui_next/src/screens/Project/shared/ProjectSubForms/SharedFields.jsx @@ -2,14 +2,14 @@ import React from 'react'; import { withI18n } from '@lingui/react'; import { t } from '@lingui/macro'; import { useField } from 'formik'; -import CredentialLookup from '@components/Lookup/CredentialLookup'; -import FormField, { CheckboxField } from '@components/FormField'; -import { required } from '@util/validators'; import { FormGroup, Title } from '@patternfly/react-core'; +import CredentialLookup from '../../../../components/Lookup/CredentialLookup'; +import FormField, { CheckboxField } from '../../../../components/FormField'; +import { required } from '../../../../util/validators'; import { FormCheckboxLayout, FormFullWidthLayout, -} from '@components/FormLayout'; +} from '../../../../components/FormLayout'; export const UrlFormField = withI18n()(({ i18n, tooltip }) => ( { ProjectsAPI.readSync.mockResolvedValue({ diff --git a/awx/ui_next/src/screens/Schedule/AllSchedules.jsx b/awx/ui_next/src/screens/Schedule/AllSchedules.jsx index 1f7ffa3188..82c23c4155 100644 --- a/awx/ui_next/src/screens/Schedule/AllSchedules.jsx +++ b/awx/ui_next/src/screens/Schedule/AllSchedules.jsx @@ -3,10 +3,10 @@ import { Route, Switch } from 'react-router-dom'; import { withI18n } from '@lingui/react'; import { t } from '@lingui/macro'; -import Breadcrumbs from '@components/Breadcrumbs'; -import { ScheduleList } from '@components/Schedule'; -import { SchedulesAPI } from '@api'; import { PageSection, Card } from '@patternfly/react-core'; +import Breadcrumbs from '../../components/Breadcrumbs'; +import { ScheduleList } from '../../components/Schedule'; +import { SchedulesAPI } from '../../api'; function AllSchedules({ i18n }) { const loadScheduleOptions = () => { diff --git a/awx/ui_next/src/screens/Schedule/AllSchedules.test.jsx b/awx/ui_next/src/screens/Schedule/AllSchedules.test.jsx index 50e4b76f66..5aa4b3ba1c 100644 --- a/awx/ui_next/src/screens/Schedule/AllSchedules.test.jsx +++ b/awx/ui_next/src/screens/Schedule/AllSchedules.test.jsx @@ -1,6 +1,6 @@ import React from 'react'; -import { mountWithContexts } from '@testUtils/enzymeHelpers'; import { createMemoryHistory } from 'history'; +import { mountWithContexts } from '../../../testUtils/enzymeHelpers'; import AllSchedules from './AllSchedules'; describe('', () => { diff --git a/awx/ui_next/src/screens/SystemSetting/SystemSettings.test.jsx b/awx/ui_next/src/screens/SystemSetting/SystemSettings.test.jsx index c09b8db772..2a909f36c7 100644 --- a/awx/ui_next/src/screens/SystemSetting/SystemSettings.test.jsx +++ b/awx/ui_next/src/screens/SystemSetting/SystemSettings.test.jsx @@ -1,6 +1,6 @@ import React from 'react'; -import { mountWithContexts } from '@testUtils/enzymeHelpers'; +import { mountWithContexts } from '../../../testUtils/enzymeHelpers'; import SystemSettings from './SystemSettings'; diff --git a/awx/ui_next/src/screens/Team/Team.jsx b/awx/ui_next/src/screens/Team/Team.jsx index 48cc13c02c..b7e878b415 100644 --- a/awx/ui_next/src/screens/Team/Team.jsx +++ b/awx/ui_next/src/screens/Team/Team.jsx @@ -10,13 +10,13 @@ import { useParams, } from 'react-router-dom'; import { Card, CardActions, PageSection } from '@patternfly/react-core'; -import CardCloseButton from '@components/CardCloseButton'; -import { TabbedCardHeader } from '@components/Card'; -import RoutedTabs from '@components/RoutedTabs'; -import ContentError from '@components/ContentError'; +import CardCloseButton from '../../components/CardCloseButton'; +import { TabbedCardHeader } from '../../components/Card'; +import RoutedTabs from '../../components/RoutedTabs'; +import ContentError from '../../components/ContentError'; import TeamDetail from './TeamDetail'; import TeamEdit from './TeamEdit'; -import { TeamsAPI } from '@api'; +import { TeamsAPI } from '../../api'; import TeamAccessList from './TeamAccess'; function Team({ i18n, setBreadcrumb }) { diff --git a/awx/ui_next/src/screens/Team/Team.test.jsx b/awx/ui_next/src/screens/Team/Team.test.jsx index 946b7e77f5..d25d8978a8 100644 --- a/awx/ui_next/src/screens/Team/Team.test.jsx +++ b/awx/ui_next/src/screens/Team/Team.test.jsx @@ -1,11 +1,14 @@ import React from 'react'; import { act } from 'react-dom/test-utils'; import { createMemoryHistory } from 'history'; -import { TeamsAPI } from '@api'; -import { mountWithContexts, waitForElement } from '@testUtils/enzymeHelpers'; +import { TeamsAPI } from '../../api'; +import { + mountWithContexts, + waitForElement, +} from '../../../testUtils/enzymeHelpers'; import Team from './Team'; -jest.mock('@api'); +jest.mock('../../api'); const mockMe = { is_super_user: true, diff --git a/awx/ui_next/src/screens/Team/TeamAccess/TeamAccessList.jsx b/awx/ui_next/src/screens/Team/TeamAccess/TeamAccessList.jsx index 7d2cea1a72..c7cadc1fe6 100644 --- a/awx/ui_next/src/screens/Team/TeamAccess/TeamAccessList.jsx +++ b/awx/ui_next/src/screens/Team/TeamAccess/TeamAccessList.jsx @@ -4,15 +4,15 @@ import { useLocation, useRouteMatch, useParams } from 'react-router-dom'; import { withI18n } from '@lingui/react'; import { t } from '@lingui/macro'; -import { TeamsAPI } from '@api'; +import { TeamsAPI } from '../../../api'; import { Card } from '@patternfly/react-core'; -import useRequest from '@util/useRequest'; -import DataListToolbar from '@components/DataListToolbar'; +import useRequest from '../../../util/useRequest'; +import DataListToolbar from '../../../components/DataListToolbar'; import PaginatedDataList, { ToolbarAddButton, -} from '@components/PaginatedDataList'; -import { getQSConfig, parseQueryString } from '@util/qs'; +} from '../../../components/PaginatedDataList'; +import { getQSConfig, parseQueryString } from '../../../util/qs'; import TeamAccessListItem from './TeamAccessListItem'; const QS_CONFIG = getQSConfig('team', { diff --git a/awx/ui_next/src/screens/Team/TeamAccess/TeamAccessList.test.jsx b/awx/ui_next/src/screens/Team/TeamAccess/TeamAccessList.test.jsx index 12d8e9cf39..fba2bb0d23 100644 --- a/awx/ui_next/src/screens/Team/TeamAccess/TeamAccessList.test.jsx +++ b/awx/ui_next/src/screens/Team/TeamAccess/TeamAccessList.test.jsx @@ -1,12 +1,12 @@ import React from 'react'; import { act } from 'react-dom/test-utils'; import { createMemoryHistory } from 'history'; -import { TeamsAPI } from '@api'; +import { TeamsAPI } from '../../../api'; import { Route } from 'react-router-dom'; -import { mountWithContexts, waitForElement } from '@testUtils/enzymeHelpers'; +import { mountWithContexts, waitForElement } from '../../../../testUtils/enzymeHelpers'; import TeamAccessList from './TeamAccessList'; -jest.mock('@api/models/Teams'); +jest.mock('../../../api/models/Teams'); describe('', () => { let wrapper; let history; diff --git a/awx/ui_next/src/screens/Team/TeamAccess/TeamAccessListItem.jsx b/awx/ui_next/src/screens/Team/TeamAccess/TeamAccessListItem.jsx index 994c175ecd..838163b144 100644 --- a/awx/ui_next/src/screens/Team/TeamAccess/TeamAccessListItem.jsx +++ b/awx/ui_next/src/screens/Team/TeamAccess/TeamAccessListItem.jsx @@ -6,7 +6,7 @@ import { DataListItemCells, DataListItemRow, } from '@patternfly/react-core'; -import DataListCell from '@components/DataListCell'; +import DataListCell from '../../../components/DataListCell'; import { Link } from 'react-router-dom'; diff --git a/awx/ui_next/src/screens/Team/TeamAccess/TeamAccessListItem.test.jsx b/awx/ui_next/src/screens/Team/TeamAccess/TeamAccessListItem.test.jsx index 45d40e08a1..543f789f0f 100644 --- a/awx/ui_next/src/screens/Team/TeamAccess/TeamAccessListItem.test.jsx +++ b/awx/ui_next/src/screens/Team/TeamAccess/TeamAccessListItem.test.jsx @@ -1,5 +1,5 @@ import React from 'react'; -import { mountWithContexts } from '@testUtils/enzymeHelpers'; +import { mountWithContexts } from '../../../../testUtils/enzymeHelpers'; import TeamAccessListItem from './TeamAccessListItem'; describe('', () => { diff --git a/awx/ui_next/src/screens/Team/TeamAdd/TeamAdd.jsx b/awx/ui_next/src/screens/Team/TeamAdd/TeamAdd.jsx index d9488b39c4..2cd3278057 100644 --- a/awx/ui_next/src/screens/Team/TeamAdd/TeamAdd.jsx +++ b/awx/ui_next/src/screens/Team/TeamAdd/TeamAdd.jsx @@ -2,9 +2,9 @@ import React from 'react'; import { withRouter } from 'react-router-dom'; import { PageSection, Card } from '@patternfly/react-core'; -import { TeamsAPI } from '@api'; -import { Config } from '@contexts/Config'; -import { CardBody } from '@components/Card'; +import { TeamsAPI } from '../../../api'; +import { Config } from '../../../contexts/Config'; +import { CardBody } from '../../../components/Card'; import TeamForm from '../shared/TeamForm'; class TeamAdd extends React.Component { diff --git a/awx/ui_next/src/screens/Team/TeamAdd/TeamAdd.test.jsx b/awx/ui_next/src/screens/Team/TeamAdd/TeamAdd.test.jsx index 7d1eddeabf..da61ff2c24 100644 --- a/awx/ui_next/src/screens/Team/TeamAdd/TeamAdd.test.jsx +++ b/awx/ui_next/src/screens/Team/TeamAdd/TeamAdd.test.jsx @@ -1,11 +1,14 @@ import React from 'react'; import { act } from 'react-dom/test-utils'; import { createMemoryHistory } from 'history'; -import { mountWithContexts, waitForElement } from '@testUtils/enzymeHelpers'; +import { + mountWithContexts, + waitForElement, +} from '../../../../testUtils/enzymeHelpers'; import TeamAdd from './TeamAdd'; -import { TeamsAPI } from '@api'; +import { TeamsAPI } from '../../../api'; -jest.mock('@api'); +jest.mock('../../../api'); describe('', () => { test('handleSubmit should post to api', async () => { diff --git a/awx/ui_next/src/screens/Team/TeamDetail/TeamDetail.jsx b/awx/ui_next/src/screens/Team/TeamDetail/TeamDetail.jsx index 9383ca148c..f607800fcd 100644 --- a/awx/ui_next/src/screens/Team/TeamDetail/TeamDetail.jsx +++ b/awx/ui_next/src/screens/Team/TeamDetail/TeamDetail.jsx @@ -4,14 +4,14 @@ import { withI18n } from '@lingui/react'; import { t } from '@lingui/macro'; import { Button } from '@patternfly/react-core'; -import AlertModal from '@components/AlertModal'; -import { CardBody, CardActionsRow } from '@components/Card'; -import ContentLoading from '@components/ContentLoading'; -import DeleteButton from '@components/DeleteButton'; -import { DetailList, Detail } from '@components/DetailList'; -import ErrorDetail from '@components/ErrorDetail'; -import { formatDateString } from '@util/dates'; -import { TeamsAPI } from '@api'; +import AlertModal from '../../../components/AlertModal'; +import { CardBody, CardActionsRow } from '../../../components/Card'; +import ContentLoading from '../../../components/ContentLoading'; +import DeleteButton from '../../../components/DeleteButton'; +import { DetailList, Detail } from '../../../components/DetailList'; +import ErrorDetail from '../../../components/ErrorDetail'; +import { formatDateString } from '../../../util/dates'; +import { TeamsAPI } from '../../../api'; function TeamDetail({ team, i18n }) { const { name, description, created, modified, summary_fields } = team; diff --git a/awx/ui_next/src/screens/Team/TeamDetail/TeamDetail.test.jsx b/awx/ui_next/src/screens/Team/TeamDetail/TeamDetail.test.jsx index 0942dabed2..a3c3bd7796 100644 --- a/awx/ui_next/src/screens/Team/TeamDetail/TeamDetail.test.jsx +++ b/awx/ui_next/src/screens/Team/TeamDetail/TeamDetail.test.jsx @@ -1,10 +1,13 @@ import React from 'react'; import { act } from 'react-dom/test-utils'; -import { mountWithContexts, waitForElement } from '@testUtils/enzymeHelpers'; +import { + mountWithContexts, + waitForElement, +} from '../../../../testUtils/enzymeHelpers'; import TeamDetail from './TeamDetail'; -import { TeamsAPI } from '@api'; +import { TeamsAPI } from '../../../api'; -jest.mock('@api'); +jest.mock('../../../api'); describe('', () => { let wrapper; diff --git a/awx/ui_next/src/screens/Team/TeamEdit/TeamEdit.jsx b/awx/ui_next/src/screens/Team/TeamEdit/TeamEdit.jsx index b7d05030af..84d01c2341 100644 --- a/awx/ui_next/src/screens/Team/TeamEdit/TeamEdit.jsx +++ b/awx/ui_next/src/screens/Team/TeamEdit/TeamEdit.jsx @@ -1,10 +1,10 @@ import React, { useState } from 'react'; import PropTypes from 'prop-types'; import { useHistory } from 'react-router-dom'; -import { CardBody } from '@components/Card'; +import { CardBody } from '../../../components/Card'; -import { TeamsAPI } from '@api'; -import { Config } from '@contexts/Config'; +import { TeamsAPI } from '../../../api'; +import { Config } from '../../../contexts/Config'; import TeamForm from '../shared/TeamForm'; diff --git a/awx/ui_next/src/screens/Team/TeamEdit/TeamEdit.test.jsx b/awx/ui_next/src/screens/Team/TeamEdit/TeamEdit.test.jsx index 529e57ed84..82b980ba7b 100644 --- a/awx/ui_next/src/screens/Team/TeamEdit/TeamEdit.test.jsx +++ b/awx/ui_next/src/screens/Team/TeamEdit/TeamEdit.test.jsx @@ -1,11 +1,11 @@ import React from 'react'; import { act } from 'react-dom/test-utils'; import { createMemoryHistory } from 'history'; -import { TeamsAPI } from '@api'; -import { mountWithContexts } from '@testUtils/enzymeHelpers'; +import { TeamsAPI } from '../../../api'; +import { mountWithContexts } from '../../../../testUtils/enzymeHelpers'; import TeamEdit from './TeamEdit'; -jest.mock('@api'); +jest.mock('../../../api'); describe('', () => { const mockData = { diff --git a/awx/ui_next/src/screens/Team/TeamList/TeamList.jsx b/awx/ui_next/src/screens/Team/TeamList/TeamList.jsx index 261bfb2641..5dc6580274 100644 --- a/awx/ui_next/src/screens/Team/TeamList/TeamList.jsx +++ b/awx/ui_next/src/screens/Team/TeamList/TeamList.jsx @@ -4,16 +4,16 @@ import { withI18n } from '@lingui/react'; import { t } from '@lingui/macro'; import { Card, PageSection } from '@patternfly/react-core'; -import { TeamsAPI } from '@api'; -import useRequest, { useDeleteItems } from '@util/useRequest'; -import AlertModal from '@components/AlertModal'; -import DataListToolbar from '@components/DataListToolbar'; -import ErrorDetail from '@components/ErrorDetail'; +import { TeamsAPI } from '../../../api'; +import useRequest, { useDeleteItems } from '../../../util/useRequest'; +import AlertModal from '../../../components/AlertModal'; +import DataListToolbar from '../../../components/DataListToolbar'; +import ErrorDetail from '../../../components/ErrorDetail'; import PaginatedDataList, { ToolbarAddButton, ToolbarDeleteButton, -} from '@components/PaginatedDataList'; -import { getQSConfig, parseQueryString } from '@util/qs'; +} from '../../../components/PaginatedDataList'; +import { getQSConfig, parseQueryString } from '../../../util/qs'; import TeamListItem from './TeamListItem'; diff --git a/awx/ui_next/src/screens/Team/TeamList/TeamList.test.jsx b/awx/ui_next/src/screens/Team/TeamList/TeamList.test.jsx index da6520581b..8ecf1d4383 100644 --- a/awx/ui_next/src/screens/Team/TeamList/TeamList.test.jsx +++ b/awx/ui_next/src/screens/Team/TeamList/TeamList.test.jsx @@ -1,11 +1,11 @@ import React from 'react'; import { act } from 'react-dom/test-utils'; -import { TeamsAPI } from '@api'; -import { mountWithContexts } from '@testUtils/enzymeHelpers'; +import { TeamsAPI } from '../../../api'; +import { mountWithContexts } from '../../../../testUtils/enzymeHelpers'; import TeamList from './TeamList'; -jest.mock('@api'); +jest.mock('../../../api'); const mockAPITeamList = { data: { diff --git a/awx/ui_next/src/screens/Team/TeamList/TeamListItem.jsx b/awx/ui_next/src/screens/Team/TeamList/TeamListItem.jsx index 002fe6b446..d3752cbaeb 100644 --- a/awx/ui_next/src/screens/Team/TeamList/TeamListItem.jsx +++ b/awx/ui_next/src/screens/Team/TeamList/TeamListItem.jsx @@ -11,13 +11,13 @@ import { DataListItemRow, Tooltip, } from '@patternfly/react-core'; -import DataListCell from '@components/DataListCell'; import styled from 'styled-components'; import { Link } from 'react-router-dom'; import { PencilAltIcon } from '@patternfly/react-icons'; +import DataListCell from '../../../components/DataListCell'; -import { Team } from '@types'; +import { Team } from '../../../types'; const DataListAction = styled(_DataListAction)` align-items: center; diff --git a/awx/ui_next/src/screens/Team/TeamList/TeamListItem.test.jsx b/awx/ui_next/src/screens/Team/TeamList/TeamListItem.test.jsx index 73d9329c7e..ffc2af1f35 100644 --- a/awx/ui_next/src/screens/Team/TeamList/TeamListItem.test.jsx +++ b/awx/ui_next/src/screens/Team/TeamList/TeamListItem.test.jsx @@ -2,7 +2,7 @@ import React from 'react'; import { MemoryRouter } from 'react-router-dom'; import { I18nProvider } from '@lingui/react'; -import { mountWithContexts } from '@testUtils/enzymeHelpers'; +import { mountWithContexts } from '../../../../testUtils/enzymeHelpers'; import TeamListItem from './TeamListItem'; diff --git a/awx/ui_next/src/screens/Team/Teams.jsx b/awx/ui_next/src/screens/Team/Teams.jsx index 73368c85a2..3022ca98c7 100644 --- a/awx/ui_next/src/screens/Team/Teams.jsx +++ b/awx/ui_next/src/screens/Team/Teams.jsx @@ -3,8 +3,8 @@ import { Route, Switch } from 'react-router-dom'; import { withI18n } from '@lingui/react'; import { t } from '@lingui/macro'; -import { Config } from '@contexts/Config'; -import Breadcrumbs from '@components/Breadcrumbs'; +import { Config } from '../../contexts/Config'; +import Breadcrumbs from '../../components/Breadcrumbs'; import TeamList from './TeamList'; import TeamAdd from './TeamAdd'; import Team from './Team'; diff --git a/awx/ui_next/src/screens/Team/Teams.test.jsx b/awx/ui_next/src/screens/Team/Teams.test.jsx index 5a444e6977..db73b4d7d4 100644 --- a/awx/ui_next/src/screens/Team/Teams.test.jsx +++ b/awx/ui_next/src/screens/Team/Teams.test.jsx @@ -1,8 +1,8 @@ import React from 'react'; -import { mountWithContexts } from '@testUtils/enzymeHelpers'; +import { mountWithContexts } from '../../../testUtils/enzymeHelpers'; import Teams from './Teams'; -jest.mock('@api'); +jest.mock('../../api'); describe('', () => { test('initially renders succesfully', () => { diff --git a/awx/ui_next/src/screens/Team/shared/TeamForm.jsx b/awx/ui_next/src/screens/Team/shared/TeamForm.jsx index 480fa26975..20711f4539 100644 --- a/awx/ui_next/src/screens/Team/shared/TeamForm.jsx +++ b/awx/ui_next/src/screens/Team/shared/TeamForm.jsx @@ -4,11 +4,11 @@ import { withI18n } from '@lingui/react'; import { t } from '@lingui/macro'; import { Formik, useField } from 'formik'; import { Form } from '@patternfly/react-core'; -import FormActionGroup from '@components/FormActionGroup/FormActionGroup'; -import FormField, { FormSubmitError } from '@components/FormField'; -import OrganizationLookup from '@components/Lookup/OrganizationLookup'; -import { required } from '@util/validators'; -import { FormColumnLayout } from '@components/FormLayout'; +import FormActionGroup from '../../../components/FormActionGroup/FormActionGroup'; +import FormField, { FormSubmitError } from '../../../components/FormField'; +import OrganizationLookup from '../../../components/Lookup/OrganizationLookup'; +import { required } from '../../../util/validators'; +import { FormColumnLayout } from '../../../components/FormLayout'; function TeamFormFields(props) { const { team, i18n } = props; diff --git a/awx/ui_next/src/screens/Team/shared/TeamForm.test.jsx b/awx/ui_next/src/screens/Team/shared/TeamForm.test.jsx index 83c643e288..c11f78a4a5 100644 --- a/awx/ui_next/src/screens/Team/shared/TeamForm.test.jsx +++ b/awx/ui_next/src/screens/Team/shared/TeamForm.test.jsx @@ -1,10 +1,13 @@ import React from 'react'; import { act } from 'react-dom/test-utils'; -import { mountWithContexts, waitForElement } from '@testUtils/enzymeHelpers'; +import { + mountWithContexts, + waitForElement, +} from '../../../../testUtils/enzymeHelpers'; import TeamForm from './TeamForm'; -jest.mock('@api'); +jest.mock('../../../api'); describe('', () => { let wrapper; diff --git a/awx/ui_next/src/screens/Template/JobTemplateAdd/JobTemplateAdd.jsx b/awx/ui_next/src/screens/Template/JobTemplateAdd/JobTemplateAdd.jsx index 0b959320fa..a0a594feca 100644 --- a/awx/ui_next/src/screens/Template/JobTemplateAdd/JobTemplateAdd.jsx +++ b/awx/ui_next/src/screens/Template/JobTemplateAdd/JobTemplateAdd.jsx @@ -1,9 +1,9 @@ import React, { useState } from 'react'; import { useHistory } from 'react-router-dom'; import { Card, PageSection } from '@patternfly/react-core'; -import { CardBody } from '@components/Card'; +import { CardBody } from '../../../components/Card'; import JobTemplateForm from '../shared/JobTemplateForm'; -import { JobTemplatesAPI, OrganizationsAPI } from '@api'; +import { JobTemplatesAPI, OrganizationsAPI } from '../../../api'; function JobTemplateAdd() { const [formSubmitError, setFormSubmitError] = useState(null); diff --git a/awx/ui_next/src/screens/Template/JobTemplateAdd/JobTemplateAdd.test.jsx b/awx/ui_next/src/screens/Template/JobTemplateAdd/JobTemplateAdd.test.jsx index dbc55e8580..be02a5aa6d 100644 --- a/awx/ui_next/src/screens/Template/JobTemplateAdd/JobTemplateAdd.test.jsx +++ b/awx/ui_next/src/screens/Template/JobTemplateAdd/JobTemplateAdd.test.jsx @@ -1,11 +1,14 @@ import React from 'react'; import { act } from 'react-dom/test-utils'; import { createMemoryHistory } from 'history'; -import { mountWithContexts, waitForElement } from '@testUtils/enzymeHelpers'; +import { + mountWithContexts, + waitForElement, +} from '../../../../testUtils/enzymeHelpers'; import JobTemplateAdd from './JobTemplateAdd'; -import { JobTemplatesAPI, LabelsAPI } from '@api'; +import { JobTemplatesAPI, LabelsAPI } from '../../../api'; -jest.mock('@api'); +jest.mock('../../../api'); const jobTemplateData = { allow_callbacks: false, diff --git a/awx/ui_next/src/screens/Template/JobTemplateDetail/JobTemplateDetail.jsx b/awx/ui_next/src/screens/Template/JobTemplateDetail/JobTemplateDetail.jsx index 344b7f38dd..dbba89012b 100644 --- a/awx/ui_next/src/screens/Template/JobTemplateDetail/JobTemplateDetail.jsx +++ b/awx/ui_next/src/screens/Template/JobTemplateDetail/JobTemplateDetail.jsx @@ -12,23 +12,23 @@ import { } from '@patternfly/react-core'; import { t } from '@lingui/macro'; -import AlertModal from '@components/AlertModal'; -import { CardBody, CardActionsRow } from '@components/Card'; -import ChipGroup from '@components/ChipGroup'; -import ContentError from '@components/ContentError'; -import ContentLoading from '@components/ContentLoading'; -import CredentialChip from '@components/CredentialChip'; +import AlertModal from '../../../components/AlertModal'; +import { CardBody, CardActionsRow } from '../../../components/Card'; +import ChipGroup from '../../../components/ChipGroup'; +import ContentError from '../../../components/ContentError'; +import ContentLoading from '../../../components/ContentLoading'; +import CredentialChip from '../../../components/CredentialChip'; import { Detail, DetailList, DeletedDetail, UserDateDetail, -} from '@components/DetailList'; -import DeleteButton from '@components/DeleteButton'; -import ErrorDetail from '@components/ErrorDetail'; -import LaunchButton from '@components/LaunchButton'; -import { VariablesDetail } from '@components/CodeMirrorInput'; -import { JobTemplatesAPI } from '@api'; +} from '../../../components/DetailList'; +import DeleteButton from '../../../components/DeleteButton'; +import ErrorDetail from '../../../components/ErrorDetail'; +import LaunchButton from '../../../components/LaunchButton'; +import { VariablesDetail } from '../../../components/CodeMirrorInput'; +import { JobTemplatesAPI } from '../../../api'; function JobTemplateDetail({ i18n, template }) { const { diff --git a/awx/ui_next/src/screens/Template/JobTemplateDetail/JobTemplateDetail.test.jsx b/awx/ui_next/src/screens/Template/JobTemplateDetail/JobTemplateDetail.test.jsx index 8e382f8adc..a1fecf6f60 100644 --- a/awx/ui_next/src/screens/Template/JobTemplateDetail/JobTemplateDetail.test.jsx +++ b/awx/ui_next/src/screens/Template/JobTemplateDetail/JobTemplateDetail.test.jsx @@ -1,11 +1,14 @@ import React from 'react'; import { act } from 'react-dom/test-utils'; -import { mountWithContexts, waitForElement } from '@testUtils/enzymeHelpers'; +import { + mountWithContexts, + waitForElement, +} from '../../../../testUtils/enzymeHelpers'; import JobTemplateDetail from './JobTemplateDetail'; -import { JobTemplatesAPI } from '@api'; +import { JobTemplatesAPI } from '../../../api'; import mockTemplate from '../shared/data.job_template.json'; -jest.mock('@api'); +jest.mock('../../../api'); const mockInstanceGroups = { count: 5, diff --git a/awx/ui_next/src/screens/Template/JobTemplateEdit/JobTemplateEdit.jsx b/awx/ui_next/src/screens/Template/JobTemplateEdit/JobTemplateEdit.jsx index 9848f53006..8c8cb0f4b8 100644 --- a/awx/ui_next/src/screens/Template/JobTemplateEdit/JobTemplateEdit.jsx +++ b/awx/ui_next/src/screens/Template/JobTemplateEdit/JobTemplateEdit.jsx @@ -1,12 +1,12 @@ /* eslint react/no-unused-state: 0 */ import React, { Component } from 'react'; import { withRouter, Redirect } from 'react-router-dom'; -import { CardBody } from '@components/Card'; -import ContentError from '@components/ContentError'; -import ContentLoading from '@components/ContentLoading'; -import { JobTemplatesAPI, ProjectsAPI } from '@api'; -import { JobTemplate } from '@types'; -import { getAddedAndRemoved } from '@util/lists'; +import { CardBody } from '../../../components/Card'; +import ContentError from '../../../components/ContentError'; +import ContentLoading from '../../../components/ContentLoading'; +import { JobTemplatesAPI, ProjectsAPI } from '../../../api'; +import { JobTemplate } from '../../../types'; +import { getAddedAndRemoved } from '../../../util/lists'; import JobTemplateForm from '../shared/JobTemplateForm'; const loadRelatedProjectPlaybooks = async project => diff --git a/awx/ui_next/src/screens/Template/JobTemplateEdit/JobTemplateEdit.test.jsx b/awx/ui_next/src/screens/Template/JobTemplateEdit/JobTemplateEdit.test.jsx index 8a8d7131fc..b2dfd57eee 100644 --- a/awx/ui_next/src/screens/Template/JobTemplateEdit/JobTemplateEdit.test.jsx +++ b/awx/ui_next/src/screens/Template/JobTemplateEdit/JobTemplateEdit.test.jsx @@ -1,12 +1,15 @@ import React from 'react'; import { act } from 'react-dom/test-utils'; import { createMemoryHistory } from 'history'; -import { sleep } from '@testUtils/testUtils'; -import { mountWithContexts, waitForElement } from '@testUtils/enzymeHelpers'; -import { JobTemplatesAPI, LabelsAPI, ProjectsAPI } from '@api'; +import { sleep } from '../../../../testUtils/testUtils'; +import { + mountWithContexts, + waitForElement, +} from '../../../../testUtils/enzymeHelpers'; +import { JobTemplatesAPI, LabelsAPI, ProjectsAPI } from '../../../api'; import JobTemplateEdit from './JobTemplateEdit'; -jest.mock('@api'); +jest.mock('../../../api'); const mockJobTemplate = { allow_callbacks: false, diff --git a/awx/ui_next/src/screens/Template/Survey/SurveyList.jsx b/awx/ui_next/src/screens/Template/Survey/SurveyList.jsx index 9cfc946fa7..5d6b738a41 100644 --- a/awx/ui_next/src/screens/Template/Survey/SurveyList.jsx +++ b/awx/ui_next/src/screens/Template/Survey/SurveyList.jsx @@ -2,10 +2,10 @@ import React, { useState } from 'react'; import { withI18n } from '@lingui/react'; import { t } from '@lingui/macro'; import { DataList, Button as _Button } from '@patternfly/react-core'; -import ContentLoading from '@components/ContentLoading'; -import ContentEmpty from '@components/ContentEmpty'; -import AlertModal from '@components/AlertModal'; import styled from 'styled-components'; +import ContentLoading from '../../../components/ContentLoading'; +import ContentEmpty from '../../../components/ContentEmpty'; +import AlertModal from '../../../components/AlertModal'; import SurveyListItem from './SurveyListItem'; import SurveyToolbar from './SurveyToolbar'; diff --git a/awx/ui_next/src/screens/Template/Survey/SurveyList.test.jsx b/awx/ui_next/src/screens/Template/Survey/SurveyList.test.jsx index 0564010692..755956a5f4 100644 --- a/awx/ui_next/src/screens/Template/Survey/SurveyList.test.jsx +++ b/awx/ui_next/src/screens/Template/Survey/SurveyList.test.jsx @@ -1,11 +1,11 @@ import React from 'react'; import { act } from 'react-dom/test-utils'; -import { mountWithContexts } from '@testUtils/enzymeHelpers'; +import { mountWithContexts } from '../../../../testUtils/enzymeHelpers'; import SurveyList from './SurveyList'; -import { JobTemplatesAPI } from '@api'; +import { JobTemplatesAPI } from '../../../api'; import mockJobTemplateData from '../shared/data.job_template.json'; -jest.mock('@api/models/JobTemplates'); +jest.mock('../../../api/models/JobTemplates'); const surveyData = { name: 'Survey', diff --git a/awx/ui_next/src/screens/Template/Survey/SurveyListItem.jsx b/awx/ui_next/src/screens/Template/Survey/SurveyListItem.jsx index 4c8f73a5a1..6d3a3a8957 100644 --- a/awx/ui_next/src/screens/Template/Survey/SurveyListItem.jsx +++ b/awx/ui_next/src/screens/Template/Survey/SurveyListItem.jsx @@ -13,10 +13,11 @@ import { Stack, StackItem, } from '@patternfly/react-core'; -import DataListCell from '@components/DataListCell'; -import ChipGroup from '@components/ChipGroup'; +import DataListCell from '../../../components/DataListCell'; +import ChipGroup from '../../../components/ChipGroup'; import { CaretDownIcon, CaretUpIcon } from '@patternfly/react-icons'; import styled from 'styled-components'; +import DataListCell from '../../../components/DataListCell'; const DataListAction = styled(_DataListAction)` margin-left: 0; diff --git a/awx/ui_next/src/screens/Template/Survey/SurveyListItem.test.jsx b/awx/ui_next/src/screens/Template/Survey/SurveyListItem.test.jsx index af5b7e82c2..d8caa30efc 100644 --- a/awx/ui_next/src/screens/Template/Survey/SurveyListItem.test.jsx +++ b/awx/ui_next/src/screens/Template/Survey/SurveyListItem.test.jsx @@ -1,6 +1,6 @@ import React from 'react'; import { act } from 'react-dom/test-utils'; -import { mountWithContexts } from '@testUtils/enzymeHelpers'; +import { mountWithContexts } from '../../../../testUtils/enzymeHelpers'; import SurveyListItem from './SurveyListItem'; describe('', () => { diff --git a/awx/ui_next/src/screens/Template/Survey/SurveyPreviewModal.jsx b/awx/ui_next/src/screens/Template/Survey/SurveyPreviewModal.jsx index ed13f8fd8c..e9d8f0a1d2 100644 --- a/awx/ui_next/src/screens/Template/Survey/SurveyPreviewModal.jsx +++ b/awx/ui_next/src/screens/Template/Survey/SurveyPreviewModal.jsx @@ -1,7 +1,6 @@ import React from 'react'; import { withI18n } from '@lingui/react'; import { t } from '@lingui/macro'; -import { PasswordField } from '@components/FormField'; import { Formik } from 'formik'; import { @@ -14,6 +13,7 @@ import { SelectOption, SelectVariant, } from '@patternfly/react-core'; +import { PasswordField } from '../../../components/FormField'; function SurveyPreviewModal({ questions, diff --git a/awx/ui_next/src/screens/Template/Survey/SurveyPreviewModal.test.jsx b/awx/ui_next/src/screens/Template/Survey/SurveyPreviewModal.test.jsx index 2ba1fa87b5..ec56a7c7b7 100644 --- a/awx/ui_next/src/screens/Template/Survey/SurveyPreviewModal.test.jsx +++ b/awx/ui_next/src/screens/Template/Survey/SurveyPreviewModal.test.jsx @@ -1,6 +1,9 @@ import React from 'react'; import { act } from 'react-dom/test-utils'; -import { waitForElement, mountWithContexts } from '@testUtils/enzymeHelpers'; +import { + waitForElement, + mountWithContexts, +} from '../../../../testUtils/enzymeHelpers'; import SurveyPreviewModal from './SurveyPreviewModal'; diff --git a/awx/ui_next/src/screens/Template/Survey/SurveyQuestionAdd.jsx b/awx/ui_next/src/screens/Template/Survey/SurveyQuestionAdd.jsx index 009c295bf7..72ed7644e9 100644 --- a/awx/ui_next/src/screens/Template/Survey/SurveyQuestionAdd.jsx +++ b/awx/ui_next/src/screens/Template/Survey/SurveyQuestionAdd.jsx @@ -1,6 +1,6 @@ import React, { useState } from 'react'; import { useHistory, useRouteMatch } from 'react-router-dom'; -import { CardBody } from '@components/Card'; +import { CardBody } from '../../../components/Card'; import SurveyQuestionForm from './SurveyQuestionForm'; export default function SurveyQuestionAdd({ survey, updateSurvey }) { diff --git a/awx/ui_next/src/screens/Template/Survey/SurveyQuestionAdd.test.jsx b/awx/ui_next/src/screens/Template/Survey/SurveyQuestionAdd.test.jsx index 0d0e3bed5e..cd1344770f 100644 --- a/awx/ui_next/src/screens/Template/Survey/SurveyQuestionAdd.test.jsx +++ b/awx/ui_next/src/screens/Template/Survey/SurveyQuestionAdd.test.jsx @@ -1,6 +1,6 @@ import React from 'react'; -import { mountWithContexts } from '@testUtils/enzymeHelpers'; import { act } from 'react-dom/test-utils'; +import { mountWithContexts } from '../../../../testUtils/enzymeHelpers'; import SurveyQuestionAdd from './SurveyQuestionAdd'; const survey = { diff --git a/awx/ui_next/src/screens/Template/Survey/SurveyQuestionEdit.jsx b/awx/ui_next/src/screens/Template/Survey/SurveyQuestionEdit.jsx index 9c6ac6193a..18006a9c5b 100644 --- a/awx/ui_next/src/screens/Template/Survey/SurveyQuestionEdit.jsx +++ b/awx/ui_next/src/screens/Template/Survey/SurveyQuestionEdit.jsx @@ -1,7 +1,7 @@ import React, { useState } from 'react'; import { useHistory, useRouteMatch } from 'react-router-dom'; -import ContentLoading from '@components/ContentLoading'; -import { CardBody } from '@components/Card'; +import ContentLoading from '../../../components/ContentLoading'; +import { CardBody } from '../../../components/Card'; import SurveyQuestionForm from './SurveyQuestionForm'; export default function SurveyQuestionEdit({ survey, updateSurvey }) { diff --git a/awx/ui_next/src/screens/Template/Survey/SurveyQuestionEdit.test.jsx b/awx/ui_next/src/screens/Template/Survey/SurveyQuestionEdit.test.jsx index 25665b339d..d1bc79e992 100644 --- a/awx/ui_next/src/screens/Template/Survey/SurveyQuestionEdit.test.jsx +++ b/awx/ui_next/src/screens/Template/Survey/SurveyQuestionEdit.test.jsx @@ -1,8 +1,8 @@ import React from 'react'; -import { mountWithContexts } from '@testUtils/enzymeHelpers'; import { Switch, Route } from 'react-router-dom'; import { act } from 'react-dom/test-utils'; import { createMemoryHistory } from 'history'; +import { mountWithContexts } from '../../../../testUtils/enzymeHelpers'; import SurveyQuestionEdit from './SurveyQuestionEdit'; const survey = { diff --git a/awx/ui_next/src/screens/Template/Survey/SurveyQuestionForm.jsx b/awx/ui_next/src/screens/Template/Survey/SurveyQuestionForm.jsx index 3ff84fc23d..8b682ee86f 100644 --- a/awx/ui_next/src/screens/Template/Survey/SurveyQuestionForm.jsx +++ b/awx/ui_next/src/screens/Template/Survey/SurveyQuestionForm.jsx @@ -4,16 +4,21 @@ import { Formik, useField } from 'formik'; import { withI18n } from '@lingui/react'; import { t } from '@lingui/macro'; import { Form, FormGroup } from '@patternfly/react-core'; -import { FormColumnLayout } from '@components/FormLayout'; -import FormActionGroup from '@components/FormActionGroup/FormActionGroup'; +import { FormColumnLayout } from '../../../components/FormLayout'; +import FormActionGroup from '../../../components/FormActionGroup/FormActionGroup'; import FormField, { CheckboxField, PasswordField, FormSubmitError, FieldTooltip, -} from '@components/FormField'; -import AnsibleSelect from '@components/AnsibleSelect'; -import { required, noWhiteSpace, combine, maxLength } from '@util/validators'; +} from '../../../components/FormField'; +import AnsibleSelect from '../../../components/AnsibleSelect'; +import { + required, + noWhiteSpace, + combine, + maxLength, +} from '../../../util/validators'; function AnswerTypeField({ i18n }) { const [field] = useField({ diff --git a/awx/ui_next/src/screens/Template/Survey/SurveyQuestionForm.test.jsx b/awx/ui_next/src/screens/Template/Survey/SurveyQuestionForm.test.jsx index fb7111415f..5811135aeb 100644 --- a/awx/ui_next/src/screens/Template/Survey/SurveyQuestionForm.test.jsx +++ b/awx/ui_next/src/screens/Template/Survey/SurveyQuestionForm.test.jsx @@ -1,6 +1,6 @@ import React from 'react'; -import { mountWithContexts } from '@testUtils/enzymeHelpers'; import { act } from 'react-dom/test-utils'; +import { mountWithContexts } from '../../../../testUtils/enzymeHelpers'; import SurveyQuestionForm from './SurveyQuestionForm'; const question = { diff --git a/awx/ui_next/src/screens/Template/Survey/SurveyToolbar.jsx b/awx/ui_next/src/screens/Template/Survey/SurveyToolbar.jsx index 3dc82e67d4..af6144025a 100644 --- a/awx/ui_next/src/screens/Template/Survey/SurveyToolbar.jsx +++ b/awx/ui_next/src/screens/Template/Survey/SurveyToolbar.jsx @@ -11,7 +11,7 @@ import { DataToolbarItem, } from '@patternfly/react-core/dist/umd/experimental'; import { Switch, Checkbox, Button } from '@patternfly/react-core'; -import { ToolbarAddButton } from '@components/PaginatedDataList'; +import { ToolbarAddButton } from '../../../components/PaginatedDataList'; const DataToolbar = styled(_DataToolbar)` margin-left: 52px; diff --git a/awx/ui_next/src/screens/Template/Survey/SurveyToolbar.test.jsx b/awx/ui_next/src/screens/Template/Survey/SurveyToolbar.test.jsx index 8931c9a7ec..8fb4857525 100644 --- a/awx/ui_next/src/screens/Template/Survey/SurveyToolbar.test.jsx +++ b/awx/ui_next/src/screens/Template/Survey/SurveyToolbar.test.jsx @@ -1,9 +1,9 @@ import React from 'react'; -import { mountWithContexts } from '@testUtils/enzymeHelpers'; import { act } from 'react-dom/test-utils'; +import { mountWithContexts } from '../../../../testUtils/enzymeHelpers'; import SurveyToolbar from './SurveyToolbar'; -jest.mock('@api/models/JobTemplates'); +jest.mock('../../../api/models/JobTemplates'); describe('', () => { test('delete Button is disabled', () => { diff --git a/awx/ui_next/src/screens/Template/Template.jsx b/awx/ui_next/src/screens/Template/Template.jsx index 80e4df8539..7110f025fc 100644 --- a/awx/ui_next/src/screens/Template/Template.jsx +++ b/awx/ui_next/src/screens/Template/Template.jsx @@ -11,19 +11,19 @@ import { useParams, useRouteMatch, } from 'react-router-dom'; -import useRequest from '@util/useRequest'; +import useRequest from '../../util/useRequest'; -import { TabbedCardHeader } from '@components/Card'; -import CardCloseButton from '@components/CardCloseButton'; -import ContentError from '@components/ContentError'; -import JobList from '@components/JobList'; -import NotificationList from '@components/NotificationList'; -import RoutedTabs from '@components/RoutedTabs'; -import { Schedules } from '@components/Schedule'; -import { ResourceAccessList } from '@components/ResourceAccessList'; +import { TabbedCardHeader } from '../../components/Card'; +import CardCloseButton from '../../components/CardCloseButton'; +import ContentError from '../../components/ContentError'; +import JobList from '../../components/JobList'; +import NotificationList from '../../components/NotificationList'; +import RoutedTabs from '../../components/RoutedTabs'; +import { Schedules } from '../../components/Schedule'; +import { ResourceAccessList } from '../../components/ResourceAccessList'; import JobTemplateDetail from './JobTemplateDetail'; import JobTemplateEdit from './JobTemplateEdit'; -import { JobTemplatesAPI, OrganizationsAPI } from '@api'; +import { JobTemplatesAPI, OrganizationsAPI } from '../../api'; import TemplateSurvey from './TemplateSurvey'; function Template({ i18n, me, setBreadcrumb }) { diff --git a/awx/ui_next/src/screens/Template/Template.test.jsx b/awx/ui_next/src/screens/Template/Template.test.jsx index cebe757064..0495fdd9bf 100644 --- a/awx/ui_next/src/screens/Template/Template.test.jsx +++ b/awx/ui_next/src/screens/Template/Template.test.jsx @@ -1,14 +1,17 @@ import React from 'react'; import { createMemoryHistory } from 'history'; -import { JobTemplatesAPI, OrganizationsAPI } from '@api'; import { act } from 'react-dom/test-utils'; +import { JobTemplatesAPI, OrganizationsAPI } from '../../api'; -import { mountWithContexts, waitForElement } from '@testUtils/enzymeHelpers'; +import { + mountWithContexts, + waitForElement, +} from '../../../testUtils/enzymeHelpers'; import Template from './Template'; import mockJobTemplateData from './shared/data.job_template.json'; -jest.mock('@api/models/JobTemplates'); -jest.mock('@api/models/Organizations'); +jest.mock('../../api/models/JobTemplates'); +jest.mock('../../api/models/Organizations'); const mockMe = { is_super_user: true, diff --git a/awx/ui_next/src/screens/Template/TemplateList/TemplateList.jsx b/awx/ui_next/src/screens/Template/TemplateList/TemplateList.jsx index 707eac6684..5be5cf580f 100644 --- a/awx/ui_next/src/screens/Template/TemplateList/TemplateList.jsx +++ b/awx/ui_next/src/screens/Template/TemplateList/TemplateList.jsx @@ -8,17 +8,17 @@ import { JobTemplatesAPI, UnifiedJobTemplatesAPI, WorkflowJobTemplatesAPI, -} from '@api'; -import AlertModal from '@components/AlertModal'; -import DatalistToolbar from '@components/DataListToolbar'; -import ErrorDetail from '@components/ErrorDetail'; +} from '../../../api'; +import AlertModal from '../../../components/AlertModal'; +import DatalistToolbar from '../../../components/DataListToolbar'; +import ErrorDetail from '../../../components/ErrorDetail'; import PaginatedDataList, { ToolbarDeleteButton, -} from '@components/PaginatedDataList'; -import useRequest, { useDeleteItems } from '@util/useRequest'; -import { getQSConfig, parseQueryString } from '@util/qs'; +} from '../../../components/PaginatedDataList'; +import useRequest, { useDeleteItems } from '../../../util/useRequest'; +import { getQSConfig, parseQueryString } from '../../../util/qs'; -import AddDropDownButton from '@components/AddDropDownButton'; +import AddDropDownButton from '../../../components/AddDropDownButton'; import TemplateListItem from './TemplateListItem'; // The type value in const QS_CONFIG below does not have a space between job_template and diff --git a/awx/ui_next/src/screens/Template/TemplateList/TemplateList.test.jsx b/awx/ui_next/src/screens/Template/TemplateList/TemplateList.test.jsx index 568aeeca5a..b04ef9c35b 100644 --- a/awx/ui_next/src/screens/Template/TemplateList/TemplateList.test.jsx +++ b/awx/ui_next/src/screens/Template/TemplateList/TemplateList.test.jsx @@ -4,12 +4,15 @@ import { JobTemplatesAPI, UnifiedJobTemplatesAPI, WorkflowJobTemplatesAPI, -} from '@api'; -import { mountWithContexts, waitForElement } from '@testUtils/enzymeHelpers'; +} from '../../../api'; +import { + mountWithContexts, + waitForElement, +} from '../../../../testUtils/enzymeHelpers'; import TemplateList from './TemplateList'; -jest.mock('@api'); +jest.mock('../../../api'); const mockTemplates = [ { diff --git a/awx/ui_next/src/screens/Template/TemplateList/TemplateListItem.jsx b/awx/ui_next/src/screens/Template/TemplateList/TemplateListItem.jsx index b9dc712eec..0c244cd3de 100644 --- a/awx/ui_next/src/screens/Template/TemplateList/TemplateListItem.jsx +++ b/awx/ui_next/src/screens/Template/TemplateList/TemplateListItem.jsx @@ -9,8 +9,6 @@ import { DataListItemCells, Tooltip, } from '@patternfly/react-core'; -import DataListCell from '@components/DataListCell'; - import { t } from '@lingui/macro'; import { withI18n } from '@lingui/react'; import { @@ -18,14 +16,16 @@ import { PencilAltIcon, RocketIcon, } from '@patternfly/react-icons'; -import { timeOfDay } from '@util/dates'; - -import { JobTemplatesAPI, WorkflowJobTemplatesAPI } from '@api'; -import LaunchButton from '@components/LaunchButton'; -import Sparkline from '@components/Sparkline'; -import { toTitleCase } from '@util/strings'; import styled from 'styled-components'; -import CopyButton from '@components/CopyButton'; +import DataListCell from '../../../components/DataListCell'; + +import { timeOfDay } from '../../../util/dates'; + +import { JobTemplatesAPI, WorkflowJobTemplatesAPI } from '../../../api'; +import LaunchButton from '../../../components/LaunchButton'; +import Sparkline from '../../../components/Sparkline'; +import { toTitleCase } from '../../../util/strings'; +import CopyButton from '../../../components/CopyButton'; const DataListAction = styled(_DataListAction)` align-items: center; diff --git a/awx/ui_next/src/screens/Template/TemplateList/TemplateListItem.test.jsx b/awx/ui_next/src/screens/Template/TemplateList/TemplateListItem.test.jsx index 402c78f1ea..674e8fa824 100644 --- a/awx/ui_next/src/screens/Template/TemplateList/TemplateListItem.test.jsx +++ b/awx/ui_next/src/screens/Template/TemplateList/TemplateListItem.test.jsx @@ -1,13 +1,13 @@ import React from 'react'; -import { mountWithContexts } from '@testUtils/enzymeHelpers'; import { createMemoryHistory } from 'history'; -import { JobTemplatesAPI } from '@api'; import { act } from 'react-dom/test-utils'; +import { mountWithContexts } from '../../../../testUtils/enzymeHelpers'; +import { JobTemplatesAPI } from '../../../api'; import mockJobTemplateData from '../shared/data.job_template.json'; import TemplateListItem from './TemplateListItem'; -jest.mock('@api'); +jest.mock('../../../api'); describe('', () => { test('launch button shown to users with start capabilities', () => { diff --git a/awx/ui_next/src/screens/Template/TemplateSurvey.jsx b/awx/ui_next/src/screens/Template/TemplateSurvey.jsx index fc15a71a8c..3f8381c129 100644 --- a/awx/ui_next/src/screens/Template/TemplateSurvey.jsx +++ b/awx/ui_next/src/screens/Template/TemplateSurvey.jsx @@ -2,11 +2,11 @@ import React, { useState, useEffect, useCallback } from 'react'; import { Switch, Route, useParams, useLocation } from 'react-router-dom'; import { withI18n } from '@lingui/react'; import { t } from '@lingui/macro'; -import { JobTemplatesAPI, WorkflowJobTemplatesAPI } from '@api'; -import ContentError from '@components/ContentError'; -import AlertModal from '@components/AlertModal'; -import ErrorDetail from '@components/ErrorDetail'; -import useRequest, { useDismissableError } from '@util/useRequest'; +import { JobTemplatesAPI, WorkflowJobTemplatesAPI } from '../../api'; +import ContentError from '../../components/ContentError'; +import AlertModal from '../../components/AlertModal'; +import ErrorDetail from '../../components/ErrorDetail'; +import useRequest, { useDismissableError } from '../../util/useRequest'; import { SurveyList, SurveyQuestionAdd, SurveyQuestionEdit } from './Survey'; function TemplateSurvey({ template, canEdit, i18n }) { diff --git a/awx/ui_next/src/screens/Template/TemplateSurvey.test.jsx b/awx/ui_next/src/screens/Template/TemplateSurvey.test.jsx index e1846923ec..9b4d622f78 100644 --- a/awx/ui_next/src/screens/Template/TemplateSurvey.test.jsx +++ b/awx/ui_next/src/screens/Template/TemplateSurvey.test.jsx @@ -1,12 +1,12 @@ import React from 'react'; import { act } from 'react-dom/test-utils'; import { createMemoryHistory } from 'history'; -import { mountWithContexts } from '@testUtils/enzymeHelpers'; +import { mountWithContexts } from '../../../testUtils/enzymeHelpers'; import TemplateSurvey from './TemplateSurvey'; -import { JobTemplatesAPI } from '@api'; +import { JobTemplatesAPI } from '../../api'; import mockJobTemplateData from './shared/data.job_template.json'; -jest.mock('@api/models/JobTemplates'); +jest.mock('../../api/models/JobTemplates'); const surveyData = { name: 'Survey', diff --git a/awx/ui_next/src/screens/Template/Templates.jsx b/awx/ui_next/src/screens/Template/Templates.jsx index 2f2cf5497f..0b529a95af 100644 --- a/awx/ui_next/src/screens/Template/Templates.jsx +++ b/awx/ui_next/src/screens/Template/Templates.jsx @@ -3,8 +3,8 @@ import { withI18n } from '@lingui/react'; import { t } from '@lingui/macro'; import { Route, withRouter, Switch } from 'react-router-dom'; -import { Config } from '@contexts/Config'; -import Breadcrumbs from '@components/Breadcrumbs/Breadcrumbs'; +import { Config } from '../../contexts/Config'; +import Breadcrumbs from '../../components/Breadcrumbs/Breadcrumbs'; import { TemplateList } from './TemplateList'; import Template from './Template'; import WorkflowJobTemplate from './WorkflowJobTemplate'; diff --git a/awx/ui_next/src/screens/Template/Templates.test.jsx b/awx/ui_next/src/screens/Template/Templates.test.jsx index ec7ef416e1..f39643053d 100644 --- a/awx/ui_next/src/screens/Template/Templates.test.jsx +++ b/awx/ui_next/src/screens/Template/Templates.test.jsx @@ -1,5 +1,5 @@ import React from 'react'; -import { mountWithContexts } from '@testUtils/enzymeHelpers'; +import { mountWithContexts } from '../../../testUtils/enzymeHelpers'; import Templates from './Templates'; diff --git a/awx/ui_next/src/screens/Template/WorkflowJobTemplate.jsx b/awx/ui_next/src/screens/Template/WorkflowJobTemplate.jsx index 700cee8f76..eb40b93f4f 100644 --- a/awx/ui_next/src/screens/Template/WorkflowJobTemplate.jsx +++ b/awx/ui_next/src/screens/Template/WorkflowJobTemplate.jsx @@ -3,22 +3,22 @@ import { t } from '@lingui/macro'; import { withI18n } from '@lingui/react'; import { Card, CardActions, PageSection } from '@patternfly/react-core'; import { Switch, Route, Redirect, withRouter, Link } from 'react-router-dom'; -import { TabbedCardHeader } from '@components/Card'; -import AppendBody from '@components/AppendBody'; -import CardCloseButton from '@components/CardCloseButton'; -import ContentError from '@components/ContentError'; -import FullPage from '@components/FullPage'; -import JobList from '@components/JobList'; -import RoutedTabs from '@components/RoutedTabs'; -import { Schedules } from '@components/Schedule'; -import ContentLoading from '@components/ContentLoading'; -import { ResourceAccessList } from '@components/ResourceAccessList'; -import NotificationList from '@components/NotificationList'; +import { TabbedCardHeader } from '../../components/Card'; +import AppendBody from '../../components/AppendBody'; +import CardCloseButton from '../../components/CardCloseButton'; +import ContentError from '../../components/ContentError'; +import FullPage from '../../components/FullPage'; +import JobList from '../../components/JobList'; +import RoutedTabs from '../../components/RoutedTabs'; +import { Schedules } from '../../components/Schedule'; +import ContentLoading from '../../components/ContentLoading'; +import { ResourceAccessList } from '../../components/ResourceAccessList'; +import NotificationList from '../../components/NotificationList'; import { WorkflowJobTemplatesAPI, CredentialsAPI, OrganizationsAPI, -} from '@api'; +} from '../../api'; import WorkflowJobTemplateDetail from './WorkflowJobTemplateDetail'; import WorkflowJobTemplateEdit from './WorkflowJobTemplateEdit'; import { Visualizer } from './WorkflowJobTemplateVisualizer'; diff --git a/awx/ui_next/src/screens/Template/WorkflowJobTemplate.test.jsx b/awx/ui_next/src/screens/Template/WorkflowJobTemplate.test.jsx index 66840a331e..a0400ca772 100644 --- a/awx/ui_next/src/screens/Template/WorkflowJobTemplate.test.jsx +++ b/awx/ui_next/src/screens/Template/WorkflowJobTemplate.test.jsx @@ -3,18 +3,21 @@ import { Route } from 'react-router-dom'; import { createMemoryHistory } from 'history'; import { act } from 'react-dom/test-utils'; -import { mountWithContexts, waitForElement } from '@testUtils/enzymeHelpers'; +import { + mountWithContexts, + waitForElement, +} from '../../../testUtils/enzymeHelpers'; import WorkflowJobTemplate from './WorkflowJobTemplate'; -import { sleep } from '@testUtils/testUtils'; +import { sleep } from '../../../testUtils/testUtils'; import { WorkflowJobTemplatesAPI, CredentialsAPI, OrganizationsAPI, -} from '@api'; +} from '../../api'; -jest.mock('@api/models/WorkflowJobTemplates'); -jest.mock('@api/models/Credentials'); -jest.mock('@api/models/Organizations'); +jest.mock('../../api/models/WorkflowJobTemplates'); +jest.mock('../../api/models/Credentials'); +jest.mock('../../api/models/Organizations'); describe('', () => { const mockMe = { diff --git a/awx/ui_next/src/screens/Template/WorkflowJobTemplateAdd/WorkflowJobTemplateAdd.jsx b/awx/ui_next/src/screens/Template/WorkflowJobTemplateAdd/WorkflowJobTemplateAdd.jsx index 6bfa3d3707..0409728aef 100644 --- a/awx/ui_next/src/screens/Template/WorkflowJobTemplateAdd/WorkflowJobTemplateAdd.jsx +++ b/awx/ui_next/src/screens/Template/WorkflowJobTemplateAdd/WorkflowJobTemplateAdd.jsx @@ -2,9 +2,9 @@ import React, { useState } from 'react'; import { useHistory } from 'react-router-dom'; import { Card, PageSection } from '@patternfly/react-core'; -import { CardBody } from '@components/Card'; +import { CardBody } from '../../../components/Card'; -import { WorkflowJobTemplatesAPI, OrganizationsAPI } from '@api'; +import { WorkflowJobTemplatesAPI, OrganizationsAPI } from '../../../api'; import WorkflowJobTemplateForm from '../shared/WorkflowJobTemplateForm'; function WorkflowJobTemplateAdd() { diff --git a/awx/ui_next/src/screens/Template/WorkflowJobTemplateAdd/WorkflowJobTemplateAdd.test.jsx b/awx/ui_next/src/screens/Template/WorkflowJobTemplateAdd/WorkflowJobTemplateAdd.test.jsx index ab390f4fcd..c6ac734bfa 100644 --- a/awx/ui_next/src/screens/Template/WorkflowJobTemplateAdd/WorkflowJobTemplateAdd.test.jsx +++ b/awx/ui_next/src/screens/Template/WorkflowJobTemplateAdd/WorkflowJobTemplateAdd.test.jsx @@ -1,16 +1,20 @@ import React from 'react'; import { Route } from 'react-router-dom'; import { act } from 'react-dom/test-utils'; -import { WorkflowJobTemplatesAPI, OrganizationsAPI, LabelsAPI } from '@api'; -import { mountWithContexts } from '@testUtils/enzymeHelpers'; import { createMemoryHistory } from 'history'; +import { + WorkflowJobTemplatesAPI, + OrganizationsAPI, + LabelsAPI, +} from '../../../api'; +import { mountWithContexts } from '../../../../testUtils/enzymeHelpers'; import WorkflowJobTemplateAdd from './WorkflowJobTemplateAdd'; -jest.mock('@api/models/WorkflowJobTemplates'); -jest.mock('@api/models/Organizations'); -jest.mock('@api/models/Labels'); -jest.mock('@api/models/Inventories'); +jest.mock('../../../api/models/WorkflowJobTemplates'); +jest.mock('../../../api/models/Organizations'); +jest.mock('../../../api/models/Labels'); +jest.mock('../../../api/models/Inventories'); describe('', () => { let wrapper; diff --git a/awx/ui_next/src/screens/Template/WorkflowJobTemplateDetail/WorkflowJobTemplateDetail.jsx b/awx/ui_next/src/screens/Template/WorkflowJobTemplateDetail/WorkflowJobTemplateDetail.jsx index 26b655a541..c75e020174 100644 --- a/awx/ui_next/src/screens/Template/WorkflowJobTemplateDetail/WorkflowJobTemplateDetail.jsx +++ b/awx/ui_next/src/screens/Template/WorkflowJobTemplateDetail/WorkflowJobTemplateDetail.jsx @@ -2,7 +2,6 @@ import React, { useState } from 'react'; import { Link, useHistory } from 'react-router-dom'; import { withI18n } from '@lingui/react'; import { t } from '@lingui/macro'; -import { WorkflowJobTemplatesAPI } from '@api'; import { Chip, Button, @@ -12,18 +11,19 @@ import { TextListItemVariants, Label, } from '@patternfly/react-core'; +import { WorkflowJobTemplatesAPI } from '../../../api'; -import AlertModal from '@components/AlertModal'; -import { CardBody, CardActionsRow } from '@components/Card'; -import ChipGroup from '@components/ChipGroup'; -import { VariablesDetail } from '@components/CodeMirrorInput'; -import ContentLoading from '@components/ContentLoading'; -import DeleteButton from '@components/DeleteButton'; -import { DetailList, Detail, UserDateDetail } from '@components/DetailList'; -import ErrorDetail from '@components/ErrorDetail'; -import LaunchButton from '@components/LaunchButton'; -import Sparkline from '@components/Sparkline'; -import { toTitleCase } from '@util/strings'; +import AlertModal from '../../../components/AlertModal'; +import { CardBody, CardActionsRow } from '../../../components/Card'; +import ChipGroup from '../../../components/ChipGroup'; +import { VariablesDetail } from '../../../components/CodeMirrorInput'; +import ContentLoading from '../../../components/ContentLoading'; +import DeleteButton from '../../../components/DeleteButton'; +import { DetailList, Detail, UserDateDetail } from '../../../components/DetailList'; +import ErrorDetail from '../../../components/ErrorDetail'; +import LaunchButton from '../../../components/LaunchButton'; +import Sparkline from '../../../components/Sparkline'; +import { toTitleCase } from '../../../util/strings'; function WorkflowJobTemplateDetail({ template, i18n }) { const { diff --git a/awx/ui_next/src/screens/Template/WorkflowJobTemplateDetail/WorkflowJobTemplateDetail.test.jsx b/awx/ui_next/src/screens/Template/WorkflowJobTemplateDetail/WorkflowJobTemplateDetail.test.jsx index bfb850c83b..b3ee7736c9 100644 --- a/awx/ui_next/src/screens/Template/WorkflowJobTemplateDetail/WorkflowJobTemplateDetail.test.jsx +++ b/awx/ui_next/src/screens/Template/WorkflowJobTemplateDetail/WorkflowJobTemplateDetail.test.jsx @@ -3,7 +3,7 @@ import { Route } from 'react-router-dom'; import { createMemoryHistory } from 'history'; import { act } from 'react-dom/test-utils'; -import { mountWithContexts } from '@testUtils/enzymeHelpers'; +import { mountWithContexts } from '../../../../testUtils/enzymeHelpers'; import WorkflowJobTemplateDetail from './WorkflowJobTemplateDetail'; describe('', () => { diff --git a/awx/ui_next/src/screens/Template/WorkflowJobTemplateEdit/WorkflowJobTemplateEdit.jsx b/awx/ui_next/src/screens/Template/WorkflowJobTemplateEdit/WorkflowJobTemplateEdit.jsx index a860589020..81478eb9a4 100644 --- a/awx/ui_next/src/screens/Template/WorkflowJobTemplateEdit/WorkflowJobTemplateEdit.jsx +++ b/awx/ui_next/src/screens/Template/WorkflowJobTemplateEdit/WorkflowJobTemplateEdit.jsx @@ -1,9 +1,9 @@ import React, { useState } from 'react'; import { useHistory } from 'react-router-dom'; -import { CardBody } from '@components/Card'; -import { getAddedAndRemoved } from '@util/lists'; -import { WorkflowJobTemplatesAPI, OrganizationsAPI } from '@api'; +import { CardBody } from '../../../components/Card'; +import { getAddedAndRemoved } from '../../../util/lists'; +import { WorkflowJobTemplatesAPI, OrganizationsAPI } from '../../../api'; import { WorkflowJobTemplateForm } from '../shared'; function WorkflowJobTemplateEdit({ template }) { diff --git a/awx/ui_next/src/screens/Template/WorkflowJobTemplateEdit/WorkflowJobTemplateEdit.test.jsx b/awx/ui_next/src/screens/Template/WorkflowJobTemplateEdit/WorkflowJobTemplateEdit.test.jsx index 6b2c7be5aa..b9984f2f3e 100644 --- a/awx/ui_next/src/screens/Template/WorkflowJobTemplateEdit/WorkflowJobTemplateEdit.test.jsx +++ b/awx/ui_next/src/screens/Template/WorkflowJobTemplateEdit/WorkflowJobTemplateEdit.test.jsx @@ -1,15 +1,19 @@ import React from 'react'; import { Route } from 'react-router-dom'; import { act } from 'react-dom/test-utils'; -import { WorkflowJobTemplatesAPI, OrganizationsAPI, LabelsAPI } from '@api'; -import { mountWithContexts } from '@testUtils/enzymeHelpers'; import { createMemoryHistory } from 'history'; +import { + WorkflowJobTemplatesAPI, + OrganizationsAPI, + LabelsAPI, +} from '../../../api'; +import { mountWithContexts } from '../../../../testUtils/enzymeHelpers'; import WorkflowJobTemplateEdit from './WorkflowJobTemplateEdit'; -jest.mock('@api/models/WorkflowJobTemplates'); -jest.mock('@api/models/Labels'); -jest.mock('@api/models/Organizations'); -jest.mock('@api/models/Inventories'); +jest.mock('../../../api/models/WorkflowJobTemplates'); +jest.mock('../../../api/models/Labels'); +jest.mock('../../../api/models/Organizations'); +jest.mock('../../../api/models/Inventories'); const mockTemplate = { id: 6, diff --git a/awx/ui_next/src/screens/Template/WorkflowJobTemplateVisualizer/Modals/DeleteAllNodesModal.jsx b/awx/ui_next/src/screens/Template/WorkflowJobTemplateVisualizer/Modals/DeleteAllNodesModal.jsx index 9947656801..57d177b75c 100644 --- a/awx/ui_next/src/screens/Template/WorkflowJobTemplateVisualizer/Modals/DeleteAllNodesModal.jsx +++ b/awx/ui_next/src/screens/Template/WorkflowJobTemplateVisualizer/Modals/DeleteAllNodesModal.jsx @@ -1,9 +1,9 @@ import React, { useContext } from 'react'; -import { WorkflowDispatchContext } from '@contexts/Workflow'; import { Button } from '@patternfly/react-core'; import { withI18n } from '@lingui/react'; import { t } from '@lingui/macro'; -import AlertModal from '@components/AlertModal'; +import { WorkflowDispatchContext } from '../../../../contexts/Workflow'; +import AlertModal from '../../../../components/AlertModal'; function DeleteAllNodesModal({ i18n }) { const dispatch = useContext(WorkflowDispatchContext); diff --git a/awx/ui_next/src/screens/Template/WorkflowJobTemplateVisualizer/Modals/DeleteAllNodesModal.test.jsx b/awx/ui_next/src/screens/Template/WorkflowJobTemplateVisualizer/Modals/DeleteAllNodesModal.test.jsx index 45f426755d..26c806da26 100644 --- a/awx/ui_next/src/screens/Template/WorkflowJobTemplateVisualizer/Modals/DeleteAllNodesModal.test.jsx +++ b/awx/ui_next/src/screens/Template/WorkflowJobTemplateVisualizer/Modals/DeleteAllNodesModal.test.jsx @@ -1,6 +1,6 @@ import React from 'react'; -import { WorkflowDispatchContext } from '@contexts/Workflow'; -import { mountWithContexts } from '@testUtils/enzymeHelpers'; +import { WorkflowDispatchContext } from '../../../../contexts/Workflow'; +import { mountWithContexts } from '../../../../../testUtils/enzymeHelpers'; import DeleteAllNodesModal from './DeleteAllNodesModal'; let wrapper; diff --git a/awx/ui_next/src/screens/Template/WorkflowJobTemplateVisualizer/Modals/LinkModals/LinkAddModal.jsx b/awx/ui_next/src/screens/Template/WorkflowJobTemplateVisualizer/Modals/LinkModals/LinkAddModal.jsx index c3b707fe5e..97a941755e 100644 --- a/awx/ui_next/src/screens/Template/WorkflowJobTemplateVisualizer/Modals/LinkModals/LinkAddModal.jsx +++ b/awx/ui_next/src/screens/Template/WorkflowJobTemplateVisualizer/Modals/LinkModals/LinkAddModal.jsx @@ -1,8 +1,8 @@ import React, { useContext } from 'react'; -import { WorkflowDispatchContext } from '@contexts/Workflow'; import { BaseSizes, Title, TitleLevel } from '@patternfly/react-core'; import { withI18n } from '@lingui/react'; import { t } from '@lingui/macro'; +import { WorkflowDispatchContext } from '../../../../../contexts/Workflow'; import LinkModal from './LinkModal'; function LinkAddModal({ i18n }) { diff --git a/awx/ui_next/src/screens/Template/WorkflowJobTemplateVisualizer/Modals/LinkModals/LinkAddModal.test.jsx b/awx/ui_next/src/screens/Template/WorkflowJobTemplateVisualizer/Modals/LinkModals/LinkAddModal.test.jsx index bb68a69161..0ac499b37a 100644 --- a/awx/ui_next/src/screens/Template/WorkflowJobTemplateVisualizer/Modals/LinkModals/LinkAddModal.test.jsx +++ b/awx/ui_next/src/screens/Template/WorkflowJobTemplateVisualizer/Modals/LinkModals/LinkAddModal.test.jsx @@ -1,9 +1,9 @@ import React from 'react'; -import { mountWithContexts } from '@testUtils/enzymeHelpers'; +import { mountWithContexts } from '../../../../../../testUtils/enzymeHelpers'; import { WorkflowDispatchContext, WorkflowStateContext, -} from '@contexts/Workflow'; +} from '../../../../../contexts/Workflow'; import LinkAddModal from './LinkAddModal'; const dispatch = jest.fn(); diff --git a/awx/ui_next/src/screens/Template/WorkflowJobTemplateVisualizer/Modals/LinkModals/LinkDeleteModal.jsx b/awx/ui_next/src/screens/Template/WorkflowJobTemplateVisualizer/Modals/LinkModals/LinkDeleteModal.jsx index 216ecb71e3..6c2c49ef04 100644 --- a/awx/ui_next/src/screens/Template/WorkflowJobTemplateVisualizer/Modals/LinkModals/LinkDeleteModal.jsx +++ b/awx/ui_next/src/screens/Template/WorkflowJobTemplateVisualizer/Modals/LinkModals/LinkDeleteModal.jsx @@ -1,12 +1,12 @@ import React, { Fragment, useContext } from 'react'; -import { - WorkflowDispatchContext, - WorkflowStateContext, -} from '@contexts/Workflow'; import { Button } from '@patternfly/react-core'; import { withI18n } from '@lingui/react'; import { t } from '@lingui/macro'; -import AlertModal from '@components/AlertModal'; +import { + WorkflowDispatchContext, + WorkflowStateContext, +} from '../../../../../contexts/Workflow'; +import AlertModal from '../../../../../components/AlertModal'; function LinkDeleteModal({ i18n }) { const dispatch = useContext(WorkflowDispatchContext); diff --git a/awx/ui_next/src/screens/Template/WorkflowJobTemplateVisualizer/Modals/LinkModals/LinkDeleteModal.test.jsx b/awx/ui_next/src/screens/Template/WorkflowJobTemplateVisualizer/Modals/LinkModals/LinkDeleteModal.test.jsx index 4cb5b775e6..d0cee96579 100644 --- a/awx/ui_next/src/screens/Template/WorkflowJobTemplateVisualizer/Modals/LinkModals/LinkDeleteModal.test.jsx +++ b/awx/ui_next/src/screens/Template/WorkflowJobTemplateVisualizer/Modals/LinkModals/LinkDeleteModal.test.jsx @@ -2,8 +2,8 @@ import React from 'react'; import { WorkflowDispatchContext, WorkflowStateContext, -} from '@contexts/Workflow'; -import { mountWithContexts } from '@testUtils/enzymeHelpers'; +} from '../../../../../contexts/Workflow'; +import { mountWithContexts } from '../../../../../../testUtils/enzymeHelpers'; import LinkDeleteModal from './LinkDeleteModal'; let wrapper; diff --git a/awx/ui_next/src/screens/Template/WorkflowJobTemplateVisualizer/Modals/LinkModals/LinkEditModal.jsx b/awx/ui_next/src/screens/Template/WorkflowJobTemplateVisualizer/Modals/LinkModals/LinkEditModal.jsx index f6f265527e..177e11bb32 100644 --- a/awx/ui_next/src/screens/Template/WorkflowJobTemplateVisualizer/Modals/LinkModals/LinkEditModal.jsx +++ b/awx/ui_next/src/screens/Template/WorkflowJobTemplateVisualizer/Modals/LinkModals/LinkEditModal.jsx @@ -1,8 +1,8 @@ import React, { useContext } from 'react'; -import { WorkflowDispatchContext } from '@contexts/Workflow'; import { BaseSizes, Title, TitleLevel } from '@patternfly/react-core'; import { withI18n } from '@lingui/react'; import { t } from '@lingui/macro'; +import { WorkflowDispatchContext } from '../../../../../contexts/Workflow'; import LinkModal from './LinkModal'; function LinkEditModal({ i18n }) { diff --git a/awx/ui_next/src/screens/Template/WorkflowJobTemplateVisualizer/Modals/LinkModals/LinkEditModal.test.jsx b/awx/ui_next/src/screens/Template/WorkflowJobTemplateVisualizer/Modals/LinkModals/LinkEditModal.test.jsx index a3fc316a69..a060f14091 100644 --- a/awx/ui_next/src/screens/Template/WorkflowJobTemplateVisualizer/Modals/LinkModals/LinkEditModal.test.jsx +++ b/awx/ui_next/src/screens/Template/WorkflowJobTemplateVisualizer/Modals/LinkModals/LinkEditModal.test.jsx @@ -1,9 +1,9 @@ import React from 'react'; -import { mountWithContexts } from '@testUtils/enzymeHelpers'; +import { mountWithContexts } from '../../../../../../testUtils/enzymeHelpers'; import { WorkflowDispatchContext, WorkflowStateContext, -} from '@contexts/Workflow'; +} from '../../../../../contexts/Workflow'; import LinkEditModal from './LinkEditModal'; const dispatch = jest.fn(); diff --git a/awx/ui_next/src/screens/Template/WorkflowJobTemplateVisualizer/Modals/LinkModals/LinkModal.jsx b/awx/ui_next/src/screens/Template/WorkflowJobTemplateVisualizer/Modals/LinkModals/LinkModal.jsx index b00ed4612f..0cf4601c4c 100644 --- a/awx/ui_next/src/screens/Template/WorkflowJobTemplateVisualizer/Modals/LinkModals/LinkModal.jsx +++ b/awx/ui_next/src/screens/Template/WorkflowJobTemplateVisualizer/Modals/LinkModals/LinkModal.jsx @@ -1,13 +1,13 @@ import React, { useContext, useState } from 'react'; -import { - WorkflowDispatchContext, - WorkflowStateContext, -} from '@contexts/Workflow'; import { Button, FormGroup, Modal } from '@patternfly/react-core'; import { withI18n } from '@lingui/react'; import { t } from '@lingui/macro'; import { func } from 'prop-types'; -import AnsibleSelect from '@components/AnsibleSelect'; +import { + WorkflowDispatchContext, + WorkflowStateContext, +} from '../../../../../contexts/Workflow'; +import AnsibleSelect from '../../../../../components/AnsibleSelect'; function LinkModal({ header, i18n, onConfirm }) { const dispatch = useContext(WorkflowDispatchContext); diff --git a/awx/ui_next/src/screens/Template/WorkflowJobTemplateVisualizer/Modals/LinkModals/LinkModal.test.jsx b/awx/ui_next/src/screens/Template/WorkflowJobTemplateVisualizer/Modals/LinkModals/LinkModal.test.jsx index 96bb8d92a0..787e891306 100644 --- a/awx/ui_next/src/screens/Template/WorkflowJobTemplateVisualizer/Modals/LinkModals/LinkModal.test.jsx +++ b/awx/ui_next/src/screens/Template/WorkflowJobTemplateVisualizer/Modals/LinkModals/LinkModal.test.jsx @@ -1,10 +1,10 @@ import React from 'react'; import { act } from 'react-dom/test-utils'; -import { mountWithContexts } from '@testUtils/enzymeHelpers'; +import { mountWithContexts } from '../../../../../../testUtils/enzymeHelpers'; import { WorkflowDispatchContext, WorkflowStateContext, -} from '@contexts/Workflow'; +} from '../../../../../contexts/Workflow'; import LinkModal from './LinkModal'; const dispatch = jest.fn(); diff --git a/awx/ui_next/src/screens/Template/WorkflowJobTemplateVisualizer/Modals/NodeModals/NodeAddModal.jsx b/awx/ui_next/src/screens/Template/WorkflowJobTemplateVisualizer/Modals/NodeModals/NodeAddModal.jsx index 1af0278e72..18ee5fcdc9 100644 --- a/awx/ui_next/src/screens/Template/WorkflowJobTemplateVisualizer/Modals/NodeModals/NodeAddModal.jsx +++ b/awx/ui_next/src/screens/Template/WorkflowJobTemplateVisualizer/Modals/NodeModals/NodeAddModal.jsx @@ -1,10 +1,10 @@ import React, { useContext } from 'react'; +import { withI18n } from '@lingui/react'; +import { t } from '@lingui/macro'; import { WorkflowDispatchContext, WorkflowStateContext, -} from '@contexts/Workflow'; -import { withI18n } from '@lingui/react'; -import { t } from '@lingui/macro'; +} from '../../../../../contexts/Workflow'; import NodeModal from './NodeModal'; function NodeAddModal({ i18n }) { diff --git a/awx/ui_next/src/screens/Template/WorkflowJobTemplateVisualizer/Modals/NodeModals/NodeAddModal.test.jsx b/awx/ui_next/src/screens/Template/WorkflowJobTemplateVisualizer/Modals/NodeModals/NodeAddModal.test.jsx index bf2b3052d5..723de11c73 100644 --- a/awx/ui_next/src/screens/Template/WorkflowJobTemplateVisualizer/Modals/NodeModals/NodeAddModal.test.jsx +++ b/awx/ui_next/src/screens/Template/WorkflowJobTemplateVisualizer/Modals/NodeModals/NodeAddModal.test.jsx @@ -1,10 +1,10 @@ import React from 'react'; import { act } from 'react-dom/test-utils'; -import { mountWithContexts } from '@testUtils/enzymeHelpers'; +import { mountWithContexts } from '../../../../../../testUtils/enzymeHelpers'; import { WorkflowDispatchContext, WorkflowStateContext, -} from '@contexts/Workflow'; +} from '../../../../../contexts/Workflow'; import NodeAddModal from './NodeAddModal'; const dispatch = jest.fn(); diff --git a/awx/ui_next/src/screens/Template/WorkflowJobTemplateVisualizer/Modals/NodeModals/NodeDeleteModal.jsx b/awx/ui_next/src/screens/Template/WorkflowJobTemplateVisualizer/Modals/NodeModals/NodeDeleteModal.jsx index 1032b85c91..769756d7aa 100644 --- a/awx/ui_next/src/screens/Template/WorkflowJobTemplateVisualizer/Modals/NodeModals/NodeDeleteModal.jsx +++ b/awx/ui_next/src/screens/Template/WorkflowJobTemplateVisualizer/Modals/NodeModals/NodeDeleteModal.jsx @@ -1,12 +1,12 @@ import React, { Fragment, useContext } from 'react'; -import { - WorkflowDispatchContext, - WorkflowStateContext, -} from '@contexts/Workflow'; import { Button } from '@patternfly/react-core'; import { withI18n } from '@lingui/react'; import { t } from '@lingui/macro'; -import AlertModal from '@components/AlertModal'; +import { + WorkflowDispatchContext, + WorkflowStateContext, +} from '../../../../../contexts/Workflow'; +import AlertModal from '../../../../../components/AlertModal'; function NodeDeleteModal({ i18n }) { const dispatch = useContext(WorkflowDispatchContext); diff --git a/awx/ui_next/src/screens/Template/WorkflowJobTemplateVisualizer/Modals/NodeModals/NodeDeleteModal.test.jsx b/awx/ui_next/src/screens/Template/WorkflowJobTemplateVisualizer/Modals/NodeModals/NodeDeleteModal.test.jsx index 94224fa451..880af36e50 100644 --- a/awx/ui_next/src/screens/Template/WorkflowJobTemplateVisualizer/Modals/NodeModals/NodeDeleteModal.test.jsx +++ b/awx/ui_next/src/screens/Template/WorkflowJobTemplateVisualizer/Modals/NodeModals/NodeDeleteModal.test.jsx @@ -2,8 +2,8 @@ import React from 'react'; import { WorkflowDispatchContext, WorkflowStateContext, -} from '@contexts/Workflow'; -import { mountWithContexts } from '@testUtils/enzymeHelpers'; +} from '../../../../../contexts/Workflow'; +import { mountWithContexts } from '../../../../../../testUtils/enzymeHelpers'; import NodeDeleteModal from './NodeDeleteModal'; let wrapper; diff --git a/awx/ui_next/src/screens/Template/WorkflowJobTemplateVisualizer/Modals/NodeModals/NodeEditModal.jsx b/awx/ui_next/src/screens/Template/WorkflowJobTemplateVisualizer/Modals/NodeModals/NodeEditModal.jsx index 28e92e63c2..db002942a0 100644 --- a/awx/ui_next/src/screens/Template/WorkflowJobTemplateVisualizer/Modals/NodeModals/NodeEditModal.jsx +++ b/awx/ui_next/src/screens/Template/WorkflowJobTemplateVisualizer/Modals/NodeModals/NodeEditModal.jsx @@ -1,7 +1,7 @@ import React, { useContext } from 'react'; -import { WorkflowDispatchContext } from '@contexts/Workflow'; import { withI18n } from '@lingui/react'; import { t } from '@lingui/macro'; +import { WorkflowDispatchContext } from '../../../../../contexts/Workflow'; import NodeModal from './NodeModal'; function NodeEditModal({ i18n }) { diff --git a/awx/ui_next/src/screens/Template/WorkflowJobTemplateVisualizer/Modals/NodeModals/NodeEditModal.test.jsx b/awx/ui_next/src/screens/Template/WorkflowJobTemplateVisualizer/Modals/NodeModals/NodeEditModal.test.jsx index f851cc1f1e..e0f5ff1b72 100644 --- a/awx/ui_next/src/screens/Template/WorkflowJobTemplateVisualizer/Modals/NodeModals/NodeEditModal.test.jsx +++ b/awx/ui_next/src/screens/Template/WorkflowJobTemplateVisualizer/Modals/NodeModals/NodeEditModal.test.jsx @@ -1,10 +1,10 @@ import React from 'react'; import { act } from 'react-dom/test-utils'; -import { mountWithContexts } from '@testUtils/enzymeHelpers'; +import { mountWithContexts } from '../../../../../../testUtils/enzymeHelpers'; import { WorkflowDispatchContext, WorkflowStateContext, -} from '@contexts/Workflow'; +} from '../../../../../contexts/Workflow'; import NodeEditModal from './NodeEditModal'; const dispatch = jest.fn(); diff --git a/awx/ui_next/src/screens/Template/WorkflowJobTemplateVisualizer/Modals/NodeModals/NodeModal.jsx b/awx/ui_next/src/screens/Template/WorkflowJobTemplateVisualizer/Modals/NodeModals/NodeModal.jsx index fafd574f6a..47971fe236 100644 --- a/awx/ui_next/src/screens/Template/WorkflowJobTemplateVisualizer/Modals/NodeModals/NodeModal.jsx +++ b/awx/ui_next/src/screens/Template/WorkflowJobTemplateVisualizer/Modals/NodeModals/NodeModal.jsx @@ -1,9 +1,5 @@ import React, { useContext, useState } from 'react'; import { useHistory } from 'react-router-dom'; -import { - WorkflowDispatchContext, - WorkflowStateContext, -} from '@contexts/Workflow'; import { withI18n } from '@lingui/react'; import { t } from '@lingui/macro'; import { bool, node, func } from 'prop-types'; @@ -12,7 +8,11 @@ import { WizardContextConsumer, WizardFooter, } from '@patternfly/react-core'; -import Wizard from '@components/Wizard'; +import { + WorkflowDispatchContext, + WorkflowStateContext, +} from '../../../../../contexts/Workflow'; +import Wizard from '../../../../../components/Wizard'; import { NodeTypeStep } from './NodeTypeStep'; import { RunStep, NodeNextButton } from '.'; diff --git a/awx/ui_next/src/screens/Template/WorkflowJobTemplateVisualizer/Modals/NodeModals/NodeModal.test.jsx b/awx/ui_next/src/screens/Template/WorkflowJobTemplateVisualizer/Modals/NodeModals/NodeModal.test.jsx index 3b5d96b381..39f410f338 100644 --- a/awx/ui_next/src/screens/Template/WorkflowJobTemplateVisualizer/Modals/NodeModals/NodeModal.test.jsx +++ b/awx/ui_next/src/screens/Template/WorkflowJobTemplateVisualizer/Modals/NodeModals/NodeModal.test.jsx @@ -3,20 +3,20 @@ import { act } from 'react-dom/test-utils'; import { WorkflowDispatchContext, WorkflowStateContext, -} from '@contexts/Workflow'; -import { mountWithContexts } from '@testUtils/enzymeHelpers'; +} from '../../../../../contexts/Workflow'; +import { mountWithContexts } from '../../../../../../testUtils/enzymeHelpers'; import { InventorySourcesAPI, JobTemplatesAPI, ProjectsAPI, WorkflowJobTemplatesAPI, -} from '@api'; +} from '../../../../../api'; import NodeModal from './NodeModal'; -jest.mock('@api/models/InventorySources'); -jest.mock('@api/models/JobTemplates'); -jest.mock('@api/models/Projects'); -jest.mock('@api/models/WorkflowJobTemplates'); +jest.mock('../../../../../api/models/InventorySources'); +jest.mock('../../../../../api/models/JobTemplates'); +jest.mock('../../../../../api/models/Projects'); +jest.mock('../../../../../api/models/WorkflowJobTemplates'); let wrapper; const dispatch = jest.fn(); diff --git a/awx/ui_next/src/screens/Template/WorkflowJobTemplateVisualizer/Modals/NodeModals/NodeTypeStep/InventorySourcesList.jsx b/awx/ui_next/src/screens/Template/WorkflowJobTemplateVisualizer/Modals/NodeModals/NodeTypeStep/InventorySourcesList.jsx index 69eb17e5e7..82e083d6cd 100644 --- a/awx/ui_next/src/screens/Template/WorkflowJobTemplateVisualizer/Modals/NodeModals/NodeTypeStep/InventorySourcesList.jsx +++ b/awx/ui_next/src/screens/Template/WorkflowJobTemplateVisualizer/Modals/NodeModals/NodeTypeStep/InventorySourcesList.jsx @@ -3,11 +3,11 @@ import { useLocation } from 'react-router-dom'; import { withI18n } from '@lingui/react'; import { t } from '@lingui/macro'; import { func, shape } from 'prop-types'; -import { InventorySourcesAPI } from '@api'; -import { getQSConfig, parseQueryString } from '@util/qs'; -import PaginatedDataList from '@components/PaginatedDataList'; -import DataListToolbar from '@components/DataListToolbar'; -import CheckboxListItem from '@components/CheckboxListItem'; +import { InventorySourcesAPI } from '../../../../../../api'; +import { getQSConfig, parseQueryString } from '../../../../../../util/qs'; +import PaginatedDataList from '../../../../../../components/PaginatedDataList'; +import DataListToolbar from '../../../../../../components/DataListToolbar'; +import CheckboxListItem from '../../../../../../components/CheckboxListItem'; const QS_CONFIG = getQSConfig('inventory_sources', { page: 1, diff --git a/awx/ui_next/src/screens/Template/WorkflowJobTemplateVisualizer/Modals/NodeModals/NodeTypeStep/InventorySourcesList.test.jsx b/awx/ui_next/src/screens/Template/WorkflowJobTemplateVisualizer/Modals/NodeModals/NodeTypeStep/InventorySourcesList.test.jsx index d09cf92ae1..8725beff57 100644 --- a/awx/ui_next/src/screens/Template/WorkflowJobTemplateVisualizer/Modals/NodeModals/NodeTypeStep/InventorySourcesList.test.jsx +++ b/awx/ui_next/src/screens/Template/WorkflowJobTemplateVisualizer/Modals/NodeModals/NodeTypeStep/InventorySourcesList.test.jsx @@ -1,10 +1,10 @@ import React from 'react'; import { act } from 'react-dom/test-utils'; -import { mountWithContexts } from '@testUtils/enzymeHelpers'; -import { InventorySourcesAPI } from '@api'; +import { mountWithContexts } from '../../../../../../../testUtils/enzymeHelpers'; +import { InventorySourcesAPI } from '../../../../../../api'; import InventorySourcesList from './InventorySourcesList'; -jest.mock('@api/models/InventorySources'); +jest.mock('../../../../../../api/models/InventorySources'); const nodeResource = { id: 1, diff --git a/awx/ui_next/src/screens/Template/WorkflowJobTemplateVisualizer/Modals/NodeModals/NodeTypeStep/JobTemplatesList.jsx b/awx/ui_next/src/screens/Template/WorkflowJobTemplateVisualizer/Modals/NodeModals/NodeTypeStep/JobTemplatesList.jsx index 930bc23ac9..58e2078d7a 100644 --- a/awx/ui_next/src/screens/Template/WorkflowJobTemplateVisualizer/Modals/NodeModals/NodeTypeStep/JobTemplatesList.jsx +++ b/awx/ui_next/src/screens/Template/WorkflowJobTemplateVisualizer/Modals/NodeModals/NodeTypeStep/JobTemplatesList.jsx @@ -3,11 +3,11 @@ import { useLocation } from 'react-router-dom'; import { withI18n } from '@lingui/react'; import { t } from '@lingui/macro'; import { func, shape } from 'prop-types'; -import { JobTemplatesAPI } from '@api'; -import { getQSConfig, parseQueryString } from '@util/qs'; -import PaginatedDataList from '@components/PaginatedDataList'; -import DataListToolbar from '@components/DataListToolbar'; -import CheckboxListItem from '@components/CheckboxListItem'; +import { JobTemplatesAPI } from '../../../../../../api'; +import { getQSConfig, parseQueryString } from '../../../../../../util/qs'; +import PaginatedDataList from '../../../../../../components/PaginatedDataList'; +import DataListToolbar from '../../../../../../components/DataListToolbar'; +import CheckboxListItem from '../../../../../../components/CheckboxListItem'; const QS_CONFIG = getQSConfig('job_templates', { page: 1, diff --git a/awx/ui_next/src/screens/Template/WorkflowJobTemplateVisualizer/Modals/NodeModals/NodeTypeStep/JobTemplatesList.test.jsx b/awx/ui_next/src/screens/Template/WorkflowJobTemplateVisualizer/Modals/NodeModals/NodeTypeStep/JobTemplatesList.test.jsx index d5d8097313..580e96d465 100644 --- a/awx/ui_next/src/screens/Template/WorkflowJobTemplateVisualizer/Modals/NodeModals/NodeTypeStep/JobTemplatesList.test.jsx +++ b/awx/ui_next/src/screens/Template/WorkflowJobTemplateVisualizer/Modals/NodeModals/NodeTypeStep/JobTemplatesList.test.jsx @@ -1,10 +1,10 @@ import React from 'react'; import { act } from 'react-dom/test-utils'; -import { mountWithContexts } from '@testUtils/enzymeHelpers'; -import { JobTemplatesAPI } from '@api'; +import { mountWithContexts } from '../../../../../../../testUtils/enzymeHelpers'; +import { JobTemplatesAPI } from '../../../../../../api'; import JobTemplatesList from './JobTemplatesList'; -jest.mock('@api/models/JobTemplates'); +jest.mock('../../../../../../api/models/JobTemplates'); const nodeResource = { id: 1, diff --git a/awx/ui_next/src/screens/Template/WorkflowJobTemplateVisualizer/Modals/NodeModals/NodeTypeStep/NodeTypeStep.jsx b/awx/ui_next/src/screens/Template/WorkflowJobTemplateVisualizer/Modals/NodeModals/NodeTypeStep/NodeTypeStep.jsx index bc54b626d8..8b14d17835 100644 --- a/awx/ui_next/src/screens/Template/WorkflowJobTemplateVisualizer/Modals/NodeModals/NodeTypeStep/NodeTypeStep.jsx +++ b/awx/ui_next/src/screens/Template/WorkflowJobTemplateVisualizer/Modals/NodeModals/NodeTypeStep/NodeTypeStep.jsx @@ -5,8 +5,8 @@ import { func, number, shape, string } from 'prop-types'; import styled from 'styled-components'; import { Formik, Field } from 'formik'; import { Form, FormGroup, TextInput } from '@patternfly/react-core'; -import { FormFullWidthLayout } from '@components/FormLayout'; -import AnsibleSelect from '@components/AnsibleSelect'; +import { FormFullWidthLayout } from '../../../../../../components/FormLayout'; +import AnsibleSelect from '../../../../../../components/AnsibleSelect'; import InventorySourcesList from './InventorySourcesList'; import JobTemplatesList from './JobTemplatesList'; import ProjectsList from './ProjectsList'; diff --git a/awx/ui_next/src/screens/Template/WorkflowJobTemplateVisualizer/Modals/NodeModals/NodeTypeStep/NodeTypeStep.test.jsx b/awx/ui_next/src/screens/Template/WorkflowJobTemplateVisualizer/Modals/NodeModals/NodeTypeStep/NodeTypeStep.test.jsx index 56e7f48690..ac0822e1a6 100644 --- a/awx/ui_next/src/screens/Template/WorkflowJobTemplateVisualizer/Modals/NodeModals/NodeTypeStep/NodeTypeStep.test.jsx +++ b/awx/ui_next/src/screens/Template/WorkflowJobTemplateVisualizer/Modals/NodeModals/NodeTypeStep/NodeTypeStep.test.jsx @@ -1,18 +1,18 @@ import React from 'react'; import { act } from 'react-dom/test-utils'; -import { mountWithContexts } from '@testUtils/enzymeHelpers'; +import { mountWithContexts } from '../../../../../../../testUtils/enzymeHelpers'; import { InventorySourcesAPI, JobTemplatesAPI, ProjectsAPI, WorkflowJobTemplatesAPI, -} from '@api'; +} from '../../../../../../api'; import NodeTypeStep from './NodeTypeStep'; -jest.mock('@api/models/InventorySources'); -jest.mock('@api/models/JobTemplates'); -jest.mock('@api/models/Projects'); -jest.mock('@api/models/WorkflowJobTemplates'); +jest.mock('../../../../../../api/models/InventorySources'); +jest.mock('../../../../../../api/models/JobTemplates'); +jest.mock('../../../../../../api/models/Projects'); +jest.mock('../../../../../../api/models/WorkflowJobTemplates'); const onUpdateDescription = jest.fn(); const onUpdateName = jest.fn(); diff --git a/awx/ui_next/src/screens/Template/WorkflowJobTemplateVisualizer/Modals/NodeModals/NodeTypeStep/ProjectsList.jsx b/awx/ui_next/src/screens/Template/WorkflowJobTemplateVisualizer/Modals/NodeModals/NodeTypeStep/ProjectsList.jsx index 836627512a..bb8d58006e 100644 --- a/awx/ui_next/src/screens/Template/WorkflowJobTemplateVisualizer/Modals/NodeModals/NodeTypeStep/ProjectsList.jsx +++ b/awx/ui_next/src/screens/Template/WorkflowJobTemplateVisualizer/Modals/NodeModals/NodeTypeStep/ProjectsList.jsx @@ -3,11 +3,11 @@ import { useLocation } from 'react-router-dom'; import { withI18n } from '@lingui/react'; import { t } from '@lingui/macro'; import { func, shape } from 'prop-types'; -import { ProjectsAPI } from '@api'; -import { getQSConfig, parseQueryString } from '@util/qs'; -import PaginatedDataList from '@components/PaginatedDataList'; -import DataListToolbar from '@components/DataListToolbar'; -import CheckboxListItem from '@components/CheckboxListItem'; +import { ProjectsAPI } from '../../../../../../api'; +import { getQSConfig, parseQueryString } from '../../../../../../util/qs'; +import PaginatedDataList from '../../../../../../components/PaginatedDataList'; +import DataListToolbar from '../../../../../../components/DataListToolbar'; +import CheckboxListItem from '../../../../../../components/CheckboxListItem'; const QS_CONFIG = getQSConfig('projects', { page: 1, diff --git a/awx/ui_next/src/screens/Template/WorkflowJobTemplateVisualizer/Modals/NodeModals/NodeTypeStep/ProjectsList.test.jsx b/awx/ui_next/src/screens/Template/WorkflowJobTemplateVisualizer/Modals/NodeModals/NodeTypeStep/ProjectsList.test.jsx index be4b588ce2..eff4ccf517 100644 --- a/awx/ui_next/src/screens/Template/WorkflowJobTemplateVisualizer/Modals/NodeModals/NodeTypeStep/ProjectsList.test.jsx +++ b/awx/ui_next/src/screens/Template/WorkflowJobTemplateVisualizer/Modals/NodeModals/NodeTypeStep/ProjectsList.test.jsx @@ -1,10 +1,10 @@ import React from 'react'; import { act } from 'react-dom/test-utils'; -import { mountWithContexts } from '@testUtils/enzymeHelpers'; -import { ProjectsAPI } from '@api'; +import { mountWithContexts } from '../../../../../../../testUtils/enzymeHelpers'; +import { ProjectsAPI } from '../../../../../../api'; import ProjectsList from './ProjectsList'; -jest.mock('@api/models/Projects'); +jest.mock('../../../../../../api/models/Projects'); const nodeResource = { id: 1, diff --git a/awx/ui_next/src/screens/Template/WorkflowJobTemplateVisualizer/Modals/NodeModals/NodeTypeStep/WorkflowJobTemplatesList.jsx b/awx/ui_next/src/screens/Template/WorkflowJobTemplateVisualizer/Modals/NodeModals/NodeTypeStep/WorkflowJobTemplatesList.jsx index 759ae0c1e7..f614bb4efc 100644 --- a/awx/ui_next/src/screens/Template/WorkflowJobTemplateVisualizer/Modals/NodeModals/NodeTypeStep/WorkflowJobTemplatesList.jsx +++ b/awx/ui_next/src/screens/Template/WorkflowJobTemplateVisualizer/Modals/NodeModals/NodeTypeStep/WorkflowJobTemplatesList.jsx @@ -3,11 +3,11 @@ import { useLocation } from 'react-router-dom'; import { withI18n } from '@lingui/react'; import { t } from '@lingui/macro'; import { func, shape } from 'prop-types'; -import { WorkflowJobTemplatesAPI } from '@api'; -import { getQSConfig, parseQueryString } from '@util/qs'; -import PaginatedDataList from '@components/PaginatedDataList'; -import DataListToolbar from '@components/DataListToolbar'; -import CheckboxListItem from '@components/CheckboxListItem'; +import { WorkflowJobTemplatesAPI } from '../../../../../../api'; +import { getQSConfig, parseQueryString } from '../../../../../../util/qs'; +import PaginatedDataList from '../../../../../../components/PaginatedDataList'; +import DataListToolbar from '../../../../../../components/DataListToolbar'; +import CheckboxListItem from '../../../../../../components/CheckboxListItem'; const QS_CONFIG = getQSConfig('workflow_job_templates', { page: 1, diff --git a/awx/ui_next/src/screens/Template/WorkflowJobTemplateVisualizer/Modals/NodeModals/NodeTypeStep/WorkflowJobTemplatesList.test.jsx b/awx/ui_next/src/screens/Template/WorkflowJobTemplateVisualizer/Modals/NodeModals/NodeTypeStep/WorkflowJobTemplatesList.test.jsx index 69b63dd7d9..f3bf00a1d9 100644 --- a/awx/ui_next/src/screens/Template/WorkflowJobTemplateVisualizer/Modals/NodeModals/NodeTypeStep/WorkflowJobTemplatesList.test.jsx +++ b/awx/ui_next/src/screens/Template/WorkflowJobTemplateVisualizer/Modals/NodeModals/NodeTypeStep/WorkflowJobTemplatesList.test.jsx @@ -1,10 +1,10 @@ import React from 'react'; import { act } from 'react-dom/test-utils'; -import { mountWithContexts } from '@testUtils/enzymeHelpers'; -import { WorkflowJobTemplatesAPI } from '@api'; +import { mountWithContexts } from '../../../../../../../testUtils/enzymeHelpers'; +import { WorkflowJobTemplatesAPI } from '../../../../../../api'; import WorkflowJobTemplatesList from './WorkflowJobTemplatesList'; -jest.mock('@api/models/WorkflowJobTemplates'); +jest.mock('../../../../../../api/models/WorkflowJobTemplates'); const nodeResource = { id: 1, diff --git a/awx/ui_next/src/screens/Template/WorkflowJobTemplateVisualizer/Modals/NodeModals/NodeViewModal.jsx b/awx/ui_next/src/screens/Template/WorkflowJobTemplateVisualizer/Modals/NodeModals/NodeViewModal.jsx index c985054e2e..281c7b0368 100644 --- a/awx/ui_next/src/screens/Template/WorkflowJobTemplateVisualizer/Modals/NodeModals/NodeViewModal.jsx +++ b/awx/ui_next/src/screens/Template/WorkflowJobTemplateVisualizer/Modals/NodeModals/NodeViewModal.jsx @@ -1,22 +1,22 @@ import React, { useContext, useEffect, useCallback } from 'react'; import { withI18n } from '@lingui/react'; import { t } from '@lingui/macro'; +import { Button, Modal } from '@patternfly/react-core'; import { WorkflowDispatchContext, WorkflowStateContext, -} from '@contexts/Workflow'; +} from '../../../../../contexts/Workflow'; -import { Button, Modal } from '@patternfly/react-core'; -import ContentError from '@components/ContentError'; -import ContentLoading from '@components/ContentLoading'; -import PromptDetail from '@components/PromptDetail'; -import useRequest from '@util/useRequest'; +import ContentError from '../../../../../components/ContentError'; +import ContentLoading from '../../../../../components/ContentLoading'; +import PromptDetail from '../../../../../components/PromptDetail'; +import useRequest from '../../../../../util/useRequest'; import { InventorySourcesAPI, JobTemplatesAPI, ProjectsAPI, WorkflowJobTemplatesAPI, -} from '@api'; +} from '../../../../../api'; function getNodeType(node) { const ujtType = node.type || node.unified_job_type; diff --git a/awx/ui_next/src/screens/Template/WorkflowJobTemplateVisualizer/Modals/NodeModals/NodeViewModal.test.jsx b/awx/ui_next/src/screens/Template/WorkflowJobTemplateVisualizer/Modals/NodeModals/NodeViewModal.test.jsx index 7d049d70e1..3d968974d5 100644 --- a/awx/ui_next/src/screens/Template/WorkflowJobTemplateVisualizer/Modals/NodeModals/NodeViewModal.test.jsx +++ b/awx/ui_next/src/screens/Template/WorkflowJobTemplateVisualizer/Modals/NodeModals/NodeViewModal.test.jsx @@ -3,13 +3,16 @@ import { act } from 'react-dom/test-utils'; import { WorkflowDispatchContext, WorkflowStateContext, -} from '@contexts/Workflow'; -import { mountWithContexts, waitForElement } from '@testUtils/enzymeHelpers'; -import { JobTemplatesAPI, WorkflowJobTemplatesAPI } from '@api'; +} from '../../../../../contexts/Workflow'; +import { + mountWithContexts, + waitForElement, +} from '../../../../../../testUtils/enzymeHelpers'; +import { JobTemplatesAPI, WorkflowJobTemplatesAPI } from '../../../../../api'; import NodeViewModal from './NodeViewModal'; -jest.mock('@api/models/JobTemplates'); -jest.mock('@api/models/WorkflowJobTemplates'); +jest.mock('../../../../../api/models/JobTemplates'); +jest.mock('../../../../../api/models/WorkflowJobTemplates'); WorkflowJobTemplatesAPI.readLaunch.mockResolvedValue({}); WorkflowJobTemplatesAPI.readDetail.mockResolvedValue({ data: { diff --git a/awx/ui_next/src/screens/Template/WorkflowJobTemplateVisualizer/Modals/NodeModals/RunStep.jsx b/awx/ui_next/src/screens/Template/WorkflowJobTemplateVisualizer/Modals/NodeModals/RunStep.jsx index 1555f04754..f7316ee8d6 100644 --- a/awx/ui_next/src/screens/Template/WorkflowJobTemplateVisualizer/Modals/NodeModals/RunStep.jsx +++ b/awx/ui_next/src/screens/Template/WorkflowJobTemplateVisualizer/Modals/NodeModals/RunStep.jsx @@ -4,7 +4,7 @@ import { t } from '@lingui/macro'; import styled from 'styled-components'; import { func, string } from 'prop-types'; import { Title } from '@patternfly/react-core'; -import SelectableCard from '@components/SelectableCard'; +import SelectableCard from '../../../../../components/SelectableCard'; const Grid = styled.div` display: grid; diff --git a/awx/ui_next/src/screens/Template/WorkflowJobTemplateVisualizer/Modals/NodeModals/RunStep.test.jsx b/awx/ui_next/src/screens/Template/WorkflowJobTemplateVisualizer/Modals/NodeModals/RunStep.test.jsx index 84f1cec07f..b822601482 100644 --- a/awx/ui_next/src/screens/Template/WorkflowJobTemplateVisualizer/Modals/NodeModals/RunStep.test.jsx +++ b/awx/ui_next/src/screens/Template/WorkflowJobTemplateVisualizer/Modals/NodeModals/RunStep.test.jsx @@ -1,5 +1,5 @@ import React from 'react'; -import { mountWithContexts } from '@testUtils/enzymeHelpers'; +import { mountWithContexts } from '../../../../../../testUtils/enzymeHelpers'; import RunStep from './RunStep'; let wrapper; diff --git a/awx/ui_next/src/screens/Template/WorkflowJobTemplateVisualizer/Modals/UnsavedChangesModal.jsx b/awx/ui_next/src/screens/Template/WorkflowJobTemplateVisualizer/Modals/UnsavedChangesModal.jsx index 155a747151..d06803ee53 100644 --- a/awx/ui_next/src/screens/Template/WorkflowJobTemplateVisualizer/Modals/UnsavedChangesModal.jsx +++ b/awx/ui_next/src/screens/Template/WorkflowJobTemplateVisualizer/Modals/UnsavedChangesModal.jsx @@ -1,9 +1,9 @@ import React, { useContext } from 'react'; -import { WorkflowDispatchContext } from '@contexts/Workflow'; import { Button, Modal } from '@patternfly/react-core'; import { withI18n } from '@lingui/react'; import { t, Trans } from '@lingui/macro'; import { func } from 'prop-types'; +import { WorkflowDispatchContext } from '../../../../contexts/Workflow'; function UnsavedChangesModal({ i18n, onSaveAndExit, onExit }) { const dispatch = useContext(WorkflowDispatchContext); diff --git a/awx/ui_next/src/screens/Template/WorkflowJobTemplateVisualizer/Modals/UnsavedChangesModal.test.jsx b/awx/ui_next/src/screens/Template/WorkflowJobTemplateVisualizer/Modals/UnsavedChangesModal.test.jsx index 01b5e59780..5695469ce2 100644 --- a/awx/ui_next/src/screens/Template/WorkflowJobTemplateVisualizer/Modals/UnsavedChangesModal.test.jsx +++ b/awx/ui_next/src/screens/Template/WorkflowJobTemplateVisualizer/Modals/UnsavedChangesModal.test.jsx @@ -1,6 +1,6 @@ import React from 'react'; -import { WorkflowDispatchContext } from '@contexts/Workflow'; -import { mountWithContexts } from '@testUtils/enzymeHelpers'; +import { WorkflowDispatchContext } from '../../../../contexts/Workflow'; +import { mountWithContexts } from '../../../../../testUtils/enzymeHelpers'; import UnsavedChangesModal from './UnsavedChangesModal'; let wrapper; diff --git a/awx/ui_next/src/screens/Template/WorkflowJobTemplateVisualizer/Visualizer.jsx b/awx/ui_next/src/screens/Template/WorkflowJobTemplateVisualizer/Visualizer.jsx index 2cac0a8eae..f3be938dcb 100644 --- a/awx/ui_next/src/screens/Template/WorkflowJobTemplateVisualizer/Visualizer.jsx +++ b/awx/ui_next/src/screens/Template/WorkflowJobTemplateVisualizer/Visualizer.jsx @@ -1,16 +1,16 @@ import React, { useEffect, useReducer } from 'react'; -import { - WorkflowDispatchContext, - WorkflowStateContext, -} from '@contexts/Workflow'; import { useHistory } from 'react-router-dom'; import { withI18n } from '@lingui/react'; import styled from 'styled-components'; import { shape } from 'prop-types'; -import { layoutGraph } from '@components/Workflow/WorkflowUtils'; -import ContentError from '@components/ContentError'; -import ContentLoading from '@components/ContentLoading'; -import workflowReducer from '@components/Workflow/workflowReducer'; +import { + WorkflowDispatchContext, + WorkflowStateContext, +} from '../../../contexts/Workflow'; +import { layoutGraph } from '../../../components/Workflow/WorkflowUtils'; +import ContentError from '../../../components/ContentError'; +import ContentLoading from '../../../components/ContentLoading'; +import workflowReducer from '../../../components/Workflow/workflowReducer'; import { DeleteAllNodesModal, UnsavedChangesModal } from './Modals'; import { LinkAddModal, @@ -30,7 +30,7 @@ import { WorkflowApprovalTemplatesAPI, WorkflowJobTemplateNodesAPI, WorkflowJobTemplatesAPI, -} from '@api'; +} from '../../../api'; const CenteredContent = styled.div` align-items: center; diff --git a/awx/ui_next/src/screens/Template/WorkflowJobTemplateVisualizer/Visualizer.test.jsx b/awx/ui_next/src/screens/Template/WorkflowJobTemplateVisualizer/Visualizer.test.jsx index de1434951e..26770f16f9 100644 --- a/awx/ui_next/src/screens/Template/WorkflowJobTemplateVisualizer/Visualizer.test.jsx +++ b/awx/ui_next/src/screens/Template/WorkflowJobTemplateVisualizer/Visualizer.test.jsx @@ -1,10 +1,13 @@ import React from 'react'; import { act } from 'react-dom/test-utils'; -import { mountWithContexts } from '@testUtils/enzymeHelpers'; -import { WorkflowJobTemplateNodesAPI, WorkflowJobTemplatesAPI } from '@api'; +import { mountWithContexts } from '../../../../testUtils/enzymeHelpers'; +import { + WorkflowJobTemplateNodesAPI, + WorkflowJobTemplatesAPI, +} from '../../../api'; import Visualizer from './Visualizer'; -jest.mock('@api'); +jest.mock('../../../api'); const template = { id: 1, diff --git a/awx/ui_next/src/screens/Template/WorkflowJobTemplateVisualizer/VisualizerGraph.jsx b/awx/ui_next/src/screens/Template/WorkflowJobTemplateVisualizer/VisualizerGraph.jsx index bf65330702..55948c052f 100644 --- a/awx/ui_next/src/screens/Template/WorkflowJobTemplateVisualizer/VisualizerGraph.jsx +++ b/awx/ui_next/src/screens/Template/WorkflowJobTemplateVisualizer/VisualizerGraph.jsx @@ -1,18 +1,18 @@ import React, { useContext, useEffect, useRef, useState } from 'react'; -import { - WorkflowDispatchContext, - WorkflowStateContext, -} from '@contexts/Workflow'; import { withI18n } from '@lingui/react'; import { t } from '@lingui/macro'; import styled from 'styled-components'; import { bool } from 'prop-types'; import * as d3 from 'd3'; +import { + WorkflowDispatchContext, + WorkflowStateContext, +} from '../../../contexts/Workflow'; import { getScaleAndOffsetToFit, constants as wfConstants, getTranslatePointsForZoom, -} from '@components/Workflow/WorkflowUtils'; +} from '../../../components/Workflow/WorkflowUtils'; import { WorkflowHelp, WorkflowLegend, @@ -20,11 +20,8 @@ import { WorkflowNodeHelp, WorkflowStartNode, WorkflowTools, -} from '@components/Workflow'; -import { - VisualizerLink, - VisualizerNode, -} from '@screens/Template/WorkflowJobTemplateVisualizer'; +} from '../../../components/Workflow'; +import { VisualizerLink, VisualizerNode } from '.'; const PotentialLink = styled.polyline` pointer-events: none; diff --git a/awx/ui_next/src/screens/Template/WorkflowJobTemplateVisualizer/VisualizerGraph.test.jsx b/awx/ui_next/src/screens/Template/WorkflowJobTemplateVisualizer/VisualizerGraph.test.jsx index 40921aeeca..d510fae4ac 100644 --- a/awx/ui_next/src/screens/Template/WorkflowJobTemplateVisualizer/VisualizerGraph.test.jsx +++ b/awx/ui_next/src/screens/Template/WorkflowJobTemplateVisualizer/VisualizerGraph.test.jsx @@ -1,6 +1,6 @@ import React from 'react'; -import { mountWithContexts } from '@testUtils/enzymeHelpers'; -import { WorkflowStateContext } from '@contexts/Workflow'; +import { mountWithContexts } from '../../../../testUtils/enzymeHelpers'; +import { WorkflowStateContext } from '../../../contexts/Workflow'; import VisualizerGraph from './VisualizerGraph'; const workflowContext = { diff --git a/awx/ui_next/src/screens/Template/WorkflowJobTemplateVisualizer/VisualizerLink.jsx b/awx/ui_next/src/screens/Template/WorkflowJobTemplateVisualizer/VisualizerLink.jsx index b046f22056..1904fa9778 100644 --- a/awx/ui_next/src/screens/Template/WorkflowJobTemplateVisualizer/VisualizerLink.jsx +++ b/awx/ui_next/src/screens/Template/WorkflowJobTemplateVisualizer/VisualizerLink.jsx @@ -1,22 +1,22 @@ import React, { useContext, useEffect, useRef, useState } from 'react'; -import { - WorkflowDispatchContext, - WorkflowStateContext, -} from '@contexts/Workflow'; import styled from 'styled-components'; import { withI18n } from '@lingui/react'; import { t } from '@lingui/macro'; import { bool, func, shape } from 'prop-types'; import { PencilAltIcon, PlusIcon, TrashAltIcon } from '@patternfly/react-icons'; +import { + WorkflowDispatchContext, + WorkflowStateContext, +} from '../../../contexts/Workflow'; import { generateLine, getLinePoints, getLinkOverlayPoints, -} from '@components/Workflow/WorkflowUtils'; +} from '../../../components/Workflow/WorkflowUtils'; import { WorkflowActionTooltip, WorkflowActionTooltipItem, -} from '@components/Workflow'; +} from '../../../components/Workflow'; const LinkG = styled.g` pointer-events: ${props => (props.ignorePointerEvents ? 'none' : 'auto')}; diff --git a/awx/ui_next/src/screens/Template/WorkflowJobTemplateVisualizer/VisualizerLink.test.jsx b/awx/ui_next/src/screens/Template/WorkflowJobTemplateVisualizer/VisualizerLink.test.jsx index 6efd3fb478..ceb16b6b2d 100644 --- a/awx/ui_next/src/screens/Template/WorkflowJobTemplateVisualizer/VisualizerLink.test.jsx +++ b/awx/ui_next/src/screens/Template/WorkflowJobTemplateVisualizer/VisualizerLink.test.jsx @@ -2,8 +2,8 @@ import React from 'react'; import { WorkflowDispatchContext, WorkflowStateContext, -} from '@contexts/Workflow'; -import { mountWithContexts } from '@testUtils/enzymeHelpers'; +} from '../../../contexts/Workflow'; +import { mountWithContexts } from '../../../../testUtils/enzymeHelpers'; import VisualizerLink from './VisualizerLink'; const link = { diff --git a/awx/ui_next/src/screens/Template/WorkflowJobTemplateVisualizer/VisualizerNode.jsx b/awx/ui_next/src/screens/Template/WorkflowJobTemplateVisualizer/VisualizerNode.jsx index 423e347b18..e38a1df488 100644 --- a/awx/ui_next/src/screens/Template/WorkflowJobTemplateVisualizer/VisualizerNode.jsx +++ b/awx/ui_next/src/screens/Template/WorkflowJobTemplateVisualizer/VisualizerNode.jsx @@ -1,8 +1,4 @@ import React, { useContext, useRef, useState } from 'react'; -import { - WorkflowDispatchContext, - WorkflowStateContext, -} from '@contexts/Workflow'; import styled from 'styled-components'; import { withI18n } from '@lingui/react'; import { t } from '@lingui/macro'; @@ -14,12 +10,16 @@ import { PlusIcon, TrashAltIcon, } from '@patternfly/react-icons'; -import { constants as wfConstants } from '@components/Workflow/WorkflowUtils'; +import { + WorkflowDispatchContext, + WorkflowStateContext, +} from '../../../contexts/Workflow'; +import { constants as wfConstants } from '../../../components/Workflow/WorkflowUtils'; import { WorkflowActionTooltip, WorkflowActionTooltipItem, WorkflowNodeTypeLetter, -} from '@components/Workflow'; +} from '../../../components/Workflow'; const NodeG = styled.g` pointer-events: ${props => (props.noPointerEvents ? 'none' : 'initial')}; diff --git a/awx/ui_next/src/screens/Template/WorkflowJobTemplateVisualizer/VisualizerNode.test.jsx b/awx/ui_next/src/screens/Template/WorkflowJobTemplateVisualizer/VisualizerNode.test.jsx index 4adc0184d8..85409c3d3b 100644 --- a/awx/ui_next/src/screens/Template/WorkflowJobTemplateVisualizer/VisualizerNode.test.jsx +++ b/awx/ui_next/src/screens/Template/WorkflowJobTemplateVisualizer/VisualizerNode.test.jsx @@ -2,8 +2,8 @@ import React from 'react'; import { WorkflowDispatchContext, WorkflowStateContext, -} from '@contexts/Workflow'; -import { mountWithContexts } from '@testUtils/enzymeHelpers'; +} from '../../../contexts/Workflow'; +import { mountWithContexts } from '../../../../testUtils/enzymeHelpers'; import VisualizerNode from './VisualizerNode'; const mockedContext = { diff --git a/awx/ui_next/src/screens/Template/WorkflowJobTemplateVisualizer/VisualizerStartScreen.jsx b/awx/ui_next/src/screens/Template/WorkflowJobTemplateVisualizer/VisualizerStartScreen.jsx index d51596f618..cee8dfcbac 100644 --- a/awx/ui_next/src/screens/Template/WorkflowJobTemplateVisualizer/VisualizerStartScreen.jsx +++ b/awx/ui_next/src/screens/Template/WorkflowJobTemplateVisualizer/VisualizerStartScreen.jsx @@ -1,9 +1,9 @@ import React, { useContext } from 'react'; -import { WorkflowDispatchContext } from '@contexts/Workflow'; import { withI18n } from '@lingui/react'; import { t } from '@lingui/macro'; import { Button as PFButton } from '@patternfly/react-core'; import styled from 'styled-components'; +import { WorkflowDispatchContext } from '../../../contexts/Workflow'; const Button = styled(PFButton)` && { diff --git a/awx/ui_next/src/screens/Template/WorkflowJobTemplateVisualizer/VisualizerStartScreen.test.jsx b/awx/ui_next/src/screens/Template/WorkflowJobTemplateVisualizer/VisualizerStartScreen.test.jsx index bc3b6fd38f..7ba99dd11a 100644 --- a/awx/ui_next/src/screens/Template/WorkflowJobTemplateVisualizer/VisualizerStartScreen.test.jsx +++ b/awx/ui_next/src/screens/Template/WorkflowJobTemplateVisualizer/VisualizerStartScreen.test.jsx @@ -1,6 +1,6 @@ import React from 'react'; -import { WorkflowDispatchContext } from '@contexts/Workflow'; -import { mountWithContexts } from '@testUtils/enzymeHelpers'; +import { WorkflowDispatchContext } from '../../../contexts/Workflow'; +import { mountWithContexts } from '../../../../testUtils/enzymeHelpers'; import VisualizerStartScreen from './VisualizerStartScreen'; const dispatch = jest.fn(); diff --git a/awx/ui_next/src/screens/Template/WorkflowJobTemplateVisualizer/VisualizerToolbar.jsx b/awx/ui_next/src/screens/Template/WorkflowJobTemplateVisualizer/VisualizerToolbar.jsx index c6a24b1656..01669276de 100644 --- a/awx/ui_next/src/screens/Template/WorkflowJobTemplateVisualizer/VisualizerToolbar.jsx +++ b/awx/ui_next/src/screens/Template/WorkflowJobTemplateVisualizer/VisualizerToolbar.jsx @@ -1,8 +1,4 @@ import React, { useContext } from 'react'; -import { - WorkflowDispatchContext, - WorkflowStateContext, -} from '@contexts/Workflow'; import { withI18n } from '@lingui/react'; import { t } from '@lingui/macro'; import { bool, func, shape } from 'prop-types'; @@ -20,8 +16,12 @@ import { TrashAltIcon, WrenchIcon, } from '@patternfly/react-icons'; -import LaunchButton from '@components/LaunchButton'; import styled from 'styled-components'; +import LaunchButton from '../../../components/LaunchButton'; +import { + WorkflowDispatchContext, + WorkflowStateContext, +} from '../../../contexts/Workflow'; const Badge = styled(PFBadge)` align-items: center; diff --git a/awx/ui_next/src/screens/Template/WorkflowJobTemplateVisualizer/VisualizerToolbar.test.jsx b/awx/ui_next/src/screens/Template/WorkflowJobTemplateVisualizer/VisualizerToolbar.test.jsx index 3edfa63c0d..16eb826d22 100644 --- a/awx/ui_next/src/screens/Template/WorkflowJobTemplateVisualizer/VisualizerToolbar.test.jsx +++ b/awx/ui_next/src/screens/Template/WorkflowJobTemplateVisualizer/VisualizerToolbar.test.jsx @@ -2,8 +2,8 @@ import React from 'react'; import { WorkflowDispatchContext, WorkflowStateContext, -} from '@contexts/Workflow'; -import { mountWithContexts } from '@testUtils/enzymeHelpers'; +} from '../../../contexts/Workflow'; +import { mountWithContexts } from '../../../../testUtils/enzymeHelpers'; import VisualizerToolbar from './VisualizerToolbar'; let wrapper; diff --git a/awx/ui_next/src/screens/Template/shared/JobTemplateForm.jsx b/awx/ui_next/src/screens/Template/shared/JobTemplateForm.jsx index 48c4caeb33..a3a01c92c7 100644 --- a/awx/ui_next/src/screens/Template/shared/JobTemplateForm.jsx +++ b/awx/ui_next/src/screens/Template/shared/JobTemplateForm.jsx @@ -10,34 +10,34 @@ import { Checkbox, TextInput, } from '@patternfly/react-core'; -import ContentError from '@components/ContentError'; -import ContentLoading from '@components/ContentLoading'; -import AnsibleSelect from '@components/AnsibleSelect'; -import { TagMultiSelect } from '@components/MultiSelect'; -import useRequest from '@util/useRequest'; +import ContentError from '../../../components/ContentError'; +import ContentLoading from '../../../components/ContentLoading'; +import AnsibleSelect from '../../../components/AnsibleSelect'; +import { TagMultiSelect } from '../../../components/MultiSelect'; +import useRequest from '../../../util/useRequest'; -import FormActionGroup from '@components/FormActionGroup'; +import FormActionGroup from '../../../components/FormActionGroup'; import FormField, { CheckboxField, FieldTooltip, FormSubmitError, -} from '@components/FormField'; -import FieldWithPrompt from '@components/FieldWithPrompt'; +} from '../../../components/FormField'; +import FieldWithPrompt from '../../../components/FieldWithPrompt'; import { FormColumnLayout, FormFullWidthLayout, FormCheckboxLayout, -} from '@components/FormLayout'; -import { VariablesField } from '@components/CodeMirrorInput'; -import { required } from '@util/validators'; -import { JobTemplate } from '@types'; +} from '../../../components/FormLayout'; +import { VariablesField } from '../../../components/CodeMirrorInput'; +import { required } from '../../../util/validators'; +import { JobTemplate } from '../../../types'; import { InventoryLookup, InstanceGroupsLookup, ProjectLookup, MultiCredentialsLookup, -} from '@components/Lookup'; -import { JobTemplatesAPI, ProjectsAPI } from '@api'; +} from '../../../components/Lookup'; +import { JobTemplatesAPI, ProjectsAPI } from '../../../api'; import LabelSelect from './LabelSelect'; import PlaybookSelect from './PlaybookSelect'; import WebhookSubForm from './WebhookSubForm'; diff --git a/awx/ui_next/src/screens/Template/shared/JobTemplateForm.test.jsx b/awx/ui_next/src/screens/Template/shared/JobTemplateForm.test.jsx index 430bd42984..978d0dba05 100644 --- a/awx/ui_next/src/screens/Template/shared/JobTemplateForm.test.jsx +++ b/awx/ui_next/src/screens/Template/shared/JobTemplateForm.test.jsx @@ -1,13 +1,21 @@ import React from 'react'; import { act } from 'react-dom/test-utils'; -import { mountWithContexts, waitForElement } from '@testUtils/enzymeHelpers'; -import { sleep } from '@testUtils/testUtils'; import { Route } from 'react-router-dom'; import { createMemoryHistory } from 'history'; +import { + mountWithContexts, + waitForElement, +} from '../../../../testUtils/enzymeHelpers'; +import { sleep } from '../../../../testUtils/testUtils'; import JobTemplateForm from './JobTemplateForm'; -import { LabelsAPI, JobTemplatesAPI, ProjectsAPI, CredentialsAPI } from '@api'; +import { + LabelsAPI, + JobTemplatesAPI, + ProjectsAPI, + CredentialsAPI, +} from '../../../api'; -jest.mock('@api'); +jest.mock('../../../api'); describe('', () => { const mockData = { diff --git a/awx/ui_next/src/screens/Template/shared/LabelSelect.jsx b/awx/ui_next/src/screens/Template/shared/LabelSelect.jsx index ba28424a49..7db5568c82 100644 --- a/awx/ui_next/src/screens/Template/shared/LabelSelect.jsx +++ b/awx/ui_next/src/screens/Template/shared/LabelSelect.jsx @@ -1,8 +1,8 @@ import React, { useState, useEffect } from 'react'; import { func, arrayOf, number, shape, string, oneOfType } from 'prop-types'; import { Select, SelectOption, SelectVariant } from '@patternfly/react-core'; -import { LabelsAPI } from '@api'; -import { useSyncedSelectValue } from '@components/MultiSelect'; +import { LabelsAPI } from '../../../api'; +import { useSyncedSelectValue } from '../../../components/MultiSelect'; async function loadLabelOptions(setLabels, onError) { let labels; diff --git a/awx/ui_next/src/screens/Template/shared/LabelSelect.test.jsx b/awx/ui_next/src/screens/Template/shared/LabelSelect.test.jsx index dda07d8e99..39342dd3fe 100644 --- a/awx/ui_next/src/screens/Template/shared/LabelSelect.test.jsx +++ b/awx/ui_next/src/screens/Template/shared/LabelSelect.test.jsx @@ -1,10 +1,10 @@ import React from 'react'; import { act } from 'react-dom/test-utils'; import { mount } from 'enzyme'; -import { LabelsAPI } from '@api'; +import { LabelsAPI } from '../../../api'; import LabelSelect from './LabelSelect'; -jest.mock('@api'); +jest.mock('../../../api'); const options = [{ id: 1, name: 'one' }, { id: 2, name: 'two' }]; diff --git a/awx/ui_next/src/screens/Template/shared/PlaybookSelect.jsx b/awx/ui_next/src/screens/Template/shared/PlaybookSelect.jsx index 226f4836a1..cefd5bd126 100644 --- a/awx/ui_next/src/screens/Template/shared/PlaybookSelect.jsx +++ b/awx/ui_next/src/screens/Template/shared/PlaybookSelect.jsx @@ -2,8 +2,8 @@ import React, { useState, useEffect } from 'react'; import { number, string, oneOfType } from 'prop-types'; import { withI18n } from '@lingui/react'; import { t } from '@lingui/macro'; -import AnsibleSelect from '@components/AnsibleSelect'; -import { ProjectsAPI } from '@api'; +import AnsibleSelect from '../../../components/AnsibleSelect'; +import { ProjectsAPI } from '../../../api'; function PlaybookSelect({ projectId, isValid, field, onBlur, onError, i18n }) { const [options, setOptions] = useState([]); diff --git a/awx/ui_next/src/screens/Template/shared/PlaybookSelect.test.jsx b/awx/ui_next/src/screens/Template/shared/PlaybookSelect.test.jsx index e3fab12024..302e0b0bf6 100644 --- a/awx/ui_next/src/screens/Template/shared/PlaybookSelect.test.jsx +++ b/awx/ui_next/src/screens/Template/shared/PlaybookSelect.test.jsx @@ -1,10 +1,10 @@ import React from 'react'; import { act } from 'react-dom/test-utils'; -import { mountWithContexts } from '@testUtils/enzymeHelpers'; +import { mountWithContexts } from '../../../../testUtils/enzymeHelpers'; import PlaybookSelect from './PlaybookSelect'; -import { ProjectsAPI } from '@api'; +import { ProjectsAPI } from '../../../api'; -jest.mock('@api'); +jest.mock('../../../api'); describe('', () => { beforeEach(() => { diff --git a/awx/ui_next/src/screens/Template/shared/WebhookSubForm.jsx b/awx/ui_next/src/screens/Template/shared/WebhookSubForm.jsx index d38c1644ea..3141a650b7 100644 --- a/awx/ui_next/src/screens/Template/shared/WebhookSubForm.jsx +++ b/awx/ui_next/src/screens/Template/shared/WebhookSubForm.jsx @@ -9,19 +9,19 @@ import { InputGroup, Button, } from '@patternfly/react-core'; -import ContentError from '@components/ContentError'; -import ContentLoading from '@components/ContentLoading'; -import useRequest from '@util/useRequest'; +import ContentError from '../../../components/ContentError'; +import ContentLoading from '../../../components/ContentLoading'; +import useRequest from '../../../util/useRequest'; import { useField } from 'formik'; -import { FormColumnLayout } from '@components/FormLayout'; -import { CredentialLookup } from '@components/Lookup'; -import AnsibleSelect from '@components/AnsibleSelect'; -import { FieldTooltip } from '@components/FormField'; +import { FormColumnLayout } from '../../../components/FormLayout'; +import { CredentialLookup } from '../../../components/Lookup'; +import AnsibleSelect from '../../../components/AnsibleSelect'; +import { FieldTooltip } from '../../../components/FormField'; import { JobTemplatesAPI, WorkflowJobTemplatesAPI, CredentialTypesAPI, -} from '@api'; +} from '../../../api'; function WebhookSubForm({ i18n, enableWebhooks, templateType }) { const { id } = useParams(); diff --git a/awx/ui_next/src/screens/Template/shared/WebhookSubForm.test.jsx b/awx/ui_next/src/screens/Template/shared/WebhookSubForm.test.jsx index c867ac43fe..9b9896d694 100644 --- a/awx/ui_next/src/screens/Template/shared/WebhookSubForm.test.jsx +++ b/awx/ui_next/src/screens/Template/shared/WebhookSubForm.test.jsx @@ -3,13 +3,16 @@ import { act } from 'react-dom/test-utils'; import { Route } from 'react-router-dom'; import { createMemoryHistory } from 'history'; -import { mountWithContexts, waitForElement } from '@testUtils/enzymeHelpers'; -import { CredentialsAPI } from '@api'; import { Formik } from 'formik'; +import { + mountWithContexts, + waitForElement, +} from '../../../../testUtils/enzymeHelpers'; +import { CredentialsAPI } from '../../../api'; import WebhookSubForm from './WebhookSubForm'; -jest.mock('@api'); +jest.mock('../../../api'); describe('', () => { let wrapper; diff --git a/awx/ui_next/src/screens/Template/shared/WorkflowJobTemplateForm.jsx b/awx/ui_next/src/screens/Template/shared/WorkflowJobTemplateForm.jsx index 6d884d7516..50aca155b6 100644 --- a/awx/ui_next/src/screens/Template/shared/WorkflowJobTemplateForm.jsx +++ b/awx/ui_next/src/screens/Template/shared/WorkflowJobTemplateForm.jsx @@ -6,26 +6,26 @@ import PropTypes, { shape } from 'prop-types'; import { withI18n } from '@lingui/react'; import { useField, withFormik } from 'formik'; import { Form, FormGroup, Checkbox } from '@patternfly/react-core'; -import { required } from '@util/validators'; +import { required } from '../../../util/validators'; import FormField, { FieldTooltip, FormSubmitError, -} from '@components/FormField'; +} from '../../../components/FormField'; import { FormColumnLayout, FormFullWidthLayout, FormCheckboxLayout, -} from '@components/FormLayout'; -import OrganizationLookup from '@components/Lookup/OrganizationLookup'; -import { InventoryLookup } from '@components/Lookup'; -import { VariablesField } from '@components/CodeMirrorInput'; -import FormActionGroup from '@components/FormActionGroup'; -import ContentError from '@components/ContentError'; -import CheckboxField from '@components/FormField/CheckboxField'; +} from '../../../components/FormLayout'; +import OrganizationLookup from '../../../components/Lookup/OrganizationLookup'; +import { InventoryLookup } from '../../../components/Lookup'; +import { VariablesField } from '../../../components/CodeMirrorInput'; +import FormActionGroup from '../../../components/FormActionGroup'; +import ContentError from '../../../components/ContentError'; +import CheckboxField from '../../../components/FormField/CheckboxField'; import LabelSelect from './LabelSelect'; import WebhookSubForm from './WebhookSubForm'; -import { WorkFlowJobTemplate } from '@types'; +import { WorkFlowJobTemplate } from '../../../types'; const urlOrigin = window.location.origin; diff --git a/awx/ui_next/src/screens/Template/shared/WorkflowJobTemplateForm.test.jsx b/awx/ui_next/src/screens/Template/shared/WorkflowJobTemplateForm.test.jsx index d3dcbef066..57747a12bf 100644 --- a/awx/ui_next/src/screens/Template/shared/WorkflowJobTemplateForm.test.jsx +++ b/awx/ui_next/src/screens/Template/shared/WorkflowJobTemplateForm.test.jsx @@ -2,22 +2,22 @@ import React from 'react'; import { act } from 'react-dom/test-utils'; import { Route } from 'react-router-dom'; import { createMemoryHistory } from 'history'; -import { sleep } from '@testUtils/testUtils'; +import { sleep } from '../../../../testUtils/testUtils'; -import { mountWithContexts } from '@testUtils/enzymeHelpers'; +import { mountWithContexts } from '../../../../testUtils/enzymeHelpers'; import WorkflowJobTemplateForm from './WorkflowJobTemplateForm'; import { WorkflowJobTemplatesAPI, LabelsAPI, OrganizationsAPI, InventoriesAPI, -} from '@api'; +} from '../../../api'; -jest.mock('@api/models/CredentialTypes'); -jest.mock('@api/models/WorkflowJobTemplates'); -jest.mock('@api/models/Labels'); -jest.mock('@api/models/Organizations'); -jest.mock('@api/models/Inventories'); +jest.mock('../../../api/models/CredentialTypes'); +jest.mock('../../../api/models/WorkflowJobTemplates'); +jest.mock('../../../api/models/Labels'); +jest.mock('../../../api/models/Organizations'); +jest.mock('../../../api/models/Inventories'); describe('', () => { let wrapper; diff --git a/awx/ui_next/src/screens/UISetting/UISettings.test.jsx b/awx/ui_next/src/screens/UISetting/UISettings.test.jsx index bda41ac784..106b1d4e4e 100644 --- a/awx/ui_next/src/screens/UISetting/UISettings.test.jsx +++ b/awx/ui_next/src/screens/UISetting/UISettings.test.jsx @@ -1,6 +1,6 @@ import React from 'react'; -import { mountWithContexts } from '@testUtils/enzymeHelpers'; +import { mountWithContexts } from '../../../testUtils/enzymeHelpers'; import UISettings from './UISettings'; diff --git a/awx/ui_next/src/screens/User/User.jsx b/awx/ui_next/src/screens/User/User.jsx index cee493bc77..982ae0de5e 100644 --- a/awx/ui_next/src/screens/User/User.jsx +++ b/awx/ui_next/src/screens/User/User.jsx @@ -9,14 +9,14 @@ import { useRouteMatch, useLocation, } from 'react-router-dom'; -import useRequest from '@util/useRequest'; -import { UsersAPI } from '@api'; import { Card, CardActions, PageSection } from '@patternfly/react-core'; -import { TabbedCardHeader } from '@components/Card'; -import CardCloseButton from '@components/CardCloseButton'; -import ContentError from '@components/ContentError'; -import ContentLoading from '@components/ContentLoading'; -import RoutedTabs from '@components/RoutedTabs'; +import useRequest from '../../util/useRequest'; +import { UsersAPI } from '../../api'; +import { TabbedCardHeader } from '../../components/Card'; +import CardCloseButton from '../../components/CardCloseButton'; +import ContentError from '../../components/ContentError'; +import ContentLoading from '../../components/ContentLoading'; +import RoutedTabs from '../../components/RoutedTabs'; import UserDetail from './UserDetail'; import UserEdit from './UserEdit'; import UserOrganizations from './UserOrganizations'; diff --git a/awx/ui_next/src/screens/User/User.test.jsx b/awx/ui_next/src/screens/User/User.test.jsx index d389a54c9d..725247776d 100644 --- a/awx/ui_next/src/screens/User/User.test.jsx +++ b/awx/ui_next/src/screens/User/User.test.jsx @@ -1,12 +1,15 @@ import React from 'react'; import { act } from 'react-dom/test-utils'; import { createMemoryHistory } from 'history'; -import { UsersAPI } from '@api'; -import { mountWithContexts, waitForElement } from '@testUtils/enzymeHelpers'; +import { UsersAPI } from '../../api'; +import { + mountWithContexts, + waitForElement, +} from '../../../testUtils/enzymeHelpers'; import mockDetails from './data.user.json'; import User from './User'; -jest.mock('@api'); +jest.mock('../../api'); async function getUsers() { return { diff --git a/awx/ui_next/src/screens/User/UserAccess/UserAccessList.jsx b/awx/ui_next/src/screens/User/UserAccess/UserAccessList.jsx index 808ec3530a..db62a14bd6 100644 --- a/awx/ui_next/src/screens/User/UserAccess/UserAccessList.jsx +++ b/awx/ui_next/src/screens/User/UserAccess/UserAccessList.jsx @@ -2,13 +2,13 @@ import React, { useCallback, useEffect } from 'react'; import { useParams, useLocation } from 'react-router-dom'; import { withI18n } from '@lingui/react'; import { t } from '@lingui/macro'; -import { getQSConfig, parseQueryString } from '@util/qs'; -import { UsersAPI } from '@api'; -import useRequest from '@util/useRequest'; +import { getQSConfig, parseQueryString } from '../../../util/qs'; +import { UsersAPI } from '../../../api'; +import useRequest from '../../../util/useRequest'; import PaginatedDataList, { ToolbarAddButton, -} from '@components/PaginatedDataList'; -import DatalistToolbar from '@components/DataListToolbar'; +} from '../../../components/PaginatedDataList'; +import DatalistToolbar from '../../../components/DataListToolbar'; import UserAccessListItem from './UserAccessListItem'; const QS_CONFIG = getQSConfig('roles', { diff --git a/awx/ui_next/src/screens/User/UserAccess/UserAccessList.test.jsx b/awx/ui_next/src/screens/User/UserAccess/UserAccessList.test.jsx index 85cdf25f4f..d25649ddd9 100644 --- a/awx/ui_next/src/screens/User/UserAccess/UserAccessList.test.jsx +++ b/awx/ui_next/src/screens/User/UserAccess/UserAccessList.test.jsx @@ -1,12 +1,12 @@ import React from 'react'; import { act } from 'react-dom/test-utils'; import { createMemoryHistory } from 'history'; -import { UsersAPI } from '@api'; +import { UsersAPI } from '../../../api'; import { Route } from 'react-router-dom'; -import { mountWithContexts, waitForElement } from '@testUtils/enzymeHelpers'; +import { mountWithContexts, waitForElement } from '../../../../testUtils/enzymeHelpers'; import UserAccessList from './UserAccessList'; -jest.mock('@api/models/Users'); +jest.mock('../../../api/models/Users'); describe('', () => { let wrapper; let history; diff --git a/awx/ui_next/src/screens/User/UserAccess/UserAccessListItem.jsx b/awx/ui_next/src/screens/User/UserAccess/UserAccessListItem.jsx index 032c981da6..fcf1fabf0f 100644 --- a/awx/ui_next/src/screens/User/UserAccess/UserAccessListItem.jsx +++ b/awx/ui_next/src/screens/User/UserAccess/UserAccessListItem.jsx @@ -6,7 +6,7 @@ import { DataListItemCells, DataListItemRow, } from '@patternfly/react-core'; -import DataListCell from '@components/DataListCell'; +import DataListCell from '../../../components/DataListCell'; import { Link } from 'react-router-dom'; diff --git a/awx/ui_next/src/screens/User/UserAccess/UserAccessListItem.test.jsx b/awx/ui_next/src/screens/User/UserAccess/UserAccessListItem.test.jsx index 3b6df96c73..31b53ca477 100644 --- a/awx/ui_next/src/screens/User/UserAccess/UserAccessListItem.test.jsx +++ b/awx/ui_next/src/screens/User/UserAccess/UserAccessListItem.test.jsx @@ -1,5 +1,5 @@ import React from 'react'; -import { mountWithContexts } from '@testUtils/enzymeHelpers'; +import { mountWithContexts } from '../../../../testUtils/enzymeHelpers'; import UserAccessListItem from './UserAccessListItem'; describe('', () => { diff --git a/awx/ui_next/src/screens/User/UserAdd/UserAdd.jsx b/awx/ui_next/src/screens/User/UserAdd/UserAdd.jsx index 279bb4e1ff..d54da84592 100644 --- a/awx/ui_next/src/screens/User/UserAdd/UserAdd.jsx +++ b/awx/ui_next/src/screens/User/UserAdd/UserAdd.jsx @@ -1,9 +1,9 @@ import React, { useState } from 'react'; import { useHistory } from 'react-router-dom'; import { Card, PageSection } from '@patternfly/react-core'; -import { CardBody } from '@components/Card'; +import { CardBody } from '../../../components/Card'; import UserForm from '../shared/UserForm'; -import { UsersAPI } from '@api'; +import { UsersAPI } from '../../../api'; function UserAdd() { const [formSubmitError, setFormSubmitError] = useState(null); diff --git a/awx/ui_next/src/screens/User/UserAdd/UserAdd.test.jsx b/awx/ui_next/src/screens/User/UserAdd/UserAdd.test.jsx index 1537855d0e..ec18de0974 100644 --- a/awx/ui_next/src/screens/User/UserAdd/UserAdd.test.jsx +++ b/awx/ui_next/src/screens/User/UserAdd/UserAdd.test.jsx @@ -1,11 +1,14 @@ import React from 'react'; import { act } from 'react-dom/test-utils'; import { createMemoryHistory } from 'history'; -import { mountWithContexts, waitForElement } from '@testUtils/enzymeHelpers'; +import { + mountWithContexts, + waitForElement, +} from '../../../../testUtils/enzymeHelpers'; import UserAdd from './UserAdd'; -import { UsersAPI } from '@api'; +import { UsersAPI } from '../../../api'; -jest.mock('@api'); +jest.mock('../../../api'); let wrapper; describe('', () => { diff --git a/awx/ui_next/src/screens/User/UserDetail/UserDetail.jsx b/awx/ui_next/src/screens/User/UserDetail/UserDetail.jsx index 8170ab33b0..aa2889921a 100644 --- a/awx/ui_next/src/screens/User/UserDetail/UserDetail.jsx +++ b/awx/ui_next/src/screens/User/UserDetail/UserDetail.jsx @@ -3,15 +3,15 @@ import { Link, useHistory } from 'react-router-dom'; import { withI18n } from '@lingui/react'; import { t } from '@lingui/macro'; -import AlertModal from '@components/AlertModal'; import { Button } from '@patternfly/react-core'; -import { CardBody, CardActionsRow } from '@components/Card'; -import ContentLoading from '@components/ContentLoading'; -import DeleteButton from '@components/DeleteButton'; -import { DetailList, Detail } from '@components/DetailList'; -import ErrorDetail from '@components/ErrorDetail'; -import { formatDateString } from '@util/dates'; -import { UsersAPI } from '@api'; +import AlertModal from '../../../components/AlertModal'; +import { CardBody, CardActionsRow } from '../../../components/Card'; +import ContentLoading from '../../../components/ContentLoading'; +import DeleteButton from '../../../components/DeleteButton'; +import { DetailList, Detail } from '../../../components/DetailList'; +import ErrorDetail from '../../../components/ErrorDetail'; +import { formatDateString } from '../../../util/dates'; +import { UsersAPI } from '../../../api'; function UserDetail({ user, i18n }) { const { diff --git a/awx/ui_next/src/screens/User/UserDetail/UserDetail.test.jsx b/awx/ui_next/src/screens/User/UserDetail/UserDetail.test.jsx index 48c706913e..b76b926cc8 100644 --- a/awx/ui_next/src/screens/User/UserDetail/UserDetail.test.jsx +++ b/awx/ui_next/src/screens/User/UserDetail/UserDetail.test.jsx @@ -1,12 +1,15 @@ import React from 'react'; import { act } from 'react-dom/test-utils'; import { createMemoryHistory } from 'history'; -import { mountWithContexts, waitForElement } from '@testUtils/enzymeHelpers'; -import { UsersAPI } from '@api'; +import { + mountWithContexts, + waitForElement, +} from '../../../../testUtils/enzymeHelpers'; +import { UsersAPI } from '../../../api'; import UserDetail from './UserDetail'; import mockDetails from '../data.user.json'; -jest.mock('@api'); +jest.mock('../../../api'); describe('', () => { test('initially renders succesfully', () => { diff --git a/awx/ui_next/src/screens/User/UserEdit/UserEdit.jsx b/awx/ui_next/src/screens/User/UserEdit/UserEdit.jsx index 8e9c121e3a..96e159e02c 100644 --- a/awx/ui_next/src/screens/User/UserEdit/UserEdit.jsx +++ b/awx/ui_next/src/screens/User/UserEdit/UserEdit.jsx @@ -1,9 +1,9 @@ import React, { useState } from 'react'; import { useHistory } from 'react-router-dom'; import { withI18n } from '@lingui/react'; -import { CardBody } from '@components/Card'; +import { CardBody } from '../../../components/Card'; import UserForm from '../shared/UserForm'; -import { UsersAPI } from '@api'; +import { UsersAPI } from '../../../api'; function UserEdit({ user }) { const [formSubmitError, setFormSubmitError] = useState(null); diff --git a/awx/ui_next/src/screens/User/UserEdit/UserEdit.test.jsx b/awx/ui_next/src/screens/User/UserEdit/UserEdit.test.jsx index 237d200afa..57ec1eae6e 100644 --- a/awx/ui_next/src/screens/User/UserEdit/UserEdit.test.jsx +++ b/awx/ui_next/src/screens/User/UserEdit/UserEdit.test.jsx @@ -1,11 +1,11 @@ import React from 'react'; import { act } from 'react-dom/test-utils'; import { createMemoryHistory } from 'history'; -import { UsersAPI } from '@api'; -import { mountWithContexts } from '@testUtils/enzymeHelpers'; +import { UsersAPI } from '../../../api'; +import { mountWithContexts } from '../../../../testUtils/enzymeHelpers'; import UserEdit from './UserEdit'; -jest.mock('@api'); +jest.mock('../../../api'); let wrapper; describe('', () => { diff --git a/awx/ui_next/src/screens/User/UserList/UserList.jsx b/awx/ui_next/src/screens/User/UserList/UserList.jsx index 375f078eb1..48d81af749 100644 --- a/awx/ui_next/src/screens/User/UserList/UserList.jsx +++ b/awx/ui_next/src/screens/User/UserList/UserList.jsx @@ -4,15 +4,15 @@ import { withI18n } from '@lingui/react'; import { t } from '@lingui/macro'; import { Card, PageSection } from '@patternfly/react-core'; -import { UsersAPI } from '@api'; -import AlertModal from '@components/AlertModal'; -import DataListToolbar from '@components/DataListToolbar'; -import ErrorDetail from '@components/ErrorDetail'; +import { UsersAPI } from '../../../api'; +import AlertModal from '../../../components/AlertModal'; +import DataListToolbar from '../../../components/DataListToolbar'; +import ErrorDetail from '../../../components/ErrorDetail'; import PaginatedDataList, { ToolbarAddButton, ToolbarDeleteButton, -} from '@components/PaginatedDataList'; -import { getQSConfig, parseQueryString } from '@util/qs'; +} from '../../../components/PaginatedDataList'; +import { getQSConfig, parseQueryString } from '../../../util/qs'; import UserListItem from './UserListItem'; diff --git a/awx/ui_next/src/screens/User/UserList/UserList.test.jsx b/awx/ui_next/src/screens/User/UserList/UserList.test.jsx index 7433c63208..96d763dad5 100644 --- a/awx/ui_next/src/screens/User/UserList/UserList.test.jsx +++ b/awx/ui_next/src/screens/User/UserList/UserList.test.jsx @@ -1,10 +1,13 @@ import React from 'react'; -import { UsersAPI } from '@api'; -import { mountWithContexts, waitForElement } from '@testUtils/enzymeHelpers'; +import { UsersAPI } from '../../../api'; +import { + mountWithContexts, + waitForElement, +} from '../../../../testUtils/enzymeHelpers'; import UsersList, { _UsersList } from './UserList'; -jest.mock('@api'); +jest.mock('../../../api'); let wrapper; const loadUsers = jest.spyOn(_UsersList.prototype, 'loadUsers'); diff --git a/awx/ui_next/src/screens/User/UserList/UserListItem.jsx b/awx/ui_next/src/screens/User/UserList/UserListItem.jsx index 0cbad39438..227ffe586d 100644 --- a/awx/ui_next/src/screens/User/UserList/UserListItem.jsx +++ b/awx/ui_next/src/screens/User/UserList/UserListItem.jsx @@ -11,12 +11,12 @@ import { DataListItemRow, Tooltip, } from '@patternfly/react-core'; -import DataListCell from '@components/DataListCell'; import { Link } from 'react-router-dom'; import { PencilAltIcon } from '@patternfly/react-icons'; +import DataListCell from '../../../components/DataListCell'; -import { User } from '@types'; +import { User } from '../../../types'; class UserListItem extends React.Component { static propTypes = { diff --git a/awx/ui_next/src/screens/User/UserList/UserListItem.test.jsx b/awx/ui_next/src/screens/User/UserList/UserListItem.test.jsx index b3cda6b8a1..acdc7eecc0 100644 --- a/awx/ui_next/src/screens/User/UserList/UserListItem.test.jsx +++ b/awx/ui_next/src/screens/User/UserList/UserListItem.test.jsx @@ -2,7 +2,7 @@ import React from 'react'; import { MemoryRouter } from 'react-router-dom'; import { I18nProvider } from '@lingui/react'; -import { mountWithContexts } from '@testUtils/enzymeHelpers'; +import { mountWithContexts } from '../../../../testUtils/enzymeHelpers'; import mockDetails from '../data.user.json'; import UserListItem from './UserListItem'; diff --git a/awx/ui_next/src/screens/User/UserOrganizations/UserOrganizationListItem.jsx b/awx/ui_next/src/screens/User/UserOrganizations/UserOrganizationListItem.jsx index ba0ab00d35..f45c9a5b93 100644 --- a/awx/ui_next/src/screens/User/UserOrganizations/UserOrganizationListItem.jsx +++ b/awx/ui_next/src/screens/User/UserOrganizations/UserOrganizationListItem.jsx @@ -7,7 +7,7 @@ import { DataListItemRow, DataListItem, } from '@patternfly/react-core'; -import DataListCell from '@components/DataListCell'; +import DataListCell from '../../../components/DataListCell'; function UserOrganizationListItem({ organization, i18n }) { return ( diff --git a/awx/ui_next/src/screens/User/UserOrganizations/UserOrganizationListItem.test.jsx b/awx/ui_next/src/screens/User/UserOrganizations/UserOrganizationListItem.test.jsx index 23622d6124..3a176a4a3c 100644 --- a/awx/ui_next/src/screens/User/UserOrganizations/UserOrganizationListItem.test.jsx +++ b/awx/ui_next/src/screens/User/UserOrganizations/UserOrganizationListItem.test.jsx @@ -1,6 +1,6 @@ import React from 'react'; import { act } from 'react-dom/test-utils'; -import { mountWithContexts } from '@testUtils/enzymeHelpers'; +import { mountWithContexts } from '../../../../testUtils/enzymeHelpers'; import UserOrganizationListItem from './UserOrganizationListItem'; diff --git a/awx/ui_next/src/screens/User/UserOrganizations/UserOrganizations.test.jsx b/awx/ui_next/src/screens/User/UserOrganizations/UserOrganizations.test.jsx index e5093b07d0..9aa3b4b79f 100644 --- a/awx/ui_next/src/screens/User/UserOrganizations/UserOrganizations.test.jsx +++ b/awx/ui_next/src/screens/User/UserOrganizations/UserOrganizations.test.jsx @@ -2,7 +2,10 @@ import React from 'react'; import { Route } from 'react-router-dom'; import { act } from 'react-dom/test-utils'; import { createMemoryHistory } from 'history'; -import { mountWithContexts, waitForElement } from '@testUtils/enzymeHelpers'; +import { + mountWithContexts, + waitForElement, +} from '../../../../testUtils/enzymeHelpers'; import UserOrganizations from './UserOrganizations'; diff --git a/awx/ui_next/src/screens/User/UserOrganizations/UserOrganizationsList.jsx b/awx/ui_next/src/screens/User/UserOrganizations/UserOrganizationsList.jsx index ce9a2042ad..87f39a9f73 100644 --- a/awx/ui_next/src/screens/User/UserOrganizations/UserOrganizationsList.jsx +++ b/awx/ui_next/src/screens/User/UserOrganizations/UserOrganizationsList.jsx @@ -3,10 +3,10 @@ import { withI18n } from '@lingui/react'; import { useLocation, useParams } from 'react-router-dom'; import { t } from '@lingui/macro'; -import PaginatedDataList from '@components/PaginatedDataList'; -import useRequest from '@util/useRequest'; -import { UsersAPI } from '@api'; -import { getQSConfig, parseQueryString } from '@util/qs'; +import PaginatedDataList from '../../../components/PaginatedDataList'; +import useRequest from '../../../util/useRequest'; +import { UsersAPI } from '../../../api'; +import { getQSConfig, parseQueryString } from '../../../util/qs'; import UserOrganizationListItem from './UserOrganizationListItem'; const QS_CONFIG = getQSConfig('organizations', { diff --git a/awx/ui_next/src/screens/User/UserOrganizations/UserOrganizationsList.test.jsx b/awx/ui_next/src/screens/User/UserOrganizations/UserOrganizationsList.test.jsx index 11bdf96eac..445878983d 100644 --- a/awx/ui_next/src/screens/User/UserOrganizations/UserOrganizationsList.test.jsx +++ b/awx/ui_next/src/screens/User/UserOrganizations/UserOrganizationsList.test.jsx @@ -1,13 +1,16 @@ import React from 'react'; import { Route } from 'react-router-dom'; import { act } from 'react-dom/test-utils'; -import { mountWithContexts, waitForElement } from '@testUtils/enzymeHelpers'; import { createMemoryHistory } from 'history'; +import { + mountWithContexts, + waitForElement, +} from '../../../../testUtils/enzymeHelpers'; import UserOrganizationsList from './UserOrganizationsList'; -import { UsersAPI } from '@api'; +import { UsersAPI } from '../../../api'; -jest.mock('@api/models/Users'); +jest.mock('../../../api/models/Users'); describe('', () => { let history; diff --git a/awx/ui_next/src/screens/User/UserTeams/UserTeams.jsx b/awx/ui_next/src/screens/User/UserTeams/UserTeams.jsx index aa97e30d80..5d342e00f2 100644 --- a/awx/ui_next/src/screens/User/UserTeams/UserTeams.jsx +++ b/awx/ui_next/src/screens/User/UserTeams/UserTeams.jsx @@ -1,5 +1,5 @@ import React, { Component } from 'react'; -import { CardBody } from '@components/Card'; +import { CardBody } from '../../../components/Card'; class UserAdd extends Component { render() { diff --git a/awx/ui_next/src/screens/User/UserTokens/UserTokens.jsx b/awx/ui_next/src/screens/User/UserTokens/UserTokens.jsx index aa97e30d80..5d342e00f2 100644 --- a/awx/ui_next/src/screens/User/UserTokens/UserTokens.jsx +++ b/awx/ui_next/src/screens/User/UserTokens/UserTokens.jsx @@ -1,5 +1,5 @@ import React, { Component } from 'react'; -import { CardBody } from '@components/Card'; +import { CardBody } from '../../../components/Card'; class UserAdd extends Component { render() { diff --git a/awx/ui_next/src/screens/User/Users.jsx b/awx/ui_next/src/screens/User/Users.jsx index 9a49579c3b..b07e076f0e 100644 --- a/awx/ui_next/src/screens/User/Users.jsx +++ b/awx/ui_next/src/screens/User/Users.jsx @@ -3,7 +3,7 @@ import { Route, useRouteMatch, Switch } from 'react-router-dom'; import { withI18n } from '@lingui/react'; import { t } from '@lingui/macro'; -import Breadcrumbs from '@components/Breadcrumbs/Breadcrumbs'; +import Breadcrumbs from '../../components/Breadcrumbs/Breadcrumbs'; import UsersList from './UserList/UserList'; import UserAdd from './UserAdd/UserAdd'; diff --git a/awx/ui_next/src/screens/User/Users.test.jsx b/awx/ui_next/src/screens/User/Users.test.jsx index 531729d11e..7193234f8f 100644 --- a/awx/ui_next/src/screens/User/Users.test.jsx +++ b/awx/ui_next/src/screens/User/Users.test.jsx @@ -1,7 +1,7 @@ import React from 'react'; import { createMemoryHistory } from 'history'; -import { mountWithContexts } from '@testUtils/enzymeHelpers'; +import { mountWithContexts } from '../../../testUtils/enzymeHelpers'; import Users from './Users'; diff --git a/awx/ui_next/src/screens/User/shared/UserForm.jsx b/awx/ui_next/src/screens/User/shared/UserForm.jsx index 368a3f184c..47294ff105 100644 --- a/awx/ui_next/src/screens/User/shared/UserForm.jsx +++ b/awx/ui_next/src/screens/User/shared/UserForm.jsx @@ -4,15 +4,15 @@ import { withI18n } from '@lingui/react'; import { t } from '@lingui/macro'; import { Formik, useField } from 'formik'; import { Form, FormGroup } from '@patternfly/react-core'; -import AnsibleSelect from '@components/AnsibleSelect'; -import FormActionGroup from '@components/FormActionGroup/FormActionGroup'; +import AnsibleSelect from '../../../components/AnsibleSelect'; +import FormActionGroup from '../../../components/FormActionGroup/FormActionGroup'; import FormField, { PasswordField, FormSubmitError, -} from '@components/FormField'; -import OrganizationLookup from '@components/Lookup/OrganizationLookup'; -import { required, requiredEmail } from '@util/validators'; -import { FormColumnLayout } from '@components/FormLayout'; +} from '../../../components/FormField'; +import OrganizationLookup from '../../../components/Lookup/OrganizationLookup'; +import { required, requiredEmail } from '../../../util/validators'; +import { FormColumnLayout } from '../../../components/FormLayout'; function UserFormFields({ user, i18n }) { const [organization, setOrganization] = useState(null); diff --git a/awx/ui_next/src/screens/User/shared/UserForm.test.jsx b/awx/ui_next/src/screens/User/shared/UserForm.test.jsx index b6d9c9c059..4acc1d249c 100644 --- a/awx/ui_next/src/screens/User/shared/UserForm.test.jsx +++ b/awx/ui_next/src/screens/User/shared/UserForm.test.jsx @@ -1,11 +1,14 @@ import React from 'react'; import { act } from 'react-dom/test-utils'; -import { mountWithContexts, waitForElement } from '@testUtils/enzymeHelpers'; +import { + mountWithContexts, + waitForElement, +} from '../../../../testUtils/enzymeHelpers'; import UserForm from './UserForm'; -import { UsersAPI } from '@api'; +import { UsersAPI } from '../../../api'; import mockData from '../data.user.json'; -jest.mock('@api'); +jest.mock('../../../api'); describe('', () => { let wrapper; diff --git a/awx/ui_next/src/util/useRequest.test.jsx b/awx/ui_next/src/util/useRequest.test.jsx index 1d8185229a..d0b1072d26 100644 --- a/awx/ui_next/src/util/useRequest.test.jsx +++ b/awx/ui_next/src/util/useRequest.test.jsx @@ -1,7 +1,7 @@ import React from 'react'; import { act } from 'react-dom/test-utils'; import { mount } from 'enzyme'; -import { mountWithContexts } from '@testUtils/enzymeHelpers'; +import { mountWithContexts } from '../../testUtils/enzymeHelpers'; import useRequest, { useDeleteItems } from './useRequest'; function TestInner() { diff --git a/tools/dealias.py b/tools/dealias.py new file mode 100644 index 0000000000..936d0e456c --- /dev/null +++ b/tools/dealias.py @@ -0,0 +1,114 @@ +import argparse +import glob +import os +from shutil import move, copymode +from tempfile import mkstemp + + +def get_alias_depth(file_path, alias): + if "src" not in file_path: + raise Exception("src not found in file path") + if not alias.startswith("@"): + raise Exception("alias must start with '@'") + + name = alias.replace("@", "") + + if file_path.endswith(name): + return 0 + if file_path.endswith(name + os.path.sep): + return 0 + + (head, tail) = os.path.split(file_path) + + if name in [n.replace(".jsx", "").replace(".js", "") for n in os.listdir(head)]: + return 1 + + max_depth = 30 + depth = 2 + while True: + if depth > max_depth: + raise Exception(f"({file_path}): max depth exceeded for {alias}") + (head, tail) = os.path.split(head) + if name in [n.replace(".jsx", "").replace(".js", "") for n in os.listdir(head)]: + return depth + depth += 1 + + +def get_new_import_string(old_import_str, alias, alias_depth): + if not alias.startswith("@"): + raise Exception("alias must start with '@'") + name = alias.replace("@", "") + if alias_depth < 2: + return old_import_str.replace(alias, "." + os.path.sep + name) + new_segments = os.path.sep.join([".."] * (alias_depth - 1)) + return old_import_str.replace(alias, new_segments + os.path.sep + name) + + +aliases = [ + "@api", + "@components", + "@constants", + "@contexts", + "@screens", + "@types", + "@util", + "@testUtils", +] + + +def find_and_replace_aliases(file_path, root_dir): + fh, temp_path = mkstemp() + + has_logged_file_name = False + with os.fdopen(fh, "w") as new_file: + with open(file_path) as old_file: + for (line_number, line) in enumerate(old_file): + matched_alias = None + for alias in aliases: + if alias in line: + matched_alias = alias + break + if matched_alias: + alias_depth = get_alias_depth(file_path, matched_alias) + new_line = get_new_import_string(line, alias, alias_depth) + new_file.write(new_line) + if not has_logged_file_name: + log_file_replacement(root_dir, file_path) + has_logged_file_name = True + log_line_replacement(line_number, line, new_line) + else: + new_file.write(line) + copymode(file_path, temp_path) + os.remove(file_path) + move(temp_path, file_path) + + +def log_line_replacement(line_number, line, new_line): + display_line = line.replace(os.linesep, "") + display_new_line = new_line.replace(os.linesep, "") + print(f"\t (line {line_number}): {display_line} --> {display_new_line}") + + +def log_file_replacement(root_dir, file_path): + display_path = os.path.relpath(file_path, root_dir) + print("") + print(f"{display_path}:") + + +def parse_args(): + parser = argparse.ArgumentParser() + parser.add_argument("root_dir", help="Root directory") + args = parser.parse_args() + return args + + +def run(): + args = parse_args() + search_path = args.root_dir + "**/**/*.js*" + + for file_path in glob.iglob(search_path, recursive=True): + find_and_replace_aliases(file_path, args.root_dir) + + +if __name__ == "__main__": + run()