Skip to content

Commit

Permalink
Fixed failing tests
Browse files Browse the repository at this point in the history
  • Loading branch information
arivepr committed Nov 23, 2021
1 parent b2f87ed commit 327f6e3
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 1 deletion.
6 changes: 5 additions & 1 deletion src/store/reducers.js
Original file line number Diff line number Diff line change
Expand Up @@ -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 => {
Expand Down
1 change: 1 addition & 0 deletions src/store/systemProfileStore.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -71,6 +71,7 @@ describe('systemProfilePending', () => {
describe('onSystemProfile', () => {
it('empty results', () => {
expect(onSystemProfile(undefined, { payload: {} })).toEqual({
disabledApps: ['ros'],
systemProfile: {
loaded: true,
network: undefined,
Expand Down

0 comments on commit 327f6e3

Please sign in to comment.