difftreelog
tests(rmrk+outdated): refactor old helpers and rmrk to get rid of warnings
in: master
43 files changed
tests/src/deprecated-helpers/helpers.tsdiffbeforeafterboth463}463}464464465export async function createCollectionExpectSuccess(params: Partial<CreateCollectionParams> = {}): Promise<number> {465export async function createCollectionExpectSuccess(params: Partial<CreateCollectionParams> = {}): Promise<number> {466 const {name, description, mode, tokenPrefix} = {...defaultCreateCollectionParams, ...params};466 const {name, description, tokenPrefix} = {...defaultCreateCollectionParams, ...params};467467468 let collectionId = 0;468 let collectionId = 0;469 await usingApi(async (api, privateKeyWrapper) => {469 await usingApi(async (api, privateKeyWrapper) => {763}763}764764765export async function confirmSponsorshipByKeyExpectSuccess(collectionId: number, sender: IKeyringPair) {765export async function confirmSponsorshipByKeyExpectSuccess(collectionId: number, sender: IKeyringPair) {766 await usingApi(async (api, privateKeyWrapper) => {766 await usingApi(async (api) => {767767768 // Run the transaction768 // Run the transaction769 const tx = api.tx.unique.confirmSponsorship(collectionId);769 const tx = api.tx.unique.confirmSponsorship(collectionId);1764 return (await api.rpc.unique.collectionById(collectionId)).unwrap();1764 return (await api.rpc.unique.collectionById(collectionId)).unwrap();1765}1765}176617661767export const describe_xcm = (1767/*export const describe_xcm = (1768 process.env.RUN_XCM_TESTS1768 process.env.RUN_XCM_TESTS1769 ? describe1769 ? describe1770 : describe.skip1770 : describe.skip1771);1771);*/177217721773export async function waitNewBlocks(blocksCount = 1): Promise<void> {1773export async function waitNewBlocks(blocksCount = 1): Promise<void> {1774 await usingApi(async (api) => {1774 await usingApi(async (api) => {tests/src/rmrk/acceptNft.seqtest.tsdiffbeforeafterbothno changes
tests/src/rmrk/acceptNft.test.tsdiffbeforeafterbothno changes
tests/src/rmrk/addResource.seqtest.tsdiffbeforeafterbothno changes
tests/src/rmrk/addResource.test.tsdiffbeforeafterbothno changes
tests/src/rmrk/addTheme.seqtest.tsdiffbeforeafterbothno changes
tests/src/rmrk/addTheme.test.tsdiffbeforeafterbothno changes
tests/src/rmrk/burnNft.seqtest.tsdiffbeforeafterbothno changes
tests/src/rmrk/burnNft.test.tsdiffbeforeafterbothno changes
tests/src/rmrk/changeCollectionIssuer.seqtest.tsdiffbeforeafterbothno changes
tests/src/rmrk/changeCollectionIssuer.test.tsdiffbeforeafterbothno changes
tests/src/rmrk/createBase.seqtest.tsdiffbeforeafterbothno changes
tests/src/rmrk/createBase.test.tsdiffbeforeafterbothno changes
tests/src/rmrk/createCollection.seqtest.tsdiffbeforeafterbothno changes
tests/src/rmrk/createCollection.test.tsdiffbeforeafterbothno changes
tests/src/rmrk/deleteCollection.seqtest.tsdiffbeforeafterbothno changes
tests/src/rmrk/deleteCollection.test.tsdiffbeforeafterbothno changes
tests/src/rmrk/equipNft.seqtest.tsdiffbeforeafterbothno changes
tests/src/rmrk/equipNft.test.tsdiffbeforeafterbothno changes
tests/src/rmrk/getOwnedNfts.seqtest.tsdiffbeforeafterbothno changes
tests/src/rmrk/getOwnedNfts.test.tsdiffbeforeafterbothno changes
tests/src/rmrk/lockCollection.seqtest.tsdiffbeforeafterbothno changes
tests/src/rmrk/lockCollection.test.tsdiffbeforeafterbothno changes
tests/src/rmrk/mintNft.seqtest.tsdiffbeforeafterbothno changes
tests/src/rmrk/mintNft.test.tsdiffbeforeafterbothno changes
tests/src/rmrk/rejectNft.seqtest.tsdiffbeforeafterbothno changes
tests/src/rmrk/rejectNft.test.tsdiffbeforeafterbothno changes
tests/src/rmrk/removeResource.seqtest.tsdiffbeforeafterbothno changes
tests/src/rmrk/removeResource.test.tsdiffbeforeafterbothno changes
tests/src/rmrk/rmrkIsolation.seqtest.tsdiffbeforeafterbothno changes
tests/src/rmrk/rmrkIsolation.test.tsdiffbeforeafterbothno changes
tests/src/rmrk/sendNft.seqtest.tsdiffbeforeafterbothno changes
tests/src/rmrk/sendNft.test.tsdiffbeforeafterbothno changes
tests/src/rmrk/setCollectionProperty.seqtest.tsdiffbeforeafterbothno changes
tests/src/rmrk/setCollectionProperty.test.tsdiffbeforeafterbothno changes
tests/src/rmrk/setEquippableList.seqtest.tsdiffbeforeafterbothno changes
tests/src/rmrk/setEquippableList.test.tsdiffbeforeafterbothno changes
tests/src/rmrk/setNftProperty.seqtest.tsdiffbeforeafterbothno changes
tests/src/rmrk/setNftProperty.test.tsdiffbeforeafterbothno changes
tests/src/rmrk/setResourcePriorities.seqtest.tsdiffbeforeafterbothno changes
tests/src/rmrk/setResourcePriorities.test.tsdiffbeforeafterbothno changes
tests/src/rmrk/util/fetch.tsdiffbeforeafterboth1import {ApiPromise} from '@polkadot/api';1import {ApiPromise} from '@polkadot/api';2import type {Option, Bytes} from '@polkadot/types-codec';2import type {Option} from '@polkadot/types-codec';3import type {3import type {4 RmrkTraitsCollectionCollectionInfo as Collection,4 RmrkTraitsCollectionCollectionInfo as Collection,5 RmrkTraitsNftNftInfo as Nft,5 RmrkTraitsNftNftInfo as Nft,tests/src/rmrk/util/helpers.tsdiffbeforeafterboth107export function isTxResultSuccess(events: EventRecord[]): boolean {107export function isTxResultSuccess(events: EventRecord[]): boolean {108 let success = false;108 let success = false;109109110 events.forEach(({event: {data, method, section}}) => {110 events.forEach(({event: {method}}) => {111 if (method == 'ExtrinsicSuccess') {111 if (method == 'ExtrinsicSuccess') {112 success = true;112 success = true;113 }113 }