diff --git a/test/e2e/benchmark.js b/test/e2e/benchmark.js index fc8843c58..c3ee944b4 100644 --- a/test/e2e/benchmark.js +++ b/test/e2e/benchmark.js @@ -7,7 +7,7 @@ const { hideBin } = require('yargs/helpers'); const ttest = require('ttest'); const { retry } = require('../../development/lib/retry'); const { exitWithError } = require('../../development/lib/exit-with-error'); -const { withFixtures } = require('./helpers'); +const { withFixtures, tinyDelayMs } = require('./helpers'); const { PAGES } = require('./webdriver/driver'); const DEFAULT_NUM_SAMPLES = 20; @@ -16,6 +16,7 @@ const ALL_PAGES = Object.values(PAGES); async function measurePage(pageName) { let metrics; await withFixtures({ fixtures: 'imported-account' }, async ({ driver }) => { + await driver.delay(tinyDelayMs); await driver.navigate(); await driver.fill('#password', 'correct horse battery staple'); await driver.press('#password', driver.Key.ENTER); diff --git a/test/e2e/helpers.js b/test/e2e/helpers.js index cde3b0243..46e13ebaa 100644 --- a/test/e2e/helpers.js +++ b/test/e2e/helpers.js @@ -11,6 +11,8 @@ const { buildWebDriver } = require('./webdriver'); const tinyDelayMs = 200; const regularDelayMs = tinyDelayMs * 2; const largeDelayMs = regularDelayMs * 2; +const xLargeDelayMs = largeDelayMs * 2; +const xxLargeDelayMs = xLargeDelayMs * 2; const dappPort = 8080; @@ -144,5 +146,7 @@ module.exports = { tinyDelayMs, regularDelayMs, largeDelayMs, + xLargeDelayMs, + xxLargeDelayMs, withFixtures, }; diff --git a/test/e2e/metrics.spec.js b/test/e2e/metrics.spec.js index fb54eea5d..498a6ccd0 100644 --- a/test/e2e/metrics.spec.js +++ b/test/e2e/metrics.spec.js @@ -1,6 +1,6 @@ const { strict: assert } = require('assert'); const waitUntilCalled = require('../lib/wait-until-called'); -const { withFixtures } = require('./helpers'); +const { withFixtures, tinyDelayMs } = require('./helpers'); /** * WARNING: These tests must be run using a build created with `yarn build:test:metrics`, so that it has @@ -30,6 +30,7 @@ describe('Segment metrics', function () { const threeSegmentEventsReceived = waitUntilCalled(segmentStub, null, { callCount: 3, }); + await driver.delay(tinyDelayMs); await driver.navigate(); await driver.fill('#password', 'correct horse battery staple'); diff --git a/test/e2e/tests/permissions.spec.js b/test/e2e/tests/permissions.spec.js index afc860731..503066626 100644 --- a/test/e2e/tests/permissions.spec.js +++ b/test/e2e/tests/permissions.spec.js @@ -1,5 +1,5 @@ const { strict: assert } = require('assert'); -const { withFixtures } = require('../helpers'); +const { withFixtures, xxLargeDelayMs } = require('../helpers'); describe('Permissions', function () { it('sets permissions and connect to Dapp', async function () { @@ -34,6 +34,7 @@ describe('Permissions', function () { await driver.waitUntilXWindowHandles(3); const windowHandles = await driver.getAllWindowHandles(); const extension = windowHandles[0]; + await driver.delay(xxLargeDelayMs); await driver.switchToWindowWithTitle( 'MetaMask Notification', windowHandles, diff --git a/test/e2e/tests/provider-events.spec.js b/test/e2e/tests/provider-events.spec.js index 0949dbf46..196b0bc08 100644 --- a/test/e2e/tests/provider-events.spec.js +++ b/test/e2e/tests/provider-events.spec.js @@ -1,5 +1,5 @@ const { strict: assert } = require('assert'); -const { withFixtures, regularDelayMs } = require('../helpers'); +const { withFixtures, regularDelayMs, xxLargeDelayMs } = require('../helpers'); describe('MetaMask', function () { it('provider should inform dapp when switching networks', async function () { @@ -27,7 +27,7 @@ describe('MetaMask', function () { await driver.openNewPage('http://127.0.0.1:8080/'); const networkDiv = await driver.findElement('#network'); const chainIdDiv = await driver.findElement('#chainId'); - await driver.delay(regularDelayMs); + await driver.delay(xxLargeDelayMs); assert.equal(await networkDiv.getText(), '1337'); assert.equal(await chainIdDiv.getText(), '0x539'); diff --git a/ui/components/app/advanced-gas-controls/advanced-gas-controls.component.js b/ui/components/app/advanced-gas-controls/advanced-gas-controls.component.js index ee9f3429d..667fa5e8a 100644 --- a/ui/components/app/advanced-gas-controls/advanced-gas-controls.component.js +++ b/ui/components/app/advanced-gas-controls/advanced-gas-controls.component.js @@ -140,5 +140,5 @@ AdvancedGasControls.propTypes = { maxPriorityFeeFiat: PropTypes.string, maxFeeFiat: PropTypes.string, gasErrors: PropTypes.object, - minimumGasLimit: PropTypes.number, + minimumGasLimit: PropTypes.string, }; diff --git a/ui/components/app/edit-gas-display/edit-gas-display.component.js b/ui/components/app/edit-gas-display/edit-gas-display.component.js index 703c4de83..c2cd0b3e2 100644 --- a/ui/components/app/edit-gas-display/edit-gas-display.component.js +++ b/ui/components/app/edit-gas-display/edit-gas-display.component.js @@ -312,7 +312,7 @@ EditGasDisplay.propTypes = { gasErrors: PropTypes.object, gasWarnings: PropTypes.object, onManualChange: PropTypes.func, - minimumGasLimit: PropTypes.number, + minimumGasLimit: PropTypes.string, balanceError: PropTypes.bool, estimatesUnavailableWarning: PropTypes.bool, hasGasErrors: PropTypes.bool, diff --git a/ui/components/ui/radio-group/index.scss b/ui/components/ui/radio-group/index.scss index 3c9685920..fc90ac975 100644 --- a/ui/components/ui/radio-group/index.scss +++ b/ui/components/ui/radio-group/index.scss @@ -1,9 +1,13 @@ .radio-group { display: grid; grid-template-columns: repeat(3, 1fr); - grid-template-rows: 100px; + grid-template-rows: 60px; width: 300px; + &--has-recommendation { + grid-template-rows: 100px; + } + label { cursor: pointer; } diff --git a/ui/components/ui/radio-group/radio-group.component.js b/ui/components/ui/radio-group/radio-group.component.js index e1c2f27e8..eb53782fc 100644 --- a/ui/components/ui/radio-group/radio-group.component.js +++ b/ui/components/ui/radio-group/radio-group.component.js @@ -1,5 +1,6 @@ import React, { useContext } from 'react'; import PropTypes from 'prop-types'; +import classNames from 'classnames'; import { I18nContext } from '../../../contexts/i18n'; import Typography from '../typography/typography'; import { @@ -11,21 +12,30 @@ import { export default function RadioGroup({ options, name, selectedValue, onChange }) { const t = useContext(I18nContext); + const hasRecommendation = Boolean( + options.find((option) => option.recommended), + ); + return ( -
+
{options.map((option) => { const checked = option.value === selectedValue; return (
diff --git a/ui/pages/confirm-transaction-base/confirm-transaction-base.component.js b/ui/pages/confirm-transaction-base/confirm-transaction-base.component.js index 3a3364466..ec0ca03ed 100644 --- a/ui/pages/confirm-transaction-base/confirm-transaction-base.component.js +++ b/ui/pages/confirm-transaction-base/confirm-transaction-base.component.js @@ -309,6 +309,7 @@ export default class ConfirmTransactionBase extends Component { return ( @@ -329,6 +330,7 @@ export default class ConfirmTransactionBase extends Component { return ( @@ -347,6 +349,7 @@ export default class ConfirmTransactionBase extends Component { return ( diff --git a/yarn.lock b/yarn.lock index a75eb3829..425241749 100644 --- a/yarn.lock +++ b/yarn.lock @@ -21426,9 +21426,9 @@ path-key@^3.0.0, path-key@^3.1.0: integrity sha512-ojmeN0qd+y0jszEtoY48r0Peq5dwMEkIlCOu6Q5f41lfkswXuKtYrhgoTpLnyIcHm24Uhqx+5Tqm2InSwLhE6Q== path-parse@^1.0.6: - version "1.0.6" - resolved "https://registry.yarnpkg.com/path-parse/-/path-parse-1.0.6.tgz#d62dbb5679405d72c4737ec58600e9ddcf06d24c" - integrity sha512-GSmOT2EbHrINBf9SR7CDELwlJ8AENk3Qn7OikK4nFYAu3Ote2+JYNVvkpAEQm3/TLNEJFD/xZJjzyxg3KBWOzw== + version "1.0.7" + resolved "https://registry.yarnpkg.com/path-parse/-/path-parse-1.0.7.tgz#fbc114b60ca42b30d9daf5858e4bd68bbedb6735" + integrity sha512-LDJzPVEEEPR+y48z93A0Ed0yXb8pAByGWo/k5YYdYgpY2/2EsOsksJrq7lOHxryrVOn1ejG6oAp8ahvOIQD8sw== path-platform@~0.11.15: version "0.11.15"