MCPcopy Index your code
hub / github.com/NativeScript/NativeScript / showReportPage

Function showReportPage

apps/automated/src/test-runner.ts:394–434  ·  view source on GitHub ↗
(finalMessage: string)

Source from the content-addressed store, hash-verified

392}
393
394function showReportPage(finalMessage: string) {
395 const stack = new StackLayout();
396 const btn = new Button();
397 btn.text = 'Rerun tests';
398 btn.on('tap', () => runAll(testsSelector));
399 stack.addChild(btn);
400
401 const messageContainer = new TextView();
402 messageContainer.editable = messageContainer.autocorrect = false;
403 messageContainer.text = finalMessage;
404 stack.addChild(messageContainer);
405
406 if (__VISIONOS__) {
407 // just helps make the results screen more clear on Vision Pro
408 btn.style.fontSize = 22;
409 stack.style.padding = 20;
410 stack.style.marginTop = 20;
411 messageContainer.style.fontSize = 22;
412 messageContainer.style.color = new Color('#fff');
413 }
414
415 Frame.topmost().navigate({
416 create: () => {
417 const page = new Page();
418 page.content = stack;
419 messageContainer.focus();
420 if (!__VISIONOS__) {
421 page.style.fontSize = 11;
422 }
423 if (isAndroid) {
424 page.on('navigatedTo', () => {
425 messageContainer.focus();
426 setTimeout(() => messageContainer.dismissSoftInput());
427 });
428 }
429
430 return page;
431 },
432 clearHistory: true,
433 });
434}
435
436function startLog(): void {
437 let testsName: string = this.name;

Callers 1

printRunTestStatsFunction · 0.85

Calls 8

runAllFunction · 0.85
onMethod · 0.65
navigateMethod · 0.65
setTimeoutFunction · 0.50
addChildMethod · 0.45
topmostMethod · 0.45
focusMethod · 0.45
dismissSoftInputMethod · 0.45

Tested by

no test coverage detected