difftreelog
CORE-410 Adapt token property test for ReFungible collection
in: master
1 file changed
tests/src/nesting/properties.test.tsdiffbeforeafterboth699 });698 });700 });699 });700701 it.only('Assigns properties to a token according to permissions (ReFungible)', async () => {702 await usingApi(async api => {703 const collection = await createCollectionExpectSuccess({mode: {type: 'ReFungible'}});704 const token = await createItemExpectSuccess(alice, collection, 'ReFungible');705 await addCollectionAdminExpectSuccess(alice, collection, bob.address);706 await transferExpectSuccess(collection, token, alice, charlie, 1, 'ReFungible');707708 const propertyKeys: string[] = [];709 let i = 0;710 for (const permission of permissions) {711 for (const signer of permission.signers) {712 const key = i + '_' + signer.address;713 propertyKeys.push(key);714715 await expect(executeTransaction(716 api, 717 alice, 718 api.tx.unique.setTokenPropertyPermissions(collection, [{key: key, permission: permission.permission}]), 719 ), `on setting permission ${i} by ${signer.address}`).to.not.be.rejected;720721 await expect(executeTransaction(722 api, 723 signer, 724 api.tx.unique.setTokenProperties(collection, token, [{key: key, value: 'Serotonin increase'}]), 725 ), `on adding property ${i} by ${signer.address}`).to.not.be.rejected;726 }727728 i++;729 }730731 // const properties = (await api.rpc.unique.tokenProperties(collection, token, propertyKeys)).toHuman() as any[];732 // const tokensData = (await api.rpc.unique.tokenData(collection, token, propertyKeys)).toHuman().properties as any[];733 // for (let i = 0; i < properties.length; i++) {734 // expect(properties[i].value).to.be.equal('Serotonin increase');735 // expect(tokensData[i].value).to.be.equal('Serotonin increase');736 // }737 });738 });701739702 it('Changes properties of a token according to permissions', async () => {740 it('Changes properties of a token according to permissions', async () => {703 await usingApi(async api => {741 await usingApi(async api => {