difftreelog
tests(parallel): fix phantom errors
in: master
7 files changed
tests/src/approve.test.tsdiffbeforeafterboth--- a/tests/src/approve.test.ts
+++ b/tests/src/approve.test.ts
@@ -227,7 +227,7 @@
});
});
-describe('Approved amount decreases by the transferred amount.:', () => {
+describe('Approved amount decreases by the transferred amount:', () => {
let alice: IKeyringPair;
let bob: IKeyringPair;
let charlie: IKeyringPair;
tests/src/confirmSponsorship.test.tsdiffbeforeafterboth73 });73 });747475 itSub('Fungible: Transfer fees are paid by the sponsor after confirmation', async ({helper}) => {75 itSub('Fungible: Transfer fees are paid by the sponsor after confirmation', async ({helper}) => {76 const collection = await helper.ft.mintCollection(alice, {name: 'col', description: 'descr', tokenPrefix: 'COL'}, 0);76 const collection = await helper.ft.mintCollection(alice, {name: 'col', description: 'descr', tokenPrefix: 'COL'});77 await collection.setSponsor(alice, bob.address);77 await collection.setSponsor(alice, bob.address);78 await collection.confirmSponsorship(bob);78 await collection.confirmSponsorship(bob);79 const bobBalanceBefore = await helper.balance.getSubstrate(bob.address);79 const bobBalanceBefore = await helper.balance.getSubstrate(bob.address);163 });163 });164164165 itSub('NFT: Sponsoring of createItem is rate limited', async ({helper}) => {165 itSub('NFT: Sponsoring of createItem is rate limited', async ({helper}) => {166 const collection = await helper.nft.mintCollection(alice, {name: 'col', description: 'descr', tokenPrefix: 'COL'});166 const collection = await helper.nft.mintCollection(alice, {name: 'col', description: 'descr', tokenPrefix: 'COL', limits: {167 sponsoredDataRateLimit: {blocks: 1000},168 sponsorTransferTimeout: 1000,169 }});167 await collection.setSponsor(alice, bob.address);170 await collection.setSponsor(alice, bob.address);168 await collection.confirmSponsorship(bob);171 await collection.confirmSponsorship(bob);169 await collection.setPermissions(alice, {mintMode: true, access: 'AllowList'});172 await collection.setPermissions(alice, {mintMode: true, access: 'AllowList'});195 });198 });196199197 itSub('(!negative test!) Confirm sponsorship for a collection that never existed', async ({helper}) => {200 itSub('(!negative test!) Confirm sponsorship for a collection that never existed', async ({helper}) => {198 const collectionId = 1_000_000;201 const collectionId = (1 << 32) - 1;199 const confirmSponsorshipTx = async () => helper.collection.confirmSponsorship(bob, collectionId);202 const confirmSponsorshipTx = async () => helper.collection.confirmSponsorship(bob, collectionId);200 await expect(confirmSponsorshipTx()).to.be.rejectedWith(/common\.CollectionNotFound/);203 await expect(confirmSponsorshipTx()).to.be.rejectedWith(/common\.CollectionNotFound/);201 });204 });tests/src/deprecated-helpers/helpers.tsdiffbeforeafterboth--- a/tests/src/deprecated-helpers/helpers.ts
+++ b/tests/src/deprecated-helpers/helpers.ts
@@ -1764,11 +1764,11 @@
return (await api.rpc.unique.collectionById(collectionId)).unwrap();
}
-/*export const describe_xcm = (
+export const describeXCM = (
process.env.RUN_XCM_TESTS
? describe
: describe.skip
-);*/
+);
export async function waitNewBlocks(blocksCount = 1): Promise<void> {
await usingApi(async (api) => {
tests/src/refungible.test.tsdiffbeforeafterboth--- a/tests/src/refungible.test.ts
+++ b/tests/src/refungible.test.ts
@@ -62,7 +62,7 @@
.to.eventually.be.rejectedWith(/refungible\.WrongRefungiblePieces/);
});
- itSub('RPC method tokenOnewrs for refungible collection and token', async ({helper}) => {
+ itSub('RPC method tokenOwners for refungible collection and token', async ({helper}) => {
const ethAcc = {Ethereum: '0x67fb3503a61b284dc83fa96dceec4192db47dc7c'};
const facelessCrowd = (await helper.arrange.createAccounts(Array(7).fill(0n), donor)).map(keyring => {return {Substrate: keyring.address};});
@@ -212,7 +212,8 @@
const token = await collection.mintToken(alice, 100n);
await token.repartition(alice, 200n);
const chainEvents = helper.chainLog.slice(-1)[0].events;
- expect(chainEvents).to.deep.include({
+ const event = chainEvents.find((event: any) => event.section === 'common' && event.method === 'ItemCreated');
+ expect(event).to.deep.include({
section: 'common',
method: 'ItemCreated',
index: [66, 2],
@@ -222,7 +223,6 @@
{substrate: alice.address},
100n,
],
- phase: {applyExtrinsic: 2},
});
});
@@ -231,9 +231,10 @@
const token = await collection.mintToken(alice, 100n);
await token.repartition(alice, 50n);
const chainEvents = helper.chainLog.slice(-1)[0].events;
- expect(chainEvents).to.deep.include({
+ const event = chainEvents.find((event: any) => event.section === 'common' && event.method === 'ItemDestroyed');
+ expect(event).to.deep.include({
+ section: 'common',
method: 'ItemDestroyed',
- section: 'common',
index: [66, 3],
data: [
collection.collectionId,
@@ -241,7 +242,6 @@
{substrate: alice.address},
50n,
],
- phase: {applyExtrinsic: 2},
});
});
tests/src/xcm/xcmOpal.test.tsdiffbeforeafterboth--- a/tests/src/xcm/xcmOpal.test.ts
+++ b/tests/src/xcm/xcmOpal.test.ts
@@ -21,7 +21,7 @@
import {ApiOptions} from '@polkadot/api/types';
import {IKeyringPair} from '@polkadot/types/types';
import usingApi, {executeTransaction} from './../substrate/substrate-api';
-import {bigIntToDecimals, describe_xcm, getGenericResult, paraSiblingSovereignAccount, normalizeAccountId} from './../deprecated-helpers/helpers';
+import {bigIntToDecimals, describeXCM, getGenericResult, paraSiblingSovereignAccount, normalizeAccountId} from './../deprecated-helpers/helpers';
import waitNewBlocks from './../substrate/wait-new-blocks';
import getBalance from './../substrate/get-balance';
@@ -49,7 +49,7 @@
// 10,000.00 (ten thousands) USDT
const ASSET_AMOUNT = 1_000_000_000_000_000_000_000n;
-describe_xcm('[XCM] Integration test: Exchanging USDT with Westmint', () => {
+describeXCM('[XCM] Integration test: Exchanging USDT with Westmint', () => {
let alice: IKeyringPair;
let bob: IKeyringPair;
tests/src/xcm/xcmQuartz.test.tsdiffbeforeafterboth--- a/tests/src/xcm/xcmQuartz.test.ts
+++ b/tests/src/xcm/xcmQuartz.test.ts
@@ -21,7 +21,7 @@
import {ApiOptions} from '@polkadot/api/types';
import {IKeyringPair} from '@polkadot/types/types';
import usingApi, {submitTransactionAsync} from '../substrate/substrate-api';
-import {getGenericResult, generateKeyringPair, waitEvent, describe_xcm, bigIntToDecimals} from '../deprecated-helpers/helpers';
+import {getGenericResult, generateKeyringPair, waitEvent, describeXCM, bigIntToDecimals} from '../deprecated-helpers/helpers';
import {MultiLocation} from '@polkadot/types/interfaces';
import {blake2AsHex} from '@polkadot/util-crypto';
import waitNewBlocks from '../substrate/wait-new-blocks';
@@ -61,7 +61,7 @@
return parachainApiOptions(RELAY_PORT);
}
-describe_xcm('[XCM] Integration test: Exchanging tokens with Karura', () => {
+describeXCM('[XCM] Integration test: Exchanging tokens with Karura', () => {
let alice: IKeyringPair;
let randomAccount: IKeyringPair;
@@ -292,7 +292,7 @@
});
// These tests are relevant only when the foreign asset pallet is disabled
-describe_xcm('[XCM] Integration test: Quartz rejects non-native tokens', () => {
+describeXCM('[XCM] Integration test: Quartz rejects non-native tokens', () => {
let alice: IKeyringPair;
before(async () => {
@@ -433,7 +433,7 @@
});
});
-describe_xcm('[XCM] Integration test: Exchanging QTZ with Moonriver', () => {
+describeXCM('[XCM] Integration test: Exchanging QTZ with Moonriver', () => {
// Quartz constants
let quartzAlice: IKeyringPair;
tests/src/xcm/xcmUnique.test.tsdiffbeforeafterboth--- a/tests/src/xcm/xcmUnique.test.ts
+++ b/tests/src/xcm/xcmUnique.test.ts
@@ -21,7 +21,7 @@
import {ApiOptions} from '@polkadot/api/types';
import {IKeyringPair} from '@polkadot/types/types';
import usingApi, {submitTransactionAsync} from '../substrate/substrate-api';
-import {getGenericResult, generateKeyringPair, waitEvent, describe_xcm, bigIntToDecimals} from '../deprecated-helpers/helpers';
+import {getGenericResult, generateKeyringPair, waitEvent, describeXCM, bigIntToDecimals} from '../deprecated-helpers/helpers';
import {MultiLocation} from '@polkadot/types/interfaces';
import {blake2AsHex} from '@polkadot/util-crypto';
import waitNewBlocks from '../substrate/wait-new-blocks';
@@ -61,7 +61,7 @@
return parachainApiOptions(RELAY_PORT);
}
-describe_xcm('[XCM] Integration test: Exchanging tokens with Acala', () => {
+describeXCM('[XCM] Integration test: Exchanging tokens with Acala', () => {
let alice: IKeyringPair;
let randomAccount: IKeyringPair;
@@ -292,7 +292,7 @@
});
// These tests are relevant only when the foreign asset pallet is disabled
-describe_xcm('[XCM] Integration test: Unique rejects non-native tokens', () => {
+describeXCM('[XCM] Integration test: Unique rejects non-native tokens', () => {
let alice: IKeyringPair;
before(async () => {
@@ -433,7 +433,7 @@
});
});
-describe_xcm('[XCM] Integration test: Exchanging UNQ with Moonbeam', () => {
+describeXCM('[XCM] Integration test: Exchanging UNQ with Moonbeam', () => {
// Unique constants
let uniqueAlice: IKeyringPair;