Skip to content

Commit 77f4855

Browse files
thephezclaude
andauthored
test(wasm-sdk): add ui tests for almost all state transitions (#2739)
Co-authored-by: Claude <noreply@anthropic.com>
1 parent 82c65ca commit 77f4855

File tree

13 files changed

+2201
-19
lines changed

13 files changed

+2201
-19
lines changed

packages/wasm-sdk/.gitignore

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,6 @@
11
playwright-report/
22
test-results/
33
test/test-report.html
4+
5+
# Environment variables with sensitive test data
6+
test/ui-automation/.env

packages/wasm-sdk/api-definitions.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2079,7 +2079,7 @@
20792079
"required": true
20802080
},
20812081
{
2082-
"name": "identityId",
2082+
"name": "frozenIdentityId",
20832083
"type": "text",
20842084
"label": "Identity ID whose frozen tokens to destroy",
20852085
"required": true

packages/wasm-sdk/index.html

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3248,7 +3248,7 @@ <h2>Results</h2>
32483248
result = await sdk.tokenDestroyFrozen(
32493249
values.contractId,
32503250
Number(values.tokenPosition),
3251-
values.identityId, // identity whose frozen tokens to destroy
3251+
values.frozenIdentityId, // identity whose frozen tokens to destroy
32523252
identityId, // destroyer ID
32533253
privateKey,
32543254
values.publicNote || null
@@ -3343,7 +3343,7 @@ <h2>Results</h2>
33433343
values.documentType,
33443344
values.documentId,
33453345
identityId,
3346-
values.price || 0, // price in credits, 0 to remove price
3346+
BigInt(values.price || 0), // price in credits, 0 to remove price
33473347
privateKey,
33483348
0 // key_id - using 0 as default
33493349
);
@@ -3477,7 +3477,7 @@ <h2>Results</h2>
34773477
values.documentType,
34783478
values.documentId,
34793479
identityId,
3480-
values.price,
3480+
BigInt(values.price),
34813481
privateKey,
34823482
0 // key_id - using 0 as default
34833483
);
Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
# Test Credentials for WASM SDK UI Tests
2+
# Copy this file to .env and fill with real values
3+
4+
# Private keys for state transitions (DON'T STORE in production)
5+
TEST_PRIVATE_KEY_IDENTITY_1=YOUR_IDENTITY_PRIVATE_KEY_HERE
6+
TEST_PRIVATE_KEY_TRANSFER=YOUR_TRANSFER_PRIVATE_KEY_HERE
7+
TEST_PRIVATE_KEY_CONTRACT=YOUR_CONTRACT_PRIVATE_KEY_HERE
8+
# Secondary private key (used by some document/token transitions)
9+
TEST_PRIVATE_KEY_SECONDARY=YOUR_TEST_PRIVATE_KEY_SECONDARY
10+
11+
# Seed phrases for identity creation (not implemented yet)
12+
TEST_SEED_PHRASE_1="your seed phrase here"

0 commit comments

Comments
 (0)