From 40edbace6a69844092acd844a0d909508c44ebeb Mon Sep 17 00:00:00 2001 From: KidSysco Date: Sat, 21 Dec 2024 00:35:45 -0600 Subject: [PATCH] update tests --- .../useEvmNftGallery.history.test.js | 74 +++++++++---------- .../dahDemoV1/useEvmNftGallery.holder.test.js | 48 ++++++------ .../dahNftV2/useEvmNftGallery.history.test.js | 30 ++++---- .../dahNftV2/useEvmNftGallery.holder.test.js | 44 +++++------ 4 files changed, 98 insertions(+), 98 deletions(-) diff --git a/tests/dahDemoV1/useEvmNftGallery.history.test.js b/tests/dahDemoV1/useEvmNftGallery.history.test.js index c0b151f..6e3387f 100644 --- a/tests/dahDemoV1/useEvmNftGallery.history.test.js +++ b/tests/dahDemoV1/useEvmNftGallery.history.test.js @@ -9,7 +9,7 @@ let contractPublicKey = '0xcbb2a9868d73f24c056893131b97a69ffd36eba9'; // DAH let contractAddress = '0x33f1cdD52e7ec6F65Ab93dD518c1e2EdB3a8Dd63'; // DAH - Roadmap let chainId = blockchains.avalanche.chainId; let itemsPerPage = 5; -let nftStoreCollectionName = 'nftSmartContract1'; +let nftStoreItemCollectionName = 'nftSmartContract1'; const suspenseTemplate = '
'; test.beforeEach(() => { @@ -20,17 +20,17 @@ test('should fetch page 1 of all NFTs on contract', async (t) => { const wrapper = mount( { setup() { - const { nfts } = useEvmNftGallery( + const { nfts } = useEvmNftGallery({ contractPublicKey, contractAddress, - dahDemoV1Abi, + abi: dahDemoV1Abi, chainId, - null, - blockchains.avalanche.publicRpc, + holderPublicKey: null, + rpc: blockchains.avalanche.publicRpc, itemsPerPage, - nftStoreCollectionName, - true - ); + nftStoreItemCollectionName, + isAscendingSort: true, + }); return { nfts }; }, template: suspenseTemplate, @@ -61,17 +61,17 @@ test('should fetch page 2 of all NFTs on contract', async (t) => { const wrapper = mount( { setup() { - const { nfts, getNftPage } = useEvmNftGallery( + const { nfts, getNftPage } = useEvmNftGallery({ contractPublicKey, contractAddress, - dahDemoV1Abi, + abi: dahDemoV1Abi, chainId, - null, - blockchains.avalanche.publicRpc, + holderPublicKey: null, + rpc: blockchains.avalanche.publicRpc, itemsPerPage, - nftStoreCollectionName, - true - ); + nftStoreItemCollectionName, + isAscendingSort: true, + }); return { nfts, getNftPage }; }, @@ -118,17 +118,17 @@ test('should fetch page 1 of all NFTs on contract in desc order', async (t) => { const wrapper = mount( { setup() { - const { nfts } = useEvmNftGallery( - '0x18582f2CA048ac5f22E5a64F92E8a7d7b1F806a4', // Dog plex - '0x9c870E5B8724Db43E58Cd62C424E3071A3FB66E9', // Dog plex - dog show - dahDemoV1Abi, - blockchains.fantom.chainId, - null, - blockchains.fantom.publicRpc, - 24, - 'a1', - false - ); + const { nfts } = useEvmNftGallery({ + contractPublicKey: '0x18582f2CA048ac5f22E5a64F92E8a7d7b1F806a4', // Dog plex + contractAddress: '0x9c870E5B8724Db43E58Cd62C424E3071A3FB66E9', // Dog plex - dog show + abi: dahDemoV1Abi, + chainId: blockchains.fantom.chainId, + holderPublicKey: null, + chainId: blockchains.fantom.publicRpc, + itemsPerPage: 24, + nftStoreItemCollectionName: 'a1', + isAscendingSort: false, + }); return { nfts }; }, template: suspenseTemplate, @@ -160,17 +160,17 @@ test.only('should fetch page 1 of all NFTs on contract with burned NFTs', async const wrapper = mount( { setup() { - const { nfts } = useEvmNftGallery( - '0x5e44cEFFBeCaeCC0D75b3Be756d40726CE310608', // Urbanhomestead - '0x186EE2C8D81183b6bB06368413bc03ed5aa8eF21', // Urbanhomestead - Products - dahDemoV1Abi, - blockchains.avalanche.chainId, - null, - blockchains.avalanche.publicRpc, - 24, - 'a1', - false - ); + const { nfts } = useEvmNftGallery({ + contractPublicKey: '0x5e44cEFFBeCaeCC0D75b3Be756d40726CE310608', // Urbanhomestead + contractAddress: '0x186EE2C8D81183b6bB06368413bc03ed5aa8eF21', // Urbanhomestead - Products + abi: dahDemoV1Abi, + chainId: blockchains.avalanche.chainId, + holderPublicKey: null, + rpc: blockchains.avalanche.publicRpc, + itemsPerPage: 24, + nftStoreItemCollectionName: 'a1', + isAscendingSort: false, + }); return { nfts }; }, template: suspenseTemplate, diff --git a/tests/dahDemoV1/useEvmNftGallery.holder.test.js b/tests/dahDemoV1/useEvmNftGallery.holder.test.js index 8a3a864..fa95f78 100644 --- a/tests/dahDemoV1/useEvmNftGallery.holder.test.js +++ b/tests/dahDemoV1/useEvmNftGallery.holder.test.js @@ -9,7 +9,7 @@ let contractPublicKey = '0xcbb2a9868d73f24c056893131b97a69ffd36eba9'; let contractAddress = '0x33f1cdD52e7ec6F65Ab93dD518c1e2EdB3a8Dd63'; let chainId = blockchains.avalanche.chainId; let itemsPerPage = 5; -let nftStoreCollectionName = 'nftSmartContract1'; +let nftStoreItemCollectionName = 'nftSmartContract1'; const suspenseTemplate = '
'; test.beforeEach(() => { @@ -20,17 +20,17 @@ test('should fetch page 1 of NFTs by holder', async (t) => { const wrapper = mount( { setup() { - const { nfts } = useEvmNftGallery( + const { nfts } = useEvmNftGallery({ contractPublicKey, contractAddress, - dahDemoV1Abi, + abi: dahDemoV1Abi, chainId, contractPublicKey, - blockchains.avalanche.publicRpc, + rpc: blockchains.avalanche.publicRpc, itemsPerPage, - nftStoreCollectionName, - true - ); + nftStoreItemCollectionName, + isAscendingSort: true, + }); return { nfts }; }, template: suspenseTemplate, @@ -60,17 +60,17 @@ test('should fetch page 2 of NFTs by holder', async (t) => { const wrapper = mount( { setup() { - const { nfts, getNftPage } = useEvmNftGallery( + const { nfts, getNftPage } = useEvmNftGallery({ contractPublicKey, contractAddress, - dahDemoV1Abi, + abi: dahDemoV1Abi, chainId, contractPublicKey, - blockchains.avalanche.publicRpc, + rpc: blockchains.avalanche.publicRpc, itemsPerPage, - nftStoreCollectionName, - true - ); + nftStoreItemCollectionName, + isAscendingSort: true, + }); return { nfts, getNftPage }; }, @@ -113,17 +113,17 @@ test('should fetch page 1 of all NFTs on contract in desc order', async (t) => { const wrapper = mount( { setup() { - const { nfts } = useEvmNftGallery( - '0x18582f2CA048ac5f22E5a64F92E8a7d7b1F806a4', - '0x9c870E5B8724Db43E58Cd62C424E3071A3FB66E9', - dahDemoV1Abi, - blockchains.fantom.chainId, - '0x18582f2CA048ac5f22E5a64F92E8a7d7b1F806a4', - blockchains.fantom.publicRpc, - 24, - 'a1', - false - ); + const { nfts } = useEvmNftGallery({ + contractPublicKey: '0x18582f2CA048ac5f22E5a64F92E8a7d7b1F806a4', + contractAddress: '0x9c870E5B8724Db43E58Cd62C424E3071A3FB66E9', + abi: dahDemoV1Abi, + chainId: blockchains.fantom.chainId, + holderPublicKey: '0x18582f2CA048ac5f22E5a64F92E8a7d7b1F806a4', + rpc: blockchains.fantom.publicRpc, + itemsPerPage: 24, + nftStoreItemCollectionName: 'a1', + isAscendingSort: false, + }); return { nfts }; }, template: suspenseTemplate, diff --git a/tests/dahNftV2/useEvmNftGallery.history.test.js b/tests/dahNftV2/useEvmNftGallery.history.test.js index 8fedddb..d57b685 100644 --- a/tests/dahNftV2/useEvmNftGallery.history.test.js +++ b/tests/dahNftV2/useEvmNftGallery.history.test.js @@ -9,7 +9,7 @@ let contractPublicKey = '0x18582f2CA048ac5f22E5a64F92E8a7d7b1F806a4'; let contractAddress = '0x9c870E5B8724Db43E58Cd62C424E3071A3FB66E9'; let chainId = blockchains.polygon.chainId; let itemsPerPage = 5; -let nftStoreCollectionName = 'nftSmartContract1'; +let nftStoreItemCollectionName = 'nftSmartContract1'; const suspenseTemplate = '
'; test.beforeEach(() => { @@ -20,17 +20,17 @@ test('should fetch page 1 of all NFTs on contract', async (t) => { const wrapper = mount( { setup() { - const { nfts } = useEvmNftGallery( + const { nfts } = useEvmNftGallery({ contractPublicKey, contractAddress, - dahNftV2Abi, + abi: dahNftV2Abi, chainId, - null, - blockchains.polygon.publicRpc, + holderPublicKey: null, + rpc: blockchains.polygon.publicRpc, itemsPerPage, - nftStoreCollectionName, - true - ); + nftStoreItemCollectionName, + isAscendingSort: true, + }); return { nfts }; }, template: suspenseTemplate, @@ -62,17 +62,17 @@ test('should fetch page 2 of all NFTs on contract', async (t) => { const wrapper = mount( { setup() { - const { nfts, getNftPage } = useEvmNftGallery( + const { nfts, getNftPage } = useEvmNftGallery({ contractPublicKey, contractAddress, - dahNftV2Abi, + abi: dahNftV2Abi, chainId, - null, - blockchains.polygon.publicRpc, // otherwise batch too large + holderPublicKey: null, + rpc: blockchains.polygon.publicRpc, // otherwise batch too large itemsPerPage, - nftStoreCollectionName, - true - ); + nftStoreItemCollectionName, + isAscendingSort: true, + }); return { nfts, getNftPage }; }, diff --git a/tests/dahNftV2/useEvmNftGallery.holder.test.js b/tests/dahNftV2/useEvmNftGallery.holder.test.js index 60d590b..7e03cf7 100644 --- a/tests/dahNftV2/useEvmNftGallery.holder.test.js +++ b/tests/dahNftV2/useEvmNftGallery.holder.test.js @@ -9,7 +9,7 @@ let contractPublicKey = '0x18582f2CA048ac5f22E5a64F92E8a7d7b1F806a4'; let contractAddress = '0x9c870E5B8724Db43E58Cd62C424E3071A3FB66E9'; let chainId = blockchains.polygon.chainId; let itemsPerPage = 5; -let nftStoreCollectionName = 'nftSmartContract1'; +let nftStoreItemCollectionName = 'nftSmartContract1'; const suspenseTemplate = '
'; test.beforeEach(() => { @@ -20,17 +20,17 @@ test('should fetch page 1 of NFTs by holder', async (t) => { const wrapper = mount( { setup() { - const { nfts } = useEvmNftGallery( + const { nfts } = useEvmNftGallery({ contractPublicKey, contractAddress, - dahNftV2Abi, + abi: dahNftV2Abi, chainId, contractPublicKey, - blockchains.polygon.publicRpc, + rpc: blockchains.polygon.publicRpc, itemsPerPage, - nftStoreCollectionName, - true - ); + nftStoreItemCollectionName, + isAscendingSort: true, + }); return { nfts }; }, template: suspenseTemplate, @@ -60,17 +60,17 @@ test('should fetch page 2 of NFTs by holder', async (t) => { const wrapper = mount( { setup() { - const { nfts, getNftPage } = useEvmNftGallery( + const { nfts, getNftPage } = useEvmNftGallery({ contractPublicKey, contractAddress, - dahNftV2Abi, + abi: dahNftV2Abi, chainId, contractPublicKey, - blockchains.polygon.publicRpc, // otherwise batch too large + rpc: blockchains.polygon.publicRpc, // otherwise batch too large itemsPerPage, - nftStoreCollectionName, - true - ); + nftStoreItemCollectionName, + isAscendingSort: true, + }); return { nfts, getNftPage }; }, @@ -115,17 +115,17 @@ test('should fetch page 1 of all NFTs by holder in desc order', async (t) => { const wrapper = mount( { setup() { - const { nfts } = useEvmNftGallery( + const { nfts } = useEvmNftGallery({ contractPublicKey, contractAddress, - dahNftV2Abi, - blockchains.polygon.chainId, - contractPublicKey, - blockchains.polygon.publicRpc, - 6, - 'a1', - false - ); + abi: dahNftV2Abi, + chainId: blockchains.polygon.chainId, + holderPublicKey: contractPublicKey, + rpc: blockchains.polygon.publicRpc, + itemsPerPage: 6, + nftStoreItemCollectionName: 'a1', + isAscendingSort: false, + }); return { nfts }; }, template: suspenseTemplate,