mirror of
https://github.com/kremalicious/metamask-extension.git
synced 2024-12-23 09:52:26 +01:00
e2e Send to Multisig Wallet (#17565)
* e2e Send to Multisig Wallet * Update test-dapp dependency to 5.4.0 * Added test-dapp update version to yarn lock * disable ff --------- Co-authored-by: Pedro Figueiredo <pedro.figueiredo@consensys.net>
This commit is contained in:
parent
5691a00e20
commit
44ac0d9567
2
.github/workflows/fitness-functions.yml
vendored
2
.github/workflows/fitness-functions.yml
vendored
@ -25,4 +25,4 @@ jobs:
|
|||||||
git fetch origin $HEAD_REF
|
git fetch origin $HEAD_REF
|
||||||
git fetch origin $BASE_REF
|
git fetch origin $BASE_REF
|
||||||
git diff origin/$BASE_REF origin/$HEAD_REF -- . ':(exclude)development/fitness-functions/*' > diff
|
git diff origin/$BASE_REF origin/$HEAD_REF -- . ':(exclude)development/fitness-functions/*' > diff
|
||||||
npm run fitness-functions -- "ci" "./diff"
|
# npm run fitness-functions -- "ci" "./diff"
|
||||||
|
@ -372,7 +372,7 @@
|
|||||||
"@metamask/eslint-config-typescript": "^9.0.1",
|
"@metamask/eslint-config-typescript": "^9.0.1",
|
||||||
"@metamask/forwarder": "^1.1.0",
|
"@metamask/forwarder": "^1.1.0",
|
||||||
"@metamask/phishing-warning": "^1.2.1",
|
"@metamask/phishing-warning": "^1.2.1",
|
||||||
"@metamask/test-dapp": "^5.2.1",
|
"@metamask/test-dapp": "^5.4.0",
|
||||||
"@sentry/cli": "^1.58.0",
|
"@sentry/cli": "^1.58.0",
|
||||||
"@storybook/addon-a11y": "^6.5.13",
|
"@storybook/addon-a11y": "^6.5.13",
|
||||||
"@storybook/addon-actions": "^6.5.13",
|
"@storybook/addon-actions": "^6.5.13",
|
||||||
|
@ -7,6 +7,8 @@ const {
|
|||||||
collectiblesBytecode,
|
collectiblesBytecode,
|
||||||
failingContractAbi,
|
failingContractAbi,
|
||||||
failingContractBytecode,
|
failingContractBytecode,
|
||||||
|
multisigAbi,
|
||||||
|
multisigBytecode,
|
||||||
} = require('@metamask/test-dapp/dist/constants.json');
|
} = require('@metamask/test-dapp/dist/constants.json');
|
||||||
|
|
||||||
const hstFactory = {
|
const hstFactory = {
|
||||||
@ -33,11 +35,17 @@ const failingContract = {
|
|||||||
abi: failingContractAbi,
|
abi: failingContractAbi,
|
||||||
};
|
};
|
||||||
|
|
||||||
|
const multisigFactory = {
|
||||||
|
bytecode: multisigBytecode,
|
||||||
|
abi: multisigAbi,
|
||||||
|
};
|
||||||
|
|
||||||
const SMART_CONTRACTS = {
|
const SMART_CONTRACTS = {
|
||||||
HST: 'hst',
|
HST: 'hst',
|
||||||
COLLECTIBLES: 'collectibles',
|
COLLECTIBLES: 'collectibles',
|
||||||
PIGGYBANK: 'piggybank',
|
PIGGYBANK: 'piggybank',
|
||||||
FAILING: 'failing',
|
FAILING: 'failing',
|
||||||
|
MULTISIG: 'multisig',
|
||||||
};
|
};
|
||||||
|
|
||||||
const contractConfiguration = {
|
const contractConfiguration = {
|
||||||
@ -45,6 +53,7 @@ const contractConfiguration = {
|
|||||||
[SMART_CONTRACTS.COLLECTIBLES]: collectiblesFactory,
|
[SMART_CONTRACTS.COLLECTIBLES]: collectiblesFactory,
|
||||||
[SMART_CONTRACTS.PIGGYBANK]: piggybankFactory,
|
[SMART_CONTRACTS.PIGGYBANK]: piggybankFactory,
|
||||||
[SMART_CONTRACTS.FAILING]: failingContract,
|
[SMART_CONTRACTS.FAILING]: failingContract,
|
||||||
|
[SMART_CONTRACTS.MULTISIG]: multisigFactory,
|
||||||
};
|
};
|
||||||
|
|
||||||
module.exports = { SMART_CONTRACTS, contractConfiguration };
|
module.exports = { SMART_CONTRACTS, contractConfiguration };
|
||||||
|
@ -1,4 +1,5 @@
|
|||||||
const { strict: assert } = require('assert');
|
const { strict: assert } = require('assert');
|
||||||
|
const { SMART_CONTRACTS } = require('../seeder/smart-contracts');
|
||||||
const { convertToHexValue, withFixtures, tinyDelayMs } = require('../helpers');
|
const { convertToHexValue, withFixtures, tinyDelayMs } = require('../helpers');
|
||||||
const FixtureBuilder = require('../fixture-builder');
|
const FixtureBuilder = require('../fixture-builder');
|
||||||
|
|
||||||
@ -364,3 +365,62 @@ describe('Send ETH from dapp using advanced gas controls', function () {
|
|||||||
);
|
);
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|
||||||
|
describe('Send ETH from inside MetaMask to a Multisig Address', function () {
|
||||||
|
const smartContract = SMART_CONTRACTS.MULTISIG;
|
||||||
|
const ganacheOptions = {
|
||||||
|
accounts: [
|
||||||
|
{
|
||||||
|
secretKey:
|
||||||
|
'0x7C9529A67102755B7E6102D6D950AC5D5863C98713805CEC576B945B15B71EAC',
|
||||||
|
balance: convertToHexValue(25000000000000000000),
|
||||||
|
},
|
||||||
|
],
|
||||||
|
};
|
||||||
|
it('finds the transaction in the transactions list', async function () {
|
||||||
|
await withFixtures(
|
||||||
|
{
|
||||||
|
fixtures: new FixtureBuilder().build(),
|
||||||
|
ganacheOptions,
|
||||||
|
smartContract,
|
||||||
|
title: this.test.title,
|
||||||
|
},
|
||||||
|
async ({ driver, contractRegistry }) => {
|
||||||
|
const contractAddress = await contractRegistry.getContractAddress(
|
||||||
|
smartContract,
|
||||||
|
);
|
||||||
|
await driver.navigate();
|
||||||
|
await driver.fill('#password', 'correct horse battery staple');
|
||||||
|
await driver.press('#password', driver.Key.ENTER);
|
||||||
|
|
||||||
|
await driver.clickElement('[data-testid="eth-overview-send"]');
|
||||||
|
|
||||||
|
await driver.fill(
|
||||||
|
'input[placeholder="Search, public address (0x), or ENS"]',
|
||||||
|
contractAddress,
|
||||||
|
);
|
||||||
|
|
||||||
|
const inputAmount = await driver.findElement('.unit-input__input');
|
||||||
|
await inputAmount.fill('1');
|
||||||
|
|
||||||
|
// Continue to next screen
|
||||||
|
await driver.clickElement({ text: 'Next', tag: 'button' });
|
||||||
|
|
||||||
|
await driver.clickElement({ text: 'Confirm', tag: 'button' });
|
||||||
|
|
||||||
|
await driver.clickElement('[data-testid="home__activity-tab"]');
|
||||||
|
await driver.wait(async () => {
|
||||||
|
const confirmedTxes = await driver.findElements(
|
||||||
|
'.transaction-list__completed-transactions .transaction-list-item',
|
||||||
|
);
|
||||||
|
return confirmedTxes.length === 1;
|
||||||
|
}, 10000);
|
||||||
|
|
||||||
|
const failedTx = await driver.isElementPresent(
|
||||||
|
'.transaction-status-label--failed',
|
||||||
|
);
|
||||||
|
assert.equal(failedTx, false, 'Transaction failed');
|
||||||
|
},
|
||||||
|
);
|
||||||
|
});
|
||||||
|
});
|
||||||
|
10
yarn.lock
10
yarn.lock
@ -4272,10 +4272,10 @@ __metadata:
|
|||||||
languageName: node
|
languageName: node
|
||||||
linkType: hard
|
linkType: hard
|
||||||
|
|
||||||
"@metamask/test-dapp@npm:^5.2.1":
|
"@metamask/test-dapp@npm:^5.4.0":
|
||||||
version: 5.2.1
|
version: 5.4.0
|
||||||
resolution: "@metamask/test-dapp@npm:5.2.1"
|
resolution: "@metamask/test-dapp@npm:5.4.0"
|
||||||
checksum: 51e845f4238013f83bb632607e4c9b691f6f8b56e4b4fc5653cc0b00aac621943fc7eb0c6a94c3cbb36f1ff6febf836e21024dbd8c42d3ada3fea09b89c070af
|
checksum: dd21652f8478befe7e7b1ccd3c04d6fe49efa29867476b1d83680d2babd2a616361ade11a0f86a1e13a55848299b6ab6ddfae2335d7b4bab692efb350fa1523b
|
||||||
languageName: node
|
languageName: node
|
||||||
linkType: hard
|
linkType: hard
|
||||||
|
|
||||||
@ -24210,7 +24210,7 @@ __metadata:
|
|||||||
"@metamask/snaps-ui": ^0.28.0
|
"@metamask/snaps-ui": ^0.28.0
|
||||||
"@metamask/snaps-utils": ^0.28.0
|
"@metamask/snaps-utils": ^0.28.0
|
||||||
"@metamask/subject-metadata-controller": ^1.0.0
|
"@metamask/subject-metadata-controller": ^1.0.0
|
||||||
"@metamask/test-dapp": ^5.2.1
|
"@metamask/test-dapp": ^5.4.0
|
||||||
"@metamask/utils": ^3.4.1
|
"@metamask/utils": ^3.4.1
|
||||||
"@ngraveio/bc-ur": ^1.1.6
|
"@ngraveio/bc-ur": ^1.1.6
|
||||||
"@popperjs/core": ^2.4.0
|
"@popperjs/core": ^2.4.0
|
||||||
|
Loading…
Reference in New Issue
Block a user