@@ -13,7 +13,6 @@ describe('AnnotationEditor', () => {
13
13
let fakeApplyTheme ;
14
14
let fakeAnnotationsService ;
15
15
let fakeGroup ;
16
- let fakeMetadata ;
17
16
let fakeTagsService ;
18
17
let fakeSettings ;
19
18
let fakeToastMessenger ;
@@ -45,11 +44,6 @@ describe('AnnotationEditor', () => {
45
44
type : 'private' ,
46
45
} ;
47
46
48
- fakeMetadata = {
49
- isReply : sinon . stub ( ) . returns ( false ) ,
50
- isSaved : sinon . stub ( ) . returns ( true ) ,
51
- } ;
52
-
53
47
fakeSettings = { } ;
54
48
fakeTagsService = {
55
49
store : sinon . stub ( ) ,
@@ -69,7 +63,6 @@ describe('AnnotationEditor', () => {
69
63
$imports . $mock ( mockImportedComponents ( ) ) ;
70
64
$imports . $mock ( {
71
65
'../../store/use-store' : { useStoreProxy : ( ) => fakeStore } ,
72
- '../../helpers/annotation-metadata' : fakeMetadata ,
73
66
'../../helpers/theme' : { applyTheme : fakeApplyTheme } ,
74
67
} ) ;
75
68
// `AnnotationLicense` is a presentation-only component and is only used
@@ -302,8 +295,7 @@ describe('AnnotationEditor', () => {
302
295
} ) ;
303
296
304
297
it ( 'does not update privacy default if annotation is a reply' , ( ) => {
305
- fakeMetadata . isReply . returns ( true ) ;
306
- const wrapper = createComponent ( ) ;
298
+ const wrapper = createComponent ( { annotation : fixtures . newReply ( ) } ) ;
307
299
308
300
wrapper . find ( 'AnnotationPublishControl' ) . props ( ) . onSetPrivate ( false ) ;
309
301
@@ -325,8 +317,7 @@ describe('AnnotationEditor', () => {
325
317
} ) ;
326
318
327
319
it ( 'removes annotation from store if it is an unsaved annotation' , ( ) => {
328
- fakeMetadata . isSaved . returns ( false ) ;
329
- const wrapper = createComponent ( ) ;
320
+ const wrapper = createComponent ( { annotation : fixtures . newAnnotation ( ) } ) ;
330
321
331
322
wrapper . find ( 'AnnotationPublishControl' ) . props ( ) . onCancel ( ) ;
332
323
0 commit comments