Skip to content

Commit

Permalink
update tests
Browse files Browse the repository at this point in the history
  • Loading branch information
KidSysco committed Dec 21, 2024
1 parent f475237 commit 40edbac
Show file tree
Hide file tree
Showing 4 changed files with 98 additions and 98 deletions.
74 changes: 37 additions & 37 deletions tests/dahDemoV1/useEvmNftGallery.history.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -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 = '<Suspense><div></div></Suspense>';

test.beforeEach(() => {
Expand All @@ -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,
Expand Down Expand Up @@ -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 };
},
Expand Down Expand Up @@ -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,
Expand Down Expand Up @@ -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,
Expand Down
48 changes: 24 additions & 24 deletions tests/dahDemoV1/useEvmNftGallery.holder.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -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 = '<Suspense><div></div></Suspense>';

test.beforeEach(() => {
Expand All @@ -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,
Expand Down Expand Up @@ -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 };
},
Expand Down Expand Up @@ -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,
Expand Down
30 changes: 15 additions & 15 deletions tests/dahNftV2/useEvmNftGallery.history.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -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 = '<Suspense><div></div></Suspense>';

test.beforeEach(() => {
Expand All @@ -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,
Expand Down Expand Up @@ -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 };
},
Expand Down
44 changes: 22 additions & 22 deletions tests/dahNftV2/useEvmNftGallery.holder.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -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 = '<Suspense><div></div></Suspense>';

test.beforeEach(() => {
Expand All @@ -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,
Expand Down Expand Up @@ -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 };
},
Expand Down Expand Up @@ -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,
Expand Down

0 comments on commit 40edbac

Please sign in to comment.