Skip to content

Commit 0aefa5d

Browse files
authored
Addenda to preimage tests (#482)
* Fix oversized preimage test * Fix `ensure_updated` preimage test * Further extened test to `ensure_updated` * Address review comments * Extend oversized preimage test * Update preimage snapshots * Update snapshot names, `PreImage` -> `Preimage`
1 parent 96096a5 commit 0aefa5d

File tree

5 files changed

+204
-89
lines changed

5 files changed

+204
-89
lines changed

packages/kusama/src/__snapshots__/assetHubKusama.preimage.e2e.test.ts.snap

Lines changed: 15 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
// Vitest Snapshot v1, https://vitest.dev/guide/snapshot.html
22

3-
exports[`Kusama Asset Hub PreImage > Kusama Asset Hub PreImage > preimage tests > preimage empty test > note empty preimage events 1`] = `
3+
exports[`Kusama Asset Hub Preimage > Kusama Asset Hub Preimage > preimage tests > preimage empty test > note empty preimage events 1`] = `
44
[
55
{
66
"data": {
@@ -12,7 +12,7 @@ exports[`Kusama Asset Hub PreImage > Kusama Asset Hub PreImage > preimage tests
1212
]
1313
`;
1414

15-
exports[`Kusama Asset Hub PreImage > Kusama Asset Hub PreImage > preimage tests > preimage empty test > unnote empty preimage events 1`] = `
15+
exports[`Kusama Asset Hub Preimage > Kusama Asset Hub Preimage > preimage tests > preimage empty test > unnote empty preimage events 1`] = `
1616
[
1717
{
1818
"data": {
@@ -24,11 +24,11 @@ exports[`Kusama Asset Hub PreImage > Kusama Asset Hub PreImage > preimage tests
2424
]
2525
`;
2626

27-
exports[`Kusama Asset Hub PreImage > Kusama Asset Hub PreImage > preimage tests > preimage ensure updated test (fees due) > ensure updated preimage events 1`] = `[]`;
27+
exports[`Kusama Asset Hub Preimage > Kusama Asset Hub Preimage > preimage tests > preimage ensure updated test (fees due) > ensure updated preimage events 1`] = `[]`;
2828

29-
exports[`Kusama Asset Hub PreImage > Kusama Asset Hub PreImage > preimage tests > preimage ensure updated test (no fees due) > ensure updated preimage events 1`] = `[]`;
29+
exports[`Kusama Asset Hub Preimage > Kusama Asset Hub Preimage > preimage tests > preimage ensure updated test (no fees due) > ensure updated preimage events 1`] = `[]`;
3030

31-
exports[`Kusama Asset Hub PreImage > Kusama Asset Hub PreImage > preimage tests > preimage single note and unnote test > note preimage events 1`] = `
31+
exports[`Kusama Asset Hub Preimage > Kusama Asset Hub Preimage > preimage tests > preimage single note and unnote test > note preimage events 1`] = `
3232
[
3333
{
3434
"data": {
@@ -40,7 +40,7 @@ exports[`Kusama Asset Hub PreImage > Kusama Asset Hub PreImage > preimage tests
4040
]
4141
`;
4242

43-
exports[`Kusama Asset Hub PreImage > Kusama Asset Hub PreImage > preimage tests > preimage single note and unnote test > unnote preimage events 1`] = `
43+
exports[`Kusama Asset Hub Preimage > Kusama Asset Hub Preimage > preimage tests > preimage single note and unnote test > unnote preimage events 1`] = `
4444
[
4545
{
4646
"data": {
@@ -52,7 +52,7 @@ exports[`Kusama Asset Hub PreImage > Kusama Asset Hub PreImage > preimage tests
5252
]
5353
`;
5454

55-
exports[`Kusama Asset Hub PreImage > failure tests > preimage oversized test > note oversized preimage events 1`] = `
55+
exports[`Kusama Asset Hub Preimage > failure tests > preimage oversized test > note max size preimage events 1`] = `
5656
[
5757
{
5858
"data": {
@@ -64,7 +64,9 @@ exports[`Kusama Asset Hub PreImage > failure tests > preimage oversized test > n
6464
]
6565
`;
6666

67-
exports[`Kusama Asset Hub PreImage > failure tests > preimage repeated note and unnote test > note preimage events 1`] = `
67+
exports[`Kusama Asset Hub Preimage > failure tests > preimage oversized test > note oversized preimage events 1`] = `[]`;
68+
69+
exports[`Kusama Asset Hub Preimage > failure tests > preimage repeated note and unnote test > note preimage events 1`] = `
6870
[
6971
{
7072
"data": {
@@ -76,11 +78,11 @@ exports[`Kusama Asset Hub PreImage > failure tests > preimage repeated note and
7678
]
7779
`;
7880

79-
exports[`Kusama Asset Hub PreImage > failure tests > preimage repeated note and unnote test > repeat note preimage events 1`] = `[]`;
81+
exports[`Kusama Asset Hub Preimage > failure tests > preimage repeated note and unnote test > repeat note preimage events 1`] = `[]`;
8082

81-
exports[`Kusama Asset Hub PreImage > failure tests > preimage repeated note and unnote test > repeat unnote preimage events 1`] = `[]`;
83+
exports[`Kusama Asset Hub Preimage > failure tests > preimage repeated note and unnote test > repeat unnote preimage events 1`] = `[]`;
8284

83-
exports[`Kusama Asset Hub PreImage > failure tests > preimage repeated note and unnote test > unnote preimage events 1`] = `
85+
exports[`Kusama Asset Hub Preimage > failure tests > preimage repeated note and unnote test > unnote preimage events 1`] = `
8486
[
8587
{
8688
"data": {
@@ -92,6 +94,6 @@ exports[`Kusama Asset Hub PreImage > failure tests > preimage repeated note and
9294
]
9395
`;
9496

95-
exports[`Kusama Asset Hub PreImage > failure tests > preimage single request and unrequest test as non-root > request preimage events 1`] = `[]`;
97+
exports[`Kusama Asset Hub Preimage > failure tests > preimage single request and unrequest test as non-root > request preimage events 1`] = `[]`;
9698

97-
exports[`Kusama Asset Hub PreImage > failure tests > preimage single request and unrequest test as non-root > unrequest preimage events 1`] = `[]`;
99+
exports[`Kusama Asset Hub Preimage > failure tests > preimage single request and unrequest test as non-root > unrequest preimage events 1`] = `[]`;

packages/kusama/src/assetHubKusama.preimage.e2e.test.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ import { assetHubKusama } from '@e2e-test/networks/chains'
22
import { basePreimageE2ETests, registerTestTree, type TestConfig } from '@e2e-test/shared'
33

44
const testConfig: TestConfig = {
5-
testSuiteName: 'Kusama Asset Hub PreImage',
5+
testSuiteName: 'Kusama Asset Hub Preimage',
66
addressEncoding: 2,
77
blockProvider: 'NonLocal',
88
asyncBacking: 'Enabled',

packages/polkadot/src/__snapshots__/assetHubPolkadot.preimage.e2e.test.ts.snap

Lines changed: 15 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
// Vitest Snapshot v1, https://vitest.dev/guide/snapshot.html
22

3-
exports[`Polkadot Asset Hub PreImage > Polkadot Asset Hub PreImage > preimage tests > preimage empty test > note empty preimage events 1`] = `
3+
exports[`Polkadot Asset Hub Preimage > Polkadot Asset Hub Preimage > preimage tests > preimage empty test > note empty preimage events 1`] = `
44
[
55
{
66
"data": {
@@ -12,7 +12,7 @@ exports[`Polkadot Asset Hub PreImage > Polkadot Asset Hub PreImage > preimage te
1212
]
1313
`;
1414

15-
exports[`Polkadot Asset Hub PreImage > Polkadot Asset Hub PreImage > preimage tests > preimage empty test > unnote empty preimage events 1`] = `
15+
exports[`Polkadot Asset Hub Preimage > Polkadot Asset Hub Preimage > preimage tests > preimage empty test > unnote empty preimage events 1`] = `
1616
[
1717
{
1818
"data": {
@@ -24,11 +24,11 @@ exports[`Polkadot Asset Hub PreImage > Polkadot Asset Hub PreImage > preimage te
2424
]
2525
`;
2626

27-
exports[`Polkadot Asset Hub PreImage > Polkadot Asset Hub PreImage > preimage tests > preimage ensure updated test (fees due) > ensure updated preimage events 1`] = `[]`;
27+
exports[`Polkadot Asset Hub Preimage > Polkadot Asset Hub Preimage > preimage tests > preimage ensure updated test (fees due) > ensure updated preimage events 1`] = `[]`;
2828

29-
exports[`Polkadot Asset Hub PreImage > Polkadot Asset Hub PreImage > preimage tests > preimage ensure updated test (no fees due) > ensure updated preimage events 1`] = `[]`;
29+
exports[`Polkadot Asset Hub Preimage > Polkadot Asset Hub Preimage > preimage tests > preimage ensure updated test (no fees due) > ensure updated preimage events 1`] = `[]`;
3030

31-
exports[`Polkadot Asset Hub PreImage > Polkadot Asset Hub PreImage > preimage tests > preimage single note and unnote test > note preimage events 1`] = `
31+
exports[`Polkadot Asset Hub Preimage > Polkadot Asset Hub Preimage > preimage tests > preimage single note and unnote test > note preimage events 1`] = `
3232
[
3333
{
3434
"data": {
@@ -40,7 +40,7 @@ exports[`Polkadot Asset Hub PreImage > Polkadot Asset Hub PreImage > preimage te
4040
]
4141
`;
4242

43-
exports[`Polkadot Asset Hub PreImage > Polkadot Asset Hub PreImage > preimage tests > preimage single note and unnote test > unnote preimage events 1`] = `
43+
exports[`Polkadot Asset Hub Preimage > Polkadot Asset Hub Preimage > preimage tests > preimage single note and unnote test > unnote preimage events 1`] = `
4444
[
4545
{
4646
"data": {
@@ -52,7 +52,7 @@ exports[`Polkadot Asset Hub PreImage > Polkadot Asset Hub PreImage > preimage te
5252
]
5353
`;
5454

55-
exports[`Polkadot Asset Hub PreImage > failure tests > preimage oversized test > note oversized preimage events 1`] = `
55+
exports[`Polkadot Asset Hub Preimage > failure tests > preimage oversized test > note max size preimage events 1`] = `
5656
[
5757
{
5858
"data": {
@@ -64,7 +64,9 @@ exports[`Polkadot Asset Hub PreImage > failure tests > preimage oversized test >
6464
]
6565
`;
6666

67-
exports[`Polkadot Asset Hub PreImage > failure tests > preimage repeated note and unnote test > note preimage events 1`] = `
67+
exports[`Polkadot Asset Hub Preimage > failure tests > preimage oversized test > note oversized preimage events 1`] = `[]`;
68+
69+
exports[`Polkadot Asset Hub Preimage > failure tests > preimage repeated note and unnote test > note preimage events 1`] = `
6870
[
6971
{
7072
"data": {
@@ -76,11 +78,11 @@ exports[`Polkadot Asset Hub PreImage > failure tests > preimage repeated note an
7678
]
7779
`;
7880

79-
exports[`Polkadot Asset Hub PreImage > failure tests > preimage repeated note and unnote test > repeat note preimage events 1`] = `[]`;
81+
exports[`Polkadot Asset Hub Preimage > failure tests > preimage repeated note and unnote test > repeat note preimage events 1`] = `[]`;
8082

81-
exports[`Polkadot Asset Hub PreImage > failure tests > preimage repeated note and unnote test > repeat unnote preimage events 1`] = `[]`;
83+
exports[`Polkadot Asset Hub Preimage > failure tests > preimage repeated note and unnote test > repeat unnote preimage events 1`] = `[]`;
8284

83-
exports[`Polkadot Asset Hub PreImage > failure tests > preimage repeated note and unnote test > unnote preimage events 1`] = `
85+
exports[`Polkadot Asset Hub Preimage > failure tests > preimage repeated note and unnote test > unnote preimage events 1`] = `
8486
[
8587
{
8688
"data": {
@@ -92,6 +94,6 @@ exports[`Polkadot Asset Hub PreImage > failure tests > preimage repeated note an
9294
]
9395
`;
9496

95-
exports[`Polkadot Asset Hub PreImage > failure tests > preimage single request and unrequest test as non-root > request preimage events 1`] = `[]`;
97+
exports[`Polkadot Asset Hub Preimage > failure tests > preimage single request and unrequest test as non-root > request preimage events 1`] = `[]`;
9698

97-
exports[`Polkadot Asset Hub PreImage > failure tests > preimage single request and unrequest test as non-root > unrequest preimage events 1`] = `[]`;
99+
exports[`Polkadot Asset Hub Preimage > failure tests > preimage single request and unrequest test as non-root > unrequest preimage events 1`] = `[]`;

packages/polkadot/src/assetHubPolkadot.preimage.e2e.test.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ import { assetHubPolkadot } from '@e2e-test/networks/chains'
22
import { basePreimageE2ETests, registerTestTree, type TestConfig } from '@e2e-test/shared'
33

44
const testConfig: TestConfig = {
5-
testSuiteName: 'Polkadot Asset Hub PreImage',
5+
testSuiteName: 'Polkadot Asset Hub Preimage',
66
addressEncoding: 0,
77
blockProvider: 'NonLocal',
88
asyncBacking: 'Enabled',

0 commit comments

Comments
 (0)