Browse Source

[PM-2645] Adding IDs for Account Switching elements (#2572)

* Adding IDs for Account Switching elements

* Fixing Active/Inactive vault icon IDs
github-services/pull/2570/head
ifernandezdiaz 3 years ago committed by GitHub
parent
commit
43d2d386b1
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 4
      src/App/Controls/AccountSwitchingOverlay/AccountSwitchingOverlayView.xaml
  2. 29
      src/App/Controls/AccountViewCell/AccountViewCell.xaml
  3. 3
      src/App/Pages/Accounts/HomePage.xaml
  4. 11
      src/App/Pages/Accounts/LockPage.xaml
  5. 5
      src/App/Pages/Accounts/LoginPage.xaml
  6. 2
      src/App/Pages/Generator/GeneratorPage.xaml
  7. 3
      src/App/Pages/Send/SendAddOnlyPage.xaml
  8. 3
      src/App/Pages/Vault/CipherSelectionPage.xaml
  9. 3
      src/App/Pages/Vault/GroupingsPage/GroupingsPage.xaml

4
src/App/Controls/AccountSwitchingOverlay/AccountSwitchingOverlayView.xaml

@ -30,13 +30,15 @@ @@ -30,13 +30,15 @@
BackgroundColor="{DynamicResource BackgroundColor}"
VerticalOptions="Start"
RowHeight="{Binding AccountListRowHeight, Source={x:Reference _mainOverlay}}"
effects:ScrollViewContentInsetAdjustmentBehaviorEffect.ContentInsetAdjustmentBehavior="Never">
effects:ScrollViewContentInsetAdjustmentBehaviorEffect.ContentInsetAdjustmentBehavior="Never"
AutomationId="AccountListView">
<ListView.ItemTemplate>
<DataTemplate x:DataType="view:AccountView">
<controls:AccountViewCell
Account="{Binding .}"
SelectAccountCommand="{Binding SelectAccountCommand, Source={x:Reference _mainOverlay}}"
LongPressAccountCommand="{Binding LongPressAccountCommand, Source={x:Reference _mainOverlay}}"
AutomationId="AccountViewCell"
/>
</DataTemplate>
</ListView.ItemTemplate>

29
src/App/Controls/AccountViewCell/AccountViewCell.xaml

@ -1,4 +1,4 @@ @@ -1,4 +1,4 @@
<?xml version="1.0" encoding="UTF-8"?>
<?xml version="1.0" encoding="UTF-8"?>
<ViewCell xmlns="http://xamarin.com/schemas/2014/forms"
xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml"
xmlns:xct="http://xamarin.com/schemas/2020/toolkit"
@ -60,20 +60,23 @@ @@ -60,20 +60,23 @@
Text="{Binding AccountView.Email}"
IsVisible="{Binding IsActive}"
StyleClass="accountlist-title, accountlist-title-platform"
LineBreakMode="TailTruncation" />
LineBreakMode="TailTruncation"
AutomationId="AccountEmailLabel" />
<Label
Grid.Row="0"
Text="{Binding AccountView.Email}"
IsVisible="{Binding IsActive, Converter={StaticResource inverseBool}}"
StyleClass="accountlist-title, accountlist-title-platform"
TextColor="{DynamicResource MutedColor}"
LineBreakMode="TailTruncation" />
LineBreakMode="TailTruncation"
AutomationId="AccountEmailLabel" />
<Label
Grid.Row="1"
IsVisible="{Binding ShowHostname}"
Text="{Binding AccountView.Hostname}"
StyleClass="accountlist-sub, accountlist-sub-platform"
LineBreakMode="TailTruncation" />
LineBreakMode="TailTruncation"
AutomationId="AccountHostUrlLabel" />
<Label
Grid.Row="2"
Text="{u:I18n AccountUnlocked}"
@ -81,7 +84,8 @@ @@ -81,7 +84,8 @@
StyleClass="accountlist-sub, accountlist-sub-platform"
FontAttributes="Italic"
TextTransform="Lowercase"
LineBreakMode="TailTruncation" />
LineBreakMode="TailTruncation"
AutomationId="AccountStatusLabel" />
<Label
Grid.Row="2"
Text="{u:I18n AccountLocked}"
@ -89,7 +93,8 @@ @@ -89,7 +93,8 @@
StyleClass="accountlist-sub, accountlist-sub-platform"
FontAttributes="Italic"
TextTransform="Lowercase"
LineBreakMode="TailTruncation" />
LineBreakMode="TailTruncation"
AutomationId="AccountStatusLabel" />
<Label
Grid.Row="2"
Text="{u:I18n AccountLoggedOut}"
@ -97,7 +102,8 @@ @@ -97,7 +102,8 @@
StyleClass="accountlist-sub, accountlist-sub-platform"
FontAttributes="Italic"
TextTransform="Lowercase"
LineBreakMode="TailTruncation" />
LineBreakMode="TailTruncation"
AutomationId="AccountStatusLabel" />
</Grid>
<controls:IconLabel
@ -107,7 +113,8 @@ @@ -107,7 +113,8 @@
Margin="12,0"
HorizontalOptions="Center"
VerticalOptions="Center"
StyleClass="list-icon, list-icon-platform" />
StyleClass="list-icon, list-icon-platform"
AutomationId="InactiveVaultIcon" />
<controls:IconLabel
Grid.Column="2"
Text="{Binding AuthStatusIconActive}"
@ -116,7 +123,8 @@ @@ -116,7 +123,8 @@
HorizontalOptions="Center"
VerticalOptions="Center"
StyleClass="list-icon, list-icon-platform"
TextColor="{DynamicResource TextColor}"/>
TextColor="{DynamicResource TextColor}"
AutomationId="ActiveVaultIcon" />
</Grid>
<Grid
@ -147,7 +155,8 @@ @@ -147,7 +155,8 @@
StyleClass="accountlist-title, accountlist-title-platform"
LineBreakMode="TailTruncation"
VerticalOptions="Center"
Grid.Column="1" />
Grid.Column="1"
AutomationId="AddAccountButton" />
</Grid>
</Grid>
</ViewCell>

3
src/App/Pages/Accounts/HomePage.xaml

@ -23,7 +23,8 @@ @@ -23,7 +23,8 @@
Priority="-1"
UseOriginalImage="True"
AutomationProperties.IsInAccessibleTree="True"
AutomationProperties.Name="{u:I18n Account}" />
AutomationProperties.Name="{u:I18n Account}"
AutomationId="AccountIconButton" />
<ToolbarItem x:Name="_closeButton" Text="{u:I18n Close}" Command="{Binding CloseCommand}" Order="Primary" Priority="-1"/>
</ContentPage.ToolbarItems>

11
src/App/Pages/Accounts/LockPage.xaml

@ -24,7 +24,8 @@ @@ -24,7 +24,8 @@
Priority="-1"
UseOriginalImage="True"
AutomationProperties.IsInAccessibleTree="True"
AutomationProperties.Name="{u:I18n Account}" />
AutomationProperties.Name="{u:I18n Account}"
AutomationId="AccountIconButton" />
</ContentPage.ToolbarItems>
<ContentPage.Resources>
@ -72,7 +73,7 @@ @@ -72,7 +73,7 @@
Grid.Column="0"
ReturnType="Go"
ReturnCommand="{Binding SubmitCommand}"
AutomationId="PinEntry"/>
AutomationId="PinEntry" />
<controls:IconButton
StyleClass="box-row-button, box-row-button-platform"
Text="{Binding ShowPasswordIcon}"
@ -83,7 +84,7 @@ @@ -83,7 +84,7 @@
AutomationProperties.IsInAccessibleTree="True"
AutomationProperties.Name="{u:I18n ToggleVisibility}"
AutomationProperties.HelpText="{Binding PasswordVisibilityAccessibilityText}"
AutomationId="PinVisibilityToggle"/>
AutomationId="PinVisibilityToggle" />
</Grid>
<Grid
x:Name="_passwordGrid"
@ -114,7 +115,7 @@ @@ -114,7 +115,7 @@
Grid.Column="0"
ReturnType="Go"
ReturnCommand="{Binding SubmitCommand}"
AutomationId="MasterPasswordEntry"/>
AutomationId="MasterPasswordEntry" />
<controls:IconButton
StyleClass="box-row-button, box-row-button-platform"
Text="{Binding ShowPasswordIcon}"
@ -153,7 +154,7 @@ @@ -153,7 +154,7 @@
Text="{u:I18n Unlock}"
StyleClass="btn-primary"
Clicked="Unlock_Clicked"
AutomationId="UnlockVaultButton"/>
AutomationId="UnlockVaultButton" />
</StackLayout>
</StackLayout>
</ScrollView>

5
src/App/Pages/Accounts/LoginPage.xaml

@ -24,7 +24,8 @@ @@ -24,7 +24,8 @@
Priority="-1"
UseOriginalImage="True"
AutomationProperties.IsInAccessibleTree="True"
AutomationProperties.Name="{u:I18n Account}" />
AutomationProperties.Name="{u:I18n Account}"
AutomationId="AccountIconButton" />
</ContentPage.ToolbarItems>
<ContentPage.Resources>
@ -34,7 +35,7 @@ @@ -34,7 +35,7 @@
x:Name="_moreItem" x:Key="moreItem"
AutomationProperties.IsInAccessibleTree="True"
AutomationProperties.Name="{u:I18n Options}"
AutomationId="OptionsButton"/>
AutomationId="OptionsButton" />
<ToolbarItem Text="{u:I18n GetPasswordHint}"
x:Key="getPasswordHint"
x:Name="_getPasswordHint"

2
src/App/Pages/Generator/GeneratorPage.xaml

@ -112,7 +112,7 @@ @@ -112,7 +112,7 @@
Text="{Binding ColoredUsername, Mode=OneWay}"
Margin="0, 20"
HorizontalOptions="Start"
AutomationId="GeneratedUsernameValue" />
AutomationId="GeneratedPasswordLabel" />
<controls:IconButton
StyleClass="box-row-button, box-row-button-platform"
Text="{Binding Source={x:Static core:BitwardenIcons.Clone}}"

3
src/App/Pages/Send/SendAddOnlyPage.xaml

@ -25,7 +25,8 @@ @@ -25,7 +25,8 @@
Priority="-2"
UseOriginalImage="True"
AutomationProperties.IsInAccessibleTree="True"
AutomationProperties.Name="{u:I18n Account}" />
AutomationProperties.Name="{u:I18n Account}"
AutomationId="AccountIconButton" />
<ToolbarItem Text="{u:I18n Cancel}" Clicked="Close_Clicked" Order="Primary" Priority="-1" x:Name="_closeItem" />
<ToolbarItem Text="{u:I18n Save}" Clicked="Save_Clicked" Order="Primary" x:Name="_saveItem"/>
</ContentPage.ToolbarItems>

3
src/App/Pages/Vault/CipherSelectionPage.xaml

@ -19,7 +19,8 @@ @@ -19,7 +19,8 @@
Priority="-1"
UseOriginalImage="True"
AutomationProperties.IsInAccessibleTree="True"
AutomationProperties.Name="{u:I18n Account}" />
AutomationProperties.Name="{u:I18n Account}"
AutomationId="AccountIconButton" />
<ToolbarItem IconImageSource="search.png" Clicked="Search_Clicked"
AutomationProperties.IsInAccessibleTree="True"
AutomationProperties.Name="{u:I18n Search}" />

3
src/App/Pages/Vault/GroupingsPage/GroupingsPage.xaml

@ -25,7 +25,8 @@ @@ -25,7 +25,8 @@
Priority="-1"
UseOriginalImage="True"
AutomationProperties.IsInAccessibleTree="True"
AutomationProperties.Name="{u:I18n Account}" />
AutomationProperties.Name="{u:I18n Account}"
AutomationId="AccountIconButton" />
<ToolbarItem Icon="search.png" Clicked="Search_Clicked"
AutomationProperties.IsInAccessibleTree="True"
AutomationProperties.Name="{u:I18n Search}" />

Loading…
Cancel
Save