Merge pull request #8591 from BlueWallet/ref-managewallets-2
Some checks are pending
Build Release and Upload to TestFlight (iOS) / build (push) Waiting to run
Build Release and Upload to TestFlight (iOS) / testflight-upload (push) Blocked by required conditions
BuildReleaseApk / buildReleaseApk (push) Waiting to run
BuildReleaseApk / browserstack (push) Blocked by required conditions

tst: manage wallets
This commit is contained in:
GLaDOS 2026-05-27 22:22:18 +01:00 committed by GitHub
commit 4aa07ed904
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
5 changed files with 40 additions and 4 deletions

View File

@ -153,6 +153,7 @@ const ManageWalletsListItem: React.FC<ManageWalletsListItemProps> = ({
]}
onPress={onToggle}
accessibilityRole="button"
testID={isHidden ? 'SwipeShowBalance' : 'SwipeHideBalance'}
>
<Text style={[styles.rightActionText, { color: colors.buttonTextColor }]}>
{isHidden ? loc.wallets.swipe_balance_show : loc.wallets.swipe_balance_hide}

View File

@ -107,7 +107,7 @@ const WalletListItem: React.FC<Props> = ({
)}
{wallet.hideBalance ? (
<View style={styles.hiddenBalance}>
<View style={styles.hiddenBalance} testID="HiddenBalance">
<View style={styles.hiddenBalanceBar} />
</View>
) : (

View File

@ -593,7 +593,7 @@ const ManageWallets: React.FC = () => {
const hintTextColor = dark ? colors.foregroundColor : colors.alternativeTextColor;
return (
<Pressable accessibilityRole="text" style={styles.reorderHintContainer}>
<Pressable accessibilityRole="text" style={styles.reorderHintContainer} testID="DragToReorderHint">
<View style={styles.reorderHintIcon}>
<DragIcon color={hintTextColor} />
</View>

View File

@ -275,6 +275,33 @@ describe('BlueWallet UI Tests - no wallets', () => {
await waitForId('BitcoinAddressQRCode');
await waitForId('CopyTextToClipboard');
// ManageWallets: relaunch to clear receive modal, then open via long-press, swipe-to-hide, verify persists across restart
await device.launchApp({ newInstance: true });
await waitForId('WalletsList');
await element(by.id('cr34t3d')).longPress();
await waitForId('NavigationCloseButton');
await expect(element(by.id('cr34t3d'))).toBeVisible();
// swipe wallet row left to reveal Hide action; tap it
await element(by.id('cr34t3d')).swipe('left', 'slow', 0.6);
await waitForId('SwipeHideBalance');
await element(by.id('SwipeHideBalance')).tap();
await element(by.id('NavigationCloseButton')).tap();
await waitForId('WalletsList');
// restart app — hide state must persist; swipe-left now exposes "Show" (hideBalance persisted as true)
await device.launchApp({ newInstance: true });
await waitForId('WalletsList');
await element(by.id('cr34t3d')).longPress();
await waitForId('NavigationCloseButton');
await element(by.id('cr34t3d')).swipe('left', 'slow', 0.6);
await waitForId('SwipeShowBalance');
// restore visible state so subsequent tests are clean
await element(by.id('SwipeShowBalance')).tap();
await element(by.id('NavigationCloseButton')).tap();
await waitForId('WalletsList');
process.env.CI && require('fs').writeFileSync(lockFile, '1');
});

View File

@ -568,7 +568,6 @@ describe('BlueWallet UI Tests - import BIP84 wallet', () => {
await waitForKeyboardToClose();
await goBack();
await waitForText('testname');
await expect(element(by.id('WalletLabel'))).toHaveText('testname');
await element(by.id('WalletDetails')).tap();
// rename back
@ -578,7 +577,6 @@ describe('BlueWallet UI Tests - import BIP84 wallet', () => {
await waitForKeyboardToClose();
await goBack();
await waitForText('Imported HD SegWit (BIP84 Bech32 Native)');
await expect(element(by.id('WalletLabel'))).toHaveText('Imported HD SegWit (BIP84 Bech32 Native)');
await element(by.id('WalletDetails')).tap();
// wallet export
@ -599,6 +597,16 @@ describe('BlueWallet UI Tests - import BIP84 wallet', () => {
.scroll(500, 'down');
await tapAndTapAgainIfElementIsNotVisible('XpubButton', 'CopyTextToClipboard');
await goBack();
await goBack();
await goBack();
// ManageWallets — open via long-press, verify header + drag hint render
await waitForId('WalletsList');
await element(by.text('Imported HD SegWit (BIP84 Bech32 Native)')).longPress();
await waitForId('NavigationCloseButton');
await expect(element(by.id('Imported HD SegWit (BIP84 Bech32 Native)'))).toBeVisible();
await element(by.id('NavigationCloseButton')).tap();
await waitForId('WalletsList');
process.env.CI && require('fs').writeFileSync(lockFile, '1');
});