feat: expo-example automation test framework#694
Conversation
✅ Snyk checks have passed. No issues have been found so far.
💻 Catch issues earlier using the plugins for VS Code, JetBrains IDEs, Visual Studio, and Eclipse. |
|
Warning Review the following alerts detected in dependencies. According to your organization's Security Policy, it is recommended to resolve "Warn" alerts. Learn more about Socket for GitHub.
|
…ified test runner Refactor automation test from flat mnemonic groups to Jira-based scenario catalog (OK-26053/26054/5504/40090) with BIP39 and SLIP39 create/import coverage. - Add PhonePilot MCP client with arm control, OCR, sequence execution - Add scenarioCatalog and scenarioResolver for test case resolution - Support passphrase variants (normal/empty/passphrase_1/passphrase_2) - Add test suites: deviceFlow, sdkAddressBatch, sdkPubkeyBatch - Rebuild AutomationTestScreen with connection, config, progress, and report panels - Update SLIP39 test data with unified id format and passphrase support - Add count12_three address/pubkey test data with passphrase variants Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
…ssphrase suites Replace 882-line AutomationTestScreen monolith with 20 focused components in a two-column layout (live output panel + config sidebar). Add two new test suite types: passphraseWalletSwitch (create N wallets, cycle switch, verify address consistency) and specialPassphrase (9 edge-case passphrases × 3 methods). Harden PhonePilotClient with fetch timeouts, scoped event listeners, concurrent-run guard, and bounded log buffer. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
The previous two-column layout (StickyHeaderBar + LiveOutputPanel + ConfigSidebar) was inconsistent with other pages and caused poor space distribution. Switch to standard scrollable PageView with PanelView cards matching the app's existing design pattern. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
…reviations 1. Fix PageView > DeviceProvider > HardwareInputPinDialogProvider nesting order to match all other screens (was reversed before). 2. Add [MISMATCH] logging with expected/actual values at all 6 address comparison points so failures are clearly visible in the run log. 3. Replace abbreviations: PP Switch → Passphrase Switch, Special PP → Special Passphrase, ppSwitchResult → passphraseWalletSwitchResult, SPECIAL_PP_METHOD_PATHS → SPECIAL_PASSPHRASE_METHOD_PATHS. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Remove the passphraseWalletSwitch suite entirely as it does not correspond to any existing test case or Jira ticket. Cleaned up from types, scenarioCatalog, useAutomationTest, and ScenarioSelector. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Resolved 6 conflicts favoring the onekey (main) branch: - InitDurationTest: keep sdk.testInitializeDeviceDuration() call - LockDeviceTest: keep params?.path direct access - external-modules.d.ts: keep simplified module declarations - nostrGetPublicKey/polkadotGetPublicKey: keep path: string | string[] type - ExportDeviceInfo: keep one-line getFieldValue expression Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
- Redesign UI: two-column layout (config left, report+logs right), card-style checkboxes, collapsible scenario groups, tab-based report/logs toggle - Add real-time per-case live report via liveReportAtom + effectiveReportAtom - Fix passphrase bug: add ensurePassphraseState helper that toggles device passphrase_protection and obtains passphraseState before SDK calls, matching the pattern from SLIP39AddressValidation.tsx Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
…lector Add three device preparation modes (full/skipReset/sdkOnly) to give users finer control over which steps to run during automation testing. The sdkOnly mode skips PhonePilot entirely and runs SDK tests directly. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
skipReset only skips the factory-reset step. The wallet creation/import via executeScenarioPreparation must still run, otherwise the device stays uninitialized and SDK tests fail with Failure_NotInitialized. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
…ouble-buildSteps bug - Redesign AutomationTest UI: balanced panel heights, hover styles, progress layout - Add DevicePreparationMode 'deviceFlowOnly': runs reset+import/create only, skips all SDK suites - Fix executeSequence.ts double buildSteps() call causing SLIP39 random share inconsistency - Add DeviceCompatibility integration stub for Pro (dnxGetAddress) - Fix canStartAutomationAtom to allow start when deviceFlowOnly with no testSuites selected - Various UI component improvements: ReportTree filter, LogsSection, PassphraseSelector Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Use atomWithStorage from jotai/utils so the test configuration (scenarios, suites, passphrases, URL, mode, etc.) survives page refreshes. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
…ized) - executeResetPreparation now takes device features instead of scenarioIndex - Uses features.unlocked to pick reset-wallet-locked vs reset-wallet-unlocked - Uses features.initialized to auto-detect factory-reset state and skip reset (replaces scenarioIndex===0 heuristic and supplements user skipReset config) - Logs device state (initialized/unlocked) before each scenario for debugging Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
index.tsx: change XStack alignItems to stretch so both columns have equal
card border height; use fixed height={680} on both ScrollViews instead of
maxHeight="80vh" for consistent sizing.
LogsSection.tsx: replace minHeight/maxHeight with height={650} so the log
TextArea fills the parent 680px scroll container instead of stopping at 400px.
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
… theme override
Tamagui Button has a built-in theme hover that changes the background
color. Setting hoverStyle={} or omitting backgroundColor lets the theme
win and produces wrong hover visuals. Fix: always include backgroundColor
matching the button's current state in both hoverStyle and pressStyle.
- index.tsx: 开始 (green9/gray5) and 停止 (red9/gray5) buttons
- ConnectionConfig.tsx: 连接/断开 button (blue9/red9)
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
…ash, fix button hover - types.ts: remove 'skipReset' DevicePreparationMode — reset strategy is now auto-detected via getFeatures().initialized; update 'full' description - useAutomationTest.ts: replace deviceFeatures! non-null assertion with an explicit guard that throws a clear error when fetchDeviceFeatures returns undefined; remove now-dead skipReset branch from shouldSkipReset condition - index.tsx + ConnectionConfig.tsx: include backgroundColor in hoverStyle and pressStyle to prevent Tamagui theme from overriding custom colors on hover/press (fixes flat gray appearance on hover) Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Integrates the existing BlindSignatureChainCheck test into the automation
test runner as a new TestSuiteType 'securityCheck'.
- types.ts: add 'securityCheck' to TestSuiteType and TEST_SUITE_INFO
- scenarioCatalog.ts: append 'securityCheck' to all four suite arrays
(BIP39 create/import, SLIP39 create/import) — test only needs any
valid wallet, not a specific mnemonic
- useAutomationTest.ts:
- import convertTestData/getDeviceExpected/securityCheckData
- add runSecurityCheckSuite callback: disables passphrase_protection,
sets safetyChecks=0 (strict), runs all 28-method × 2-coinType cases,
45s timeout per call, device-compat overrides via compatibilityManager
- wire into runSelectedSdkSuites after specialPassphrase
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
- Add chainMethodBatch TestSuiteType with 5-chain × method × presuppose coverage - Add bip39_import_12_api scenario (API mnemonic, api-normal-12 sequence) - Implement runChainMethodBatchSuite in useAutomationTest - Wire chainMethodBatch into runSelectedSdkSuites after securityCheck - Add securityCheck + chainMethodBatch to SUITE_EXECUTION_ORDER so buildSelectedSuites includes them - Update countScenarioTotalTests and getSuiteName for new suite types Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
…tion Update suite types, scenario matrix, DevicePreparationMode, and data resolution strategy to match current codebase state. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
…operands, no-loop-func)
…sted-ternary)
- Fix prettier formatting in automationAtoms, Page, phonePilotMcp, AutomationTest components
- Fix double quotes → single quotes in slip39Test data files
- Fix no-restricted-exports: replace `export { default }` with `import/export default` in count12_three files
- Fix no-nested-ternary in ReportCaseRow
- Fix AlephiumSignTransaction import format
- Fix webusb/errors/DeviceConnector logging to properly display DOMException
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
…devices Add per-platform connectId format reference: - WebUSB/Bridge: device serial (e.g. PRC10J0017A) - Android BLE: MAC address - iOS BLE: CoreBluetooth UUID - Desktop BLE macOS (Noble): 32-char hex UUID - Desktop BLE Windows (Noble): 12-char lowercase hex MAC without colons - Desktop BLE Linux (Noble): MAC address Add warning that USB and BLE connectIds for the same device are different values and must be stored separately when both transports are supported. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
- Revert AlephiumSignTransaction.ts to original (no unintended change) - Revert noble-ble-handler.ts to original (belongs in a separate PR) - Revert DeviceConnector.ts to original (belongs in a separate PR) - Fix slip39Utils.ts import/order warning (remove empty line within import group) Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
…ethodBatch suites - Add slideConfirm() to PhonePilotClient for left-to-right swipe gesture - Add confirmCount/noSlide metadata to security check test data (34 methods calibrated) - Fix expected values: confluxSignMessage 503→false, revert conflux/xrp tx to true - Add alephiumSignMessage noSlide: true (missed in initial pass) - Add ChainMethodEntry type with confirmCount/noSlide for chain method data - Update btc/eth/ada/sol/dot data files with signing confirmation metadata - setupUIListener now accepts optional buttonOverride for per-suite button handling - runSecurityCheckSuite: safetyChecks disable→slide, per-case [confirm×N + slide/noSlide] - runChainMethodBatchSuite: same mechanism, driven by ChainMethodEntry metadata - Restrict securityCheck/chainMethodBatch to bip39_import_12_api scenario only - Remove securityCheck from BIP39/SLIP39 create/import suite lists Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Replace all registry.npmjs.org URLs back to registry.yarnpkg.com Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
|
@codex review |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: ea480fc65e
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
Summary
核心功能
自动化测试框架(expo-example)
AutomationTest页面,支持设备流程测试(BIP39/SLIP39 钱包创建与导入)和 SDK 批量地址/公钥验证scenarioCatalog+scenarioResolver:基于 Jira 场景目录(OK-26053/26054/5504/40090)的测试用例解析PhonePilot MCP client:手机物理操控客户端,支持机械臂控制、OCR 识别、操作序列执行测试套件
deviceFlow:设备重置 + BIP39/SLIP39 钱包创建/导入全流程,支持 normal/passphrase_empty/passphrase_1/passphrase_2 变体sdkAddressBatch:SDK 地址批量验证(含 count12_three 新增用例)sdkPubkeyBatch:SDK 公钥批量验证securityCheck:盲签名安全检查chainMethodBatch:链方法批量测试,含 bip39_import_12_api 场景测试数据
polkadotGetAddressmock:改用手动 ledger 派生,正确支持 passphraseUI
getFeatures自动检测重置策略,移除手动 skipReset 模式日志优化
webusb.ts:WebUSB DOMException 非枚举属性序列化为 {} 的问题,改为 name: message 格式errors.ts:safeThrowError对未知错误不再把整个对象当 errorCode 传入文档
automation-test-design.md:重写,反映当前实现架构core-api-guide.md/search-devices.mdx:补充 connectId 格式说明(WebUSB vs BLE)Test plan
🤖 Generated with Claude Code