fix: Fixed publishing posts hardhat tests, also removes obsolete "only" markers.

This commit is contained in:
zer0dot
2022-09-30 17:50:59 -04:00
parent c4a6bef48f
commit 38662b62df
4 changed files with 21 additions and 11 deletions

View File

@@ -38,7 +38,7 @@ makeSuiteCleanRoom('Following', function () {
})
).to.not.be.reverted;
});
context.only('Generic', function () {
context('Generic', function () {
context('Negatives', function () {
it('UserTwo should fail to follow a nonexistent profile', async function () {
await expect(
@@ -191,7 +191,7 @@ makeSuiteCleanRoom('Following', function () {
});
});
context.only('Meta-tx', function () {
context('Meta-tx', function () {
context('Negatives', function () {
it('TestWallet should fail to follow with sig with signature deadline mismatch', async function () {
const nonce = (await lensHub.sigNonces(testWallet.address)).toNumber();
@@ -312,7 +312,7 @@ makeSuiteCleanRoom('Following', function () {
});
});
context.only('Scenarios', function () {
context('Scenarios', function () {
it('TestWallet should follow profile 1 with sig, receive a follow NFT with ID 1, follow NFT name and symbol should be correct', async function () {
const nonce = (await lensHub.sigNonces(testWallet.address)).toNumber();

View File

@@ -31,7 +31,7 @@ import {
} from '../../__setup.spec';
makeSuiteCleanRoom('Multi-State Hub', function () {
context.only('Common', function () {
context('Common', function () {
context('Negatives', function () {
it('User should fail to set the state on the hub', async function () {
await expect(lensHub.setState(ProtocolState.Paused)).to.be.revertedWith(
@@ -122,7 +122,7 @@ makeSuiteCleanRoom('Multi-State Hub', function () {
});
});
context.only('Paused State', function () {
context('Paused State', function () {
context('Scenarios', async function () {
it('User should create a profile, governance should pause the hub, transferring the profile should fail', async function () {
await expect(
@@ -1144,7 +1144,7 @@ makeSuiteCleanRoom('Multi-State Hub', function () {
});
});
context.only('PublishingPaused State', function () {
context('PublishingPaused State', function () {
context('Scenarios', async function () {
it('Governance should pause publishing, profile creation should work', async function () {
await expect(

View File

@@ -26,7 +26,7 @@ import {
} from '../../__setup.spec';
makeSuiteCleanRoom('Publishing mirrors', function () {
context.only('Generic', function () {
context('Generic', function () {
beforeEach(async function () {
await expect(
lensHub.createProfile({
@@ -291,7 +291,7 @@ makeSuiteCleanRoom('Publishing mirrors', function () {
});
});
context.only('Meta-tx', function () {
context('Meta-tx', function () {
beforeEach(async function () {
await expect(
lensHub.connect(testWallet).createProfile({

View File

@@ -201,6 +201,7 @@ makeSuiteCleanRoom('Publishing Posts', function () {
expect(
await postReturningTokenId({
vars: {
delegatedSigner: ZERO_ADDRESS,
profileId: FIRST_PROFILE_ID + 1,
contentURI: MOCK_URI,
collectModule: freeCollectModule.address,
@@ -315,6 +316,7 @@ makeSuiteCleanRoom('Publishing Posts', function () {
await expect(
lensHub.postWithSig({
delegatedSigner: ZERO_ADDRESS,
profileId: FIRST_PROFILE_ID,
contentURI: MOCK_URI,
collectModule: ZERO_ADDRESS,
@@ -328,7 +330,7 @@ makeSuiteCleanRoom('Publishing Posts', function () {
deadline: MAX_UINT256,
},
})
).to.be.revertedWith(ERRORS.EXECUTOR_INVALID);
).to.be.revertedWith(ERRORS.SIGNATURE_INVALID);
});
it('Testwallet should fail to post with sig with invalid deadline', async function () {
@@ -353,6 +355,7 @@ makeSuiteCleanRoom('Publishing Posts', function () {
await expect(
lensHub.postWithSig({
delegatedSigner: ZERO_ADDRESS,
profileId: FIRST_PROFILE_ID,
contentURI: MOCK_URI,
collectModule: ZERO_ADDRESS,
@@ -391,6 +394,7 @@ makeSuiteCleanRoom('Publishing Posts', function () {
await expect(
lensHub.postWithSig({
delegatedSigner: ZERO_ADDRESS,
profileId: FIRST_PROFILE_ID,
contentURI: MOCK_URI,
collectModule: ZERO_ADDRESS,
@@ -404,7 +408,7 @@ makeSuiteCleanRoom('Publishing Posts', function () {
deadline: MAX_UINT256,
},
})
).to.be.revertedWith(ERRORS.EXECUTOR_INVALID);
).to.be.revertedWith(ERRORS.SIGNATURE_INVALID);
});
it('Testwallet should fail to post with sig with an unwhitelisted collect module', async function () {
@@ -425,6 +429,7 @@ makeSuiteCleanRoom('Publishing Posts', function () {
await expect(
lensHub.postWithSig({
delegatedSigner: ZERO_ADDRESS,
profileId: FIRST_PROFILE_ID,
contentURI: MOCK_URI,
collectModule: userAddress,
@@ -463,6 +468,7 @@ makeSuiteCleanRoom('Publishing Posts', function () {
await expect(
lensHub.postWithSig({
delegatedSigner: ZERO_ADDRESS,
profileId: FIRST_PROFILE_ID,
contentURI: MOCK_URI,
collectModule: freeCollectModule.address,
@@ -502,6 +508,7 @@ makeSuiteCleanRoom('Publishing Posts', function () {
await expect(
lensHub.postWithSig({
delegatedSigner: ZERO_ADDRESS,
profileId: FIRST_PROFILE_ID,
contentURI: MOCK_URI,
collectModule: freeCollectModule.address,
@@ -515,7 +522,7 @@ makeSuiteCleanRoom('Publishing Posts', function () {
deadline: MAX_UINT256,
},
})
).to.be.revertedWith(ERRORS.EXECUTOR_INVALID);
).to.be.revertedWith(ERRORS.SIGNATURE_INVALID);
});
it('TestWallet should deploy bad EIP1271 implementer, transfer profile to it, then fail to post with sig', async function () {
@@ -542,6 +549,7 @@ makeSuiteCleanRoom('Publishing Posts', function () {
await expect(
lensHub.postWithSig({
delegatedSigner: ZERO_ADDRESS,
profileId: FIRST_PROFILE_ID,
contentURI: MOCK_URI,
collectModule: freeCollectModule.address,
@@ -582,6 +590,7 @@ makeSuiteCleanRoom('Publishing Posts', function () {
await expect(
lensHub.postWithSig({
delegatedSigner: ZERO_ADDRESS,
profileId: FIRST_PROFILE_ID,
contentURI: MOCK_URI,
collectModule: freeCollectModule.address,
@@ -634,6 +643,7 @@ makeSuiteCleanRoom('Publishing Posts', function () {
await expect(
lensHub.postWithSig({
delegatedSigner: ZERO_ADDRESS,
profileId: FIRST_PROFILE_ID,
contentURI: MOCK_URI,
collectModule: freeCollectModule.address,