From 327f6e324cfd598aec17c134ddd70bfbdc4d23bd Mon Sep 17 00:00:00 2001 From: Alexander Rivera Date: Tue, 23 Nov 2021 09:24:13 -0500 Subject: [PATCH] Fixed failing tests --- src/store/reducers.js | 6 +++++- src/store/systemProfileStore.test.js | 1 + 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/src/store/reducers.js b/src/store/reducers.js index 68bae108b..fa3b4d82e 100644 --- a/src/store/reducers.js +++ b/src/store/reducers.js @@ -123,7 +123,11 @@ function entityDeleted(state, { meta }) { }; } -function onEntitiesLoaded(state, { payload }) { +function onEntitiesLoaded(state, { payload, meta }) { + if (meta?.lastDateRequest < state?.lastDateRequest) { + return state; + } + return { ...state, rows: mergeArraysByKey([state.rows, payload.results.map(result => { diff --git a/src/store/systemProfileStore.test.js b/src/store/systemProfileStore.test.js index fd8c60425..8d61e217e 100644 --- a/src/store/systemProfileStore.test.js +++ b/src/store/systemProfileStore.test.js @@ -71,6 +71,7 @@ describe('systemProfilePending', () => { describe('onSystemProfile', () => { it('empty results', () => { expect(onSystemProfile(undefined, { payload: {} })).toEqual({ + disabledApps: ['ros'], systemProfile: { loaded: true, network: undefined,