Add gateway client integration, smoke, and E2E tests #10
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Problem
The gateway client integration has zero test coverage. The 33 existing unit tests only cover signing, shared types, and backend validation — none of the
GatewayClientmethods (account ops, token transfers, marketplace listings) are tested.Solution — Three Test Layers
Layer 1: Integration Tests (wiremock)
New
crates/gateway-tests/crate with 23 tests using wiremock to mock the gateway's JSON-RPC/rpcendpoint:Runs with
make test-gatewayorcargo test -p gateway-tests. No network needed.Layer 2: Gateway Smoke Tests (bash/curl)
scripts/gateway-smoke-test.sh— follows existingsmoke-test.shpattern:Runs with
make gateway-smoke-test. Requires network access to gateway.Layer 3: E2E Browser Tests (Playwright)
e2e/directory with Playwright setup:TEST_MNEMONICenv var)Runs with
make test-e2e. Requiresdx serverunning on :8080.Mnemonic is provided via
TEST_MNEMONICenv var — never hardcoded. For CI, use a repo secret.New Makefile Targets
test-gateway— wiremock integration testsgateway-smoke-test— real gateway smoke testse2e-install— install Playwright + Chromiumtest-e2e— run E2E browser teststest-allupdated to includetest-gateway