123456import { IKeyringPair } from '@polkadot/types/types';7import chai from 'chai';8import chaiAsPromised from 'chai-as-promised';9import privateKey from './substrate/privateKey';10import usingApi from './substrate/substrate-api';11import {12 createItemExpectSuccess,13 createCollectionExpectSuccess,14 destroyCollectionExpectSuccess,15 findNotExistingCollection,16 queryCollectionExpectSuccess,17 setOffchainSchemaExpectFailure,18 setOffchainSchemaExpectSuccess,19 transferExpectSuccess,20 scheduleTransferExpectSuccess,21 setCollectionSponsorExpectSuccess,22 confirmSponsorshipExpectSuccess23} from './util/helpers';242526chai.use(chaiAsPromised);27const expect = chai.expect;2829const DATA = [1, 2, 3, 4];3031describe('Integration Test scheduler base transaction', () => {32 let alice: IKeyringPair;3334 before(async () => {35 await usingApi(async () => {36 alice = privateKey('//Alice');37 });38 });3940 it('User can transfer owned token with delay (scheduler)', async () => {41 await usingApi(async (api) => {42 const Alice = privateKey('//Alice');43 const Bob = privateKey('//Bob');44 45 const nftCollectionId = await createCollectionExpectSuccess();46 const newNftTokenId = await createItemExpectSuccess(Alice, nftCollectionId, 'NFT');47 await setCollectionSponsorExpectSuccess(nftCollectionId, Alice.address);48 await confirmSponsorshipExpectSuccess(nftCollectionId);4950 await scheduleTransferExpectSuccess(nftCollectionId, newNftTokenId, Alice, Bob, 1, 'NFT');51 });52 });5354 55});565758596061626364656667686970717273747576777879808182838485868788899091929394