[PM-3531] Add missing automation ids. (#2814)

This commit is contained in:
André Bispo 2023-10-14 00:39:57 +01:00 committed by GitHub
parent 21fc56457d
commit ed3467515e
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
3 changed files with 25 additions and 17 deletions

View file

@ -18,15 +18,16 @@
<StackLayout HorizontalOptions="FillAndExpand"> <StackLayout HorizontalOptions="FillAndExpand">
<Label <Label
StyleClass="text-md" StyleClass="text-md"
Text="{u:I18n RememberThisDevice}"/> Text="{u:I18n RememberThisDevice}" />
<Label <Label
StyleClass="box-sub-label" StyleClass="box-sub-label"
Text="{u:I18n TurnOffUsingPublicDevice}"/> Text="{u:I18n TurnOffUsingPublicDevice}" />
</StackLayout> </StackLayout>
<Switch <Switch
Scale="0.8" Scale="0.8"
IsToggled="{Binding RememberThisDevice}" IsToggled="{Binding RememberThisDevice}"
VerticalOptions="Center"/> AutomationId="RememberThisDeviceSwitch"
VerticalOptions="Center" />
</StackLayout> </StackLayout>
<StackLayout Margin="0, 20, 0, 0"> <StackLayout Margin="0, 20, 0, 0">
<Button <Button
@ -34,31 +35,34 @@
Text="{u:I18n Continue}" Text="{u:I18n Continue}"
StyleClass="btn-primary" StyleClass="btn-primary"
Command="{Binding ContinueCommand}" Command="{Binding ContinueCommand}"
IsVisible="{Binding IsNewUser}"/> IsVisible="{Binding IsNewUser}"
AutomationId="ContinueButton" />
<Button <Button
x:Name="_approveWithMyOtherDevice" x:Name="_approveWithMyOtherDevice"
Text="{u:I18n ApproveWithMyOtherDevice}" Text="{u:I18n ApproveWithMyOtherDevice}"
StyleClass="btn-primary" StyleClass="btn-primary"
Command="{Binding ApproveWithMyOtherDeviceCommand}" Command="{Binding ApproveWithMyOtherDeviceCommand}"
IsVisible="{Binding ApproveWithMyOtherDeviceEnabled}"/> IsVisible="{Binding ApproveWithMyOtherDeviceEnabled}"
AutomationId="ApproveWithMyOtherDeviceButton" />
<Button <Button
x:Name="_requestAdminApproval" x:Name="_requestAdminApproval"
Text="{u:I18n RequestAdminApproval}" Text="{u:I18n RequestAdminApproval}"
StyleClass="box-button-row" StyleClass="box-button-row"
Command="{Binding RequestAdminApprovalCommand}" Command="{Binding RequestAdminApprovalCommand}"
IsVisible="{Binding RequestAdminApprovalEnabled}"/> IsVisible="{Binding RequestAdminApprovalEnabled}"
AutomationId="RequestAdminApprovalButton" />
<Button <Button
x:Name="_approveWithMasterPassword" x:Name="_approveWithMasterPassword"
Text="{u:I18n ApproveWithMasterPassword}" Text="{u:I18n ApproveWithMasterPassword}"
StyleClass="box-button-row" StyleClass="box-button-row"
Command="{Binding ApproveWithMasterPasswordCommand}" Command="{Binding ApproveWithMasterPasswordCommand}"
IsVisible="{Binding ApproveWithMasterPasswordEnabled}"/> IsVisible="{Binding ApproveWithMasterPasswordEnabled}"
AutomationId="ApproveWithMasterPasswordButton" />
<Label <Label
Text="{Binding LoggingInAsText}" Text="{Binding LoggingInAsText}"
StyleClass="text-sm" StyleClass="text-sm"
Margin="0,40,0,0" Margin="0,40,0,0"
AutomationId="LoggingInAsLabel" AutomationId="LoggingInAsLabel" />
/>
<Label <Label
Text="{u:I18n NotYou}" Text="{u:I18n NotYou}"
StyleClass="text-md" StyleClass="text-md"

View file

@ -14,7 +14,7 @@
</ContentPage.BindingContext> </ContentPage.BindingContext>
<ContentPage.ToolbarItems> <ContentPage.ToolbarItems>
<ToolbarItem Text="{u:I18n Close}" Command="{Binding CloseCommand}" Order="Primary" Priority="-1" x:Name="_closeItem"/> <ToolbarItem Text="{u:I18n Close}" Command="{Binding CloseCommand}" Order="Primary" Priority="-1" x:Name="_closeItem" />
</ContentPage.ToolbarItems> </ContentPage.ToolbarItems>
<ScrollView> <ScrollView>
@ -29,15 +29,17 @@
<Label <Label
Text="{Binding SubTitle}" Text="{Binding SubTitle}"
FontSize="Small" FontSize="Small"
Margin="0,0,0,10"/> Margin="0,0,0,10"
AutomationId="SubTitleLabel" />
<Label <Label
Text="{Binding Description}" Text="{Binding Description}"
FontSize="Small" FontSize="Small"
Margin="0,0,0,24"/> Margin="0,0,0,24"
AutomationId="DescriptionLabel" />
<Label <Label
Text="{u:I18n FingerprintPhrase}" Text="{u:I18n FingerprintPhrase}"
FontSize="Small" FontSize="Small"
FontAttributes="Bold"/> FontAttributes="Bold" />
<controls:MonoLabel <controls:MonoLabel
FormattedText="{Binding FingerprintPhrase}" FormattedText="{Binding FingerprintPhrase}"
FontSize="Small" FontSize="Small"
@ -62,7 +64,7 @@
Color="{DynamicResource DisabledIconColor}" /> Color="{DynamicResource DisabledIconColor}" />
<Label <Label
Text="{Binding OtherOptions}" Text="{Binding OtherOptions}"
FontSize="Small"/> FontSize="Small" />
<Label <Label
Text="{u:I18n ViewAllLoginOptions}" Text="{u:I18n ViewAllLoginOptions}"
StyleClass="text-sm" StyleClass="text-sm"

View file

@ -21,7 +21,7 @@
<StackLayout StyleClass="box"> <StackLayout StyleClass="box">
<Label Text="{u:I18n LogInSsoSummary}" <Label Text="{u:I18n LogInSsoSummary}"
StyleClass="text-md" StyleClass="text-md"
HorizontalTextAlignment="Start"></Label> HorizontalTextAlignment="Start" />
<StackLayout StyleClass="box-row"> <StackLayout StyleClass="box-row">
<Label <Label
Text="{u:I18n OrgIdentifier}" Text="{u:I18n OrgIdentifier}"
@ -32,13 +32,15 @@
Keyboard="Default" Keyboard="Default"
StyleClass="box-value" StyleClass="box-value"
ReturnType="Go" ReturnType="Go"
ReturnCommand="{Binding LogInCommand}" /> ReturnCommand="{Binding LogInCommand}"
AutomationId="OrgIdentifierEntry" />
</StackLayout> </StackLayout>
</StackLayout> </StackLayout>
<StackLayout Padding="10, 0"> <StackLayout Padding="10, 0">
<Button Text="{u:I18n LogIn}" <Button Text="{u:I18n LogIn}"
StyleClass="btn-primary" StyleClass="btn-primary"
Clicked="LogIn_Clicked"></Button> Clicked="LogIn_Clicked"
AutomationId="LogInButton" />
</StackLayout> </StackLayout>
</StackLayout> </StackLayout>
</ScrollView> </ScrollView>