From e015feb8aa428b3c626997fb251e04f6095e9507 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fran=C3=A7ois=20Perin?= <f.perin@smartway.ai> Date: Thu, 5 Dec 2024 18:37:07 +0100 Subject: [PATCH 1/2] feat(e2e): Add AutomationId on Entry --- Smartway.UiComponent/Inputs/FormEntry.xaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Smartway.UiComponent/Inputs/FormEntry.xaml b/Smartway.UiComponent/Inputs/FormEntry.xaml index 287167e..9c4c818 100644 --- a/Smartway.UiComponent/Inputs/FormEntry.xaml +++ b/Smartway.UiComponent/Inputs/FormEntry.xaml @@ -70,7 +70,7 @@ Focused="InputOnFocused" IsPassword="{Binding Source={x:Reference Self}, Path=IsPassword}" Unfocused="InputOnUnfocused" - > + AutomationId="{Binding Source={x:Reference Self}, Path=AutomationId, StringFormat='{0}_Input'}"> <Entry.Triggers> <DataTrigger TargetType="Entry" Binding="{Binding Source={x:Reference Self}, Path=ReadOnly}" Value="True"> <Setter Property="IsReadOnly" Value="True"/> From 79be3751e87a7a8e04da6a51342054942d8ede23 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fran=C3=A7ois=20Perin?= <f.perin@smartway.ai> Date: Wed, 11 Dec 2024 10:50:18 +0100 Subject: [PATCH 2/2] feat: Add AutomationId for each date entry (day, month and year) --- Smartway.UiComponent/Inputs/NumericDateEntry.xaml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/Smartway.UiComponent/Inputs/NumericDateEntry.xaml b/Smartway.UiComponent/Inputs/NumericDateEntry.xaml index 370c525..01e677d 100644 --- a/Smartway.UiComponent/Inputs/NumericDateEntry.xaml +++ b/Smartway.UiComponent/Inputs/NumericDateEntry.xaml @@ -24,9 +24,9 @@ </Style> </ResourceDictionary> </StackLayout.Resources> - <Entry x:Name="FirstEntry" Grid.Column="0" Focused="OnFocusedSelectAllEntryContent"/> + <Entry x:Name="FirstEntry" Grid.Column="0" Focused="OnFocusedSelectAllEntryContent" AutomationId="{Binding Source={x:Reference Self}, Path=AutomationId, StringFormat='{0}_Day'}"/> <Label Grid.Column="1" Text="/"/> - <Entry x:Name="SecondEntry" Grid.Column="2" Focused="OnFocusedSelectAllEntryContent"/> + <Entry x:Name="SecondEntry" Grid.Column="2" Focused="OnFocusedSelectAllEntryContent" AutomationId="{Binding Source={x:Reference Self}, Path=AutomationId, StringFormat='{0}_Month'}"/> <Label Grid.Column="3" Text="/"/> - <Entry x:Name="ThirdEntry" Grid.Column="4" Focused="OnFocusedSelectAllEntryContent"/> + <Entry x:Name="ThirdEntry" Grid.Column="4" Focused="OnFocusedSelectAllEntryContent" AutomationId="{Binding Source={x:Reference Self}, Path=AutomationId, StringFormat='{0}_Year'}"/> </StackLayout> \ No newline at end of file