Skip to content

[permission_handler] Add regression integration tests based on upstream v12.0.1#1059

Open
seungsoo47 wants to merge 2 commits into
flutter-tizen:masterfrom
seungsoo47:permission_handler-add-integration-tests
Open

[permission_handler] Add regression integration tests based on upstream v12.0.1#1059
seungsoo47 wants to merge 2 commits into
flutter-tizen:masterfrom
seungsoo47:permission_handler-add-integration-tests

Conversation

@seungsoo47

Copy link
Copy Markdown
Contributor

Upstream permission_handler v12.0.1 has no integration tests. Added Tizen regression tests for the public permission API covering all privileges declared in the example app's tizen-manifest.xml:

  • Permission.status: camera, microphone, location, mediaLibrary, storage, contacts
  • Permission.serviceStatus: location service status is valid
  • Permission.request: requesting camera permission returns granted
  • Permission.request: requesting multiple permissions returns granted
  • openAppSettings (skipped, not supported on emulators)

Note: only testable on Galaxy Watch (wearable profile) where runtime permission dialogs are applicable. On TV devices, all declared permissions are granted by default.

…am v12.0.1

Upstream permission_handler v12.0.1 has no integration tests. Added Tizen
regression tests for the public permission API covering all privileges declared
in the example app's tizen-manifest.xml:

- Permission.status: camera, microphone, location, mediaLibrary, storage, contacts
- Permission.serviceStatus: location service status is valid
- Permission.request: requesting camera permission returns granted
- Permission.request: requesting multiple permissions returns granted
- openAppSettings (skipped, not supported on emulators)

Note: only testable on Galaxy Watch (wearable profile) where runtime permission
dialogs are applicable. On TV devices, all declared permissions are granted by default.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>

@gemini-code-assist gemini-code-assist Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code Review

This pull request adds eight integration test cases to the permission_handler package, organizing tests into logical groups for checking permission status, service status, and requesting permissions. The review feedback suggests asserting directly on PermissionStatus enum values rather than using the .isGranted boolean getter or null assertion operators, which provides more descriptive test failure messages and avoids potential null pointer exceptions.

Important

The consumer version of Gemini Code Assist on GitHub is being sunset. Starting June 18, 2026, new organization installations will be blocked, and all code review activity will officially cease on July 17, 2026.
For more details on the timeline and next steps, please review the Help Documentation.

@JSUYA

JSUYA commented Jul 9, 2026

Copy link
Copy Markdown
Member

Note: only testable on Galaxy Watch (wearable profile) where runtime permission dialogs are applicable. On TV devices, all declared permissions are granted by default.

I am not sure if adding this test is a meaningful task. It seems like a package that should effectively be discontinued. What do you think?
I believe the test is meaningless because all values ​​return true.

Per review: compare against PermissionStatus.granted directly instead
of asserting .isGranted == true, so a failing test reports the actual
status (e.g. denied, permanentlyDenied) instead of a generic
'Expected: true, Actual: false'. This also drops the null assertion
operator on the request() map lookups, turning a missing key into a
normal test failure ('Actual: null') rather than a runtime exception.
@seungsoo47

Copy link
Copy Markdown
Contributor Author

Note: only testable on Galaxy Watch (wearable profile) where runtime permission dialogs are applicable. On TV devices, all declared permissions are granted by default.

I am not sure if adding this test is a meaningful task. It seems like a package that should effectively be discontinued. What do you think? I believe the test is meaningless because all values ​​return true.

As you know, this plugin does not run on the TV profile. However, as we discussed offline, since we can still check Tizen's Permission APIs on a Tizen platform (like a RPi), I will keep the plugin and the tests.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants