123456789101112131415161718import {IKeyringPair} from '@polkadot/types/types';19import {getEventMessage} from '../util/helpers';20import {itSub, usingPlaygrounds, expect} from '../util/playgrounds';2122describe('Create Item event ', () => {23 let alice: IKeyringPair;24 const checkSection = 'ItemCreated';25 const checkTreasury = 'Deposit';26 const checkSystem = 'ExtrinsicSuccess';27 before(async () => {28 await usingPlaygrounds(async (helper, privateKey) => {29 const donor = privateKey('//Alice');30 [alice] = await helper.arrange.createAccounts([10n], donor);31 });32 });33 itSub('Check event from createItem(): ', async ({helper}) => {34 const collection = await helper.nft.mintCollection(alice, {name: 'test', description: 'test', tokenPrefix: 'test'});35 await collection.mintToken(alice, {Substrate: alice.address});36 const msg = JSON.stringify(getEventMessage(helper.chainLog[helper.chainLog.length - 1].events));37 expect(msg).to.be.contain(checkSection);38 expect(msg).to.be.contain(checkTreasury);39 expect(msg).to.be.contain(checkSystem);40 });41});