Revert "Init licenses for test bindings (#81961)" (#82337)

This commit is contained in:
Jia Hao
2021-05-14 12:29:03 +08:00
committed by GitHub
parent 93c87e92b3
commit 08154b22ce
4 changed files with 7 additions and 65 deletions

View File

@@ -1 +0,0 @@
[0-9]+:[0-9]+ [+]1: All tests passed!

View File

@@ -1,53 +0,0 @@
// Copyright 2014 The Flutter Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
import 'package:flutter/material.dart';
import 'package:flutter_test/flutter_test.dart';
void main() {
testWidgets('Can show the license page', (WidgetTester tester) async {
await tester.pumpWidget(const TestApp());
await tester.pump();
final Finder button = find.byType(TextButton);
await tester.tap(button);
await tester.pumpAndSettle();
await tester.scrollUntilVisible(
// Dart should very definitely be in the licenses list.
find.text('dart'),
100,
maxScrolls: 200,
);
expect(find.text('dart'), findsOneWidget);
});
}
class TestApp extends StatelessWidget {
const TestApp({Key? key}) : super(key: key);
@override
Widget build(BuildContext context) {
return const MaterialApp(
home: ShowLicenseButton(),
);
}
}
class ShowLicenseButton extends StatelessWidget {
const ShowLicenseButton({Key? key}) : super(key: key);
@override
Widget build(BuildContext context) {
return TextButton(
onPressed: () => showLicensePage(context: context),
child: const Text(
'Show licenses',
key: Key('show-licenses'),
),
);
}
}