From 71a792f949040598e8fd031b829f6cdd63f4b25d Mon Sep 17 00:00:00 2001 From: Yaroslav Bolyukin Date: Mon, 01 Feb 2021 09:52:19 +0000 Subject: [PATCH] tests: remove dependency on tests execution order --- --- a/tests/src/setMintPermission.test.ts +++ b/tests/src/setMintPermission.test.ts @@ -16,26 +16,20 @@ let alice: IKeyringPair; let bob: IKeyringPair; - let collectionId: number; before(async () => { await usingApi(async () => { alice = privateKey('//Alice'); bob = privateKey('//Bob'); - - collectionId = await createCollectionExpectSuccess({ mode: { type: 'NFT' } }); }); }); - it('execute setMintPermission', async () => { + it('ensure white-listed non-privileged address can mint tokens', async () => { await usingApi(async () => { + const collectionId = await createCollectionExpectSuccess({ mode: { type: 'NFT' } }); await enableWhiteListExpectSuccess(alice, collectionId); await setMintPermissionExpectSuccess(alice, collectionId, true); - }); - }); + await addToWhiteListExpectSuccess(alice, collectionId, bob.address); - it('ensure white-listed non-privileged address can mint tokens', async () => { - await usingApi(async () => { - await addToWhiteListExpectSuccess(alice, collectionId, bob.address); await createItemExpectSuccess(bob, collectionId, 'NFT'); }); }); -- gitstuff