Skip to content

Commit ab80785

Browse files
authored
test(sdk): expand wasm-sdk page UI testing (#2720)
1 parent be080b5 commit ab80785

File tree

7 files changed

+997
-56
lines changed

7 files changed

+997
-56
lines changed

packages/wasm-sdk/.gitignore

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
playwright-report/
2+
test-results/

packages/wasm-sdk/index.html

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1994,6 +1994,7 @@ <h2>Results</h2>
19941994
{ name: "dataContractId", type: "text", label: "Data Contract ID", required: true },
19951995
{ name: "documentTypeName", type: "text", label: "Document Type Name", required: true },
19961996
{ name: "indexName", type: "text", label: "Index Name", required: true },
1997+
{ name: "indexValues", type: "array", label: "Index Values", required: true },
19971998
{ name: "resultType", type: "select", label: "Result Type", required: true,
19981999
options: [
19992000
{ value: "contenders", label: "Contenders" },
@@ -2014,6 +2015,7 @@ <h2>Results</h2>
20142015
{ name: "dataContractId", type: "text", label: "Data Contract ID", required: true },
20152016
{ name: "documentTypeName", type: "text", label: "Document Type Name", required: true },
20162017
{ name: "indexName", type: "text", label: "Index Name", required: true },
2018+
{ name: "indexValues", type: "array", label: "Index Values", required: true },
20172019
{ name: "contestantId", type: "text", label: "Contestant ID", required: true },
20182020
{ name: "startAtIdentifierInfo", type: "json", label: "Start At Identifier Info (JSON)", required: false },
20192021
{ name: "count", type: "number", label: "Count", required: false },
@@ -4400,6 +4402,7 @@ <h2>Results</h2>
44004402
values.dataContractId,
44014403
values.documentTypeName,
44024404
values.indexName,
4405+
values.indexValues,
44034406
values.resultType,
44044407
values.allowIncludeLockedAndAbstainingVoteTally,
44054408
values.startAtIdentifierInfo ? JSON.stringify(values.startAtIdentifierInfo) : undefined,
@@ -4412,6 +4415,7 @@ <h2>Results</h2>
44124415
values.dataContractId,
44134416
values.documentTypeName,
44144417
values.indexName,
4418+
values.indexValues,
44154419
values.resultType,
44164420
values.allowIncludeLockedAndAbstainingVoteTally,
44174421
values.startAtIdentifierInfo ? JSON.stringify(values.startAtIdentifierInfo) : undefined,
@@ -4427,6 +4431,7 @@ <h2>Results</h2>
44274431
values.dataContractId,
44284432
values.documentTypeName,
44294433
values.indexName,
4434+
values.indexValues,
44304435
values.contestantId,
44314436
values.startAtIdentifierInfo ? JSON.stringify(values.startAtIdentifierInfo) : undefined,
44324437
values.count,
@@ -4438,6 +4443,7 @@ <h2>Results</h2>
44384443
values.dataContractId,
44394444
values.documentTypeName,
44404445
values.indexName,
4446+
values.indexValues,
44414447
values.contestantId,
44424448
values.startAtIdentifierInfo ? JSON.stringify(values.startAtIdentifierInfo) : undefined,
44434449
values.count,

packages/wasm-sdk/test/ui-automation/fixtures/test-data.js

Lines changed: 208 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -247,12 +247,28 @@ const testData = {
247247
},
248248
getTotalCreditsInPlatform: {
249249
testnet: [{}]
250+
},
251+
getCurrentQuorumsInfo: {
252+
testnet: [{}] // No parameters needed
253+
},
254+
getPrefundedSpecializedBalance: {
255+
testnet: [
256+
{ identityId: "AzaU7zqCT7X1kxh8yWxkT9PxAgNqWDu4Gz13emwcRyAT" }
257+
]
250258
}
251259
},
252260

253261
protocol: {
254262
getProtocolVersionUpgradeState: {
255-
testnet: [{}]
263+
testnet: [{}] // No parameters needed
264+
},
265+
getProtocolVersionUpgradeVoteStatus: {
266+
testnet: [
267+
{
268+
startProTxHash: "143dcd6a6b7684fde01e88a10e5d65de9a29244c5ecd586d14a342657025f113",
269+
count: 100
270+
}
271+
]
256272
}
257273
},
258274

@@ -263,26 +279,214 @@ const testData = {
263279
getEpochsInfo: {
264280
testnet: [
265281
{
266-
epoch: 1000,
267-
count: 5,
282+
startEpoch: 1000,
283+
count: 100,
284+
ascending: true
285+
}
286+
]
287+
},
288+
getFinalizedEpochInfos: {
289+
testnet: [
290+
{
291+
startEpoch: 8635,
292+
count: 100,
268293
ascending: true
269294
}
270295
]
271296
},
272297
getEvonodesProposedEpochBlocksByIds: {
273298
testnet: [
274299
{
300+
epoch: 8635,
275301
ids: ["143dcd6a6b7684fde01e88a10e5d65de9a29244c5ecd586d14a342657025f113"]
276302
}
277303
]
304+
},
305+
getEvonodesProposedEpochBlocksByRange: {
306+
testnet: [
307+
{
308+
epoch: 8635,
309+
limit: 10,
310+
startAfter: "143dcd6a6b7684fde01e88a10e5d65de9a29244c5ecd586d14a342657025f113",
311+
orderAscending: true
312+
}
313+
]
314+
}
315+
},
316+
317+
dpns: {
318+
getDpnsUsername: {
319+
testnet: [
320+
{
321+
identityId: "5DbLwAxGBzUzo81VewMUwn4b5P4bpv9FNFybi25XB5Bk",
322+
limit: 10
323+
}
324+
]
325+
},
326+
dpnsCheckAvailability: {
327+
testnet: [
328+
{ label: "alice" },
329+
{ label: "test-username" },
330+
{ label: "available-name" }
331+
]
332+
},
333+
dpnsResolve: {
334+
testnet: [
335+
{ name: "therea1s11mshaddy5" },
336+
{ name: "alice.dash" },
337+
{ name: "test-name" }
338+
]
339+
},
340+
dpnsSearch: {
341+
testnet: [
342+
{
343+
prefix: "the",
344+
limit: 10
345+
},
346+
{
347+
prefix: "test",
348+
limit: 5
349+
}
350+
]
278351
}
279352
},
280353

281354
token: {
282355
getTokenStatuses: {
283356
testnet: [
284357
{
285-
tokenIds: ["Hqyu8WcRwXCTwbNxdga4CN5gsVEGc67wng4TFzceyLUv"]
358+
tokenIds: ["Hqyu8WcRwXCTwbNxdga4CN5gsVEGc67wng4TFzceyLUv", "H7FRpZJqZK933r9CzZMsCuf1BM34NT5P2wSJyjDkprqy"]
359+
}
360+
]
361+
},
362+
getTokenDirectPurchasePrices: {
363+
testnet: [
364+
{
365+
tokenIds: ["H7FRpZJqZK933r9CzZMsCuf1BM34NT5P2wSJyjDkprqy"]
366+
}
367+
]
368+
},
369+
getTokenContractInfo: {
370+
testnet: [
371+
{
372+
dataContractId: "H7FRpZJqZK933r9CzZMsCuf1BM34NT5P2wSJyjDkprqy"
373+
}
374+
]
375+
},
376+
getTokenPerpetualDistributionLastClaim: {
377+
testnet: [
378+
{
379+
identityId: "5DbLwAxGBzUzo81VewMUwn4b5P4bpv9FNFybi25XB5Bk",
380+
tokenId: "Hqyu8WcRwXCTwbNxdga4CN5gsVEGc67wng4TFzceyLUv"
381+
}
382+
]
383+
},
384+
getTokenTotalSupply: {
385+
testnet: [
386+
{
387+
tokenId: "Hqyu8WcRwXCTwbNxdga4CN5gsVEGc67wng4TFzceyLUv"
388+
}
389+
]
390+
}
391+
},
392+
393+
voting: {
394+
getContestedResources: {
395+
testnet: [
396+
{
397+
documentTypeName: "domain",
398+
dataContractId: "GWRSAVFMjXx8HpQFaNJMqBV7MBgMK4br5UESsB4S31Ec",
399+
indexName: "parentNameAndLabel",
400+
resultType: "documents",
401+
allowIncludeLockedAndAbstainingVoteTally: false,
402+
limit: 10,
403+
offset: 0,
404+
orderAscending: true
405+
}
406+
]
407+
},
408+
getContestedResourceVoteState: {
409+
testnet: [
410+
{
411+
dataContractId: "GWRSAVFMjXx8HpQFaNJMqBV7MBgMK4br5UESsB4S31Ec",
412+
documentTypeName: "domain",
413+
indexName: "parentNameAndLabel",
414+
indexValues: ["dash", "alice"],
415+
resultType: "contenders",
416+
allowIncludeLockedAndAbstainingVoteTally: false,
417+
count: 10,
418+
orderAscending: true
419+
}
420+
]
421+
},
422+
getContestedResourceVotersForIdentity: {
423+
testnet: [
424+
{
425+
dataContractId: "GWRSAVFMjXx8HpQFaNJMqBV7MBgMK4br5UESsB4S31Ec",
426+
documentTypeName: "domain",
427+
indexName: "parentNameAndLabel",
428+
indexValues: ["dash", "alice"],
429+
contestantId: "5DbLwAxGBzUzo81VewMUwn4b5P4bpv9FNFybi25XB5Bk",
430+
count: 10,
431+
orderAscending: true
432+
}
433+
]
434+
},
435+
getContestedResourceIdentityVotes: {
436+
testnet: [
437+
{
438+
identityId: "5DbLwAxGBzUzo81VewMUwn4b5P4bpv9FNFybi25XB5Bk",
439+
limit: 10,
440+
offset: 0,
441+
orderAscending: true
442+
}
443+
]
444+
},
445+
getVotePollsByEndDate: {
446+
testnet: [
447+
{
448+
limit: 10,
449+
offset: 0,
450+
orderAscending: true
451+
}
452+
]
453+
}
454+
},
455+
456+
group: {
457+
getGroupInfo: {
458+
testnet: [
459+
{
460+
contractId: "49PJEnNx7ReCitzkLdkDNr4s6RScGsnNexcdSZJ1ph5N",
461+
groupContractPosition: 0
462+
}
463+
]
464+
},
465+
getGroupInfos: {
466+
testnet: [
467+
{
468+
contractId: "49PJEnNx7ReCitzkLdkDNr4s6RScGsnNexcdSZJ1ph5N",
469+
count: 100
470+
}
471+
]
472+
},
473+
getGroupActions: {
474+
testnet: [
475+
{
476+
contractId: "49PJEnNx7ReCitzkLdkDNr4s6RScGsnNexcdSZJ1ph5N",
477+
groupContractPosition: 0,
478+
status: "ACTIVE",
479+
count: 10
480+
}
481+
]
482+
},
483+
getGroupActionSigners: {
484+
testnet: [
485+
{
486+
contractId: "49PJEnNx7ReCitzkLdkDNr4s6RScGsnNexcdSZJ1ph5N",
487+
groupContractPosition: 0,
488+
status: "ACTIVE",
489+
actionId: "6XJzL6Qb8Zhwxt4HFwh8NAn7q1u4dwdoUf8EmgzDudFZ"
286490
}
287491
]
288492
}

0 commit comments

Comments
 (0)