- 删除 VerificationCodeParser 及相关测试,短信捕获和推送不再解析验证码 - 飞书推送改为只发送短信原文,时间戳格式化为可读日期 - 移除主界面"只推送验证码"开关和"调试时上传完整短信正文"选项 - 移除"保存轮询间隔"按钮,开启轮询时自动保存间隔(未输入默认1秒) - 按钮文字从"开始1秒轮询验证码"改为"开始短信轮询" - 删除"打印最近30条短信"功能及相关 SmsInboxReader.logRecentMessages - SmsInboxReader 用 RecentSmsResult 替换 RecentCodeResult - FeishuWebhookConfigStore.Config 移除 filterVerificationCode/sendFullBodyDebug - 修复代码缩进不一致问题
46 lines
2.7 KiB
Markdown
46 lines
2.7 KiB
Markdown
## ADDED Requirements
|
|
|
|
### Requirement: Validate on the target Xiaomi Android 15 device
|
|
The app SHALL be validated on the user's Xiaomi 12S running HyperOS 3 and Android 15 before the SMS capture behavior is considered complete.
|
|
|
|
#### Scenario: Foreground validation
|
|
- **WHEN** the app is open in the foreground and a test SMS containing `这是一条短信原文样本` is received
|
|
- **THEN** the app MUST show that SMS body as the latest received SMS content
|
|
|
|
#### Scenario: Background validation
|
|
- **WHEN** the app has been moved to the background and a test SMS containing new SMS content is received
|
|
- **THEN** the app MUST either show that new SMS body after returning to the app or report that background delivery was blocked
|
|
|
|
#### Scenario: Lock screen validation
|
|
- **WHEN** the device is locked and a test SMS is received
|
|
- **THEN** the app MUST show the received result after unlock or report that delivery was blocked under lock screen conditions
|
|
|
|
### Requirement: Validate SMS body handling with representative samples
|
|
The SMS body handling logic SHALL be validated with representative SMS examples and failure examples.
|
|
|
|
#### Scenario: Common valid samples
|
|
- **WHEN** tests include Chinese notices, English notification-like messages, multi-part messages, and regular promotional text
|
|
- **THEN** all expected SMS bodies MUST be preserved with the correct original content
|
|
|
|
#### Scenario: Failure samples
|
|
- **WHEN** tests include empty bodies, unreadable message input, or missing permission states
|
|
- **THEN** the app MUST return a structured failure instead of a fabricated SMS result
|
|
|
|
### Requirement: Validate optional API assumptions separately
|
|
The app SHALL validate Google SMS APIs independently from the primary system broadcast path.
|
|
|
|
#### Scenario: Google Play services is available
|
|
- **WHEN** Google Play services is installed and supports SMS User Consent or SMS Retriever
|
|
- **THEN** the app MUST run an explicit optional-path test and record the result separately from system broadcast validation
|
|
|
|
#### Scenario: Google Play services is unavailable
|
|
- **WHEN** Google Play services is unavailable or incompatible on the target phone
|
|
- **THEN** the app MUST mark Google SMS API validation as skipped or unavailable without failing the primary SMS broadcast validation
|
|
|
|
### Requirement: Validate implementation without rebuilding development environment
|
|
The app SHALL reuse the existing local Android build environment reference and MUST NOT require reinstalling Android Studio, Gradle, or JDK as part of the implementation validation.
|
|
|
|
#### Scenario: Build configuration is prepared
|
|
- **WHEN** implementation begins after spec approval
|
|
- **THEN** the project MUST align its build setup with the existing Weather project environment or document any minimal project-specific difference
|