mirror of
https://github.com/ansible/awx.git
synced 2026-01-11 10:00:01 -03:30
remove outdated tests
This commit is contained in:
parent
c08f1ddcaa
commit
b8118ac86a
@ -24,28 +24,6 @@ describe('PersistentFilters', () => {
|
||||
});
|
||||
});
|
||||
|
||||
test('should restore filters from sessionStorage', () => {
|
||||
expect(
|
||||
sessionStorage.setItem(
|
||||
KEY,
|
||||
JSON.stringify({
|
||||
pageKey: 'templates',
|
||||
qs: '?page=2&name=foo',
|
||||
})
|
||||
)
|
||||
);
|
||||
const history = createMemoryHistory({
|
||||
initialEntries: ['/templates?restoreFilters=true'],
|
||||
});
|
||||
render(
|
||||
<Router history={history}>
|
||||
<PersistentFilters pageKey="templates">test</PersistentFilters>
|
||||
</Router>
|
||||
);
|
||||
|
||||
expect(history.location.search).toEqual('?page=2&name=foo');
|
||||
});
|
||||
|
||||
test('should not restore filters without restoreFilters query param', () => {
|
||||
expect(
|
||||
sessionStorage.setItem(
|
||||
@ -68,28 +46,6 @@ describe('PersistentFilters', () => {
|
||||
expect(history.location.search).toEqual('');
|
||||
});
|
||||
|
||||
test("should not restore filters if page key doesn't match", () => {
|
||||
expect(
|
||||
sessionStorage.setItem(
|
||||
KEY,
|
||||
JSON.stringify({
|
||||
pageKey: 'projects',
|
||||
qs: '?page=2&name=foo',
|
||||
})
|
||||
)
|
||||
);
|
||||
const history = createMemoryHistory({
|
||||
initialEntries: ['/templates?restoreFilters=true'],
|
||||
});
|
||||
render(
|
||||
<Router history={history}>
|
||||
<PersistentFilters pageKey="templates">test</PersistentFilters>
|
||||
</Router>
|
||||
);
|
||||
|
||||
expect(history.location.search).toEqual('');
|
||||
});
|
||||
|
||||
test('should update stored filters when qs changes', async () => {
|
||||
const history = createMemoryHistory({
|
||||
initialEntries: ['/templates'],
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user