Skip to content

Commit

Permalink
Round of test amendments
Browse files Browse the repository at this point in the history
  • Loading branch information
brickpop committed Jan 31, 2024
1 parent 2d0a721 commit c4ff99a
Show file tree
Hide file tree
Showing 4 changed files with 304 additions and 203 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@ import {
PluginRepoFactory__factory,
PluginRepoRegistry__factory,
DAO__factory,
IDAO,
} from '@aragon/osx-ethers';
import {SignerWithAddress} from '@nomiclabs/hardhat-ethers/signers';
import {expect} from 'chai';
Expand Down Expand Up @@ -151,6 +152,7 @@ describe('Member Access Condition E2E', () => {
memberAccessProposalDuration,
pluginUpgrader.address
);
// Internally call prepareInstallation, which deploys the condition
const installation = await installPlugin(psp, dao, pluginSetupRef, data);

mainVotingPlugin = MainVotingPlugin__factory.connect(
Expand All @@ -166,31 +168,29 @@ describe('Member Access Condition E2E', () => {
it('Executing a proposal to add membership works', async () => {
expect(await mainVotingPlugin.isMember(alice.address)).to.eq(false);

await memberAccessPlugin.proposeNewMember('0x', alice.address);

await expect(memberAccessPlugin.proposeNewMember('0x', alice.address)).to
.not.be.reverted;

expect(await mainVotingPlugin.isMember(alice.address)).to.eq(true);

// // Valid addition
// const actions: IDAO.ActionStruct[] = [
// {
// to: mainVotingPlugin.address,
// value: 0,
// data: mainVotingInterface.encodeFunctionData('addMember', [
// bob.address,
// ]),
// },
// ];
// Valid addition
const actions: IDAO.ActionStruct[] = [
{
to: mainVotingPlugin.address,
value: 0,
data: mainVotingInterface.encodeFunctionData('addMember', [
bob.address,
]),
},
];

// // Via direct create proposal
// expect(await mainVotingPlugin.isMember(bob.address)).to.eq(false);
// Via direct create proposal
expect(await mainVotingPlugin.isMember(bob.address)).to.eq(false);

// await expect(memberAccessPlugin.createArbitraryProposal('0x', actions)).to
// .not.be.reverted;
await expect(memberAccessPlugin.createArbitraryProposal('0x', actions)).to
.not.be.reverted;

// expect(await mainVotingPlugin.isMember(bob.address)).to.eq(true);
expect(await mainVotingPlugin.isMember(bob.address)).to.eq(true);
});

it('Executing a proposal to remove membership works', async () => {
Expand Down
Loading

0 comments on commit c4ff99a

Please sign in to comment.