git.delta.rocks / unique-network / refs/commits / 34a778757e6f

difftreelog

fix test

Igor Kozyrev2021-10-06parent: #61da4de.patch.diff
in: master

1 file changed

modifiedtests/src/mintModes.test.tsdiffbeforeafterboth
17 disableWhiteListExpectSuccess,17 disableWhiteListExpectSuccess,
18} from './util/helpers';18} from './util/helpers';
1919
20describe.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;
2323
28 });28 });
29 });29 });
3030
31 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 });
4141
42 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 });
5050
51 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 });
6060
61 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 });
6969
70 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 });
7878
79 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 });
8888
89 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});
9898
99describe.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;
102102
126 });126 });
127 });127 });
128128
129 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});