Auto-format Framework (#160545)
This auto-formats all *.dart files in the repository outside of the `engine` subdirectory and enforces that these files stay formatted with a presubmit check. **Reviewers:** Please carefully review all the commits except for the one titled "formatted". The "formatted" commit was auto-generated by running `dev/tools/format.sh -a -f`. The other commits were hand-crafted to prepare the repo for the formatting change. I recommend reviewing the commits one-by-one via the "Commits" tab and avoiding Github's "Files changed" tab as it will likely slow down your browser because of the size of this PR. --------- Co-authored-by: Kate Lovett <katelovett@google.com> Co-authored-by: LongCatIsLooong <31859944+LongCatIsLooong@users.noreply.github.com>
This commit is contained in:
committed by
GitHub
parent
8e0993eda8
commit
5491c8c146
@@ -7,14 +7,14 @@ import 'package:flutter_api_samples/widgets/overlay/overlay.0.dart' as example;
|
||||
import 'package:flutter_test/flutter_test.dart';
|
||||
|
||||
void main() {
|
||||
testWidgets('Can use Overlay to highlight NavigationBar destination', (WidgetTester tester) async {
|
||||
testWidgets('Can use Overlay to highlight NavigationBar destination', (
|
||||
WidgetTester tester,
|
||||
) async {
|
||||
const String explorePage = 'Explore page';
|
||||
const String commutePage = 'Commute page';
|
||||
const String savedPage = 'Saved page';
|
||||
|
||||
await tester.pumpWidget(
|
||||
const example.OverlayApp(),
|
||||
);
|
||||
await tester.pumpWidget(const example.OverlayApp());
|
||||
|
||||
expect(find.text(explorePage), findsNothing);
|
||||
expect(find.text(commutePage), findsNothing);
|
||||
@@ -46,9 +46,7 @@ void main() {
|
||||
..devicePixelRatio = 1;
|
||||
addTearDown(tester.view.reset);
|
||||
|
||||
await tester.pumpWidget(
|
||||
const example.OverlayApp(),
|
||||
);
|
||||
await tester.pumpWidget(const example.OverlayApp());
|
||||
|
||||
// Verify that no overflow errors occur.
|
||||
expect(tester.takeException(), isNull);
|
||||
|
||||
@@ -27,10 +27,7 @@ void main() {
|
||||
await tester.pump();
|
||||
|
||||
final Size canvasSize = tester.getSize(find.byType(example.OverlayPortalExampleApp));
|
||||
expect(
|
||||
tester.getBottomRight(find.text(tooltipText)),
|
||||
canvasSize - const Size(50, 50),
|
||||
);
|
||||
expect(tester.getBottomRight(find.text(tooltipText)), canvasSize - const Size(50, 50));
|
||||
});
|
||||
|
||||
testWidgets('Tooltip is shown with the right font size', (WidgetTester tester) async {
|
||||
@@ -38,7 +35,8 @@ void main() {
|
||||
await tester.tap(find.byType(example.ClickableTooltipWidget));
|
||||
await tester.pump();
|
||||
|
||||
final TextSpan textSpan = tester.renderObject<RenderParagraph>(find.text(tooltipText)).text as TextSpan;
|
||||
final TextSpan textSpan =
|
||||
tester.renderObject<RenderParagraph>(find.text(tooltipText)).text as TextSpan;
|
||||
expect(textSpan.style?.fontSize, 50);
|
||||
});
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user