1
0
mirror of https://github.com/ansible/awx.git synced 2024-11-01 08:21:15 +03:00

Fix prop errors in unit tests.

This commit is contained in:
Kia Lam 2019-02-27 18:03:15 -05:00
parent 5659270d3e
commit a3a80bc23e
No known key found for this signature in database
GPG Key ID: 294F9BE53C241D03
2 changed files with 34 additions and 2 deletions

View File

@ -198,10 +198,11 @@ describe('<Lookup />', () => {
<Lookup
lookup_header="Foo Bar"
onLookupSave={() => { }}
data={mockData}
value={mockData}
selected={[]}
columns={mockColumns}
sortedColumnKey="name"
getItems={() => { }}
/>
</I18nProvider>
).find('Lookup');
@ -217,10 +218,11 @@ describe('<Lookup />', () => {
<Lookup
lookup_header="Foo Bar"
onLookupSave={() => { }}
data={mockData}
value={mockData}
selected={[]}
columns={mockColumns}
sortedColumnKey="name"
getItems={() => { }}
/>
</I18nProvider>
).find('Lookup');

View File

@ -12,6 +12,11 @@ describe('<Notifications />', () => {
<Notifications
match={{ path: '/organizations/:id/?tab=notifications', url: '/organizations/:id/?tab=notifications' }}
location={{ search: '', pathname: '/organizations/:id/?tab=notifications' }}
getError={jest.fn()}
getNotifications={jest.fn()}
getSuccess={jest.fn()}
postError={jest.fn()}
postSuccess={jest.fn()}
/>
</I18nProvider>
</MemoryRouter>
@ -25,6 +30,11 @@ describe('<Notifications />', () => {
<Notifications
match={{ path: '/organizations/:id/?tab=notifications', url: '/organizations/:id/?tab=notifications' }}
location={{ search: '', pathname: '/organizations/:id/?tab=notifications' }}
getError={jest.fn()}
getNotifications={jest.fn()}
getSuccess={jest.fn()}
postError={jest.fn()}
postSuccess={jest.fn()}
/>
</I18nProvider>
</MemoryRouter>
@ -39,6 +49,11 @@ describe('<Notifications />', () => {
<Notifications
match={{ path: '/organizations/:id/?tab=notifications', url: '/organizations/:id/?tab=notifications' }}
location={{ search: '', pathname: '/organizations/:id/?tab=notifications' }}
getError={jest.fn()}
getNotifications={jest.fn()}
getSuccess={jest.fn()}
postError={jest.fn()}
postSuccess={jest.fn()}
/>
</I18nProvider>
</MemoryRouter>
@ -54,6 +69,10 @@ describe('<Notifications />', () => {
<Notifications
match={{ path: '/organizations/:id/?tab=notifications', url: '/organizations/:id/?tab=notifications', params: { id: 1 } }}
location={{ search: '', pathname: '/organizations/:id/?tab=notifications' }}
getError={jest.fn()}
getNotifications={jest.fn()}
getSuccess={jest.fn()}
postError={jest.fn()}
postSuccess={postSuccessFn}
/>
</I18nProvider>
@ -75,6 +94,11 @@ describe('<Notifications />', () => {
<Notifications
match={{ path: '/organizations/:id/?tab=notifications', url: '/organizations/:id/?tab=notifications' }}
location={{ search: '', pathname: '/organizations/:id/?tab=notifications' }}
getError={jest.fn()}
getNotifications={jest.fn()}
getSuccess={jest.fn()}
postError={jest.fn()}
postSuccess={jest.fn()}
/>
</I18nProvider>
</MemoryRouter>
@ -90,7 +114,11 @@ describe('<Notifications />', () => {
<Notifications
match={{ path: '/organizations/:id/?tab=notifications', url: '/organizations/:id/?tab=notifications', params: { id: 1 } }}
location={{ search: '', pathname: '/organizations/:id/?tab=notifications' }}
getError={jest.fn()}
getNotifications={jest.fn()}
getSuccess={jest.fn()}
postError={postErrorFn}
postSuccess={jest.fn()}
/>
</I18nProvider>
</MemoryRouter>
@ -141,6 +169,8 @@ describe('<Notifications />', () => {
getNotifications={getNotificationsFn}
getSuccess={getSuccessFn}
getError={getErrorFn}
postError={jest.fn()}
postSuccess={jest.fn()}
/>
</I18nProvider>
</MemoryRouter>