Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update account options menu design #8654

Merged
merged 1 commit into from
May 27, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 0 additions & 5 deletions app/images/expand.svg

This file was deleted.

6 changes: 0 additions & 6 deletions app/images/hide.svg

This file was deleted.

Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
8 changes: 0 additions & 8 deletions app/images/info.svg

This file was deleted.

3 changes: 0 additions & 3 deletions app/images/open-etherscan.svg

This file was deleted.

7 changes: 5 additions & 2 deletions test/e2e/metamask-responsive-ui.spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -117,9 +117,12 @@ describe('MetaMask', function () {

describe('Show account information', function () {
it('show account details dropdown menu', async function () {
await driver.clickElement(By.css('button.menu-bar__account-options'))
const options = await driver.findElements(By.css('div.menu.account-details-dropdown div.menu__item'))
await driver.clickElement(By.css('[data-testid="account-options-menu-button"]'))
const options = await driver.findElements(By.css('.account-options-menu .menu-item'))
assert.equal(options.length, 4) // HD Wallet type does not have to show the Remove Account option
// click outside of menu to dismiss
// account menu button chosen because the menu never covers it.
await driver.clickPoint(By.css('.account-menu__icon'), 0, 0)
await driver.delay(regularDelayMs)
})
})
Expand Down
9 changes: 9 additions & 0 deletions test/e2e/webdriver/driver.js
Original file line number Diff line number Diff line change
Expand Up @@ -71,6 +71,15 @@ class Driver {
await element.click()
}

async clickPoint (locator, x, y) {
const element = await this.findElement(locator)
await this.driver
.actions()
.move({ origin: element, x, y })
.click()
.perform()
}

async scrollToElement (element) {
await this.driver.executeScript('arguments[0].scrollIntoView(true)', element)
}
Expand Down
7 changes: 7 additions & 0 deletions test/helper.js
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,13 @@ global.document = window.document
// required by `react-tippy`
global.navigator = window.navigator
global.Element = window.Element
// required by `react-popper`
global.HTMLElement = window.HTMLElement

// required by any components anchored on `popover-content`
const popoverContent = window.document.createElement('div')
popoverContent.setAttribute('id', 'popover-content')
window.document.body.appendChild(popoverContent)

// delete AbortController added by jsdom so it can be polyfilled correctly below
delete window.AbortController
Expand Down

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

2 changes: 0 additions & 2 deletions ui/app/components/app/index.scss
Original file line number Diff line number Diff line change
Expand Up @@ -102,8 +102,6 @@

@import './connected-status-indicator/index';

@import './dropdowns/account-details-dropdown/index';

@import '../ui/check-box/index';

@import '../ui/dropdown/dropdown';
Expand Down
Loading