From cba336c4ef3a22b77e0d281626eef267248438e5 Mon Sep 17 00:00:00 2001 From: Antz0x0z <47379684+Antz0x0z@users.noreply.github.com> Date: Mon, 21 Dec 2020 14:53:00 +0000 Subject: [PATCH] Update helpers.ts NFTPAR-240 --- --- a/tests/src/util/helpers.ts +++ b/tests/src/util/helpers.ts @@ -35,7 +35,7 @@ export async function createCollectionExpectSuccess(name: string, description: string, tokenPrefix: string, mode: string) { await usingApi(async (api) => { // Get number of collections before the transaction - const AcollectionCount = parseInt((await api.query.nft.collectionCount()).toString()); + const AcollectionCount = parseInt((await api.query.nft.createdCollectionCount()).toString()); // Run the CreateCollection transaction const alicePrivateKey = privateKey('//Alice'); @@ -44,7 +44,7 @@ const result = getCreateCollectionResult(events); // Get number of collections after the transaction - const BcollectionCount = parseInt((await api.query.nft.collectionCount()).toString()); + const BcollectionCount = parseInt((await api.query.nft.createdCollectionCount()).toString()); // Get the collection const collection: any = (await api.query.nft.collection(result.collectionId)).toJSON(); @@ -64,7 +64,7 @@ export async function createCollectionExpectFailure(name: string, description: string, tokenPrefix: string, mode: string) { await usingApi(async (api) => { // Get number of collections before the transaction - const AcollectionCount = parseInt((await api.query.nft.collectionCount()).toString()); + const AcollectionCount = parseInt((await api.query.nft.createdCollectionCount()).toString()); // Run the CreateCollection transaction const alicePrivateKey = privateKey('//Alice'); @@ -73,11 +73,11 @@ const result = getCreateCollectionResult(events); // Get number of collections after the transaction - const BcollectionCount = parseInt((await api.query.nft.collectionCount()).toString()); + const BcollectionCount = parseInt((await api.query.nft.createdCollectionCount()).toString()); // What to expect expect(result.success).to.be.false; expect(BcollectionCount).to.be.equal(AcollectionCount, 'Error: Collection with incorrect data created.'); }); } - \ No newline at end of file + -- gitstuff