Skip to content

Commit

Permalink
Handled Conflict
Browse files Browse the repository at this point in the history
  • Loading branch information
Maheshkale447 committed May 19, 2024
2 parents aa18e2d + e213411 commit b8ce86d
Show file tree
Hide file tree
Showing 130 changed files with 1,994 additions and 529 deletions.
2 changes: 1 addition & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ BenchmarkDotNet.Artifacts/
# .NET Core
project.lock.json
project.fragment.lock.json
artifacts/

**/Properties/launchSettings.json

# StyleCop
Expand Down
20 changes: 19 additions & 1 deletion Ginger/Ginger/ALM/AzureDevOps/AzureDevOpsImportPage.xaml.cs
Original file line number Diff line number Diff line change
@@ -1,4 +1,22 @@
using Amdocs.Ginger.Common;
#region License
/*
Copyright © 2014-2024 European Support Limited
Licensed under the Apache License, Version 2.0 (the "License")
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
*/
#endregion

using Amdocs.Ginger.Common;
using Ginger.UserControls;
using System;
using System.Windows;
Expand Down
4 changes: 4 additions & 0 deletions Ginger/Ginger/ALM/Repository/AzureDevOpsRepository.cs
Original file line number Diff line number Diff line change
Expand Up @@ -135,6 +135,10 @@ public override bool ExportBusinessFlowToALM(BusinessFlow businessFlow, bool per
}
}
}
else
{
return false ;
}
}


Expand Down
8 changes: 7 additions & 1 deletion Ginger/Ginger/ALM/Repository/JIRA_Repository.cs
Original file line number Diff line number Diff line change
Expand Up @@ -282,7 +282,7 @@ public override bool ImportSelectedTests(string importDestinationPath, IEnumerab
}
else
{
Amdocs.Ginger.Common.eUserMsgSelection userSelection = Reporter.ToUser(eUserMsgKey.TestSetExists, selectedTS.Name);
Amdocs.Ginger.Common.eUserMsgSelection userSelection = Reporter.ToUser(eUserMsgKey.TestSetExists,selectedTS.Name);
if (userSelection == Amdocs.Ginger.Common.eUserMsgSelection.Yes)
{
if (File.Exists(existedBF.FilePath))
Expand All @@ -302,6 +302,12 @@ public override bool ImportSelectedTests(string importDestinationPath, IEnumerab
}


Reporter.ToUser(eUserMsgKey.TestSetsImportedSuccessfully);
}
else if(userSelection == Amdocs.Ginger.Common.eUserMsgSelection.No)
{
SetImportedTS(jiraImportedTSData, importDestinationPath);

Reporter.ToUser(eUserMsgKey.TestSetsImportedSuccessfully);
}
}
Expand Down
16 changes: 9 additions & 7 deletions Ginger/Ginger/Actions/ActionEditPage.xaml.cs
Original file line number Diff line number Diff line change
Expand Up @@ -519,7 +519,7 @@ private void InitOutputValuesTabView()

SetActReturnValuesGrid();

if (mAction.ActReturnValues.Count > 0)
if(mAction.ActReturnValues.Count > 0 || mAction.Artifacts.Count > 0)
{
xOutputValuesExpander.IsExpanded = true;
}
Expand Down Expand Up @@ -587,8 +587,8 @@ private void LoadArticats()
foreach (ArtifactDetails a in mAction.Artifacts)
{
UCArtifact artifact = new UCArtifact();
artifact.ArtifactPath = a.ArtifactOriginalPath;
artifact.ArtifactName = a.ArtifactName;
artifact.ArtifactPath = a.ArtifactReportStoragePath;
artifact.ArtifactName = a.ArtifactOriginalName;
artifact.IntiArtifact();
ArtifactsItems.Add(artifact);
}
Expand All @@ -604,7 +604,7 @@ private void LoadArticats()
xFilesListView.Visibility = Visibility.Collapsed;
xlbl_msg.Visibility = Visibility.Visible;
}
xFilesTabTextBlock.Text = string.Concat("Artifacts (", ArtifactsItems.Count, ")");
xFilesTabTextBlock.Text = string.Concat("Output Files (", ArtifactsItems.Count, ")");
}
private void RemoveCaptureTypeFromComboItems(Act.eWindowsToCapture captureType)
{
Expand Down Expand Up @@ -665,7 +665,7 @@ private void ReturnValues_CollectionChanged(object? sender, System.Collections.S
mAction.OnPropertyChanged(nameof(Act.ReturnValuesCount));
this.Dispatcher.Invoke(() =>
{
if (mAction.ActReturnValues.Count > 0)
if(mAction.ActReturnValues.Count > 0 || mAction.Artifacts.Count > 0)
{
xOutputValuesExpander.IsExpanded = true;
}
Expand Down Expand Up @@ -1667,10 +1667,12 @@ void UpdateOutputValuesTabHeader()
if (mAction.ReturnValues.Any())
{
xOutputValuesTabTextBlock.Text = string.Format("Validations / Assignments ({0})", mAction.ReturnValues.Count());
xOutputValuesTabHeaderTextBlock.Text = string.Format("Output Values ({0})", mAction.ReturnValues.Count());
}
else
{
xOutputValuesTabTextBlock.Text = "Validations / Assignments";
xOutputValuesTabHeaderTextBlock.Text = "Output Values";
}
});
}
Expand Down Expand Up @@ -2217,13 +2219,13 @@ private void xRawResponseValuesBtn_Click(object sender, RoutedEventArgs e)
{
string tempFilePath = GingerCoreNET.GeneralLib.General.CreateTempTextFile(mAction.RawResponseValues);
if (System.IO.File.Exists(tempFilePath))
{
{
DocumentEditorPage docPage = new DocumentEditorPage(tempFilePath, enableEdit: false, UCTextEditorTitle: string.Empty);
docPage.Width = 800;
docPage.Height = 800;
docPage.ShowAsWindow("Raw Output Values");
System.IO.File.Delete(tempFilePath);
return;
return;
}
}
Reporter.ToUser(eUserMsgKey.StaticErrorMessage, "Failed to load raw response view, see log for details.");
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,38 +5,44 @@
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
xmlns:usercontrols="clr-namespace:Amdocs.Ginger.UserControls"
mc:Ignorable="d"
d:DesignHeight="450" d:DesignWidth="800"
Title="ActCliOrchestrationEditPage">

<Grid Background="{StaticResource $BackgroundColor_White}">
<Grid.ColumnDefinitions>
<ColumnDefinition Width="500*"/>
<ColumnDefinition Width="1"/>
<ColumnDefinition Width="100"/>
<ColumnDefinition Width="10"/>
</Grid.ColumnDefinitions>
<Grid.RowDefinitions>
<RowDefinition Height="55"/>
<RowDefinition Height="55*"/>
<RowDefinition Height="55*"/>
<RowDefinition Height="*"/>
<RowDefinition Height="1*"/>
<RowDefinition Height="2*"/>
</Grid.RowDefinitions>
<StackPanel Grid.Row="0" Orientation="Horizontal" >
<Label x:Name="FilePathLabel" Style="{StaticResource @InputFieldLabelStyle}" Width="250" Height="35">File Path:</Label>
<Actions:UCFileBrowser HorizontalAlignment="Left" x:Name="FilePath" Width="370"/>

<Label x:Name="FilePathLabel" Grid.Column="0" Style="{StaticResource @InputFieldLabelStyle}" Width="150" Height="35" ToolTip="Specifies the location or route to access the program or file.">Application/File Path:</Label>
<Label x:Name="FilePathLabelValidation" Grid.Column="0" Style="{StaticResource @InputFieldLabelStyle}" Content="*" VerticalAlignment="Center" HorizontalAlignment="Left" Foreground="Red" FontWeight="Bold" FontSize="12" Margin="-8,0,20,0"/>
<Actions:UCFileBrowser Grid.Column="2" HorizontalAlignment="Left" x:Name="FilePath" Width="370"/>
<usercontrols:ImageMakerControl Grid.Column="3" x:Name="FilePathNote" ToolTip="Note - supported file *.vbs,*.js,*.sh,*.bat,*.exe." SetAsFontImageWithSize="12" ImageType="Info" Width="12" Height="12" FontWeight="Bold" VerticalAlignment="Center" Foreground="{StaticResource $BackgroundColor_DarkGray}" Margin="2,0,5,0"/>
</StackPanel>
<StackPanel Orientation="Horizontal" Grid.Row="2" x:Name="xPanelWaitForProcessToFinish">
<Label Style="{StaticResource @InputFieldLabelStyle}" Width="250" VerticalAlignment="Center" >Wait for Process:</Label>
<CheckBox x:Name="WaitForProcessToFinish" VerticalAlignment="Center" Margin="0,0,0,0" Checked="WaitForProcessToFinishChecked" Unchecked="WaitForProcessToFinishUnChecked" />
<Label Style="{StaticResource @InputFieldLabelStyle}" Width="150" VerticalAlignment="Center" ToolTip="wait for the process to complete" >Wait for Process:</Label>
<CheckBox x:Name="WaitForProcessToFinish" VerticalAlignment="Center" Margin="30,0,0,0" Checked="WaitForProcessToFinishChecked" Unchecked="WaitForProcessToFinishUnChecked" />
</StackPanel>
<StackPanel Orientation="Horizontal" Grid.Row="3" x:Name="xPanelParseResult">
<Label Style="{StaticResource @InputFieldLabelStyle}" Width="250" VerticalAlignment="Center" >Parse the Result:</Label>
<CheckBox x:Name="ParseResult" VerticalAlignment="Center" Margin="0,0,0,0" Checked="ParseResultChecked" Unchecked="ParseResultUnChecked" />
<Label Style="{StaticResource @InputFieldLabelStyle}" Width="150" VerticalAlignment="Center" ToolTip="Result will be parsed based on the specified delimiter for clearer data segmentation and organization" >Parse the Result:</Label>
<CheckBox x:Name="ParseResult" VerticalAlignment="Center" Margin="30,0,0,0" Checked="ParseResultChecked" Unchecked="ParseResultUnChecked" />
</StackPanel>
<StackPanel Grid.Row="4" x:Name="xPanelDelimiter" Orientation="Horizontal">
<Label Grid.Column="0" Style="{StaticResource @InputFieldLabelStyle}">Delimiter:</Label>
<Actions:UCValueExpression Grid.Column="1" Margin="175,0,0,0" Width="150" x:Name="xDelimiterTextBox" />
<StackPanel Grid.Row="4" Height="50" x:Name="xPanelDelimiter" Orientation="Horizontal">
<Label x:Name="DelimiterLabel" Grid.Column="0" Width="80" Style="{StaticResource @InputFieldLabelStyle}" ToolTip="The character or sequence used to separate values">Delimiter:</Label>
<Label x:Name="DelimiterLabelValidation" Grid.Column="1" Content="*" Margin="-12,0,8,15" Style="{StaticResource @InputFieldLabelStyle}" VerticalAlignment="Center" Foreground="Red" FontWeight="Bold" FontSize="12"/>
<Actions:UCValueExpression Grid.Column="2" Margin="85,0,0,20" Width="150" x:Name="xDelimiterTextBox" />
</StackPanel>

</Grid>
</Page>
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,8 @@ limitations under the License.

using amdocs.ginger.GingerCoreNET;
using Amdocs.Ginger.Common;
using Ginger.Configurations;
using Ginger.ValidationRules;
using GingerCore.Actions;
using System.Windows;
using System.Windows.Controls;
Expand Down Expand Up @@ -63,8 +65,23 @@ public ActCLIOrchestrationEditPage(ActCLIOrchestration act)
xPanelParseResult.Visibility = Visibility.Collapsed;
xPanelDelimiter.Visibility = Visibility.Collapsed;
}


ApplyValidationRules();

}

private void ApplyValidationRules()
{
// check if fields have been populated (font-end validation)
FilePath.FilePathTextBox.AddValidationRule(new ValidateEmptyValue("Application/File path cannot be empty"));
xDelimiterTextBox.ValueTextBox.AddValidationRule(new ValidateEmptyValue("Delimiter cannot be empty"));

CallPropertyChange();
}

private void CallPropertyChange()
{
mAct.OnPropertyChanged(nameof(mAct.FilePath));
mAct.OnPropertyChanged(nameof(mAct.Delimiter));
}

private void DelimiterTextBox_TextChanged(object sender, TextChangedEventArgs e)
Expand All @@ -91,7 +108,14 @@ private void WaitForProcessToFinishChecked(object sender, RoutedEventArgs e)
{
mAct.WaitForProcessToFinish = true;
xPanelParseResult.Visibility = Visibility.Visible;
xPanelDelimiter.Visibility = Visibility.Visible;
if (mAct.ParseResult)
{
xPanelDelimiter.Visibility = Visibility.Visible;
}
else
{
xPanelDelimiter.Visibility = Visibility.Collapsed;
}
mAct.InvokPropertyChanngedForAllFields();
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,7 @@
<Label x:Name="xCreateBaseline" Style="{StaticResource $LabelStyle}" Grid.Row="7" Grid.Column="0" Margin="0,10,0,0" VerticalAlignment="Center" Content="Create Baseline:"/>
<StackPanel Grid.Row="7" Grid.Column="1" Orientation="Horizontal">
<CheckBox x:Name="xCreateBaselineCheckbox" Grid.Column="1" VerticalAlignment="Center" Margin="0,10,0,0" Style="{StaticResource @InputCheckBoxStyle}" Checked="xCreateBaselineCheckbox_CheckChanged" Unchecked="xCreateBaselineCheckbox_CheckChanged"/>
<usercontrols:ImageMakerControl Grid.Row="7" Grid.Column="1" x:Name="xCreateBaselineNote" ToolTip="Note - The option to Create Baseline will be unchecked once the baseline is generated." SetAsFontImageWithSize="12" ImageType="Info" Width="12" Height="12" FontWeight="Bold" Foreground="{StaticResource $BackgroundColor_DarkGray}" Margin="2,10,5,0"/>
<usercontrols:ImageMakerControl Grid.Row="7" Grid.Column="1" x:Name="xCreateBaselineNote" ToolTip="Note - The option to Create Baseline will be unchecked once the baseline is generated.&#x0a;After Baseline uploaded please approve it on VRT dashboard" SetAsFontImageWithSize="12" ImageType="Info" Width="12" Height="12" FontWeight="Bold" Foreground="{StaticResource $BackgroundColor_DarkGray}" Margin="2,10,5,0"/>
</StackPanel>

<Label x:Name="xBaselineImage" Style="{StaticResource $LabelStyle}" Grid.Row="9" Grid.Column="0" Margin="0,10,0,0" VerticalAlignment="Center" Content="Baseline Image:"/>
Expand All @@ -93,14 +93,14 @@

<Label x:Name="xPreviewImage" Style="{StaticResource $LabelStyle}" Grid.Row="11" Grid.Column="0" Margin="0,10,0,0" VerticalAlignment="Top" Content="Preview Image:"/>
<StackPanel x:Name="VRTBaseImageFramePnl" Grid.Row="11" Grid.Column="1">
<Frame x:Name="VRTBaseImageFrame" Background="White" Width="500" Height="400" Margin="0,20,5,10"></Frame>
<Frame x:Name="VRTBaseImageFrame" Background="White" Height="400" Margin="0,20,5,10"></Frame>
</StackPanel>

<Label x:Name="xPreviewBaselineImage" Style="{StaticResource $LabelStyle}" Grid.Row="12" Grid.Column="0" Margin="0,10,0,0" VerticalAlignment="Top" Content="Preview Baseline Image:"/>
<StackPanel x:Name="VRTPreviewBaselineImageFramePnl" Grid.Row="12" Grid.Column="1">
<Frame x:Name="VRTPreviewBaselineImageFrame" Background="White" Width="500" Height="400" Margin="-30,20,5,10"></Frame>
<Frame x:Name="VRTPreviewBaselineImageFrame" Background="White" Height="400" Margin="5,20,5,10"></Frame>
</StackPanel>

<Label x:Name="xVRTNote" Style="{StaticResource $LabelStyle}" Grid.Row="13" Grid.ColumnSpan="2" Margin="0,10,0,0" VerticalAlignment="Bottom" Content="Note - Ensure that VRT details are entered in Configurations -> External Integrations -> VRT configurations."/>
<Label x:Name="xVRTNote" Style="{StaticResource $LabelStyle}" Width="auto" Grid.Row="13" Grid.ColumnSpan="2" Margin="0,10,0,0" VerticalAlignment="Bottom" Content="Note - Ensure that VRT details are entered in Configurations -> External Integrations -> VRT configurations."/>
</Grid>
</Page>
Loading

0 comments on commit b8ce86d

Please sign in to comment.