diff --git a/plugins/home/src/api/VisitsStorageApi.test.ts b/plugins/home/src/api/VisitsStorageApi.test.ts
index 6faeb62350..e361c624b9 100644
--- a/plugins/home/src/api/VisitsStorageApi.test.ts
+++ b/plugins/home/src/api/VisitsStorageApi.test.ts
@@ -250,7 +250,7 @@ describe('VisitsStorageApi.create', () => {
]);
});
- it('filters by timestamp with >', async () => {
+ it('filters by timestamp with value >', async () => {
const visits = await api.list({
filterBy: [{ field: 'timestamp', operator: '>', value: baseDate }],
});
diff --git a/plugins/home/src/homePageComponents/VisitedByType/Content.test.tsx b/plugins/home/src/homePageComponents/VisitedByType/Content.test.tsx
index c6c0e6d81a..1234291f1a 100644
--- a/plugins/home/src/homePageComponents/VisitedByType/Content.test.tsx
+++ b/plugins/home/src/homePageComponents/VisitedByType/Content.test.tsx
@@ -197,6 +197,47 @@ describe('', () => {
});
});
});
+
+ it('allows recent items to have no filter if the filter config is not valid', async () => {
+ const configApiMock = new MockConfigApi({
+ home: {
+ recentVisits: {
+ filterBy: [
+ {
+ operator: '==',
+ value: '/tech-radar',
+ },
+ ],
+ },
+ },
+ });
+
+ const listSpy = jest.spyOn(mockVisitsApi, 'list');
+
+ await renderInTestApp(
+
+
+
+
+ ,
+ );
+ await waitFor(() => {
+ expect(listSpy).toHaveBeenCalledWith({
+ limit: 8,
+ orderBy: [
+ {
+ direction: 'desc',
+ field: 'timestamp',
+ },
+ ],
+ });
+ });
+ });
});
describe('', () => {