Skip to content

Commit

Permalink
e2e: deeplinks - use 0x addresses (#5346)
Browse files Browse the repository at this point in the history
* e2e: deeplinks - use 0x addresses

* disabled deeplink tests
  • Loading branch information
skylarbarrera authored Jan 29, 2024
1 parent ed1df89 commit 7014863
Showing 1 changed file with 17 additions and 10 deletions.
27 changes: 17 additions & 10 deletions e2e/deeplinks.spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,8 @@
import { exec } from 'child_process';
import * as Helpers from './helpers';

const RAINBOW_WALLET_ADDRESS = '0x7a3d05c70581bD345fe117c06e45f9669205384f';

const android = device.getPlatform() === 'android';

const testEthereumDeeplink = async (url, coldStart = true) => {
Expand Down Expand Up @@ -41,7 +43,7 @@ beforeAll(async () => {
}
});

describe('Deeplinks spec', () => {
describe.skip('Deeplinks spec', () => {
it('Should show the welcome screen', async () => {
await Helpers.checkIfVisible('welcome-screen');
});
Expand Down Expand Up @@ -81,8 +83,7 @@ describe('Deeplinks spec', () => {
});

it('should reject ethereum urls for assets that are not in the wallet', async () => {
const url =
'ethereum:0xef2e9966eb61bb494e5375d5df8d67b7db8a780d@1/transfer?address=brunobarbieri.eth&uint256=1e15';
const url = `ethereum:0xef2e9966eb61bb494e5375d5df8d67b7db8a780d@1/transfer?address=${RAINBOW_WALLET_ADDRESS}&uint256=1e15`;
await Helpers.openDeeplinkFromBackground(url);
await Helpers.checkIfElementByTextIsVisible('Ooops!', 30000);
await Helpers.tapAlertWithButton('OK');
Expand All @@ -109,45 +110,51 @@ describe('Deeplinks spec', () => {
await Helpers.swipe('profile-sheet', 'down');
});

it('should be able to handle ethereum payments urls for ETH (mainnet)', async () => {
const url = escapeUrl('ethereum:payment-brunobarbieri.eth@1?value=1e2');
it.skip('should be able to handle ethereum payments urls for ETH (mainnet)', async () => {
const url = escapeUrl(
`ethereum:payment-${RAINBOW_WALLET_ADDRESS}@1?value=1e2`
);
await testEthereumDeeplink(url, false);
});

it.skip('should be able to handle ethereum payments urls for ETH (optimism)', async () => {
const url = escapeUrl('ethereum:payment-brunobarbieri.eth@10?value=1e15');
const url = escapeUrl(
`ethereum:payment-${RAINBOW_WALLET_ADDRESS}@10?value=1e15`
);
await testEthereumDeeplink(url, false);
});

// FIXME: when doing open deeplinks with cold start, the account assets state
// comes back empty, find a fix and then change these tests to cold-start again
it('should be able to handle ethereum payments urls for DAI (mainnet)', async () => {
const url = escapeUrl(
'ethereum:0x6b175474e89094c44da98b954eedeac495271d0f@1/transfer?address=brunobarbieri.eth&uint256=1e18'
`ethereum:0x6b175474e89094c44da98b954eedeac495271d0f@1/transfer?address=${RAINBOW_WALLET_ADDRESS}&uint256=1e18`
);
await testEthereumDeeplink(url, false);
});

// FIXME: when doing open deeplinks with cold start, the account assets state
// comes back empty, find a fix and then change these tests to cold-start again
it.skip('should be able to handle ethereum payments urls for ETH (arbitrum)', async () => {
const url = 'ethereum:payment-brunobarbieri.eth@42161?value=1e15';
const url = `ethereum:payment-${RAINBOW_WALLET_ADDRESS}@42161?value=1e15`;
await testEthereumDeeplink(url, false);
});

// FIXME: when doing open deeplinks with cold start, the account assets state
// comes back empty, find a fix and then change these tests to cold-start again
it.skip('should be able to handle ethereum payments urls for DAI (optimism)', async () => {
const url = escapeUrl(
'ethereum:0xda10009cbd5d07dd0cecc66161fc93d7c9000da1@10/transfer?address=brunobarbieri.eth&uint256=1e15'
`ethereum:0xda10009cbd5d07dd0cecc66161fc93d7c9000da1@10/transfer?address=${RAINBOW_WALLET_ADDRESS}&uint256=1e15`
);
await testEthereumDeeplink(url, false);
});

// FIXME: when doing open deeplinks with cold start, the account assets state
// comes back empty, find a fix and then change these tests to cold-start again
it.skip('should be able to handle ethereum payments urls for MATIC (polygon)', async () => {
const url = escapeUrl('ethereum:payment-brunobarbieri.eth@137?value=1e15');
const url = escapeUrl(
`ethereum:payment-${RAINBOW_WALLET_ADDRESS}@137?value=1e15`
);
await testEthereumDeeplink(url, false);
});

Expand Down

0 comments on commit 7014863

Please sign in to comment.