mirror of
https://github.com/flutter/flutter
synced 2024-10-13 11:42:54 +00:00
Use a null default skip value in testWidgets so it can inherit the group's skip flag (#76174)
This commit is contained in:
parent
93e7d34dc4
commit
6757c7dd47
|
@ -108,7 +108,7 @@ typedef WidgetTesterCallback = Future<void> Function(WidgetTester widgetTester);
|
|||
void testWidgets(
|
||||
String description,
|
||||
WidgetTesterCallback callback, {
|
||||
bool skip = false,
|
||||
bool? skip,
|
||||
test_package.Timeout? timeout,
|
||||
Duration? initialTimeout,
|
||||
bool semanticsEnabled = true,
|
||||
|
|
|
@ -52,6 +52,12 @@ void main() {
|
|||
});
|
||||
});
|
||||
|
||||
group('respects the group skip flag', () {
|
||||
testWidgets('should be skipped', (WidgetTester tester) async {
|
||||
expect(false, true);
|
||||
});
|
||||
}, skip: true);
|
||||
|
||||
group('findsOneWidget', () {
|
||||
testWidgets('finds exactly one widget', (WidgetTester tester) async {
|
||||
await tester.pumpWidget(const Text('foo', textDirection: TextDirection.ltr));
|
||||
|
|
Loading…
Reference in a new issue