diff --git a/.gitignore b/.gitignore
index 6090df72b6..70ec18631b 100644
--- a/.gitignore
+++ b/.gitignore
@@ -51,7 +51,7 @@ BenchmarkDotNet.Artifacts/
# .NET Core
project.lock.json
project.fragment.lock.json
-artifacts/
+
**/Properties/launchSettings.json
# StyleCop
diff --git a/Ginger/Ginger/ALM/AzureDevOps/AzureDevOpsImportPage.xaml.cs b/Ginger/Ginger/ALM/AzureDevOps/AzureDevOpsImportPage.xaml.cs
index 381d277f39..e65294726a 100644
--- a/Ginger/Ginger/ALM/AzureDevOps/AzureDevOpsImportPage.xaml.cs
+++ b/Ginger/Ginger/ALM/AzureDevOps/AzureDevOpsImportPage.xaml.cs
@@ -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;
diff --git a/Ginger/Ginger/ALM/Repository/AzureDevOpsRepository.cs b/Ginger/Ginger/ALM/Repository/AzureDevOpsRepository.cs
index a99fce54ca..56b08820f3 100644
--- a/Ginger/Ginger/ALM/Repository/AzureDevOpsRepository.cs
+++ b/Ginger/Ginger/ALM/Repository/AzureDevOpsRepository.cs
@@ -135,6 +135,10 @@ public override bool ExportBusinessFlowToALM(BusinessFlow businessFlow, bool per
}
}
}
+ else
+ {
+ return false ;
+ }
}
diff --git a/Ginger/Ginger/ALM/Repository/JIRA_Repository.cs b/Ginger/Ginger/ALM/Repository/JIRA_Repository.cs
index 778faaabd5..f059c74065 100644
--- a/Ginger/Ginger/ALM/Repository/JIRA_Repository.cs
+++ b/Ginger/Ginger/ALM/Repository/JIRA_Repository.cs
@@ -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))
@@ -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);
}
}
diff --git a/Ginger/Ginger/Actions/ActionEditPage.xaml.cs b/Ginger/Ginger/Actions/ActionEditPage.xaml.cs
index bea9fe15d8..289ee6ef2b 100644
--- a/Ginger/Ginger/Actions/ActionEditPage.xaml.cs
+++ b/Ginger/Ginger/Actions/ActionEditPage.xaml.cs
@@ -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;
}
@@ -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);
}
@@ -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)
{
@@ -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;
}
@@ -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";
}
});
}
@@ -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.");
diff --git a/Ginger/Ginger/Actions/ActionEditPages/ActCLIOrchestrationEditPage.xaml b/Ginger/Ginger/Actions/ActionEditPages/ActCLIOrchestrationEditPage.xaml
index 7fee52a96b..21f0d14611 100644
--- a/Ginger/Ginger/Actions/ActionEditPages/ActCLIOrchestrationEditPage.xaml
+++ b/Ginger/Ginger/Actions/ActionEditPages/ActCLIOrchestrationEditPage.xaml
@@ -5,6 +5,7 @@
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">
@@ -12,31 +13,36 @@
+
+
-
+
-
-
+
+
+
+
+
-
-
+
+
-
-
+
+
-
-
-
+
+
+
+
-
diff --git a/Ginger/Ginger/Actions/ActionEditPages/ActCLIOrchestrationEditPage.xaml.cs b/Ginger/Ginger/Actions/ActionEditPages/ActCLIOrchestrationEditPage.xaml.cs
index 5bd7407945..788816c269 100644
--- a/Ginger/Ginger/Actions/ActionEditPages/ActCLIOrchestrationEditPage.xaml.cs
+++ b/Ginger/Ginger/Actions/ActionEditPages/ActCLIOrchestrationEditPage.xaml.cs
@@ -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;
@@ -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)
@@ -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();
}
diff --git a/Ginger/Ginger/Actions/ActionEditPages/VisualTesting/VRTComparePage.xaml b/Ginger/Ginger/Actions/ActionEditPages/VisualTesting/VRTComparePage.xaml
index dac72e440b..b05bb57157 100644
--- a/Ginger/Ginger/Actions/ActionEditPages/VisualTesting/VRTComparePage.xaml
+++ b/Ginger/Ginger/Actions/ActionEditPages/VisualTesting/VRTComparePage.xaml
@@ -78,7 +78,7 @@
-
+
@@ -93,14 +93,14 @@
-
+
-
+
-
+
\ No newline at end of file
diff --git a/Ginger/Ginger/Actions/ActionEditPages/VisualTesting/VRTComparePage.xaml.cs b/Ginger/Ginger/Actions/ActionEditPages/VisualTesting/VRTComparePage.xaml.cs
index 47035d63bc..15ab9a7d98 100644
--- a/Ginger/Ginger/Actions/ActionEditPages/VisualTesting/VRTComparePage.xaml.cs
+++ b/Ginger/Ginger/Actions/ActionEditPages/VisualTesting/VRTComparePage.xaml.cs
@@ -34,6 +34,8 @@ limitations under the License.
using System.IO;
using System.Linq;
using System.Reflection;
+using System.Threading;
+using System.Threading.Tasks;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Controls.Primitives;
@@ -69,7 +71,25 @@ public VRTComparePage(GingerCore.Actions.ActVisualTesting mAct)
VRTCurrentBaselineImagePathTxtBox.Init(Context.GetAsContext(mAct.Context), mAct.GetOrCreateInputParam(VRTAnalyzer.VRTSavedBaseImageFilenameString), true, true, UCValueExpression.eBrowserType.File, "png", BaseLineFileSelected_Click);
WeakEventManager.AddHandler(source: VRTCurrentBaselineImagePathTxtBox.ValueTextBox, eventName: nameof(TextBoxBase.TextChanged), handler: ValueTextBox_TextChanged);
UpdateBaseLineImage();
- GetBaseLineImage();
+ Task.Run(async () =>
+ {
+ try
+ {
+ Dispatcher.Invoke(() =>
+ {
+ VRTPreviewBaselineImageFrame.ClearAndSetContent(new LoadingPage(
+ loadingLabel: "loading baseline image...",
+ width: 40,
+ height: 40,
+ fontSize: 15));
+ });
+ await LoadBaseLineImageAsync();
+ }
+ catch (Exception ex)
+ {
+ Reporter.ToLog(eLogLevel.ERROR, "Error while loading baseline image", ex);
+ }
+ });
GingerCore.GeneralLib.BindingHandler.ObjFieldBinding(xCreateBaselineCheckbox, CheckBox.IsCheckedProperty, mAct, nameof(mAct.CreateBaselineImage));
InitLayout();
@@ -203,6 +223,8 @@ public void InitLayout()
{
xBaselineImage.Visibility = Visibility.Visible;
xBaselineImageRadioButtonPnl.Visibility = Visibility.Visible;
+ VRTPreviewBaselineImageFramePnl.Visibility = Visibility.Collapsed;
+ xPreviewBaselineImage.Visibility = Visibility.Collapsed;
}
else
{
@@ -357,25 +379,49 @@ private void UpdateBaseLineImage()
VRTBaseImageFrame.ClearAndSetContent(p);
}
- private void GetBaseLineImage()
+ private async Task LoadBaseLineImageAsync()
{
try
{
- string previewBaselineImage = GingerCoreNET.GeneralLib.General.DownloadBaselineImage($"{WorkSpace.Instance.Solution.VRTConfiguration.ApiUrl}/{mAct.previewBaselineImageName}", mAct);
- string FileName = General.GetFullFilePath(previewBaselineImage);
- BitmapImage b = null;
- if (File.Exists(FileName) && new FileInfo(FileName).Length > 0)
+ if (string.IsNullOrEmpty(mAct.previewBaselineImageName))
{
- b = GetFreeBitmapCopy(FileName);
+ Reporter.ToLog(eLogLevel.ERROR, "unable to fetch the baseline image");
+ return;
}
- // send with null bitmap will show image not found
- ScreenShotViewPage p = new ScreenShotViewPage("preview Baseline Image", b);
- VRTPreviewBaselineImageFrame.ClearAndSetContent(p);
+
+ string imagePath = await GetBaseLineImageAsync();
+ Dispatcher.Invoke(() => SetBaseLineImage(imagePath));
}
- catch(Exception ex)
+ catch (Exception ex)
{
- Reporter.ToLog(eLogLevel.ERROR, "unable to fetch the baseline image",ex);
- }
+ Reporter.ToLog(eLogLevel.ERROR, "Error while loading baseline image", ex);
+ }
+ }
+
+ private Task GetBaseLineImageAsync()
+ {
+ return GingerCoreNET.GeneralLib.General.DownloadBaselineImage(
+ ImageURL: $"{WorkSpace.Instance.Solution.VRTConfiguration.ApiUrl}/{mAct.previewBaselineImageName}",
+ mAct);
+ }
+
+ private void SetBaseLineImage(string imagePath)
+ {
+ if(string.IsNullOrEmpty(imagePath))
+ {
+ Reporter.ToLog(eLogLevel.ERROR, "unable to fetch the baseline image");
+ return;
+ }
+
+ string FileName = General.GetFullFilePath(imagePath);
+ BitmapImage? b = null;
+ if (File.Exists(FileName) && new FileInfo(FileName).Length > 0)
+ {
+ b = GetFreeBitmapCopy(FileName);
+ }
+ // send with null bitmap will show image not found
+ ScreenShotViewPage p = new ScreenShotViewPage("Preview Baseline Image", b);
+ VRTPreviewBaselineImageFrame.ClearAndSetContent(p);
}
private BitmapImage GetFreeBitmapCopy(String filePath)
diff --git a/Ginger/Ginger/Actions/UserControls/UCArtifact.xaml b/Ginger/Ginger/Actions/UserControls/UCArtifact.xaml
index fec50b76c5..9758608c11 100644
--- a/Ginger/Ginger/Actions/UserControls/UCArtifact.xaml
+++ b/Ginger/Ginger/Actions/UserControls/UCArtifact.xaml
@@ -6,7 +6,7 @@
xmlns:usercontrols="clr-namespace:Amdocs.Ginger.UserControls"
mc:Ignorable="d"
d:DesignHeight="60" d:DesignWidth="60">
-
+
@@ -14,10 +14,10 @@
-
diff --git a/Ginger/Ginger/Actions/UserControls/UCArtifact.xaml.cs b/Ginger/Ginger/Actions/UserControls/UCArtifact.xaml.cs
index 482ee0a08a..3c359123f7 100644
--- a/Ginger/Ginger/Actions/UserControls/UCArtifact.xaml.cs
+++ b/Ginger/Ginger/Actions/UserControls/UCArtifact.xaml.cs
@@ -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 Amdocs.Ginger.Common.Enums;
using Amdocs.Ginger.Common.EnumsLib;
using Amdocs.Ginger.UserControls;
@@ -37,7 +55,19 @@ public partial class UCArtifact : UserControl
public string ArtifactName { get; set; }
public string ArtifactPath { get; set; }
-
+ public string ArtifactFileName
+ {
+ get
+ {
+ string FileName = string.Empty;
+ if(!string.IsNullOrEmpty(ArtifactPath))
+ {
+ FileName = System.IO.Path.GetFileName(ArtifactPath);
+ }
+ return FileName;
+ }
+ }
+
public UCArtifact()
{
InitializeComponent();
@@ -82,18 +112,49 @@ private void OpenFileLocation(object sender, System.Windows.RoutedEventArgs e)
}
private void ViewContent(object sender, System.Windows.RoutedEventArgs e)
- {
-
- string tempFilePath = GingerCoreNET.GeneralLib.General.CreateTempTextFile(ArtifactPath);
- if (System.IO.File.Exists(tempFilePath))
+ {
+ string FileExtention = string.Empty;
+ FileExtention = System.IO.Path.GetExtension(ArtifactPath).ToLower().Remove(0, 1);
+ eFileTypes fileType;
+ Enum.TryParse(FileExtention, out fileType);
+ if(System.IO.File.Exists(ArtifactPath))
{
- DocumentEditorPage docPage = new DocumentEditorPage(ArtifactPath, enableEdit: false, UCTextEditorTitle: string.Empty);
- docPage.Width = 800;
- docPage.Height = 800;
- docPage.ShowAsWindow(ArtifactName);
- return;
- }
- Reporter.ToUser(eUserMsgKey.StaticErrorMessage, "Failed to load file content, see log for details.");
+ switch (fileType)
+ {
+
+ case eFileTypes.bmp:
+ case eFileTypes.gif:
+ case eFileTypes.jpeg:
+ case eFileTypes.jpg:
+ case eFileTypes.png:
+ ViewImage(ArtifactPath);
+ break;
+ case eFileTypes.None:
+ default:
+ ViewDocument(ArtifactPath);
+ break;
+ }
+ }
+ else
+ {
+ Reporter.ToUser(eUserMsgKey.StaticErrorMessage, "Failed to load file content, see log for details.");
+ }
+ }
+
+ private void ViewDocument(string fileName)
+ {
+ DocumentEditorPage docPage = new DocumentEditorPage(fileName, enableEdit: false, UCTextEditorTitle: string.Empty);
+ docPage.Width = 800;
+ docPage.Height = 800;
+ docPage.ShowAsWindow(ArtifactName);
+ }
+
+ private void ViewImage(string fileName)
+ {
+ ScreenShotViewPage screenShotPage = new ScreenShotViewPage(ArtifactName, fileName, 0.5);
+ screenShotPage.Width = 800;
+ screenShotPage.Height = 800;
+ screenShotPage.ShowAsWindow(ArtifactName, false);
}
public void OpenBySystem()
@@ -143,16 +204,16 @@ public void IntiArtifact()
case eFileTypes.xlsx :
case eFileTypes.csv:
ArtifactImage = eImageType.ExcelFile;
- Foreground = new SolidColorBrush(Colors.Green);
+ Foreground = new SolidColorBrush(Colors.Black);
break;
case eFileTypes.ppt:
ArtifactImage= eImageType.FilePowerpoint;
- Foreground = new SolidColorBrush(Colors.Orange);
+ Foreground = new SolidColorBrush(Colors.Black);
break;
case eFileTypes.docx:
case eFileTypes.doc:
ArtifactImage = eImageType.WordFile;
- Foreground = new SolidColorBrush(Colors.Blue);
+ Foreground = new SolidColorBrush(Colors.Black);
break;
case eFileTypes.bmp:
case eFileTypes.gif:
@@ -160,20 +221,36 @@ public void IntiArtifact()
case eFileTypes.jpg:
case eFileTypes.png:
ArtifactImage = eImageType.Image;
- Foreground = new SolidColorBrush(Colors.Green);
+ Foreground = new SolidColorBrush(Colors.Black);
break;
case eFileTypes.htm:
case eFileTypes.html:
ArtifactImage = eImageType.HtmlReport;
- Foreground = new SolidColorBrush(Colors.Orange);
+ Foreground = new SolidColorBrush(Colors.Black);
break;
case eFileTypes.pdf:
ArtifactImage = eImageType.PDFFile;
- Foreground = new SolidColorBrush(Colors.Red);
+ Foreground = new SolidColorBrush(Colors.Black);
break;
case eFileTypes.txt:
ArtifactImage = eImageType.Text;
- Foreground = new SolidColorBrush(Colors.Gray);
+ Foreground = new SolidColorBrush(Colors.Black);
+ break;
+ case eFileTypes.xml:
+ ArtifactImage = eImageType.FileXML;
+ Foreground = new SolidColorBrush(Colors.Black);
+ break;
+ case eFileTypes.json:
+ ArtifactImage = eImageType.FileJSON;
+ Foreground = new SolidColorBrush(Colors.Black);
+ break;
+ case eFileTypes.zip:
+ ArtifactImage = eImageType.FileArchive;
+ Foreground = new SolidColorBrush(Colors.Black);
+ break;
+ case eFileTypes.js:
+ ArtifactImage = eImageType.FileJavascript;
+ Foreground = new SolidColorBrush(Colors.Black);
break;
case eFileTypes.None:
default:
diff --git a/Ginger/Ginger/Agents/ApplicationAgentsMapPage.xaml.cs b/Ginger/Ginger/Agents/ApplicationAgentsMapPage.xaml.cs
index b8b6244dd9..d0af593740 100644
--- a/Ginger/Ginger/Agents/ApplicationAgentsMapPage.xaml.cs
+++ b/Ginger/Ginger/Agents/ApplicationAgentsMapPage.xaml.cs
@@ -97,6 +97,11 @@ public void RefreshApplicationAgentsList()
}
if (mRunner.SolutionApplications?.FirstOrDefault(x => x.AppName == Apag.AppName && x.Platform == ePlatformType.NA) == null)
{
+ if(Apag.Agent == null && Apag.PossibleAgents.Any())
+ {
+ Apag.Agent = Apag.PossibleAgents[0] as Agent;
+ }
+
ApplicationAgents.Add(Apag);
}
}
diff --git a/Ginger/Ginger/ApplicationModelsLib/ModelParams Pages/ModelsGlobalParamsPage.xaml.cs b/Ginger/Ginger/ApplicationModelsLib/ModelParams Pages/ModelsGlobalParamsPage.xaml.cs
index 4181184a08..bd17803f6a 100644
--- a/Ginger/Ginger/ApplicationModelsLib/ModelParams Pages/ModelsGlobalParamsPage.xaml.cs
+++ b/Ginger/Ginger/ApplicationModelsLib/ModelParams Pages/ModelsGlobalParamsPage.xaml.cs
@@ -159,7 +159,7 @@ private void CopySelectedItemID(object sender, RoutedEventArgs e)
{
if (xModelsGlobalParamsGrid.Grid.SelectedItem != null)
{
- Clipboard.SetText(((RepositoryItemBase)xModelsGlobalParamsGrid.Grid.SelectedItem).Guid.ToString());
+ GingerCore.General.SetClipboardText(((RepositoryItemBase)xModelsGlobalParamsGrid.Grid.SelectedItem).Guid.ToString());
}
else
{
diff --git a/Ginger/Ginger/ApplicationModelsLib/POMModels/POMWizardLib/DeltaWizard/PomDeltaViewPage.xaml.cs b/Ginger/Ginger/ApplicationModelsLib/POMModels/POMWizardLib/DeltaWizard/PomDeltaViewPage.xaml.cs
index 164d92e749..b2ad309b91 100644
--- a/Ginger/Ginger/ApplicationModelsLib/POMModels/POMWizardLib/DeltaWizard/PomDeltaViewPage.xaml.cs
+++ b/Ginger/Ginger/ApplicationModelsLib/POMModels/POMWizardLib/DeltaWizard/PomDeltaViewPage.xaml.cs
@@ -502,7 +502,7 @@ private void xCopyLocatorButton_Click(object sender, RoutedEventArgs e)
if (mSelectedLocator != null)
{
- Clipboard.SetText(mSelectedLocator.LocateValue);
+ GingerCore.General.SetClipboardText(mSelectedLocator.LocateValue);
}
}
diff --git a/Ginger/Ginger/ApplicationModelsLib/POMModels/PomElementsPage.xaml.cs b/Ginger/Ginger/ApplicationModelsLib/POMModels/PomElementsPage.xaml.cs
index b709c4d55f..66c94dc1a2 100644
--- a/Ginger/Ginger/ApplicationModelsLib/POMModels/PomElementsPage.xaml.cs
+++ b/Ginger/Ginger/ApplicationModelsLib/POMModels/PomElementsPage.xaml.cs
@@ -37,12 +37,14 @@ limitations under the License.
using GingerCoreNET.SolutionRepositoryLib.RepositoryObjectsLib.PlatformsLib;
using GingerWPF.ApplicationModelsLib.APIModelWizard;
using GingerWPF.UserControlsLib.UCTreeView;
+using OpenQA.Selenium;
using System;
using System.Collections.Generic;
using System.Collections.Specialized;
using System.ComponentModel;
using System.Globalization;
using System.Linq;
+using System.Threading.Tasks;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Data;
@@ -880,7 +882,20 @@ private void HighlightElementClicked(object sender, RoutedEventArgs e)
if (mSelectedElement != null)
{
+
+ try
+ {
mWinExplorer.HighLightElement(mSelectedElement, true, mPOM?.MappedUIElements);
+ }
+ catch (Exception ex)
+ {
+ if(ex is NoSuchElementException)
+ {
+ Reporter.ToUser(eUserMsgKey.ElementNotFound);
+ }
+ Reporter.ToLog(eLogLevel.ERROR, ex.Message, ex);
+
+ }
}
}
@@ -894,12 +909,23 @@ private void DetailsGrid_Collapsed(object sender, RoutedEventArgs e)
Row2.Height = new GridLength(35);
}
+ private bool IsTestBtnClicked = false;
private void TestElementButtonClicked(object sender, RoutedEventArgs e)
{
+
+ if (IsTestBtnClicked)
+ {
+ Reporter.ToUser(eUserMsgKey.LocatorTestInProgress);
+ return;
+ }
+
if (!ValidateDriverAvalability())
{
return;
}
+
+ IsTestBtnClicked = true;
+
ElementInfo CurrentEI = (ElementInfo)MainElementsGrid.CurrentItem;
@@ -922,22 +948,31 @@ private void TestElementButtonClicked(object sender, RoutedEventArgs e)
}
else if (WorkSpace.Instance.Solution.GetTargetApplicationPlatform(mPOM.TargetApplicationKey).Equals(ePlatformType.Web))
{
- var htmlElementInfo = new HTMLElementInfo() {
- Path = testElement.Path,
- Locators = testElement.Locators,
+ var htmlElementInfo = new HTMLElementInfo() {
+ Path = testElement.Path,
+ Locators = testElement.Locators,
Properties = ((HTMLElementInfo)CurrentEI).Properties,
};
htmlElementInfo.FriendlyLocators = testElement.FriendlyLocators;
- testElement = htmlElementInfo;
+ testElement = htmlElementInfo;
}
-
- mWinExplorer.TestElementLocators(testElement, false, mPOM);
+ Task.Run(() =>
+ {
+ try
+ {
+ mWinExplorer.TestElementLocators(testElement, false, mPOM);
+ }
+ finally
+ {
+ IsTestBtnClicked = false;
+ }
+ });
}
}
- private void TestAllElementsLocators(object sender, RoutedEventArgs e)
+ private void TestAllElementsLocators(object sender, RoutedEventArgs e)
{
if (!ValidateDriverAvalability())
{
@@ -959,7 +994,7 @@ private void xCopyLocatorButton_Click(object sender, RoutedEventArgs e)
if (mSelectedLocator != null)
{
- System.Windows.Clipboard.SetText(mSelectedLocator.LocateValue);
+ GingerCore.General.SetClipboardText(mSelectedLocator.LocateValue);
}
}
diff --git a/Ginger/Ginger/AutomatePageLib/AddActionMenu/ActionsFactory.cs b/Ginger/Ginger/AutomatePageLib/AddActionMenu/ActionsFactory.cs
index 7d244b3d2e..0f5898c284 100644
--- a/Ginger/Ginger/AutomatePageLib/AddActionMenu/ActionsFactory.cs
+++ b/Ginger/Ginger/AutomatePageLib/AddActionMenu/ActionsFactory.cs
@@ -342,7 +342,6 @@ public static void AddActivitiesFromSRHandler(List sharedActivitiesToA
//map activities target application to BF if missing in BF
userSelection = businessFlow.MapTAToBF(userSelection, activityIns, WorkSpace.Instance.Solution.ApplicationPlatforms);
- businessFlow.SetActivityTargetApplication(activityIns);
if (insertIndex >= 0 && insertIndex < businessFlow.ActivitiesGroups.Count)
{
//QUESTION: Why do we have to move activity group?
diff --git a/Ginger/Ginger/AutomatePageLib/AddActionMenu/WindowExplorer/Common/WindowExplorerPage.xaml.cs b/Ginger/Ginger/AutomatePageLib/AddActionMenu/WindowExplorer/Common/WindowExplorerPage.xaml.cs
index fa27546238..bad91918ba 100644
--- a/Ginger/Ginger/AutomatePageLib/AddActionMenu/WindowExplorer/Common/WindowExplorerPage.xaml.cs
+++ b/Ginger/Ginger/AutomatePageLib/AddActionMenu/WindowExplorer/Common/WindowExplorerPage.xaml.cs
@@ -1591,7 +1591,7 @@ private void xViewsTabs_MouseLeave(object sender, MouseEventArgs e)
private void xCopyPageSrc_Click(object sender, RoutedEventArgs e)
{
- Clipboard.SetText(mWindowExplorerDriver.GetCurrentPageSourceString());
+ GingerCore.General.SetClipboardText(mWindowExplorerDriver.GetCurrentPageSourceString());
}
}
}
diff --git a/Ginger/Ginger/AutomatePageLib/NewAutomatePage.xaml.cs b/Ginger/Ginger/AutomatePageLib/NewAutomatePage.xaml.cs
index 4bc9fe4e85..3780129b05 100644
--- a/Ginger/Ginger/AutomatePageLib/NewAutomatePage.xaml.cs
+++ b/Ginger/Ginger/AutomatePageLib/NewAutomatePage.xaml.cs
@@ -72,6 +72,7 @@ limitations under the License.
using System.Windows.Data;
using System.Windows.Input;
using System.Windows.Media;
+using System.Windows.Media.Animation;
namespace GingerWPF.BusinessFlowsLib
{
@@ -1032,7 +1033,7 @@ private async Task RunAutomateTabFlow()
}
}
- public async Task RunAutomatePageActivity(Activity activity)
+ public async Task RunAutomatePageActivity(Activity activityToExecute)
{
if (CheckIfExecutionIsInProgress())
{
@@ -1044,30 +1045,61 @@ public async Task RunAutomatePageActivity(Activity activity)
//mExecutionIsInProgress = true;
//SetUIElementsBehaverDuringExecution();
- mContext.BusinessFlow.CurrentActivity = activity;
+ mContext.BusinessFlow.CurrentActivity = activityToExecute;
mContext.Runner.ExecutionLoggerManager.Configuration.ExecutionLoggerAutomationTabContext = Ginger.Reports.ExecutionLoggerConfiguration.AutomationTabContext.ActivityRun;
- await mExecutionEngine.RunActivityAsync((Activity)activity, false, true, resetErrorHandlerExecutedFlag: true).ConfigureAwait(false);
+ if (mExecutionEngine.ExecutionLoggerManager.Configuration.SelectedDataRepositoryMethod == ExecutionLoggerConfiguration.DataRepositoryMethod.LiteDB)
+ {
+ foreach (Activity activity in mBusinessFlow.Activities)
+ {
+ if (activity == activityToExecute)
+ {
+ break;
+ }
+ foreach (Act action in activity.Acts.Cast())
+ {
+ mExecutionEngine.ExecutionLoggerManager.ActionEnd(0, action);
+ }
+ mExecutionEngine.ExecutionLoggerManager.ActivityEnd(0, activity);
+ }
+ }
+
+ await mExecutionEngine.RunActivityAsync((Activity)activityToExecute, false, true, resetErrorHandlerExecutedFlag: true).ConfigureAwait(false);
//When running Runactivity as standalone from GUI, SetActionSkipStatus is not called. Handling it here for now.
- foreach (Act act in activity.Acts)
+ foreach (Act act in activityToExecute.Acts)
{
if (act.Status == Amdocs.Ginger.CoreNET.Execution.eRunStatus.Pending)
{
act.Status = Amdocs.Ginger.CoreNET.Execution.eRunStatus.Skipped;
}
}
+
if (mExecutionEngine.ExecutionLoggerManager.Configuration.SelectedDataRepositoryMethod == ExecutionLoggerConfiguration.DataRepositoryMethod.LiteDB)
{
+ bool reachedCurrentActivity = false;
+ foreach (Activity activity in mBusinessFlow.Activities)
+ {
+ reachedCurrentActivity = activity == activityToExecute || reachedCurrentActivity;
+ if (!reachedCurrentActivity || activity == activityToExecute)
+ {
+ continue;
+ }
+ foreach (Act action in activity.Acts.Cast())
+ {
+ mExecutionEngine.ExecutionLoggerManager.ActionEnd(0, action);
+ }
+ mExecutionEngine.ExecutionLoggerManager.ActivityEnd(0, activity);
+ }
mExecutionEngine.ExecutionLoggerManager.BusinessFlowEnd(0, mBusinessFlow);
((ExecutionLogger)mExecutionEngine.ExecutionLoggerManager.mExecutionLogger).RunSetUpdate(mRunSetLiteDbId, mRunnerLiteDbId, mExecutionEngine);
}
}
finally
{
- if (activity.CurrentAgent != null)
+ if (activityToExecute.CurrentAgent != null)
{
- ((AgentOperations)((Agent)activity.CurrentAgent).AgentOperations).IsFailedToStart = false;
+ ((AgentOperations)((Agent)activityToExecute.CurrentAgent).AgentOperations).IsFailedToStart = false;
}
}
}
@@ -1140,11 +1172,52 @@ public async Task RunAutomatePageAction(Tuple actionToExecu
mExecutionEngine.ExecutionLoggerManager.Configuration.ExecutionLoggerAutomationTabContext = ExecutionLoggerConfiguration.AutomationTabContext.ActionRun;
+ if (mExecutionEngine.ExecutionLoggerManager.Configuration.SelectedDataRepositoryMethod == ExecutionLoggerConfiguration.DataRepositoryMethod.LiteDB)
+ {
+ bool reachedCurrentAction = false;
+ foreach (Activity activity in mBusinessFlow.Activities)
+ {
+ foreach (Act action in activity.Acts.Cast())
+ {
+ if (activity == parentActivity && action == actionToExecute)
+ {
+ reachedCurrentAction = true;
+ break;
+ }
+ mExecutionEngine.ExecutionLoggerManager.ActionEnd(0, action);
+ }
+ if (reachedCurrentAction)
+ {
+ break;
+ }
+ mExecutionEngine.ExecutionLoggerManager.ActivityEnd(0, activity);
+ }
+ }
+
var result = await mExecutionEngine.RunActionAsync(actionToExecute, checkIfActionAllowedToRun, moveToNextAction).ConfigureAwait(false);
if (mExecutionEngine.ExecutionLoggerManager.Configuration.SelectedDataRepositoryMethod == ExecutionLoggerConfiguration.DataRepositoryMethod.LiteDB)
{
- mExecutionEngine.ExecutionLoggerManager.ActivityEnd(0, parentActivity);
+ bool reachedCurrentActivity = false;
+ bool reachedCurrentAction = false;
+ foreach (Activity activity in mBusinessFlow.Activities)
+ {
+ reachedCurrentActivity = activity == parentActivity || reachedCurrentActivity;
+ if (!reachedCurrentActivity)
+ {
+ continue;
+ }
+ foreach (Act action in activity.Acts.Cast())
+ {
+ reachedCurrentAction = action == actionToExecute || reachedCurrentAction;
+ if (!reachedCurrentAction || action == actionToExecute)
+ {
+ continue;
+ }
+ mExecutionEngine.ExecutionLoggerManager.ActionEnd(0, action);
+ }
+ mExecutionEngine.ExecutionLoggerManager.ActivityEnd(0, activity);
+ }
mExecutionEngine.ExecutionLoggerManager.BusinessFlowEnd(0, mBusinessFlow);
((ExecutionLogger)mExecutionEngine.ExecutionLoggerManager.mExecutionLogger).RunSetUpdate(mRunSetLiteDbId, mRunnerLiteDbId, mExecutionEngine);
}
@@ -1189,10 +1262,66 @@ private async Task ContinueRunFromAutomatePage(eContinueFrom continueFrom, objec
await mExecutionEngine.ContinueRunAsync(eContinueLevel.StandalonBusinessFlow, eContinueFrom.LastStoppedAction);
break;
case eContinueFrom.SpecificAction:
- await mExecutionEngine.ContinueRunAsync(eContinueLevel.StandalonBusinessFlow, eContinueFrom.SpecificAction, mBusinessFlow, (Activity)((Tuple)executedItem).Item1, (Act)((Tuple)executedItem).Item2);
+ Activity parentActivity = (Activity)((Tuple)executedItem).Item1;
+ Act actionToExecute = (Act)((Tuple)executedItem).Item2;
+ try
+ {
+ if (mExecutionEngine.ExecutionLoggerManager.Configuration.SelectedDataRepositoryMethod == ExecutionLoggerConfiguration.DataRepositoryMethod.LiteDB)
+ {
+ bool reachedCurrentAction = false;
+ foreach (Activity activity in mBusinessFlow.Activities)
+ {
+ foreach (Act action in activity.Acts.Cast())
+ {
+ if (activity == parentActivity && action == actionToExecute)
+ {
+ reachedCurrentAction = true;
+ break;
+ }
+ mExecutionEngine.ExecutionLoggerManager.ActionEnd(0, action);
+ }
+ if (reachedCurrentAction)
+ {
+ break;
+ }
+ mExecutionEngine.ExecutionLoggerManager.ActivityEnd(0, activity);
+ }
+ }
+ }
+ catch (Exception ex)
+ {
+ Reporter.ToLog(eLogLevel.ERROR, "Error while logging previous activity and actions", ex);
+ }
+
+ await mExecutionEngine.ContinueRunAsync(eContinueLevel.StandalonBusinessFlow, eContinueFrom.SpecificAction, mBusinessFlow, parentActivity, actionToExecute);
break;
case eContinueFrom.SpecificActivity:
- mBusinessFlow.CurrentActivity = (Activity)executedItem;
+ Activity activityToExecute = (Activity)executedItem;
+ try
+ {
+ if (mExecutionEngine.ExecutionLoggerManager.Configuration.SelectedDataRepositoryMethod == ExecutionLoggerConfiguration.DataRepositoryMethod.LiteDB)
+ {
+ foreach (Activity activity in mBusinessFlow.Activities)
+ {
+ if (activity == activityToExecute)
+ {
+ break;
+ }
+ foreach (Act action in activity.Acts.Cast())
+ {
+ mExecutionEngine.ExecutionLoggerManager.ActionEnd(0, action);
+ }
+ mExecutionEngine.ExecutionLoggerManager.ActivityEnd(0, activity);
+ }
+ }
+ }
+ catch (Exception ex)
+ {
+ Reporter.ToLog(eLogLevel.ERROR, "Error while logging previous activity and actions", ex);
+ }
+
+ mBusinessFlow.CurrentActivity = activityToExecute;
+
await mExecutionEngine.ContinueRunAsync(eContinueLevel.StandalonBusinessFlow, eContinueFrom.SpecificActivity, mBusinessFlow, (Activity)executedItem);
break;
default:
diff --git a/Ginger/Ginger/DragDropLib/DragDrop2.cs b/Ginger/Ginger/DragDropLib/DragDrop2.cs
index 69abfa6c3a..f701295d1f 100644
--- a/Ginger/Ginger/DragDropLib/DragDrop2.cs
+++ b/Ginger/Ginger/DragDropLib/DragDrop2.cs
@@ -238,6 +238,12 @@ public static void HookEventHandlers(UIElement DragDropControl)
DragDropControl.Drop += DragSource_Drop;
DragDropControl.DragEnter += DragTarget_DragEnter;
DragDropControl.GiveFeedback += DragSource_GiveFeedback;
+ DragDropControl.DragLeave += DragDropControl_DragLeave;
+ }
+
+ private static void DragDropControl_DragLeave(object sender, DragEventArgs e)
+ {
+ DDW.SetDragIcon(DragDropLib.DragInfo.eDragIcon.DoNotDrop);
}
public static void UnHookEventHandlers(UIElement DragDropControl)
@@ -247,6 +253,7 @@ public static void UnHookEventHandlers(UIElement DragDropControl)
DragDropControl.Drop -= DragSource_Drop;
DragDropControl.DragEnter -= DragTarget_DragEnter;
DragDropControl.GiveFeedback -= DragSource_GiveFeedback;
+ DragDropControl.DragLeave -= DragDropControl_DragLeave;
}
private static void DragDropControl_DragOver(object sender, DragEventArgs e)
diff --git a/Ginger/Ginger/Environments/AddEnvironmentWizardLib/AddNewEnvAppsPage.xaml.cs b/Ginger/Ginger/Environments/AddEnvironmentWizardLib/AddNewEnvAppsPage.xaml.cs
index d9dd307099..7869dfa5fc 100644
--- a/Ginger/Ginger/Environments/AddEnvironmentWizardLib/AddNewEnvAppsPage.xaml.cs
+++ b/Ginger/Ginger/Environments/AddEnvironmentWizardLib/AddNewEnvAppsPage.xaml.cs
@@ -18,12 +18,14 @@ limitations under the License.
using amdocs.ginger.GingerCoreNET;
using Amdocs.Ginger.Common;
+using Amdocs.Ginger.Common.UIElement;
using Ginger.SolutionWindows;
using Ginger.UserControls;
using GingerCore;
using GingerCore.Environments;
using GingerCoreNET.SolutionRepositoryLib.RepositoryObjectsLib.PlatformsLib;
using GingerWPF.WizardLib;
+using System;
using System.Linq;
using System.Windows;
using System.Windows.Controls;
@@ -48,10 +50,50 @@ public AddNewEnvAppsPage()
view.GridColsView.Add(new GridColView() { Field = nameof(EnvApplication.ItemImageType), Header = " ", StyleType = GridColView.eGridColStyleType.ImageMaker, WidthWeight = 5, MaxWidth = 16 });
view.GridColsView.Add(new GridColView() { Field = nameof(EnvApplication.Platform), Header = "Platform Type", WidthWeight = 40 });
+ SelectApplicationGrid.AddToolbarTool("@UnCheckAllColumn_16x16.png", "Check/Uncheck All Applications", new RoutedEventHandler(CheckUnCheckAllApplications));
+
SelectApplicationGrid.SetAllColumnsDefaultView(view);
SelectApplicationGrid.InitViewItems();
}
+ private void CheckUnCheckAllApplications(object sender, RoutedEventArgs e)
+ {
+ IObservableList filteringEnvApplication = SelectApplicationGrid.DataSourceList;
+
+
+ int selectedItems = CountSelectedItems();
+ if (selectedItems < SelectApplicationGrid.DataSourceList.Count)
+ {
+ foreach (EnvApplication EnvApp in filteringEnvApplication)
+ {
+ EnvApp.Active = true;
+ }
+ }
+ else if (selectedItems == SelectApplicationGrid.DataSourceList.Count)
+ {
+ foreach (EnvApplication EnvApp in filteringEnvApplication)
+ {
+ EnvApp.Active = false;
+ }
+ }
+
+ SelectApplicationGrid.DataSourceList = filteringEnvApplication;
+ }
+
+ private int CountSelectedItems()
+ {
+ int counter = 0;
+ foreach (EnvApplication EnvApplication in SelectApplicationGrid.DataSourceList)
+ {
+ if (EnvApplication.Active)
+ {
+ counter++;
+ }
+ }
+ return counter;
+ }
+
+
public void WizardEvent(WizardEventArgs WizardEventArgs)
{
switch (WizardEventArgs.EventType)
diff --git a/Ginger/Ginger/Environments/AppsListPage.xaml.cs b/Ginger/Ginger/Environments/AppsListPage.xaml.cs
index bdcdeddaf9..58446c04b1 100644
--- a/Ginger/Ginger/Environments/AppsListPage.xaml.cs
+++ b/Ginger/Ginger/Environments/AppsListPage.xaml.cs
@@ -99,7 +99,6 @@ private void SetGridView()
GridViewDef view = new GridViewDef(GridViewDef.DefaultViewName);
view.GridColsView = new ObservableList();
- view.GridColsView.Add(new GridColView() { Field = nameof(EnvApplication.Active), WidthWeight = 100, StyleType = GridColView.eGridColStyleType.CheckBox });
view.GridColsView.Add(new GridColView() { Field = nameof(EnvApplication.ItemImageType), Header = " ", StyleType = GridColView.eGridColStyleType.ImageMaker, WidthWeight = 5, MaxWidth = 16 });
view.GridColsView.Add(new GridColView() { Field = nameof(EnvApplication.Name), WidthWeight = 100 });
view.GridColsView.Add(new GridColView() { Field = nameof(EnvApplication.Platform), Header="Platform Type",WidthWeight = 100 });
diff --git a/Ginger/Ginger/GeneralLib/DebugConsoleWindow.xaml.cs b/Ginger/Ginger/GeneralLib/DebugConsoleWindow.xaml.cs
index c6d7ca005f..6d88e20ea3 100644
--- a/Ginger/Ginger/GeneralLib/DebugConsoleWindow.xaml.cs
+++ b/Ginger/Ginger/GeneralLib/DebugConsoleWindow.xaml.cs
@@ -93,8 +93,8 @@ public void ShowAsWindow()
private void CopyToClipboradBtn_Click(object sender, RoutedEventArgs e)
{
- // Clipboard.SetText(output.GetText()+"\n"+ errors.GetText());
- Clipboard.SetText(xConsoleTextBlock.Text);
+ // GingerCore.General.SetClipboardText(output.GetText()+"\n"+ errors.GetText());
+ GingerCore.General.SetClipboardText(xConsoleTextBlock.Text);
}
private void CloseWindow(object sender, EventArgs e)
diff --git a/Ginger/Ginger/GeneralLib/ExceptionDetailsPage.xaml.cs b/Ginger/Ginger/GeneralLib/ExceptionDetailsPage.xaml.cs
index 55157af8db..e20a047fc2 100644
--- a/Ginger/Ginger/GeneralLib/ExceptionDetailsPage.xaml.cs
+++ b/Ginger/Ginger/GeneralLib/ExceptionDetailsPage.xaml.cs
@@ -135,7 +135,7 @@ private string GetFullErrorText()
private void CopyToClipboradBtn_Click(object sender, RoutedEventArgs e)
{
- Clipboard.SetText(GetFullErrorText());
+ GingerCore.General.SetClipboardText(GetFullErrorText());
}
private void ViewLogBtn_Click(object sender, RoutedEventArgs e)
diff --git a/Ginger/Ginger/GeneralLib/GeneralErrorWindow.xaml.cs b/Ginger/Ginger/GeneralLib/GeneralErrorWindow.xaml.cs
index 68454b4090..74c1b9b5b8 100644
--- a/Ginger/Ginger/GeneralLib/GeneralErrorWindow.xaml.cs
+++ b/Ginger/Ginger/GeneralLib/GeneralErrorWindow.xaml.cs
@@ -57,7 +57,7 @@ private void CloseButton_Click(object sender, RoutedEventArgs e)
private void CopyToClipboardButton_Click(object sender, RoutedEventArgs e)
{
- Clipboard.SetText(FullInfoTextBox.Text);
+ GingerCore.General.SetClipboardText(FullInfoTextBox.Text);
Reporter.ToUser(eUserMsgKey.CopiedErrorInfo);
}
}
diff --git a/Ginger/Ginger/GeneralLib/LoadingPage.xaml.cs b/Ginger/Ginger/GeneralLib/LoadingPage.xaml.cs
index 65a926a4af..3518c290c2 100644
--- a/Ginger/Ginger/GeneralLib/LoadingPage.xaml.cs
+++ b/Ginger/Ginger/GeneralLib/LoadingPage.xaml.cs
@@ -25,11 +25,14 @@ namespace Ginger
///
public partial class LoadingPage : Page
{
- public LoadingPage(string loadingLabel = "Loading...")
+ public LoadingPage(string loadingLabel = "Loading...", double width = 80, double height = 80, double fontSize = 25)
{
InitializeComponent();
xProcessingLabel.Content = loadingLabel;
+ xProcessingLabel.FontSize = fontSize;
+ xProcessingIcon.Width = width;
+ xProcessingIcon.Height = height;
}
}
}
diff --git a/Ginger/Ginger/GeneralLib/LogDetailsPage.xaml.cs b/Ginger/Ginger/GeneralLib/LogDetailsPage.xaml.cs
index 9eab21ceca..2124abb311 100644
--- a/Ginger/Ginger/GeneralLib/LogDetailsPage.xaml.cs
+++ b/Ginger/Ginger/GeneralLib/LogDetailsPage.xaml.cs
@@ -225,7 +225,7 @@ public void ShowAsWindow(eWindowShowStyle windowStyle = eWindowShowStyle.Dialog)
private void CopyToClipboradBtn_Click(object sender, RoutedEventArgs e)
{
- Clipboard.SetText(mTextBlockHelper.GetText());
+ GingerCore.General.SetClipboardText(mTextBlockHelper.GetText());
}
private void ViewLogBtn_Click(object sender, RoutedEventArgs e)
diff --git a/Ginger/Ginger/Ginger.csproj b/Ginger/Ginger/Ginger.csproj
index 4d16c1dc80..c70eb1c204 100644
--- a/Ginger/Ginger/Ginger.csproj
+++ b/Ginger/Ginger/Ginger.csproj
@@ -602,6 +602,10 @@
+
+
+
+
@@ -612,6 +616,8 @@
+
+
@@ -686,7 +692,7 @@
-
+
@@ -2457,16 +2463,33 @@
Never
-
-
-
-
+
+ Never
+
+
+ Never
+
+
+ Never
+
+
+ Never
+
+
+ Never
+
+
+ Never
+
Never
Never
+
+ Never
+
diff --git a/Ginger/Ginger/PluginsLib/PluginsIndexPage.xaml.cs b/Ginger/Ginger/PluginsLib/PluginsIndexPage.xaml.cs
index f227510d20..96d16fe172 100644
--- a/Ginger/Ginger/PluginsLib/PluginsIndexPage.xaml.cs
+++ b/Ginger/Ginger/PluginsLib/PluginsIndexPage.xaml.cs
@@ -22,6 +22,7 @@ limitations under the License.
using Amdocs.Ginger.CoreNET.PlugInsLib;
using Amdocs.Ginger.Repository;
using Ginger.UserControls;
+using System;
using System.Diagnostics;
using System.IO;
using System.Threading.Tasks;
@@ -170,16 +171,25 @@ private void xInstallButonn_Click(object sender, RoutedEventArgs e)
}
Task.Factory.StartNew(() =>
{
- WorkSpace.Instance.PlugInsManager.InstallPluginPackage(onlinePluginPackage, release);
- onlinePluginPackage.Status = "Installed";
- }).ContinueWith((a) =>
- {
- Dispatcher.Invoke(() =>
+ try
{
- xProcessingImage.Visibility = Visibility.Collapsed;
- xInstallButton.ButtonText = "Install";
- xInstalledVersion.Text = onlinePluginPackage.CurrentPackage;
- });
+ WorkSpace.Instance.PlugInsManager.InstallPluginPackage(onlinePluginPackage, release);
+ onlinePluginPackage.Status = "Installed";
+ }
+ catch (Exception ex)
+ {
+ onlinePluginPackage.Status = "Error in installation,Please check error logs";
+ throw;
+ }
+ finally
+ {
+ Dispatcher.Invoke(() =>
+ {
+ xProcessingImage.Visibility = Visibility.Collapsed;
+ xInstallButton.ButtonText = "Install";
+ xInstalledVersion.Text = onlinePluginPackage.CurrentPackage;
+ });
+ }
});
xInstalledSection.Visibility = Visibility.Visible;
diff --git a/Ginger/Ginger/Reports/ExecutionResultsConfiguration.xaml b/Ginger/Ginger/Reports/ExecutionResultsConfiguration.xaml
index 2b868ca5db..13d04b003c 100644
--- a/Ginger/Ginger/Reports/ExecutionResultsConfiguration.xaml
+++ b/Ginger/Ginger/Reports/ExecutionResultsConfiguration.xaml
@@ -220,6 +220,7 @@
+
@@ -236,6 +237,10 @@
+
+
+
+
diff --git a/Ginger/Ginger/Reports/ExecutionResultsConfiguration.xaml.cs b/Ginger/Ginger/Reports/ExecutionResultsConfiguration.xaml.cs
index 604b75f99f..969128cffe 100644
--- a/Ginger/Ginger/Reports/ExecutionResultsConfiguration.xaml.cs
+++ b/Ginger/Ginger/Reports/ExecutionResultsConfiguration.xaml.cs
@@ -103,7 +103,7 @@ private void SetControls()
xPublishLogToCentralDBRadioBtnPanel, _selectedExecutionLoggerConfiguration,
nameof(ExecutionLoggerConfiguration.PublishLogToCentralDB), PublishLogToCentralDBRadioButton_CheckedHandler);
xDeleteLocalDataRadioButton.Init(typeof(ExecutionLoggerConfiguration.eDeleteLocalDataOnPublish), xDeleteLocalDataOnPublishPanel, _selectedExecutionLoggerConfiguration,nameof(ExecutionLoggerConfiguration.DeleteLocalDataOnPublish));
-
+ xUploadArtifactsButton.Init(typeof(ExecutionLoggerConfiguration.eUploadExecutionArtifactsToCentralizedReport), xUploadArtifactsPanel, _selectedExecutionLoggerConfiguration, nameof(ExecutionLoggerConfiguration.UploadArtifactsToCentralizedReport));
}
diff --git a/Ginger/Ginger/Run/RunSetActions/ExportResultsToALMConfigPage.xaml b/Ginger/Ginger/Run/RunSetActions/ExportResultsToALMConfigPage.xaml
index db6b7d0db4..4a84ca7309 100644
--- a/Ginger/Ginger/Run/RunSetActions/ExportResultsToALMConfigPage.xaml
+++ b/Ginger/Ginger/Run/RunSetActions/ExportResultsToALMConfigPage.xaml
@@ -30,8 +30,8 @@
-
-
+
+
diff --git a/Ginger/Ginger/RunSetLib/CreateAutoRunWizardLib/AutoRunWizardCLITypePage.xaml.cs b/Ginger/Ginger/RunSetLib/CreateAutoRunWizardLib/AutoRunWizardCLITypePage.xaml.cs
index a5e870da02..34b63372a8 100644
--- a/Ginger/Ginger/RunSetLib/CreateAutoRunWizardLib/AutoRunWizardCLITypePage.xaml.cs
+++ b/Ginger/Ginger/RunSetLib/CreateAutoRunWizardLib/AutoRunWizardCLITypePage.xaml.cs
@@ -235,7 +235,7 @@ private void xRequestRadioButton_Checked(object sender, RoutedEventArgs e)
private void xCopyBtn_Click(object sender, RoutedEventArgs e)
{
- Clipboard.SetText(xCLIContentTextBox.Text.ToString());
+ GingerCore.General.SetClipboardText(xCLIContentTextBox.Text.ToString());
}
}
diff --git a/Ginger/Ginger/RunSetLib/CreateAutoRunWizardLib/AutoRunWizardShortcutPage.xaml.cs b/Ginger/Ginger/RunSetLib/CreateAutoRunWizardLib/AutoRunWizardShortcutPage.xaml.cs
index 84b86384fa..15fc236643 100644
--- a/Ginger/Ginger/RunSetLib/CreateAutoRunWizardLib/AutoRunWizardShortcutPage.xaml.cs
+++ b/Ginger/Ginger/RunSetLib/CreateAutoRunWizardLib/AutoRunWizardShortcutPage.xaml.cs
@@ -178,7 +178,7 @@ private void xRequestExecutionYesRadioButton_Checked(object sender, RoutedEventA
private void xCopyBtn_Click(object sender, RoutedEventArgs e)
{
- Clipboard.SetText(xShortcutContentTextBox.Text.ToString());
+ GingerCore.General.SetClipboardText(xShortcutContentTextBox.Text.ToString());
}
}
}
diff --git a/Ginger/Ginger/RunSetPageLib/NewRunSetPage.xaml.cs b/Ginger/Ginger/RunSetPageLib/NewRunSetPage.xaml.cs
index c9b3460f6d..2dd0427b76 100644
--- a/Ginger/Ginger/RunSetPageLib/NewRunSetPage.xaml.cs
+++ b/Ginger/Ginger/RunSetPageLib/NewRunSetPage.xaml.cs
@@ -1646,7 +1646,8 @@ public async void LoadRunSetConfig(RunSetConfig runSetConfig, bool runAsync = tr
//show current Run set UI
xRunsetPageGrid.Visibility = Visibility.Visible;
- bool isSolutionSame = mRunSetConfig != null && mRunSetConfig.ContainingFolderFullPath != null && mRunSetConfig.ContainingFolderFullPath.Contains(WorkSpace.Instance.Solution.FileName);
+ bool isSolutionSame =
+ mRunSetConfig != null && WorkSpace.Instance.SolutionRepository.GetRepositoryItemByGuid(mRunSetConfig.Guid) != null;
bool bIsRunsetDirty = mRunSetConfig != null && mRunSetConfig.DirtyStatus == eDirtyStatus.Modified && isSolutionSame;
if (WorkSpace.Instance.RunsetExecutor.DefectSuggestionsList != null)
{
diff --git a/Ginger/Ginger/SolutionWindows/SolutionPage.xaml.cs b/Ginger/Ginger/SolutionWindows/SolutionPage.xaml.cs
index 4cb42279ef..602cd0550c 100644
--- a/Ginger/Ginger/SolutionWindows/SolutionPage.xaml.cs
+++ b/Ginger/Ginger/SolutionWindows/SolutionPage.xaml.cs
@@ -143,6 +143,7 @@ private void UndoBtn_Click(object sender, RoutedEventArgs e)
private void SaveBtn_Click(object sender, RoutedEventArgs e)
{
mSolution.SolutionOperations.SaveSolution(true, Solution.eSolutionItemToSave.GeneralDetails);
+ Reporter.ToUser(eUserMsgKey.SaveSolution);
}
public bool ShowAsWindow(Solution solution, eWindowShowStyle windowStyle = eWindowShowStyle.Dialog, bool startupLocationWithOffset = false)
diff --git a/Ginger/Ginger/SolutionWindows/TargetApplicationsPage.xaml.cs b/Ginger/Ginger/SolutionWindows/TargetApplicationsPage.xaml.cs
index 8e5d8dfb10..49d3b69fe3 100644
--- a/Ginger/Ginger/SolutionWindows/TargetApplicationsPage.xaml.cs
+++ b/Ginger/Ginger/SolutionWindows/TargetApplicationsPage.xaml.cs
@@ -23,6 +23,8 @@ limitations under the License.
using Ginger.UserControls;
using Ginger.UserControlsLib;
using GingerCore;
+using GingerCore.Environments;
+using GingerCore.Platforms;
using GingerCoreNET.SolutionRepositoryLib.RepositoryObjectsLib.PlatformsLib;
using System.Collections.Generic;
using System.Linq;
@@ -121,7 +123,7 @@ private void CopySelectedItemID(object sender, RoutedEventArgs e)
{
if (xTargetApplicationsGrid.Grid.SelectedItem != null)
{
- Clipboard.SetText(((RepositoryItemBase)xTargetApplicationsGrid.Grid.SelectedItem).Guid.ToString());
+ GingerCore.General.SetClipboardText(((RepositoryItemBase)xTargetApplicationsGrid.Grid.SelectedItem).Guid.ToString());
}
else
{
@@ -187,11 +189,12 @@ private void UpdateApplicationNameChangeInSolution(ApplicationPlatform app)
foreach (BusinessFlow bf in WorkSpace.Instance.SolutionRepository.GetAllRepositoryItems())
{
//update the BF target applications
+ bf.StartDirtyTracking();
foreach (var activity in bf.Activities)
{
//donot check for TargetPlugins, only for TargetApplications
- if (activity.TargetApplication.Equals(app.NameBeforeEdit))
+ if (string.Equals(activity.TargetApplication, app.NameBeforeEdit))
{
activity.StartDirtyTracking();
activity.TargetApplication = app.AppName;
@@ -199,8 +202,18 @@ private void UpdateApplicationNameChangeInSolution(ApplicationPlatform app)
numOfAfectedItems++;
}
}
+
+ foreach (TargetApplication bfTargetApp in bf.TargetApplications.Where((targetApp)=>targetApp is TargetApplication))
+ {
+ if (string.Equals(bfTargetApp.AppName, app.NameBeforeEdit))
+ {
+ bfTargetApp.StartDirtyTracking();
+ bfTargetApp.AppName = app.AppName;
+ }
+ }
}
+
foreach (Activity activity in WorkSpace.Instance.SolutionRepository.GetAllRepositoryItems())
{
//update the shared repository activities
@@ -212,6 +225,19 @@ private void UpdateApplicationNameChangeInSolution(ApplicationPlatform app)
}
}
+ foreach(ProjEnvironment projEnv in WorkSpace.Instance.SolutionRepository.GetAllRepositoryItems())
+ {
+ foreach (EnvApplication envApplication in projEnv.Applications)
+ {
+
+ if(string.Equals(envApplication.Name, app.NameBeforeEdit))
+ {
+ projEnv.StartDirtyTracking();
+ envApplication.Name = app.AppName;
+ }
+ }
+ }
+
if(numOfAfectedItems > 0 && OnActivityUpdate!=null)
{
OnActivityUpdate();
diff --git a/Ginger/Ginger/SolutionWindows/TreeViewItems/DocumentsFolderTreeItem.cs b/Ginger/Ginger/SolutionWindows/TreeViewItems/DocumentsFolderTreeItem.cs
index 242d87044c..c2d8a087fe 100644
--- a/Ginger/Ginger/SolutionWindows/TreeViewItems/DocumentsFolderTreeItem.cs
+++ b/Ginger/Ginger/SolutionWindows/TreeViewItems/DocumentsFolderTreeItem.cs
@@ -169,6 +169,66 @@ void ITreeViewItem.SetTools(ITreeView TV)
}
+ public override void DeleteAllTreeItems()
+ {
+ if (Reporter.ToUser(eUserMsgKey.DeleteTreeFolderAreYouSure, mTreeView.Tree.GetSelectedTreeNodeName()) == Amdocs.Ginger.Common.eUserMsgSelection.Yes)
+ {
+ List childNodes = mTreeView.Tree.GetTreeNodeChildsIncludingSubChilds((ITreeViewItem)this);
+ childNodes.Reverse();
+ foreach (ITreeViewItem node in childNodes)
+ {
+ if (node == null)
+ {
+ continue;
+ }
+
+ if (node.NodeObject() != null)
+ {
+ if (node.NodeObject() is RepositoryFolderBase)
+ {
+ WorkSpace.Instance.SolutionRepository.DeleteRepositoryItemFolder((RepositoryFolderBase)node.NodeObject());
+ }
+ else if (node.NodeObject() is RepositoryItemBase)
+ {
+ ((NewTreeViewItemBase)node).DeleteTreeItem(node.NodeObject(), true, false);
+ }
+ else if (node.NodeObject() is string)
+ {
+ string filepath = System.IO.Path.Combine(WorkSpace.Instance.Solution.ContainingFolderFullPath, "Documents", (string)node.NodeObject());
+ if (File.Exists(filepath))
+ {
+ try
+ {
+ File.Delete(filepath);
+ }
+ catch (Exception ex)
+ {
+ Reporter.ToLog(eLogLevel.ERROR, $"Error while deleting file '{filepath}'", ex);
+ }
+ }
+ }
+ else
+ {
+ Reporter.ToLog(eLogLevel.DEBUG, $"cannot delete item, unknown type - {node.NodeObject().GetType().FullName}");
+ }
+ }
+ else
+ {
+ if (Directory.Exists(this.NodePath()))
+ {
+ String[] DocFolderChildItems = Directory.GetDirectories(this.NodePath());
+ foreach (String path in DocFolderChildItems)
+ {
+ Directory.Delete(path, true);
+ }
+ }
+ break;
+ }
+ }
+ }
+ mTreeView.Tree.RefreshSelectedTreeNodeParent();
+ }
+
private void AddImportsAndCreateDocumentsOptions()
{
//Creating the Generic menus
diff --git a/Ginger/Ginger/SolutionWindows/TreeViewItems/EnvironmentsTreeItems/EnvironmentApplicationList.xaml b/Ginger/Ginger/SolutionWindows/TreeViewItems/EnvironmentsTreeItems/EnvironmentApplicationList.xaml
index f187947257..31c84f12e8 100644
--- a/Ginger/Ginger/SolutionWindows/TreeViewItems/EnvironmentsTreeItems/EnvironmentApplicationList.xaml
+++ b/Ginger/Ginger/SolutionWindows/TreeViewItems/EnvironmentsTreeItems/EnvironmentApplicationList.xaml
@@ -10,16 +10,13 @@
Title="Add Application">
-
-
-
-
-
-
+
+
-
+
diff --git a/Ginger/Ginger/SolutionWindows/TreeViewItems/EnvironmentsTreeItems/EnvironmentApplicationList.xaml.cs b/Ginger/Ginger/SolutionWindows/TreeViewItems/EnvironmentsTreeItems/EnvironmentApplicationList.xaml.cs
index 1e6a93ac5b..ee3caac03a 100644
--- a/Ginger/Ginger/SolutionWindows/TreeViewItems/EnvironmentsTreeItems/EnvironmentApplicationList.xaml.cs
+++ b/Ginger/Ginger/SolutionWindows/TreeViewItems/EnvironmentsTreeItems/EnvironmentApplicationList.xaml.cs
@@ -25,6 +25,7 @@ limitations under the License.
using GingerCore.Environments;
using GingerTest.WizardLib;
using amdocs.ginger.GingerCoreNET;
+using Amdocs.Ginger.Common.UIElement;
namespace Ginger.SolutionWindows.TreeViewItems.EnvironmentsTreeItems
{
@@ -56,10 +57,48 @@ private void SetGridView()
AppsGrid.SetAllColumnsDefaultView(view);
AppsGrid.InitViewItems();
+ AppsGrid.AddToolbarTool("@UnCheckAllColumn_16x16.png", "Check/Uncheck All Applications", new RoutedEventHandler(CheckUnCheckAllApplications));
xAddApplicationToSolution.ButtonTextSize = 12;
AppsGrid.DataSourceList = FilteredListToBeDisplayed;
}
+ private void CheckUnCheckAllApplications(object sender, RoutedEventArgs e)
+ {
+ IObservableList filteringEnvApplication = AppsGrid.DataSourceList;
+
+
+ int selectedItems = CountSelectedItems();
+ if (selectedItems < AppsGrid.DataSourceList.Count)
+ {
+ foreach (ApplicationPlatform ApplicationPlatform in filteringEnvApplication)
+ {
+ ApplicationPlatform.Selected = true;
+ }
+ }
+ else if (selectedItems == AppsGrid.DataSourceList.Count)
+ {
+ foreach (ApplicationPlatform ApplicationPlatform in filteringEnvApplication)
+ {
+ ApplicationPlatform.Selected = false;
+ }
+ }
+
+ AppsGrid.DataSourceList = filteringEnvApplication;
+ }
+
+ private int CountSelectedItems()
+ {
+ int counter = 0;
+ foreach (ApplicationPlatform ApplicationPlatform in AppsGrid.DataSourceList)
+ {
+ if (ApplicationPlatform.Selected)
+ {
+ counter++;
+ }
+ }
+ return counter;
+ }
+
public void ShowAsWindow(eWindowShowStyle windowStyle = eWindowShowStyle.Dialog, bool ShowCancelButton = true)
{
diff --git a/Ginger/Ginger/SolutionWindows/TreeViewItems/EnvironmentsTreeItems/EnvironmentTreeItem.cs b/Ginger/Ginger/SolutionWindows/TreeViewItems/EnvironmentsTreeItems/EnvironmentTreeItem.cs
index 09571aabcc..deb2f44b6e 100644
--- a/Ginger/Ginger/SolutionWindows/TreeViewItems/EnvironmentsTreeItems/EnvironmentTreeItem.cs
+++ b/Ginger/Ginger/SolutionWindows/TreeViewItems/EnvironmentsTreeItems/EnvironmentTreeItem.cs
@@ -82,7 +82,11 @@ private void Applications_CollectionChanged(object sender, System.Collections.Sp
{
if (mTreeView != null) //TODO: add handling to make sure this will never be Null and won't be set only on SetTools
{
- mTreeView.Tree.RefreshTreeNodeChildrens(this);
+ if (TreeViewItem != null)
+ {
+ //we collapse the TreeViewItem so that when it will be expanded, it will be updated automatically
+ TreeViewItem.IsExpanded = false;
+ }
}
}
diff --git a/Ginger/Ginger/SourceControl/CheckInPage.xaml.cs b/Ginger/Ginger/SourceControl/CheckInPage.xaml.cs
index 12a168ffa9..e2e21ce11f 100644
--- a/Ginger/Ginger/SourceControl/CheckInPage.xaml.cs
+++ b/Ginger/Ginger/SourceControl/CheckInPage.xaml.cs
@@ -239,7 +239,7 @@ private void UnSelectAll(object sender, RoutedEventArgs e)
}
CheckInFilesGrid.DataSourceList = mFiles;
}
-
+
private async void CommitAndCheckinButton_Click(object sender, RoutedEventArgs e)
{
if (WorkSpace.Instance.Solution.SourceControl.Name == SourceControlBase.eSourceControlType.GIT.ToString())
@@ -261,13 +261,14 @@ private async void CommitAndCheckinButton_Click(object sender, RoutedEventArgs e
SourceControlIntegration.BusyInProcessWhileDownloading = true;
List SelectedFiles = mFiles.Where(x => x.Selected == true).ToList();
- ObservableList unpushedLocalCommits = null;
+ int unpushedLocalCommitsCount = 0;
if (WorkSpace.Instance.Solution.SourceControl.GetSourceControlType == SourceControlBase.eSourceControlType.GIT)
{
- unpushedLocalCommits = WorkSpace.Instance.Solution.SourceControl.GetUnpushedLocalCommits();
+ ObservableList unpushedLocalCommits = WorkSpace.Instance.Solution.SourceControl.GetUnpushedLocalCommits();
+ unpushedLocalCommitsCount = unpushedLocalCommits.Count;
}
- if ((SelectedFiles == null || SelectedFiles.Count == 0) && (unpushedLocalCommits == null || unpushedLocalCommits.Count == 0))
+ if ((SelectedFiles == null || SelectedFiles.Count == 0) && (unpushedLocalCommitsCount == 0))
{
Reporter.ToUser(eUserMsgKey.SourceControlMissingSelectionToCheckIn);
return;
@@ -277,15 +278,21 @@ private async void CommitAndCheckinButton_Click(object sender, RoutedEventArgs e
Reporter.ToUser(eUserMsgKey.AskToAddCheckInComment);
return;
}
-
- if ((SelectedFiles == null || SelectedFiles.Count == 0) && unpushedLocalCommits != null && unpushedLocalCommits.Count > 0)
+ if (SelectedFiles != null && SelectedFiles.Count > 0 && unpushedLocalCommitsCount > 0)
+ {
+ if (Reporter.ToUser(eUserMsgKey.SourceControlChkInConfirmtionForLocalCommitAndFiles, SelectedFiles.Count, unpushedLocalCommitsCount) == eUserMsgSelection.No)
+ {
+ return;
+ }
+ }
+ else if ((SelectedFiles == null || SelectedFiles.Count == 0) && unpushedLocalCommitsCount > 0)
{
- if (Reporter.ToUser(eUserMsgKey.SourceControlChkInConfirmtionForLocalCommit, unpushedLocalCommits) == eUserMsgSelection.No)
+ if (Reporter.ToUser(eUserMsgKey.SourceControlChkInConfirmtionForLocalCommit, unpushedLocalCommitsCount) == eUserMsgSelection.No)
{
return;
}
}
- else if (Reporter.ToUser(eUserMsgKey.SourceControlChkInConfirmtion, SelectedFiles.Count) == eUserMsgSelection.No)
+ else if (Reporter.ToUser(eUserMsgKey.SourceControlChkInConfirmtionForLocalFiles, SelectedFiles.Count) == eUserMsgSelection.No)
{
return;
}
@@ -304,7 +311,7 @@ await Task.Run(() =>
SourceControlIntegration.CleanUp(WorkSpace.Instance.Solution.SourceControl, WorkSpace.Instance.Solution.Folder);
List pathsToCommit = StageTheFilesToCommit(SelectedFiles);
-
+
bool conflictHandled = false;
bool CommitSuccess = false;
CommitSuccess = CommitAndCheckinChanges(WorkSpace.Instance.Solution.SourceControl, pathsToCommit, Comments, WorkSpace.Instance.Solution.ShowIndicationkForLockedItems, ref conflictHandled);
@@ -768,7 +775,7 @@ private void RefreshLocalCommitsGrid(object sender, RoutedEventArgs e)
private void InitLocalCommitGrid()
{
LocalCommitedFilesGrid.DataSourceList = WorkSpace.Instance.Solution.SourceControl.GetUnpushedLocalCommits();
- LocalCommitedFilesGrid.Title = $"Pending Local Commits for Check-In {{{LocalCommitedFilesGrid.DataSourceList.Count}}}";
+ LocalCommitedFilesGrid.Title = $"Pending Local Commits for Check-In ({LocalCommitedFilesGrid.DataSourceList.Count})";
}
private void SetLocalCommitGridView()
diff --git a/Ginger/Ginger/UserControlsLib/ConsumerComboBox.xaml.cs b/Ginger/Ginger/UserControlsLib/ConsumerComboBox.xaml.cs
index e361ef3a3a..2c2045cd77 100644
--- a/Ginger/Ginger/UserControlsLib/ConsumerComboBox.xaml.cs
+++ b/Ginger/Ginger/UserControlsLib/ConsumerComboBox.xaml.cs
@@ -250,15 +250,30 @@ private void SetText()
displayText.Append(consumer.Name);
displayText.Append(',');
}
- Text = displayText.ToString().TrimEnd(',');
+ Text = EscapeAccessKey(displayText.ToString().TrimEnd(','));
}
// set DefaultText if nothing else selected
if (string.IsNullOrEmpty(Text))
{
- Text = DefaultText;
+ Text = EscapeAccessKey(DefaultText);
}
}
+ ///
+ /// Escape all underscores ('_') from the provided string with double underscores ('__'). This is helpful in case of displaying underscore in controls where the first underscore is considered as Access Key. For more details, https://github.com/MaterialDesignInXAML/MaterialDesignInXamlToolkit/issues/1427.
+ ///
+ /// string to escape
+ /// Escaped string where all the underscores ('_') is escaped using double underscores ('__').
+ private static string EscapeAccessKey(string s)
+ {
+ if (string.IsNullOrEmpty(s))
+ {
+ return s;
+ }
+
+ return s.Replace("_", "__");
+ }
+
private string? GetConsumerName(Guid consumerGuid)
{
return
diff --git a/Ginger/Ginger/UserControlsLib/ImageMakerLib/ImageMakerControl.xaml.cs b/Ginger/Ginger/UserControlsLib/ImageMakerLib/ImageMakerControl.xaml.cs
index 281df92188..d68ce73b93 100644
--- a/Ginger/Ginger/UserControlsLib/ImageMakerLib/ImageMakerControl.xaml.cs
+++ b/Ginger/Ginger/UserControlsLib/ImageMakerLib/ImageMakerControl.xaml.cs
@@ -727,6 +727,15 @@ private void SetImage()
case eImageType.WordFile:
SetAsFontAwesomeIcon(EFontAwesomeIcon.Solid_FileWord);
break;
+ case eImageType.FileXML:
+ SetAsStaticImage("xml.png");
+ break;
+ case eImageType.FileJSON:
+ SetAsStaticImage("json.png");
+ break;
+ case eImageType.FileJavascript:
+ SetAsStaticImage("javascript.png");
+ break;
case eImageType.FilePowerpoint:
SetAsFontAwesomeIcon(EFontAwesomeIcon.Solid_FilePowerpoint);
break;
diff --git a/Ginger/Ginger/UserControlsLib/ImageMakerLib/Images/javascript.png b/Ginger/Ginger/UserControlsLib/ImageMakerLib/Images/javascript.png
new file mode 100644
index 0000000000..7fda7ea338
Binary files /dev/null and b/Ginger/Ginger/UserControlsLib/ImageMakerLib/Images/javascript.png differ
diff --git a/Ginger/Ginger/UserControlsLib/ImageMakerLib/Images/json.png b/Ginger/Ginger/UserControlsLib/ImageMakerLib/Images/json.png
new file mode 100644
index 0000000000..d97f69534c
Binary files /dev/null and b/Ginger/Ginger/UserControlsLib/ImageMakerLib/Images/json.png differ
diff --git a/Ginger/Ginger/UserControlsLib/ImageMakerLib/Images/xml.png b/Ginger/Ginger/UserControlsLib/ImageMakerLib/Images/xml.png
new file mode 100644
index 0000000000..0ec148467a
Binary files /dev/null and b/Ginger/Ginger/UserControlsLib/ImageMakerLib/Images/xml.png differ
diff --git a/Ginger/Ginger/UserControlsLib/JsonViewer/JsonViewer.xaml.cs b/Ginger/Ginger/UserControlsLib/JsonViewer/JsonViewer.xaml.cs
index 1aa5ba7a77..72a1b26e73 100644
--- a/Ginger/Ginger/UserControlsLib/JsonViewer/JsonViewer.xaml.cs
+++ b/Ginger/Ginger/UserControlsLib/JsonViewer/JsonViewer.xaml.cs
@@ -1,4 +1,22 @@
-using System;
+#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 System;
using System.Collections.Generic;
using System.Windows;
using System.Windows.Controls;
@@ -54,7 +72,7 @@ private void JValue_OnMouseLeftButtonDown(object sender, MouseButtonEventArgs e)
var tb = sender as TextBlock;
if (tb != null)
{
- Clipboard.SetText(tb.Text);
+ GingerCore.General.SetClipboardText(tb.Text);
}
}
diff --git a/Ginger/Ginger/UserControlsLib/JsonViewer/TemplateSelectors/JPropertyDataTemplateSelector.cs b/Ginger/Ginger/UserControlsLib/JsonViewer/TemplateSelectors/JPropertyDataTemplateSelector.cs
index ace4f387f4..385364fc65 100644
--- a/Ginger/Ginger/UserControlsLib/JsonViewer/TemplateSelectors/JPropertyDataTemplateSelector.cs
+++ b/Ginger/Ginger/UserControlsLib/JsonViewer/TemplateSelectors/JPropertyDataTemplateSelector.cs
@@ -1,4 +1,22 @@
-using System.Windows;
+#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 System.Windows;
using System.Windows.Controls;
using Newtonsoft.Json.Linq;
diff --git a/Ginger/Ginger/UserControlsLib/JsonViewer/ValueConverters/ComplexPropertyMethodToValueConverter.cs b/Ginger/Ginger/UserControlsLib/JsonViewer/ValueConverters/ComplexPropertyMethodToValueConverter.cs
index fb1095e8c7..785089d3f4 100644
--- a/Ginger/Ginger/UserControlsLib/JsonViewer/ValueConverters/ComplexPropertyMethodToValueConverter.cs
+++ b/Ginger/Ginger/UserControlsLib/JsonViewer/ValueConverters/ComplexPropertyMethodToValueConverter.cs
@@ -1,4 +1,22 @@
-using System;
+#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 System;
using System.Collections.Generic;
using System.Globalization;
using System.Linq;
diff --git a/Ginger/Ginger/UserControlsLib/JsonViewer/ValueConverters/JArrayLengthConverter.cs b/Ginger/Ginger/UserControlsLib/JsonViewer/ValueConverters/JArrayLengthConverter.cs
index 4a8f8c544d..3b1781dbdf 100644
--- a/Ginger/Ginger/UserControlsLib/JsonViewer/ValueConverters/JArrayLengthConverter.cs
+++ b/Ginger/Ginger/UserControlsLib/JsonViewer/ValueConverters/JArrayLengthConverter.cs
@@ -1,4 +1,22 @@
-using System;
+#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 System;
using System.Globalization;
using System.Linq;
using System.Windows.Data;
diff --git a/Ginger/Ginger/UserControlsLib/JsonViewer/ValueConverters/JPropertyTypeToColorConverter.cs b/Ginger/Ginger/UserControlsLib/JsonViewer/ValueConverters/JPropertyTypeToColorConverter.cs
index deb7ec2a0b..da6f3f98ff 100644
--- a/Ginger/Ginger/UserControlsLib/JsonViewer/ValueConverters/JPropertyTypeToColorConverter.cs
+++ b/Ginger/Ginger/UserControlsLib/JsonViewer/ValueConverters/JPropertyTypeToColorConverter.cs
@@ -1,4 +1,22 @@
-using System;
+#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 System;
using System.Globalization;
using System.Windows.Data;
using System.Windows.Media;
diff --git a/Ginger/Ginger/UserControlsLib/JsonViewer/ValueConverters/JValueConverter.cs b/Ginger/Ginger/UserControlsLib/JsonViewer/ValueConverters/JValueConverter.cs
index 9368becb8d..76b19048d1 100644
--- a/Ginger/Ginger/UserControlsLib/JsonViewer/ValueConverters/JValueConverter.cs
+++ b/Ginger/Ginger/UserControlsLib/JsonViewer/ValueConverters/JValueConverter.cs
@@ -1,4 +1,22 @@
-using System;
+#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 System;
using System.Globalization;
using System.Windows.Data;
using Newtonsoft.Json.Linq;
diff --git a/Ginger/Ginger/UserControlsLib/JsonViewer/ValueConverters/JValueTypeToColorConverter.cs b/Ginger/Ginger/UserControlsLib/JsonViewer/ValueConverters/JValueTypeToColorConverter.cs
index 35996e24d7..b2f5588535 100644
--- a/Ginger/Ginger/UserControlsLib/JsonViewer/ValueConverters/JValueTypeToColorConverter.cs
+++ b/Ginger/Ginger/UserControlsLib/JsonViewer/ValueConverters/JValueTypeToColorConverter.cs
@@ -1,4 +1,22 @@
-using System;
+#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 System;
using System.Globalization;
using System.Windows.Data;
using System.Windows.Media;
diff --git a/Ginger/Ginger/UserControlsLib/JsonViewer/ValueConverters/MethodToValueConverter.cs b/Ginger/Ginger/UserControlsLib/JsonViewer/ValueConverters/MethodToValueConverter.cs
index dded772711..e56e7bc3e6 100644
--- a/Ginger/Ginger/UserControlsLib/JsonViewer/ValueConverters/MethodToValueConverter.cs
+++ b/Ginger/Ginger/UserControlsLib/JsonViewer/ValueConverters/MethodToValueConverter.cs
@@ -1,4 +1,22 @@
-using System;
+#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 System;
using System.Globalization;
using System.Windows.Data;
diff --git a/Ginger/Ginger/UserControlsLib/UCElementDetails.xaml.cs b/Ginger/Ginger/UserControlsLib/UCElementDetails.xaml.cs
index c97b6b105a..d4d231da74 100644
--- a/Ginger/Ginger/UserControlsLib/UCElementDetails.xaml.cs
+++ b/Ginger/Ginger/UserControlsLib/UCElementDetails.xaml.cs
@@ -255,13 +255,13 @@ private void XPropertiesGrid_RowDoubleClick(object sender, EventArgs e)
{
if (!string.IsNullOrEmpty((sender as ControlProperty).Value))
{
- Clipboard.SetText((sender as ControlProperty).Value);
+ GingerCore.General.SetClipboardText((sender as ControlProperty).Value);
}
}
private void XLocatorsGrid_RowDoubleClick(object sender, EventArgs e)
{
- Clipboard.SetText((sender as ElementLocator).LocateValue);
+ GingerCore.General.SetClipboardText((sender as ElementLocator).LocateValue);
}
bool LocatorsGridInitialized = false;
@@ -398,7 +398,7 @@ private void LocatorsGrid_PreparingCellForEdit(object sender, DataGridPreparingC
private void XFriendlyLocatorsGrid_RowDoubleClick(object sender, EventArgs e)
{
- Clipboard.SetText((sender as ElementLocator).LocateValue);
+ GingerCore.General.SetClipboardText((sender as ElementLocator).LocateValue);
}
bool FriendlyLocatorsGridInitialized = false;
@@ -1116,7 +1116,7 @@ private void xCopyLocatorButton_Click(object sender, RoutedEventArgs e)
if (mSelectedLocator != null)
{
- Clipboard.SetText(mSelectedLocator.LocateValue);
+ GingerCore.General.SetClipboardText(mSelectedLocator.LocateValue);
}
}
diff --git a/Ginger/Ginger/UserControlsLib/UCEncryptionKey.xaml.cs b/Ginger/Ginger/UserControlsLib/UCEncryptionKey.xaml.cs
index 004434e8e5..3b3d5dba8d 100644
--- a/Ginger/Ginger/UserControlsLib/UCEncryptionKey.xaml.cs
+++ b/Ginger/Ginger/UserControlsLib/UCEncryptionKey.xaml.cs
@@ -99,7 +99,7 @@ public bool CheckKeyCombination()
public void CopyToClipBoard()
{
- Clipboard.SetText(EncryptionKeyPasswordBox.Password);
+ GingerCore.General.SetClipboardText(EncryptionKeyPasswordBox.Password);
}
public void ChangeLabel(string newLabel)
{
diff --git a/Ginger/Ginger/UserControlsLib/UCListView/UcListView.xaml.cs b/Ginger/Ginger/UserControlsLib/UCListView/UcListView.xaml.cs
index c2c60d43df..71af75f448 100644
--- a/Ginger/Ginger/UserControlsLib/UCListView/UcListView.xaml.cs
+++ b/Ginger/Ginger/UserControlsLib/UCListView/UcListView.xaml.cs
@@ -31,6 +31,7 @@ limitations under the License.
using System.Collections.Specialized;
using System.ComponentModel;
using System.Linq;
+using System.Threading;
using System.Threading.Tasks;
using System.Windows;
using System.Windows.Automation;
@@ -191,7 +192,14 @@ public IObservableList DataSourceList
filteredView.Filter = LVItemFilter;
}
- xListView.ItemsSource = mObjList;
+ if (Dispatcher.CheckAccess())
+ {
+ xListView.ItemsSource = mObjList;
+ }
+ else
+ {
+ Dispatcher.Invoke(() => xListView.ItemsSource = mObjList);
+ }
if(value is ObservableList)
{
diff --git a/Ginger/Ginger/UserControlsLib/UCTreeView/TreeView1.xaml.cs b/Ginger/Ginger/UserControlsLib/UCTreeView/TreeView1.xaml.cs
index 68aa41ebbd..a9831055dd 100644
--- a/Ginger/Ginger/UserControlsLib/UCTreeView/TreeView1.xaml.cs
+++ b/Ginger/Ginger/UserControlsLib/UCTreeView/TreeView1.xaml.cs
@@ -284,7 +284,10 @@ private async Task ClearSearch()
{
xSearchClearBtn.Visibility = Visibility.Collapsed;
xSearchBtn.Visibility = Visibility.Visible;
- xTreeViewTree.FilterItemsByTextNew(string.Empty);
+ if (xTreeViewTree.SupportNewFilterMethod())
+ {
+ xTreeViewTree.FilterItemsByTextNew(string.Empty);
+ }
if (mSearchTask?.IsCompleted == false && mSearchTask?.IsCanceled == false)
{
@@ -371,7 +374,14 @@ private async Task SearchAsync()
SearchStarted.Invoke(Tree, new EventArgs());
}
Mouse.OverrideCursor = Cursors.Wait;
- xTreeViewTree.FilterItemsByTextNew(mSearchString);
+ if (xTreeViewTree.SupportNewFilterMethod())
+ {
+ xTreeViewTree.FilterItemsByTextNew(mSearchString);
+ }
+ else
+ {
+ xTreeViewTree.FilterItemsByText(xTreeViewTree.TreeItemsCollection, mSearchString, mCancellationTokenSource.Token);
+ }
}
catch (Exception ex)
{
diff --git a/Ginger/Ginger/UserControlsLib/UCTreeView/UCTreeView.xaml.cs b/Ginger/Ginger/UserControlsLib/UCTreeView/UCTreeView.xaml.cs
index e2d11e068a..a765de5ffc 100644
--- a/Ginger/Ginger/UserControlsLib/UCTreeView/UCTreeView.xaml.cs
+++ b/Ginger/Ginger/UserControlsLib/UCTreeView/UCTreeView.xaml.cs
@@ -488,6 +488,7 @@ public void RefreshTreeNodeChildrens(ITreeViewItem NodeItem)
{
TVI.Items.Clear();
TVI.IsExpanded = true;
+ _ = SetTreeNodeItemChilds(TVI);
}
});
}
@@ -669,6 +670,27 @@ private StackPanel SetUnSelectedTreeNodeHeaderStyle(StackPanel header)
return header;
}
+ ///
+ /// Return if the current tree items support new filter by text functionality using method.
+ ///
+ /// Returns if is supported, otherwise.
+ public bool SupportNewFilterMethod()
+ {
+ if (Tree.Items.Count <= 0 || ((TreeViewItem)Tree.Items[0]).Items == null)
+ {
+ return false;
+ }
+
+ foreach (TreeViewItem tvi in ((TreeViewItem)Tree.Items[0]).Items)
+ {
+ if (tvi.Tag is ITreeViewItem)
+ {
+ return true;
+ }
+ }
+ return false;
+ }
+
public void FilterItemsByTextNew(string text)
{
long startTime = DateTime.UtcNow.Ticks;
diff --git a/Ginger/Ginger/UserControlsLib/ucShowItemID.xaml.cs b/Ginger/Ginger/UserControlsLib/ucShowItemID.xaml.cs
index 28f8e29722..4399384dcd 100644
--- a/Ginger/Ginger/UserControlsLib/ucShowItemID.xaml.cs
+++ b/Ginger/Ginger/UserControlsLib/ucShowItemID.xaml.cs
@@ -62,7 +62,7 @@ private void xShowIDBtn_Click(object sender, RoutedEventArgs e)
private void xCopyBtn_Click(object sender, RoutedEventArgs e)
{
- Clipboard.SetText(mRepoItem.Guid.ToString());
+ GingerCore.General.SetClipboardText(mRepoItem.Guid.ToString());
}
}
}
diff --git a/Ginger/GingerCore/ALM/RQM/ExportToRQM.cs b/Ginger/GingerCore/ALM/RQM/ExportToRQM.cs
index 860d497e04..81c4978b5b 100644
--- a/Ginger/GingerCore/ALM/RQM/ExportToRQM.cs
+++ b/Ginger/GingerCore/ALM/RQM/ExportToRQM.cs
@@ -488,8 +488,16 @@ private ExecutionResult GetExeResultforActivityGroup(BusinessFlow businessFlow,
if (string.IsNullOrEmpty(TestCaseVersionUrl))
{
- result = $"At {GingerDicser.GetTermResValue(eTermResKey.BusinessFlow)}: {businessFlow.Name}{GingerDicser.GetTermResValue(eTermResKey.ActivitiesGroup)} Cannot find test case with id {testCaseId}";
- Reporter.ToLog(eLogLevel.ERROR, $"At {GingerDicser.GetTermResValue(eTermResKey.BusinessFlow)}: {businessFlow.Name}{GingerDicser.GetTermResValue(eTermResKey.ActivitiesGroup)} Cannot find test case with id {testCaseId}");
+ if (businessFlow.ALMTestSetLevel == "RunSet")
+ {
+ result = $"At {GingerDicser.GetTermResValue(eTermResKey.RunSet)}: Test case with id {testCaseId} is not available under Test Plan {businessFlow.Name} Test Plan Id: {businessFlow.ExternalID}, Hence execution result is not published for this execution";
+ Reporter.ToLog(eLogLevel.ERROR, $"At {GingerDicser.GetTermResValue(eTermResKey.RunSet)}: Test case with id {testCaseId} is not available under Test Plan {businessFlow.Name} Test Plan Id: {businessFlow.ExternalID}, Hence execution result is not published for this execution");
+ }
+ else
+ {
+ result = $"At {GingerDicser.GetTermResValue(eTermResKey.BusinessFlow)}: Test case with id {testCaseId} is not available under Test Plan {businessFlow.Name} Test Plan Id: {businessFlow.ExternalID}, Hence execution result is not published for this execution";
+ Reporter.ToLog(eLogLevel.ERROR, $"At {GingerDicser.GetTermResValue(eTermResKey.BusinessFlow)}: Test case with id {testCaseId} is not available under Test Plan {businessFlow.Name} Test Plan Id: {businessFlow.ExternalID}, Hence execution result is not published for this execution");
+ }
return null;
}
RQMConnect.Instance.GetExecutionRecordsByTestCase(loginData, reader, currentRQMProjectMapping, RQMCore.ALMProjectGroupName, RQMCore.ALMProjectGuid, testPlan.URLPathVersioned, TestCaseVersionUrl, ref exeRecordId);
@@ -507,8 +515,17 @@ private ExecutionResult GetExeResultforActivityGroup(BusinessFlow businessFlow,
if (string.IsNullOrEmpty(exeRecordId) || exeRecordId.Equals("0"))
{
- result = $"Execution Record Id not found for {GingerDicser.GetTermResValue(eTermResKey.BusinessFlow)}: {businessFlow.Name} {GingerDicser.GetTermResValue(eTermResKey.ActivitiesGroup)}, cannot export RQM TestPlan execution results without it. Please check configured External Id.";
- Reporter.ToLog(eLogLevel.ERROR, $"Execution Record Id not found for {GingerDicser.GetTermResValue(eTermResKey.BusinessFlow)}: {businessFlow.Name} {GingerDicser.GetTermResValue(eTermResKey.ActivitiesGroup)}, cannot export RQM TestPlan execution results without it. Please check configured External Id.");
+ if (businessFlow.ALMTestSetLevel == "RunSet")
+ {
+ result = $"Execution Record Id not found for {GingerDicser.GetTermResValue(eTermResKey.RunSet)}: {businessFlow.Name}, cannot export RQM TestPlan execution results without it. Please check configured External Id.";
+ Reporter.ToLog(eLogLevel.ERROR, $"Execution Record Id not found for {GingerDicser.GetTermResValue(eTermResKey.RunSet)}: {businessFlow.Name}, cannot export RQM TestPlan execution results without it. Please check configured External Id.");
+ }
+ else
+ {
+ result = $"Execution Record Id not found for {GingerDicser.GetTermResValue(eTermResKey.BusinessFlow)}: {businessFlow.Name}, cannot export RQM TestPlan execution results without it. Please check configured External Id.";
+ Reporter.ToLog(eLogLevel.ERROR, $"Execution Record Id not found for {GingerDicser.GetTermResValue(eTermResKey.BusinessFlow)}: {businessFlow.Name}, cannot export RQM TestPlan execution results without it. Please check configured External Id.");
+ }
+
return null;
}
diff --git a/Ginger/GingerCore/ALM/RQM/RQMConnect.cs b/Ginger/GingerCore/ALM/RQM/RQMConnect.cs
index 30c89e9aa5..03cbd616a8 100644
--- a/Ginger/GingerCore/ALM/RQM/RQMConnect.cs
+++ b/Ginger/GingerCore/ALM/RQM/RQMConnect.cs
@@ -326,7 +326,7 @@ public RQMTestPlan GetRQMTestPlanByIdByProject(string RQMServerUrl, string RQMUs
try //skip result incase of error, defect #5164
{
XmlDocument doc = new XmlDocument();
- doc.LoadXml(!string.IsNullOrEmpty(responseData.responseText) ? responseData.responseText : string.Empty);
+ doc.LoadXml(responseData.responseText);
XmlNamespaceManager nsmgr = new XmlNamespaceManager(reader.NameTable);
currentRQMProjectMapping.RQMTestPlansListMapping.RQMNameSpaces.RQMNameSpaceList.ForEach(y => nsmgr.AddNamespace(y.RQMNameSpacePrefix, y.RQMNameSpaceName));
XmlNode responseDataNode = doc.DocumentElement;
diff --git a/Ginger/GingerCore/ALM/RQMCore.cs b/Ginger/GingerCore/ALM/RQMCore.cs
index df7cba47df..b9d766dcdb 100644
--- a/Ginger/GingerCore/ALM/RQMCore.cs
+++ b/Ginger/GingerCore/ALM/RQMCore.cs
@@ -191,14 +191,23 @@ private Dictionary GetDynamicServerConfigAndSetPaths()
{
lock (fileLock)
{
+
XmlDocument RQMSettingsXML = new XmlDocument();
string RQMSettingsXMLFilePath = Path.Combine(RQMCore.ConfigPackageFolderPath, "RQMSettings.xml");
RQMSettingsXML.Load(RQMSettingsXMLFilePath);
- //Set Path of Export_Settings.xml file inside RQMSettings.xml file
- XmlNode Export_SettingsFile_Location = RQMSettingsXML.SelectSingleNode("RQM/GeneralData/Export_SettingsFile_Location");
- Export_SettingsFile_Location.InnerText = Path.Combine(RQMCore.ConfigPackageFolderPath, "RQM_Export");
- RQMSettingsXML.Save(RQMSettingsXMLFilePath);
+ try
+ {
+ //Set Path of Export_Settings.xml file inside RQMSettings.xml file
+ XmlNode Export_SettingsFile_Location = RQMSettingsXML.SelectSingleNode("RQM/GeneralData/Export_SettingsFile_Location");
+ Export_SettingsFile_Location.InnerText = Path.Combine(RQMCore.ConfigPackageFolderPath, "RQM_Export");
+ RQMSettingsXML.Save(RQMSettingsXMLFilePath);
+ }
+ catch(Exception ex)
+ {
+ Reporter.ToLog(eLogLevel.DEBUG, $"Error witring ALM RQMConfigPackage at RQM/GeneralData/Export_SettingsFile_Location: {Path.Combine(RQMCore.ConfigPackageFolderPath, "RQMSettings.xml")}", ex);
+ }
+
//Extract end return ServerURL value from RQM/GeneralData/ServerURL node
XmlNode ServerURLNode = RQMSettingsXML.SelectSingleNode("RQM/GeneralData/ServerURL");
diff --git a/Ginger/GingerCore/DLLs/RQMExportStd.dll b/Ginger/GingerCore/DLLs/RQMExportStd.dll
index e4f839cbe5..09183a9cfd 100644
Binary files a/Ginger/GingerCore/DLLs/RQMExportStd.dll and b/Ginger/GingerCore/DLLs/RQMExportStd.dll differ
diff --git a/Ginger/GingerCore/DLLs/RQM_RepositoryStd.dll b/Ginger/GingerCore/DLLs/RQM_RepositoryStd.dll
index e471455fc6..19ec881bde 100644
Binary files a/Ginger/GingerCore/DLLs/RQM_RepositoryStd.dll and b/Ginger/GingerCore/DLLs/RQM_RepositoryStd.dll differ
diff --git a/Ginger/GingerCore/GeneralLib/General.cs b/Ginger/GingerCore/GeneralLib/General.cs
index 3b2fd5cafc..c201dace33 100644
--- a/Ginger/GingerCore/GeneralLib/General.cs
+++ b/Ginger/GingerCore/GeneralLib/General.cs
@@ -482,7 +482,7 @@ public static bool IsNameAlreadyexists(RepositoryItemBase repositoryItem, string
}
catch (Exception ex)
{
- Reporter.ToLog(eLogLevel.ERROR, "Unknown Type for GetItemType ", ex);
+ Reporter.ToLog(eLogLevel.ERROR, "Unknown Type for GetItemType ", ex);
}
return false;
@@ -1332,6 +1332,18 @@ public static string GetClipboardText()
{
return ClipboardService.GetText();
}
+
+ public static void SetClipboardText(string TextToCopy)
+ {
+ try
+ {
+ ClipboardService.SetText(TextToCopy);
+ }
+ catch (Exception ex)
+ {
+ Reporter.ToLog(eLogLevel.ERROR,"Failed to copy text to Clipboard",ex);
+ }
+ }
public static bool IsAdmin()
{
if (RuntimeInformation.IsOSPlatform(OSPlatform.Windows))
diff --git a/Ginger/GingerCore/GingerCore.csproj b/Ginger/GingerCore/GingerCore.csproj
index 6eb18a14bc..b0466469a9 100644
--- a/Ginger/GingerCore/GingerCore.csproj
+++ b/Ginger/GingerCore/GingerCore.csproj
@@ -563,7 +563,7 @@
1.0.1
-
+
3.15.0
diff --git a/Ginger/GingerCoreCommon/Actions/Act.cs b/Ginger/GingerCoreCommon/Actions/Act.cs
index c427a471ad..1e05544904 100644
--- a/Ginger/GingerCoreCommon/Actions/Act.cs
+++ b/Ginger/GingerCoreCommon/Actions/Act.cs
@@ -1082,14 +1082,15 @@ public static string GetScreenShotRandomFileName()
public static void AddArtifactToAction(string artifactName, Act action, string artifactPath)
{
- string ext = Path.GetExtension(artifactPath);
-
- var randomFileName = string.Concat("Artifact_", action.Guid, "_", DateTime.Now.ToString("hhmmss.fff"), "_", ext);
+ string extension = Path.GetExtension(artifactPath);
+ string artifactOriginalName = artifactName.Length <= 15 ? artifactName : artifactName.Substring(0, 15);
+ var randomFileName = string.Concat(artifactOriginalName, "_", action.Guid, "_", DateTime.UtcNow.ToString("hhmmss.fff"), "_", extension);
ArtifactDetails artifact = new ArtifactDetails();
- artifact.ArtifactName = artifactName;
- artifact.ArtifactOriginalPath = artifactPath;
- artifact.ArtifactNewPath = randomFileName;
+ artifact.ArtifactOriginalName = artifactName;
+ artifact.ArtifactOriginalPath = Path.GetFullPath(artifactPath);
+ artifact.ArtifactReportStoragePath = Path.GetFullPath(artifactPath);
+ artifact.ArtifactReportStorageName = randomFileName;
action.Artifacts.Add(artifact);
}
@@ -1772,7 +1773,7 @@ public void Reset(bool reSetActionErrorHandlerExecutionStatus = false, bool isAc
}
this.ScreenShots.Clear();
this.ScreenShotsNames.Clear();
-
+ this.Artifacts.Clear();
// remove return vals which don't have expected or store to var
// it is not needed since it will return back after we get results
// if i.e the SQL changed we want to reflect the latest changes and output what we got
diff --git a/Ginger/GingerCoreCommon/EnumsLib/eFileTypes.cs b/Ginger/GingerCoreCommon/EnumsLib/eFileTypes.cs
index 6e8eb84a61..ecf494c901 100644
--- a/Ginger/GingerCoreCommon/EnumsLib/eFileTypes.cs
+++ b/Ginger/GingerCoreCommon/EnumsLib/eFileTypes.cs
@@ -1,4 +1,22 @@
-using System;
+#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 System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
@@ -26,6 +44,7 @@ public enum eFileTypes
xml,
pdf,
gif,
- zip
+ zip,
+ js
}
}
diff --git a/Ginger/GingerCoreCommon/EnumsLib/eImageType.cs b/Ginger/GingerCoreCommon/EnumsLib/eImageType.cs
index 4f38fdfada..5f7d8d60e5 100644
--- a/Ginger/GingerCoreCommon/EnumsLib/eImageType.cs
+++ b/Ginger/GingerCoreCommon/EnumsLib/eImageType.cs
@@ -241,6 +241,9 @@ public enum eImageType
ExcelFile,
WordFile,
FilePowerpoint,
+ FileXML,
+ FileJSON,
+ FileJavascript,
FileArchive,
User,
UserProfile,
diff --git a/Ginger/GingerCoreCommon/GeneralLib/ArtifactDetails.cs b/Ginger/GingerCoreCommon/GeneralLib/ArtifactDetails.cs
index 9ffbe0ab44..d6fa67ba7e 100644
--- a/Ginger/GingerCoreCommon/GeneralLib/ArtifactDetails.cs
+++ b/Ginger/GingerCoreCommon/GeneralLib/ArtifactDetails.cs
@@ -1,4 +1,22 @@
-using System;
+#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 System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
@@ -8,8 +26,9 @@ namespace Amdocs.Ginger.Common.GeneralLib
{
public class ArtifactDetails
{
- public string ArtifactName { get; set; }
+ public string ArtifactOriginalName { get; set; }
+ public string ArtifactReportStorageName { get; set; }
public string ArtifactOriginalPath { get; set; }
- public string ArtifactNewPath { get; set; }
+ public string ArtifactReportStoragePath { get; set; }
}
}
diff --git a/Ginger/GingerCoreCommon/ReporterLib/UserMsgsPool.cs b/Ginger/GingerCoreCommon/ReporterLib/UserMsgsPool.cs
index 9dfea2909e..6d0969700f 100644
--- a/Ginger/GingerCoreCommon/ReporterLib/UserMsgsPool.cs
+++ b/Ginger/GingerCoreCommon/ReporterLib/UserMsgsPool.cs
@@ -97,13 +97,13 @@ public enum eUserMsgKey
InvalidCharactersWarning,
InvalidValueExpression,
FolderExistsWithName, DownloadedSolutionFromSourceControl, SourceControlFileLockedByAnotherUser,
- SourceControlUpdateFailed, SourceControlCommitFailed, SourceControlChkInSucss, SourceControlChkInConflictHandledFailed, SourceControlGetLatestConflictHandledFailed, SourceControlCheckInLockedByAnotherUser, SourceControlCheckInLockedByMe, SourceControlCheckInUnsavedFileChecked, FailedToUnlockFileDuringCheckIn, SourceControlChkInConfirmtion, SourceControlChkInConfirmtionForLocalCommit, SourceControlMissingSelectionToCheckIn, SourceControlMissingSelectionToLocalCommit, SourceControlResolveConflict, SureWantToDoRevert, SureWantToDoCheckIn,
+ SourceControlUpdateFailed, SourceControlCommitFailed, SourceControlChkInSucss, SourceControlChkInConflictHandledFailed, SourceControlGetLatestConflictHandledFailed, SourceControlCheckInLockedByAnotherUser, SourceControlCheckInLockedByMe, SourceControlCheckInUnsavedFileChecked, FailedToUnlockFileDuringCheckIn, SourceControlChkInConfirmtionForLocalFiles, SourceControlChkInConfirmtionForLocalCommit, SourceControlChkInConfirmtionForLocalCommitAndFiles, SourceControlMissingSelectionToCheckIn, SourceControlMissingSelectionToLocalCommit, SourceControlResolveConflict, SureWantToDoRevert, SureWantToDoCheckIn,
NoOptionalAgent, MissingActivityAppMapping,
SettingsChangeRequireRestart, ChangesRequireRestart, UnsupportedFileFormat, WarnRegradingMissingVariablesUse, NotAllMissingVariablesWereAdded, UpdateApplicationNameChangeInSolution,
ShareEnvAppWithAllEnvs, ShareEnvAppParamWithAllEnvs, CtrlSsaveEnvApp, CtrlSMissingItemToSave, FailedToSendEmail, FailedToExportBF,
ReportTemplateNotFound, DriverNotSupportingWindowExplorer, AgentNotRunningAfterWaiting,
FoundDuplicateAgentsInRunSet, StaticErrorMessage, StaticWarnMessage, StaticInfoMessage, StaticQuestionsMessage, ApplicationAgentNotMapped,
- ActivitiesGroupAlreadyMappedToTC, ExportItemToALMFailed, AskIfToSaveBFAfterExport,
+ ActivitiesGroupAlreadyMappedToTC, ExportItemToALMFailed, AskIfToSaveBFAfterExport, ALMIncorrectExternalID,
BusinessFlowAlreadyMappedToTC, AskIfSureWantToClose, AskIfSureWantToCloseWithoutNote, AskIfSureWantToRestart, AskIfSureWantToRestartWithoutNote , AskIfSureWantToRestartInAdminMode, WindowClosed, TargetWindowNotSelected,
ChangingEnvironmentParameterValue, IFSaveChangesOfBF, AskIfToLoadExternalFields, WhetherToOpenSolution,
AutomationTabExecResultsNotExists, FolderNamesAreTooLong, FolderSizeTooSmall, DefaultTemplateCantBeDeleted, FileNotExist, ExecutionsResultsProdIsNotOn, ExecutionsResultsNotExists, ExecutionsResultsToDelete, AllExecutionsResultsToDelete, FilterNotBeenSet, RetreivingAllElements, ClickElementAgain, CloseFilterPage,
@@ -173,15 +173,15 @@ public enum eUserMsgKey
NoPublishRepositoryInfo,
NotAllowedForMappedRuntimeValue,
HandleConflictsBeforeMovingForward,
- HasUnhandledConflicts,
+ HasUnhandledConflicts,
HasUnhandledMandatoryIssues,
UncommitedChangesPreventCheckout,
- ExportToBPMNSuccessful,
+ ExportToBPMNSuccessful,
MultipleExportToBPMNSuccessful,
GingerEntityToBPMNConversionError,
IssueWhileAnalyzingConflict,
ConflictsResolvedCount,
- AddActivityGroupsToSharedRepositoryForBPMNConversion,
+ AddActivityGroupsToSharedRepositoryForBPMNConversion,
AddActivitiesToSharedRepositoryForBPMNConversion,
AllActivitiesMustBeAddedToSharedRepositoryForBPMNExport,
FailedToDownloadDriver,
@@ -191,7 +191,9 @@ public enum eUserMsgKey
NoActionAvailable,
PublishApplicationToOtherEnv,
NoApplicationPlatformLeft,
- ShareApplicationToEnvironment
+ ShareApplicationToEnvironment,
+ SaveSolution,
+ LocatorTestInProgress
}
public static class UserMsgsPool
@@ -233,6 +235,8 @@ public static void LoadUserMsgsPool()
Reporter.UserMsgsPool.Add(eUserMsgKey.StaticErrorMessage, new UserMsg(eUserMsgType.ERROR, "Error", "{0}", eUserMsgOption.OK, eUserMsgSelection.None));
Reporter.UserMsgsPool.Add(eUserMsgKey.StaticWarnMessage, new UserMsg(eUserMsgType.WARN, "Warning", "{0}", eUserMsgOption.OK, eUserMsgSelection.None));
+ Reporter.UserMsgsPool.Add(eUserMsgKey.SaveSolution, new UserMsg(eUserMsgType.INFO, "Saved Solution", "Changes got saved succefully", eUserMsgOption.OK, eUserMsgSelection.None));
+
Reporter.UserMsgsPool.Add(eUserMsgKey.StaticInfoMessage, new UserMsg(eUserMsgType.INFO, "Info", "{0}", eUserMsgOption.OK, eUserMsgSelection.None));
Reporter.UserMsgsPool.Add(eUserMsgKey.StaticQuestionsMessage, new UserMsg(eUserMsgType.QUESTION, "Question", "{0}", eUserMsgOption.YesNo, eUserMsgSelection.No));
Reporter.UserMsgsPool.Add(eUserMsgKey.AskIfSureWantToClose, new UserMsg(eUserMsgType.QUESTION, "Close Ginger", "Are you sure you want to close Ginger?" + Environment.NewLine + Environment.NewLine + $"Note: Unsaved and {ISolution.CacheDirectoryName} folder file changes won't be saved.", eUserMsgOption.YesNo, eUserMsgSelection.No));
@@ -321,16 +325,17 @@ public static void LoadUserMsgsPool()
Reporter.UserMsgsPool.Add(eUserMsgKey.SourceControlConnMissingLocalFolderInput, new UserMsg(eUserMsgType.WARN, "Download Solution", "Missing local folder input, please select local folder to download the solution into.", eUserMsgOption.OK, eUserMsgSelection.None));
Reporter.UserMsgsPool.Add(eUserMsgKey.SourceControlUpdateFailed, new UserMsg(eUserMsgType.ERROR, "Update Solution", "Failed to update the solution from source control." + Environment.NewLine + "Error Details: '{0}'", eUserMsgOption.OK, eUserMsgSelection.None));
Reporter.UserMsgsPool.Add(eUserMsgKey.SourceControlCommitFailed, new UserMsg(eUserMsgType.ERROR, "Commit Solution", "Failed to commit the solution from source control." + Environment.NewLine + "Error Details: '{0}'", eUserMsgOption.OK, eUserMsgSelection.None));
- Reporter.UserMsgsPool.Add(eUserMsgKey.SourceControlChkInSucss, new UserMsg(eUserMsgType.QUESTION, "Check-In Changes", "Check-in process ended successfully." + Environment.NewLine + Environment.NewLine + "Do you want to do another check-in?", eUserMsgOption.YesNo, eUserMsgSelection.No));
+ Reporter.UserMsgsPool.Add(eUserMsgKey.SourceControlChkInSucss, new UserMsg(eUserMsgType.INFO, "Check-In Solution", "Check-in process ended successfully.", eUserMsgOption.OK, eUserMsgSelection.None));
Reporter.UserMsgsPool.Add(eUserMsgKey.SourceControlChkInConflictHandledFailed, new UserMsg(eUserMsgType.WARN, "Check-In Results", "Check in process ended with unhandled conflict please notice that you must handled them prior to the next check in of those items", eUserMsgOption.OK, eUserMsgSelection.None));
Reporter.UserMsgsPool.Add(eUserMsgKey.SourceControlGetLatestConflictHandledFailed, new UserMsg(eUserMsgType.WARN, "Get Latest Results", "Get latest process encountered conflicts which must be resolved for successful Solution loading", eUserMsgOption.OK, eUserMsgSelection.None));
Reporter.UserMsgsPool.Add(eUserMsgKey.SourceControlCheckInLockedByAnotherUser, new UserMsg(eUserMsgType.WARN, "Locked Item Check-In", "The item: '{0}'" + Environment.NewLine + "is locked by the user: '{1}'" + Environment.NewLine + "The locking comment is: '{2}' ." + Environment.NewLine + Environment.NewLine + "Do you want to unlock the item and proceed with check in process?", eUserMsgOption.YesNo, eUserMsgSelection.No));
Reporter.UserMsgsPool.Add(eUserMsgKey.SourceControlCheckInLockedByMe, new UserMsg(eUserMsgType.WARN, "Locked Item Check-In", "The item: '{0}'" + Environment.NewLine + "is locked by you please noticed that during check in the lock will need to be removed please confirm to continue", eUserMsgOption.YesNo, eUserMsgSelection.No));
Reporter.UserMsgsPool.Add(eUserMsgKey.SourceControlCheckInUnsavedFileChecked, new UserMsg(eUserMsgType.QUESTION, "Unsaved Item Checkin", "The item: '{0}' contains unsaved changes which must be saved prior to the check in process." + Environment.NewLine + Environment.NewLine + "Do you want to save the item and proceed with check in process?", eUserMsgOption.YesNo, eUserMsgSelection.No));
Reporter.UserMsgsPool.Add(eUserMsgKey.FailedToUnlockFileDuringCheckIn, new UserMsg(eUserMsgType.QUESTION, "Locked Item Check-In Failure", "The item: '{0}' unlock operation failed on the URL: '{1}'." + Environment.NewLine + Environment.NewLine + "Do you want to proceed with the check in process for rest of the items?", eUserMsgOption.YesNo, eUserMsgSelection.No));
- Reporter.UserMsgsPool.Add(eUserMsgKey.SourceControlChkInConfirmtion, new UserMsg(eUserMsgType.QUESTION, "Check-In Changes", "Checking in changes will effect all project users, are you sure you want to continue and check in those {0} changes?", eUserMsgOption.YesNo, eUserMsgSelection.No));
- Reporter.UserMsgsPool.Add(eUserMsgKey.SourceControlChkInConfirmtionForLocalCommit, new UserMsg(eUserMsgType.QUESTION, "Check-In Changes", "Checking in changes will effect all project users, are you sure you want to continue and check in those {0} Local Commit changes?", eUserMsgOption.YesNo, eUserMsgSelection.No));
- Reporter.UserMsgsPool.Add(eUserMsgKey.SourceControlMissingSelectionToCheckIn, new UserMsg(eUserMsgType.WARN, "Check-In Changes", "Please select items to check-in.", eUserMsgOption.OK, eUserMsgSelection.None));
+ Reporter.UserMsgsPool.Add(eUserMsgKey.SourceControlChkInConfirmtionForLocalFiles, new UserMsg(eUserMsgType.QUESTION, "Check-In Changes", "Check-in changes will affect all project users. Are you sure you want to continue and check in those {0} modified files ?", eUserMsgOption.YesNo, eUserMsgSelection.No));
+ Reporter.UserMsgsPool.Add(eUserMsgKey.SourceControlChkInConfirmtionForLocalCommit, new UserMsg(eUserMsgType.QUESTION, "Check-In Local Commits", "Check-in changes will affect all project users. Are you sure you want to continue and check in those {0} Local Commit changes ?", eUserMsgOption.YesNo, eUserMsgSelection.No));
+ Reporter.UserMsgsPool.Add(eUserMsgKey.SourceControlChkInConfirmtionForLocalCommitAndFiles, new UserMsg(eUserMsgType.QUESTION, "Check-In Changes", "Check-in changes will affect all project users. Are you sure you want to continue and check in those {0} modified files and {1} Local Commit ?", eUserMsgOption.YesNo, eUserMsgSelection.No));
+ Reporter.UserMsgsPool.Add(eUserMsgKey.SourceControlMissingSelectionToCheckIn, new UserMsg(eUserMsgType.WARN, "Check-In Changes", "Please select items to check-in.", eUserMsgOption.OK, eUserMsgSelection.None));
Reporter.UserMsgsPool.Add(eUserMsgKey.SourceControlMissingSelectionToLocalCommit, new UserMsg(eUserMsgType.WARN, "Local Commit Changes", "Please select items to Commit.", eUserMsgOption.OK, eUserMsgSelection.None));
Reporter.UserMsgsPool.Add(eUserMsgKey.SourceControlResolveConflict, new UserMsg(eUserMsgType.QUESTION, "Source Control Conflicts", "Source control conflicts has been identified for the path: '{0}'." + Environment.NewLine + "You probably won't be able to use the item which in the path till conflicts will be resolved." + Environment.NewLine + Environment.NewLine + "Do you want to automatically resolve the conflicts and keep your local changes for all conflicts?" + Environment.NewLine + Environment.NewLine + "Select 'No' for accepting server updates for all conflicts or select 'Cancel' for canceling the conflicts handling.", eUserMsgOption.YesNoCancel, eUserMsgSelection.None));
Reporter.UserMsgsPool.Add(eUserMsgKey.SureWantToDoRevert, new UserMsg(eUserMsgType.QUESTION, "Undo Changes", "Are you sure you want to revert changes?", eUserMsgOption.YesNo, eUserMsgSelection.No));
@@ -417,7 +422,7 @@ public static void LoadUserMsgsPool()
Reporter.UserMsgsPool.Add(eUserMsgKey.IFSaveChangesOfBF, new UserMsg(eUserMsgType.WARN, "Save Current" + GingerDicser.GetTermResValue(eTermResKey.BusinessFlow) + " Before Change?", "Do you want to save the changes made in the '{0}' " + GingerDicser.GetTermResValue(eTermResKey.BusinessFlow) + "?", eUserMsgOption.YesNo, eUserMsgSelection.No));
Reporter.UserMsgsPool.Add(eUserMsgKey.RecordingStopped, new UserMsg(eUserMsgType.ERROR, "Recording Stopped", "Recording Stopped for the {0} agent." + Environment.NewLine + "Error Details: '{1}'.", eUserMsgOption.OK, eUserMsgSelection.None));
-
+
Reporter.UserMsgsPool.Add(eUserMsgKey.FailedToDownloadDriver, new UserMsg(eUserMsgType.ERROR, "Failed to Download the Driver",
"Oh no! The {0} Driver couldn't be downloaded because we're currently offline.Check your internet connection or update the proxy settings in the Agent config for automatic downloads." + Environment.NewLine +
$"If that feels like a puzzle, You can also grab the driver yourself and set its location in the DriverFilePath in the Agent Configuration." + Environment.NewLine +"Cheers to problem-solving."
@@ -517,33 +522,34 @@ public static void LoadUserMsgsPool()
#endregion CustomeFunctions Messages
#region ALM
- Reporter.UserMsgsPool.Add(eUserMsgKey.QcConnectSuccess, new UserMsg(eUserMsgType.INFO, "QC/ALM Connection", "QC/ALM connection successful!", eUserMsgOption.OK, eUserMsgSelection.None));
- Reporter.UserMsgsPool.Add(eUserMsgKey.QcConnectFailure, new UserMsg(eUserMsgType.WARN, "QC/ALM Connection Failed", "QC/ALM connection failed." + System.Environment.NewLine + "Please make sure that the credentials you use are correct and that QC/ALM Client is registered on your machine." + System.Environment.NewLine + System.Environment.NewLine + "For registering QC/ALM Client- please follow below steps:" + System.Environment.NewLine + "1. Launch Internet Explorer as Administrator" + System.Environment.NewLine + "2. Go to http:///qcbin" + System.Environment.NewLine + "3. Click on 'Add-Ins Page' link" + System.Environment.NewLine + "4. In next page, click on 'HP ALM Client Registration'" + System.Environment.NewLine + "5. In next page click on 'Register HP ALM Client'" + System.Environment.NewLine + "6. Restart Ginger and try to reconnect", eUserMsgOption.OK, eUserMsgSelection.None));
+ Reporter.UserMsgsPool.Add(eUserMsgKey.QcConnectSuccess, new UserMsg(eUserMsgType.INFO, "ALM Connection", "ALM connection successful!", eUserMsgOption.OK, eUserMsgSelection.None));
+ Reporter.UserMsgsPool.Add(eUserMsgKey.QcConnectFailure, new UserMsg(eUserMsgType.WARN, "ALM Connection Failed", "ALM connection failed." + System.Environment.NewLine + "Please make sure that the credentials you use are correct and that ALM Client is registered on your machine." + System.Environment.NewLine + System.Environment.NewLine + "For registering ALM Client- please follow below steps:" + System.Environment.NewLine + "1. Launch Internet Explorer as Administrator" + System.Environment.NewLine + "2. Go to http:///qcbin" + System.Environment.NewLine + "3. Click on 'Add-Ins Page' link" + System.Environment.NewLine + "4. In next page, click on 'HP ALM Client Registration'" + System.Environment.NewLine + "5. In next page click on 'Register HP ALM Client'" + System.Environment.NewLine + "6. Restart Ginger and try to reconnect", eUserMsgOption.OK, eUserMsgSelection.None));
Reporter.UserMsgsPool.Add(eUserMsgKey.ALMConnectFailureWithCurrSettings, new UserMsg(eUserMsgType.WARN, "ALM Connection Failed", "ALM Connection Failed, Please make sure credentials are correct.", eUserMsgOption.OK, eUserMsgSelection.None));
Reporter.UserMsgsPool.Add(eUserMsgKey.ALMConnectFailure, new UserMsg(eUserMsgType.WARN, "ALM Connection Failed", "ALM connection failed." + System.Environment.NewLine + "Please make sure that the credentials you use are correct and that ALM Client is registered on your machine.", eUserMsgOption.OK, eUserMsgSelection.None));
- Reporter.UserMsgsPool.Add(eUserMsgKey.QcLoginSuccess, new UserMsg(eUserMsgType.INFO, "Login Success", "QC/ALM Login successful!", eUserMsgOption.OK, eUserMsgSelection.None));
+ Reporter.UserMsgsPool.Add(eUserMsgKey.QcLoginSuccess, new UserMsg(eUserMsgType.INFO, "Login Success", "ALM Login successful!", eUserMsgOption.OK, eUserMsgSelection.None));
Reporter.UserMsgsPool.Add(eUserMsgKey.ALMLoginFailed, new UserMsg(eUserMsgType.WARN, "Login Failed", "ALM Login Failed - {0}", eUserMsgOption.OK, eUserMsgSelection.None));
- Reporter.UserMsgsPool.Add(eUserMsgKey.QcNeedLogin, new UserMsg(eUserMsgType.WARN, "Not Connected to QC/ALM", "You Must Log Into QC/ALM First.", eUserMsgOption.OK, eUserMsgSelection.None));
+ Reporter.UserMsgsPool.Add(eUserMsgKey.QcNeedLogin, new UserMsg(eUserMsgType.WARN, "Not Connected to ALM", "You Must Log Into ALM First.", eUserMsgOption.OK, eUserMsgSelection.None));
Reporter.UserMsgsPool.Add(eUserMsgKey.TestCasesUpdatedSuccessfully, new UserMsg(eUserMsgType.INFO, "TestCase Update", "TestCases Updated Successfully.", eUserMsgOption.OK, eUserMsgSelection.None));
Reporter.UserMsgsPool.Add(eUserMsgKey.TestCasesUploadedSuccessfully, new UserMsg(eUserMsgType.INFO, "TestCases Uploaded", "TestCases Uploaded Successfully.", eUserMsgOption.OK, eUserMsgSelection.None));
Reporter.UserMsgsPool.Add(eUserMsgKey.TestSetsImportedSuccessfully, new UserMsg(eUserMsgType.INFO, "Import ALM Test Set", "ALM Test Set/s import process ended successfully.", eUserMsgOption.OK, eUserMsgSelection.None));
Reporter.UserMsgsPool.Add(eUserMsgKey.TestSetsNotExist, new UserMsg(eUserMsgType.INFO, "Business Flow Not Found to Delete", "ALM Test Set/s as Business Flow does not exist to Delete.", eUserMsgOption.OK, eUserMsgSelection.None));
- Reporter.UserMsgsPool.Add(eUserMsgKey.TestSetExists, new UserMsg(eUserMsgType.WARN, "Import Exiting Test Set", "The Test Set '{0}' was imported before and already exists in current Solution." + System.Environment.NewLine + "Do you want to delete the existing mapped " + GingerDicser.GetTermResValue(eTermResKey.BusinessFlow) + " and import the Test Set again?", eUserMsgOption.YesNo, eUserMsgSelection.No));
+ Reporter.UserMsgsPool.Add(eUserMsgKey.TestSetExists, new UserMsg(eUserMsgType.WARN, "Import Existing Test Set", "The Test Set '{0}' was imported before and already exists in current Solution." + System.Environment.NewLine + "Do you want to delete the existing mapped " + GingerDicser.GetTermResValue(eTermResKey.BusinessFlow) + " and import the Test Set again?", eUserMsgOption.YesNo, eUserMsgSelection.No));
Reporter.UserMsgsPool.Add(eUserMsgKey.ErrorInTestsetImport, new UserMsg(eUserMsgType.ERROR, "Import Test Set Error", "Error Occurred while exporting the Test Set '{0}'." + System.Environment.NewLine + "Error Details:{1}", eUserMsgOption.OK, eUserMsgSelection.None));
- Reporter.UserMsgsPool.Add(eUserMsgKey.ErrorWhileExportingExecDetails, new UserMsg(eUserMsgType.ERROR, "Export Execution Details Error", "Error occurred while exporting the execution details to QC/ALM." + System.Environment.NewLine + "Error Details:{0}", eUserMsgOption.OK, eUserMsgSelection.None));
+ Reporter.UserMsgsPool.Add(eUserMsgKey.ErrorWhileExportingExecDetails, new UserMsg(eUserMsgType.ERROR, "Export Execution Details Error", "Error occurred while exporting the execution details to ALM." + System.Environment.NewLine + "Error Details:{0}", eUserMsgOption.OK, eUserMsgSelection.None));
Reporter.UserMsgsPool.Add(eUserMsgKey.ExportedExecDetailsToALM, new UserMsg(eUserMsgType.INFO, "Export Execution Details", "Export execution details result: {0}", eUserMsgOption.OK, eUserMsgSelection.None));
Reporter.UserMsgsPool.Add(eUserMsgKey.ExportAllItemsToALMSucceed, new UserMsg(eUserMsgType.INFO, "Export All Items to ALM", "All items has been successfully exported to ALM.", eUserMsgOption.OK, eUserMsgSelection.None));
Reporter.UserMsgsPool.Add(eUserMsgKey.ExportAllItemsToALMFailed, new UserMsg(eUserMsgType.INFO, "Export All Items to ALM", "While exporting to ALM One or more items failed to export.", eUserMsgOption.OK, eUserMsgSelection.None));
Reporter.UserMsgsPool.Add(eUserMsgKey.ExportItemToALMSucceed, new UserMsg(eUserMsgType.INFO, "Export ALM Item", "Exporting item to ALM process ended successfully.", eUserMsgOption.OK, eUserMsgSelection.None));
Reporter.UserMsgsPool.Add(eUserMsgKey.ALMOperationFailed, new UserMsg(eUserMsgType.ERROR, "ALM Operation Failed", "Failed to perform the {0} operation." + Environment.NewLine + Environment.NewLine + "Error Details: '{1}'.", eUserMsgOption.OK, eUserMsgSelection.None));
- Reporter.UserMsgsPool.Add(eUserMsgKey.ActivitiesGroupAlreadyMappedToTC, new UserMsg(eUserMsgType.WARN, "Export " + GingerDicser.GetTermResValue(eTermResKey.ActivitiesGroup) + " to QC/ALM", "The " + GingerDicser.GetTermResValue(eTermResKey.ActivitiesGroup) + " '{0}' is already mapped to the QC/ALM '{1}' Test Case, do you want to update it?" + Environment.NewLine + Environment.NewLine + "Select 'Yes' to update or 'No' to create new Test Case.", eUserMsgOption.YesNoCancel, eUserMsgSelection.Cancel));
- Reporter.UserMsgsPool.Add(eUserMsgKey.BusinessFlowAlreadyMappedToTC, new UserMsg(eUserMsgType.WARN, "Export " + GingerDicser.GetTermResValue(eTermResKey.BusinessFlow) + " to QC/ALM", "The " + GingerDicser.GetTermResValue(eTermResKey.BusinessFlow) + " '{0}' is already mapped to the QC/ALM '{1}' Test Set, do you want to update it?" + Environment.NewLine + Environment.NewLine + "Select 'Yes' to update or 'No' to create new Test Set.", eUserMsgOption.YesNoCancel, eUserMsgSelection.Cancel));
+ Reporter.UserMsgsPool.Add(eUserMsgKey.ActivitiesGroupAlreadyMappedToTC, new UserMsg(eUserMsgType.WARN, "Export " + GingerDicser.GetTermResValue(eTermResKey.ActivitiesGroup) + " to ALM", "The " + GingerDicser.GetTermResValue(eTermResKey.ActivitiesGroup) + " '{0}' is already mapped to the ALM '{1}' Test Case, do you want to update it?" + Environment.NewLine + Environment.NewLine + "Select 'Yes' to update or 'No' to create new Test Case.", eUserMsgOption.YesNoCancel, eUserMsgSelection.Cancel));
+ Reporter.UserMsgsPool.Add(eUserMsgKey.BusinessFlowAlreadyMappedToTC, new UserMsg(eUserMsgType.WARN, "Export " + GingerDicser.GetTermResValue(eTermResKey.BusinessFlow) + " to ALM", "The " + GingerDicser.GetTermResValue(eTermResKey.BusinessFlow) + " '{0}' is already mapped to the ALM '{1}' Test Set, do you want to update it?" + Environment.NewLine + Environment.NewLine + "Select 'Yes' to update or 'No' to create new Test Set.", eUserMsgOption.YesNoCancel, eUserMsgSelection.Cancel));
Reporter.UserMsgsPool.Add(eUserMsgKey.ExportQCNewTestSetSelectDiffFolder, new UserMsg(eUserMsgType.INFO, "Export QC Item - Creating new Test Set", "Please select QC folder to export to that the Test Set does not exist there.", eUserMsgOption.OK, eUserMsgSelection.None));
Reporter.UserMsgsPool.Add(eUserMsgKey.ExportItemToALMFailed, new UserMsg(eUserMsgType.ERROR, "Export to ALM Failed", "The {0} ' {1}' failed to be exported to ALM." + Environment.NewLine + Environment.NewLine + "Error Details: {2}", eUserMsgOption.OK, eUserMsgSelection.None));
- Reporter.UserMsgsPool.Add(eUserMsgKey.AskIfToSaveBFAfterExport, new UserMsg(eUserMsgType.QUESTION, "Save Links to QC/ALM Items", "The " + GingerDicser.GetTermResValue(eTermResKey.BusinessFlow) + " '{0}' must be saved for keeping the links to QC/ALM items." + Environment.NewLine + "To perform the save now?", eUserMsgOption.YesNo, eUserMsgSelection.No));
+ Reporter.UserMsgsPool.Add(eUserMsgKey.AskIfToSaveBFAfterExport, new UserMsg(eUserMsgType.QUESTION, "Save Links to ALM Items", "The " + GingerDicser.GetTermResValue(eTermResKey.BusinessFlow) + " '{0}' must be saved for keeping the links to ALM items." + Environment.NewLine + "To perform the save now?", eUserMsgOption.YesNo, eUserMsgSelection.No));
Reporter.UserMsgsPool.Add(eUserMsgKey.AskIfToLoadExternalFields, new UserMsg(eUserMsgType.QUESTION, "Load/Refresh ALM External Fields", "The activity will run in the background for several hours." + Environment.NewLine + "Please do not close Ginger until operation is complete." + Environment.NewLine + "Would you like to continue?", eUserMsgOption.YesNo, eUserMsgSelection.No));
+ Reporter.UserMsgsPool.Add(eUserMsgKey.ALMIncorrectExternalID, new UserMsg(eUserMsgType.INFO, "Export to ALM Failed", "{0}", eUserMsgOption.OK, eUserMsgSelection.None));
#endregion QC
@@ -676,7 +682,7 @@ public static void LoadUserMsgsPool()
Reporter.UserMsgsPool.Add(eUserMsgKey.LoseChangesWarn, new UserMsg(eUserMsgType.WARN, "Save Changes", "The operation may result with lost of un-saved local changes." + Environment.NewLine + "Please make sure all changes were saved before continue." + Environment.NewLine + Environment.NewLine + "To perform the operation?", eUserMsgOption.YesNo, eUserMsgSelection.No));
Reporter.UserMsgsPool.Add(eUserMsgKey.CompilationErrorOccured, new UserMsg(eUserMsgType.ERROR, "Compilation Error Occurred", "Compilation error occurred." + Environment.NewLine + "Error Details: " + Environment.NewLine + " '{0}'.", eUserMsgOption.OK, eUserMsgSelection.None));
-
+
Reporter.UserMsgsPool.Add(eUserMsgKey.CopiedVariableSuccessfully, new UserMsg(eUserMsgType.INFO, "Info Message", "'{0}'" + GingerDicser.GetTermResValue(eTermResKey.BusinessFlows) + " Affected." + Environment.NewLine + Environment.NewLine + "Notice: Un-saved changes won't be saved.", eUserMsgOption.OK, eUserMsgSelection.None));
Reporter.UserMsgsPool.Add(eUserMsgKey.RenameItemError, new UserMsg(eUserMsgType.ERROR, "Rename", "Failed to rename the Item. Error: '{0}'?", eUserMsgOption.OK, eUserMsgSelection.OK));
Reporter.UserMsgsPool.Add(eUserMsgKey.AskIfShareVaribalesInRunner, new UserMsg(eUserMsgType.QUESTION, "Share" + GingerDicser.GetTermResValue(eTermResKey.Variables), "Are you sure you want to share selected " + GingerDicser.GetTermResValue(eTermResKey.Variable) + " Values to all the similar " + GingerDicser.GetTermResValue(eTermResKey.BusinessFlows) + " and " + GingerDicser.GetTermResValue(eTermResKey.Activities) + " across all Runners?", eUserMsgOption.YesNo, eUserMsgSelection.No));
@@ -740,7 +746,7 @@ public static void LoadUserMsgsPool()
Reporter.UserMsgsPool.Add(eUserMsgKey.SourceControlConflictResolveFailed, new UserMsg(eUserMsgType.ERROR, "Resolve Conflict Failed", "Ginger failed to resolve the conflicted file" + Environment.NewLine + "File Path: {0}" + Environment.NewLine + Environment.NewLine + "It seems like the SVN conflict content (e.g. '<<<<<<< .mine') has been updated on the remote repository", eUserMsgOption.OK, eUserMsgSelection.None));
Reporter.UserMsgsPool.Add(eUserMsgKey.SourceControlItemAlreadyLocked, new UserMsg(eUserMsgType.INFO, "Source Control File Locked", "The file is already locked" + Environment.NewLine + "Please do Get info for more details", eUserMsgOption.OK, eUserMsgSelection.OK));
Reporter.UserMsgsPool.Add(eUserMsgKey.SoruceControlItemAlreadyUnlocked, new UserMsg(eUserMsgType.INFO, "Source Control File not Locked", "The file is not locked" + Environment.NewLine + "Please do Get info for more details", eUserMsgOption.OK, eUserMsgSelection.OK));
-
+ Reporter.UserMsgsPool.Add(eUserMsgKey.LocatorTestInProgress, new UserMsg(eUserMsgType.INFO, "Element Locator Test is in Progress", "The Testing of an element locator is already in progress", eUserMsgOption.OK, eUserMsgSelection.OK));
Reporter.UserMsgsPool.Add(eUserMsgKey.RefreshWholeSolution, new UserMsg(eUserMsgType.QUESTION, "Refresh Solution", "Do you want to Refresh the whole Solution to get the Latest changes?", eUserMsgOption.YesNo, eUserMsgSelection.No));
@@ -773,12 +779,12 @@ public static void LoadUserMsgsPool()
Reporter.UserMsgsPool.Add(eUserMsgKey.WarnOnEditLinkSharedActivities, new UserMsg(eUserMsgType.QUESTION, "Link Shared " + GingerDicser.GetTermResValue(eTermResKey.Activities) + " Warning", "Any updates to linked shared repository auto update the shared " + GingerDicser.GetTermResValue(eTermResKey.Activities) + " and all it's usage in other flows." + System.Environment.NewLine + System.Environment.NewLine + "Do you want to proceed with Edit?", eUserMsgOption.YesNo, eUserMsgSelection.No));
Reporter.UserMsgsPool.Add(eUserMsgKey.WarnOnSaveLinkSharedActivities, new UserMsg(eUserMsgType.QUESTION, "Link Shared " + GingerDicser.GetTermResValue(eTermResKey.Activities) + " Warning", "Any updates to linked shared repository auto update the shared " + GingerDicser.GetTermResValue(eTermResKey.Activities) + " and all it's usage in other flows." + System.Environment.NewLine + System.Environment.NewLine + "Do you want to proceed with Save?", eUserMsgOption.YesNo, eUserMsgSelection.No));
-
+
Reporter.UserMsgsPool.Add(eUserMsgKey.EditLinkSharedActivities, new UserMsg(eUserMsgType.INFO, "Link Shared " + GingerDicser.GetTermResValue(eTermResKey.Activities), "Linked shared repository " + GingerDicser.GetTermResValue(eTermResKey.Activities) + " are read only by default." + System.Environment.NewLine + System.Environment.NewLine + "If you want to update, open it in edit mode.", eUserMsgOption.OK, eUserMsgSelection.None));
- Reporter.UserMsgsPool.Add(eUserMsgKey.QcConnectFailureRestAPI, new UserMsg(eUserMsgType.WARN, "QC/ALM Connection Failed", "QC/ALM connection failed." + System.Environment.NewLine + "Please make sure that the server url and the credentials you use are correct.", eUserMsgOption.OK, eUserMsgSelection.None));
+ Reporter.UserMsgsPool.Add(eUserMsgKey.QcConnectFailureRestAPI, new UserMsg(eUserMsgType.WARN, "ALM Connection Failed", "ALM connection failed." + System.Environment.NewLine + "Please make sure that the server url and the credentials you use are correct.", eUserMsgOption.OK, eUserMsgSelection.None));
Reporter.UserMsgsPool.Add(eUserMsgKey.ExportedExecDetailsToALMIsInProcess, new UserMsg(eUserMsgType.INFO, "Export Execution Details", "Please Wait, Exporting Execution Details is in process.", eUserMsgOption.OK, eUserMsgSelection.None));
Reporter.UserMsgsPool.Add(eUserMsgKey.AskBeforeDefectProfileDeleting, new UserMsg(eUserMsgType.QUESTION, "Profiles Deleting", "After deletion there will be no way to restore deleted profiles.\nAre you sure that you want to delete the selected profiles?", eUserMsgOption.YesNo, eUserMsgSelection.No));
Reporter.UserMsgsPool.Add(eUserMsgKey.MissedMandatotryFields, new UserMsg(eUserMsgType.INFO, "Profiles Saving", "Please, populate value for mandatory field '{0}' of '{1}' Defect Profile", eUserMsgOption.OK, eUserMsgSelection.None));
diff --git a/Ginger/GingerCoreCommon/ReportsLib/ExecutionLoggerConfiguration.cs b/Ginger/GingerCoreCommon/ReportsLib/ExecutionLoggerConfiguration.cs
index 9735bfe15e..45e3545f21 100644
--- a/Ginger/GingerCoreCommon/ReportsLib/ExecutionLoggerConfiguration.cs
+++ b/Ginger/GingerCoreCommon/ReportsLib/ExecutionLoggerConfiguration.cs
@@ -64,6 +64,12 @@ public enum eDeleteLocalDataOnPublish
No
}
+ public enum eUploadExecutionArtifactsToCentralizedReport
+ {
+ Yes,
+ No
+ }
+
// Why we serialzie!!?
[IsSerializedForLocalRepository]
@@ -168,6 +174,23 @@ public eDeleteLocalDataOnPublish DeleteLocalDataOnPublish
}
}
+ private eUploadExecutionArtifactsToCentralizedReport mUploadArtifactsToCentralizedReport = eUploadExecutionArtifactsToCentralizedReport.Yes;
+ [IsSerializedForLocalRepository]
+ public eUploadExecutionArtifactsToCentralizedReport UploadArtifactsToCentralizedReport
+ {
+ get
+ {
+ return mUploadArtifactsToCentralizedReport;
+ }
+ set
+ {
+ if (mUploadArtifactsToCentralizedReport != value)
+ {
+ mUploadArtifactsToCentralizedReport = value;
+ OnPropertyChanged(nameof(UploadArtifactsToCentralizedReport));
+ }
+ }
+ }
private string mCentralizedHtmlReportServiceURL;
[IsSerializedForLocalRepository]
diff --git a/Ginger/GingerCoreCommon/Repository/BusinessFlowLib/BusinessFlow.cs b/Ginger/GingerCoreCommon/Repository/BusinessFlowLib/BusinessFlow.cs
index 0257a66cb6..f8327f84cf 100644
--- a/Ginger/GingerCoreCommon/Repository/BusinessFlowLib/BusinessFlow.cs
+++ b/Ginger/GingerCoreCommon/Repository/BusinessFlowLib/BusinessFlow.cs
@@ -1450,13 +1450,6 @@ public object GetValidationsStat(ref bool isValidaionsExist)
return lst;
}
- public void SetActivityTargetApplication(Activity activity)
- {
- if (TargetApplications.FirstOrDefault(x => x.Name == activity.TargetApplication) == null)
- {
- activity.TargetApplication = this.MainApplication;
- }
- }
public override string ItemName
{
diff --git a/Ginger/GingerCoreNET/ALMLib/Azure/AzureDevOpsCore.cs b/Ginger/GingerCoreNET/ALMLib/Azure/AzureDevOpsCore.cs
index 13e0cb1036..75509bca98 100644
--- a/Ginger/GingerCoreNET/ALMLib/Azure/AzureDevOpsCore.cs
+++ b/Ginger/GingerCoreNET/ALMLib/Azure/AzureDevOpsCore.cs
@@ -52,6 +52,7 @@ limitations under the License.
using System.Xml;
using System.Text.RegularExpressions;
using System.Web;
+using DocumentFormat.OpenXml.Drawing;
namespace GingerCore.ALM
@@ -147,8 +148,7 @@ public override Dictionary CreateNewALMDefects(Dictionary defectsOpeningResults = new Dictionary();
- List defectsToExport = new List();
- List screenshots = new List();
+ List screenshots = new();
foreach (KeyValuePair> defectForOpening in defectsForOpening)
{
string summaryValue = defectForOpening.Value.ContainsKey("Summary") ? defectForOpening.Value["Summary"] : string.Empty;
@@ -166,13 +166,9 @@ public override Dictionary CreateNewALMDefects(Dictionary CreateNewALMDefects(Dictionary> defectForOpening)
+ private static WorkItem CreateDefectData(KeyValuePair> defectForOpening)
{
try
{
@@ -198,25 +194,33 @@ private static WorkItem CreateDefectData(Dictionary();
- JsonPatchDocument patchDocument = new JsonPatchDocument();
+ JsonPatchDocument patchDocument = new();
+ patchDocument.Add(
+ new JsonPatchOperation()
+ {
+ Operation = Operation.Add,
+ Path = "/fields/System.Title",
+ Value = defectForOpening.Value.TryGetValue("Summary", out string value) ? value : string.Empty,
+
- foreach (var item in defectForOpening)
- {
+ }
+ );
+ patchDocument.Add(
+ new JsonPatchOperation()
+ {
+ Operation = Operation.Add,
+ Path = "/fields/Microsoft.VSTS.TCM.ReproSteps",
+ Value = defectForOpening.Value.TryGetValue("description", out string systeminfo) ? systeminfo : string.Empty,
- patchDocument.Add(
- new JsonPatchOperation()
- {
- Operation = Operation.Add,
- Path = "/fields/System.Title",
- Value = item.Value.TryGetValue("Summary", out string value) ? value : string.Empty
- }
- );
- }
+ });
+
+ patchDocument = AddAttachmentsToDefect(patchDocument, defectForOpening, workItemTrackingClient);
+
Microsoft.TeamFoundation.WorkItemTracking.WebApi.Models.WorkItem newWorkItem = workItemTrackingClient.CreateWorkItemAsync(patchDocument, login.Project, "Bug").Result;
@@ -229,6 +233,51 @@ private static WorkItem CreateDefectData(Dictionary> defectForOpening, WorkItemTrackingHttpClient wit)
+ {
+ var attachmentPaths = defectForOpening.Value.TryGetValue("screenshots", out string picspath) ? picspath :string.Empty;
+
+ if (string.IsNullOrEmpty(attachmentPaths))
+ {
+ return patchDocument;
+ }
+
+ var attachmentPathsArray = attachmentPaths.Split(',');
+
+ foreach (var attachmentPath in attachmentPathsArray)
+ {
+ try
+ {
+
+ var attachment = wit.CreateAttachmentAsync(attachmentPath.Trim()).Result;
+
+ patchDocument.Add(
+ new JsonPatchOperation()
+ {
+ Operation = Operation.Add,
+ Path = "/relations/-",
+ Value = new
+ {
+ rel = "AttachedFile",
+ url = attachment.Url,
+ attributes = new
+ {
+ comment = "Attached Screenshot"
+ }
+ }
+ }
+ );
+ }
+ catch(Exception ex)
+ {
+ Reporter.ToLog(eLogLevel.ERROR, $"Error adding attachment '{attachmentPath.Trim()}': {ex.Message}");
+ }
+ }
+
+ return patchDocument;
+ }
+
+
private static string CheckIfDefectExist(string summaryValue)
{
try
@@ -258,7 +307,7 @@ private static string CheckIfDefectExist(string summaryValue)
{
if (workItem.Fields["System.Title"].ToString().Equals(summaryValue))
{
- return summaryValue;
+ return workItem.Id.ToString();
}
}
@@ -282,67 +331,67 @@ public override bool ExportExecutionDetailsToALM(BusinessFlow bizFlow, ref strin
return false;
}
LoginDTO login = GetLoginDTO();
-
try
{
- VssConnection connection = AzureDevOpsRepository.LoginAzure(login);
-
+ // Establishing connection
+ var connection = AzureDevOpsRepository.LoginAzure(login);
var testClient = connection.GetClient();
- if (Int32.TryParse(bizFlow.ExternalID, out int testPlanId) && Int32.TryParse(bizFlow.ExternalID2, out int suiteId))
+ // Parsing external IDs
+ if (!int.TryParse(bizFlow.ExternalID, out int testPlanId) || !int.TryParse(bizFlow.ExternalID2, out int suiteId))
{
- string projectName = login.Project;
+ Reporter.ToLog(eLogLevel.ERROR, $"Unable to convert ExternalId: {bizFlow.ExternalID} of the BusinessFlow: {bizFlow.Name} to TestPlanId/SuiteId");
+ return false;
+ }
- var testPoints = testClient.GetPointsAsync(projectName, testPlanId, suiteId).Result;
- if (testPoints != null)
- {
- foreach (var item in testPoints)
- {
- int testpointid = item.Id;
- var matchingTC = bizFlow.ActivitiesGroups.FirstOrDefault(p => p.ExternalID == item.TestCase.Id);
-
- if (matchingTC != null)
- {
- RunCreateModel run = new RunCreateModel(name: item.TestCase.Name, plan: new Microsoft.TeamFoundation.TestManagement.WebApi.ShallowReference(bizFlow.ExternalID), pointIds: [testpointid]);
- TestRun testrun = testClient.CreateTestRunAsync(run, projectName).Result;
+ string projectName = login.Project;
- TestCaseResult caseResult = new() { State = "Completed", Outcome = matchingTC.RunStatus.ToString(), Id = 100000 };
+ // Fetching test points
+ var testPoints = testClient.GetPointsAsync(projectName, testPlanId, suiteId).Result;
+ if (testPoints == null)
+ {
+ Reporter.ToLog(eLogLevel.ERROR, $"No TestPoint found for given ProjectName: {projectName}, TestPlanId: {testPlanId}, SuiteId: {suiteId} or BusinessFlow: {bizFlow.Name}");
+ return false;
+ }
- var testResults = testClient.UpdateTestResultsAsync([caseResult], projectName, testrun.Id).Result;
- RunUpdateModel runmodel = new(state: "Completed");
- TestRun testRunResult = testClient.UpdateTestRunAsync(runmodel, projectName, testrun.Id, runmodel).Result;
- }
- else
- {
- Reporter.ToLog(eLogLevel.ERROR, $"No Matching TestCase(ActivityGroup) found for TestPointId: {testpointid}");
- }
+ foreach (var item in testPoints)
+ {
+ int testpointid = item.Id;
+ var matchingTC = bizFlow.ActivitiesGroups.FirstOrDefault(p => p.ExternalID == item.TestCase.Id);
- }
-
+ if (matchingTC != null)
+ {
+ // Creating test run
+ var runModel = new RunCreateModel(name: item.TestCase.Name, plan: new Microsoft.TeamFoundation.TestManagement.WebApi.ShallowReference(bizFlow.ExternalID), pointIds: new[] { testpointid });
+ var testrun = testClient.CreateTestRunAsync(runModel, projectName).Result;
+
+ // Updating test results
+ var caseResult = new TestCaseResult { State = "Completed", Outcome = matchingTC.RunStatus.ToString(), Id = 100000 };
+ testClient.UpdateTestResultsAsync(new[] { caseResult }, projectName, testrun.Id);
+
+ // Updating test run
+ var runUpdateModel = new RunUpdateModel(state: "Completed");
+ testClient.UpdateTestRunAsync(runUpdateModel, projectName, testrun.Id, runUpdateModel);
}
else
{
- Reporter.ToLog(eLogLevel.ERROR, $"No TestPoint found for given ProjectName: {projectName}, TestPlanId: {testPlanId}, SuiteId: {suiteId} or BusinessFlow: {bizFlow.Name}");
+ Reporter.ToLog(eLogLevel.ERROR, $"No Matching TestCase(ActivityGroup) found for TestPointId: {testpointid}");
+ Reporter.ToUser(eUserMsgKey.ALMIncorrectExternalID, "ExternalId of ActivityGroup is either Null or Incorrect");
+ return false;
}
-
- }
- else
- {
- Reporter.ToLog(eLogLevel.ERROR,$"Unable to convert ExternalId: {bizFlow.ExternalID} of the BusinessFlow : {bizFlow.Name} to TestPlanId/SuiteId");
- return false;
}
+ result = "Export has been finished Successfully";
return true;
-
}
- catch (AggregateException e)
+ catch (Exception ex)
{
- Reporter.ToLog(eLogLevel.ERROR,e.InnerException.Message);
-
+ Reporter.ToLog(eLogLevel.ERROR, ex.Message);
+ Reporter.ToUser(eUserMsgKey.ALMIncorrectExternalID, ex.Message);
+ return false;
}
- return false;
-
+
}
public override Dictionary GetALMDomainProjects(string ALMDomainName)
@@ -629,6 +678,7 @@ public static void CreateTestPlan(BusinessFlow bf)
public void CreateNewTestCase(ActivitiesGroup ag, string fatherId, ObservableList testcasefields, List step)
{
+
TestBaseHelper helper = new TestBaseHelper();
ITestBase testBase = helper.Create();
testBase = CreateTestStep(step,testBase);
@@ -891,26 +941,34 @@ public ALMTestSetData GetTestSuiteById(string tsId)
TestPlanHttpClient testPlanClient = connection.GetClient();
List plans = testPlanClient.GetTestPlansAsync(logincred.Project).Result;
-
- if(Int32.TryParse(tsId, out int testplanId))
- {
- int suiteId = testplanId + 1;
- TestSuite testsuite = testPlanClient.GetTestSuiteByIdAsync(logincred.Project, testplanId, suiteId).Result;
- ALMTestSetData aLMTestSetData = new()
+ if (Int32.TryParse(tsId, out int testplanId))
+ {
+ try
{
- Id = testsuite.Id.ToString(),
- Name = testsuite.Name,
- ParentId = testplanId.ToString()
+ int suiteId = testplanId + 1;
+ TestSuite testsuite = testPlanClient.GetTestSuiteByIdAsync(logincred.Project, testplanId, suiteId).Result;
- };
+ ALMTestSetData aLMTestSetData = new()
+ {
+ Id = testsuite.Id.ToString(),
+ Name = testsuite.Name,
+ ParentId = testplanId.ToString()
+
+ };
- return aLMTestSetData;
+ return aLMTestSetData;
+ }
+ catch(Exception ex)
+ {
+ Reporter.ToUser(eUserMsgKey.ALMIncorrectExternalID,$"{ex.InnerException.Message}");
+ return null;
+ }
}
else
{
- Reporter.ToLog(eLogLevel.ERROR,"Unable to parse ExternalId to test suite id");
+ Reporter.ToLog(eLogLevel.ERROR, "Unable to parse ExternalId to test suite id");
return null;
}
diff --git a/Ginger/GingerCoreNET/ALMLib/Azure/AzureTestCases.cs b/Ginger/GingerCoreNET/ALMLib/Azure/AzureTestCases.cs
index ac79d0436a..eb38ab06f3 100644
--- a/Ginger/GingerCoreNET/ALMLib/Azure/AzureTestCases.cs
+++ b/Ginger/GingerCoreNET/ALMLib/Azure/AzureTestCases.cs
@@ -1,4 +1,22 @@
-using GingerCore.ALM.JIRA;
+#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 GingerCore.ALM.JIRA;
using System;
using System.Collections.Generic;
using System.Linq;
diff --git a/Ginger/GingerCoreNET/ALMLib/Azure/AzureTestCasesSteps.cs b/Ginger/GingerCoreNET/ALMLib/Azure/AzureTestCasesSteps.cs
index 712a68ab6e..e31971007d 100644
--- a/Ginger/GingerCoreNET/ALMLib/Azure/AzureTestCasesSteps.cs
+++ b/Ginger/GingerCoreNET/ALMLib/Azure/AzureTestCasesSteps.cs
@@ -1,4 +1,22 @@
-using GingerCore.ALM.JIRA;
+#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 GingerCore.ALM.JIRA;
using System;
using System.Collections.Generic;
using System.Linq;
diff --git a/Ginger/GingerCoreNET/ALMLib/Azure/AzureTestPlan.cs b/Ginger/GingerCoreNET/ALMLib/Azure/AzureTestPlan.cs
index 55ebed1b4d..578388403c 100644
--- a/Ginger/GingerCoreNET/ALMLib/Azure/AzureTestPlan.cs
+++ b/Ginger/GingerCoreNET/ALMLib/Azure/AzureTestPlan.cs
@@ -1,4 +1,22 @@
-using System;
+#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 System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
diff --git a/Ginger/GingerCoreNET/ALMLib/Generic/ALMCore.cs b/Ginger/GingerCoreNET/ALMLib/Generic/ALMCore.cs
index 5f27e12a1e..1af7ba1b47 100644
--- a/Ginger/GingerCoreNET/ALMLib/Generic/ALMCore.cs
+++ b/Ginger/GingerCoreNET/ALMLib/Generic/ALMCore.cs
@@ -242,12 +242,19 @@ public bool ExportBusinessFlowsResultToALM(ObservableList Business
{
if (BizFlow.ExternalIdCalCulated != "0" && !String.IsNullOrEmpty(BizFlow.ExternalIdCalCulated))
{
- Reporter.ToLog(eLogLevel.DEBUG, $"Executing RunSet Action Publish to ALM for { GingerDicser.GetTermResValue(eTermResKey.BusinessFlow)} {BizFlow.Name}");
+ Reporter.ToLog(eLogLevel.DEBUG, $"Executing RunSet Action Publish to ALM for {GingerDicser.GetTermResValue(eTermResKey.BusinessFlow)} {BizFlow.Name}");
Reporter.ToStatus(eStatusMsgKey.ExportExecutionDetails, null, BizFlow.Name, "ALM");
-
+
if (publishToALMConfig.ToAttachActivitiesGroupReport)
{
- Ginger.Reports.GingerExecutionReport.ExtensionMethods.CreateActivitiesGroupReportsOfBusinessFlow(null, BizFlow);//need to find a way to specify the releveant environment
+ if(BizFlow.ALMTestSetLevel != "RunSet")
+ {
+ Ginger.Reports.GingerExecutionReport.ExtensionMethods.CreateActivitiesGroupReportsOfBusinessFlow(null, BizFlow);//need to find a way to specify the releveant environment
+ }
+ else
+ {
+ Reporter.ToLog(eLogLevel.DEBUG, $"Exclude the attach Activities group report from the RunSet level.");
+ }
}
isExportSucc = ExportExecutionDetailsToALM(BizFlow, ref result, exectutedFromAutomateTab, publishToALMConfig,projEnvironment);
diff --git a/Ginger/GingerCoreNET/ALMLib/JIRA/Bll/JiraExportManager.cs b/Ginger/GingerCoreNET/ALMLib/JIRA/Bll/JiraExportManager.cs
index f6a7e72e7a..4ac187376b 100644
--- a/Ginger/GingerCoreNET/ALMLib/JIRA/Bll/JiraExportManager.cs
+++ b/Ginger/GingerCoreNET/ALMLib/JIRA/Bll/JiraExportManager.cs
@@ -330,7 +330,7 @@ public bool ExecuteDataToJira(BusinessFlow bizFlow, PublishToALMConfig publishTo
{
var testExecutionData = CreateTestRunData(actGroup);
var relevantTcRun = testExecutionData.FirstOrDefault(a => a.TestExecutionId == bizFlow.AlmData);
- if (!string.IsNullOrEmpty(relevantTcRun.TestCaseRunId))
+ if (relevantTcRun !=null && !string.IsNullOrEmpty(relevantTcRun.TestCaseRunId))
{
List activities = (bizFlow.Activities.Where(x => x.ActivitiesGroupID == actGroup.Name)).Select(a => a).ToList();
JiraRunStatus runs = new JiraRunStatus();
@@ -370,6 +370,10 @@ public bool ExecuteDataToJira(BusinessFlow bizFlow, PublishToALMConfig publishTo
}
}
}
+ else
+ {
+ resultFlag = false;
+ }
}
}
if (resultFlag)
@@ -378,7 +382,7 @@ public bool ExecuteDataToJira(BusinessFlow bizFlow, PublishToALMConfig publishTo
}
else
{
- Reporter.ToUser(eUserMsgKey.ExportedExecDetailsToALM);
+ Reporter.ToUser(eUserMsgKey.ExportedExecDetailsToALM,"Incorrect ExternalID of BF, Please check if BF already exported as Test Set/Plan");
}
return resultFlag;
diff --git a/Ginger/GingerCoreNET/ActionsLib/ActCliOrchestration.cs b/Ginger/GingerCoreNET/ActionsLib/ActCliOrchestration.cs
index c24732458e..02264bad62 100644
--- a/Ginger/GingerCoreNET/ActionsLib/ActCliOrchestration.cs
+++ b/Ginger/GingerCoreNET/ActionsLib/ActCliOrchestration.cs
@@ -89,12 +89,21 @@ public override void ActionUserRecommendedUseCase(ITextBoxFormatter TBH)
public override void Execute()
{
DataBuffer = new StringBuilder();
+
+ if(string.IsNullOrEmpty(ValueExpression.Calculate(this.FilePath)))
+ {
+ Error = "Application/File path is Empty";
+ return;
+ }
+
if (ParseResult && string.IsNullOrEmpty(ValueExpression.Calculate(Delimiter)))
{
Error = "Delimiter is Empty";
return;
}
+
+
var task = Task.Run(() =>
ExecuteCliProcess()
);
@@ -175,11 +184,15 @@ private async Task ExecuteCliProcess()
var cmd = Cli.Wrap(actualApplicationPath)
.WithArguments(arguments.ToString());
cmd.ExecuteAsync();
- } }
+ }
+ }
catch(Exception ex)
{
Error = "Error: during CLI Orchestration:" + ex.Message;
Reporter.ToLog(eLogLevel.ERROR, "Error: during CLI Orchestration", ex);
+ DataBuffer.Append($"Error: during CLI Orchestration {ex.Message} {ex.InnerException}");
+ WriteTofile(path, DataBuffer);
+ Act.AddArtifactToAction(Path.GetFileName(path), this, path);
Status = Amdocs.Ginger.CoreNET.Execution.eRunStatus.Failed;
return;
}
diff --git a/Ginger/GingerCoreNET/ActionsLib/UI/VisualTesting/ActVisualTesting.cs b/Ginger/GingerCoreNET/ActionsLib/UI/VisualTesting/ActVisualTesting.cs
index 484bb8c926..b6a91cd0d9 100644
--- a/Ginger/GingerCoreNET/ActionsLib/UI/VisualTesting/ActVisualTesting.cs
+++ b/Ginger/GingerCoreNET/ActionsLib/UI/VisualTesting/ActVisualTesting.cs
@@ -617,7 +617,7 @@ public void TakeScreenShotforBaseline(IVisualTestingDriver driver)
}
baseImage.Save(FullPath);
- Act.AddArtifactToAction("Image", this, FullPath);
+ Act.AddArtifactToAction("Baseline_Image", this, FullPath);
}
// TODO: move from here to general or use general
diff --git a/Ginger/GingerCoreNET/ActionsLib/UI/VisualTesting/ApplitoolsAnalyzer.cs b/Ginger/GingerCoreNET/ActionsLib/UI/VisualTesting/ApplitoolsAnalyzer.cs
index 8bab497709..61467a03ab 100644
--- a/Ginger/GingerCoreNET/ActionsLib/UI/VisualTesting/ApplitoolsAnalyzer.cs
+++ b/Ginger/GingerCoreNET/ActionsLib/UI/VisualTesting/ApplitoolsAnalyzer.cs
@@ -524,34 +524,35 @@ private String BakeURL(String sessionURL)
private void DownloadImages(int numOfImages, TestResults testResults)
{
- for (int i = 1; i <= numOfImages; i++)
- {
- String currImagePath = Act.GetScreenShotRandomFileName();
- currImagePath = System.IO.Path.Combine(System.IO.Path.GetDirectoryName(currImagePath), "Applitools_" + DateTime.Now.ToString("ddmmyyyyss.mm") + ".png");
- String currImageURL = this.ServerURL + "/api/sessions/batches/" + this.batchID + "/" + this.sessionID + "/steps/" + i.ToString() + "/images/diff?ApiKey=" + mDriver.GetApplitoolKey();// ((SeleniumDriver)mDriver).ApplitoolsViewKey;
- try
+ for (int i = 0; i < numOfImages; i++)
+ {
+ if(testResults.StepsInfo[i].IsDifferent)
{
- HttpResponseMessage response = runLongRequest(currImageURL);
- if (response.StatusCode == HttpStatusCode.OK)
+ String currImagePath = Act.GetScreenShotRandomFileName();
+ currImagePath = System.IO.Path.Combine(System.IO.Path.GetDirectoryName(currImagePath), "Applitools_" + DateTime.Now.ToString("ddmmyyyyss.mm") + ".png");
+ String currImageURL = this.ServerURL + "/api/sessions/batches/" + this.batchID + "/" + this.sessionID + "/steps/" + (i+1).ToString() + "/images/diff?ApiKey=" + mDriver.GetApplitoolKey();// ((SeleniumDriver)mDriver).ApplitoolsViewKey;
+ try
{
- var fs = new FileStream(currImagePath, FileMode.Create, FileAccess.Write, FileShare.None);
- response.Content.CopyToAsync(fs).ContinueWith(
- (discard) =>
+ HttpResponseMessage response = runLongRequest(currImageURL);
+ if (response.StatusCode == HttpStatusCode.OK)
{
- fs.Close();
- });
- mAct.ScreenShotsNames.Add(Path.GetFileName(currImagePath));
- mAct.ScreenShots.Add(currImagePath);
- Act.AddArtifactToAction("Difference_Image", mAct, currImagePath);
+ var fs = new FileStream(currImagePath, FileMode.Create, FileAccess.Write, FileShare.None);
+ response.Content.CopyToAsync(fs).ContinueWith(
+ (discard) =>
+ {
+ fs.Close();
+ });
+ mAct.ScreenShotsNames.Add(Path.GetFileName(currImagePath));
+ mAct.ScreenShots.Add(currImagePath);
+ Act.AddArtifactToAction("Difference_Image", mAct, currImagePath);
+ }
+ }
+ catch (Exception ex)
+ {
+ mAct.Error = mAct.Error + ex.Message;
}
}
- catch (Exception ex)
- {
- mAct.Error = mAct.Error + ex.Message;
- }
-
-
}
}
diff --git a/Ginger/GingerCoreNET/ActionsLib/UI/VisualTesting/VRTAnalyzer.cs b/Ginger/GingerCoreNET/ActionsLib/UI/VisualTesting/VRTAnalyzer.cs
index 8f0df9900d..f551429c29 100644
--- a/Ginger/GingerCoreNET/ActionsLib/UI/VisualTesting/VRTAnalyzer.cs
+++ b/Ginger/GingerCoreNET/ActionsLib/UI/VisualTesting/VRTAnalyzer.cs
@@ -18,6 +18,7 @@ limitations under the License.
using amdocs.ginger.GingerCoreNET;
using Amdocs.Ginger.Common;
+using GingerCore.Environments;
using GingerCoreNET.GeneralLib;
using System;
using System.Drawing;
@@ -45,19 +46,12 @@ public class VRTAnalyzer : IVisualAnalyzer
VisualRegressionTracker.VisualRegressionTracker vrt;
VisualRegressionTracker.Config config;
- public VRTAnalyzer()
- {
- if (vrt == null)
- {
- CreateVRTConfig();
- }
- }
private void CreateVRTConfig()
{
- ValueExpression VE = new ValueExpression(null, null);
+ ValueExpression VE = new ValueExpression(GetCurrentProjectEnvironment(), null);
- config = new VisualRegressionTracker.Config
+ config = new Config
{
BranchName = VE.Calculate(WorkSpace.Instance.Solution.VRTConfiguration.BranchName),
Project = VE.Calculate(WorkSpace.Instance.Solution.VRTConfiguration.Project),
@@ -67,6 +61,19 @@ private void CreateVRTConfig()
};
}
+ private ProjEnvironment GetCurrentProjectEnvironment()
+ {
+ foreach (ProjEnvironment env in WorkSpace.Instance.SolutionRepository.GetAllRepositoryItems())
+ {
+ if (env.Name.Equals(mDriver.GetEnvironment()))
+ {
+ return env;
+ }
+ }
+
+ return null;
+ }
+
public enum eVRTAction
{
[EnumValueDescription("Start Test")]
@@ -188,7 +195,7 @@ private void StartVRT()
{
}
- }
+ }
private void TrackVRT()
{
@@ -215,7 +222,6 @@ private void TrackVRT()
string baselinefilename = mAct.GetInputParamCalculatedValue(VRTSavedBaseImageFilenameString);
image = GetBaseLineImage(baselinefilename);
}
- mAct.CreateBaselineImage = false;//unchecked create Base line image after creation
}
else
{
@@ -301,8 +307,11 @@ private void TrackVRT()
mAct.AddOrUpdateReturnParamActual("Image URL", result.ImageUrl + "");
mAct.AddOrUpdateReturnParamActual("Baseline URL", result.BaselineUrl + "");
mAct.AddOrUpdateReturnParamActual("Difference URL", result.DiffUrl + "");
- mAct.AddOrUpdateReturnParamActual("URL", result.Url + "");
-
+ mAct.AddOrUpdateReturnParamActual("URL", result.Url + "");
+ if (result.BaselineUrl != null)
+ {
+ mAct.previewBaselineImageName = Path.GetFileName(result.BaselineUrl);
+ }
//Calculate the action status based on the results
if (WorkSpace.Instance.Solution.VRTConfiguration.FailActionOnCheckpointMismatch == Ginger.Configurations.VRTConfiguration.eFailActionOnCheckpointMismatch.Yes && result.Status != TestRunStatus.Ok)
@@ -310,7 +319,15 @@ private void TrackVRT()
switch (result.Status)
{
case TestRunStatus.New:
- mAct.Error += $"No baseline found, Please approve it on dashboard to create baseline.{System.Environment.NewLine}{result.Url}";
+ if(mAct.CreateBaselineImage)
+ {
+ mAct.ExInfo += $"Baseline uploaded, Please approve it on VRT dashboard.{System.Environment.NewLine}{result.Url}";
+ }
+ else
+ {
+ mAct.Error += $"No baseline found or exsiting baseline not approved, Please approve it on VRT dashboard.{System.Environment.NewLine}{result.Url}";
+ }
+
//Add baseline image to act screenshots
if (result.ImageUrl != null)
{
@@ -321,8 +338,13 @@ private void TrackVRT()
mAct.Error += $"Differences from baseline was found.{System.Environment.NewLine}{result.DiffUrl}";
//Add difference image to act screenshots
- if(result.DiffUrl != null){
- General.DownloadImage($"{WorkSpace.Instance.Solution.VRTConfiguration.ApiUrl}/{ Path.GetFileName(result.DiffUrl)}", mAct, true, "Difference_Image");
+ if(result.DiffUrl != null)
+ {
+ string DiffrenceImage = General.DownloadImage($"{WorkSpace.Instance.Solution.VRTConfiguration.ApiUrl}/{ Path.GetFileName(result.DiffUrl)}", mAct);
+ if(!string.IsNullOrEmpty(DiffrenceImage) && File.Exists(DiffrenceImage))
+ {
+ Act.AddArtifactToAction("Difference_Image", mAct, DiffrenceImage);
+ }
}
@@ -330,7 +352,11 @@ private void TrackVRT()
if(result.BaselineUrl != null)
{
mAct.previewBaselineImageName = Path.GetFileName(result.BaselineUrl);
- General.DownloadImage($"{WorkSpace.Instance.Solution.VRTConfiguration.ApiUrl}/{Path.GetFileName(result.BaselineUrl)}", mAct, true, "BaseLine_Image");
+ string BaseLineImage = General.DownloadImage($"{WorkSpace.Instance.Solution.VRTConfiguration.ApiUrl}/{Path.GetFileName(result.BaselineUrl)}", mAct);
+ if(!string.IsNullOrEmpty(BaseLineImage) && File.Exists(BaseLineImage))
+ {
+ Act.AddArtifactToAction("Baseline_Image", mAct, BaseLineImage);
+ }
}
@@ -339,7 +365,9 @@ private void TrackVRT()
default:
mAct.ExInfo = $"TestRun Results Status: {result.Status}";
break;
+
}
+ mAct.CreateBaselineImage = false;//unchecked create Base line image after creation
}
}
catch (AggregateException ae)
diff --git a/Ginger/GingerCoreNET/ActionsLib/Webservices/ActWebAPIModel.cs b/Ginger/GingerCoreNET/ActionsLib/Webservices/ActWebAPIModel.cs
index 7ae3bdda70..ebc467319f 100644
--- a/Ginger/GingerCoreNET/ActionsLib/Webservices/ActWebAPIModel.cs
+++ b/Ginger/GingerCoreNET/ActionsLib/Webservices/ActWebAPIModel.cs
@@ -215,6 +215,7 @@ private ObservableList ConvertAPIModelKeyValueToActInputValues(Ob
{
ActInputValue AIV = new ActInputValue();
AIV.Param = AMKV.Param;
+ AIV.Value = AMKV.Value;
AIV.ValueForDriver = ReplacePlaceHolderParameneterWithActual(AMKV.Value, actWebAPIModel.APIModelParamsValue);
GingerCoreHttpHeaders.Add(AIV);
}
diff --git a/Ginger/GingerCoreNET/AnalyzerLib/AnalyzeEnvApplication.cs b/Ginger/GingerCoreNET/AnalyzerLib/AnalyzeEnvApplication.cs
index 673bb34040..1ddd408cf5 100644
--- a/Ginger/GingerCoreNET/AnalyzerLib/AnalyzeEnvApplication.cs
+++ b/Ginger/GingerCoreNET/AnalyzerLib/AnalyzeEnvApplication.cs
@@ -1,4 +1,22 @@
-using Ginger.AnalyzerLib;
+#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 Ginger.AnalyzerLib;
using GingerCore.Environments;
using GingerCore;
using GingerCoreNET.SolutionRepositoryLib.RepositoryObjectsLib.PlatformsLib;
@@ -47,7 +65,7 @@ private static void CheckIfTargetApplicationExistInEnvironment(string TargetAppl
Description = $"{GingerDicser.GetTermResValue(eTermResKey.Activity)} {GingerDicser.GetTermResValue(eTermResKey.TargetApplication)} not found in Environment: {currentEnvironment.Name}",
UTDescription = "MissingApplicationInEnvironment",
Details = $"{GingerDicser.GetTermResValue(eTermResKey.Activity)} {GingerDicser.GetTermResValue(eTermResKey.TargetApplication)} = '{TargetApplication}' while Environment app(s) is: '{EnvApps}'",
- HowToFix = $"Open the Environment Configurations Page and add set correct {GingerDicser.GetTermResValue(eTermResKey.TargetApplication)}",
+ HowToFix = $"Open the Environment Configurations Page and add/set correct {GingerDicser.GetTermResValue(eTermResKey.TargetApplication)}",
CanAutoFix = eCanFix.No,
Status = eStatus.NeedFix,
IssueType = eType.Error,
@@ -56,7 +74,7 @@ private static void CheckIfTargetApplicationExistInEnvironment(string TargetAppl
Impact = "Execution probably will fail due to missing input value.",
ItemClass = GingerDicser.GetTermResValue(eTermResKey.TargetApplication),
Severity = eSeverity.Critical,
- Selected = true,
+ Selected = false,
FixItHandler = null
};
issues.Add(AB);
@@ -66,13 +84,13 @@ private static void CheckIfTargetApplicationExistInEnvironment(string TargetAppl
ApplicationPlatform? ExistingApplication = WorkSpace.Instance.Solution.ApplicationPlatforms
.FirstOrDefault(applicationPlatform => applicationPlatform.Guid.Equals(application.ParentGuid) || applicationPlatform.AppName.Equals(application.Name));
- if (ExistingApplication == null || ExistingApplication.Platform.Equals(ePlatformType.NA))
+ if (ExistingApplication == null)
{
AnalyzeEnvApplication AB = new()
{
- Description = $"{GingerDicser.GetTermResValue(eTermResKey.TargetApplication)} Platform cannot be 'NA'",
+ Description = $"Environment Application does not exist in the {GingerDicser.GetTermResValue(eTermResKey.TargetApplication)} of the Solution",
UTDescription = "MissingApplicationInTargetApplication",
- Details = $"{GingerDicser.GetTermResValue(eTermResKey.TargetApplication)} Platform cannot be 'NA'",
+ Details = $"Environment Application does not exist in the {GingerDicser.GetTermResValue(eTermResKey.TargetApplication)} of the Solution",
FixItHandler = null,
Status = eStatus.NeedFix,
IssueType = eType.Error,
@@ -81,8 +99,14 @@ private static void CheckIfTargetApplicationExistInEnvironment(string TargetAppl
Impact = "Execution probably will fail due to missing input value.",
ItemClass = GingerDicser.GetTermResValue(eTermResKey.TargetApplication),
Severity = eSeverity.High,
- Selected = true,
- CanAutoFix = eCanFix.No
+ Selected = false,
+ CanAutoFix = eCanFix.No,
+ HowToFix = $"""
+ Add this application in the {GingerDicser.GetTermResValue(eTermResKey.TargetApplication)}.
+
+ Note :- That if you want to add the application with the same name as in environment then please delete the existing application from the environment
+ and add a new one.
+ """
};
issues.Add(AB);
}
diff --git a/Ginger/GingerCoreNET/BPMN/Exceptions/BPMNExportationException.cs b/Ginger/GingerCoreNET/BPMN/Exceptions/BPMNExportationException.cs
index dd8dc49f30..255e28ed5a 100644
--- a/Ginger/GingerCoreNET/BPMN/Exceptions/BPMNExportationException.cs
+++ b/Ginger/GingerCoreNET/BPMN/Exceptions/BPMNExportationException.cs
@@ -1,4 +1,22 @@
-using System;
+#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 System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
diff --git a/Ginger/GingerCoreNET/BPMN/Exceptions/NoValidActivityFoundInGroupException.cs b/Ginger/GingerCoreNET/BPMN/Exceptions/NoValidActivityFoundInGroupException.cs
index 338655fb2b..ad2461fb92 100644
--- a/Ginger/GingerCoreNET/BPMN/Exceptions/NoValidActivityFoundInGroupException.cs
+++ b/Ginger/GingerCoreNET/BPMN/Exceptions/NoValidActivityFoundInGroupException.cs
@@ -1,4 +1,22 @@
-using GingerCore;
+#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 GingerCore;
using System;
using System.Collections.Generic;
using System.Linq;
diff --git a/Ginger/GingerCoreNET/BPMN/Exportation/RunSetExecutionHistoryToBPMNExporter.cs b/Ginger/GingerCoreNET/BPMN/Exportation/RunSetExecutionHistoryToBPMNExporter.cs
index 6d4e273e3f..9996c68bd8 100644
--- a/Ginger/GingerCoreNET/BPMN/Exportation/RunSetExecutionHistoryToBPMNExporter.cs
+++ b/Ginger/GingerCoreNET/BPMN/Exportation/RunSetExecutionHistoryToBPMNExporter.cs
@@ -1,4 +1,22 @@
-using AccountReport.Contracts.ResponseModels;
+#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 AccountReport.Contracts.ResponseModels;
using Amdocs.Ginger.Common.InterfacesLib;
using Amdocs.Ginger.Common;
using Amdocs.Ginger.CoreNET.LiteDBFolder;
diff --git a/Ginger/GingerCoreNET/DLLS/RQMExportStd.dll b/Ginger/GingerCoreNET/DLLS/RQMExportStd.dll
index e4f839cbe5..09183a9cfd 100644
Binary files a/Ginger/GingerCoreNET/DLLS/RQMExportStd.dll and b/Ginger/GingerCoreNET/DLLS/RQMExportStd.dll differ
diff --git a/Ginger/GingerCoreNET/DLLS/RQM_RepositoryStd.dll b/Ginger/GingerCoreNET/DLLS/RQM_RepositoryStd.dll
index e471455fc6..19ec881bde 100644
Binary files a/Ginger/GingerCoreNET/DLLS/RQM_RepositoryStd.dll and b/Ginger/GingerCoreNET/DLLS/RQM_RepositoryStd.dll differ
diff --git a/Ginger/GingerCoreNET/Drivers/CoreDrivers/Web/Selenium/SeleniumDriver.cs b/Ginger/GingerCoreNET/Drivers/CoreDrivers/Web/Selenium/SeleniumDriver.cs
index 3131bfb421..a34febade4 100644
--- a/Ginger/GingerCoreNET/Drivers/CoreDrivers/Web/Selenium/SeleniumDriver.cs
+++ b/Ginger/GingerCoreNET/Drivers/CoreDrivers/Web/Selenium/SeleniumDriver.cs
@@ -41,6 +41,7 @@ limitations under the License.
using GingerCoreNET.SolutionRepositoryLib.RepositoryObjectsLib.PlatformsLib;
using HtmlAgilityPack;
using InputSimulatorStandard;
+using Microsoft.VisualStudio.Services.Common;
using Newtonsoft.Json;
using OpenQA.Selenium;
using OpenQA.Selenium.Chrome;
@@ -3723,6 +3724,7 @@ private void SwitchFrame(ElementInfo EI)
string[] iframesPathes = spliter.Split(EI.Path);
foreach (string iframePath in iframesPathes)
{
+
Driver.SwitchTo().Frame(Driver.FindElement(By.XPath(iframePath)));
}
}
@@ -9847,6 +9849,12 @@ bool IWindowExplorer.TestElementLocators(ElementInfo EI, bool GetOutAfterFoundEl
return false;
}
}
+ catch (Exception ex)
+ {
+ EI.Locators.ForEach((locator) => locator.LocateStatus = ElementLocator.eLocateStatus.Failed);
+ Reporter.ToLog(eLogLevel.DEBUG, ex.Message, ex);
+ return false;
+ }
finally
{
foreach (ElementLocator el in EI.Locators.Where(x => x.LocateStatus == ElementLocator.eLocateStatus.Pending).ToList())
diff --git a/Ginger/GingerCoreNET/Drivers/WebServicesDriver/HttpWebClientUtils.cs b/Ginger/GingerCoreNET/Drivers/WebServicesDriver/HttpWebClientUtils.cs
index a4d6b3843d..26c2ca261b 100644
--- a/Ginger/GingerCoreNET/Drivers/WebServicesDriver/HttpWebClientUtils.cs
+++ b/Ginger/GingerCoreNET/Drivers/WebServicesDriver/HttpWebClientUtils.cs
@@ -122,37 +122,55 @@ private void SetAutoDecompression()
private void AddHeadersToClient()
{
- //Add request headers
- if (mAct.HttpHeaders.Any())
+ string param = string.Empty;
+ string value = string.Empty;
+ try
{
- for (int i = 0; i < mAct.HttpHeaders.Count(); i++)
+ //Add request headers
+ if (mAct.HttpHeaders.Any())
{
-
- var specialCharactersReg = new Regex("^[a-zA-Z0-9 ]*$");
- string param = mAct.HttpHeaders[i].Param;
- string value = mAct.HttpHeaders[i].ValueForDriver;
- if (!string.IsNullOrEmpty(param))
+ for (int i = 0; i < mAct.HttpHeaders.Count(); i++)
{
- if (param == "Content-Type")
- {
- ContentType = value;
- }
- else if (param.ToUpper() == "DATE")
- {
- Client.DefaultRequestHeaders.Date = System.DateTime.Parse(value);
- }
- else if (!specialCharactersReg.IsMatch(value))
+ var specialCharactersReg = new Regex("^[a-zA-Z0-9 ]*$");
+ param = mAct.HttpHeaders[i].Param;
+ value = mAct.HttpHeaders[i].ValueForDriver;
+ if (!string.IsNullOrEmpty(param))
{
- Client.DefaultRequestHeaders.TryAddWithoutValidation(param, value);
- }
- else
- {
- Client.DefaultRequestHeaders.Add(param, value);
+ if (param == "Content-Type")
+ {
+ ContentType = value;
+ }
+ else if (param.ToUpper() == "DATE")
+ {
+
+ Client.DefaultRequestHeaders.Date = System.DateTime.Parse(value);
+ }
+ else if (!specialCharactersReg.IsMatch(value))
+ {
+ Client.DefaultRequestHeaders.TryAddWithoutValidation(param, value);
+ }
+ else
+ {
+ Client.DefaultRequestHeaders.Add(param, value);
+ }
}
}
}
}
+ catch (FormatException Ex)
+ {
+ if (Ex.Message.Equals($"The format of value '{value}' is invalid."))
+ {
+ throw new Exception($"Value of '{param}' header is Invalid, please set valid value to header.", Ex);
+ }
+
+ throw;
+ }
+ catch (Exception)
+ {
+ throw;
+ }
}
private void SetProxySettings(string ProxySettings, bool useProxyServerSettings)
diff --git a/Ginger/GingerCoreNET/GeneralLib/General.cs b/Ginger/GingerCoreNET/GeneralLib/General.cs
index c6bb7a584a..e87fe2f8db 100644
--- a/Ginger/GingerCoreNET/GeneralLib/General.cs
+++ b/Ginger/GingerCoreNET/GeneralLib/General.cs
@@ -37,6 +37,7 @@ limitations under the License.
using System.Reflection;
using System.Security;
using System.Text.RegularExpressions;
+using System.Threading.Tasks;
using System.Xml;
namespace GingerCoreNET.GeneralLib
@@ -509,11 +510,12 @@ public static byte[] ImageToByteArray(Image img, System.Drawing.Imaging.ImageFor
}
}
- public static void DownloadImage(string ImageURL, Act act, bool IsAddToArtifact= false, string artifactName = "")
+ public static string DownloadImage(string ImageURL, Act act)
{
- String currImagePath = Act.GetScreenShotRandomFileName();
+ String currImagePath = string.Empty;
try
{
+ currImagePath = Act.GetScreenShotRandomFileName();
HttpResponseMessage response = SendRequest(ImageURL);
if (response.StatusCode == HttpStatusCode.OK)
{
@@ -524,20 +526,18 @@ public static void DownloadImage(string ImageURL, Act act, bool IsAddToArtifact=
fs.Close();
});
act.ScreenShotsNames.Add(Path.GetFileName(currImagePath));
- act.ScreenShots.Add(currImagePath);
- if(IsAddToArtifact)
- {
- Act.AddArtifactToAction(artifactName, act, currImagePath);
- }
+ act.ScreenShots.Add(currImagePath);
}
}
catch (Exception ex)
{
act.Error += ex.Message;
+ currImagePath = string.Empty;
}
+ return currImagePath;
}
- public static string DownloadBaselineImage(string ImageURL, Act act)
+ public static async Task DownloadBaselineImage(string ImageURL, Act act)
{
String currImagePath = Act.GetScreenShotRandomFileName();
try
@@ -547,19 +547,15 @@ public static string DownloadBaselineImage(string ImageURL, Act act)
{
using (var fs = new FileStream(currImagePath, FileMode.Create, FileAccess.Write, FileShare.None))
{
- response.Content.CopyToAsync(fs).ContinueWith(
- (discard) =>
- {
- fs.Close();
- });
+ await response.Content.CopyToAsync(fs);
+ fs.Close();
}
-
- return currImagePath;
}
}
catch (Exception ex)
{
- act.Error += ex.Message;
+ act.Error += ex.Message;
+ Reporter.ToLog(eLogLevel.ERROR, "unable to fetch the baseline image");
}
return currImagePath;
}
diff --git a/Ginger/GingerCoreNET/GingerCoreNET.csproj b/Ginger/GingerCoreNET/GingerCoreNET.csproj
index 658fb50787..bf7482b721 100644
--- a/Ginger/GingerCoreNET/GingerCoreNET.csproj
+++ b/Ginger/GingerCoreNET/GingerCoreNET.csproj
@@ -257,7 +257,7 @@
-
+
@@ -372,6 +372,12 @@
DLLS\QCRestClientStd.dll
+
+ DLLS\RQMExportStd.dll
+
+
+ DLLS\RQM_RepositoryStd.dll
+
DLLS\SikuliStandardNet.dll
@@ -706,6 +712,66 @@
Always
+
+ Always
+
+
+ Always
+
+
+ Always
+
+
+ Always
+
+
+ Always
+
+
+ Always
+
+
+ Always
+
+
+ Always
+
+
+ Always
+
+
+ Always
+
+
+ Always
+
+
+ Always
+
+
+ Always
+
+
+ Always
+
+
+ Always
+
+
+ Always
+
+
+ Always
+
+
+ Always
+
+
+ Always
+
+
+ Always
+
Always
@@ -784,9 +850,24 @@
Always
+
+ Always
+
Always
+
+ Always
+
+
+ Always
+
+
+ Always
+
+
+ Always
+
Always
@@ -1081,18 +1162,36 @@
Always
+
+ Always
+
+
+ Always
+
Always
Always
+
+ Always
+
+
+ Always
+
Always
Always
+
+ Always
+
+
+ Always
+
PreserveNewest
@@ -1111,6 +1210,9 @@
PreserveNewest
+
+ Always
+
Always
diff --git a/Ginger/GingerCoreNET/PlugInsLib/PluginsManager.cs b/Ginger/GingerCoreNET/PlugInsLib/PluginsManager.cs
index d13651fc09..22a47aa317 100644
--- a/Ginger/GingerCoreNET/PlugInsLib/PluginsManager.cs
+++ b/Ginger/GingerCoreNET/PlugInsLib/PluginsManager.cs
@@ -22,6 +22,7 @@ limitations under the License.
using Amdocs.Ginger.Common.Repository.PlugInsLib;
using Amdocs.Ginger.CoreNET.Drivers.CommunicationProtocol;
using Amdocs.Ginger.CoreNET.PlugInsLib;
+using log4net.Plugin;
using Newtonsoft.Json;
using System;
using System.Collections.Generic;
@@ -69,16 +70,24 @@ public class DriverInfo
public void AddPluginPackage(string folder)
{
- // Verify folder exist
- if (!System.IO.Directory.Exists(folder))
+ try
{
- throw new Exception("Plugin folder not found: " + folder);
- }
+ // Verify folder exist
+ if (!System.IO.Directory.Exists(folder))
+ {
+ throw new Exception("Plugin folder not found: " + folder);
+ }
- PluginPackage pluginPackage = new PluginPackage(folder);
- pluginPackage.PluginPackageOperations = new PluginPackageOperations(pluginPackage);
- pluginPackage.PluginPackageOperations.LoadPluginPackage(folder);
- mSolutionRepository.AddRepositoryItem(pluginPackage);
+ PluginPackage pluginPackage = new PluginPackage(folder);
+ pluginPackage.PluginPackageOperations = new PluginPackageOperations(pluginPackage);
+ pluginPackage.PluginPackageOperations.LoadPluginPackage(folder);
+ mSolutionRepository.AddRepositoryItem(pluginPackage);
+ }
+ catch (Exception ex)
+ {
+ Reporter.ToLog(eLogLevel.ERROR, "Error occurred while downloading/updating the Ginger Plugins packages", ex);
+ throw;
+ }
}
private void CurrentDomain_AssemblyLoad(object sender, AssemblyLoadEventArgs args)
diff --git a/Ginger/GingerCoreNET/Reports/Ginger-Web-Client/assets/artifacts/test.txt b/Ginger/GingerCoreNET/Reports/Ginger-Web-Client/assets/artifacts/test.txt
new file mode 100644
index 0000000000..e69de29bb2
diff --git a/Ginger/GingerCoreNET/Reports/Ginger-Web-Client/assets/layout/images/javascript.svg b/Ginger/GingerCoreNET/Reports/Ginger-Web-Client/assets/layout/images/javascript.svg
new file mode 100644
index 0000000000..af98b86abd
--- /dev/null
+++ b/Ginger/GingerCoreNET/Reports/Ginger-Web-Client/assets/layout/images/javascript.svg
@@ -0,0 +1,36 @@
+
+
+
+
\ No newline at end of file
diff --git a/Ginger/GingerCoreNET/Reports/Ginger-Web-Client/assets/layout/images/maximize_black.svg b/Ginger/GingerCoreNET/Reports/Ginger-Web-Client/assets/layout/images/maximize_black.svg
new file mode 100644
index 0000000000..bc8d3a6733
--- /dev/null
+++ b/Ginger/GingerCoreNET/Reports/Ginger-Web-Client/assets/layout/images/maximize_black.svg
@@ -0,0 +1,3 @@
+
diff --git a/Ginger/GingerCoreNET/Reports/Ginger-Web-Client/assets/layout/images/maximize_pink.svg b/Ginger/GingerCoreNET/Reports/Ginger-Web-Client/assets/layout/images/maximize_pink.svg
new file mode 100644
index 0000000000..4c9483a73d
--- /dev/null
+++ b/Ginger/GingerCoreNET/Reports/Ginger-Web-Client/assets/layout/images/maximize_pink.svg
@@ -0,0 +1,3 @@
+
diff --git a/Ginger/GingerCoreNET/Reports/Ginger-Web-Client/assets/layout/images/xml.svg b/Ginger/GingerCoreNET/Reports/Ginger-Web-Client/assets/layout/images/xml.svg
new file mode 100644
index 0000000000..655081a3c3
--- /dev/null
+++ b/Ginger/GingerCoreNET/Reports/Ginger-Web-Client/assets/layout/images/xml.svg
@@ -0,0 +1,21 @@
+
+
+
+
\ No newline at end of file
diff --git a/Ginger/GingerCoreNET/Reports/Ginger-Web-Client/index.html b/Ginger/GingerCoreNET/Reports/Ginger-Web-Client/index.html
index a177ada7a5..7b3e1612b7 100644
--- a/Ginger/GingerCoreNET/Reports/Ginger-Web-Client/index.html
+++ b/Ginger/GingerCoreNET/Reports/Ginger-Web-Client/index.html
@@ -20,5 +20,5 @@
-