diff options
Adds test for hiding tokens.
Diffstat (limited to 'test/e2e/beta/metamask-beta-ui.spec.js')
-rw-r--r-- | test/e2e/beta/metamask-beta-ui.spec.js | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/test/e2e/beta/metamask-beta-ui.spec.js b/test/e2e/beta/metamask-beta-ui.spec.js index 5b257ff65..2b52e1e7c 100644 --- a/test/e2e/beta/metamask-beta-ui.spec.js +++ b/test/e2e/beta/metamask-beta-ui.spec.js @@ -798,6 +798,25 @@ describe('MetaMask', function () { }) }) + describe('Hide token', () => { + it('hides the token when clicked', async () => { + const [hideTokenEllipsis] = await findElements(driver, By.css('.token-list-item__ellipsis')) + hideTokenEllipsis.click() + + const byTokenMenuDropdownOption = By.css('.token-menu-dropdown__option') + const tokenMenuDropdownOption = await driver.wait(until.elementLocated(byTokenMenuDropdownOption)) + tokenMenuDropdownOption.click() + + const confirmHideModal = await findElement(driver, By.css('span .modal')) + + const byHideTokenConfirmationButton = By.css('.hide-token-confirmation__button') + const hideTokenConfirmationButton = await driver.wait(until.elementLocated(byHideTokenConfirmationButton)) + hideTokenConfirmationButton.click() + + await driver.wait(until.stalenessOf(confirmHideModal)) + }) + }) + describe('Add existing token using search', () => { it('clicks on the Add Token button', async () => { const addToken = await findElement(driver, By.xpath(`//button[contains(text(), 'Add Token')]`)) |