diff --git a/e2e/__baselines__/buy-amount.png b/e2e/__baselines__/buy-amount.png
new file mode 100644
index 00000000..101a3cb0
Binary files /dev/null and b/e2e/__baselines__/buy-amount.png differ
diff --git a/e2e/__baselines__/sell-no-balance.png b/e2e/__baselines__/sell-no-balance.png
new file mode 100644
index 00000000..ef9c7f62
Binary files /dev/null and b/e2e/__baselines__/sell-no-balance.png differ
diff --git a/e2e/visual-coverage.json b/e2e/visual-coverage.json
index f8c3219f..b46ed4ce 100644
--- a/e2e/visual-coverage.json
+++ b/e2e/visual-coverage.json
@@ -134,14 +134,12 @@
"reason": "Asset-management screen; needs onboarded state plus the asset-list fixture."
},
"(auth)/buy/index.tsx": {
- "status": "pending",
- "tracking": "DFXswiss/dfx-wallet#186",
- "reason": "DFX buy flow; needs onboarded state and a mocked DFX backend response before a deterministic baseline."
+ "status": "baselined",
+ "baselines": ["buy-amount"]
},
"(auth)/sell/index.tsx": {
- "status": "pending",
- "tracking": "DFXswiss/dfx-wallet#186",
- "reason": "DFX sell flow; needs onboarded state and a mocked DFX backend response before a deterministic baseline."
+ "status": "baselined",
+ "baselines": ["sell-no-balance"]
},
"(auth)/kyc/index.tsx": {
"status": "pending",
diff --git a/e2e/visual/authenticated.test.ts b/e2e/visual/authenticated.test.ts
index e2defe90..81686891 100644
--- a/e2e/visual/authenticated.test.ts
+++ b/e2e/visual/authenticated.test.ts
@@ -188,5 +188,41 @@ describe('Visual Regression (full variant)', () => {
await pause();
await expectScreenToMatchBaseline('hardware-connect');
});
+
+ // Buy and sell are backend-driven, but their amount entry states are
+ // still deterministic once the route is open. Exercise both routes so a
+ // visual-only refactor cannot land without a real-device smoke test.
+ it('shows the buy amount screen', () =>
+ device
+ .openURL({ url: 'dfxwallet://buy' })
+ .then(() =>
+ waitFor(element(by.id('buy-screen')))
+ .toBeVisible()
+ .withTimeout(60_000),
+ )
+ .then(() => element(by.text('BTC')).tap())
+ .then(() =>
+ waitFor(element(by.id('buy-amount-input')))
+ .toBeVisible()
+ .withTimeout(30_000),
+ )
+ .then(() => pause())
+ .then(() => expectScreenToMatchBaseline('buy-amount')));
+
+ it('shows the sell amount entry state', () =>
+ device
+ .openURL({ url: 'dfxwallet://sell' })
+ .then(() =>
+ waitFor(element(by.id('sell-screen')))
+ .toBeVisible()
+ .withTimeout(60_000),
+ )
+ .then(() =>
+ waitFor(element(by.id('sell-no-balance')))
+ .toBeVisible()
+ .withTimeout(60_000),
+ )
+ .then(() => pause())
+ .then(() => expectScreenToMatchBaseline('sell-no-balance')));
});
});
diff --git a/src/components/Icon.tsx b/src/components/Icon.tsx
index 9f859019..039a8837 100644
--- a/src/components/Icon.tsx
+++ b/src/components/Icon.tsx
@@ -14,6 +14,7 @@ type IconName =
| 'close'
| 'lightning'
| 'arrow-left'
+ | 'arrow-right'
| 'user'
| 'shield'
| 'globe'
@@ -270,6 +271,18 @@ export function Icon({ name, size = 24, color, strokeWidth = 2 }: Props) {
/>
);
+ case 'arrow-right':
+ return (
+
+ );
case 'user':
return (