From 329d8d41752e486c3f88ecb99eb95720ee49f821 Mon Sep 17 00:00:00 2001 From: donosonaumczuk Date: Mon, 7 Mar 2022 20:36:24 -0300 Subject: [PATCH] Tests updated --- test/__setup.spec.ts | 10 ++++------ test/hub/profiles/profile-uri.spec.ts | 10 +++++----- test/other/misc.spec.ts | 4 ++-- 3 files changed, 11 insertions(+), 13 deletions(-) diff --git a/test/__setup.spec.ts b/test/__setup.spec.ts index 890c4da..b97265b 100644 --- a/test/__setup.spec.ts +++ b/test/__setup.spec.ts @@ -64,14 +64,12 @@ export const LENS_HUB_NFT_NAME = 'Lens Profiles'; export const LENS_HUB_NFT_SYMBOL = 'LENS'; export const MOCK_PROFILE_HANDLE = 'plant1ghost.eth'; export const FIRST_PROFILE_ID = 1; -export const MOCK_URI = - 'https://ipfs.fleek.co/ipfs/plantghostplantghostplantghostplantghostplantghostplantghos'; -export const OTHER_MOCK_URI = - 'https://ipfs.fleek.co/ipfs/ghostplantghostplantghostplantghostplantghostplantghostplan'; +export const MOCK_URI = 'https://ipfs.io/ipfs/QmbWqxBEKC3P8tqsKc98xmWNzrzDtRLMiMPL8wBuTGsMnR'; +export const OTHER_MOCK_URI = 'https://ipfs.io/ipfs/QmSfyMcnh1wnJHrAWCBjZHapTS859oNSsuDFiAPPdAHgHP'; export const MOCK_PROFILE_URI = - 'https://ipfs.fleek.co/ipfs/runningoutofthingstowriterunningoutofthingstowriterunningou'; + 'https://ipfs.io/ipfs/Qme7ss3ARVgxv6rXqVPiikMJ8u2NLgmgszg13pYrDKEoiu'; export const MOCK_FOLLOW_NFT_URI = - 'https://ipfs.fleek.co/ipfs/aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa'; + 'https://ipfs.fleek.co/ipfs/ghostplantghostplantghostplantghostplantghostplantghostplan'; export let accounts: Signer[]; export let deployer: Signer; diff --git a/test/hub/profiles/profile-uri.spec.ts b/test/hub/profiles/profile-uri.spec.ts index 48d5538..991f4dc 100644 --- a/test/hub/profiles/profile-uri.spec.ts +++ b/test/hub/profiles/profile-uri.spec.ts @@ -61,7 +61,7 @@ makeSuiteCleanRoom('Profile URI Functionality', function () { const tokenURI = await lensHub.tokenURI(FIRST_PROFILE_ID); const jsonMetadata = await getJsonMetadataFromBase64TokenUri(tokenURI); expect(jsonMetadata.name).to.eq(`@${MOCK_PROFILE_HANDLE}`); - expect(jsonMetadata.description).to.eq('TODO!'); + expect(jsonMetadata.description).to.eq(`@${MOCK_PROFILE_HANDLE} - Lens profile`); const expectedAttributes = [ { trait_type: 'id', value: `#${FIRST_PROFILE_ID.toString()}` }, { trait_type: 'owner', value: userAddress.toLowerCase() }, @@ -69,7 +69,7 @@ makeSuiteCleanRoom('Profile URI Functionality', function () { ]; expect(jsonMetadata.attributes).to.eql(expectedAttributes); expect(keccak256(toUtf8Bytes(tokenURI))).to.eq( - '0x39ab7aff2fb2de3fa3dccad5aeee7ad2ea195ed25701c696796e6307c31f5a66' + '0x469ce48ea715b49beb948de52681ae0bc8b5184b3793b3e2dbef0893699aca52' ); }); @@ -80,7 +80,7 @@ makeSuiteCleanRoom('Profile URI Functionality', function () { ).to.not.be.reverted; const tokenURI = await lensHub.tokenURI(FIRST_PROFILE_ID); expect(keccak256(toUtf8Bytes(tokenURI))).to.eq( - '0x39ab7aff2fb2de3fa3dccad5aeee7ad2ea195ed25701c696796e6307c31f5a66' + '0x469ce48ea715b49beb948de52681ae0bc8b5184b3793b3e2dbef0893699aca52' ); }); @@ -317,7 +317,7 @@ makeSuiteCleanRoom('Profile URI Functionality', function () { const tokenURIBefore = await lensHub.tokenURI(FIRST_PROFILE_ID); expect(keccak256(toUtf8Bytes(tokenURIBefore))).to.eq( - '0x24dda662d123bc6d39b9f905c9a28675c7b5183dc729e8cba3fe62b70d04956b' + '0xb95b30163b08bc4f0c096abf10b220cefc74697c7b2761f9794db082b4bdfd89' ); await expect( @@ -339,7 +339,7 @@ makeSuiteCleanRoom('Profile URI Functionality', function () { expect(tokenURIBefore).to.not.eq(tokenURIAfter); expect(keccak256(toUtf8Bytes(tokenURIAfter))).to.eq( - '0xc21c368c892e7f817fa8d747714e3561fb88fbb6a99095313c9c52f430c98ce6' + '0xb67bbdd6959319e9f8da1302a16a24cefbaa34b2a3b02dfc3fd83c2d292966da' ); }); diff --git a/test/other/misc.spec.ts b/test/other/misc.spec.ts index ee9e92f..231f259 100644 --- a/test/other/misc.spec.ts +++ b/test/other/misc.spec.ts @@ -158,7 +158,7 @@ makeSuiteCleanRoom('Misc', function () { const tokenURI = await lensHub.tokenURI(FIRST_PROFILE_ID); const jsonMetadata = await getJsonMetadataFromBase64TokenUri(tokenURI); expect(jsonMetadata.name).to.eq(`@${MOCK_PROFILE_HANDLE}`); - expect(jsonMetadata.description).to.eq('TODO!'); + expect(jsonMetadata.description).to.eq(`@${MOCK_PROFILE_HANDLE} - Lens profile`); const expectedAttributes = [ { trait_type: 'id', value: `#${FIRST_PROFILE_ID.toString()}` }, { trait_type: 'owner', value: userAddress.toLowerCase() }, @@ -166,7 +166,7 @@ makeSuiteCleanRoom('Misc', function () { ]; expect(jsonMetadata.attributes).to.eql(expectedAttributes); expect(keccak256(toUtf8Bytes(tokenURI))).to.eq( - '0x6f7d381b72a10ef9df298565a13f25f02a791991b055182aaab3783404f9a187' + '0x71e9566fdab9d3fa40a12c3d59506259837853b75e239d296f2406eac94e9547' ); });