@@ -21,8 +21,8 @@ export function contentTypeReadOnlyTests (t, space) {
21
21
}
22
22
23
23
export function contentTypeWriteTests ( t , space ) {
24
- t . test ( 'Create, update, publish, unpublish and delete content type' , ( t ) => {
25
- t . plan ( 7 )
24
+ t . test ( 'Create, update, publish, getEditorInterface, unpublish and delete content type' , ( t ) => {
25
+ t . plan ( 10 )
26
26
return space . createContentType ( { name : 'testentity' } )
27
27
. then ( ( contentType ) => {
28
28
t . ok ( contentType . isDraft ( ) , 'contentType is in draft' )
@@ -38,10 +38,16 @@ export function contentTypeWriteTests (t, space) {
38
38
. then ( ( updatedContentType ) => {
39
39
t . ok ( updatedContentType . isUpdated ( ) , 'contentType is updated' )
40
40
t . equals ( updatedContentType . fields [ 0 ] . id , 'field' , 'field id' )
41
- return updatedContentType . unpublish ( )
42
- . then ( ( unpublishedContentType ) => {
43
- t . ok ( unpublishedContentType . isDraft ( ) , 'contentType is back in draft' )
44
- return unpublishedContentType . delete ( )
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 ( )
50
+ } )
45
51
} )
46
52
} )
47
53
} )
0 commit comments