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 scheduleTransferExpectSuccess,14 setCollectionSponsorExpectSuccess,15 confirmSponsorshipExpectSuccess,16} from './util/helpers';17import {IKeyringPair} from '@polkadot/types/types';1819chai.use(chaiAsPromised);2021describe('Integration Test scheduler base transaction', () => {22 let alice: IKeyringPair;23 let bob: IKeyringPair;2425 before(async() => {26 await usingApi(async () => {27 alice = privateKey('//Alice');28 bob = privateKey('//Bob');29 });30 });3132 it('User can transfer owned token with delay (scheduler)', async () => {33 await usingApi(async () => {34 35 const nftCollectionId = await createCollectionExpectSuccess();36 const newNftTokenId = await createItemExpectSuccess(alice, nftCollectionId, 'NFT');37 await setCollectionSponsorExpectSuccess(nftCollectionId, alice.address);38 await confirmSponsorshipExpectSuccess(nftCollectionId);3940 await scheduleTransferExpectSuccess(nftCollectionId, newNftTokenId, alice, bob, 1, 4);41 });42 });43});