mirror of
https://github.com/ansible/awx.git
synced 2026-02-02 01:58:09 -03:30
update content loading and error handling
unwind error handling use auth cookie as source of truth, fetch config only when authenticated
This commit is contained in:
@@ -19,7 +19,6 @@ describe('<Lookup />', () => {
|
||||
getItems={() => { }}
|
||||
columns={mockColumns}
|
||||
sortedColumnKey="name"
|
||||
handleHttpError={() => {}}
|
||||
/>
|
||||
);
|
||||
});
|
||||
@@ -34,7 +33,6 @@ describe('<Lookup />', () => {
|
||||
getItems={() => ({ data: { results: [{ name: 'test instance', id: 1 }] } })}
|
||||
columns={mockColumns}
|
||||
sortedColumnKey="name"
|
||||
handleHttpError={() => {}}
|
||||
/>
|
||||
).find('Lookup');
|
||||
|
||||
@@ -57,7 +55,6 @@ describe('<Lookup />', () => {
|
||||
getItems={() => { }}
|
||||
columns={mockColumns}
|
||||
sortedColumnKey="name"
|
||||
handleHttpError={() => {}}
|
||||
/>
|
||||
).find('Lookup');
|
||||
expect(spy).not.toHaveBeenCalled();
|
||||
|
||||
@@ -1,19 +0,0 @@
|
||||
import React from 'react';
|
||||
import { mountWithContexts } from '../enzymeHelpers';
|
||||
|
||||
import { _NotifyAndRedirect } from '../../src/components/NotifyAndRedirect';
|
||||
|
||||
describe('<NotifyAndRedirect />', () => {
|
||||
test('initially renders succesfully and calls setRootDialogMessage', () => {
|
||||
const setRootDialogMessage = jest.fn();
|
||||
mountWithContexts(
|
||||
<_NotifyAndRedirect
|
||||
to="foo"
|
||||
setRootDialogMessage={setRootDialogMessage}
|
||||
location={{ pathname: 'foo' }}
|
||||
i18n={{ _: val => val.toString() }}
|
||||
/>
|
||||
);
|
||||
expect(setRootDialogMessage).toHaveBeenCalled();
|
||||
});
|
||||
});
|
||||
Reference in New Issue
Block a user