1import { default as usingApi } from './substrate/substrate-api';
2import { Keyring } from "@polkadot/api";
3import { IKeyringPair } from "@polkadot/types/types";
4import {
5 createCollectionExpectSuccess,
6 createItemExpectSuccess
7} from './util/helpers';
8
9let alice: IKeyringPair;
10
11describe('integration test: ext. createItem():', () => {
12 before(async () => {
13 await usingApi(async (api) => {
14 const keyring = new Keyring({ type: 'sr25519' });
15 alice = keyring.addFromUri(`//Alice`);
16 });
17 });
18
19 it('Create new item in NFT collection', async () => {
20 const createMode = 'NFT';
21 const newCollectionID = await createCollectionExpectSuccess({mode: createMode});
22 await createItemExpectSuccess(alice, newCollectionID, createMode);
23 });
24 it('Create new item in Fungible collection', async () => {
25 const createMode = 'Fungible';
26 const newCollectionID = await createCollectionExpectSuccess({mode: createMode});
27 await createItemExpectSuccess(alice, newCollectionID, createMode);
28 });
29 it('Create new item in ReFungible collection', async () => {
30 const createMode = 'ReFungible';
31 const newCollectionID = await createCollectionExpectSuccess({mode: createMode});
32 await createItemExpectSuccess(alice, newCollectionID, createMode);
33 });
34});