When @TestOn("ios") is specified at the head of the test file for IOS specific widgets, in this case, CupertinoApp, These tests never ran. When I remove TestOn("ios"), then TargetPlatform.android is true I can't specify to run tests on IOS only.
@TestOn("ios")
import 'package:flutter/cupertino.dart';
import 'package:flutter_test/flutter_test.dart';
import 'package:my_app/src/app.dart';
void main() {
group('IOS only Test', () {
testWidgets('Load IOS App', (WidgetTester tester) async {
await tester.pumpWidget(App());
expect(find.byType(CupertinoApp), findsOneWidget);
});
});
}
Aucun commentaire:
Enregistrer un commentaire