From 31cbb58b62a70cdd288628c58248fc8e22863980 Mon Sep 17 00:00:00 2001 From: Mikhail Mikheev Date: Sat, 14 Sep 2019 18:43:29 +0300 Subject: [PATCH] add test for checking tokens in localstorage --- src/test/tokens.dom.enabling.test.js | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/src/test/tokens.dom.enabling.test.js b/src/test/tokens.dom.enabling.test.js index ac2d7218..c41e21b8 100644 --- a/src/test/tokens.dom.enabling.test.js +++ b/src/test/tokens.dom.enabling.test.js @@ -70,6 +70,13 @@ describe('DOM > Feature > Enable and disable default tokens', () => { expect(balanceRows[1]).toHaveTextContent('FTE') expect(balanceRows[2]).toHaveTextContent('STE') + await sleep(1000) + + const tokensFromStorage = await getActiveTokens() + + expect(Object.keys(tokensFromStorage)).toContain(firstErc20Token.address) + expect(Object.keys(tokensFromStorage)).toContain(secondErc20Token.address) + // disable tokens clickOnManageTokens(TokensDom) toggleToken(TokensDom, 'FTE') @@ -80,7 +87,5 @@ describe('DOM > Feature > Enable and disable default tokens', () => { balanceRows = TokensDom.getAllByTestId(BALANCE_ROW_TEST_ID) expect(balanceRows.length).toBe(1) expect(balanceRows[0]).toHaveTextContent('ETH') - - expect() }) })