Frontend And Notification Tests
OpenFrame Documentation
Get the most out of OpenFrame · Book 30 minutes with Conrad, 25 years in IT. He'll show you what Mingo and Fae can take off your list.
OpenFrame Documentation
Frontend And Notification Tests is an ordered SaaS integration-test slice supplied by the OpenFrame OSS Library com.openframe.oss:openframe-test-service-core dependency. It verifies two user-facing contracts through the test APIs: the frontend shell's feature-flag and dashboard-activity behavior, and the signed-in user's notification inbox and preferences.
The module is run by this repository's OpenFrame test service. Its test code resides in the OpenFrame OSS Library rather than this repository:
Both test classes extend the suite base class and use API helpers to exercise the deployed system rather than isolated implementations. They are deliberately method-ordered: later cases reuse state read by earlier cases, and notification settings are restored after mutation.
| Test area | Main verification |
|---|---|
| Frontend support | Frontend flags resolve consistently, named queries preserve requested order, unknown flags resolve disabled, and only valid dashboard-activity events are accepted. |
| Notifications | Inbox pages, unread summaries, read and deletion mutations, ticket-scoped reads, notification settings, and bulk operations remain internally consistent. |
flowchart LR
Runner["Test Runner"] --> FrontendTest["Frontend Support Test"]
Runner --> NotificationTest["Notifications Test"]
FrontendTest --> FeatureApi["Feature Flag API"]
FrontendTest --> EventApi["Tenant Event API"]
NotificationTest --> NotificationApi["Notification API"]
NotificationTest --> TicketApi["Ticket API"]
FeatureApi --> Platform["Deployed OpenFrame Services"]
EventApi --> Platform
NotificationApi --> Platform
TicketApi --> Platform
Platform --> EventStream["Event Processing"]
Platform --> NotificationStore["Notification State"]
The Frontend Support Test treats a dashboard event as asynchronous acceptance: a valid request must return HTTP 202 with no response body, indicating handoff rather than synchronous completion. Notification assertions query state through the API and compare related projections, such as unread category totals and the boolean unread indicator.
FrontendSupportTest is tagged saas and frontend-support. It validates the two interactions identified in the source as frontend-shell session behavior.
The ordered first three cases establish and reuse a map of the tenant's resolved flags:
billings flag.false and must not appear in the tenant-wide set.The shared flag map is a test dependency, not persisted platform state. Cases that require it use an assumption and are skipped if the initial read did not run.
The remaining cases submit tenant events and distinguish input validation from accepted asynchronous work:
flowchart TD
Request["Tenant Event Request"] --> ValidType{"Dashboard activity type?"}
ValidType -->|"no"| BadType["HTTP 400"]
ValidType -->|"yes"| ValidSubtype{"Nonblank subtype?"}
ValidSubtype -->|"no"| BadSubtype["HTTP 400"]
ValidSubtype -->|"yes"| ValidRepeat{"Repeat mode present?"}
ValidRepeat -->|"no"| BadRepeat["HTTP 400"]
ValidRepeat -->|"yes"| Accepted["HTTP 202 and empty body"]
A valid event uses the dashboard activity type, the frontend's skip-onboarding main-dashboard subtype, and singular repeat mode. The singular mode is intentional: repeated UI-style submissions collapse to one event per user.
NotificationsTest is tagged saas, post-mingo, and notifications. Its post-mingo placement matters because the test suite cannot create a notification for the same actor whose inbox it reads. The test can therefore use notifications produced by a preceding Mingo phase; the single-notification case skips itself when the inbox is empty.
The first four ordered cases verify these behaviors:
false.sequenceDiagram
participant Test as "Notifications Test"
participant API as "Notification API"
participant Inbox as "Notification State"
Test->>API: List notifications and unread counts
API->>Inbox: Read inbox state
Inbox->>API: Pages and category totals
API->>Test: Assert consistent projections
Test->>API: Mark read or delete
API->>Inbox: Apply mutation
Inbox->>API: Updated state
API->>Test: Verify idempotence and counts
The settings cases protect shared user configuration by treating it as a read-modify-restore transaction:
TICKET_CREATED; confirm all other group values and all server-supplied labels are unchanged.An AfterAll safeguard attempts restoration whenever the original settings were captured but the explicit restore case did not complete. This prevents a test failure in a later ordered case from leaking modified settings into another run.
NotificationsTest; the test intentionally requires exact schema coverage.