(finalMessage: string)
| 392 | } |
| 393 | |
| 394 | function 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 | |
| 436 | function startLog(): void { |
| 437 | let testsName: string = this.name; |
no test coverage detected