@@ -6,7 +6,7 @@ import { describe, it } from '@ephox/bedrock-client';
6
6
import { getTinymce } from '../../../main/ts/TinyMCE' ;
7
7
import { EventStore , VERSIONS } from '../alien/TestHelpers' ;
8
8
import { Editor as TinyMCEEditor , EditorEvent , Events } from 'tinymce' ;
9
- import { Assertions } from '@ephox/agar' ;
9
+ import { Assertions , Waiter } from '@ephox/agar' ;
10
10
import { TinyAssertions } from '@ephox/mcagar' ;
11
11
12
12
type SetContentEvent = EditorEvent < Events . EditorEventMap [ 'SetContent' ] > ;
@@ -89,6 +89,7 @@ describe('EditorBehaviourTest', () => {
89
89
await ctx . reRender ( { onSetContent : eventStore . createHandler ( 'onSetContent' ) } ) ;
90
90
91
91
TinyAssertions . assertContent ( ctx . editor , '<p>Initial Content</p>' ) ;
92
+ await Waiter . pWait ( 0 ) ;
92
93
ctx . editor . setContent ( '<p>New Content</p>' ) ;
93
94
94
95
eventStore . each < SetContentEvent > ( 'onSetContent' , ( events ) => {
@@ -98,7 +99,6 @@ describe('EditorBehaviourTest', () => {
98
99
events [ 0 ] . editorEvent . content
99
100
) ;
100
101
} ) ;
101
-
102
102
eventStore . clearState ( ) ;
103
103
} ) ;
104
104
@@ -114,8 +114,8 @@ describe('EditorBehaviourTest', () => {
114
114
} ) ;
115
115
eventStore . clearState ( ) ;
116
116
ctx . editor . setContent ( '<p>Initial Content</p>' ) ;
117
-
118
117
await ctx . reRender ( { onSetContent : eventStore . createHandler ( 'NewHandler' ) } ) ;
118
+ await Waiter . pWait ( 0 ) ;
119
119
ctx . editor . setContent ( '<p>New Content</p>' ) ;
120
120
121
121
eventStore . each < SetContentEvent > ( 'InitialHandler' , ( events ) => {
0 commit comments