difftreelog
disable logically broken tests
in: master
2 files changed
tests/src/collision-tests/adminRightsOff.test.tsdiffbeforeafterboth1import { IKeyringPair } from '@polkadot/types/types';2import BN from 'bn.js';3import chai from 'chai';4import chaiAsPromised from 'chai-as-promised';5import privateKey from '../substrate/privateKey';6import usingApi, { submitTransactionAsync } from '../substrate/substrate-api';7import {8 createCollectionExpectSuccess,9 normalizeAccountId,10 waitNewBlocks,11} from '../util/helpers';1213chai.use(chaiAsPromised);14const expect = chai.expect;15let Alice: IKeyringPair;16let Bob: IKeyringPair;1718before(async () => {19 await usingApi(async () => {20 Alice = privateKey('//Alice');21 Bob = privateKey('//Bob');22 });23});2425describe('Deprivation of admin rights: ', () => {26 // tslint:disable-next-line: max-line-length27 it('In the block, the collection admin adds a token or changes data, and the collection owner deprives the admin of rights ', async () => {28 await usingApi(async (api) => {29 const collectionId = await createCollectionExpectSuccess();30 const changeAdminTx = api.tx.nft.addCollectionAdmin(collectionId, normalizeAccountId(Bob.address));31 await submitTransactionAsync(Alice, changeAdminTx);32 await waitNewBlocks(1);33 const args = [{ nft: ['0x31', '0x31'] }, { nft: ['0x32', '0x32'] }, { nft: ['0x33', '0x33'] }];34 const addItemAdm = api.tx.nft.createMultipleItems(collectionId, normalizeAccountId(Bob.address), args);35 const removeAdm = api.tx.nft.removeCollectionAdmin(collectionId, normalizeAccountId(Bob.address));36 await Promise.all([37 addItemAdm.signAndSend(Bob),38 removeAdm.signAndSend(Alice),39 ]);40 await waitNewBlocks(2);41 const itemsListIndex = await api.query.nft.itemListIndex(collectionId) as unknown as BN;42 expect(itemsListIndex.toNumber()).to.be.equal(0);43 const adminList: any = (await api.query.nft.adminList(collectionId));44 expect(adminList).not.to.be.contains(normalizeAccountId(Bob.address));45 await waitNewBlocks(2);46 });47 });48});1/* obsolete23import { IKeyringPair } from '@polkadot/types/types';4import BN from 'bn.js';5import chai from 'chai';6import chaiAsPromised from 'chai-as-promised';7import privateKey from '../substrate/privateKey';8import usingApi, { submitTransactionAsync } from '../substrate/substrate-api';9import {10 createCollectionExpectSuccess,11 normalizeAccountId,12 waitNewBlocks,13} from '../util/helpers';1415chai.use(chaiAsPromised);16const expect = chai.expect;17let Alice: IKeyringPair;18let Bob: IKeyringPair;1920before(async () => {21 await usingApi(async () => {22 Alice = privateKey('//Alice');23 Bob = privateKey('//Bob');24 });25});2627describe('Deprivation of admin rights: ', () => {28 // tslint:disable-next-line: max-line-length29 it('In the block, the collection admin adds a token or changes data, and the collection owner deprives the admin of rights ', async () => {30 await usingApi(async (api) => {31 const collectionId = await createCollectionExpectSuccess();32 const changeAdminTx = api.tx.nft.addCollectionAdmin(collectionId, normalizeAccountId(Bob.address));33 await submitTransactionAsync(Alice, changeAdminTx);34 await waitNewBlocks(1);35 const args = [{ nft: ['0x31', '0x31'] }, { nft: ['0x32', '0x32'] }, { nft: ['0x33', '0x33'] }];36 const addItemAdm = api.tx.nft.createMultipleItems(collectionId, normalizeAccountId(Bob.address), args);37 const removeAdm = api.tx.nft.removeCollectionAdmin(collectionId, normalizeAccountId(Bob.address));38 await Promise.all([39 addItemAdm.signAndSend(Bob),40 removeAdm.signAndSend(Alice),41 ]);42 await waitNewBlocks(2);43 const itemsListIndex = await api.query.nft.itemListIndex(collectionId) as unknown as BN;44 expect(itemsListIndex.toNumber()).to.be.equal(0);45 const adminList: any = (await api.query.nft.adminList(collectionId));46 expect(adminList).not.to.be.contains(normalizeAccountId(Bob.address));47 await waitNewBlocks(2);48 });49 });50});5152*/tests/src/collision-tests/tokenLimitsOff.test.tsdiffbeforeafterboth--- a/tests/src/collision-tests/tokenLimitsOff.test.ts
+++ b/tests/src/collision-tests/tokenLimitsOff.test.ts
@@ -1,3 +1,4 @@
+/* obsolete
import { IKeyringPair } from '@polkadot/types/types';
import BN from 'bn.js';
import chai from 'chai';
@@ -77,3 +78,4 @@
});
});
});
+*/