Privacy-first password manager with built-in email aliasing. Fully encrypted and self-hostable.
Add testids to password change flow (#1404)
Leendert de Borst01ad86882e85
diff --git a/apps/mobile-app/app/(tabs)/settings/index.tsx b/apps/mobile-app/app/(tabs)/settings/index.tsxindex 8a9c6c4f9..4de5df5a1 100644--- a/apps/mobile-app/app/(tabs)/settings/index.tsx+++ b/apps/mobile-app/app/(tabs)/settings/index.tsx@@ -477,6 +477,7 @@ export default function SettingsScreen() : React.ReactNode {</TouchableOpacity><View style={styles.separator} /><TouchableOpacity+ testID="security-settings-link"style={styles.settingItem}onPress={() => router.push('/(tabs)/settings/security')}>diff --git a/apps/mobile-app/app/(tabs)/settings/security/change-password.tsx b/apps/mobile-app/app/(tabs)/settings/security/change-password.tsxindex a09b2b9f4..e5e01a4d5 100644--- a/apps/mobile-app/app/(tabs)/settings/security/change-password.tsx+++ b/apps/mobile-app/app/(tabs)/settings/security/change-password.tsx@@ -122,7 +122,7 @@ export default function ChangePasswordScreen(): React.ReactNode {behavior={Platform.OS === 'ios' ? 'padding' : 'height'}style={styles.keyboardAvoidingView}>- <ThemedContainer>+ <ThemedContainer testID="change-password-screen"><ThemedScrollView><ThemedText style={styles.headerText}>{t('settings.securitySettings.changePassword.headerText')}@@ -132,6 +132,7 @@ export default function ChangePasswordScreen(): React.ReactNode {<View style={styles.inputContainer}><ThemedText style={styles.label}>{t('settings.securitySettings.changePassword.currentPassword')}</ThemedText><ThemedTextInput+ testID="current-password-input"secureTextEntryvalue={currentPassword}onChangeText={setCurrentPassword}@@ -142,6 +143,7 @@ export default function ChangePasswordScreen(): React.ReactNode {<View style={styles.inputContainer}><ThemedText style={styles.label}>{t('settings.securitySettings.changePassword.newPassword')}</ThemedText><ThemedTextInput+ testID="new-password-input"secureTextEntryvalue={newPassword}onChangeText={setNewPassword}@@ -152,6 +154,7 @@ export default function ChangePasswordScreen(): React.ReactNode {<View style={styles.inputContainer}><ThemedText style={styles.label}>{t('settings.securitySettings.changePassword.confirmNewPassword')}</ThemedText><ThemedTextInput+ testID="confirm-password-input"secureTextEntryvalue={confirmPassword}onChangeText={setConfirmPassword}@@ -160,6 +163,7 @@ export default function ChangePasswordScreen(): React.ReactNode {</View><ThemedButton+ testID="change-password-button"title={t('settings.securitySettings.changePassword.changePassword')}onPress={handleSubmit}loading={isLoading}diff --git a/apps/mobile-app/app/(tabs)/settings/security/index.tsx b/apps/mobile-app/app/(tabs)/settings/security/index.tsxindex 2f68d5132..c1ee97da2 100644--- a/apps/mobile-app/app/(tabs)/settings/security/index.tsx+++ b/apps/mobile-app/app/(tabs)/settings/security/index.tsx@@ -57,11 +57,12 @@ export default function SecuritySettingsScreen() : React.ReactNode {});return (- <ThemedContainer>+ <ThemedContainer testID="security-settings-screen"><ThemedScrollView><SettingsHeader title={t('settings.securitySettings.title')} description={t('settings.securitySettings.description')} icon="shield-checkmark" /><View style={styles.section}><TouchableOpacity+ testID="change-password-link"style={styles.settingItem}onPress={() => router.push('/settings/security/change-password')}>diff --git a/apps/mobile-app/components/themed/ThemedButton.tsx b/apps/mobile-app/components/themed/ThemedButton.tsxindex bf6254514..9f9867f43 100644--- a/apps/mobile-app/components/themed/ThemedButton.tsx+++ b/apps/mobile-app/components/themed/ThemedButton.tsx@@ -13,6 +13,7 @@ type ThemedButtonProps = {disabled?: boolean;style?: ViewStyle;textStyle?: TextStyle;+ testID?: string;};/**@@ -25,6 +26,7 @@ export const ThemedButton: React.FC<ThemedButtonProps> = ({disabled = false,style,textStyle,+ testID,}) => {const colors = useColors();@@ -59,6 +61,7 @@ export const ThemedButton: React.FC<ThemedButtonProps> = ({]}onPress={onPress}disabled={disabled || loading}+ testID={testID}><ThemedText style={[styles.buttonText, textStyle]}>{title}diff --git a/apps/mobile-app/context/AuthContext.tsx b/apps/mobile-app/context/AuthContext.tsxindex cb26676fb..9cb369bd4 100644--- a/apps/mobile-app/context/AuthContext.tsx+++ b/apps/mobile-app/context/AuthContext.tsx@@ -270,11 +270,6 @@ export const AuthProvider: React.FC<{await AsyncStorage.removeItem('refreshToken');await AsyncStorage.removeItem('authMethods');- // Note: We do NOT clear:- // - Username (preserved for login form prefill)- // - Vault data (preserved for potential RPO recovery)- // - Encryption key derivation params (needed to decrypt on re-login)-if (errorMessage) {// Show alertAlert.alert(