test: add Trezor emulator tests#564
Open
ovitrif wants to merge 4 commits into
Open
Conversation
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 2e3c9a13cf
ℹ️ 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".
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
Note
AI Dev Tests
This class of tests are intended to aid in development using AI agents, they should stay free of requirements to run them during QA gating. There shouldn't be any constraint wrt. time it takes to run these tests if ran together. Personally, I would be in favour of them covering all possible user-facing functionalities of the app in time.
This PR:
TEST_TREZOR_EMU=1dashboard launch path for device automation.ai-device-testsworkflow that runs only onworkflow_dispatchagainstbitkit-dockermain.The test workflow uses a dedicated
BitkitAITestsscheme so the AI/device lane builds the app and UI-test bundle without pulling unrelated unit-test targets into the run.Context: current iOS releases do not expose WebUSB-style access for devices like Trezor in Safari/WebKit, and Trezor's current connected-device path on iOS is Bluetooth for models that support it. The emulator suite keeps using Bridge because that is the transport currently exposed by Trezor User Env; if User Env later exposes a BLE peripheral compatible with CoreBluetooth, this suite should move to that transport while preserving the same dashboard coverage.
Verification Status
The Trezor emulator UI suite has been run successfully locally against the
bitkit-dockercompose stack, using the compose-owned Trezor User Env service and local Regtest Electrum. The fullBitkitUITests/TrezorBridgeDashboardUITestsclass passed with3 passed, 0 failed, 0 skippedinTestResults/TrezorBridgeDashboardUITests-full1.xcresult.After the run, Bridge enumeration returned the emulator with
session: null, confirming the test teardown released the Bridge session.Linked Issues/Tasks
ovi/trezor-bridge-transportScreenshot / Video
N/A
QA Notes
Manual Tests
bitkit-dockermain →docker compose up -d→./scripts/trezor-emulator start→ run the documented localxcodebuild testcommand: Trezor dashboard emulator scenarios pass on Regtest.regression:normal app launch withoutTEST_TREZOR_EMU=1: the app follows the existing splash/onboarding/wallet routing and does not deep-link into the Trezor dashboard.Automated Checks
git diff --checkswiftformaton touched Swift filesTEST_TREZOR_EMU=1is absent.bitkit-dockerTrezor service and local Regtest Electrum:3 passed, 0 failed, 0 skipped.curl -fsS -X POST http://127.0.0.1:21325/enumerateafter the suite showed the emulator withsession: null, confirming teardown released the Bridge session.ai-device-tests.ymlworkflow visibility and behavior must be verified (after merge) from the Actions tab because new workflow files are only dispatchable once present on the default branch.