ER|article used for testing OneSignal Push X drupal 1
发布时间:10:07 2026-02-05 HKT
# STNMB-986 OneSignal Push Notification Test Cases
**Project**: Sing Tao New Media Business (STNMB)
**Task**: [STHL][Drupal] To create OneSignal App push notifications directly through Drupal CMS
**Jira ID**: STNMB-986
**Prepared Date**: 2026-02-04
**Status**: In Progress
---
## Table of Contents
1. [Test Overview](#test-overview)
2. [Prerequisites](#prerequisites)
3. [Title Handling Logic Test Cases](#title-handling-logic-test-cases)
4. [Push Notification Functionality Test Cases](#push-notification-functionality-test-cases)
5. [Permission and Access Control Test Cases](#permission-and-access-control-test-cases)
6. [Push Status and Tracking Test Cases](#push-status-and-tracking-test-cases)
7. [Error Handling and Boundary Test Cases](#error-handling-and-boundary-test-cases)
8. [Integration and Third-Party API Test Cases](#integration-and-third-party-api-test-cases)
9. [Article Status Related Test Cases](#article-status-related-test-cases)
10. [UI/UX and User Interaction Test Cases](#uiux-and-user-interaction-test-cases)
---
## Test Overview
This test case collection covers comprehensive testing requirements for the OneSignal push notification feature in Drupal CMS, including core functionality, boundary conditions, error handling, permission management, and integration with the OneSignal API. The testing will ensure that editors can directly create, manage, and send app push notifications through the CMS without needing to log into the OneSignal platform.
---
## Prerequisites
| Condition | Description |
|-----------|-------------|
| **Environment Setup** | UAT environment is configured, Drupal CMS has OneSignal module installed |
| **API Configuration** | OneSignal API keys are correctly configured, API endpoints are accessible |
| **User Roles** | At least one user with "App Push Creator" role, one user without permissions |
| **Test Data** | At least 5 published articles with different title formats |
| **Mobile App** | Sing Tao Daily APP is installed on test devices and bound to receive push notifications |
| **Network Connection** | Network connection between test environment and OneSignal servers is normal |
---
## Title Handling Logic Test Cases
The title handling logic is a core feature of this functionality. It splits the CMS article title into Title and Message fields for the push notification based on specific delimiters in the article title.
### TC-001: Title Splitting with Pipe Symbol "|"
| Item | Content |
|------|---------|
| **Test Case ID** | TC-001 |
| **Title** | Verify correct splitting of article titles containing pipe symbol "|" |
| **Prerequisites** | Article is published with title "Star Island Complaints|Mong Kok Temple Street Suddenly Appeared 'African Legion'" |
| **Test Steps** | 1. Navigate to article detail page; 2. Click "Send OneSignal APP Push" button; 3. Check the pre-filled values in Title and Message fields |
| **Expected Result** | - Title field displays: "Star Island Complaints"; - Message field displays: "Mong Kok Temple Street Suddenly Appeared 'African Legion'"; - Pipe symbol is correctly removed |
| **Actual Result** | _________ |
| **Status** | ⬜ Not Tested |
| **Notes** | Pipe symbol has the highest priority for splitting |
### TC-002: Title Splitting with Space
| Item | Content |
|------|---------|
| **Test Case ID** | TC-002 |
| **Title** | Verify correct splitting of article titles containing spaces |
| **Prerequisites** | Article is published with title "Brown University Shooting in Rhode Island Causes 2 Deaths 8 Injuries" |
| **Test Steps** | 1. Navigate to article detail page; 2. Click "Send OneSignal APP Push" button; 3. Check Title and Message fields |
| **Expected Result** | - Title field displays: "Brown University Shooting in Rhode Island Causes"; - Message field displays: "2 Deaths 8 Injuries"; - Split by first space |
| **Actual Result** | _________ |
| **Status** | ⬜ Not Tested |
| **Notes** | When no pipe symbol exists in title, split by first space |
### TC-003: Title with Both Pipe and Space - Pipe Takes Priority
| Item | Content |
|------|---------|
| **Test Case ID** | TC-003 |
| **Title** | Verify pipe symbol has priority over space for splitting |
| **Prerequisites** | Article is published with title "News Title|Subtitle Other Content" (contains both pipe and space) |
| **Test Steps** | 1. Navigate to article detail page; 2. Click "Send OneSignal APP Push" button; 3. Check Title and Message fields |
| **Expected Result** | - Title field displays: "News Title"; - Message field displays: "Subtitle Other Content"; - Prioritizes splitting by pipe, ignoring subsequent spaces |
| **Actual Result** | _________ |
| **Status** | ⬜ Not Tested |
| **Notes** | When both pipe and space exist, pipe takes highest priority |
### TC-004: Title Without Any Delimiter - Use Default Title
| Item | Content |
|------|---------|
| **Test Case ID** | TC-004 |
| **Title** | Verify title without delimiter uses default title "Latest News" |
| **Prerequisites** | Article is published with title "Can Exercise Create 'Anti-Cancer Blood'? Research Reveals 2 Types of Exercise That Inhibit Cancer Cell Growth" |
| **Test Steps** | 1. Navigate to article detail page; 2. Click "Send OneSignal APP Push" button; 3. Check Title and Message fields |
| **Expected Result** | - Title field displays: "Latest News"; - Message field displays complete article title; - No delimiter is used |
| **Actual Result** | _________ |
| **Status** | ⬜ Not Tested |
| **Notes** | This scenario aligns with Phase 2 vision to customize title based on Zone/Channel mapping |
### TC-005: Title Contains Only Pipe Symbol - Edge Case
| Item | Content |
|------|---------|
| **Test Case ID** | TC-005 |
| **Title** | Verify edge case: title containing only pipe symbol |
| **Prerequisites** | Article is published with title "|Actual Content" |
| **Test Steps** | 1. Navigate to article detail page; 2. Click "Send OneSignal APP Push" button; 3. Check Title and Message fields |
| **Expected Result** | System should handle gracefully; Title is empty or default value "Latest News", Message displays "Actual Content" |
| **Actual Result** | _________ |
| **Status** | ⬜ Not Tested |
| **Notes** | Boundary test case |
### TC-006: Completely Empty Title
| Item | Content |
|------|---------|
| **Test Case ID** | TC-006 |
| **Title** | Verify handling of empty title |
| **Prerequisites** | Article is published with empty title string |
| **Test Steps** | 1. Navigate to article detail page; 2. Click "Send OneSignal APP Push" button; 3. Check Title and Message fields |
| **Expected Result** | System handles gracefully without crash; Title is default value, Message is empty or default value |
| **Actual Result** | _________ |
| **Status** | ⬜ Not Tested |
| **Notes** | Boundary test case |
### TC-007: Mixed Half-width and Full-width Spaces
| Item | Content |
|------|---------|
| **Test Case ID** | TC-007 |
| **Title** | Verify correct identification of half-width and full-width spaces |
| **Prerequisites** | Article is published with title containing both half-width space (U+0020) and full-width space (U+3000) |
| **Test Steps** | 1. Navigate to article detail page; 2. Click "Send OneSignal APP Push" button; 3. Check splitting result |
| **Expected Result** | System correctly identifies half-width or full-width space (by priority) and splits accordingly |
| **Actual Result** | _________ |
| **Status** | ⬜ Not Tested |
| **Notes** | Verify system handles Unicode space characters correctly |
---
## Push Notification Functionality Test Cases
### TC-008: Real-time Push Notification Delivery
| Item | Content |
|------|---------|
| **Test Case ID** | TC-008 |
| **Title** | Verify real-time push notification is sent to all users correctly |
| **Prerequisites** | User is logged in to CMS with push permissions; at least one published article exists; test device has APP installed and registered for push notifications |
| **Test Steps** | 1. Navigate to article detail page; 2. Click "Send OneSignal APP Push" button; 3. Fill in push information (Title, Message, Cover Image, Type, Recipient, etc.); 4. Select "Send Now" mode; 5. Click "Send" button |
| **Expected Result** | - Push is sent to OneSignal immediately; - Test device receives push notification within 5 seconds; - CMS list page displays push status as "Sent"; - Audit log records push operation |
| **Actual Result** | _________ |
| **Status** | ⬜ Not Tested |
| **Notes** | Verify core functionality: sending push directly through CMS |
### TC-009: Scheduled Push Notification Delivery
| Item | Content |
|------|---------|
| **Test Case ID** | TC-009 |
| **Title** | Verify scheduled push notification is sent at specified time correctly |
| **Prerequisites** | User is logged in to CMS with push permissions; published article exists; schedule is set to 5 minutes in the future |
| **Test Steps** | 1. Navigate to article detail page; 2. Click "Send OneSignal APP Push" button; 3. Fill in push information; 4. Select "Schedule" mode; 5. Set send time to 5 minutes later; 6. Click "Send" button |
| **Expected Result** | - Push status immediately displays as "Scheduled"; - Push is sent to OneSignal at scheduled time; - Test device receives push at scheduled time (allow 30 seconds error margin); - Push status updates to "Sent"; - Audit log records scheduled and actual send times |
| **Actual Result** | _________ |
| **Status** | ⬜ Not Tested |
| **Notes** | Verify scheduling functionality and time accuracy |
### TC-010: Multiple Pushes for Same Article
| Item | Content |
|------|---------|
| **Test Case ID** | TC-010 |
| **Title** | Verify same article can send multiple push notifications |
| **Prerequisites** | User is logged in to CMS with push permissions; published article exists; a successful push record already exists |
| **Test Steps** | 1. Navigate to article detail page; 2. Click "Send OneSignal APP Push" button; 3. Fill in different push information; 4. Click "Send" button; 5. System displays warning message |
| **Expected Result** | - System displays warning: "This article has been pushed before, continue?"; - After user confirms, new push is sent successfully; - CMS list shows multiple push records for article; - All pushes are properly audited |
| **Actual Result** | _________ |
| **Status** | ⬜ Not Tested |
| **Notes** | User confirmation required before sending duplicate pushes |
### TC-011: Edit Unsent Push Records
| Item | Content |
|------|---------|
| **Test Case ID** | TC-011 |
| **Title** | Verify ability to edit unsent push records |
| **Prerequisites** | User is logged in to CMS with push permissions; unsent push record exists (draft or scheduled) |
| **Test Steps** | 1. Navigate to push list page; 2. Find unsent push record; 3. Click "Edit" button; 4. Modify push information; 5. Click "Save" button |
| **Expected Result** | - Edit button only appears for draft or scheduled pushes; - Changes are saved successfully; - Audit log records edit operation with content diff before and after |
| **Actual Result** | _________ |
| **Status** | ⬜ Not Tested |
| **Notes** | Verify ability to modify scheduled pushes |
### TC-012: Cannot Edit Sent Push Records
| Item | Content |
|------|---------|
| **Test Case ID** | TC-012 |
| **Title** | Verify sent push records cannot be edited |
| **Prerequisites** | User is logged in to CMS with push permissions; sent push record exists |
| **Test Steps** | 1. Navigate to push list page; 2. Find sent push record; 3. Try to click "Edit" button |
| **Expected Result** | - Edit button is disabled or hidden for sent pushes; - System prevents modification of sent push content; - Direct URL access shows error message |
| **Actual Result** | _________ |
| **Status** | ⬜ Not Tested |
| **Notes** | Protect data integrity of sent pushes |
### TC-013: Cancel Scheduled Push Notifications
| Item | Content |
|------|---------|
| **Test Case ID** | TC-013 |
| **Title** | Verify scheduled push can be cancelled before sending |
| **Prerequisites** | User is logged in to CMS with push permissions; scheduled push record exists (status "Scheduled") |
| **Test Steps** | 1. Navigate to push list page; 2. Find scheduled push record; 3. Click "Cancel" button; 4. System requests confirmation |
| **Expected Result** | - Cancel button only appears for scheduled pushes; - After user confirms, push is cancelled; - OneSignal scheduled push is cancelled; - Audit log records cancellation; - Push status updates to "Cancelled" |
| **Actual Result** | _________ |
| **Status** | ⬜ Not Tested |
| **Notes** | Need to notify OneSignal to cancel scheduled push |
### TC-014: List Page Updates Immediately After Push Send
| Item | Content |
|------|---------|
| **Test Case ID** | TC-014 |
| **Title** | Verify list page updates immediately after push is sent |
| **Prerequisites** | User is logged in to CMS with push permissions; published article exists |
| **Test Steps** | 1. Navigate to article detail page; 2. Send push; 3. System returns to push list page |
| **Expected Result** | - New push record appears in list immediately; - Push status displays correctly ("Sent" or "Scheduled"); - No manual refresh required |
| **Actual Result** | _________ |
| **Status** | ⬜ Not Tested |
| **Notes** | Verify page state synchronization |
---
## Permission and Access Control Test Cases
### TC-015: User with "App Push Creator" Role Can Send Push
| Item | Content |
|------|---------|
| **Test Case ID** | TC-015 |
| **Title** | Verify user with correct role can send push |
| **Prerequisites** | User assigned "App Push Creator" role; user is logged in to CMS; published article exists |
| **Test Steps** | 1. Log in as user with "App Push Creator" role; 2. Navigate to article detail page; 3. Check for "Send OneSignal APP Push" button |
| **Expected Result** | - Button is visible and clickable; - User can access push configuration page; - User can send push successfully |
| **Actual Result** | _________ |
| **Status** | ⬜ Not Tested |
| **Notes** | Verify role permission configuration |
### TC-016: User without "App Push Creator" Role Cannot Send Push
| Item | Content |
|------|---------|
| **Test Case ID** | TC-016 |
| **Title** | Verify user without permission cannot send push |
| **Prerequisites** | User not assigned "App Push Creator" role; user is logged in to CMS; published article exists |
| **Test Steps** | 1. Log in as user without "App Push Creator" role; 2. Navigate to article detail page; 3. Check for "Send OneSignal APP Push" button |
| **Expected Result** | - Button is hidden or disabled; - User cannot access push configuration page; - Direct URL access returns 403 Forbidden error |
| **Actual Result** | _________ |
| **Status** | ⬜ Not Tested |
| **Notes** | Verify permission control is effective |
### TC-017: User with "App Push Tag Manager" Role Can Manage Tags
| Item | Content |
|------|---------|
| **Test Case ID** | TC-017 |
| **Title** | Verify user with tag manager role can manage push tags |
| **Prerequisites** | User assigned "App Push Tag Manager" role; user is logged in to CMS |
| **Test Steps** | 1. Log in as user with "App Push Tag Manager" role; 2. Navigate to tag management page; 3. Try to create, edit, or delete tags |
| **Expected Result** | - User can access tag management functionality; - User can create, edit, and delete tags successfully; - Operations are properly audited |
| **Actual Result** | _________ |
| **Status** | ⬜ Not Tested |
| **Notes** | Verify tag manager role exists and works |
### TC-018: Push Record Access Control
| Item | Content |
|------|---------|
| **Test Case ID** | TC-018 |
| **Title** | Verify push record access control |
| **Prerequisites** | Multiple push records exist from different users; user is logged in to CMS |
| **Test Steps** | 1. Navigate to push list page; 2. Check displayed push records; 3. Check if access restrictions exist |
| **Expected Result** | - All users can view all push records (if public); - Or only push creator and admins can view specific push details |
| **Actual Result** | _________ |
| **Status** | ⬜ Not Tested |
| **Notes** | Based on design decision, define access strategy |
---
## Push Status and Tracking Test Cases
### TC-019: Push List Page Displays All Required Columns
| Item | Content |
|------|---------|
| **Test Case ID** | TC-019 |
| **Title** | Verify push list page displays all required columns |
| **Prerequisites** | Push list page has at least one push record |
| **Test Steps** | 1. Navigate to push list page; 2. Check displayed columns |
| **Expected Result** | List should include columns: - Article ID; - Push ID; - Title; - Push Status (Scheduled, Sent, Failed); - OneSignal Status; - Created At; - Sent At; - Push Creator Name; - Last Edited By; - Actions (Edit, Delete, Cancel, etc.) |
| **Actual Result** | _________ |
| **Status** | ⬜ Not Tested |
| **Notes** | Verify per STNMB-1139 requirements |
### TC-020: Push List Sorted by Sent Time Descending
| Item | Content |
|------|---------|
| **Test Case ID** | TC-020 |
| **Title** | Verify push list is sorted by "Sent At" time descending |
| **Prerequisites** | Push list has at least three push records |
| **Test Steps** | 1. Navigate to push list page; 2. Check sort order; 3. Verify most recent push appears at top |
| **Expected Result** | - Pushes sorted by "Sent At" descending (newest first); - Time format consistent and correct |
| **Actual Result** | _________ |
| **Status** | ⬜ Not Tested |
| **Notes** | Verify per STNMB-1138 requirements |
### TC-021: Push List Status Sort Support
| Item | Content |
|------|---------|
| **Test Case ID** | TC-021 |
| **Title** | Verify push list can be sorted by status |
| **Prerequisites** | Push list has pushes with different statuses (scheduled, sent, failed) |
| **Test Steps** | 1. Navigate to push list page; 2. Sort by "Status" column; 3. Check results |
| **Expected Result** | - Failed pushes appear first; - Followed by scheduled pushes; - Sent pushes last; - Secondary sort by time |
| **Actual Result** | _________ |
| **Status** | ⬜ Not Tested |
| **Notes** | Prioritize pushes needing attention |
### TC-022: Dual-Layer Push Status Tracking
| Item | Content |
|------|---------|
| **Test Case ID** | TC-022 |
| **Title** | Verify dual-layer push status tracking |
| **Prerequisites** | Push successfully sent from Drupal to OneSignal, and OneSignal delivered to user devices |
| **Test Steps** | 1. Navigate to push detail page; 2. Check "Drupal to OneSignal" status; 3. Check "OneSignal to End User" status |
| **Expected Result** | - "Drupal to OneSignal" shows Success or Failure; - "OneSignal to End User" shows Sent, Clicked, etc.; - Both statuses clearly displayed |
| **Actual Result** | _________ |
| **Status** | ⬜ Not Tested |
| **Notes** | Allow users to identify failure point |
### TC-023: Push Detailed Revision History
| Item | Content |
|------|---------|
| **Test Case ID** | TC-023 |
| **Title** | Verify push detailed revision history |
| **Prerequisites** | Push record edited at least once; user has permission to view history |
| **Test Steps** | 1. Navigate to push detail page; 2. Check "Revision History" section; 3. View all historical versions |
| **Expected Result** | - System displays all revision versions; - Each version includes: revision date, time, editor, content changes (diff); - Option to restore to historical version (optional) |
| **Actual Result** | _________ |
| **Status** | ⬜ Not Tested |
| **Notes** | Verify per STNMB-1147 requirements |
### TC-024: Push Detail Page Back Button Works Correctly
| Item | Content |
|------|---------|
| **Test Case ID** | TC-024 |
| **Title** | Verify push detail page back button functionality |
| **Prerequisites** | User accessed push detail page |
| **Test Steps** | 1. Navigate to push detail page; 2. Click "Back" button |
| **Expected Result** | - User returns to push list page; - Page state maintained (sorting, filtering); - No re-login required |
| **Actual Result** | _________ |
| **Status** | ⬜ Not Tested |
| **Notes** | Verify per STNMB-1115 requirements |
---
## Error Handling and Boundary Test Cases
### TC-025: OneSignal Connection Failure Error Handling
| Item | Content |
|------|---------|
| **Test Case ID** | TC-025 |
| **Title** | Verify error handling when OneSignal API connection fails |
| **Prerequisites** | OneSignal API temporarily unavailable or network disconnected; user attempts to send push |
| **Test Steps** | 1. Navigate to article detail page; 2. Click "Send OneSignal APP Push" button; 3. Fill push information; 4. Click "Send" (OneSignal unavailable); 5. Check error message |
| **Expected Result** | - Friendly error message: "Unable to connect to OneSignal service, please try again later"; - Push status set to "Failed"; - Audit log records failure reason; - User can retry |
| **Actual Result** | _________ |
| **Status** | ⬜ Not Tested |
| **Notes** | Need proper API error handling and retry mechanism |
### TC-026: OneSignal API Rate Limit Exceeded
| Item | Content |
|------|---------|
| **Test Case ID** | TC-026 |
| **Title** | Verify handling when API rate limit exceeded |
| **Prerequisites** | Multiple pushes sent in short time exceeding OneSignal rate limit; OneSignal returns 429 Too Many Requests |
| **Test Steps** | 1. Send multiple pushes rapidly (exceed rate limit); 2. Check system response |
| **Expected Result** | - User-friendly message: "Too many requests, please wait and retry"; - Pushes not sent; - User can retry after 5 minutes; - Audit log records limit event |
| **Actual Result** | _________ |
| **Status** | ⬜ Not Tested |
| **Notes** | Verify per OneSignal API documentation |
### TC-027: Invalid Push Request Parameters
| Item | Content |
|------|---------|
| **Test Case ID** | TC-027 |
| **Title** | Verify validation of invalid parameters |
| **Prerequisites** | User attempts to submit push with invalid data (bad image URL, empty title, etc.) |
| **Test Steps** | 1. Navigate to push configuration page; 2. Submit push with invalid image URL; 3. Check system response |
| **Expected Result** | - Client-side validation fails and shows error; - Clear message indicating which field is invalid; - Push not sent to OneSignal; - User can correct and retry |
| **Actual Result** | _________ |
| **Status** | ⬜ Not Tested |
| **Notes** | Verify completeness of data validation |
### TC-028: Article Deleted During Push Send
| Item | Content |
|------|---------|
| **Test Case ID** | TC-028 |
| **Title** | Verify push handling when article is deleted |
| **Prerequisites** | Push created and scheduled; article deleted before send time |
| **Test Steps** | 1. Create push and set scheduled time; 2. Delete article before send time; 3. Wait for scheduled time; 4. Check push status |
| **Expected Result** | - Push automatically cancelled or marked "Cancelled"; - System doesn't attempt to send deleted article push; - Audit log records cancellation reason; - User sees relevant notification |
| **Actual Result** | _________ |
| **Status** | ⬜ Not Tested |
| **Notes** | Prevent sending pushes to deleted articles |
### TC-029: Inaccessible Image Link
| Item | Content |
|------|---------|
| **Test Case ID** | TC-029 |
| **Title** | Verify handling of inaccessible image links |
| **Prerequisites** | User submits push with inaccessible image URL |
| **Test Steps** | 1. Navigate to push configuration page; 2. Enter invalid/inaccessible image URL; 3. Click "Send"; 4. Check response |
| **Expected Result** | - System validates image URL accessibility; - Shows error: "Cannot access image URL, please check link"; - Push not sent; - User can correct URL and retry; - OneSignal gracefully handles invalid URLs |
| **Actual Result** | _________ |
| **Status** | ⬜ Not Tested |
| **Notes** | Verify per STNMB-1148 requirements |
### TC-030: Image Size Not Compliant (640x640)
| Item | Content |
|------|---------|
| **Test Case ID** | TC-030 |
| **Title** | Verify push image size validation |
| **Prerequisites** | User uploads/uses non-compliant image (not 640x640) |
| **Test Steps** | 1. Navigate to push configuration page; 2. Upload 800x600 image; 3. Click "Send"; 4. Check response |
| **Expected Result** | - System alerts user of non-compliant size; - System auto-scales to 640x640 (recommended); - Or request compliant image from user; - Audit records image specs |
| **Actual Result** | _________ |
| **Status** | ⬜ Not Tested |
| **Notes** | Verify OneSignal recommended image specification |
### TC-031: Field Length Limit Validation
| Item | Content |
|------|---------|
| **Test Case ID** | TC-031 |
| **Title** | Verify field length limit validation for push |
| **Prerequisites** | User attempts to input text exceeding character limits |
| **Test Steps** | 1. Navigate to push configuration page; 2. Enter oversized title (e.g., 500 characters); 3. Try submit |
| **Expected Result** | - Client-side length limit enforced; - Real-time character counter (e.g., "50/50"); - Input truncated or disabled when exceeded; - Clear notification displayed |
| **Actual Result** | _________ |
| **Status** | ⬜ Not Tested |
| **Notes** | Verify per platform specification |
---
## Integration and Third-Party API Test Cases
### TC-032: Segment List Correctly Retrieved from OneSignal
| Item | Content |
|------|---------|
| **Test Case ID** | TC-032 |
| **Title** | Verify push segment list retrieved from OneSignal correctly |
| **Prerequisites** | At least one segment created in OneSignal; CMS-OneSignal API connection normal |
| **Test Steps** | 1. Navigate to push configuration page; 2. Check "Recipient" or "Segment" dropdown |
| **Expected Result** | - Dropdown displays all OneSignal segments; - List includes "All" option (default); - Segment names display correctly; - No duplicates |
| **Actual Result** | _________ |
| **Status** | ⬜ Not Tested |
| **Notes** | Verify OneSignal integration works |
### TC-033: Segment List Auto-Refreshes Daily
| Item | Content |
|------|---------|
| **Test Case ID** | TC-033 |
| **Title** | Verify segment list auto-refreshes daily |
| **Prerequisites** | System configured for daily auto-refresh; new segment added in OneSignal |
| **Test Steps** | 1. Note current segment list; 2. Wait 24 hours (or simulate); 3. Add new segment in OneSignal; 4. Wait for auto-refresh; 5. Check CMS segment list |
| **Expected Result** | - New segment appears in CMS after auto-refresh; - Deleted segments removed from list; - Users can manually refresh (optional); - Audit log records refresh events |
| **Actual Result** | _________ |
| **Status** | ⬜ Not Tested |
| **Notes** | Verify periodic sync mechanism |
### TC-034: Push Successfully Sent to OneSignal with Correct Data
| Item | Content |
|------|---------|
| **Test Case ID** | TC-034 |
| **Title** | Verify push data correctly sent to OneSignal API |
| **Prerequisites** | User configured and clicked send |
| **Test Steps** | 1. Navigate to push configuration; 2. Fill all required info; 3. Click "Send"; 4. Verify in OneSignal console |
| **Expected Result** | - OneSignal receives push request; - Push created and indexed in OneSignal; - Title, Message, Target fields match CMS; - CMS push ID matches OneSignal push ID |
| **Actual Result** | _________ |
| **Status** | ⬜ Not Tested |
| **Notes** | Verify data transmission integrity |
### TC-035: Tag "all" Added to All Pushes by Default
| Item | Content |
|------|---------|
| **Test Case ID** | TC-035 |
| **Title** | Verify tag "all" added to push by default |
| **Prerequisites** | User creates push selecting specific tags without selecting "all" |
| **Test Steps** | 1. Navigate to push configuration; 2. Select specific tag (e.g., "sports"); 3. Don't select "all"; 4. Send push; 5. Verify in OneSignal |
| **Expected Result** | - CMS automatically adds "all" tag to OneSignal push; - OneSignal push contains all selected tags plus "all"; - Audit log records default tag addition |
| **Actual Result** | _________ |
| **Status** | ⬜ Not Tested |
| **Notes** | Verify per STNMB-1131 requirements |
### TC-036: Tag "all" Cannot Be Manually Created
| Item | Content |
|------|---------|
| **Test Case ID** | TC-036 |
| **Title** | Verify tag "all" cannot be manually created in CMS |
| **Prerequisites** | User has tag management permission; attempting to create new tag |
| **Test Steps** | 1. Navigate to tag management; 2. Try creating tag named "all"; 3. Click "Save" |
| **Expected Result** | - Error message: "'all' is system reserved tag, cannot be manually created"; - Tag creation blocked; - Other tag creation normal |
| **Actual Result** | _________ |
| **Status** | ⬜ Not Tested |
| **Notes** | Verify per STNMB-1142 requirements |
### TC-037: Push Retry Mechanism - Drupal to OneSignal
| Item | Content |
|------|---------|
| **Test Case ID** | TC-037 |
| **Title** | Verify push retry mechanism on send failure |
| **Prerequisites** | OneSignal initially unavailable then recovers; retry configured |
| **Test Steps** | 1. Send push while OneSignal unavailable; 2. Wait for auto-retry; 3. Restore OneSignal; 4. Wait for retry completion |
| **Expected Result** | - Initial push status "Failed"; - System auto-retries (per configured interval); - After recovery, status changes to "Sent"; - Audit log records all retry attempts |
| **Actual Result** | _________ |
| **Status** | ⬜ Not Tested |
| **Notes** | Enhance system reliability |
---
## Article Status Related Test Cases
### TC-038: Draft Article Cannot Send Push
| Item | Content |
|------|---------|
| **Test Case ID** | TC-038 |
| **Title** | Verify draft article cannot send push |
| **Prerequisites** | Article status is "Draft"; user attempts to send push |
| **Test Steps** | 1. Navigate to draft article page; 2. Check for "Send OneSignal APP Push" button |
| **Expected Result** | - Button hidden or disabled; - Message shown: "Please publish article first before sending push"; - No URL bypass possible |
| **Actual Result** | _________ |
| **Status** | ⬜ Not Tested |
| **Notes** | Verify per STNMB-1151 requirements |
### TC-039: Under Review Article Cannot Send Push
| Item | Content |
|------|---------|
| **Test Case ID** | TC-039 |
| **Title** | Verify article under review cannot send push |
| **Prerequisites** | Article status is "Under Review"; user attempts to send push |
| **Test Steps** | 1. Navigate to under review article page; 2. Check for "Send OneSignal APP Push" button |
| **Expected Result** | - Button hidden or disabled; - Message shown: "Article is under review, please wait"; - Push cannot be sent |
| **Actual Result** | _________ |
| **Status** | ⬜ Not Tested |
| **Notes** | Verify per STNMB-1151 requirements |
### TC-040: Deleted Article Cannot Send Push
| Item | Content |
|------|---------|
| **Test Case ID** | TC-040 |
| **Title** | Verify deleted article cannot send push |
| **Prerequisites** | Article in trash/deleted status; user attempts access push feature |
| **Test Steps** | 1. Navigate to deleted article page; 2. Try access push functionality |
| **Expected Result** | - Cannot access deleted article push functionality; - System returns 404 or "Article not found"; - Any related scheduled push auto-cancelled |
| **Actual Result** | _________ |
| **Status** | ⬜ Not Tested |
| **Notes** | Verify per STNMB-1151 requirements |
### TC-041: Article Publish Time Advanced - Scheduled Push Impact
| Item | Content |
|------|---------|
| **Test Case ID** | TC-041 |
| **Title** | Verify scheduled push handling when article publish time changes |
| **Prerequisites** | Scheduled article with scheduled push; edit to advance publish time |
| **Test Steps** | 1. Scheduled article (3 hours); 2. Create scheduled push (2 hours); 3. Edit article to publish 1 hour earlier (now before push time); 4. Check notification |
| **Expected Result** | - Warning shown: "Article publish time changed, scheduled push doesn't align. Cancel or update push?"; - User can cancel or auto-adjust; - Push status updated per choice; - Audit log records change |
| **Actual Result** | _________ |
| **Status** | ⬜ Not Tested |
| **Notes** | Verify per STNMB-1143 requirements |
### TC-042: Article Status Changed to Under Review - Push Auto-Cancelled
| Item | Content |
|------|---------|
| **Test Case ID** | TC-042 |
| **Title** | Verify scheduled push cancelled when article status changes |
| **Prerequisites** | Published article with scheduled push; edit status to under review |
| **Test Steps** | 1. Published article with scheduled push; 2. Edit status to "Under Review"; 3. Check push status |
| **Expected Result** | - Warning shown: "Article status changed to 'Under Review', scheduled push auto-cancelled"; - Push auto-cancelled or marked "Cancelled"; - Sent push unaffected; - Audit log records operation |
| **Actual Result** | _________ |
| **Status** | ⬜ Not Tested |
| **Notes** | Verify per STNMB-1143 requirements |
### TC-043: Article Edit Lock Removed When Push Page Accessed
| Item | Content |
|------|---------|
| **Test Case ID** | TC-043 |
| **Title** | Verify article edit lock removed when accessing push config |
| **Prerequisites** | Article in edit lock state; user navigates to push config page |
| **Test Steps** | 1. Edit article (lock activated); 2. Navigate to push configuration; 3. Return to article edit page; 4. Check lock status |
| **Expected Result** | - Edit lock removed when entering push config; - Other users can now edit article; - Lock not re-activated on return; - Audit log records lock removal |
| **Actual Result** | _________ |
| **Status** | ⬜ Not Tested |
| **Notes** | Verify per STNMB-1123 requirements |
### TC-044: Article List - Push Button Position Correct
| Item | Content |
|------|---------|
| **Test Case ID** | TC-044 |
| **Title** | Verify article list push button position |
| **Prerequisites** | On article list page |
| **Test Steps** | 1. Navigate to article list page; 2. Check action buttons order; 3. Identify push button position |
| **Expected Result** | - "Send Push" button in position 4 (per STNMB-1146); - Consistent order across articles; - Text clearly visible |
| **Actual Result** | _________ |
| **Status** | ⬜ Not Tested |
| **Notes** | Verify per STNMB-1146 requirements |
### TC-045: Article List - Push Status Column Display
| Item | Content |
|------|---------|
| **Test Case ID** | TC-045 |
| **Title** | Verify article list push status column |
| **Prerequisites** | Article list has push status column |
| **Test Steps** | 1. Navigate to article list; 2. Check push status column; 3. Verify different article statuses |
| **Expected Result** | - "Push Status" column displays: "Ready to Push", "Already Pushed", "Push Scheduled"; - Status accurate; - Clickable to push list (optional) |
| **Actual Result** | _________ |
| **Status** | ⬜ Not Tested |
| **Notes** | Verify per CMS requirements |
---
## UI/UX and User Interaction Test Cases
### TC-046: Push Button Visible Only When Article Published
| Item | Content |
|------|---------|
| **Test Case ID** | TC-046 |
| **Title** | Verify push button visibility logic |
| **Prerequisites** | Have draft and published articles |
| **Test Steps** | 1. Navigate to draft article - check button; 2. Navigate to published article - check button |
| **Expected Result** | - Draft: button hidden/disabled with "Please publish first"; - Published: button visible and clickable |
| **Actual Result** | _________ |
| **Status** | ⬜ Not Tested |
| **Notes** | Verify button conditional visibility |
### TC-047: Push Configuration Form Client-Side Validation
| Item | Content |
|------|---------|
| **Test Case ID** | TC-047 |
| **Title** | Verify push configuration form validation |
| **Prerequisites** | User on push configuration page |
| **Test Steps** | 1. Navigate to push config; 2. Try submit empty form; 3. Check validation |
| **Expected Result** | - Required fields marked red with errors; - Clear error: "This field is required"; - "Send" button disabled without complete form; - Cannot submit incomplete form |
| **Actual Result** | _________ |
| **Status** | ⬜ Not Tested |
| **Notes** | Verify client-side form validation |
### TC-048: Push Preview Functionality
| Item | Content |
|------|---------|
| **Test Case ID** | TC-048 |
| **Title** | Verify push preview page functionality |
| **Prerequisites** | User filled push info; preview page exists |
| **Test Steps** | 1. Navigate to push config and fill info; 2. Click "Preview"; 3. Check preview; 4. Click "Back to Edit" |
| **Expected Result** | - Preview shows mobile device style; - Title, Message, image display correctly; - Can modify content (back to edit); - Settings preserved when returning (e.g., scheduled time) |
| **Actual Result** | _________ |
| **Status** | ⬜ Not Tested |
| **Notes** | Verify per STNMB-1129 requirements |
### TC-049: Article List Filter by Push Status
| Item | Content |
|------|---------|
| **Test Case ID** | TC-049 |
| **Title** | Verify article list filter by push status |
| **Prerequisites** | Article list has both pushed and unpushed articles |
| **Test Steps** | 1. Navigate to article list; 2. Use push status filter; 3. Select "Pushed"; 4. Check results |
| **Expected Result** | - Filter shows options: All, Pushed, Unpushed; - "Pushed" shows only pushed articles; - Results accurate; - Filter state persists on refresh |
| **Actual Result** | _________ |
| **Status** | ⬜ Not Tested |
| **Notes** | Verify per Phase 1.5 requirements |
### TC-050: Article List Back Button Functionality
| Item | Content |
|------|---------|
| **Test Case ID** | TC-050 |
| **Title** | Verify article list back button works correctly |
| **Prerequisites** | User navigated from push detail back to article list |
| **Test Steps** | 1. Enter article; 2. Click send push; 3. Return to article; 4. Click back button |
| **Expected Result** | - Back button returns to article list; - No re-login needed; - Article locks properly released |
| **Actual Result** | _________ |
| **Status** | ⬜ Not Tested |
| **Notes** | Verify per STNMB-1115 requirements |
### TC-051: Audit Log Access and Viewing
| Item | Content |
|------|---------|
| **Test Case ID** | TC-051 |
| **Title** | Verify audit log access and viewing |
| **Prerequisites** | Push operation audit records exist; user has audit log view permission |
| **Test Steps** | 1. Navigate to audit log page; 2. Check push logs; 3. Filter/search specific push |
| **Expected Result** | - Audit log shows all push operations; - Each record: action, actor, time, article/push ID, details; - Highly readable; - Time range filtering supported |
| **Actual Result** | _________ |
| **Status** | ⬜ Not Tested |
| **Notes** | Verify requirement #6 |
### TC-052: Push Image Upload Functionality
| Item | Content |
|------|---------|
| **Test Case ID** | TC-052 |
| **Title** | Verify push image upload functionality |
| **Prerequisites** | Push config page has image upload feature |
| **Test Steps** | 1. Navigate to push config; 2. Click image upload; 3. Select local image; 4. Wait upload; 5. Check result |
| **Expected Result** | - Supports common formats (JPG, PNG); - Progress bar shows (optional); - Preview after complete; - Valid URL generated or CDN link; - Image properly stored |
| **Actual Result** | _________ |
| **Status** | ⬜ Not Tested |
| **Notes** | Verify per STNMB-1148 requirements |
---
## Mobile App Integration Test Cases
### TC-053: Push Display and Interaction on Android
| Item | Content |
|------|---------|
| **Test Case ID** | TC-053 |
| **Title** | Verify push display and interaction on Android |
| **Prerequisites** | Sing Tao Daily APP installed on Android device; device logged in and bound; push sent from CMS |
| **Test Steps** | 1. Send test push from CMS; 2. Check notification center on Android; 3. Tap push notification |
| **Expected Result** | - Push displays in notification center; - Title and Message display correctly (per title rules); - Image displays if included; - Tap opens correct article/page; - No garbled text |
| **Actual Result** | _________ |
| **Status** | ⬜ Not Tested |
| **Notes** | Verify mobile app integration |
### TC-054: Push Display and Interaction on iOS
| Item | Content |
|------|---------|
| **Test Case ID** | TC-054 |
| **Title** | Verify push display and interaction on iOS |
| **Prerequisites** | Sing Tao Daily APP installed on iOS device; device logged in and bound; push sent from CMS |
| **Test Steps** | 1. Send test push from CMS; 2. Check notification center on iOS; 3. Tap push notification |
| **Expected Result** | - Push displays in notification center; - Title and Message display correctly (per title rules); - Image displays if included; - Tap opens correct article/page; - No garbled text |
| **Actual Result** | _________ |
| **Status** | ⬜ Not Tested |
| **Notes** | Verify mobile app integration |
### TC-055: Push Type Redirect Verification
| Item | Content |
|------|---------|
| **Test Case ID** | TC-055 |
| **Title** | Verify different push types redirect correctly |
| **Prerequisites** | Three push types sent: app article, inapp, outapp |
| **Test Steps** | 1. Send app article push (singtaodaily://news?newsId=3413550); 2. Tap and verify; 3. Repeat for inapp and outapp |
| **Expected Result** | - **app article**: APP opens article; - **inapp**: APP opens in-app webview; - **outapp**: System browser opens URL; - All redirects correct |
| **Actual Result** | _________ |
| **Status** | ⬜ Not Tested |
| **Notes** | Verify multiple push type support |
### TC-056: Mobile App Cache Clear Push Sync
| Item | Content |
|------|---------|
| **Test Case ID** | TC-056 |
| **Title** | Verify push data sync after app cache clear |
| **Prerequisites** | Push received and stored; app cache clear enabled |
| **Test Steps** | 1. Send push and device receives; 2. Clear APP cache in device settings; 3. Reopen APP; 4. Check push |
| **Expected Result** | - Push data correctly restored after cache clear; - Push records not lost; - Read status preserved |
| **Actual Result** | _________ |
| **Status** | ⬜ Not Tested |
| **Notes** | Verify data persistence |
---
## Test Summary
This test case collection covers comprehensive testing for STNMB-986 OneSignal push notification feature in Drupal CMS. A total of 56 test cases organized into the following categories:
| Category | Count | Main Coverage |
|----------|-------|-------------|
| **Title Handling Logic** | 7 | Title splitting rules, edge cases |
| **Push Functionality** | 7 | Real-time, scheduled, multiple, edit, cancel |
| **Permission Control** | 4 | Role permissions, access control, isolation |
| **Push Status** | 6 | List display, sorting, tracking, history |
| **Error Handling** | 7 | API failure, rate limits, parameter validation |
| **Integration Testing** | 6 | OneSignal API, Segment sync, tag management |
| **Article Status** | 8 | Status restrictions, auto-cancel, lock management |
| **UI/UX** | 7 | Button visibility, form validation, filtering |
| **Mobile App** | 7 | Push display, type redirects, cache sync |
Recommended test execution priority:
1. **High Priority** (must test): TC-001 to TC-006, TC-008, TC-009, TC-015, TC-016, TC-025 to TC-028, TC-038 to TC-041
2. **Medium Priority** (important): Other functional test cases
3. **Low Priority** (supplementary): Edge cases and non-critical features
---
## Appendix: Pre-Test Environment Checklist
Before starting testing, ensure the following environment and configuration items are completed:
| Checklist Item | Status | Notes |
|---|---|---|
| UAT Drupal CMS deployed | ⬜ | URL: https://uat-cms.stheadline.com |
| OneSignal module installed | ⬜ | Module version: ________ |
| OneSignal API keys configured | ⬜ | Check Admin > Configuration > OneSignal Settings |
| Test user accounts created | ⬜ | Minimum 2 users (with/without push permission) |
| Test devices prepared | ⬜ | At least 1 Android + 1 iOS |
| Sing Tao Daily APP installed | ⬜ | App version: ________ |
| Test data prepared | ⬜ | Minimum 5 articles with different title types |
| Network connection verified | ⬜ | CMS ↔ OneSignal connectivity verified |
| UAT push list URL accessible | ⬜ | https://uat-cms.stheadline.com/admin/reports/push |
| OneSignal management URL accessible | ⬜ | https://uat-cms.stheadline.com/zh-hant/admin/onesignal-push |

















