Skip to content

[tizen_notification] Add integration tests and fix null check crash in show()#1062

Merged
seungsoo47 merged 7 commits into
flutter-tizen:masterfrom
seungsoo47:tizen_notification-add-integration-tests
Jul 10, 2026
Merged

[tizen_notification] Add integration tests and fix null check crash in show()#1062
seungsoo47 merged 7 commits into
flutter-tizen:masterfrom
seungsoo47:tizen_notification-add-integration-tests

Conversation

@seungsoo47

Copy link
Copy Markdown
Contributor

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.

seungsoo47 and others added 5 commits July 9, 2026 10:12
…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>

@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 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.
@seungsoo47 seungsoo47 merged commit 75ddd62 into flutter-tizen:master Jul 10, 2026
6 checks passed
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