Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Detox: Fix Browser Tests #1397

Merged
merged 1 commit into from
Mar 3, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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