Skip to content

Commit

Permalink
fixes browser tests in release mode (#1397)
Browse files Browse the repository at this point in the history
  • Loading branch information
ibrahimtaveras00 authored Mar 3, 2020
1 parent c74c3e6 commit fcb05d5
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 2 deletions.
11 changes: 9 additions & 2 deletions e2e/browser-tests.spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -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');

Expand All @@ -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 () => {
Expand Down
3 changes: 3 additions & 0 deletions index.js
Original file line number Diff line number Diff line change
Expand Up @@ -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',
Expand Down

0 comments on commit fcb05d5

Please sign in to comment.