git.delta.rocks / unique-network / refs/commits / 71a792f94904

difftreelog

tests: remove dependency on tests execution order

Yaroslav Bolyukin2021-02-01parent: #6809679.patch.diff
in: master

1 file changed

modifiedtests/src/setMintPermission.test.tsdiffbeforeafterboth
16 let alice: IKeyringPair;16 let alice: IKeyringPair;
17 let bob: IKeyringPair;17 let bob: IKeyringPair;
1818
19 let collectionId: number;
20 before(async () => {19 before(async () => {
21 await usingApi(async () => {20 await usingApi(async () => {
22 alice = privateKey('//Alice');21 alice = privateKey('//Alice');
23 bob = privateKey('//Bob');22 bob = privateKey('//Bob');
24
25 collectionId = await createCollectionExpectSuccess({ mode: { type: 'NFT' } });
26 });23 });
27 });24 });
28
29 it('execute setMintPermission', async () => {
30 await usingApi(async () => {
31 await enableWhiteListExpectSuccess(alice, collectionId);
32 await setMintPermissionExpectSuccess(alice, collectionId, true);
33 });
34 });
3525
36 it('ensure white-listed non-privileged address can mint tokens', async () => {26 it('ensure white-listed non-privileged address can mint tokens', async () => {
37 await usingApi(async () => {27 await usingApi(async () => {
28 const collectionId = await createCollectionExpectSuccess({ mode: { type: 'NFT' } });
29 await enableWhiteListExpectSuccess(alice, collectionId);
30 await setMintPermissionExpectSuccess(alice, collectionId, true);
38 await addToWhiteListExpectSuccess(alice, collectionId, bob.address);31 await addToWhiteListExpectSuccess(alice, collectionId, bob.address);
32
39 await createItemExpectSuccess(bob, collectionId, 'NFT');33 await createItemExpectSuccess(bob, collectionId, 'NFT');