File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -43,7 +43,7 @@ declare global {
4343 interface Window {
4444 __HAFA_E2E_EDITOR__ ?: {
4545 runAction : ( actionId : string ) => Promise < boolean >
46- setValue : ( value : string ) => boolean
46+ setValue : ( value : string ) => Promise < boolean >
4747 getMarkers : ( ) => Array < { code : string ; message : string ; path : string ; line : number ; column : number } >
4848 }
4949 MonacoEnvironment ?: {
@@ -92,8 +92,12 @@ if (e2eAuthEnabled) {
9292 async runAction ( actionId ) {
9393 return runE2EEditorAction ( monaco . editor . getEditors ( ) , actionId )
9494 } ,
95- setValue ( value ) {
96- return setE2EEditorValue ( monaco . editor . getEditors ( ) , value )
95+ async setValue ( value ) {
96+ const updated = setE2EEditorValue ( monaco . editor . getEditors ( ) , value )
97+ if ( ! updated ) return false
98+
99+ await new Promise < void > ( ( resolve ) => requestAnimationFrame ( ( ) => resolve ( ) ) )
100+ return true
97101 } ,
98102 getMarkers ( ) {
99103 return monaco . editor . getModelMarkers ( { } ) . map ( ( marker ) => ( {
You can’t perform that action at this time.
0 commit comments