Skip to content

Commit

Permalink
fixed deeplink test by avoiding cold start (#5114)
Browse files Browse the repository at this point in the history
* fixed e2e test deeplinks URLs for profiles

* making ALL deeplinks test work by avoiding cold start (for now)

* added check for wallet-screen full load
  • Loading branch information
mwieja authored Oct 13, 2023
1 parent e53aed1 commit 0b11a18
Show file tree
Hide file tree
Showing 2 changed files with 23 additions and 14 deletions.
36 changes: 22 additions & 14 deletions e2e/deeplinks.spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -88,18 +88,18 @@ describe('Deeplinks spec', () => {
await Helpers.tapAlertWithButton('OK');
});

it.skip('should show the Profile Sheet for rainbow.me universal links with ENS names', async () => {
it('should show the Profile Sheet for rainbow.me universal links with ENS names', async () => {
await Helpers.openDeeplinkFromBackground(
'https://rainbow.me/rainbowwallet.eth'
'https://rainbow.me/profile/rainbowwallet.eth'
);
await Helpers.checkIfVisible('profile-sheet', 30000);
await Helpers.checkIfElementByTextIsVisible('rainbowwallet.eth', 30000);
await Helpers.swipe('profile-sheet', 'down');
});

it.skip('should show the Profile Sheet for rainbow.me universal links with 0x addresses', async () => {
it('should show the Profile Sheet for rainbow.me universal links with 0x addresses', async () => {
await Helpers.openDeeplinkFromBackground(
'https://rainbow.me/0xE46aBAf75cFbFF815c0b7FfeD6F02B0760eA27f1'
'https://rainbow.me/profile/0xE46aBAf75cFbFF815c0b7FfeD6F02B0760eA27f1'
);
await Helpers.checkIfVisible('profile-sheet', 30000);
await Helpers.checkIfElementByTextIsVisible(
Expand All @@ -109,38 +109,46 @@ describe('Deeplinks spec', () => {
await Helpers.swipe('profile-sheet', 'down');
});

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

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

it.skip('should be able to handle ethereum payments urls for DAI (mainnet)', async () => {
// 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'
);
await testEthereumDeeplink(url);
await testEthereumDeeplink(url, false);
});

it.skip('should be able to handle ethereum payments urls for ETH (arbitrum)', async () => {
// 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 ETH (arbitrum)', async () => {
const url = 'ethereum:payment-brunobarbieri.eth@42161?value=1e15';
await testEthereumDeeplink(url);
await testEthereumDeeplink(url, false);
});

it.skip('should be able to handle ethereum payments urls for DAI (optimism)', async () => {
// 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 (optimism)', async () => {
const url = escapeUrl(
'ethereum:0xda10009cbd5d07dd0cecc66161fc93d7c9000da1@10/transfer?address=brunobarbieri.eth&uint256=1e15'
);
await testEthereumDeeplink(url);
await testEthereumDeeplink(url, false);
});

it.skip('should be able to handle ethereum payments urls for MATIC (polygon)', async () => {
// 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 MATIC (polygon)', async () => {
const url = escapeUrl('ethereum:payment-brunobarbieri.eth@137?value=1e15');
await testEthereumDeeplink(url);
await testEthereumDeeplink(url, false);
});

afterAll(async () => {
Expand Down
1 change: 1 addition & 0 deletions e2e/watchedWalletCollectionActionsFlow.spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ describe('Watched showcase and hidden actions flow', () => {
);
await Helpers.waitAndTap('import-sheet-button');
await Helpers.waitAndTap('wallet-info-submit-button');
await Helpers.checkIfVisible('wallet-screen', 80000);
});

it('opens NFT', async () => {
Expand Down

0 comments on commit 0b11a18

Please sign in to comment.