mirror of
https://github.com/ansible/awx.git
synced 2026-02-16 02:30:01 -03:30
working test commit
This commit is contained in:
12
__tests__/components/Tooltip.test.jsx
Normal file
12
__tests__/components/Tooltip.test.jsx
Normal file
@@ -0,0 +1,12 @@
|
||||
import React from 'react';
|
||||
import { mount } from 'enzyme';
|
||||
import Tooltip from '../../src/components/Tooltip';
|
||||
|
||||
describe('<Tooltip />', () => {
|
||||
let wrapper;
|
||||
|
||||
test('initially renders without crashing', () => {
|
||||
wrapper = mount(<Tooltip />);
|
||||
expect(wrapper.length).toBe(1);
|
||||
});
|
||||
});
|
||||
@@ -1,11 +1,18 @@
|
||||
import React from 'react';
|
||||
import { mount } from 'enzyme';
|
||||
import { MemoryRouter } from 'react-router-dom';
|
||||
import OrganizationBreadcrumb from '../../../../src/pages/Organizations/components/OrganizationBreadcrumb';
|
||||
|
||||
xdescribe('<OrganizationBreadcrumb />', () => {
|
||||
describe('<OrganizationBreadcrumb />', () => {
|
||||
test('initially renders succesfully', () => {
|
||||
mount(
|
||||
<OrganizationBreadcrumb />
|
||||
<MemoryRouter initialEntries={['/organizations']} initialIndex={0}>
|
||||
<OrganizationBreadcrumb
|
||||
match={{ path: '/organizations', url: '/organizations' }}
|
||||
location={{ search: '', pathname: '/organizations' }}
|
||||
parentObj={[{ name: 'Organizations', url: '/organizations' }]}
|
||||
/>
|
||||
</MemoryRouter>
|
||||
);
|
||||
});
|
||||
});
|
||||
|
||||
@@ -1,11 +1,17 @@
|
||||
import React from 'react';
|
||||
import { mount } from 'enzyme';
|
||||
import { MemoryRouter } from 'react-router-dom';
|
||||
import OrganizationDetail from '../../../../src/pages/Organizations/components/OrganizationDetail';
|
||||
|
||||
xdescribe('<OrganizationDetail />', () => {
|
||||
describe('<OrganizationDetail />', () => {
|
||||
test('initially renders succesfully', () => {
|
||||
mount(
|
||||
<OrganizationDetail />
|
||||
<MemoryRouter initialEntries={['/organizations/1']} initialIndex={0}>
|
||||
<OrganizationDetail
|
||||
match={{ path: '/organizations/:id', url: '/organizations/1' }}
|
||||
location={{ search: '', pathname: '/organizations/1' }}
|
||||
/>
|
||||
</MemoryRouter>
|
||||
);
|
||||
});
|
||||
});
|
||||
|
||||
@@ -1,11 +1,16 @@
|
||||
import React from 'react';
|
||||
import { mount } from 'enzyme';
|
||||
import { MemoryRouter } from 'react-router-dom';
|
||||
import OrganizationEdit from '../../../../src/pages/Organizations/components/OrganizationEdit';
|
||||
|
||||
xdescribe('<OrganizationEdit />', () => {
|
||||
describe('<OrganizationEdit />', () => {
|
||||
test('initially renders succesfully', () => {
|
||||
mount(
|
||||
<OrganizationEdit />
|
||||
<MemoryRouter initialEntries={['/organizations/1/edit']} initialIndex={0}>
|
||||
<OrganizationEdit
|
||||
match={{ path: '/organizations/:id/edit', url: '/organizations/1/edit', params: { id: 1 } }}
|
||||
/>
|
||||
</MemoryRouter>
|
||||
);
|
||||
});
|
||||
});
|
||||
|
||||
@@ -1,11 +1,14 @@
|
||||
import React from 'react';
|
||||
import { mount } from 'enzyme';
|
||||
import { MemoryRouter } from 'react-router-dom';
|
||||
import OrganizationListItem from '../../../../src/pages/Organizations/components/OrganizationListItem';
|
||||
|
||||
xdescribe('<OrganizationListItem />', () => {
|
||||
describe('<OrganizationListItem />', () => {
|
||||
test('initially renders succesfully', () => {
|
||||
mount(
|
||||
<OrganizationListItem />
|
||||
<MemoryRouter initialEntries={['/organizations']} initialIndex={0}>
|
||||
<OrganizationListItem />
|
||||
</MemoryRouter>
|
||||
);
|
||||
});
|
||||
});
|
||||
|
||||
@@ -8,7 +8,7 @@ describe('<Organizations />', () => {
|
||||
mount(
|
||||
<MemoryRouter initialEntries={['/organizations']} initialIndex={0}>
|
||||
<Organizations
|
||||
match={{ path: '/organizations', route: '/organizations', link: 'organizations' }}
|
||||
match={{ path: '/organizations', url: '/organizations' }}
|
||||
location={{ search: '', pathname: '/organizations' }}
|
||||
/>
|
||||
</MemoryRouter>
|
||||
|
||||
@@ -2,10 +2,13 @@ import React from 'react';
|
||||
import { mount } from 'enzyme';
|
||||
import OrganizationAdd from '../../../../src/pages/Organizations/views/Organization.add';
|
||||
|
||||
xdescribe('<OrganizationAdd />', () => {
|
||||
describe('<OrganizationAdd />', () => {
|
||||
test('initially renders succesfully', () => {
|
||||
mount(
|
||||
<OrganizationAdd />
|
||||
<OrganizationAdd
|
||||
match={{ path: '/organizations/add', url: '/organizations/add' }}
|
||||
location={{ search: '', pathname: '/organizations/add' }}
|
||||
/>
|
||||
);
|
||||
});
|
||||
});
|
||||
|
||||
@@ -1,11 +1,17 @@
|
||||
import React from 'react';
|
||||
import { mount } from 'enzyme';
|
||||
import { MemoryRouter } from 'react-router-dom';
|
||||
import OrganizationView from '../../../../src/pages/Organizations/views/Organization.view';
|
||||
|
||||
xdescribe('<OrganizationView />', () => {
|
||||
describe('<OrganizationView />', () => {
|
||||
test('initially renders succesfully', () => {
|
||||
mount(
|
||||
<OrganizationView />
|
||||
<MemoryRouter initialEntries={['/organizations/1']} initialIndex={0}>
|
||||
<OrganizationView
|
||||
match={{ path: '/organizations/:id', url: '/organizations/1' }}
|
||||
location={{ search: '', pathname: '/organizations/1' }}
|
||||
/>
|
||||
</MemoryRouter>
|
||||
);
|
||||
});
|
||||
});
|
||||
|
||||
@@ -1,11 +1,17 @@
|
||||
import React from 'react';
|
||||
import { mount } from 'enzyme';
|
||||
import { MemoryRouter } from 'react-router-dom';
|
||||
import OrganizationsList from '../../../../src/pages/Organizations/views/Organizations.list';
|
||||
|
||||
xdescribe('<OrganizationsList />', () => {
|
||||
describe('<OrganizationsList />', () => {
|
||||
test('initially renders succesfully', () => {
|
||||
mount(
|
||||
<OrganizationsList />
|
||||
<MemoryRouter initialEntries={['/organizations']} initialIndex={0}>
|
||||
<OrganizationsList
|
||||
match={{ path: '/organizations', url: '/organizations' }}
|
||||
location={{ search: '', pathname: '/organizations' }}
|
||||
/>
|
||||
</MemoryRouter>
|
||||
);
|
||||
});
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user