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 @@