Improve tracing (#93086)

This commit is contained in:
Ian Hickson
2021-12-10 10:09:24 -08:00
committed by GitHub
parent 14cf445acd
commit 840e109e07
50 changed files with 1166 additions and 133 deletions

View File

@@ -2,4 +2,20 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
export 'package:flutter_goldens/flutter_goldens.dart' show testExecutable;
import 'dart:async';
import 'package:flutter/rendering.dart';
import 'package:flutter_goldens/flutter_goldens.dart' as flutter_goldens show testExecutable;
import 'package:flutter_test/flutter_test.dart';
Future<void> testExecutable(FutureOr<void> Function() testMain) {
// Enable extra checks since this package exercises a lot of the framework.
debugCheckIntrinsicSizes = true;
// Make tap() et al fail if the given finder specifies a widget that would not
// receive the event.
WidgetController.hitTestWarningShouldBeFatal = true;
// Enable golden file testing using Skia Gold.
return flutter_goldens.testExecutable(testMain);
}

View File

@@ -118,7 +118,7 @@ Future<void> smokeOptionsPage(WidgetTester tester) async {
// Switch back to system theme setting: first menu button, choose 'System Default'
await tester.tap(find.byIcon(Icons.arrow_drop_down).first);
await tester.pumpAndSettle();
await tester.tap(find.text('System Default').at(1));
await tester.tap(find.text('System Default').at(1), warnIfMissed: false); // https://github.com/flutter/flutter/issues/82908
await tester.pumpAndSettle();
// Switch text direction: first switch