Skip to content

Commit d7aec8a

Browse files
authored
chore: move flaky test to quarantine (#16120)
## **Description** There's a flaky test that makes smoke runs to fail, I'm putting this in quarantine until we have time to check and fix this issue. ## **Related issues** Fixes: Fails in smoke runs ## **Manual testing steps** 1. Go to this page... 2. 3. ## **Screenshots/Recordings** <!-- If applicable, add screenshots and/or recordings to visualize the before and after of your change. --> ### **Before** <!-- [screenshots/recordings] --> ### **After** <!-- [screenshots/recordings] --> ## **Pre-merge author checklist** - [ ] I’ve followed [MetaMask Contributor Docs](https://github.com/MetaMask/contributor-docs) and [MetaMask Mobile Coding Standards](https://github.com/MetaMask/metamask-mobile/blob/main/.github/guidelines/CODING_GUIDELINES.md). - [ ] I've completed the PR template to the best of my ability - [ ] I’ve included tests if applicable - [ ] I’ve documented my code using [JSDoc](https://jsdoc.app/) format if applicable - [ ] I’ve applied the right labels on the PR (see [labeling guidelines](https://github.com/MetaMask/metamask-mobile/blob/main/.github/guidelines/LABELING_GUIDELINES.md)). Not required for external contributors. ## **Pre-merge reviewer checklist** - [ ] I've manually tested the PR (e.g. pull and build branch, run the app, test code being changed). - [ ] I confirm that this PR addresses all acceptance criteria described in the ticket it closes and includes the necessary testing evidence such as recordings and or screenshots.
1 parent 4a3ed84 commit d7aec8a

1 file changed

Lines changed: 105 additions & 0 deletions

File tree

Lines changed: 105 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,105 @@
1+
'use strict';
2+
import { loginToApp } from '../../viewHelper';
3+
4+
import FixtureBuilder from '../../fixtures/fixture-builder';
5+
import { withFixtures } from '../../fixtures/fixture-helper';
6+
7+
import TestHelpers from '../../helpers';
8+
import SellGetStartedView from '../../pages/Ramps/SellGetStartedView';
9+
import { SmokeTrade } from '../../tags';
10+
11+
import BuildQuoteView from '../../pages/Ramps/BuildQuoteView';
12+
import Assertions from '../../utils/Assertions';
13+
import NetworkApprovalBottomSheet from '../../pages/Network/NetworkApprovalBottomSheet';
14+
import NetworkAddedBottomSheet from '../../pages/Network/NetworkAddedBottomSheet';
15+
import NetworkEducationModal from '../../pages/Network/NetworkEducationModal';
16+
import NetworkListModal from '../../pages/Network/NetworkListModal';
17+
import { PopularNetworksList } from '../../resources/networks.e2e';
18+
19+
describe(SmokeTrade('Sell Crypto Deeplinks'), () => {
20+
beforeAll(async () => {
21+
await TestHelpers.reverseServerPort();
22+
});
23+
24+
beforeEach(async () => {
25+
jest.setTimeout(150000);
26+
});
27+
28+
const itif = (condition) => (condition ? it : it.skip);
29+
30+
itif(device.getPlatform() === 'android')('should deep link to offramp ETH', async () => {
31+
const sellDeepLinkURL = 'metamask://sell?chainId=1&amount=50';
32+
const franceRegion = {
33+
currencies: ['/currencies/fiat/eur'],
34+
emoji: '🇫🇷',
35+
id: '/regions/fr',
36+
name: 'France',
37+
support: { buy: true, sell: true, recurringBuy: true },
38+
unsupported: false,
39+
recommended: false,
40+
detected: false,
41+
};
42+
await withFixtures(
43+
{
44+
fixture: new FixtureBuilder()
45+
.withRampsSelectedRegion(franceRegion)
46+
.withRampsSelectedPaymentMethod()
47+
.build(),
48+
restartDevice: true,
49+
},
50+
async () => {
51+
await loginToApp();
52+
53+
await device.sendToHome();
54+
await device.launchApp({
55+
url: sellDeepLinkURL,
56+
});
57+
await Assertions.checkIfVisible(
58+
await SellGetStartedView.getStartedButton,
59+
);
60+
61+
await SellGetStartedView.tapGetStartedButton();
62+
await Assertions.checkIfVisible(BuildQuoteView.getQuotesButton);
63+
64+
await Assertions.checkIfTextIsDisplayed('50 ETH');
65+
},
66+
);
67+
});
68+
69+
itif(device.getPlatform() === 'android')('should deep link to offramp with Base but switch network to OP Mainnet', async () => {
70+
const sellDeepLink = 'metamask://sell?chainId=8453';
71+
72+
await withFixtures(
73+
{
74+
fixture: new FixtureBuilder()
75+
.withRampsSelectedRegion()
76+
.withRampsSelectedPaymentMethod()
77+
.build(),
78+
restartDevice: true,
79+
},
80+
async () => {
81+
await loginToApp();
82+
await device.sendToHome();
83+
await device.launchApp({
84+
url: sellDeepLink,
85+
});
86+
await Assertions.checkIfVisible(
87+
await SellGetStartedView.getStartedButton,
88+
);
89+
await SellGetStartedView.tapGetStartedButton();
90+
await Assertions.checkIfVisible(NetworkApprovalBottomSheet.container);
91+
await NetworkApprovalBottomSheet.tapCancelButton();
92+
await NetworkListModal.changeNetworkTo(
93+
PopularNetworksList.Optimism.providerConfig.nickname,
94+
);
95+
await NetworkApprovalBottomSheet.tapApproveButton();
96+
await NetworkAddedBottomSheet.tapCloseButton();
97+
await Assertions.checkIfVisible(NetworkEducationModal.container);
98+
await NetworkEducationModal.tapGotItButton();
99+
await Assertions.checkIfTextIsDisplayed(
100+
PopularNetworksList.Optimism.providerConfig.nickname,
101+
);
102+
},
103+
);
104+
});
105+
});

0 commit comments

Comments
 (0)