1
0
mirror of https://github.com/kremalicious/metamask-extension.git synced 2024-12-23 09:52:26 +01:00

update test-dapp to 5.0.0 (#13503)

* update test-dapp to 5.0.0

* Update edit-gas-fee.spec.js

* Lint

* Update send-eth.spec.js

* Update signature-request.spec.js

* typo

Co-authored-by: PeterYinusa <peter.yinusa@consensys.net>
Co-authored-by: Alex Donesky <adonesky@gmail.com>
This commit is contained in:
Brad Decker 2022-02-09 07:57:05 -06:00 committed by GitHub
parent 8166d50578
commit d45cb6c12e
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
5 changed files with 16 additions and 13 deletions

View File

@ -239,7 +239,7 @@
"@metamask/eslint-config-mocha": "^9.0.0",
"@metamask/eslint-config-nodejs": "^9.0.0",
"@metamask/forwarder": "^1.1.0",
"@metamask/test-dapp": "^4.0.1",
"@metamask/test-dapp": "^5.0.0",
"@sentry/cli": "^1.58.0",
"@storybook/addon-a11y": "^6.3.12",
"@storybook/addon-actions": "^6.3.12",

View File

@ -216,7 +216,10 @@ describe('Editing Confirm Transaction', function () {
// open dapp and connect
await connectDappWithExtensionPopup(driver);
await driver.clickElement({ text: 'Send', tag: 'button' });
await driver.clickElement({
text: 'Send EIP 1559 Transaction',
tag: 'button',
});
// check transaction in extension popup
const windowHandles = await getWindowHandles(driver, 3);
@ -238,17 +241,17 @@ describe('Editing Confirm Transaction', function () {
'.currency-display-component__text',
);
const transactionAmount = transactionAmounts[0];
assert.equal(await transactionAmount.getText(), '3');
assert.equal(await transactionAmount.getText(), '0');
// has correct updated value on the confirm screen the transaction
const editedTransactionAmounts = await driver.findElements(
'.transaction-detail-item__row .transaction-detail-item__detail-values .currency-display-component__text:last-of-type',
);
const editedTransactionAmount = editedTransactionAmounts[0];
assert.equal(await editedTransactionAmount.getText(), '0.00042');
assert.equal(await editedTransactionAmount.getText(), '0.00021');
const editedTransactionFee = editedTransactionAmounts[1];
assert.equal(await editedTransactionFee.getText(), '3.00042');
assert.equal(await editedTransactionFee.getText(), '0.00021');
// confirms the transaction
await driver.clickElement({ text: 'Confirm', tag: 'button' });
@ -268,7 +271,7 @@ describe('Editing Confirm Transaction', function () {
'.transaction-list-item__primary-currency',
);
assert.equal(txValues.length, 1);
assert.ok(/-3\s*ETH/u.test(await txValues[0].getText()));
assert.ok(/-0\s*ETH/u.test(await txValues[0].getText()));
},
);
});

View File

@ -256,7 +256,7 @@ describe('Send ETH from dapp using advanced gas controls', function () {
);
await driver.waitForSelector({
css: '.transaction-list-item__primary-currency',
text: '-3 ETH',
text: '-0 ETH',
});
// the transaction has the expected gas price

View File

@ -126,7 +126,7 @@ describe('Sign Typed Data V3 Signature Request', function () {
);
const origin = content[0];
const address = content[1];
const message = await driver.findElement(
const messages = await driver.findElements(
'.signature-request-message--node-value',
);
assert.equal(await title.getText(), 'Signature Request');
@ -138,7 +138,7 @@ describe('Sign Typed Data V3 Signature Request', function () {
publicAddress.length - 8,
)}`,
);
assert.equal(await message.getText(), 'Hello, Bob!');
assert.equal(await messages[4].getText(), 'Hello, Bob!');
// Approve signing typed data
await driver.clickElement({ text: 'Sign', tag: 'button' });

View File

@ -2873,10 +2873,10 @@
resolved "https://registry.yarnpkg.com/@metamask/snap-workers/-/snap-workers-0.5.0.tgz#9f1b8243f64819e40d66e659d580b6da59cb8015"
integrity sha512-sR30/nmkndPeLox282BdTNnU3g6Mo5Gt8rdr6PUSyfosbwrYtrbZcXFqR+ozK/gNhJ3de7hpjLXKNkVSF8OjOQ==
"@metamask/test-dapp@^4.0.1":
version "4.0.1"
resolved "https://registry.yarnpkg.com/@metamask/test-dapp/-/test-dapp-4.0.1.tgz#fbc66069687f0502ebb4c6ac0fa7c9862ea6563c"
integrity sha512-FN2Rz7ctY7Blx3iK6AmZmZEU+TkvEcpYvvebUmqZyOrmjh/DsYKVxfRicVAbyK9mDkeJ18Gx8r7swwFFR4rSgA==
"@metamask/test-dapp@^5.0.0":
version "5.0.0"
resolved "https://registry.yarnpkg.com/@metamask/test-dapp/-/test-dapp-5.0.0.tgz#ecea832b57ff97782bfdd57a4af3408c7c64c02d"
integrity sha512-eR9JQ0jPOeP/hdQj9hUkqbvinfjVLYTtdHV+mDCN1tsNxiTdninZbltg9bx6Gqp91v9/9YPhlhXCmMQPq/AMxQ==
"@mrmlnc/readdir-enhanced@^2.2.1":
version "2.2.1"