difftreelog
Remove old test
in: master
1 file changed
tests/src/eth/allowlist.test.tsdiffbeforeafterboth156 await expect(collectionEvm.methods.transfer(owner, 2).send({from: userEth})).to.be.rejectedWith(/Transaction has been reverted/);156 await expect(collectionEvm.methods.transfer(owner, 2).send({from: userEth})).to.be.rejectedWith(/Transaction has been reverted/);157 }));157 }));158159 // Soft-deprecated160 itEth('Collection allowlist cannot be added and removed [eth] address by not owner', async ({helper}) => {161 const owner = await helper.eth.createAccountWithBalance(donor);162 const notOwner = await helper.eth.createAccountWithBalance(donor);163 const user = helper.eth.createAccount();164 const crossUser = helper.ethCrossAccount.fromAddress(user);165166 const {collectionAddress} = await helper.eth.createNFTCollection(owner, 'A', 'B', 'C');167 const collectionEvm = helper.ethNativeContract.collection(collectionAddress, 'nft', owner, true);168169 expect(await collectionEvm.methods.allowlistedCross(crossUser).call({from: owner})).to.be.false;170 await expect(collectionEvm.methods.addToCollectionAllowList(user).call({from: notOwner})).to.be.rejectedWith('NoPermission');171 expect(await collectionEvm.methods.allowlistedCross(crossUser).call({from: owner})).to.be.false;172 await collectionEvm.methods.addToCollectionAllowList(user).send({from: owner});173 expect(await collectionEvm.methods.allowlistedCross(crossUser).call({from: owner})).to.be.true;174 await expect(collectionEvm.methods.removeFromCollectionAllowList(user).call({from: notOwner})).to.be.rejectedWith('NoPermission');175 expect(await collectionEvm.methods.allowlistedCross(crossUser).call({from: owner})).to.be.true;176 });177158178 [159 [179 // cross-methods160 // cross-methods185 {mode: 'rft' as const, cross: false, requiredPallets: [Pallets.ReFungible]},166 {mode: 'rft' as const, cross: false, requiredPallets: [Pallets.ReFungible]},186 {mode: 'ft' as const, cross: false, requiredPallets: []},167 {mode: 'ft' as const, cross: false, requiredPallets: []},187 ].map(testCase => 168 ].map(testCase => 188 itEth.only(`Collection allowlist can not be add and remove [cross] address by non-owner for ${testCase.mode}`, async ({helper}) => {169 itEth.only(`Non-owner cannot add or remove from collection allowlist ${testCase.cross ? 'cross ' : ''}${testCase.mode}`, async ({helper}) => {189 // Select methods:170 // Select methods:190 const addToAllowList = testCase.cross ? 'addToCollectionAllowListCross' : 'addToCollectionAllowList';171 const addToAllowList = testCase.cross ? 'addToCollectionAllowListCross' : 'addToCollectionAllowList';191 const removeFromAllowList = testCase.cross ? 'removeFromCollectionAllowListCross' : 'removeFromCollectionAllowList';172 const removeFromAllowList = testCase.cross ? 'removeFromCollectionAllowListCross' : 'removeFromCollectionAllowList';