difftreelog
turn off collision-tests
in: master
10 files changed
tests/src/collision-tests/admVsOwnerChanges.test.tsdiffbeforeafterboth1import { IKeyringPair } from '@polkadot/types/types';1/* broken by design2import chai from 'chai';2// substrate transactions are sequential, not parallel3import chaiAsPromised from 'chai-as-promised';3// the order of execution is indeterminate4import privateKey from '../substrate/privateKey';45import usingApi, { submitTransactionAsync } from '../substrate/substrate-api';5import { IKeyringPair } from '@polkadot/types/types';6import {6import chai from 'chai';7 createCollectionExpectSuccess,7import chaiAsPromised from 'chai-as-promised';8 createItemExpectSuccess,8import privateKey from '../substrate/privateKey';9 normalizeAccountId,9import usingApi, { submitTransactionAsync } from '../substrate/substrate-api';10 waitNewBlocks,10import {11} from '../util/helpers';11 createCollectionExpectSuccess,1212 createItemExpectSuccess,13chai.use(chaiAsPromised);13 normalizeAccountId,14const expect = chai.expect;14 waitNewBlocks,15let Alice: IKeyringPair;15} from '../util/helpers';16let Bob: IKeyringPair;1617let Ferdie: IKeyringPair;17chai.use(chaiAsPromised);1818const expect = chai.expect;19before(async () => {19let Alice: IKeyringPair;20 await usingApi(async () => {20let Bob: IKeyringPair;21 Alice = privateKey('//Alice');21let Ferdie: IKeyringPair;22 Bob = privateKey('//Bob');2223 Ferdie = privateKey('//Ferdie');23before(async () => {24 });24 await usingApi(async () => {25});25 Alice = privateKey('//Alice');2626 Bob = privateKey('//Bob');27describe('Admin vs Owner changes token: ', () => {27 Ferdie = privateKey('//Ferdie');28 // tslint:disable-next-line: max-line-length28 });29 it('The collection admin changes the owner of the token and in the same block the current owner transfers the token to another address ', async () => {29});303031 await usingApi(async (api) => {31describe('Admin vs Owner changes token: ', () => {32 const collectionId = await createCollectionExpectSuccess();32 // tslint:disable-next-line: max-line-length33 const changeAdminTxBob = api.tx.nft.addCollectionAdmin(collectionId, normalizeAccountId(Bob.address));33 it('The collection admin changes the owner of the token and in the same block the current owner transfers the token to another address ', async () => {34 await submitTransactionAsync(Alice, changeAdminTxBob);3435 const changeAdminTxFerdie = api.tx.nft.addCollectionAdmin(collectionId, normalizeAccountId(Ferdie.address));35 await usingApi(async (api) => {36 await submitTransactionAsync(Bob, changeAdminTxFerdie);36 const collectionId = await createCollectionExpectSuccess();37 const itemId = await createItemExpectSuccess(Ferdie, collectionId, 'NFT');37 const changeAdminTxBob = api.tx.nft.addCollectionAdmin(collectionId, normalizeAccountId(Bob.address));3838 await submitTransactionAsync(Alice, changeAdminTxBob);39 const changeOwner = api.tx.nft.transferFrom(normalizeAccountId(Ferdie.address), normalizeAccountId(Bob.address), collectionId, itemId, 1);39 const changeAdminTxFerdie = api.tx.nft.addCollectionAdmin(collectionId, normalizeAccountId(Ferdie.address));40 const approve = api.tx.nft.approve(normalizeAccountId(Bob.address), collectionId, itemId, 1);40 await submitTransactionAsync(Bob, changeAdminTxFerdie);41 const sendItem = api.tx.nft.transfer(normalizeAccountId(Alice.address), collectionId, itemId, 1);41 const itemId = await createItemExpectSuccess(Ferdie, collectionId, 'NFT');42 await Promise.all([4243 changeOwner.signAndSend(Alice),43 const changeOwner = api.tx.nft.transferFrom(normalizeAccountId(Ferdie.address), normalizeAccountId(Bob.address), collectionId, itemId, 1);44 approve.signAndSend(Bob),44 const approve = api.tx.nft.approve(normalizeAccountId(Bob.address), collectionId, itemId, 1);45 sendItem.signAndSend(Ferdie),45 const sendItem = api.tx.nft.transfer(normalizeAccountId(Alice.address), collectionId, itemId, 1);46 ]);46 await Promise.all([47 const itemBefore: any = await api.query.nft.nftItemList(collectionId, itemId);47 changeOwner.signAndSend(Alice),48 expect(itemBefore.owner).not.to.be.eq(Bob.address);48 approve.signAndSend(Bob),49 await waitNewBlocks(2);49 sendItem.signAndSend(Ferdie),50 });50 ]);51 });51 const itemBefore: any = await api.query.nft.nftItemList(collectionId, itemId);52});52 expect(itemBefore.owner).not.to.be.eq(Bob.address);5353 await waitNewBlocks(2);54 });55 });56});57*/tests/src/collision-tests/admVsOwnerData.test.tsdiffbeforeafterboth--- a/tests/src/collision-tests/admVsOwnerData.test.ts
+++ b/tests/src/collision-tests/admVsOwnerData.test.ts
@@ -1,3 +1,7 @@
+/* broken by design
+// substrate transactions are sequential, not parallel
+// the order of execution is indeterminate
+
import { IKeyringPair } from '@polkadot/types/types';
import chai from 'chai';
import chaiAsPromised from 'chai-as-promised';
@@ -46,3 +50,4 @@
});
});
});
+*/
\ No newline at end of file
tests/src/collision-tests/admVsOwnerTake.test.tsdiffbeforeafterboth--- a/tests/src/collision-tests/admVsOwnerTake.test.ts
+++ b/tests/src/collision-tests/admVsOwnerTake.test.ts
@@ -1,3 +1,7 @@
+/* broken by design
+// substrate transactions are sequential, not parallel
+// the order of execution is indeterminate
+
import { IKeyringPair } from '@polkadot/types/types';
import chai from 'chai';
import chaiAsPromised from 'chai-as-promised';
@@ -48,3 +52,4 @@
});
});
});
+*/
\ No newline at end of file
tests/src/collision-tests/adminDestroyCollection.test.tsdiffbeforeafterboth--- a/tests/src/collision-tests/adminDestroyCollection.test.ts
+++ b/tests/src/collision-tests/adminDestroyCollection.test.ts
@@ -1,3 +1,7 @@
+/* broken by design
+// substrate transactions are sequential, not parallel
+// the order of execution is indeterminate
+
import { IKeyringPair } from '@polkadot/types/types';
import chai from 'chai';
import chaiAsPromised from 'chai-as-promised';
@@ -47,3 +51,4 @@
});
});
});
+*/
\ No newline at end of file
tests/src/collision-tests/adminLimitsOff.test.tsdiffbeforeafterboth--- a/tests/src/collision-tests/adminLimitsOff.test.ts
+++ b/tests/src/collision-tests/adminLimitsOff.test.ts
@@ -1,3 +1,7 @@
+/* broken by design
+// substrate transactions are sequential, not parallel
+// the order of execution is indeterminate
+
import { IKeyringPair } from '@polkadot/types/types';
import chai from 'chai';
import chaiAsPromised from 'chai-as-promised';
@@ -63,3 +67,4 @@
});
});
});
+*/
\ No newline at end of file
tests/src/collision-tests/adminRightsOff.test.tsdiffbeforeafterboth--- a/tests/src/collision-tests/adminRightsOff.test.ts
+++ b/tests/src/collision-tests/adminRightsOff.test.ts
@@ -1,4 +1,6 @@
-/* obsolete
+/* broken by design
+// substrate transactions are sequential, not parallel
+// the order of execution is indeterminate
import { IKeyringPair } from '@polkadot/types/types';
import BN from 'bn.js';
@@ -48,5 +50,4 @@
});
});
});
-
*/
\ No newline at end of file
tests/src/collision-tests/setSponsorNewOwner.test.tsdiffbeforeafterboth--- a/tests/src/collision-tests/setSponsorNewOwner.test.ts
+++ b/tests/src/collision-tests/setSponsorNewOwner.test.ts
@@ -1,3 +1,7 @@
+/* broken by design
+// substrate transactions are sequential, not parallel
+// the order of execution is indeterminate
+
import { IKeyringPair } from '@polkadot/types/types';
import chai from 'chai';
import chaiAsPromised from 'chai-as-promised';
@@ -44,3 +48,4 @@
});
});
});
+*/
\ No newline at end of file
tests/src/collision-tests/sponsorPayments.test.tsdiffbeforeafterboth--- a/tests/src/collision-tests/sponsorPayments.test.ts
+++ b/tests/src/collision-tests/sponsorPayments.test.ts
@@ -1,3 +1,7 @@
+/* broken by design
+// substrate transactions are sequential, not parallel
+// the order of execution is indeterminate
+
import { IKeyringPair } from '@polkadot/types/types';
import chai from 'chai';
import chaiAsPromised from 'chai-as-promised';
@@ -53,3 +57,4 @@
});
});
});
+*/
\ No newline at end of file
tests/src/collision-tests/tokenLimitsOff.test.tsdiffbeforeafterboth--- a/tests/src/collision-tests/tokenLimitsOff.test.ts
+++ b/tests/src/collision-tests/tokenLimitsOff.test.ts
@@ -1,4 +1,7 @@
-/* obsolete
+/* broken by design
+// substrate transactions are sequential, not parallel
+// the order of execution is indeterminate
+
import { IKeyringPair } from '@polkadot/types/types';
import BN from 'bn.js';
import chai from 'chai';
tests/src/collision-tests/turnsOffMinting.test.tsdiffbeforeafterboth--- a/tests/src/collision-tests/turnsOffMinting.test.ts
+++ b/tests/src/collision-tests/turnsOffMinting.test.ts
@@ -1,3 +1,7 @@
+/* broken by design
+// substrate transactions are sequential, not parallel
+// the order of execution is indeterminate
+
import { IKeyringPair } from '@polkadot/types/types';
import chai from 'chai';
import chaiAsPromised from 'chai-as-promised';
@@ -45,3 +49,4 @@
});
});
});
+*/
\ No newline at end of file