Skip to content
This repository was archived by the owner on Feb 25, 2025. It is now read-only.

Commit df1148d

Browse files
author
nturgut
committed
add a flag for screenshot availbility
1 parent 39448a1 commit df1148d

File tree

1 file changed

+10
-6
lines changed

1 file changed

+10
-6
lines changed

lib/web_ui/dev/test_runner.dart

Lines changed: 10 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -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

Comments
 (0)