Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Feature - F43266 - New Self Healing #4048

Open
wants to merge 7 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -76,6 +76,12 @@
<RadioButton x:Name="xAvoidPropertiesNoneRadioButton" Margin="5" Checked="xAvoidPropertiesNoneRadioButton_Checked">None</RadioButton>
</StackPanel>
</StackPanel>
<CheckBox
x:Name="AcceptElementsFoundByMatchersCheckBox"
DockPanel.Dock="Top"
Content="Accept elements found by healing matchers"
Style="{StaticResource @CheckBoxStyle}"
Margin="5" />

<Label DockPanel.Dock="Top" HorizontalAlignment="Left" Style="{StaticResource $SectionHeaderLabelStyle}" Margin="0,20,0,0" >Elements Update Settings:</Label>
<StackPanel>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@ limitations under the License.
using Amdocs.Ginger.Common.UIElement;
using Ginger.UserControls;
using GingerCore;
using GingerCore.GeneralLib;
using GingerCore.Platforms.PlatformsInfo;
using GingerCoreNET.Application_Models;
using GingerCoreNET.SolutionRepositoryLib.RepositoryObjectsLib.PlatformsLib;
Expand Down Expand Up @@ -57,6 +58,7 @@ public void WizardEvent(WizardEventArgs WizardEventArgs)
{
isEnableFriendlyLocatorGrid = true;
}
BindingHandler.ObjFieldBinding(AcceptElementsFoundByMatchersCheckBox, CheckBox.IsCheckedProperty, mWizard.mPomDeltaUtils, nameof(PomDeltaUtils.AcceptElementFoundByMatcher));
SetAutoMapElementTypes();
SetAutoMapElementTypesGridView();
xLearnOnlyMappedElements.BindControl(mWizard.mPomDeltaUtils.PomLearnUtils, nameof(mWizard.mPomDeltaUtils.PomLearnUtils.LearnOnlyMappedElements));
Expand Down
87 changes: 87 additions & 0 deletions Ginger/Ginger/Dictionaries/Skins/GingerDefaultSkinDictionary.xaml
Original file line number Diff line number Diff line change
Expand Up @@ -4028,6 +4028,93 @@
<Setter Property="BorderThickness" Value="1" />
</Style>


<Style
x:Key="SideNavTabControlStyle"
TargetType="TabControl">
<Setter
Property="TabStripPlacement"
Value="Left" />
<Setter
Property="BorderThickness"
Value="0" />
</Style>
<Style
x:Key="SideNavTabItemStyle"
TargetType="TabItem">
<Style.Resources>
<SolidColorBrush
x:Key="TabHeaderColor"
Color="#ececec" />
</Style.Resources>
<Setter
Property="Template">
<Setter.Value>
<ControlTemplate
TargetType="TabItem">
<Border
x:Name="UCSideNavHeaderBorder"
BorderBrush="Transparent"
BorderThickness="1"
CornerRadius="6"
Margin="2">
<StackPanel
x:Name="UCSideNavHeaderStackPanel"
Orientation="Horizontal"
HorizontalAlignment="Center">
<Rectangle
x:Name="UCSideNavHeaderPolygon"
Visibility="Hidden"
RadiusX="1"
RadiusY="1"
Width="2"
Height="18"
VerticalAlignment="Center"
Fill="#F05C62" />
<Border
Padding="10 8">
<ContentPresenter
Content="{TemplateBinding Header}"
Width="160"
Height="16"/>
</Border>
</StackPanel>
</Border>
<ControlTemplate.Triggers>
<Trigger
Property="IsMouseOver"
Value="True">
<Setter
TargetName="UCSideNavHeaderStackPanel"
Property="Background"
Value="{DynamicResource TabHeaderColor}" />
<Setter
TargetName="UCSideNavHeaderBorder"
Property="BorderBrush"
Value="{DynamicResource TabHeaderColor}" />
</Trigger>
<Trigger
Property="IsSelected"
Value="True">
<Setter
TargetName="UCSideNavHeaderStackPanel"
Property="Background"
Value="{DynamicResource TabHeaderColor}" />
<Setter
TargetName="UCSideNavHeaderBorder"
Property="BorderBrush"
Value="{DynamicResource TabHeaderColor}" />
<Setter
TargetName="UCSideNavHeaderPolygon"
Property="Visibility"
Value="Visible" />
</Trigger>
</ControlTemplate.Triggers>
</ControlTemplate>
</Setter.Value>
</Setter>
</Style>

<!--<Style TargetType="Button" x:Key="@PanelButtonStyle" >
<Setter Property="Background" Value="DeepSkyBlue" />
<Setter Property="Foreground" Value="DeepSkyBlue" />
Expand Down
26 changes: 19 additions & 7 deletions Ginger/Ginger/Run/GingerSelfHealingConfiguration.xaml
Original file line number Diff line number Diff line change
Expand Up @@ -8,20 +8,32 @@
d:DesignHeight="350" d:DesignWidth="350"
Title="Self Healing Configurations">

<Grid Background="{StaticResource $BackgroundColor_White}" >
<Grid.RowDefinitions>
<RowDefinition />
</Grid.RowDefinitions>
<StackPanel Grid.Row="0" Margin="5 15 0 0">
<DockPanel
Background="{StaticResource $BackgroundColor_White}">
<StackPanel DockPanel.Dock="Top" Margin="5 15 0 0">
<CheckBox Style="{StaticResource @CheckBoxStyle}" x:Name="xEnableSelfHealingChkBox" Click="xEnableSelfHealingChkBox_Click" Content="Enable Self Healing Mode" />
<StackPanel Margin="10 10 0 0" x:Name="xSelfHealingConfigPanel" Visibility="Collapsed">
<CheckBox Style="{StaticResource @CheckBoxStyle}" x:Name="xAutoUpdateModelChkBox" Margin="5" Content="Auto-update Application Model During Execution" />
<CheckBox Style="{StaticResource @CheckBoxStyle}" x:Name="xAutoUpdateModelChkBox" Margin="5" Content="Auto-update Application Model During Execution" Checked="xAutoUpdateModelChkBox_CheckedUnchecked" Unchecked="xAutoUpdateModelChkBox_CheckedUnchecked"/>
<CheckBox Style="{StaticResource @CheckBoxStyle}" x:Name="xRePrioritizeChkBox" Margin="5" Content="Re-Prioritize Failed POM Locators" />
<CheckBox Style="{StaticResource @CheckBoxStyle}" x:Name="xAutoFixAnalyzerChkBox" Margin="5" Content="Auto Fix Analyzer Issues" />
<CheckBox Style="{StaticResource @CheckBoxStyle}" x:Name="xAutoExecuteInSimulationChkBox" Margin="5" Content="Auto switch to simulation mode for failed actions" />

<!--<CheckBox Style="{StaticResource @CheckBoxStyle}" x:Name="xUseVirtualEnvChkBox" Margin="5" Visibility="Collapsed" Content="Use Virtual Environment On Failure" />-->
</StackPanel>
</StackPanel>
</Grid>
<TextBlock
x:Name="AutoUpdateModelNoteTextBlock"
DockPanel.Dock="Bottom"
HorizontalAlignment="Left"
VerticalAlignment="Bottom"
TextWrapping="Wrap"
Visibility="Hidden">
<Run FontWeight="SemiBold">
NOTE:
</Run>
<Run>
Elements compared by matchers will be accepted based on 'acceptable score' defined in the solution self healing configuration.
</Run>
</TextBlock>
</DockPanel>
</Page>
12 changes: 12 additions & 0 deletions Ginger/Ginger/Run/GingerSelfHealingConfiguration.xaml.cs
Original file line number Diff line number Diff line change
Expand Up @@ -91,5 +91,17 @@ private void ShowHideConfigPanel()

}
}

private void xAutoUpdateModelChkBox_CheckedUnchecked(object sender, RoutedEventArgs e)
{
if (xAutoUpdateModelChkBox.IsChecked ?? false)
{
AutoUpdateModelNoteTextBlock.Visibility = Visibility.Visible;
}
else
{
AutoUpdateModelNoteTextBlock.Visibility = Visibility.Hidden;
}
}
}
}
Loading
Loading