diff --git a/src/screens/Apps/Assets/MintSuccess.tsx b/src/screens/Apps/Assets/MintSuccess.tsx
index e441c8be7..c316f693d 100644
--- a/src/screens/Apps/Assets/MintSuccess.tsx
+++ b/src/screens/Apps/Assets/MintSuccess.tsx
@@ -45,6 +45,7 @@ export default function AppAssetMintSuccess() {
icon={icon}
name={name}
ticker={ticker}
+ darkPurple
/>
diff --git a/src/screens/Settings/Backup.tsx b/src/screens/Settings/Backup.tsx
index 51aad35c3..c82a3ef8f 100644
--- a/src/screens/Settings/Backup.tsx
+++ b/src/screens/Settings/Backup.tsx
@@ -88,6 +88,7 @@ export default function Backup() {
const toggleNostrBackup = async () => {
const newConfig = { ...config, nostrBackup: !config.nostrBackup }
updateConfig(newConfig)
+ console.log('Updating backup with new config', newConfig)
if (newConfig.nostrBackup) {
const backupProvider = new BackupProvider({ pubkey: config.pubkey }, new IndexedDbSwapRepository())
await backupProvider.fullBackup(newConfig, arkadeSwaps ?? undefined).catch((error) => {
diff --git a/src/screens/Settings/Delegates.tsx b/src/screens/Settings/Delegates.tsx
index 36ffd73ff..de571836d 100644
--- a/src/screens/Settings/Delegates.tsx
+++ b/src/screens/Settings/Delegates.tsx
@@ -20,8 +20,7 @@ import Text, { TextSecondary } from '../../components/Text'
import { decodeArkAddress, isArkAddress } from '../../lib/address'
import { Network } from '@arkade-os/boltz-swap'
import { copyToClipboard } from '../../lib/clipboard'
-import { copiedToClipboard } from '../../lib/toast'
-import { useIonToast } from '@ionic/react'
+import { useToast } from '../../components/Toast'
// format the URL to ensure it has the correct protocol and no trailing slashes
const formatUrl = (host: string, path: string): string => {
@@ -124,7 +123,7 @@ function DelegateCard() {
const { wallet } = useContext(WalletContext)
const { setOption } = useContext(OptionsContext)
- const [present] = useIonToast()
+ const { toast } = useToast()
const [active, setActive] = useState(false)
const [delegate, setDelegate] = useState(getDelegateUrlForNetwork(aspInfo.network as Network))
@@ -144,7 +143,7 @@ function DelegateCard() {
const handleCopy = async (value: string) => {
await copyToClipboard(value)
- present(copiedToClipboard)
+ toast('Copied to clipboard')
}
const nextRolloverText = wallet.nextRollover
@@ -163,7 +162,7 @@ function DelegateCard() {
-
+
{delegate.url}
diff --git a/src/screens/Settings/General.tsx b/src/screens/Settings/General.tsx
index b7a5d3b5e..4c8f3528a 100644
--- a/src/screens/Settings/General.tsx
+++ b/src/screens/Settings/General.tsx
@@ -55,16 +55,11 @@ export default function General() {
option={SettingsOptions.Theme}
value={config.theme === Themes.Auto ? `Auto (${systemTheme})` : config.theme}
/>
-
+
-
+
-
+
diff --git a/src/screens/Settings/Vtxos.tsx b/src/screens/Settings/Vtxos.tsx
index b673ca006..bd338b0d8 100644
--- a/src/screens/Settings/Vtxos.tsx
+++ b/src/screens/Settings/Vtxos.tsx
@@ -23,8 +23,8 @@ import { EmptyCoinsList } from '../../components/Empty'
import WarningBox from '../../components/Warning'
import { ExtendedCoin, ExtendedVirtualCoin, isVtxoExpiringSoon } from '@arkade-os/sdk'
import { consoleError } from '../../lib/logs'
-import { IonCol, IonGrid, IonRow } from '@ionic/react'
import * as Sentry from '@sentry/react'
+import Grid from '../../components/Grid'
export default function Vtxos() {
const { aspInfo, calcBestMarketHour } = useContext(AspContext)
@@ -224,9 +224,9 @@ export default function Vtxos() {
}
return (
-
-
-
+
+
+
{amount}
{assets?.map((a) => (
@@ -235,13 +235,13 @@ export default function Vtxos() {
))}
-
- {tags}
-
+
+
{tags}
+
{expiry}
-
-
-
+
+
+
)
}
diff --git a/src/screens/Wallet/Receive/QrCode.tsx b/src/screens/Wallet/Receive/QrCode.tsx
index 304015bae..d17fc463d 100644
--- a/src/screens/Wallet/Receive/QrCode.tsx
+++ b/src/screens/Wallet/Receive/QrCode.tsx
@@ -457,13 +457,11 @@ export default function ReceiveQRCode() {
-
-
-
-
-
+
+ setShowAmountSheet(true)} secondary />
+ setShowCopySheet(true)} secondary />
+
+
{/* Amount bottom sheet */}
@@ -616,31 +614,17 @@ function AddressLine({
{title}
{prettyLongText(value, 12)}
-
{
event.stopPropagation()
onCopy(value)
}}
- style={{
- alignItems: 'center',
- background: 'var(--dark05)',
- border: 'none',
- borderRadius: '8px',
- color: 'var(--dark30)',
- cursor: 'pointer',
- display: 'flex',
- justifyContent: 'center',
- minWidth: '44px',
- minHeight: '44px',
- padding: 0,
- touchAction: 'manipulation',
- }}
>
{copied === value ? : }
-
+
)
diff --git a/src/screens/Wallet/Receive/Success.tsx b/src/screens/Wallet/Receive/Success.tsx
index 11fdd37fc..4c3428d9d 100644
--- a/src/screens/Wallet/Receive/Success.tsx
+++ b/src/screens/Wallet/Receive/Success.tsx
@@ -3,11 +3,8 @@ import Button from '../../../components/Button'
import ButtonsOnBottom from '../../../components/ButtonsOnBottom'
import Content from '../../../components/Content'
import FlexCol from '../../../components/FlexCol'
-import FlexRow from '../../../components/FlexRow'
import Padded from '../../../components/Padded'
-import Shadow from '../../../components/Shadow'
import Text from '../../../components/Text'
-import AssetAvatar from '../../../components/AssetAvatar'
import SuccessIcon from '../../../icons/Success'
import Success from '../../../components/Success'
import { NotificationsContext } from '../../../providers/notifications'
@@ -20,6 +17,7 @@ import { FiatContext } from '../../../providers/fiat'
import { WalletContext } from '../../../providers/wallet'
import { consoleError } from '../../../lib/logs'
import type { AssetDetails } from '@arkade-os/sdk'
+import AssetCard from '../../../components/AssetCard'
export default function ReceiveSuccess() {
const { config, useFiat } = useContext(ConfigContext)
@@ -98,22 +96,14 @@ export default function ReceiveSuccess() {
const icon = meta?.icon
return (
-
-
-
-
-
- {name}
- {ticker ? (
-
- {ticker}
-
- ) : null}
-
-
- {formatAssetAmount(a.amount, meta?.decimals ?? 0)}
-
-
+
)
})}
diff --git a/src/screens/Wallet/Send/Form.tsx b/src/screens/Wallet/Send/Form.tsx
index c7e711a2b..3db3261cd 100644
--- a/src/screens/Wallet/Send/Form.tsx
+++ b/src/screens/Wallet/Send/Form.tsx
@@ -1,5 +1,5 @@
import { useContext, useEffect, useState } from 'react'
-import { V2BrantaClient, BrantaServerBaseUrl, Payment } from '@branta-ops/branta'
+import { V2BrantaClient, BrantaServerBaseUrl } from '@branta-ops/branta'
import Button from '../../../components/Button'
import ErrorMessage from '../../../components/Error'
import ButtonsOnBottom from '../../../components/ButtonsOnBottom'
@@ -50,6 +50,13 @@ import { AnimatePresence, motion } from 'framer-motion'
import { overlaySlideUp, overlayStyle } from '../../../lib/animations'
import { useReducedMotion } from '../../../hooks/useReducedMotion'
+// TODO: Replace when SDK is accurate
+type BrantaPayment = Partial<
+ Awaited
>['payment'] & {
+ platform_logo_url: string
+ }
+>
+
const brantaClient = new V2BrantaClient({
baseUrl: BrantaServerBaseUrl.Production,
})
@@ -85,7 +92,7 @@ export default function SendForm() {
const [receivingAddresses, setReceivingAddresses] = useState()
const [scan, setScan] = useState(false)
const [rawScanData, setRawScanData] = useState('')
- const [brantaPayment, setBrantaPayment] = useState(null)
+ const [brantaPayment, setBrantaPayment] = useState(null)
const [brantaLoading, setBrantaLoading] = useState(false)
const [selectedAsset, setSelectedAsset] = useState(null)
const [showAssetSelector, setShowAssetSelector] = useState(false)
@@ -299,7 +306,7 @@ export default function SendForm() {
setBrantaLoading(true)
brantaClient
.getPaymentsByQRCode(rawScanData)
- .then((payments: Payment[]) => {
+ .then((payments: BrantaPayment[]) => {
if (cancelled) return
const payment = payments?.[0] ?? null
if (payment) {
diff --git a/src/screens/Wallet/Send/Success.tsx b/src/screens/Wallet/Send/Success.tsx
index 86d853a58..1ebf4e2e1 100644
--- a/src/screens/Wallet/Send/Success.tsx
+++ b/src/screens/Wallet/Send/Success.tsx
@@ -8,16 +8,14 @@ import Button from '../../../components/Button'
import ButtonsOnBottom from '../../../components/ButtonsOnBottom'
import Success from '../../../components/Success'
import FlexCol from '../../../components/FlexCol'
-import FlexRow from '../../../components/FlexRow'
import Padded from '../../../components/Padded'
-import Shadow from '../../../components/Shadow'
import Text from '../../../components/Text'
-import AssetAvatar from '../../../components/AssetAvatar'
import SuccessIcon from '../../../icons/Success'
import { formatAssetAmount, prettyAmount, prettyFiatAmount } from '../../../lib/format'
import { ConfigContext } from '../../../providers/config'
import { FiatContext } from '../../../providers/fiat'
import { WalletContext } from '../../../providers/wallet'
+import AssetCard from '../../../components/AssetCard'
export default function SendSuccess() {
const { config, useFiat } = useContext(ConfigContext)
@@ -48,7 +46,7 @@ export default function SendSuccess() {
? prettyFiatAmount(toFiat(totalSats), config.fiat)
: prettyAmount(totalSats)
- if (isAssetSend) {
+ if (isAssetSend && assetId) {
return (
<>
@@ -59,31 +57,14 @@ export default function SendSuccess() {
Payment sent!
-
-
-
-
-
-
- {assetName}
- {assetTicker ? (
-
- {assetTicker}
-
- ) : null}
-
-
- {formatAssetAmount(assetAmountValue, assetDecimals)}
-
-
-
+
{displayAmount} sent successfully
diff --git a/src/test/App.test.tsx b/src/test/App.test.tsx
index e9ffef349..8f9c7437f 100644
--- a/src/test/App.test.tsx
+++ b/src/test/App.test.tsx
@@ -1,5 +1,4 @@
import { act, render, screen, waitFor } from '@testing-library/react'
-import type { ReactNode } from 'react'
import { afterEach, beforeEach, describe, expect, it, vi } from 'vitest'
import App, { appReloader } from '../App'
import { AspContext } from '../providers/asp'
@@ -26,43 +25,6 @@ vi.mock('../lib/jsCapabilities', () => ({
detectJSCapabilities: vi.fn().mockResolvedValue({ isSupported: true }),
}))
-vi.mock('@ionic/react', async (importOriginal) => {
- const React = await import('react')
- const actual = await importOriginal()
-
- const IonTab = React.forwardRef(function MockIonTab(
- { children }: { children: ReactNode },
- ref: React.ForwardedRef<{ setActive: () => void; classList: { add: () => void; remove: () => void } }>,
- ) {
- React.useImperativeHandle(ref, () => ({
- setActive: () => {},
- classList: {
- add: () => {},
- remove: () => {},
- },
- }))
-
- return {children}
- })
-
- return {
- ...actual,
- IonApp: ({ children, className }: { children: ReactNode; className?: string }) => (
-
- {children}
-
- ),
- IonPage: ({ children }: { children: ReactNode }) => {children}
,
- IonTab,
- IonTabBar: ({ children }: { children: ReactNode }) => {children}
,
- IonTabButton: ({ children, onClick }: { children: ReactNode; onClick?: () => void }) => (
- {children}
- ),
- IonTabs: ({ children }: { children: ReactNode }) => {children}
,
- setupIonicReact: vi.fn(),
- }
-})
-
function renderApp({
authState,
initialized,
@@ -163,7 +125,7 @@ describe('App startup routing', () => {
it('keeps authenticated but uninitialized wallets on loading', async () => {
const { navigate, unlockWallet } = renderApp({ authState: 'authenticated', initialized: false })
- await waitFor(() => expect(screen.getByTestId('ion-app')).toBeInTheDocument())
+ await waitFor(() => expect(screen.getByTestId('app')).toBeInTheDocument())
expect(unlockWallet).not.toHaveBeenCalled()
expect(navigate).not.toHaveBeenCalledWith(Pages.Unlock)
})
@@ -212,28 +174,28 @@ describe('Navbar visibility', () => {
renderApp({ authState: 'locked', initialized: false, screen: Pages.Wallet, tab: Tabs.Wallet })
await screen.findByText('Unlock')
- const ionApp = screen.getByTestId('ion-app')
+ const ionApp = screen.getByTestId('app')
expect(ionApp.className).not.toContain('has-pill-navbar')
})
it('hides navbar during loading hold', async () => {
renderApp({ authState: 'authenticated', initialized: false, screen: Pages.Wallet, tab: Tabs.Wallet })
- const ionApp = await screen.findByTestId('ion-app')
+ const ionApp = await screen.findByTestId('app')
expect(ionApp.className).not.toContain('has-pill-navbar')
})
it('shows navbar on wallet root when authenticated and initialized', async () => {
renderApp({ authState: 'authenticated', initialized: true, screen: Pages.Wallet, tab: Tabs.Wallet })
- const ionApp = await screen.findByTestId('ion-app')
+ const ionApp = await screen.findByTestId('app')
expect(ionApp.className).toContain('has-pill-navbar')
})
it('shows navbar on apps root when authenticated and initialized', async () => {
renderApp({ authState: 'authenticated', initialized: true, screen: Pages.Apps, tab: Tabs.Apps })
- const ionApp = await screen.findByTestId('ion-app')
+ const ionApp = await screen.findByTestId('app')
expect(ionApp.className).toContain('has-pill-navbar')
})
@@ -246,7 +208,7 @@ describe('Navbar visibility', () => {
option: SettingsOptions.Menu,
})
- const ionApp = await screen.findByTestId('ion-app')
+ const ionApp = await screen.findByTestId('app')
expect(ionApp.className).toContain('has-pill-navbar')
})
@@ -259,7 +221,7 @@ describe('Navbar visibility', () => {
option: SettingsOptions.Password,
})
- const ionApp = await screen.findByTestId('ion-app')
+ const ionApp = await screen.findByTestId('app')
expect(ionApp.className).not.toContain('has-pill-navbar')
})
})
diff --git a/src/test/e2e/asset.test.ts b/src/test/e2e/asset.test.ts
index d29ffe86f..34ce0b390 100644
--- a/src/test/e2e/asset.test.ts
+++ b/src/test/e2e/asset.test.ts
@@ -77,11 +77,10 @@ test('should reissue an asset with control token', async ({ page }) => {
// mint asset with control token
await page.getByText('Mint', { exact: true }).click()
await page.waitForSelector('text=Mint Asset', { state: 'visible' })
- await page.getByTestId('asset-amount').locator('input:not(.cloned-input)').fill('500')
- await page.getByTestId('asset-name').locator('input:not(.cloned-input)').fill('ReissueCoin')
- await page.getByTestId('asset-ticker').locator('input:not(.cloned-input)').fill('RSI')
- const decimalsInput = page.getByTestId('asset-decimals').locator('input:not(.cloned-input)')
- await decimalsInput.clear()
+ await page.getByTestId('asset-amount').fill('500')
+ await page.getByTestId('asset-name').fill('ReissueCoin')
+ await page.getByTestId('asset-ticker').fill('RSI')
+ const decimalsInput = page.getByTestId('asset-decimals')
await decimalsInput.fill('0')
// select control asset from dropdown
@@ -103,7 +102,7 @@ test('should reissue an asset with control token', async ({ page }) => {
await page.waitForSelector('text=Additional Amount', { state: 'visible' })
// fill amount and submit
- await page.getByTestId('asset-amount').locator('input:not(.cloned-input)').fill('200')
+ await page.getByTestId('asset-amount').fill('200')
await page.getByText('Reissue', { exact: true }).click()
// confirm modal
diff --git a/src/test/e2e/delegate.test.ts b/src/test/e2e/delegate.test.ts
index eba159b2f..f135df590 100644
--- a/src/test/e2e/delegate.test.ts
+++ b/src/test/e2e/delegate.test.ts
@@ -14,17 +14,10 @@ test('should toggle delegates', async ({ page }) => {
await expect(toggle).toBeVisible()
// delegate may default to off in CI (no delegator service)
- const initialChecked = await toggle.getAttribute('checked')
+ const initialChecked = await toggle.getAttribute('data-checked')
await toggle.click()
- const maybeLater = page.getByRole('button', { name: 'Maybe later' })
- await maybeLater.waitFor({ state: 'visible', timeout: 150 }).catch(() => {})
- if (await maybeLater.isVisible()) {
- await maybeLater.click({ force: true })
- await maybeLater.waitFor({ state: 'hidden' }).catch(() => {})
- }
-
// toggle triggers window.location.reload(), wait for wallet to load
await waitForWalletPage(page)
await page.getByTestId('tab-settings').click()
@@ -33,11 +26,12 @@ test('should toggle delegates', async ({ page }) => {
toggle = page.getByTestId('toggle-delegates')
const expectedAfterToggle = initialChecked === 'true' ? 'false' : 'true'
- await expect(toggle).toHaveAttribute('checked', expectedAfterToggle)
if (expectedAfterToggle === 'true') {
+ expect(await toggle.getAttribute('data-checked')).toBe('true')
await expect(page.getByTestId('delegate-card')).toBeVisible()
} else {
+ expect(await toggle.getAttribute('data-checked')).toBe('false')
await expect(page.getByTestId('delegate-card')).not.toBeVisible()
}
})
diff --git a/src/test/e2e/keyboard.test.ts b/src/test/e2e/keyboard.test.ts
index 80d5d1a2c..7e5f9f3f6 100644
--- a/src/test/e2e/keyboard.test.ts
+++ b/src/test/e2e/keyboard.test.ts
@@ -6,7 +6,6 @@ async function setupWalletAndOpenKeyboard(page: Page) {
await createWallet(page)
await page.getByText('Receive').click()
await page.getByText('Add amount').click()
- await page.locator('ion-input[name="receive-amount-sheet"] input').click()
await page.waitForSelector('text=Save', { state: 'visible' })
}
diff --git a/src/test/e2e/nostr.test.ts b/src/test/e2e/nostr.test.ts
index a404971b0..e5406d2ed 100644
--- a/src/test/e2e/nostr.test.ts
+++ b/src/test/e2e/nostr.test.ts
@@ -33,7 +33,7 @@ test('should save config to nostr', async ({ page }) => {
// enable nostr backups
await page.getByTestId('tab-settings').click()
await page.getByText('backup', { exact: true }).click()
- await page.getByText('Enable Nostr backups').click()
+ await page.getByTestId('toggle-backup').click()
// change fiat currency to euro
await page.getByLabel('Go back').click()
@@ -50,7 +50,7 @@ test('should save config to nostr', async ({ page }) => {
// disable nostr backups
await page.getByLabel('Go back').click()
await page.getByText('backup', { exact: true }).click()
- await page.getByText('Enable Nostr backups').click()
+ await page.getByTestId('toggle-backup').click()
// change fiat currency to usd
await page.getByLabel('Go back').click()
@@ -153,7 +153,7 @@ test('should save swaps to nostr', async ({ page, isMobile }) => {
// enable nostr backups
await page.getByTestId('tab-settings').click()
await page.getByText('backup', { exact: true }).click()
- await page.getByText('Enable Nostr backups').click()
+ await page.getByTestId('toggle-backup').click()
await sleep(3000) // wait for backup to complete
// restore wallet
diff --git a/src/test/e2e/receive.test.ts b/src/test/e2e/receive.test.ts
index 6fde1a276..959f44f95 100644
--- a/src/test/e2e/receive.test.ts
+++ b/src/test/e2e/receive.test.ts
@@ -59,10 +59,9 @@ test('changing amount should update the invoice', async ({ page, isMobile }) =>
// fill amount to receive if provided
await page.getByText('Add amount').click()
if (isMobile) {
- await page.locator('ion-input[name="receive-amount-sheet"] input').click()
await handleKeyboardInput(page, sats)
} else {
- await page.locator('ion-input[name="receive-amount-sheet"] input').fill(sats.toString())
+ await page.locator('input[name="receive-amount-sheet"]').fill(sats.toString())
await page.getByText('Set amount').click()
}
@@ -81,14 +80,13 @@ test('changing amount should update the invoice', async ({ page, isMobile }) =>
await page.getByText('Edit amount').click()
if (isMobile) {
- await page.locator('ion-input[name="receive-amount-sheet"] input').click()
// delete previous amount
for (let i = 0; i < sats.toString().length + 1; i++) {
await page.getByTestId('keyboard-x').click()
}
await handleKeyboardInput(page, newSats)
} else {
- await page.locator('ion-input[name="receive-amount-sheet"] input').fill(newSats.toString())
+ await page.locator('input[name="receive-amount-sheet"]').fill(newSats.toString())
await page.getByText('Set amount').click()
}
diff --git a/src/test/e2e/send.test.ts b/src/test/e2e/send.test.ts
index 5ebc79dcf..cf66aa8b4 100644
--- a/src/test/e2e/send.test.ts
+++ b/src/test/e2e/send.test.ts
@@ -35,7 +35,7 @@ test('should send sats (some and max) to ark address', async ({ page, isMobile }
await page.getByText('Send').click()
// fill address
- await page.locator('ion-input[name="send-address"] input').fill(someArkAddress)
+ await page.locator('input[name="send-address"]').fill(someArkAddress)
// click max
await page.getByTestId('input-amount-max').click()
@@ -83,7 +83,7 @@ test('should send assets (some and max) to ark address', async ({ page, isMobile
await page.getByText('Send').click()
// fill address
- await page.locator('ion-input[name="send-address"] input').fill(someArkAddress)
+ await page.locator('input[name="send-address"]').fill(someArkAddress)
// select asset
await page.getByTestId('asset-selector').click()
@@ -91,10 +91,10 @@ test('should send assets (some and max) to ark address', async ({ page, isMobile
// fill amount
if (isMobile) {
- await page.locator('ion-input[name="send-amount"] input').click()
+ await page.locator('input[name="send-amount"]').click()
await handleKeyboardInput(page, 200)
} else {
- await page.locator('ion-input[name="send-amount"] input').fill('200')
+ await page.locator('input[name="send-amount"]').fill('200')
}
// continue to details page
@@ -119,7 +119,7 @@ test('should send assets (some and max) to ark address', async ({ page, isMobile
await page.getByText('Send').click()
// fill address
- await page.locator('ion-input[name="send-address"] input').fill(someArkAddress)
+ await page.locator('input[name="send-address"]').fill(someArkAddress)
// select asset
await page.getByTestId('asset-selector').click()
@@ -179,7 +179,7 @@ test('should send sats (some and max) to onchain address with chain swap', async
await page.getByText('Send').click()
// fill address
- await page.locator('ion-input[name="send-address"] input').fill(someOnchainAddress)
+ await page.locator('input[name="send-address"]').fill(someOnchainAddress)
// click max
await page.getByTestId('input-amount-max').click()
@@ -240,7 +240,7 @@ test('should send sats (some and max) to onchain address with collaborative exit
await page.getByText('Send').click()
// fill address
- await page.locator('ion-input[name="send-address"] input').fill(someOnchainAddress)
+ await page.locator('input[name="send-address"]').fill(someOnchainAddress)
// click max
await page.getByTestId('input-amount-max').click()
diff --git a/src/test/e2e/swap.test.ts b/src/test/e2e/swap.test.ts
index 870c2d96c..0b740596e 100644
--- a/src/test/e2e/swap.test.ts
+++ b/src/test/e2e/swap.test.ts
@@ -178,7 +178,7 @@ test('should refund failing swap', async ({ page }) => {
// try to send funds to Lightning
await page.getByText('Send').click()
- await page.locator('ion-input[name="send-address"] input').fill(invoice)
+ await page.locator('input[name="send-address"]').fill(invoice)
await page.getByText('Continue').click()
await page.getByText('Tap to Sign').click()
await page.getByTestId('loading-logo').waitFor({ timeout: 3000 })
diff --git a/src/test/e2e/utils.ts b/src/test/e2e/utils.ts
index 04f721665..097e3cd60 100644
--- a/src/test/e2e/utils.ts
+++ b/src/test/e2e/utils.ts
@@ -70,15 +70,14 @@ export async function mintAsset(page: Page, opts: MintAssetOptions): Promise {
async function resetWallet(page: Page): Promise {
await navigateToSettings(page)
await page.getByText('Reset wallet').click()
- await page.getByText('I have backed up my wallet').click()
+ await page.getByTestId('checkbox').click()
await page.getByRole('contentinfo').getByText('Reset wallet').click()
}
async function restoreWallet(page: Page, nsec: string): Promise {
await page.getByText('Other login options').click()
await page.getByText('Restore wallet').click()
- await page.locator('ion-input[name="private-key"] input').fill(nsec)
+ await page.locator('input[name="private-key"]').fill(nsec)
await page.getByText('Continue').click()
await waitForWalletPage(page)
}
diff --git a/src/test/screens/settings/backup.test.tsx b/src/test/screens/settings/backup.test.tsx
index 407bb3237..485db3dd3 100644
--- a/src/test/screens/settings/backup.test.tsx
+++ b/src/test/screens/settings/backup.test.tsx
@@ -44,6 +44,6 @@ describe('Backup screen with default password', () => {
await screen.findByText('Private key')
expect(screen.getByTestId('toggle-backup')).toBeInTheDocument()
- expect(screen.getByTestId('toggle-backup').getAttribute('checked')).toBe('true')
+ expect(screen.getByTestId('toggle-backup').getAttribute('data-checked')).toBe('true')
})
})
diff --git a/src/test/screens/settings/delegates.test.tsx b/src/test/screens/settings/delegates.test.tsx
index 03eaae926..ac6d07ef9 100644
--- a/src/test/screens/settings/delegates.test.tsx
+++ b/src/test/screens/settings/delegates.test.tsx
@@ -40,6 +40,6 @@ describe('Delegates screen', () => {
expect(screen.getByText('Use default Arkade delegate')).toBeInTheDocument()
expect(screen.getByText(/Delegates can only renew your VTXOs/)).toBeInTheDocument()
expect(screen.getByTestId('delegate-card')).toBeInTheDocument()
- expect(screen.getByTestId('toggle-delegates').getAttribute('checked')).toBe('true')
+ expect(screen.getByTestId('toggle-delegates').getAttribute('data-checked')).toBe('true')
})
})
diff --git a/src/test/screens/settings/notifications.test.tsx b/src/test/screens/settings/notifications.test.tsx
index 576bc8ffb..a671f065a 100644
--- a/src/test/screens/settings/notifications.test.tsx
+++ b/src/test/screens/settings/notifications.test.tsx
@@ -13,7 +13,7 @@ describe('Notifications screen', () => {
)
expect(screen.getByText('Allow notifications')).toBeInTheDocument()
expect(screen.getByTestId('toggle-notifications')).toBeInTheDocument()
- expect(screen.getByTestId('toggle-notifications').getAttribute('checked')).toBe('true')
+ expect(screen.getByTestId('toggle-notifications').getAttribute('data-checked')).toBe('true')
})
it('renders the notifications screen with the correct toggle', () => {
@@ -23,6 +23,6 @@ describe('Notifications screen', () => {
,
)
expect(screen.getByTestId('toggle-notifications')).toBeInTheDocument()
- expect(screen.getByTestId('toggle-notifications').getAttribute('checked')).toBe('true')
+ expect(screen.getByTestId('toggle-notifications').getAttribute('data-checked')).toBe('true')
})
})
diff --git a/src/test/setup.ts b/src/test/setup.ts
index 85d7b43e9..8c3c0c341 100644
--- a/src/test/setup.ts
+++ b/src/test/setup.ts
@@ -1,5 +1,4 @@
import '@testing-library/jest-dom/vitest'
-import { setupIonicReact } from '@ionic/react'
import { afterEach, beforeEach, vi } from 'vitest'
// jsdom adds ontouchstart which makes isMobileBrowser=true; remove it to simulate desktop
@@ -17,8 +16,6 @@ const createMatchMedia = (query: string): MediaQueryList =>
dispatchEvent: () => false,
}) as unknown as MediaQueryList
-setupIonicReact()
-
// Provide a stable matchMedia implementation for tests (used by useReducedMotion, usePwaInstalled, etc.).
// Keep this as a plain function so vi.restoreAllMocks() does not reset it.
Object.defineProperty(window, 'matchMedia', {