Skip to content

Commit d706bab

Browse files
test(ramps): update buy deeplink smoke tests for V2-only flow
Align SmokeMoney deeplink specs with UB2-always-on navigation and BuildQuote UI after rampsUnifiedBuyV2 removal. Co-authored-by: Cursor <cursoragent@cursor.com>
1 parent f1d5d0d commit d706bab

2 files changed

Lines changed: 17 additions & 4 deletions

File tree

tests/page-objects/Ramps/BuildQuoteView.ts

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@ import Gestures from '../../framework/Gestures';
33
import Utilities from '../../framework/Utilities';
44

55
import { BuildQuoteSelectors } from '../../../app/components/UI/Ramp/Aggregator/Views/BuildQuote/BuildQuote.testIds';
6+
import { BUILD_QUOTE_TEST_IDS } from '../../../app/components/UI/Ramp/Views/BuildQuote/BuildQuote.testIds';
67
import { AddressSelectorSelectors } from '../../../app/components/Views/AddressSelector/AddressSelector.testIds';
78
import { EncapsulatedElementType } from '../../framework';
89

@@ -73,6 +74,10 @@ class BuildQuoteView {
7374
return Matchers.getElementByID(BuildQuoteSelectors.CONTINUE_BUTTON);
7475
}
7576

77+
get backButton(): EncapsulatedElementType {
78+
return Matchers.getElementByID(BUILD_QUOTE_TEST_IDS.BACK_BUTTON);
79+
}
80+
7681
get quickAmount25(): EncapsulatedElementType {
7782
return Matchers.getElementByLabel('25%');
7883
}
@@ -116,6 +121,12 @@ class BuildQuoteView {
116121
});
117122
}
118123

124+
async tapBackButton(): Promise<void> {
125+
await Gestures.waitAndTap(this.backButton, {
126+
elemDescription: 'Back Button in Build Quote View',
127+
});
128+
}
129+
119130
async tapSelectAddressDropdown(): Promise<void> {
120131
await Gestures.waitAndTap(this.accountPickerDropdown, {
121132
elemDescription: 'Account dropdown in address selector',

tests/smoke/ramps/deeplink-to-buy-flow.spec.ts

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -44,11 +44,13 @@ describe(SmokeMoney('Buy Crypto Deeplinks'), () => {
4444
await device.launchApp({
4545
url: buyLink,
4646
});
47-
await BuildQuoteView.tapTokenDropdown('Ethereum');
47+
48+
// V2: chainId-only deeplink resolves to native ETH and opens BuildQuote directly.
49+
await Assertions.expectTextDisplayed('Buy ETH');
50+
await BuildQuoteView.tapBackButton();
4851

4952
await TokenSelectScreen.tapTokenByName('DAI');
50-
await Assertions.expectTextDisplayed('Dai Stablecoin');
51-
await Assertions.expectTextDisplayed('$275');
53+
await Assertions.expectTextDisplayed('Buy DAI');
5254
await Assertions.expectTextDisplayed('USD');
5355
},
5456
);
@@ -74,7 +76,7 @@ describe(SmokeMoney('Buy Crypto Deeplinks'), () => {
7476
await device.launchApp({
7577
url: BASE_USDC_BUY_DEEPLINK,
7678
});
77-
await Assertions.expectTextDisplayed('USD Coin');
79+
await Assertions.expectTextDisplayed('Buy USDC');
7880
},
7981
);
8082
});

0 commit comments

Comments
 (0)