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
2 changed files with 34 additions and 2 deletions

View File

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

View File

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