Unverified Commit 6757c7dd authored by Jason Simmons's avatar Jason Simmons Committed by GitHub

Use a null default skip value in testWidgets so it can inherit the group's skip flag (#76174)

parent 93e7d34d
...@@ -108,7 +108,7 @@ typedef WidgetTesterCallback = Future<void> Function(WidgetTester widgetTester); ...@@ -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() { ...@@ -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));
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment