Skip to content

Commit

Permalink
[web] reuse browser instance across screenshot tests (flutter#28936)
Browse files Browse the repository at this point in the history
  • Loading branch information
yjbanov authored Sep 29, 2021
1 parent 7e95ac3 commit d0d8e34
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions lib/web_ui/dev/steps/run_tests_step.dart
Original file line number Diff line number Diff line change
Expand Up @@ -117,7 +117,7 @@ class RunTestsStep implements PipelineStep {
);
}

// Run all unit-tests as a single batch and with high concurrency.
// Run non-screenshot tests with high concurrency.
if (unitTestFiles.isNotEmpty) {
await _runTestBatch(
testFiles: unitTestFiles,
Expand All @@ -130,11 +130,11 @@ class RunTestsStep implements PipelineStep {
_checkExitCode('Unit tests');
}

// Run screenshot tests one at a time. Otherwise, tests end up
// screenshotting each other.
for (final FilePath screenshotTestFilePath in screenshotTestFiles) {
// Run screenshot tests one at a time to prevent tests from screenshotting
// each other.
if (screenshotTestFiles.isNotEmpty) {
await _runTestBatch(
testFiles: <FilePath>[screenshotTestFilePath],
testFiles: screenshotTestFiles,
browserEnvironment: browserEnvironment,
concurrency: 1,
expectFailure: false,
Expand Down

0 comments on commit d0d8e34

Please sign in to comment.