@@ -450,57 +450,169 @@ void main() {
450
450
451
451
// This tests the workaround for https://github.com/flutter/flutter/issues/135673
452
452
// and the behavior it tests should be removed once that is fixed.
453
- test ('runs tests separately on macOS' , () async {
454
- final RepositoryPackage plugin = createFakePlugin (
455
- 'plugin' ,
456
- packagesDir,
457
- extraFiles: < String > [
458
- 'example/integration_test/first_test.dart' ,
459
- 'example/integration_test/second_test.dart' ,
460
- 'example/macos/macos.swift' ,
461
- ],
462
- platformSupport: < String , PlatformDetails > {
463
- platformMacOS: const PlatformDetails (PlatformSupport .inline),
464
- },
465
- );
453
+ group ('runs tests separately on desktop' , () {
454
+ test ('macOS' , () async {
455
+ final RepositoryPackage plugin = createFakePlugin (
456
+ 'plugin' ,
457
+ packagesDir,
458
+ extraFiles: < String > [
459
+ 'example/integration_test/first_test.dart' ,
460
+ 'example/integration_test/second_test.dart' ,
461
+ 'example/macos/macos.swift' ,
462
+ ],
463
+ platformSupport: < String , PlatformDetails > {
464
+ platformMacOS: const PlatformDetails (PlatformSupport .inline),
465
+ },
466
+ );
466
467
467
- final Directory pluginExampleDirectory = getExampleDir (plugin);
468
+ final Directory pluginExampleDirectory = getExampleDir (plugin);
468
469
469
- final List <String > output = await runCapturingPrint (runner, < String > [
470
- 'drive-examples' ,
471
- '--macos' ,
472
- ]);
470
+ final List <String > output = await runCapturingPrint (runner, < String > [
471
+ 'drive-examples' ,
472
+ '--macos' ,
473
+ ]);
473
474
474
- expect (
475
- output,
476
- containsAllInOrder (< Matcher > [
477
- contains ('Running for plugin' ),
478
- contains ('No issues found!' ),
479
- ]),
480
- );
475
+ expect (
476
+ output,
477
+ containsAllInOrder (< Matcher > [
478
+ contains ('Running for plugin' ),
479
+ contains ('No issues found!' ),
480
+ ]),
481
+ );
481
482
482
- expect (
483
- processRunner.recordedCalls,
484
- orderedEquals (< ProcessCall > [
485
- ProcessCall (
486
- getFlutterCommand (mockPlatform),
487
- const < String > [
488
- 'test' ,
489
- '-d' ,
490
- 'macos' ,
491
- 'integration_test/first_test.dart' ,
492
- ],
493
- pluginExampleDirectory.path),
494
- ProcessCall (
495
- getFlutterCommand (mockPlatform),
496
- const < String > [
497
- 'test' ,
498
- '-d' ,
499
- 'macos' ,
500
- 'integration_test/second_test.dart' ,
501
- ],
502
- pluginExampleDirectory.path),
503
- ]));
483
+ expect (
484
+ processRunner.recordedCalls,
485
+ orderedEquals (< ProcessCall > [
486
+ ProcessCall (
487
+ getFlutterCommand (mockPlatform),
488
+ const < String > [
489
+ 'test' ,
490
+ '-d' ,
491
+ 'macos' ,
492
+ 'integration_test/first_test.dart' ,
493
+ ],
494
+ pluginExampleDirectory.path),
495
+ ProcessCall (
496
+ getFlutterCommand (mockPlatform),
497
+ const < String > [
498
+ 'test' ,
499
+ '-d' ,
500
+ 'macos' ,
501
+ 'integration_test/second_test.dart' ,
502
+ ],
503
+ pluginExampleDirectory.path),
504
+ ]));
505
+ });
506
+
507
+ // This tests the workaround for https://github.com/flutter/flutter/issues/135673
508
+ // and the behavior it tests should be removed once that is fixed.
509
+ test ('Linux' , () async {
510
+ final RepositoryPackage plugin = createFakePlugin (
511
+ 'plugin' ,
512
+ packagesDir,
513
+ extraFiles: < String > [
514
+ 'example/integration_test/first_test.dart' ,
515
+ 'example/integration_test/second_test.dart' ,
516
+ 'example/linux/foo.cc' ,
517
+ ],
518
+ platformSupport: < String , PlatformDetails > {
519
+ platformLinux: const PlatformDetails (PlatformSupport .inline),
520
+ },
521
+ );
522
+
523
+ final Directory pluginExampleDirectory = getExampleDir (plugin);
524
+
525
+ final List <String > output = await runCapturingPrint (runner, < String > [
526
+ 'drive-examples' ,
527
+ '--linux' ,
528
+ ]);
529
+
530
+ expect (
531
+ output,
532
+ containsAllInOrder (< Matcher > [
533
+ contains ('Running for plugin' ),
534
+ contains ('No issues found!' ),
535
+ ]),
536
+ );
537
+
538
+ expect (
539
+ processRunner.recordedCalls,
540
+ orderedEquals (< ProcessCall > [
541
+ ProcessCall (
542
+ getFlutterCommand (mockPlatform),
543
+ const < String > [
544
+ 'test' ,
545
+ '-d' ,
546
+ 'linux' ,
547
+ 'integration_test/first_test.dart' ,
548
+ ],
549
+ pluginExampleDirectory.path),
550
+ ProcessCall (
551
+ getFlutterCommand (mockPlatform),
552
+ const < String > [
553
+ 'test' ,
554
+ '-d' ,
555
+ 'linux' ,
556
+ 'integration_test/second_test.dart' ,
557
+ ],
558
+ pluginExampleDirectory.path),
559
+ ]));
560
+ });
561
+
562
+ // This tests the workaround for https://github.com/flutter/flutter/issues/135673
563
+ // and the behavior it tests should be removed once that is fixed.
564
+ test ('Windows' , () async {
565
+ final RepositoryPackage plugin = createFakePlugin (
566
+ 'plugin' ,
567
+ packagesDir,
568
+ extraFiles: < String > [
569
+ 'example/integration_test/first_test.dart' ,
570
+ 'example/integration_test/second_test.dart' ,
571
+ 'example/windows/foo.cpp' ,
572
+ ],
573
+ platformSupport: < String , PlatformDetails > {
574
+ platformWindows: const PlatformDetails (PlatformSupport .inline),
575
+ },
576
+ );
577
+
578
+ final Directory pluginExampleDirectory = getExampleDir (plugin);
579
+
580
+ final List <String > output = await runCapturingPrint (runner, < String > [
581
+ 'drive-examples' ,
582
+ '--windows' ,
583
+ ]);
584
+
585
+ expect (
586
+ output,
587
+ containsAllInOrder (< Matcher > [
588
+ contains ('Running for plugin' ),
589
+ contains ('No issues found!' ),
590
+ ]),
591
+ );
592
+
593
+ expect (
594
+ processRunner.recordedCalls,
595
+ orderedEquals (< ProcessCall > [
596
+ ProcessCall (
597
+ getFlutterCommand (mockPlatform),
598
+ const < String > [
599
+ 'test' ,
600
+ '-d' ,
601
+ 'windows' ,
602
+ 'integration_test/first_test.dart' ,
603
+ ],
604
+ pluginExampleDirectory.path),
605
+ ProcessCall (
606
+ getFlutterCommand (mockPlatform),
607
+ const < String > [
608
+ 'test' ,
609
+ '-d' ,
610
+ 'windows' ,
611
+ 'integration_test/second_test.dart' ,
612
+ ],
613
+ pluginExampleDirectory.path),
614
+ ]));
615
+ });
504
616
});
505
617
506
618
test ('driving when plugin does not suppport web is a no-op' , () async {
0 commit comments