@@ -371,6 +371,15 @@ class TestCommand extends Command<bool> with ArgUtils {
371371 isFirefoxIntegrationTestAvailable ||
372372 isSafariIntegrationTestAvailable;
373373
374+ bool get isScreenhotTestsAvailable =>
375+ isIntegrationTestsAvailable || isUnitTestsScreenshotsAvailable;
376+
377+ // For unit tests screenshot tests and smoke tests only run on:
378+ // "Chrome/iOS" for LUCI/local.
379+ bool get isUnitTestsScreenshotsAvailable =>
380+ ((isChrome && isLuci && io.Platform .isLinux) ||
381+ ((isChrome || isSafariIOS) && ! isLuci));
382+
374383 /// Use system flutter instead of cloning the repository.
375384 ///
376385 /// Read the flag help for more details. Uses PATH to locate flutter.
@@ -397,12 +406,7 @@ class TestCommand extends Command<bool> with ArgUtils {
397406 'test' ,
398407 ));
399408
400- // Screenshot tests and smoke tests only run on: "Chrome/iOS Safari locally"
401- // or "Chrome on a Linux bot". We can remove the Linux bot restriction
402- // after solving the git issue faced on macOS and Windows bots:
403- // TODO: https://github.com/flutter/flutter/issues/63710
404- if ((isChrome && isLuci && io.Platform .isLinux) ||
405- ((isChrome || isSafariIOS) && ! isLuci)) {
409+ if (isUnitTestsScreenshotsAvailable) {
406410 // Separate screenshot tests from unit-tests. Screenshot tests must run
407411 // one at a time. Otherwise, they will end up screenshotting each other.
408412 // This is not an issue for unit-tests.
0 commit comments