File tree Expand file tree Collapse file tree
tests/PrompterOne.Web.UITests/Support Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -381,7 +381,12 @@ public static class Editor
381381 public const int CiMaxTypingLongTaskCount = 10 ;
382382 public const int LocalMaxTypingLongTaskCount = 2 ;
383383 public const double MaxVisibleRenderP95LatencyMs = 240 ;
384- public const double MaxVisibleRenderSpikeLatencyMs = 300 ;
384+ public const double LocalMaxVisibleRenderSpikeLatencyMs = 300 ;
385+ public const double CiMaxVisibleRenderSpikeLatencyMs = 450 ;
386+ public static double MaxVisibleRenderSpikeLatencyMs =>
387+ TestEnvironment . IsCiEnvironment
388+ ? CiMaxVisibleRenderSpikeLatencyMs
389+ : LocalMaxVisibleRenderSpikeLatencyMs ;
385390 public static int AllowedTypingLongTaskCount =>
386391 TestEnvironment . IsCiEnvironment
387392 ? CiMaxTypingLongTaskCount
Original file line number Diff line number Diff line change @@ -308,26 +308,13 @@ await page.WaitForFunctionAsync(
308308
309309 internal static async Task SetTextAsync ( IPage page , string text )
310310 {
311- _ = await InvokeHarnessAsync < EditorMonacoState > ( page , "setText" , new { text } ) ;
311+ var state = await InvokeHarnessAsync < EditorMonacoState ? > ( page , "setText" , new { text } ) ;
312+ await Assert . That ( state ) . IsNotNull ( ) ;
313+ await Assert . That ( state ! . Text ) . IsEqualTo ( text ) ;
312314 await Expect ( SourceInput ( page ) ) . ToHaveValueAsync ( text , new ( )
313315 {
314316 Timeout = BrowserTestConstants . Timing . EditorMutationTimeoutMs
315317 } ) ;
316-
317- await page . WaitForFunctionAsync (
318- """
319- (args) => {
320- const harness = window[args.harnessGlobalName];
321- return harness?.getState(args.testId)?.text === args.expectedText;
322- }
323- """ ,
324- new
325- {
326- expectedText = text ,
327- harnessGlobalName = EditorMonacoRuntimeContract . BrowserHarnessGlobalName ,
328- testId = UiTestIds . Editor . SourceStage
329- } ,
330- new ( ) { Timeout = BrowserTestConstants . Timing . EditorMutationTimeoutMs } ) ;
331318 }
332319
333320 internal static Task DropFilesAsync ( IPage page , params DroppedFileDescriptor [ ] files ) =>
You can’t perform that action at this time.
0 commit comments