mirror of
https://github.com/stablyai/orca.git
synced 2026-10-08 08:02:32 +00:00
* Restore mobile push for delivery validation * fix(mobile): register push task before headless startup * Add authenticated mobile push test and fix iOS release entitlements * Mock push-test transport in notification consent tests * Fix slept workspace test for structured remount result * Fix mobile notification review findings * Pad Android notification icon to prevent square cropping * fix(mobile): present visible Android data pushes in foreground * test: use deterministic clock for teardown deadline * fix(mobile): present foreground pushes through Expo public APIs * fix(mobile): check push eligibility before foreground scheduling * fix(mobile): register push from shared host connection lifecycle
23 lines
871 B
TypeScript
23 lines
871 B
TypeScript
import { expect, it } from 'vitest'
|
|
import { readNativeNotificationData } from './native-notification-data'
|
|
import { readOrcaPushPayload } from './push-payload'
|
|
|
|
it('reads actual Expo APNs payloads when content.data is null', () => {
|
|
const orca = {
|
|
hostFingerprint: 'qa-host',
|
|
notificationId: 'done',
|
|
notificationSeq: 4,
|
|
notificationEpoch: 'epoch'
|
|
}
|
|
const data = readNativeNotificationData({
|
|
content: { data: null },
|
|
trigger: { type: 'push', payload: { aps: {}, orca } }
|
|
})
|
|
expect(readOrcaPushPayload(data)).toMatchObject(orca)
|
|
})
|
|
it('keeps Android push and local notification data', () => {
|
|
const data = { hostId: 'host', notificationId: 'done' }
|
|
expect(readNativeNotificationData({ content: { data }, trigger: { type: 'push' } })).toBe(data)
|
|
expect(readNativeNotificationData({ content: { data }, trigger: null })).toBe(data)
|
|
})
|