@@ -39,14 +39,20 @@ export function contentTypeWriteTests (t, space) {
39
39
t . ok ( updatedContentType . isUpdated ( ) , 'contentType is updated' )
40
40
t . equals ( updatedContentType . fields [ 0 ] . id , 'field' , 'field id' )
41
41
t . ok ( updatedContentType . getEditorInterface , 'updatedContentType.getEditorInterface' )
42
- return updatedContentType . getEditorInterface ( )
43
- . then ( ( response ) => {
44
- t . ok ( response . controls , 'editor interface controls' )
45
- t . ok ( response . sys , 'editor interface sys' )
46
- return updatedContentType . unpublish ( )
47
- . then ( ( unpublishedContentType ) => {
48
- t . ok ( unpublishedContentType . isDraft ( ) , 'contentType is back in draft' )
49
- return unpublishedContentType . delete ( )
42
+ return updatedContentType . publish ( )
43
+ . then ( ( publishedContentType ) => {
44
+ return publishedContentType . getEditorInterface ( )
45
+ . then ( ( editorInterface ) => {
46
+ t . ok ( editorInterface . controls , 'editor interface controls' )
47
+ t . ok ( editorInterface . sys , 'editor interface sys' )
48
+ return editorInterface . update ( )
49
+ . then ( ( editorInterface ) => {
50
+ return updatedContentType . unpublish ( )
51
+ . then ( ( unpublishedContentType ) => {
52
+ t . ok ( unpublishedContentType . isDraft ( ) , 'contentType is back in draft' )
53
+ return unpublishedContentType . delete ( )
54
+ } )
55
+ } )
50
56
} )
51
57
} )
52
58
} )
0 commit comments