[PM-2545] Adding Automation IDs for CipherDetailsPage elements (#2576)

* Adding IDs to CipherDetailsPage

* Fixing extra spaces

* Fixing extra space
This commit is contained in:
ifernandezdiaz 2023-06-20 16:26:43 -03:00 committed by GitHub
parent 8d98d1d5bd
commit 6644e3b449
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 105 additions and 58 deletions

View file

@ -57,16 +57,16 @@
x:Key="deleteItem" /> x:Key="deleteItem" />
<DataTemplate x:Key="TextCustomFieldDataTemplate"> <DataTemplate x:Key="TextCustomFieldDataTemplate">
<il:TextCustomFieldItemLayout AutomationId="TextCustomFieldItem"/> <il:TextCustomFieldItemLayout AutomationId="TextCustomFieldItem" />
</DataTemplate> </DataTemplate>
<DataTemplate x:Key="BooleanCustomFieldDataTemplate"> <DataTemplate x:Key="BooleanCustomFieldDataTemplate">
<il:BooleanCustomFieldItemLayout AutomationId="BooleanCustomFieldItem"/> <il:BooleanCustomFieldItemLayout AutomationId="BooleanCustomFieldItem" />
</DataTemplate> </DataTemplate>
<DataTemplate x:Key="HiddenCustomFieldDataTemplate"> <DataTemplate x:Key="HiddenCustomFieldDataTemplate">
<il:HiddenCustomFieldItemLayout AutomationId="HiddenCustomFieldItem"/> <il:HiddenCustomFieldItemLayout AutomationId="HiddenCustomFieldItem" />
</DataTemplate> </DataTemplate>
<DataTemplate x:Key="LinkedCustomFieldDataTemplate"> <DataTemplate x:Key="LinkedCustomFieldDataTemplate">
<il:LinkedCustomFieldItemLayout AutomationId="LinkedCustomFieldItem"/> <il:LinkedCustomFieldItemLayout AutomationId="LinkedCustomFieldItem" />
</DataTemplate> </DataTemplate>
<dts:CustomFieldItemTemplateSelector x:Key="CustomFieldItemTemplateSelector" <dts:CustomFieldItemTemplateSelector x:Key="CustomFieldItemTemplateSelector"

View file

@ -49,16 +49,16 @@
x:Name="_cloneItem" x:Key="cloneItem" /> x:Name="_cloneItem" x:Key="cloneItem" />
<DataTemplate x:Key="TextCustomFieldDataTemplate"> <DataTemplate x:Key="TextCustomFieldDataTemplate">
<il:TextCustomFieldItemLayout /> <il:TextCustomFieldItemLayout AutomationId="TextCustomFieldItem" />
</DataTemplate> </DataTemplate>
<DataTemplate x:Key="BooleanCustomFieldDataTemplate"> <DataTemplate x:Key="BooleanCustomFieldDataTemplate">
<il:BooleanCustomFieldItemLayout /> <il:BooleanCustomFieldItemLayout AutomationId="BooleanCustomFieldItem" />
</DataTemplate> </DataTemplate>
<DataTemplate x:Key="HiddenCustomFieldDataTemplate"> <DataTemplate x:Key="HiddenCustomFieldDataTemplate">
<il:HiddenCustomFieldItemLayout /> <il:HiddenCustomFieldItemLayout AutomationId="HiddenCustomFieldItem" />
</DataTemplate> </DataTemplate>
<DataTemplate x:Key="LinkedCustomFieldDataTemplate"> <DataTemplate x:Key="LinkedCustomFieldDataTemplate">
<il:LinkedCustomFieldItemLayout /> <il:LinkedCustomFieldItemLayout AutomationId="LinkedCustomFieldItem" />
</DataTemplate> </DataTemplate>
<dts:CustomFieldItemTemplateSelector x:Key="CustomFieldItemTemplateSelector" <dts:CustomFieldItemTemplateSelector x:Key="CustomFieldItemTemplateSelector"
@ -80,7 +80,8 @@
StyleClass="box-label" /> StyleClass="box-label" />
<Label <Label
Text="{Binding Cipher.Name, Mode=OneWay}" Text="{Binding Cipher.Name, Mode=OneWay}"
StyleClass="box-value" /> StyleClass="box-value"
AutomationId="ItemNameLabel" />
</StackLayout> </StackLayout>
<BoxView StyleClass="box-row-separator" /> <BoxView StyleClass="box-row-separator" />
<StackLayout IsVisible="{Binding IsLogin}" Spacing="0" Padding="0"> <StackLayout IsVisible="{Binding IsLogin}" Spacing="0" Padding="0">
@ -103,7 +104,8 @@
Text="{Binding Cipher.Login.Username, Mode=OneWay}" Text="{Binding Cipher.Login.Username, Mode=OneWay}"
StyleClass="box-value" StyleClass="box-value"
Grid.Row="1" Grid.Row="1"
Grid.Column="0" /> Grid.Column="0"
AutomationId="LoginUsernameLabel" />
<controls:IconButton <controls:IconButton
StyleClass="box-row-button, box-row-button-platform" StyleClass="box-row-button, box-row-button-platform"
Text="{Binding Source={x:Static core:BitwardenIcons.Clone}}" Text="{Binding Source={x:Static core:BitwardenIcons.Clone}}"
@ -113,7 +115,8 @@
Grid.Column="1" Grid.Column="1"
Grid.RowSpan="2" Grid.RowSpan="2"
AutomationProperties.IsInAccessibleTree="True" AutomationProperties.IsInAccessibleTree="True"
AutomationProperties.Name="{u:I18n CopyUsername}" /> AutomationProperties.Name="{u:I18n CopyUsername}"
AutomationId="CopyUsernameButton" />
</Grid> </Grid>
<BoxView StyleClass="box-row-separator" <BoxView StyleClass="box-row-separator"
IsVisible="{Binding Cipher.Login.Username, Converter={StaticResource stringHasValue}}" /> IsVisible="{Binding Cipher.Login.Username, Converter={StaticResource stringHasValue}}" />
@ -139,14 +142,16 @@
StyleClass="box-value" StyleClass="box-value"
Grid.Row="1" Grid.Row="1"
Grid.Column="0" Grid.Column="0"
IsVisible="{Binding ShowPassword, Converter={StaticResource inverseBool}}" /> IsVisible="{Binding ShowPassword, Converter={StaticResource inverseBool}}"
AutomationId="LoginPasswordLabel" />
<controls:MonoLabel <controls:MonoLabel
Text="{Binding ColoredPassword, Mode=OneWay}" Text="{Binding ColoredPassword, Mode=OneWay}"
StyleClass="box-value, text-html" StyleClass="box-value, text-html"
Grid.Row="1" Grid.Row="1"
Grid.Column="0" Grid.Column="0"
LineBreakMode="CharacterWrap" LineBreakMode="CharacterWrap"
IsVisible="{Binding ShowPassword}" /> IsVisible="{Binding ShowPassword}"
AutomationId="LoginPasswordLabel" />
<controls:IconButton <controls:IconButton
StyleClass="box-row-button, box-row-button-platform" StyleClass="box-row-button, box-row-button-platform"
Text="{Binding Source={x:Static core:BitwardenIcons.CheckCircle}}" Text="{Binding Source={x:Static core:BitwardenIcons.CheckCircle}}"
@ -156,7 +161,8 @@
Grid.RowSpan="2" Grid.RowSpan="2"
AutomationProperties.IsInAccessibleTree="True" AutomationProperties.IsInAccessibleTree="True"
AutomationProperties.Name="{u:I18n CheckPassword}" AutomationProperties.Name="{u:I18n CheckPassword}"
IsVisible="{Binding Cipher.ViewPassword}" /> IsVisible="{Binding Cipher.ViewPassword}"
AutomationId="LoginCheckPasswordButton" />
<controls:IconButton <controls:IconButton
StyleClass="box-row-button, box-row-button-platform" StyleClass="box-row-button, box-row-button-platform"
Text="{Binding ShowPasswordIcon}" Text="{Binding ShowPasswordIcon}"
@ -167,7 +173,8 @@
AutomationProperties.IsInAccessibleTree="True" AutomationProperties.IsInAccessibleTree="True"
AutomationProperties.Name="{u:I18n ToggleVisibility}" AutomationProperties.Name="{u:I18n ToggleVisibility}"
AutomationProperties.HelpText="{Binding PasswordVisibilityAccessibilityText}" AutomationProperties.HelpText="{Binding PasswordVisibilityAccessibilityText}"
IsVisible="{Binding Cipher.ViewPassword}" /> IsVisible="{Binding Cipher.ViewPassword}"
AutomationId="LoginViewPasswordButton" />
<controls:IconButton <controls:IconButton
StyleClass="box-row-button, box-row-button-platform" StyleClass="box-row-button, box-row-button-platform"
Text="{Binding Source={x:Static core:BitwardenIcons.Clone}}" Text="{Binding Source={x:Static core:BitwardenIcons.Clone}}"
@ -178,7 +185,8 @@
Grid.RowSpan="2" Grid.RowSpan="2"
AutomationProperties.IsInAccessibleTree="True" AutomationProperties.IsInAccessibleTree="True"
AutomationProperties.Name="{u:I18n CopyPassword}" AutomationProperties.Name="{u:I18n CopyPassword}"
IsVisible="{Binding Cipher.ViewPassword}" /> IsVisible="{Binding Cipher.ViewPassword}"
AutomationId="LoginCopyPasswordButton" />
</Grid> </Grid>
<BoxView StyleClass="box-row-separator" <BoxView StyleClass="box-row-separator"
IsVisible="{Binding Cipher.Login.Password, Converter={StaticResource stringHasValue}}" /> IsVisible="{Binding Cipher.Login.Password, Converter={StaticResource stringHasValue}}" />
@ -205,14 +213,16 @@
Grid.Row="1" Grid.Row="1"
Grid.Column="0" Grid.Column="0"
VerticalTextAlignment="Start" VerticalTextAlignment="Start"
VerticalOptions="Start" /> VerticalOptions="Start"
AutomationId="LoginTotpCodeLabel" />
<controls:CircularProgressbarView <controls:CircularProgressbarView
Progress="{Binding TotpProgress}" Progress="{Binding TotpProgress}"
Grid.Row="0" Grid.Row="0"
Grid.Column="1" Grid.Column="1"
Grid.RowSpan="2" Grid.RowSpan="2"
HorizontalOptions="FillAndExpand" HorizontalOptions="FillAndExpand"
VerticalOptions="FillAndExpand" /> VerticalOptions="FillAndExpand"
AutomationId="LoginTotpProgressBar" />
<Label <Label
Text="{Binding TotpSec, Mode=OneWay}" Text="{Binding TotpSec, Mode=OneWay}"
Style="{DynamicResource textTotp}" Style="{DynamicResource textTotp}"
@ -234,7 +244,8 @@
Grid.Column="2" Grid.Column="2"
Grid.RowSpan="2" Grid.RowSpan="2"
AutomationProperties.IsInAccessibleTree="True" AutomationProperties.IsInAccessibleTree="True"
AutomationProperties.Name="{u:I18n CopyTotp}" /> AutomationProperties.Name="{u:I18n CopyTotp}"
AutomationId="LoginCopytotpButton" />
<Label <Label
Text="{u:I18n PremiumSubscriptionRequired}" Text="{u:I18n PremiumSubscriptionRequired}"
StyleClass="box-footer-label" StyleClass="box-footer-label"
@ -242,7 +253,8 @@
Margin="0,5,0,2" Margin="0,5,0,2"
Grid.Column="0" Grid.Column="0"
Grid.Row="1" Grid.Row="1"
HorizontalOptions="FillAndExpand" /> HorizontalOptions="FillAndExpand"
AutomationId="ShowUpgradePremiumTotpLabel" />
</Grid> </Grid>
<BoxView StyleClass="box-row-separator" IsVisible="{Binding ShowTotp}" /> <BoxView StyleClass="box-row-separator" IsVisible="{Binding ShowTotp}" />
</StackLayout> </StackLayout>
@ -254,7 +266,8 @@
StyleClass="box-label" /> StyleClass="box-label" />
<Label <Label
Text="{Binding Cipher.Card.CardholderName, Mode=OneWay}" Text="{Binding Cipher.Card.CardholderName, Mode=OneWay}"
StyleClass="box-value" /> StyleClass="box-value"
AutomationId="CardholderNameLabel" />
</StackLayout> </StackLayout>
<BoxView StyleClass="box-row-separator" <BoxView StyleClass="box-row-separator"
IsVisible="{Binding Cipher.Card.CardholderName, Converter={StaticResource stringHasValue}}" /> IsVisible="{Binding Cipher.Card.CardholderName, Converter={StaticResource stringHasValue}}" />
@ -279,13 +292,15 @@
StyleClass="box-value" StyleClass="box-value"
Grid.Row="1" Grid.Row="1"
Grid.Column="0" Grid.Column="0"
IsVisible="{Binding ShowCardNumber, Converter={StaticResource inverseBool}}" /> IsVisible="{Binding ShowCardNumber, Converter={StaticResource inverseBool}}"
AutomationId="CardNumberLabel" />
<controls:MonoLabel <controls:MonoLabel
Text="{Binding Cipher.Card.Number, Mode=OneWay}" Text="{Binding Cipher.Card.Number, Mode=OneWay}"
StyleClass="box-value" StyleClass="box-value"
Grid.Row="1" Grid.Row="1"
Grid.Column="0" Grid.Column="0"
IsVisible="{Binding ShowCardNumber}" /> IsVisible="{Binding ShowCardNumber}"
AutomationId="CardNumberLabel" />
<controls:IconButton <controls:IconButton
StyleClass="box-row-button, box-row-button-platform" StyleClass="box-row-button, box-row-button-platform"
Text="{Binding ShowCardNumberIcon}" Text="{Binding ShowCardNumberIcon}"
@ -294,7 +309,8 @@
Grid.Column="1" Grid.Column="1"
Grid.RowSpan="2" Grid.RowSpan="2"
AutomationProperties.IsInAccessibleTree="True" AutomationProperties.IsInAccessibleTree="True"
AutomationProperties.Name="{u:I18n ToggleVisibility}" /> AutomationProperties.Name="{u:I18n ToggleVisibility}"
AutomationId="CardShowNumberButton" />
<controls:IconButton <controls:IconButton
StyleClass="box-row-button, box-row-button-platform" StyleClass="box-row-button, box-row-button-platform"
Text="{Binding Source={x:Static core:BitwardenIcons.Clone}}" Text="{Binding Source={x:Static core:BitwardenIcons.Clone}}"
@ -304,7 +320,8 @@
Grid.Column="2" Grid.Column="2"
Grid.RowSpan="2" Grid.RowSpan="2"
AutomationProperties.IsInAccessibleTree="True" AutomationProperties.IsInAccessibleTree="True"
AutomationProperties.Name="{u:I18n CopyNumber}" /> AutomationProperties.Name="{u:I18n CopyNumber}"
AutomationId="CardCopyNumberButton" />
</Grid> </Grid>
<BoxView StyleClass="box-row-separator" <BoxView StyleClass="box-row-separator"
IsVisible="{Binding Cipher.Card.Number, Converter={StaticResource stringHasValue}}" /> IsVisible="{Binding Cipher.Card.Number, Converter={StaticResource stringHasValue}}" />
@ -315,7 +332,8 @@
StyleClass="box-label" /> StyleClass="box-label" />
<Label <Label
Text="{Binding Cipher.Card.Brand, Mode=OneWay}" Text="{Binding Cipher.Card.Brand, Mode=OneWay}"
StyleClass="box-value" /> StyleClass="box-value"
AutomationId="CardBrandLabel" />
</StackLayout> </StackLayout>
<BoxView StyleClass="box-row-separator" <BoxView StyleClass="box-row-separator"
IsVisible="{Binding Cipher.Card.Brand, Converter={StaticResource stringHasValue}}" /> IsVisible="{Binding Cipher.Card.Brand, Converter={StaticResource stringHasValue}}" />
@ -326,7 +344,8 @@
StyleClass="box-label" /> StyleClass="box-label" />
<Label <Label
Text="{Binding Cipher.Card.Expiration, Mode=OneWay}" Text="{Binding Cipher.Card.Expiration, Mode=OneWay}"
StyleClass="box-value" /> StyleClass="box-value"
AutomationId="CardExpirationLabel" />
</StackLayout> </StackLayout>
<BoxView StyleClass="box-row-separator" <BoxView StyleClass="box-row-separator"
IsVisible="{Binding Cipher.Card.Expiration, Converter={StaticResource stringHasValue}}" /> IsVisible="{Binding Cipher.Card.Expiration, Converter={StaticResource stringHasValue}}" />
@ -351,13 +370,15 @@
StyleClass="box-value" StyleClass="box-value"
Grid.Row="1" Grid.Row="1"
Grid.Column="0" Grid.Column="0"
IsVisible="{Binding ShowCardCode, Converter={StaticResource inverseBool}}" /> IsVisible="{Binding ShowCardCode, Converter={StaticResource inverseBool}}"
AutomationId="CardSecurityCodeLabel" />
<controls:MonoLabel <controls:MonoLabel
Text="{Binding Cipher.Card.Code, Mode=OneWay}" Text="{Binding Cipher.Card.Code, Mode=OneWay}"
StyleClass="box-value" StyleClass="box-value"
Grid.Row="1" Grid.Row="1"
Grid.Column="0" Grid.Column="0"
IsVisible="{Binding ShowCardCode}" /> IsVisible="{Binding ShowCardCode}"
AutomationId="CardSecurityCodeLabel" />
<controls:IconButton <controls:IconButton
StyleClass="box-row-button, box-row-button-platform" StyleClass="box-row-button, box-row-button-platform"
Text="{Binding ShowCardCodeIcon}" Text="{Binding ShowCardCodeIcon}"
@ -366,7 +387,8 @@
Grid.Column="1" Grid.Column="1"
Grid.RowSpan="2" Grid.RowSpan="2"
AutomationProperties.IsInAccessibleTree="True" AutomationProperties.IsInAccessibleTree="True"
AutomationProperties.Name="{u:I18n ToggleVisibility}" /> AutomationProperties.Name="{u:I18n ToggleVisibility}"
AutomationId="CardShowSecurityCodeButton" />
<controls:IconButton <controls:IconButton
StyleClass="box-row-button, box-row-button-platform" StyleClass="box-row-button, box-row-button-platform"
Text="{Binding Source={x:Static core:BitwardenIcons.Clone}}" Text="{Binding Source={x:Static core:BitwardenIcons.Clone}}"
@ -376,7 +398,8 @@
Grid.Column="2" Grid.Column="2"
Grid.RowSpan="2" Grid.RowSpan="2"
AutomationProperties.IsInAccessibleTree="True" AutomationProperties.IsInAccessibleTree="True"
AutomationProperties.Name="{u:I18n CopySecurityCode}" /> AutomationProperties.Name="{u:I18n CopySecurityCode}"
AutomationId="CardCopySecurityCodeButton" />
</Grid> </Grid>
<BoxView StyleClass="box-row-separator" <BoxView StyleClass="box-row-separator"
IsVisible="{Binding Cipher.Card.Code, Converter={StaticResource stringHasValue}}" /> IsVisible="{Binding Cipher.Card.Code, Converter={StaticResource stringHasValue}}" />
@ -389,7 +412,8 @@
StyleClass="box-label" /> StyleClass="box-label" />
<Label <Label
Text="{Binding Cipher.Identity.FullName, Mode=OneWay}" Text="{Binding Cipher.Identity.FullName, Mode=OneWay}"
StyleClass="box-value" /> StyleClass="box-value"
AutomationId="IdentityNameLabel" />
</StackLayout> </StackLayout>
<BoxView StyleClass="box-row-separator" <BoxView StyleClass="box-row-separator"
IsVisible="{Binding Cipher.Identity.FullName, Converter={StaticResource stringHasValue}}" /> IsVisible="{Binding Cipher.Identity.FullName, Converter={StaticResource stringHasValue}}" />
@ -400,7 +424,8 @@
StyleClass="box-label" /> StyleClass="box-label" />
<Label <Label
Text="{Binding Cipher.Identity.Username, Mode=OneWay}" Text="{Binding Cipher.Identity.Username, Mode=OneWay}"
StyleClass="box-value" /> StyleClass="box-value"
AutomationId="IdentityUsernameLabel" />
</StackLayout> </StackLayout>
<BoxView StyleClass="box-row-separator" <BoxView StyleClass="box-row-separator"
IsVisible="{Binding Cipher.Identity.Username, Converter={StaticResource stringHasValue}}" /> IsVisible="{Binding Cipher.Identity.Username, Converter={StaticResource stringHasValue}}" />
@ -411,7 +436,8 @@
StyleClass="box-label" /> StyleClass="box-label" />
<Label <Label
Text="{Binding Cipher.Identity.Company, Mode=OneWay}" Text="{Binding Cipher.Identity.Company, Mode=OneWay}"
StyleClass="box-value" /> StyleClass="box-value"
AutomationId="IdentityCompanyNameLabel" />
</StackLayout> </StackLayout>
<BoxView StyleClass="box-row-separator" <BoxView StyleClass="box-row-separator"
IsVisible="{Binding Cipher.Identity.Company, Converter={StaticResource stringHasValue}}" /> IsVisible="{Binding Cipher.Identity.Company, Converter={StaticResource stringHasValue}}" />
@ -422,7 +448,8 @@
StyleClass="box-label" /> StyleClass="box-label" />
<Label <Label
Text="{Binding Cipher.Identity.SSN, Mode=OneWay}" Text="{Binding Cipher.Identity.SSN, Mode=OneWay}"
StyleClass="box-value" /> StyleClass="box-value"
AutomationId="IdentitySsnLabel" />
</StackLayout> </StackLayout>
<BoxView StyleClass="box-row-separator" <BoxView StyleClass="box-row-separator"
IsVisible="{Binding Cipher.Identity.SSN, Converter={StaticResource stringHasValue}}" /> IsVisible="{Binding Cipher.Identity.SSN, Converter={StaticResource stringHasValue}}" />
@ -433,7 +460,8 @@
StyleClass="box-label" /> StyleClass="box-label" />
<Label <Label
Text="{Binding Cipher.Identity.PassportNumber, Mode=OneWay}" Text="{Binding Cipher.Identity.PassportNumber, Mode=OneWay}"
StyleClass="box-value" /> StyleClass="box-value"
AutomationId="IdentityPassportNumberLabel" />
</StackLayout> </StackLayout>
<BoxView StyleClass="box-row-separator" <BoxView StyleClass="box-row-separator"
IsVisible="{Binding Cipher.Identity.PassportNumber, Converter={StaticResource stringHasValue}}" /> IsVisible="{Binding Cipher.Identity.PassportNumber, Converter={StaticResource stringHasValue}}" />
@ -444,7 +472,8 @@
StyleClass="box-label" /> StyleClass="box-label" />
<Label <Label
Text="{Binding Cipher.Identity.LicenseNumber, Mode=OneWay}" Text="{Binding Cipher.Identity.LicenseNumber, Mode=OneWay}"
StyleClass="box-value" /> StyleClass="box-value"
AutomationId="IdentityLicenseNumberLabel" />
</StackLayout> </StackLayout>
<BoxView StyleClass="box-row-separator" <BoxView StyleClass="box-row-separator"
IsVisible="{Binding Cipher.Identity.LicenseNumber, Converter={StaticResource stringHasValue}}" /> IsVisible="{Binding Cipher.Identity.LicenseNumber, Converter={StaticResource stringHasValue}}" />
@ -455,7 +484,8 @@
StyleClass="box-label" /> StyleClass="box-label" />
<Label <Label
Text="{Binding Cipher.Identity.Email, Mode=OneWay}" Text="{Binding Cipher.Identity.Email, Mode=OneWay}"
StyleClass="box-value" /> StyleClass="box-value"
AutomationId="IdentityEmailLabel" />
</StackLayout> </StackLayout>
<BoxView StyleClass="box-row-separator" <BoxView StyleClass="box-row-separator"
IsVisible="{Binding Cipher.Identity.Email, Converter={StaticResource stringHasValue}}" /> IsVisible="{Binding Cipher.Identity.Email, Converter={StaticResource stringHasValue}}" />
@ -466,7 +496,8 @@
StyleClass="box-label" /> StyleClass="box-label" />
<Label <Label
Text="{Binding Cipher.Identity.Phone, Mode=OneWay}" Text="{Binding Cipher.Identity.Phone, Mode=OneWay}"
StyleClass="box-value" /> StyleClass="box-value"
AutomationId="IdentityPhoneLabel" />
</StackLayout> </StackLayout>
<BoxView StyleClass="box-row-separator" <BoxView StyleClass="box-row-separator"
IsVisible="{Binding Cipher.Identity.Phone, Converter={StaticResource stringHasValue}}" /> IsVisible="{Binding Cipher.Identity.Phone, Converter={StaticResource stringHasValue}}" />
@ -477,23 +508,28 @@
<Label <Label
Text="{Binding Cipher.Identity.Address1, Mode=OneWay}" Text="{Binding Cipher.Identity.Address1, Mode=OneWay}"
IsVisible="{Binding Cipher.Identity.Address1, Converter={StaticResource stringHasValue}}" IsVisible="{Binding Cipher.Identity.Address1, Converter={StaticResource stringHasValue}}"
StyleClass="box-value" /> StyleClass="box-value"
AutomationId="IdentityAddressOneLabel" />
<Label <Label
Text="{Binding Cipher.Identity.Address2, Mode=OneWay}" Text="{Binding Cipher.Identity.Address2, Mode=OneWay}"
IsVisible="{Binding Cipher.Identity.Address2, Converter={StaticResource stringHasValue}}" IsVisible="{Binding Cipher.Identity.Address2, Converter={StaticResource stringHasValue}}"
StyleClass="box-value" /> StyleClass="box-value"
AutomationId="IdentityAddressTwoLabel" />
<Label <Label
Text="{Binding Cipher.Identity.Address3, Mode=OneWay}" Text="{Binding Cipher.Identity.Address3, Mode=OneWay}"
IsVisible="{Binding Cipher.Identity.Address3, Converter={StaticResource stringHasValue}}" IsVisible="{Binding Cipher.Identity.Address3, Converter={StaticResource stringHasValue}}"
StyleClass="box-value" /> StyleClass="box-value"
AutomationId="IdentityAddressThreeLabel" />
<Label <Label
Text="{Binding Cipher.Identity.FullAddressPart2, Mode=OneWay}" Text="{Binding Cipher.Identity.FullAddressPart2, Mode=OneWay}"
IsVisible="{Binding Cipher.Identity.FullAddressPart2, Converter={StaticResource stringHasValue}}" IsVisible="{Binding Cipher.Identity.FullAddressPart2, Converter={StaticResource stringHasValue}}"
StyleClass="box-value" /> StyleClass="box-value"
AutomationId="IdentityFullAddressPartTwoLabel" />
<Label <Label
Text="{Binding Cipher.Identity.Country, Mode=OneWay}" Text="{Binding Cipher.Identity.Country, Mode=OneWay}"
IsVisible="{Binding Cipher.Identity.Country, Converter={StaticResource stringHasValue}}" IsVisible="{Binding Cipher.Identity.Country, Converter={StaticResource stringHasValue}}"
StyleClass="box-value" /> StyleClass="box-value"
AutomationId="IdentityCountryLabel" />
</StackLayout> </StackLayout>
<BoxView StyleClass="box-row-separator" IsVisible="{Binding ShowIdentityAddress}" /> <BoxView StyleClass="box-row-separator" IsVisible="{Binding ShowIdentityAddress}" />
</StackLayout> </StackLayout>
@ -503,7 +539,7 @@
<Label Text="{u:I18n URIs, Header=True}" <Label Text="{u:I18n URIs, Header=True}"
StyleClass="box-header, box-header-platform" /> StyleClass="box-header, box-header-platform" />
</StackLayout> </StackLayout>
<controls:RepeaterView ItemsSource="{Binding Cipher.Login.Uris}"> <controls:RepeaterView ItemsSource="{Binding Cipher.Login.Uris}" AutomationId="CipherUriContainer">
<controls:RepeaterView.ItemTemplate> <controls:RepeaterView.ItemTemplate>
<DataTemplate x:DataType="views:LoginUriView"> <DataTemplate x:DataType="views:LoginUriView">
<StackLayout Spacing="0" Padding="0"> <StackLayout Spacing="0" Padding="0">
@ -533,7 +569,8 @@
Text="{Binding HostOrUri, Mode=OneWay}" Text="{Binding HostOrUri, Mode=OneWay}"
StyleClass="box-value" StyleClass="box-value"
Grid.Row="1" Grid.Row="1"
Grid.Column="0" /> Grid.Column="0"
AutomationId="CipherUriLabel" />
<controls:IconButton <controls:IconButton
StyleClass="box-row-button, box-row-button-platform" StyleClass="box-row-button, box-row-button-platform"
Text="{Binding Source={x:Static core:BitwardenIcons.ShareSquare}}" Text="{Binding Source={x:Static core:BitwardenIcons.ShareSquare}}"
@ -544,7 +581,8 @@
Grid.RowSpan="2" Grid.RowSpan="2"
IsVisible="{Binding CanLaunch, Mode=OneWay}" IsVisible="{Binding CanLaunch, Mode=OneWay}"
AutomationProperties.IsInAccessibleTree="True" AutomationProperties.IsInAccessibleTree="True"
AutomationProperties.Name="{u:I18n Launch}" /> AutomationProperties.Name="{u:I18n Launch}"
AutomationId="CipherLaunchUriButton" />
<controls:IconButton <controls:IconButton
StyleClass="box-row-button, box-row-button-platform" StyleClass="box-row-button, box-row-button-platform"
Text="{Binding Source={x:Static core:BitwardenIcons.Clone}}" Text="{Binding Source={x:Static core:BitwardenIcons.Clone}}"
@ -554,7 +592,8 @@
Grid.Column="2" Grid.Column="2"
Grid.RowSpan="2" Grid.RowSpan="2"
AutomationProperties.IsInAccessibleTree="True" AutomationProperties.IsInAccessibleTree="True"
AutomationProperties.Name="{u:I18n Copy}" /> AutomationProperties.Name="{u:I18n Copy}"
AutomationId="CipherCopyUriButton" />
</Grid> </Grid>
<BoxView StyleClass="box-row-separator" /> <BoxView StyleClass="box-row-separator" />
</StackLayout> </StackLayout>
@ -571,11 +610,12 @@
<StackLayout StyleClass="box-row"> <StackLayout StyleClass="box-row">
<controls:SelectableLabel <controls:SelectableLabel
Text="{Binding Cipher.Notes, Mode=OneWay}" Text="{Binding Cipher.Notes, Mode=OneWay}"
StyleClass="box-value" /> StyleClass="box-value"
AutomationId="CipherNotesLabel" />
</StackLayout> </StackLayout>
<BoxView StyleClass="box-row-separator" /> <BoxView StyleClass="box-row-separator" />
</StackLayout> </StackLayout>
<StackLayout StyleClass="box" IsVisible="{Binding Cipher.HasFields}"> <StackLayout StyleClass="box" IsVisible="{Binding Cipher.HasFields}" AutomationId="CustomFieldsContainer">
<StackLayout StyleClass="box-row-header"> <StackLayout StyleClass="box-row-header">
<Label Text="{u:I18n CustomFields, Header=True}" <Label Text="{u:I18n CustomFields, Header=True}"
StyleClass="box-header, box-header-platform" /> StyleClass="box-header, box-header-platform" />
@ -590,21 +630,23 @@
<Label Text="{u:I18n Attachments, Header=True}" <Label Text="{u:I18n Attachments, Header=True}"
StyleClass="box-header, box-header-platform" /> StyleClass="box-header, box-header-platform" />
</StackLayout> </StackLayout>
<controls:RepeaterView ItemsSource="{Binding Cipher.Attachments}"> <controls:RepeaterView ItemsSource="{Binding Cipher.Attachments}" AutomationId="CipherAttachmentsContainer">
<controls:RepeaterView.ItemTemplate> <controls:RepeaterView.ItemTemplate>
<DataTemplate x:DataType="views:AttachmentView"> <DataTemplate x:DataType="views:AttachmentView">
<StackLayout Spacing="0" Padding="0"> <StackLayout Spacing="0" Padding="0">
<StackLayout Orientation="Horizontal" StyleClass="box-row" Spacing="10"> <StackLayout Orientation="Horizontal" StyleClass="box-row" Spacing="10" AutomationId="CipherAttachment">
<Label <Label
Text="{Binding FileName, Mode=OneWay}" Text="{Binding FileName, Mode=OneWay}"
StyleClass="box-value" StyleClass="box-value"
VerticalTextAlignment="Center" VerticalTextAlignment="Center"
HorizontalOptions="StartAndExpand" /> HorizontalOptions="StartAndExpand"
AutomationId="CipherAttachmentFileNameLabel" />
<Label <Label
Text="{Binding SizeName, Mode=OneWay}" Text="{Binding SizeName, Mode=OneWay}"
StyleClass="box-sub-label" StyleClass="box-sub-label"
HorizontalTextAlignment="End" HorizontalTextAlignment="End"
VerticalTextAlignment="Center" /> VerticalTextAlignment="Center"
AutomationId="CipherAttachmentFileSizeLabel" />
<controls:IconButton <controls:IconButton
StyleClass="box-row-button, box-row-button-platform" StyleClass="box-row-button, box-row-button-platform"
Text="{Binding Source={x:Static core:BitwardenIcons.Download}}" Text="{Binding Source={x:Static core:BitwardenIcons.Download}}"
@ -612,7 +654,8 @@
CommandParameter="{Binding .}" CommandParameter="{Binding .}"
VerticalOptions="Center" VerticalOptions="Center"
AutomationProperties.IsInAccessibleTree="True" AutomationProperties.IsInAccessibleTree="True"
AutomationProperties.Name="{u:I18n Download}" /> AutomationProperties.Name="{u:I18n Download}"
AutomationId="CipherAttachmentDownloadButton" />
</StackLayout> </StackLayout>
<BoxView StyleClass="box-row-separator" /> <BoxView StyleClass="box-row-separator" />
</StackLayout> </StackLayout>
@ -622,17 +665,20 @@
</StackLayout> </StackLayout>
<StackLayout StyleClass="box-bottom"> <StackLayout StyleClass="box-bottom">
<Label FormattedText="{Binding UpdatedText}" <Label FormattedText="{Binding UpdatedText}"
StyleClass="box-footer-label" /> StyleClass="box-footer-label"
AutomationId="CipherUpdatedDateLabel" />
<Label FormattedText="{Binding PasswordUpdatedText}" <Label FormattedText="{Binding PasswordUpdatedText}"
StyleClass="box-footer-label" StyleClass="box-footer-label"
IsVisible="{Binding Cipher.PasswordRevisionDisplayDate, Converter={StaticResource notNull}}"> IsVisible="{Binding Cipher.PasswordRevisionDisplayDate, Converter={StaticResource notNull}}"
AutomationId="CipherUpdatedPasswordDateLabel">
<Label.GestureRecognizers> <Label.GestureRecognizers>
<TapGestureRecognizer Tapped="PasswordHistory_Tapped" /> <TapGestureRecognizer Tapped="PasswordHistory_Tapped" />
</Label.GestureRecognizers> </Label.GestureRecognizers>
</Label> </Label>
<Label FormattedText="{Binding PasswordHistoryText}" <Label FormattedText="{Binding PasswordHistoryText}"
StyleClass="box-footer-label" StyleClass="box-footer-label"
IsVisible="{Binding Cipher.HasPasswordHistory}"> IsVisible="{Binding Cipher.HasPasswordHistory}"
AutomationId="CipherPasswordHistoryLabel">
<Label.GestureRecognizers> <Label.GestureRecognizers>
<TapGestureRecognizer Tapped="PasswordHistory_Tapped" /> <TapGestureRecognizer Tapped="PasswordHistory_Tapped" />
</Label.GestureRecognizers> </Label.GestureRecognizers>
@ -662,6 +708,7 @@
AbsoluteLayout.LayoutBounds="1, 1, AutoSize, AutoSize" AbsoluteLayout.LayoutBounds="1, 1, AutoSize, AutoSize"
AutomationProperties.IsInAccessibleTree="True" AutomationProperties.IsInAccessibleTree="True"
AutomationProperties.Name="{u:I18n EditItem}" AutomationProperties.Name="{u:I18n EditItem}"
AutomationId="CipherEditButton"
IsVisible="{Binding CanEdit}"> IsVisible="{Binding CanEdit}">
<Button.Effects> <Button.Effects>
<effects:FabShadowEffect /> <effects:FabShadowEffect />