Tests updated

This commit is contained in:
donosonaumczuk
2022-03-07 20:36:24 -03:00
parent 4031789c0c
commit 329d8d4175
3 changed files with 11 additions and 13 deletions

View File

@@ -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;

View File

@@ -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'
);
});

View File

@@ -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'
);
});