bring back code sharing

pull/2798/head
Eric Windmill 1 month ago
parent bbb3dc2876
commit 4a2fec1b93

@ -46,5 +46,5 @@ void main() {
// Verify that our counter has incremented.
expect(find.text('Taps: 0'), findsNothing);
expect(find.text('Taps: 1'), findsOneWidget);
}, skip: true);
});
}

@ -18,7 +18,7 @@ void main() {
await tester.tap(find.byIcon(Icons.clear));
expect(mockHostApi.cancelCalls, 1);
}, skip: true);
});
testWidgets('Pressing done calls the finish editing API', (
tester,
@ -34,7 +34,7 @@ void main() {
await tester.tap(find.byIcon(Icons.check));
expect(mockHostApi.booksFinished.length, 1);
}, skip: true);
});
}
// A super-simple mock for testing that calls are made to the API.

@ -21,27 +21,30 @@ class MockCounterModel extends ChangeNotifier implements CounterModel {
}
void main() {
testWidgets('MiniView smoke test', (tester) async {
// Build our app and trigger a frame.
await tester.pumpWidget(
MaterialApp(
home: ChangeNotifierProvider<CounterModel>.value(
value: MockCounterModel(),
child: const Contents(),
testWidgets(
'MiniView smoke test',
(tester) async {
// Build our app and trigger a frame.
await tester.pumpWidget(
MaterialApp(
home: ChangeNotifierProvider<CounterModel>.value(
value: MockCounterModel(),
child: const Contents(),
),
),
),
);
);
// Verify that our counter starts at 0.
expect(find.text('Taps: 0'), findsOneWidget);
expect(find.text('Taps: 1'), findsNothing);
// Verify that our counter starts at 0.
expect(find.text('Taps: 0'), findsOneWidget);
expect(find.text('Taps: 1'), findsNothing);
// Tap the '+' icon and trigger a frame.
await tester.tap(find.text('Tap me!'));
await tester.pump();
// Tap the '+' icon and trigger a frame.
await tester.tap(find.text('Tap me!'));
await tester.pump();
// Verify that our counter has incremented.
expect(find.text('Taps: 0'), findsNothing);
expect(find.text('Taps: 1'), findsOneWidget);
}, skip: true);
// Verify that our counter has incremented.
expect(find.text('Taps: 0'), findsNothing);
expect(find.text('Taps: 1'), findsOneWidget);
},
);
}

@ -62,4 +62,3 @@ skip_ci:
- add_to_app/multiple_flutters/multiple_flutters_module
- add_to_app/plugin/flutter_module_using_plugin
- add_to_app/prebuilt_module/flutter_module
- code_sharing
Loading…
Cancel
Save