[tizen_notification] Add integration tests and fix null check crash in show()#1062
Conversation
…ut details Fix a TypeError caused by a null check operator (!) on the 'properties' key in the details map when no TizenNotificationDetails is provided. The default value of 0 is now used when properties is absent. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Add 5 Tizen regression test cases for the TizenNotificationPlugin API: - show notification with title and body does not throw - show notification with default title and body does not throw - cancel notification does not throw - cancelAll does not throw - show notification with TizenNotificationDetails does not throw Note: cancel() with a non-existent ID throws PlatformException (expected native API behavior), so that case is not tested here. The show() bug fix (null check) kept all show-related tests passing. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
There was a problem hiding this comment.
Code Review
This pull request bumps the tizen_notification package version to 0.2.1, fixes a null check error when calling show() without TizenNotificationDetails by safely casting and defaulting the properties value, and adds integration tests to verify the plugin's functionality. Feedback suggests adding a tearDown block in the integration tests to clean up notifications and ensure proper test isolation on the target Tizen device.
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.
Per review: cancel all notifications after each test so nothing is left in the quick panel even when a test fails mid-way.
Add 5 regression integration tests for the TizenNotificationPlugin API (show with title/body, show with default title/body, cancel, cancelAll, show with TizenNotificationDetails).
While adding tests, found and fixed a TypeError: show() used a null check operator (!) on the 'properties' key when no TizenNotificationDetails was provided, since that key is absent in that case. Now defaults to 0.
Bumped to 0.2.1.