remove outdated tests

This commit is contained in:
Keith J. Grant 2023-04-18 10:04:19 -07:00
parent c08f1ddcaa
commit b8118ac86a

View File

@ -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'],