git.delta.rocks / unique-network / refs/commits / 4f4018846dc9

difftreelog

fix test - wait next block

Trubnikov Sergey2023-01-17parent: #b244190.patch.diff
in: master

7 files changed

modifiedtests/src/check-event/burnItemEvent.test.tsdiffbeforeafterboth
32 const collection = await helper.nft.mintCollection(alice, {name: 'test', description: 'test', tokenPrefix: 'test'});32 const collection = await helper.nft.mintCollection(alice, {name: 'test', description: 'test', tokenPrefix: 'test'});
33 const token = await collection.mintToken(alice, {Substrate: alice.address});33 const token = await collection.mintToken(alice, {Substrate: alice.address});
34 await token.burn(alice);34 await token.burn(alice);
35 await helper.wait.newBlocks(1);
3536
36 const event = helper.chainLog[helper.chainLog.length - 1].events as IEvent[];37 const event = helper.chainLog[helper.chainLog.length - 1].events as IEvent[];
37 const eventStrings = event.map(e => `${e.section}.${e.method}`);38 const eventStrings = event.map(e => `${e.section}.${e.method}`);
modifiedtests/src/check-event/createCollectionEvent.test.tsdiffbeforeafterboth
29 });29 });
30 itSub('Check event from createCollection(): ', async ({helper}) => {30 itSub('Check event from createCollection(): ', async ({helper}) => {
31 await helper.nft.mintCollection(alice, {name: 'test', description: 'test', tokenPrefix: 'test'});31 await helper.nft.mintCollection(alice, {name: 'test', description: 'test', tokenPrefix: 'test'});
32 await helper.wait.newBlocks(1);
32 const event = helper.chainLog[helper.chainLog.length - 1].events as IEvent[];33 const event = helper.chainLog[helper.chainLog.length - 1].events as IEvent[];
33 const eventStrings = event.map(e => `${e.section}.${e.method}`);34 const eventStrings = event.map(e => `${e.section}.${e.method}`);
3435
modifiedtests/src/check-event/createItemEvent.test.tsdiffbeforeafterboth
30 itSub('Check event from createItem(): ', async ({helper}) => {30 itSub('Check event from createItem(): ', async ({helper}) => {
31 const collection = await helper.nft.mintCollection(alice, {name: 'test', description: 'test', tokenPrefix: 'test'});31 const collection = await helper.nft.mintCollection(alice, {name: 'test', description: 'test', tokenPrefix: 'test'});
32 await collection.mintToken(alice, {Substrate: alice.address});32 await collection.mintToken(alice, {Substrate: alice.address});
33 await helper.wait.newBlocks(1);
33 const event = helper.chainLog[helper.chainLog.length - 1].events as IEvent[];34 const event = helper.chainLog[helper.chainLog.length - 1].events as IEvent[];
34 const eventStrings = event.map(e => `${e.section}.${e.method}`);35 const eventStrings = event.map(e => `${e.section}.${e.method}`);
3536
modifiedtests/src/check-event/createMultipleItemsEvent.test.tsdiffbeforeafterboth
35 {owner: {Substrate: alice.address}},35 {owner: {Substrate: alice.address}},
36 ]);36 ]);
3737
38 await helper.wait.newBlocks(1);
38 const event = helper.chainLog[helper.chainLog.length - 1].events as IEvent[];39 const event = helper.chainLog[helper.chainLog.length - 1].events as IEvent[];
39 const eventStrings = event.map(e => `${e.section}.${e.method}`);40 const eventStrings = event.map(e => `${e.section}.${e.method}`);
4041
modifiedtests/src/check-event/destroyCollectionEvent.test.tsdiffbeforeafterboth
31 itSub('Check event from destroyCollection(): ', async ({helper}) => {31 itSub('Check event from destroyCollection(): ', async ({helper}) => {
32 const collection = await helper.nft.mintCollection(alice, {name: 'test', description: 'test', tokenPrefix: 'test'});32 const collection = await helper.nft.mintCollection(alice, {name: 'test', description: 'test', tokenPrefix: 'test'});
33 await collection.burn(alice);33 await collection.burn(alice);
34 await helper.wait.newBlocks(1);
34 const event = helper.chainLog[helper.chainLog.length - 1].events as IEvent[];35 const event = helper.chainLog[helper.chainLog.length - 1].events as IEvent[];
35 const eventStrings = event.map(e => `${e.section}.${e.method}`);36 const eventStrings = event.map(e => `${e.section}.${e.method}`);
3637
modifiedtests/src/check-event/transferEvent.test.tsdiffbeforeafterboth
34 const collection = await helper.nft.mintCollection(alice, {name: 'test', description: 'test', tokenPrefix: 'test'});34 const collection = await helper.nft.mintCollection(alice, {name: 'test', description: 'test', tokenPrefix: 'test'});
35 const token = await collection.mintToken(alice, {Substrate: alice.address});35 const token = await collection.mintToken(alice, {Substrate: alice.address});
36 await token.transfer(alice, {Substrate: bob.address});36 await token.transfer(alice, {Substrate: bob.address});
37 await helper.wait.newBlocks(1);
37 const event = helper.chainLog[helper.chainLog.length - 1].events as IEvent[];38 const event = helper.chainLog[helper.chainLog.length - 1].events as IEvent[];
38 const eventStrings = event.map(e => `${e.section}.${e.method}`);39 const eventStrings = event.map(e => `${e.section}.${e.method}`);
3940
modifiedtests/src/check-event/transferFromEvent.test.tsdiffbeforeafterboth
33 const collection = await helper.nft.mintCollection(alice, {name: 'test', description: 'test', tokenPrefix: 'test'});33 const collection = await helper.nft.mintCollection(alice, {name: 'test', description: 'test', tokenPrefix: 'test'});
34 const token = await collection.mintToken(alice, {Substrate: alice.address});34 const token = await collection.mintToken(alice, {Substrate: alice.address});
35 await token.transferFrom(alice, {Substrate: alice.address}, {Substrate: bob.address});35 await token.transferFrom(alice, {Substrate: alice.address}, {Substrate: bob.address});
36 await helper.wait.newBlocks(1);
36 const event = helper.chainLog[helper.chainLog.length - 1].events as IEvent[];37 const event = helper.chainLog[helper.chainLog.length - 1].events as IEvent[];
37 const eventStrings = event.map(e => `${e.section}.${e.method}`);38 const eventStrings = event.map(e => `${e.section}.${e.method}`);
3839