difftreelog
fix test
in: master
1 file changed
tests/src/mintModes.test.tsdiffbeforeafterboth17 disableWhiteListExpectSuccess,17 disableWhiteListExpectSuccess,18} from './util/helpers';18} from './util/helpers';191920describe.only('Integration Test public minting', () => {20describe('Integration Test public minting', () => {21 let alice: IKeyringPair;21 let alice: IKeyringPair;22 let bob: IKeyringPair;22 let bob: IKeyringPair;232328 });28 });29 });29 });303031 it('If the whitelist mode is enabled, then the address added to the whitelist and not the owner or administrator can create tokens', async () => {31 it('If the AllowList mode is enabled, then the address added to the whitelist and not the owner or administrator can create tokens', async () => {32 await usingApi(async () => {32 await usingApi(async () => {33 const collectionId = await createCollectionExpectSuccess({ mode: { type: 'NFT' } });33 const collectionId = await createCollectionExpectSuccess({ mode: { type: 'NFT' } });34 await enableWhiteListExpectSuccess(alice, collectionId);34 await enableWhiteListExpectSuccess(alice, collectionId);39 });39 });40 });40 });414142 it('If the whitelist mode is enabled, address not included in whitelist that is user cannot create tokens', async () => {42 it('If the AllowList mode is enabled, address not included in whitelist that is regular user cannot create tokens', async () => {43 await usingApi(async () => {43 await usingApi(async () => {44 const collectionId = await createCollectionExpectSuccess({ mode: { type: 'NFT' } });44 const collectionId = await createCollectionExpectSuccess({ mode: { type: 'NFT' } });45 await enableWhiteListExpectSuccess(alice, collectionId);45 await enableWhiteListExpectSuccess(alice, collectionId);48 });48 });49 });49 });505051 it('If the whitelist mode is enabled, address not included in whitelist that is admin can create tokens', async () => {51 it('If the AllowList mode is enabled, address not included in whitelist that is admin can create tokens', async () => {52 await usingApi(async () => {52 await usingApi(async () => {53 const collectionId = await createCollectionExpectSuccess({ mode: { type: 'NFT' } });53 const collectionId = await createCollectionExpectSuccess({ mode: { type: 'NFT' } });54 await enableWhiteListExpectSuccess(alice, collectionId);54 await enableWhiteListExpectSuccess(alice, collectionId);58 });58 });59 });59 });606061 it('If the whitelist mode is enabled, address not included in whitelist that is owner can create tokens', async () => {61 it('If the AllowList mode is enabled, address not included in whitelist that is owner can create tokens', async () => {62 await usingApi(async () => {62 await usingApi(async () => {63 const collectionId = await createCollectionExpectSuccess({ mode: { type: 'NFT' } });63 const collectionId = await createCollectionExpectSuccess({ mode: { type: 'NFT' } });64 await enableWhiteListExpectSuccess(alice, collectionId);64 await enableWhiteListExpectSuccess(alice, collectionId);67 });67 });68 });68 });696970 it('If the whitelist mode is disabled, owner can create tokens', async () => {70 it('If the AllowList mode is disabled, owner can create tokens', async () => {71 await usingApi(async () => {71 await usingApi(async () => {72 const collectionId = await createCollectionExpectSuccess({ mode: { type: 'NFT' } });72 const collectionId = await createCollectionExpectSuccess({ mode: { type: 'NFT' } });73 await disableWhiteListExpectSuccess(alice, collectionId);73 await disableWhiteListExpectSuccess(alice, collectionId);76 });76 });77 });77 });787879 it('If the whitelist mode is disabled, collection admin can create tokens', async () => {79 it('If the AllowList mode is disabled, collection admin can create tokens', async () => {80 await usingApi(async () => {80 await usingApi(async () => {81 const collectionId = await createCollectionExpectSuccess({ mode: { type: 'NFT' } });81 const collectionId = await createCollectionExpectSuccess({ mode: { type: 'NFT' } });82 await disableWhiteListExpectSuccess(alice, collectionId);82 await disableWhiteListExpectSuccess(alice, collectionId);86 });86 });87 });87 });888889 it('If the whitelist mode is disabled, regular user can`t create tokens', async () => {89 it('If the AllowList mode is disabled, regular user can`t create tokens', async () => {90 await usingApi(async () => {90 await usingApi(async () => {91 const collectionId = await createCollectionExpectSuccess({ mode: { type: 'NFT' } });91 const collectionId = await createCollectionExpectSuccess({ mode: { type: 'NFT' } });92 await disableWhiteListExpectSuccess(alice, collectionId);92 await disableWhiteListExpectSuccess(alice, collectionId);96 });96 });97});97});989899describe.only('Integration Test private minting', () => {99describe('Integration Test private minting', () => {100 let alice: IKeyringPair;100 let alice: IKeyringPair;101 let bob: IKeyringPair;101 let bob: IKeyringPair;102102126 });126 });127 });127 });128128129 it('Address that is user cannot create tokens', async () => {129 it('Address that is admin can create tokens', async () => {130 await usingApi(async () => {130 await usingApi(async () => {131 const collectionId = await createCollectionExpectSuccess({ mode: { type: 'NFT' } });131 const collectionId = await createCollectionExpectSuccess({ mode: { type: 'NFT' } });132 await disableWhiteListExpectSuccess(alice, collectionId);132 await disableWhiteListExpectSuccess(alice, collectionId);133 await setMintPermissionExpectSuccess(alice, collectionId, false);133 await setMintPermissionExpectSuccess(alice, collectionId, false);134 await addCollectionAdminExpectSuccess(alice, collectionId, bob);134 await createItemExpectFailure(bob, collectionId, 'NFT');135 await createItemExpectSuccess(bob, collectionId, 'NFT');135 });136 });136 });137 });137});138});