@@ -928,6 +928,8 @@ describe('Service Module - Actions', () => {
928
928
assert ( todoState . ids . length === 1 )
929
929
assert ( todoState . errorOnUpdate === null )
930
930
assert ( todoState . isUpdatePending === false )
931
+ assert ( store . getters [ 'my-todos/isUpdatePendingById' ] ( 0 ) === false , 'ID pending update clear' )
932
+ assert ( store . getters [ 'my-todos/isPendingById' ] ( 0 ) === false , 'ID pending clear' )
931
933
assert . deepEqual (
932
934
todoState . keyedById [ responseFromUpdate . id ] ,
933
935
responseFromUpdate
@@ -939,6 +941,8 @@ describe('Service Module - Actions', () => {
939
941
assert ( todoState . ids . length === 1 )
940
942
assert ( todoState . errorOnUpdate === null )
941
943
assert ( todoState . isUpdatePending === true )
944
+ assert ( store . getters [ 'my-todos/isUpdatePendingById' ] ( 0 ) === true , 'ID pending update set' )
945
+ assert ( store . getters [ 'my-todos/isPendingById' ] ( 0 ) === true , 'ID pending set' )
942
946
assert ( todoState . idField === 'id' )
943
947
} )
944
948
. catch ( error => {
@@ -1022,6 +1026,8 @@ describe('Service Module - Actions', () => {
1022
1026
assert ( todoState . ids . length === 1 )
1023
1027
assert ( todoState . errorOnPatch === null )
1024
1028
assert ( todoState . isPatchPending === false )
1029
+ assert ( store . getters [ 'my-todos/isPatchPendingById' ] ( 0 ) === false , 'ID pending patch clear' )
1030
+ assert ( store . getters [ 'my-todos/isPendingById' ] ( 0 ) === false , 'ID pending clear' )
1025
1031
assert . deepEqual (
1026
1032
todoState . keyedById [ responseFromPatch . id ] ,
1027
1033
responseFromPatch
@@ -1033,6 +1039,8 @@ describe('Service Module - Actions', () => {
1033
1039
assert ( todoState . ids . length === 1 )
1034
1040
assert ( todoState . errorOnPatch === null )
1035
1041
assert ( todoState . isPatchPending === true )
1042
+ assert ( store . getters [ 'my-todos/isPatchPendingById' ] ( 0 ) === true , 'ID pending patch set' )
1043
+ assert ( store . getters [ 'my-todos/isPendingById' ] ( 0 ) === true , 'ID pending set' )
1036
1044
assert ( todoState . idField === 'id' )
1037
1045
} )
1038
1046
} )
@@ -1098,6 +1106,8 @@ describe('Service Module - Actions', () => {
1098
1106
assert ( todoState . ids . length === 1 )
1099
1107
assert ( todoState . errorOnPatch === null )
1100
1108
assert ( todoState . isPatchPending === false )
1109
+ assert ( store . getters [ 'my-todos/isPatchPendingById' ] ( 0 ) === false , 'ID pending patch clear' )
1110
+ assert ( store . getters [ 'my-todos/isPendingById' ] ( 0 ) === false , 'ID pending clear' )
1101
1111
assert . deepEqual (
1102
1112
todoState . keyedById [ responseFromPatch . id ] ,
1103
1113
responseFromPatch
@@ -1109,6 +1119,8 @@ describe('Service Module - Actions', () => {
1109
1119
assert ( todoState . ids . length === 1 )
1110
1120
assert ( todoState . errorOnPatch === null )
1111
1121
assert ( todoState . isPatchPending === true )
1122
+ assert ( store . getters [ 'my-todos/isPatchPendingById' ] ( 0 ) === true , 'ID pending patch set' )
1123
+ assert ( store . getters [ 'my-todos/isPendingById' ] ( 0 ) === true , 'ID pending set' )
1112
1124
assert ( todoState . idField === 'id' )
1113
1125
} )
1114
1126
} )
@@ -1174,6 +1186,8 @@ describe('Service Module - Actions', () => {
1174
1186
assert ( todoState . ids . length === 0 )
1175
1187
assert ( todoState . errorOnRemove === null )
1176
1188
assert ( todoState . isRemovePending === false )
1189
+ assert ( store . getters [ 'my-todos/isRemovePendingById' ] ( 0 ) === false , 'ID pending remove clear' )
1190
+ assert ( store . getters [ 'my-todos/isPendingById' ] ( 0 ) === false , 'ID pending clear' )
1177
1191
assert . deepEqual ( todoState . keyedById , { } )
1178
1192
done ( )
1179
1193
} )
@@ -1186,6 +1200,8 @@ describe('Service Module - Actions', () => {
1186
1200
assert ( todoState . ids . length === 1 )
1187
1201
assert ( todoState . errorOnRemove === null )
1188
1202
assert ( todoState . isRemovePending === true )
1203
+ assert ( store . getters [ 'my-todos/isRemovePendingById' ] ( 0 ) === true , 'ID pending remove set' )
1204
+ assert ( store . getters [ 'my-todos/isPendingById' ] ( 0 ) === true , 'ID pending set' )
1189
1205
assert ( todoState . idField === 'id' )
1190
1206
} )
1191
1207
} )
0 commit comments