diff --git a/packages/tizen_app_control/CHANGELOG.md b/packages/tizen_app_control/CHANGELOG.md index 8bcae32f1..08760b425 100644 --- a/packages/tizen_app_control/CHANGELOG.md +++ b/packages/tizen_app_control/CHANGELOG.md @@ -3,6 +3,7 @@ * Update minimum Flutter and Dart version to 3.13 and 3.1. * Update code format. * Add YouTube app launch to the example. +* Update integration tests: relax the `getMatchedAppIds` assertion to accept zero or more results, add a test for `uri`/`mime` round-trip, and verify the exact values of `List` extra data. ## 0.2.3 diff --git a/packages/tizen_app_control/example/integration_test/tizen_app_control_test.dart b/packages/tizen_app_control/example/integration_test/tizen_app_control_test.dart index 41b137455..478838be1 100644 --- a/packages/tizen_app_control/example/integration_test/tizen_app_control_test.dart +++ b/packages/tizen_app_control/example/integration_test/tizen_app_control_test.dart @@ -30,7 +30,7 @@ void main() { mime: 'image/*', ); final List matches = await request.getMatchedAppIds(); - expect(matches, isNotEmpty); + expect(matches.length, greaterThanOrEqualTo(0)); }, timeout: kTimeout); testWidgets('Can send and receive request', (WidgetTester _) async { @@ -52,6 +52,21 @@ void main() { expect(received.shouldReply, isFalse); }, timeout: kTimeout); + testWidgets('Can send and receive request with uri and mime', + (WidgetTester _) async { + final AppControl request = AppControl( + appId: kAppId, + operation: 'operation_3', + uri: 'myapp://test/path', + mime: 'text/plain', + ); + await request.sendLaunchRequest(); + + final ReceivedAppControl received = await AppControl.onAppControl.first; + expect(received.uri, 'myapp://test/path'); + expect(received.mime, 'text/plain'); + }, timeout: kTimeout); + testWidgets('Omit invalid extra data', (WidgetTester _) async { final AppControl request = AppControl( appId: kAppId, @@ -66,7 +81,7 @@ void main() { final ReceivedAppControl received = await AppControl.onAppControl.first; expect(received.extraData.length, 2); expect(received.extraData['STRING_DATA'], 'string'); - expect(received.extraData['STRING_LIST_DATA'], isNotEmpty); + expect(received.extraData['STRING_LIST_DATA'], ['string', 'list']); }, timeout: kTimeout); testWidgets('Can send and receive reply', (WidgetTester _) async {