diff --git a/.github/recipe.yaml b/.github/recipe.yaml index f1d1272..c68867f 100644 --- a/.github/recipe.yaml +++ b/.github/recipe.yaml @@ -1,5 +1,2 @@ plugins: - firebase_core: ["tv-7.0"] - firebase_database: ["tv-7.0"] - firebase_storage: ["tv-7.0"] - cloud_functions: ["tv-7.0"] + tests: ["tv-7.0"] diff --git a/packages/firebase_database/example/test_driver/integration_test.dart b/packages/firebase_database/example/test_driver/integration_test.dart deleted file mode 100644 index f1ac26f..0000000 --- a/packages/firebase_database/example/test_driver/integration_test.dart +++ /dev/null @@ -1,7 +0,0 @@ -// Copyright 2022, the Chromium project authors. Please see the AUTHORS file -// for details. All rights reserved. Use of this source code is governed by a -// BSD-style license that can be found in the LICENSE file. - -import 'package:integration_test/integration_test_driver.dart'; - -Future main() => integrationDriver(); diff --git a/packages/tests/example/.gitignore b/packages/tests/example/.gitignore new file mode 100644 index 0000000..ac0089b --- /dev/null +++ b/packages/tests/example/.gitignore @@ -0,0 +1,38 @@ +# Miscellaneous +*.class +*.log +*.pyc +*.swp +.DS_Store +.atom/ +.buildlog/ +.history +.svn/ +migrate_working_dir/ + +# IntelliJ related +*.iml +*.ipr +*.iws +.idea/ + +# VS Code related +.vscode/ + +# Flutter/Dart/Pub related +**/doc/api/ +**/ios/Flutter/.last_build_id +.dart_tool/ +.flutter-plugins +.flutter-plugins-dependencies +.packages +.pub-cache/ +.pub/ +/build/ + +# Symbolication related +app.*.symbols + +# Obfuscation related +app.*.map.json + diff --git a/packages/tests/example/README.md b/packages/tests/example/README.md new file mode 100644 index 0000000..8eb3290 --- /dev/null +++ b/packages/tests/example/README.md @@ -0,0 +1,3 @@ +# Flutterfire test + +All package e2e tests belong in this application. diff --git a/packages/cloud_functions/example/integration_test/cloud_functions/cloud_functions_e2e_test.dart b/packages/tests/example/integration_test/cloud_functions/cloud_functions_e2e_test.dart similarity index 99% rename from packages/cloud_functions/example/integration_test/cloud_functions/cloud_functions_e2e_test.dart rename to packages/tests/example/integration_test/cloud_functions/cloud_functions_e2e_test.dart index 8b4b60c..766c84b 100644 --- a/packages/cloud_functions/example/integration_test/cloud_functions/cloud_functions_e2e_test.dart +++ b/packages/tests/example/integration_test/cloud_functions/cloud_functions_e2e_test.dart @@ -7,7 +7,7 @@ import 'package:firebase_core/firebase_core.dart'; import 'package:flutter/foundation.dart'; import 'package:flutter_test/flutter_test.dart'; import 'package:integration_test/integration_test.dart'; -import 'package:cloud_functions_example/firebase_options.dart'; +import 'package:tests/firebase_options.dart'; import 'sample_data.dart' as data; diff --git a/packages/cloud_functions/example/integration_test/cloud_functions/sample_data.dart b/packages/tests/example/integration_test/cloud_functions/sample_data.dart similarity index 100% rename from packages/cloud_functions/example/integration_test/cloud_functions/sample_data.dart rename to packages/tests/example/integration_test/cloud_functions/sample_data.dart diff --git a/packages/tests/example/integration_test/e2e_test.dart b/packages/tests/example/integration_test/e2e_test.dart new file mode 100644 index 0000000..b11fa2a --- /dev/null +++ b/packages/tests/example/integration_test/e2e_test.dart @@ -0,0 +1,22 @@ +// Copyright 2022, the Chromium project authors. Please see the AUTHORS file +// for details. All rights reserved. Use of this source code is governed by a +// BSD-style license that can be found in the LICENSE file. + +import 'package:flutter_test/flutter_test.dart'; +import 'package:integration_test/integration_test.dart'; + +import 'cloud_functions/cloud_functions_e2e_test.dart' as cloud_functions; +import 'firebase_core/firebase_core_e2e_test.dart' as firebase_core; +import 'firebase_database/firebase_database_e2e_test.dart' as firebase_database; +import 'firebase_storage/firebase_storage_e2e_test.dart' as firebase_storage; + +void main() { + IntegrationTestWidgetsFlutterBinding.ensureInitialized(); + + group('FlutterFire', () { + firebase_core.main(); + firebase_database.main(); + cloud_functions.main(); + firebase_storage.main(); + }); +} diff --git a/packages/firebase_core/example/integration_test/firebase_core_test.dart b/packages/tests/example/integration_test/firebase_core/firebase_core_e2e_test.dart similarity index 98% rename from packages/firebase_core/example/integration_test/firebase_core_test.dart rename to packages/tests/example/integration_test/firebase_core/firebase_core_e2e_test.dart index 627dd55..96f8245 100644 --- a/packages/firebase_core/example/integration_test/firebase_core_test.dart +++ b/packages/tests/example/integration_test/firebase_core/firebase_core_e2e_test.dart @@ -8,7 +8,7 @@ import 'package:firebase_core_platform_interface/firebase_core_platform_interfac import 'package:flutter/foundation.dart'; import 'package:flutter_test/flutter_test.dart'; import 'package:integration_test/integration_test.dart'; -import '../lib/firebase_options.dart'; +import 'package:tests/firebase_options.dart'; void main() { IntegrationTestWidgetsFlutterBinding.ensureInitialized(); diff --git a/packages/firebase_database/example/integration_test/firebase_database/data_snapshot_e2e.dart b/packages/tests/example/integration_test/firebase_database/data_snapshot_e2e.dart similarity index 100% rename from packages/firebase_database/example/integration_test/firebase_database/data_snapshot_e2e.dart rename to packages/tests/example/integration_test/firebase_database/data_snapshot_e2e.dart diff --git a/packages/firebase_database/example/integration_test/firebase_database/database_e2e.dart b/packages/tests/example/integration_test/firebase_database/database_e2e.dart similarity index 100% rename from packages/firebase_database/example/integration_test/firebase_database/database_e2e.dart rename to packages/tests/example/integration_test/firebase_database/database_e2e.dart diff --git a/packages/firebase_database/example/integration_test/firebase_database/database_reference_e2e.dart b/packages/tests/example/integration_test/firebase_database/database_reference_e2e.dart similarity index 100% rename from packages/firebase_database/example/integration_test/firebase_database/database_reference_e2e.dart rename to packages/tests/example/integration_test/firebase_database/database_reference_e2e.dart diff --git a/packages/firebase_database/example/integration_test/firebase_database/extra_e2e.dart b/packages/tests/example/integration_test/firebase_database/extra_e2e.dart similarity index 100% rename from packages/firebase_database/example/integration_test/firebase_database/extra_e2e.dart rename to packages/tests/example/integration_test/firebase_database/extra_e2e.dart diff --git a/packages/firebase_database/example/integration_test/firebase_database/firebase_database_configuration_e2e.dart b/packages/tests/example/integration_test/firebase_database/firebase_database_configuration_e2e.dart similarity index 100% rename from packages/firebase_database/example/integration_test/firebase_database/firebase_database_configuration_e2e.dart rename to packages/tests/example/integration_test/firebase_database/firebase_database_configuration_e2e.dart diff --git a/packages/firebase_database/example/integration_test/firebase_database/firebase_database_e2e_test.dart b/packages/tests/example/integration_test/firebase_database/firebase_database_e2e_test.dart similarity index 100% rename from packages/firebase_database/example/integration_test/firebase_database/firebase_database_e2e_test.dart rename to packages/tests/example/integration_test/firebase_database/firebase_database_e2e_test.dart diff --git a/packages/firebase_database/example/integration_test/firebase_database/on_disconnect_e2e.dart b/packages/tests/example/integration_test/firebase_database/on_disconnect_e2e.dart similarity index 100% rename from packages/firebase_database/example/integration_test/firebase_database/on_disconnect_e2e.dart rename to packages/tests/example/integration_test/firebase_database/on_disconnect_e2e.dart diff --git a/packages/firebase_database/example/integration_test/firebase_database/query_e2e.dart b/packages/tests/example/integration_test/firebase_database/query_e2e.dart similarity index 100% rename from packages/firebase_database/example/integration_test/firebase_database/query_e2e.dart rename to packages/tests/example/integration_test/firebase_database/query_e2e.dart diff --git a/packages/firebase_storage/example/integration_test/extratest_e2e.dart b/packages/tests/example/integration_test/firebase_storage/extratest_e2e.dart similarity index 100% rename from packages/firebase_storage/example/integration_test/extratest_e2e.dart rename to packages/tests/example/integration_test/firebase_storage/extratest_e2e.dart diff --git a/packages/firebase_storage/example/integration_test/firebase_storage_e2e_test.dart b/packages/tests/example/integration_test/firebase_storage/firebase_storage_e2e_test.dart similarity index 97% rename from packages/firebase_storage/example/integration_test/firebase_storage_e2e_test.dart rename to packages/tests/example/integration_test/firebase_storage/firebase_storage_e2e_test.dart index 7cb9095..ced5ea1 100644 --- a/packages/firebase_storage/example/integration_test/firebase_storage_e2e_test.dart +++ b/packages/tests/example/integration_test/firebase_storage/firebase_storage_e2e_test.dart @@ -6,8 +6,8 @@ import 'package:firebase_core/firebase_core.dart'; import 'package:firebase_storage/firebase_storage.dart'; import 'package:flutter_test/flutter_test.dart'; import 'package:integration_test/integration_test.dart'; +import 'package:tests/firebase_options.dart'; -import '../lib/firebase_options.dart'; import 'instance_e2e.dart'; import 'list_result_e2e.dart'; import 'reference_e2e.dart'; diff --git a/packages/firebase_storage/example/integration_test/instance_e2e.dart b/packages/tests/example/integration_test/firebase_storage/instance_e2e.dart similarity index 97% rename from packages/firebase_storage/example/integration_test/instance_e2e.dart rename to packages/tests/example/integration_test/firebase_storage/instance_e2e.dart index a3071e5..6cd60f5 100644 --- a/packages/firebase_storage/example/integration_test/instance_e2e.dart +++ b/packages/tests/example/integration_test/firebase_storage/instance_e2e.dart @@ -5,8 +5,8 @@ import 'package:firebase_core/firebase_core.dart'; import 'package:firebase_storage/firebase_storage.dart'; import 'package:flutter_test/flutter_test.dart'; +import 'package:tests/firebase_options.dart'; -import '../lib/firebase_options.dart'; import 'test_utils.dart'; void setupInstanceTests() { @@ -241,9 +241,10 @@ void setupInstanceTests() { }); test('toString', () { + // flutterfire-e2e-tests.appspot.com -> mytest-16eac.appspot.com expect( storage.toString(), - 'FirebaseStorage(app: [DEFAULT], bucket: flutterfire-e2e-tests.appspot.com)', + 'FirebaseStorage(app: [DEFAULT], bucket: mytest-16eac.appspot.com)', ); }); }); diff --git a/packages/firebase_storage/example/integration_test/list_result_e2e.dart b/packages/tests/example/integration_test/firebase_storage/list_result_e2e.dart similarity index 100% rename from packages/firebase_storage/example/integration_test/list_result_e2e.dart rename to packages/tests/example/integration_test/firebase_storage/list_result_e2e.dart diff --git a/packages/firebase_storage/example/integration_test/reference_e2e.dart b/packages/tests/example/integration_test/firebase_storage/reference_e2e.dart similarity index 96% rename from packages/firebase_storage/example/integration_test/reference_e2e.dart rename to packages/tests/example/integration_test/firebase_storage/reference_e2e.dart index c0cbc67..0a3677b 100644 --- a/packages/firebase_storage/example/integration_test/reference_e2e.dart +++ b/packages/tests/example/integration_test/firebase_storage/reference_e2e.dart @@ -5,10 +5,11 @@ import 'dart:convert'; import 'dart:io'; +import 'package:firebase_core/firebase_core.dart'; import 'package:firebase_storage/firebase_storage.dart'; import 'package:flutter/foundation.dart'; import 'package:flutter_test/flutter_test.dart'; - +import 'package:tests/firebase_options.dart'; import './test_utils.dart'; void setupReferenceTests() { @@ -16,7 +17,13 @@ void setupReferenceTests() { late FirebaseStorage storage; setUpAll(() async { - storage = FirebaseStorage.instance; + // Create a new app due to options initialization conflict + // with the default app in another package. + FirebaseApp app = await Firebase.initializeApp( + name: "storage", + options: DefaultFirebaseOptions.baseOptions, + ); + storage = FirebaseStorage.instanceFor(app: app); }); group('bucket', () { @@ -460,7 +467,8 @@ void setupReferenceTests() { test('toString', () async { expect( storage.ref('/uploadNope.jpeg').toString(), - equals('Reference(app: [DEFAULT], fullPath: uploadNope.jpeg)'), + equals( + 'Reference(app: storage, fullPath: uploadNope.jpeg)'), // [DEFAULT] -> storage ); }); }); diff --git a/packages/firebase_storage/example/integration_test/task_e2e.dart b/packages/tests/example/integration_test/firebase_storage/task_e2e.dart similarity index 100% rename from packages/firebase_storage/example/integration_test/task_e2e.dart rename to packages/tests/example/integration_test/firebase_storage/task_e2e.dart diff --git a/packages/firebase_storage/example/integration_test/test_utils.dart b/packages/tests/example/integration_test/firebase_storage/test_utils.dart similarity index 98% rename from packages/firebase_storage/example/integration_test/test_utils.dart rename to packages/tests/example/integration_test/firebase_storage/test_utils.dart index f1d6a06..b28af46 100644 --- a/packages/firebase_storage/example/integration_test/test_utils.dart +++ b/packages/tests/example/integration_test/firebase_storage/test_utils.dart @@ -7,8 +7,7 @@ import 'dart:math'; import 'package:firebase_core/firebase_core.dart'; import 'package:flutter/foundation.dart'; - -import '../lib/firebase_options.dart'; +import 'package:tests/firebase_options.dart'; final String kTestString = ([]..length = int.parse('${pow(2, 12)}')).join(_getRandomString(8)) * 100; diff --git a/packages/tests/example/lib/firebase_options.dart b/packages/tests/example/lib/firebase_options.dart new file mode 100644 index 0000000..581cbd8 --- /dev/null +++ b/packages/tests/example/lib/firebase_options.dart @@ -0,0 +1,59 @@ +// Copyright 2022, the Chromium project authors. Please see the AUTHORS file +// for details. All rights reserved. Use of this source code is governed by a +// BSD-style license that can be found in the LICENSE file. + +// File generated by FlutterFire CLI. +// ignore_for_file: lines_longer_than_80_chars, avoid_classes_with_only_static_members +import 'package:firebase_core/firebase_core.dart' show FirebaseOptions; +import 'package:flutter/foundation.dart' + show defaultTargetPlatform, TargetPlatform; + +/// Default [FirebaseOptions] for use with your Firebase apps. +/// +/// Example: +/// ```dart +/// import 'firebase_options.dart'; +/// // ... +/// await Firebase.initializeApp( +/// options: DefaultFirebaseOptions.currentPlatform, +/// ); +/// ``` +class DefaultFirebaseOptions { + static FirebaseOptions get currentPlatform { + switch (defaultTargetPlatform) { + case TargetPlatform.linux: + // Note: To find out if you are using the Tizen platform, refer to the link below. + // https://github.com/flutter-tizen/flutter-tizen/issues/482#issuecomment-1441139704 + return tizen; + default: + throw UnsupportedError( + 'DefaultFirebaseOptions are not supported for this platform.', + ); + } + } + + // For firebase_storage test + static FirebaseOptions get baseOptions { + return FirebaseOptions( + apiKey: 'PLACEHOLDER', + appId: 'PLACEHOLDER', + messagingSenderId: 'PLACEHOLDER', + projectId: 'PLACEHOLDER', + databaseURL: 'PLACEHOLDER', + storageBucket: 'PLACEHOLDER', + ); + } + + static const FirebaseOptions tizen = FirebaseOptions( + apiKey: 'PLACEHOLDER', + appId: 'PLACEHOLDER', + messagingSenderId: 'PLACEHOLDER', + projectId: 'PLACEHOLDER', + databaseURL: 'PLACEHOLDER', + storageBucket: 'PLACEHOLDER', + ); + + static String get emulatorHost { + return 'PLACEHOLDER'; + } +} diff --git a/packages/tests/example/lib/main.dart b/packages/tests/example/lib/main.dart new file mode 100644 index 0000000..b84447b --- /dev/null +++ b/packages/tests/example/lib/main.dart @@ -0,0 +1,162 @@ +// Copyright 2022, the Chromium project authors. Please see the AUTHORS file +// for details. All rights reserved. Use of this source code is governed by a +// BSD-style license that can be found in the LICENSE file. + +import 'dart:io'; +import 'package:firebase_core/firebase_core.dart'; +import 'package:flutter/foundation.dart'; +import 'package:flutter/material.dart'; +import 'package:firebase_remote_config/firebase_remote_config.dart'; +import 'package:firebase_app_installations/firebase_app_installations.dart'; +import 'package:firebase_messaging/firebase_messaging.dart'; +import 'firebase_options.dart'; + +Future main() async { + WidgetsFlutterBinding.ensureInitialized(); + await Firebase.initializeApp( + options: DefaultFirebaseOptions.currentPlatform, + ); + runApp(const MyApp()); +} + +class MyApp extends StatelessWidget { + const MyApp({Key? key}) : super(key: key); + + // This widget is the root of your application. + @override + Widget build(BuildContext context) { + return MaterialApp( + title: 'Flutter Demo', + theme: ThemeData( + // This is the theme of your application. + // + // Try running your application with "flutter run". You'll see the + // application has a blue toolbar. Then, without quitting the app, try + // changing the primarySwatch below to Colors.green and then invoke + // "hot reload" (press "r" in the console where you ran "flutter run", + // or simply save your changes to "hot reload" in a Flutter IDE). + // Notice that the counter didn't reset back to zero; the application + // is not restarted. + primarySwatch: Colors.blue, + ), + home: const MyHomePage(title: 'Flutter Demo Home Page'), + ); + } +} + +class MyHomePage extends StatefulWidget { + const MyHomePage({Key? key, required this.title}) : super(key: key); + + // This widget is the home page of your application. It is stateful, meaning + // that it has a State object (defined below) that contains fields that affect + // how it looks. + + // This class is the configuration for the state. It holds the values (in this + // case the title) provided by the parent (in this case the App widget) and + // used by the build method of the State. Fields in a Widget subclass are + // always marked "final". + + final String title; + + @override + State createState() => _MyHomePageState(); +} + +class _MyHomePageState extends State { + int _counter = 0; + + void _incrementCounter() { + setState(() { + // This call to setState tells the Flutter framework that something has + // changed in this State, which causes it to rerun the build method below + // so that the display can reflect the updated values. If we changed + // _counter without calling setState(), then the build method would not be + // called again, and so nothing would appear to happen. + _counter++; + }); + } + + @override + Widget build(BuildContext context) { + // This method is rerun every time setState is called, for instance as done + // by the _incrementCounter method above. + // + // The Flutter framework has been optimized to make rerunning build methods + // fast, so that you can just rebuild anything that needs updating rather + // than having to individually change instances of widgets. + return Scaffold( + appBar: AppBar( + // Here we take the value from the MyHomePage object that was created by + // the App.build method, and use it to set our appbar title. + title: Text(widget.title), + ), + body: Center( + // Center is a layout widget. It takes a single child and positions it + // in the middle of the parent. + child: Column( + // Column is also a layout widget. It takes a list of children and + // arranges them vertically. By default, it sizes itself to fit its + // children horizontally, and tries to be as tall as its parent. + // + // Invoke "debug painting" (press "p" in the console, choose the + // "Toggle Debug Paint" action from the Flutter Inspector in Android + // Studio, or the "Toggle Debug Paint" command in Visual Studio Code) + // to see the wireframe for each widget. + // + // Column has various properties to control how it sizes itself and + // how it positions its children. Here we use mainAxisAlignment to + // center the children vertically; the main axis here is the vertical + // axis because Columns are vertical (the cross axis would be + // horizontal). + mainAxisAlignment: MainAxisAlignment.center, + children: [ + ElevatedButton( + onPressed: () async { + // Running these APIs manually as they're failing on CI due to required keychain sharing entitlements + // See this issue https://github.com/firebase/flutterfire/issues/9538 + // You will also need to add the keychain sharing entitlements to this test app and sign code with development team for app & tests to successfully run + if (Platform.isMacOS && kDebugMode) { + // ignore_for_file: avoid_print + await FirebaseRemoteConfig.instance.fetchAndActivate(); + print('Fetched and activated remote config'); + + final id = await FirebaseInstallations.instance.getId(); + print('Received Firebase App Installations id: $id'); + + // Wait a little so we don't get a delete-pending exception + await Future.delayed(const Duration(seconds: 8)); + + await FirebaseInstallations.instance.delete(); + print('Deleted Firebase App Installations id'); + + final token = await FirebaseInstallations.instance.getToken(); + print('Received Firebase App Installations token: $token'); + + const topic = 'test-topic'; + await FirebaseMessaging.instance.subscribeToTopic(topic); + print('Firebase Messaging subscribed to topic: $topic'); + + await FirebaseMessaging.instance.unsubscribeFromTopic(topic); + print('Firebase Messaging unsubscribed to topic: $topic'); + } + }, + child: const Text('Test macOS tests manually'), + ), + const Text( + 'You have pushed the button this many times:', + ), + Text( + '$_counter', + style: Theme.of(context).textTheme.headline4, + ), + ], + ), + ), + floatingActionButton: FloatingActionButton( + onPressed: _incrementCounter, + tooltip: 'Increment', + child: const Icon(Icons.add), + ), // This trailing comma makes auto-formatting nicer for build methods. + ); + } +} diff --git a/packages/tests/example/pubspec.yaml b/packages/tests/example/pubspec.yaml new file mode 100644 index 0000000..90f3129 --- /dev/null +++ b/packages/tests/example/pubspec.yaml @@ -0,0 +1,40 @@ +# ignore_for_file sort_pub_dependencies +name: tests +description: A an app for FlutterFire testing (e2e). +publish_to: "none" +version: 1.0.0+1 + +environment: + sdk: ">=2.16.0 <3.0.0" + +dependencies: + cloud_functions_tizen: + path: ../../cloud_functions + firebase_core_tizen: + path: ../../firebase_core + firebase_database_tizen: + path: ../../firebase_database + firebase_storage_tizen: + path: ../../firebase_storage + flutter: + sdk: flutter + +dependency_overrides: + cloud_functions_tizen: + path: ../../cloud_functions + firebase_core_tizen: + path: ../../firebase_core + firebase_database_tizen: + path: ../../firebase_database + firebase_storage_tizen: + path: ../../firebase_storage + +dev_dependencies: + flutter_test: + sdk: flutter + integration_test: + sdk: flutter + integration_test_tizen: ^2.0.1 + +flutter: + uses-material-design: true diff --git a/packages/tests/example/test/widget_test.dart b/packages/tests/example/test/widget_test.dart new file mode 100644 index 0000000..092d222 --- /dev/null +++ b/packages/tests/example/test/widget_test.dart @@ -0,0 +1,30 @@ +// This is a basic Flutter widget test. +// +// To perform an interaction with a widget in your test, use the WidgetTester +// utility in the flutter_test package. For example, you can send tap and scroll +// gestures. You can also use WidgetTester to find child widgets in the widget +// tree, read text, and verify that the values of widget properties are correct. + +import 'package:flutter/material.dart'; +import 'package:flutter_test/flutter_test.dart'; + +import 'package:example/main.dart'; + +void main() { + testWidgets('Counter increments smoke test', (WidgetTester tester) async { + // Build our app and trigger a frame. + await tester.pumpWidget(const MyApp()); + + // Verify that our counter starts at 0. + expect(find.text('0'), findsOneWidget); + expect(find.text('1'), findsNothing); + + // Tap the '+' icon and trigger a frame. + await tester.tap(find.byIcon(Icons.add)); + await tester.pump(); + + // Verify that our counter has incremented. + expect(find.text('0'), findsNothing); + expect(find.text('1'), findsOneWidget); + }); +} diff --git a/packages/cloud_functions/example/test_driver/integration_test.dart b/packages/tests/example/test_driver/integration_test.dart similarity index 100% rename from packages/cloud_functions/example/test_driver/integration_test.dart rename to packages/tests/example/test_driver/integration_test.dart diff --git a/packages/tests/example/tizen/.gitignore b/packages/tests/example/tizen/.gitignore new file mode 100644 index 0000000..750f3af --- /dev/null +++ b/packages/tests/example/tizen/.gitignore @@ -0,0 +1,5 @@ +flutter/ +.vs/ +*.user +bin/ +obj/ diff --git a/packages/tests/example/tizen/App.cs b/packages/tests/example/tizen/App.cs new file mode 100644 index 0000000..6dd4a63 --- /dev/null +++ b/packages/tests/example/tizen/App.cs @@ -0,0 +1,20 @@ +using Tizen.Flutter.Embedding; + +namespace Runner +{ + public class App : FlutterApplication + { + protected override void OnCreate() + { + base.OnCreate(); + + GeneratedPluginRegistrant.RegisterPlugins(this); + } + + static void Main(string[] args) + { + var app = new App(); + app.Run(args); + } + } +} diff --git a/packages/tests/example/tizen/Runner.csproj b/packages/tests/example/tizen/Runner.csproj new file mode 100644 index 0000000..f4e369d --- /dev/null +++ b/packages/tests/example/tizen/Runner.csproj @@ -0,0 +1,19 @@ + + + + Exe + tizen40 + + + + + + + + + + %(RecursiveDir) + + + + diff --git a/packages/tests/example/tizen/shared/res/ic_launcher.png b/packages/tests/example/tizen/shared/res/ic_launcher.png new file mode 100644 index 0000000..4d6372e Binary files /dev/null and b/packages/tests/example/tizen/shared/res/ic_launcher.png differ diff --git a/packages/tests/example/tizen/tizen-manifest.xml b/packages/tests/example/tizen/tizen-manifest.xml new file mode 100644 index 0000000..cafaeb7 --- /dev/null +++ b/packages/tests/example/tizen/tizen-manifest.xml @@ -0,0 +1,13 @@ + + + + + + ic_launcher.png + + + + + http://tizen.org/privilege/internet + + diff --git a/packages/tests/pubspec.yaml b/packages/tests/pubspec.yaml new file mode 100644 index 0000000..7104b6b --- /dev/null +++ b/packages/tests/pubspec.yaml @@ -0,0 +1,8 @@ +# ignore_for_file sort_pub_dependencies +name: flutterfire_test +description: A an app for FlutterFire testing (e2e). +publish_to: "none" +version: 0.0.1 + +environment: + sdk: ">=2.16.0 <3.0.0" diff --git a/tools/lib/src/device.dart b/tools/lib/src/device.dart index 7ad8f14..699a8c1 100644 --- a/tools/lib/src/device.dart +++ b/tools/lib/src/device.dart @@ -124,7 +124,7 @@ class Device { final io.Process process = await _processRunner.start( 'flutter-tizen', - ['-d', serial!, 'test', 'integration_test'], + ['-d', serial!, 'test', 'integration_test/e2e_test.dart'], workingDirectory: workingDir, );