123456789101112131415161718import {IKeyringPair} from '@polkadot/types/types';19import {executeTransaction} from '../substrate/substrate-api';20import {uniqueEventMessage} from '../util/helpers';21import {usingPlaygrounds, itSub, expect} from '../util/playgrounds';2223describe('Create collection event ', () => {24 let alice: IKeyringPair;25 const checkSection = 'CollectionCreated';26 const checkTreasury = 'Deposit';27 const checkSystem = 'ExtrinsicSuccess';28 before(async () => {29 await usingPlaygrounds(async (helper, privateKey) => {30 const donor = privateKey('//Alice');31 [alice] = await helper.arrange.createAccounts([10n], donor);32 });33 });34 itSub('Check event from createCollection(): ', async ({helper}) => {35 const api = helper.api!;36 const tx = api.tx.unique.createCollectionEx({name: [0x31], description: [0x32], tokenPrefix: '0x33', mode: 'NFT'});37 const events = await executeTransaction(api, alice, tx);38 const msg = JSON.stringify(uniqueEventMessage(events));39 expect(msg).to.be.contain(checkSection);40 expect(msg).to.be.contain(checkTreasury);41 expect(msg).to.be.contain(checkSystem);42 });43});