improved reliability and error handling for background notification actions by migrating to a top-level entry point for stable AOT callback resolution; implemented failure notifications to preserve undelivered reply text and surface technical errors; resolved a race condition that could resurrect dismissed notifications during silent re-renders; updated the Android manifest with the required broadcast receiver for notification actions; and refactored internal OCS methods to return detailed success/failure records for improved logging and field debugging.
This commit is contained in:
@@ -3,6 +3,26 @@ import 'package:marianum_mobile/push/chat_thread_store.dart';
|
||||
import 'package:marianum_mobile/push/push_actions.dart';
|
||||
|
||||
void main() {
|
||||
group('PushActions.actionFailureBody', () {
|
||||
test('includes the undelivered text and the reason', () {
|
||||
expect(
|
||||
PushActions.actionFailureBody(lostText: 'Hallo du', detail: 'HTTP 401'),
|
||||
'Deine Nachricht: „Hallo du“\nGrund: HTTP 401',
|
||||
);
|
||||
});
|
||||
|
||||
test('omits the text line when there is none', () {
|
||||
expect(
|
||||
PushActions.actionFailureBody(detail: 'HTTP 404'),
|
||||
'Grund: HTTP 404',
|
||||
);
|
||||
expect(
|
||||
PushActions.actionFailureBody(lostText: '', detail: 'HTTP 404'),
|
||||
'Grund: HTTP 404',
|
||||
);
|
||||
});
|
||||
});
|
||||
|
||||
group('PushActions.finishReply', () {
|
||||
const token = 'chat1';
|
||||
final thread = [
|
||||
|
||||
Reference in New Issue
Block a user