You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
--- a/packages/integration_test/ios/Classes/IntegrationTestPlugin.m
+++ b/packages/integration_test/ios/Classes/IntegrationTestPlugin.m
@@ -49,6 +49,7 @@ static NSString *const kMethodRevertImage = @"revertFlutterImage";
// bundles. Setup on static variables can be disregarded when a new static
// instance of IntegrationTestPlugin is allocated when the bundle is reloaded.
// See also: https://github.com/flutter/plugins/pull/2465
+ [[IntegrationTestPlugin instance] setupChannels:registrar.messenger];
}
import 'package:flutter_test/flutter_test.dart';
import 'package:integration_test/integration_test.dart';
import '../lib/main.dart' as app;
void main() {
final binding = IntegrationTestWidgetsFlutterBinding.ensureInitialized()
as IntegrationTestWidgetsFlutterBinding;
testWidgets('screenshot', (WidgetTester tester) async {
// Build the app.
app.main();
await tester.pumpAndSettle();
expect(find.text('0'), findsOneWidget);
await tester.pumpAndSettle();
await binding.takeScreenshot('screenshot-0');
// Finds the floating action button to tap on.
final Finder fab = find.byTooltip('Increment');
// Emulate a tap on the floating action button.
await tester.tap(fab);
// Trigger a frame.
await tester.pumpAndSettle();
// Verify the counter increments by 1.
expect(find.text('1'), findsOneWidget);
await binding.takeScreenshot('screenshot-1');
});
}