Skip to content

Commit

Permalink
Fix unit tests for isEditedPostAutosaveable and isSavingPost
Browse files Browse the repository at this point in the history
  • Loading branch information
jsnajdr committed Dec 12, 2022
1 parent ae00b03 commit a8b7adf
Showing 1 changed file with 7 additions and 13 deletions.
20 changes: 7 additions & 13 deletions packages/editor/src/store/test/selectors.js
Original file line number Diff line number Diff line change
Expand Up @@ -75,10 +75,6 @@ selectorNames.forEach( ( name ) => {
};
},

isSavingEntityRecord() {
return state.saving && state.saving.requesting;
},

getLastEntitySaveError() {
const saving = state.saving;
const successful = saving && saving.successful;
Expand Down Expand Up @@ -1254,7 +1250,7 @@ describe( 'selectors', () => {
title: 'sassel',
},
saving: {
requesting: true,
pending: true,
},
};

Expand Down Expand Up @@ -1403,9 +1399,8 @@ describe( 'selectors', () => {
currentPost: {
title: 'sassel',
},
saving: {
requesting: true,
},
postAutosavingLock: {},
saving: {},
getCurrentUser() {},
hasFetchedAutosaves() {
return false;
Expand Down Expand Up @@ -1434,9 +1429,8 @@ describe( 'selectors', () => {
currentPost: {
title: 'sassel',
},
saving: {
requesting: true,
},
postAutosavingLock: {},
saving: {},
getCurrentUser() {},
hasFetchedAutosaves() {
return true;
Expand Down Expand Up @@ -2017,7 +2011,7 @@ describe( 'selectors', () => {
it( 'should return true if the post is currently being saved', () => {
const state = {
saving: {
requesting: true,
pending: true,
},
};

Expand All @@ -2027,7 +2021,7 @@ describe( 'selectors', () => {
it( 'should return false if the post is not currently being saved', () => {
const state = {
saving: {
requesting: false,
pending: false,
},
};

Expand Down

0 comments on commit a8b7adf

Please sign in to comment.