From 15d6bb9f286cd4c6608078ff417136443513ada3 Mon Sep 17 00:00:00 2001 From: Manuel Gellfart Date: Fri, 10 Mar 2023 17:09:16 +0100 Subject: [PATCH] test: e2e manually hide tokens (#1757) --- cypress/e2e/smoke/balances.cy.js | 23 +++++++++++++++++++++++ 1 file changed, 23 insertions(+) diff --git a/cypress/e2e/smoke/balances.cy.js b/cypress/e2e/smoke/balances.cy.js index 617d8a3533..e1ab6490a6 100644 --- a/cypress/e2e/smoke/balances.cy.js +++ b/cypress/e2e/smoke/balances.cy.js @@ -175,6 +175,29 @@ describe('Assets > Coins', () => { }) }) + describe('tokens can be manually hidden', () => { + it('hide single token', () => { + // Click hide Dai + cy.contains('Dai').parents('tr').find('button[aria-label="Hide asset"]').click() + // time to hide the asset + cy.wait(350) + cy.contains('Dai').should('not.exist') + }) + + it('unhide hidden token', () => { + // Open hide token menu + cy.contains('1 hidden token').click() + // uncheck dai token + cy.contains('Dai').parents('tr').find('input[type="checkbox"]').click() + // apply changes + cy.contains('Save').click() + // Dai token is visible again + cy.contains('Dai') + // The menu button shows "Hide tokens" label again + cy.contains('Hide tokens') + }) + }) + describe.skip('pagination should work', () => { before(() => { // Open the Safe used for testing pagination