tst: manage wallets
This commit is contained in:
parent
8310c5f9fa
commit
d043b86310
@ -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}
|
||||
|
||||
@ -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>
|
||||
) : (
|
||||
|
||||
@ -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>
|
||||
|
||||
@ -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');
|
||||
});
|
||||
|
||||
|
||||
@ -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');
|
||||
});
|
||||
|
||||
Loading…
Reference in New Issue
Block a user