123456import chai from 'chai';7import chaiAsPromised from 'chai-as-promised';8import privateKey from './substrate/privateKey';9import usingApi from './substrate/substrate-api';10import {11 createItemExpectSuccess,12 createCollectionExpectSuccess,13 transferExpectSuccess,14 transferExpectFailure,15 setTransferFlagExpectSuccess16} from './util/helpers';1718chai.use(chaiAsPromised);1920describe('Enable/Disable Transfers', () => {21 it.only('User can transfer token with enabled transfer flag', async () => {22 await usingApi(async () => {23 const Alice = privateKey('//Alice');24 const Bob = privateKey('//Bob');25 26 const nftCollectionId = await createCollectionExpectSuccess();27 const newNftTokenId = await createItemExpectSuccess(Alice, nftCollectionId, 'NFT');2829 30 await setTransferFlagExpectSuccess(Alice, nftCollectionId, true);3132 await transferExpectSuccess(nftCollectionId, newNftTokenId, Alice, Bob, 1);33 });34 });3536 it.only('User can\'n transfer token with disabled transfer flag', async () => {37 await usingApi(async () => {38 const Alice = privateKey('//Alice');39 const Bob = privateKey('//Bob');40 41 const nftCollectionId = await createCollectionExpectSuccess();42 const newNftTokenId = await createItemExpectSuccess(Alice, nftCollectionId, 'NFT');4344 45 await setTransferFlagExpectSuccess(Alice, nftCollectionId, false);4647 await transferExpectFailure(nftCollectionId, newNftTokenId, Alice, Bob, 1);48 });49 });50});