From b23d029fa6f38aa50ece3641ed2ffd6c0b2f615d Mon Sep 17 00:00:00 2001 From: Ibrahim Taveras Date: Mon, 2 Mar 2020 21:47:41 -0500 Subject: [PATCH] fixes browser tests in release mode --- e2e/browser-tests.spec.js | 11 +++++++++-- index.js | 3 +++ 2 files changed, 12 insertions(+), 2 deletions(-) diff --git a/e2e/browser-tests.spec.js b/e2e/browser-tests.spec.js index a1bc19f8861..868bd9ad680 100644 --- a/e2e/browser-tests.spec.js +++ b/e2e/browser-tests.spec.js @@ -308,6 +308,11 @@ describe('Browser Tests', () => { await TestHelpers.delay(1000); // Check that account approval is displayed with correct dapp name await TestHelpers.checkIfHasText('dapp-name-title', 'Uniswap Exchange'); + + // There is a yellow warning that pops up in dev mode, when canceling the connection request + // go to index.js and add this to the list of warnings + // to block in order to get it to work = "Error in RPC response", + // Tap on CANCEL button await TestHelpers.tapByText('CANCEL'); @@ -326,10 +331,12 @@ describe('Browser Tests', () => { await TestHelpers.checkIfVisible('browser-screen'); // Tap on options await TestHelpers.waitAndTap('options-button'); - // Tap on New tab + // Tap on Add to Favorites await TestHelpers.tapByText('Add to Favorites'); + // Check that we are on the correct screen + await TestHelpers.checkIfVisible('add-bookmark-screen'); // Tap on ADD button - await TestHelpers.tapByText('ADD'); + await TestHelpers.tap('add-bookmark-confirm-button'); }); it('should go back home and navigate to favorites', async () => { diff --git a/index.js b/index.js index 8d3d452af69..c12737d7869 100644 --- a/index.js +++ b/index.js @@ -12,6 +12,9 @@ useScreens(); // List of warnings that we're ignoring YellowBox.ignoreWarnings([ '{}', + // Uncomment the below line to run browser-tests.spec.js in debug mode + // in e2e tests until issue https://github.com/MetaMask/metamask-mobile/issues/1395 is resolved + //"Error in RPC response", "Can't perform a React state update", 'Error evaluating injectedJavaScript', 'createErrorFromErrorData',