mirror of
https://github.com/flutter/flutter.git
synced 2025-06-03 00:51:18 +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(
|
void testWidgets(
|
||||||
String description,
|
String description,
|
||||||
WidgetTesterCallback callback, {
|
WidgetTesterCallback callback, {
|
||||||
bool skip = false,
|
bool? skip,
|
||||||
test_package.Timeout? timeout,
|
test_package.Timeout? timeout,
|
||||||
Duration? initialTimeout,
|
Duration? initialTimeout,
|
||||||
bool semanticsEnabled = true,
|
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', () {
|
group('findsOneWidget', () {
|
||||||
testWidgets('finds exactly one widget', (WidgetTester tester) async {
|
testWidgets('finds exactly one widget', (WidgetTester tester) async {
|
||||||
await tester.pumpWidget(const Text('foo', textDirection: TextDirection.ltr));
|
await tester.pumpWidget(const Text('foo', textDirection: TextDirection.ltr));
|
||||||
|
Loading…
Reference in New Issue
Block a user