REF: Move Privacy under General tab

This commit is contained in:
ncoelho 2021-04-06 12:31:56 +02:00
parent 56a519073c
commit 02df0d7b71
3 changed files with 16 additions and 16 deletions

View File

@ -33,6 +33,10 @@ const GeneralSettings = () => {
})(); })();
}); });
const navigateToPrivacy = () => {
navigate('SettingsPrivacy');
};
const stylesWithThemeHook = { const stylesWithThemeHook = {
root: { root: {
...styles.root, ...styles.root,
@ -57,6 +61,7 @@ const GeneralSettings = () => {
<BlueListItem component={TouchableOpacity} onPress={() => navigate('DefaultView')} title={loc.settings.default_title} chevron /> <BlueListItem component={TouchableOpacity} onPress={() => navigate('DefaultView')} title={loc.settings.default_title} chevron />
</> </>
)} )}
<BlueListItem title={loc.settings.privacy} onPress={navigateToPrivacy} testID="SettingsPrivacy" chevron />
{Platform.OS === 'ios' ? ( {Platform.OS === 'ios' ? (
<> <>
<BlueListItem <BlueListItem

View File

@ -17,17 +17,11 @@ const NetworkSettings = () => {
navigate('Broadcast'); navigate('Broadcast');
}; };
const navigateToPrivacy = () => {
navigate('SettingsPrivacy');
};
return ( return (
<SafeBlueArea> <SafeBlueArea>
<ScrollView> <ScrollView>
<BlueListItem title={loc.is_it_my_address.title} onPress={navigateToIsItMyAddress} testID="IsItMyAddress" chevron /> <BlueListItem title={loc.is_it_my_address.title} onPress={navigateToIsItMyAddress} testID="IsItMyAddress" chevron />
<BlueListItem title={loc.settings.network_broadcast} onPress={navigateToBroadcast} testID="Broadcast" chevron /> <BlueListItem title={loc.settings.network_broadcast} onPress={navigateToBroadcast} testID="Broadcast" chevron />
<BlueListItem title={loc.settings.privacy} onPress={navigateToPrivacy} testID="SettingsPrivacy" chevron />
</ScrollView> </ScrollView>
</SafeBlueArea> </SafeBlueArea>
); );

View File

@ -41,8 +41,18 @@ describe('BlueWallet UI Tests', () => {
await element(by.id('SettingsButton')).tap(); await element(by.id('SettingsButton')).tap();
// general // general
// enable AdvancedMode
await element(by.id('GeneralSettings')).tap(); await element(by.id('GeneralSettings')).tap();
// privacy
// trigger switches
await element(by.id('SettingsPrivacy')).tap();
await element(by.id('ClipboardSwith')).tap();
await element(by.id('ClipboardSwith')).tap();
await element(by.id('QuickActionsSwith')).tap();
await element(by.id('QuickActionsSwith')).tap();
await device.pressBack();
// enable AdvancedMode
await element(by.id('AdvancedMode')).tap(); await element(by.id('AdvancedMode')).tap();
await device.pressBack(); await device.pressBack();
// //
@ -139,15 +149,6 @@ describe('BlueWallet UI Tests', () => {
await element(by.id('CheckAddress')).tap(); await element(by.id('CheckAddress')).tap();
await expect(element(by.id('Result'))).toHaveText('None of the available wallets own the provided address.'); await expect(element(by.id('Result'))).toHaveText('None of the available wallets own the provided address.');
await device.pressBack(); await device.pressBack();
// privacy
// trigger switches
await element(by.id('SettingsPrivacy')).tap();
await element(by.id('ClipboardSwith')).tap();
await element(by.id('ClipboardSwith')).tap();
await element(by.id('QuickActionsSwith')).tap();
await element(by.id('QuickActionsSwith')).tap();
await device.pressBack();
await device.pressBack(); await device.pressBack();
// about // about