Skip to content

Commit

Permalink
Merge pull request #3890 from Ginger-Automation/Releases/Beta
Browse files Browse the repository at this point in the history
Master update post 2024.4 Beta 1
  • Loading branch information
Maheshkale447 authored Aug 31, 2024
2 parents 2ae5bb7 + ef25e16 commit eb57951
Show file tree
Hide file tree
Showing 37 changed files with 426 additions and 254 deletions.
1 change: 0 additions & 1 deletion Ginger/.editorconfig
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,6 @@ csharp_style_prefer_extended_property_pattern = true:suggestion
csharp_style_var_for_built_in_types = true:none
csharp_style_var_when_type_is_apparent = true:none
csharp_style_var_elsewhere = true:none
csharp_indent_braces = false

[*.vb]
#### Naming styles ####
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -182,7 +182,7 @@
<Label Style="{StaticResource @InputFieldLabelStyle}">Certificate Path:</Label>
<StackPanel Orientation="Vertical">
<Actions:UCValueExpression x:Name="CertificatePath" Margin="0,0,0,0"/>
<CheckBox x:Name="DoNotCertificateImportFile" Content="Import Certificate file to Solution folder" ToolTip="If checked the selected certificate file will be imported to ~Documents\Certificates\" HorizontalAlignment="Left" Margin="0,1,0,0" Style="{StaticResource @InputCheckBoxStyle}"/>
<CheckBox x:Name="DoNotCertificateImportFile" Content="Import Certificate file to Solution folder" ToolTip="If checked the selected certificate file will be imported to ~Documents\Certificates\" HorizontalAlignment="Left" Margin="0,1,0,0" Style="{StaticResource @InputCheckBoxStyle}" Checked="DoNotCertificateImportFile_Checked"/>
</StackPanel>
<Label Style="{StaticResource @InputFieldLabelStyle}" Margin="0,5,0,0">Certificate Password:</Label>
<Actions:UCValueExpression x:Name="CertificatePasswordUCValueExpression" Margin="0,0,0,0"/>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,9 @@ limitations under the License.
using GingerCore.GeneralLib;
using System;
using System.Collections.Generic;
using System.IO;
using System.Linq;
using System.Text;
using System.Windows;
using System.Windows.Controls;

Expand All @@ -38,6 +40,7 @@ namespace Ginger.Actions.WebServices
/// </summary>
public partial class ActWebAPIEditPage : Page
{
private const string webServicesCertificatePath = @"Documents\WebServices\Certificates";
ActWebAPIBase mAct;
ApplicationAPIUtils.eWebApiType mWebApiType;

Expand All @@ -56,6 +59,13 @@ public ActWebAPIEditPage(ActWebAPIBase act)
InitializeComponent();
BindUiControls();
InitializeUIByActionType();

CertificatePath.ValueTextBox.LostFocus += ValueTextBox_LostFocus;
}

private void ValueTextBox_LostFocus(object sender, RoutedEventArgs e)
{
BrowseSSLCertificate(sender, e);
}

private void InitializeUIByActionType()
Expand Down Expand Up @@ -362,49 +372,65 @@ private void SecCollapsed(object sender, RoutedEventArgs e)

private void BrowseSSLCertificate(object sender, RoutedEventArgs e)
{
string SolutionFolder = WorkSpace.Instance.Solution.Folder.ToUpper();
if (CertificatePath.ValueTextBox.Text != null)
{
// replace Absolute file name with relative to solution
string FileName = CertificatePath.ValueTextBox.Text.ToUpper();
if (FileName.Contains(SolutionFolder))
{
FileName = FileName.Replace(SolutionFolder, @"~\");
}

CertificatePath.ValueTextBox.Text = FileName;
string certFilePath = CertificatePath.ValueTextBox.Text.Replace(@"~\", WorkSpace.Instance.Solution.Folder, StringComparison.InvariantCultureIgnoreCase);

bool ImportFileFlag = false;
Boolean.TryParse(mAct.GetInputParamValue(ActWebAPIBase.Fields.ImportCetificateFile), out ImportFileFlag);
if (ImportFileFlag)
if (IsToImportCertificateFile() && !certFilePath.Contains(webServicesCertificatePath, StringComparison.InvariantCultureIgnoreCase))
{
//TODO import Certificate File to solution folder
string targetPath = System.IO.Path.Combine(SolutionFolder, @"Documents\WebServices\Certificates");
if (!System.IO.Directory.Exists(targetPath))
string targetDirPath = Path.Combine(WorkSpace.Instance.Solution.Folder, webServicesCertificatePath);
string destFilePath = GetUniqueFilePath(Path.Combine(targetDirPath, Path.GetFileName(certFilePath)));

if (!Directory.Exists(targetDirPath))
{
System.IO.Directory.CreateDirectory(targetPath);
Directory.CreateDirectory(targetDirPath);
}

string destFile = System.IO.Path.Combine(targetPath, System.IO.Path.GetFileName(FileName));
File.Copy(certFilePath, destFilePath, true);
certFilePath = destFilePath;
}

int fileNum = 1;
string copySufix = "_Copy";
while (System.IO.File.Exists(destFile))
{
fileNum++;
string newFileName = System.IO.Path.GetFileNameWithoutExtension(destFile);
if (newFileName.IndexOf(copySufix) != -1)
{
newFileName = newFileName.Substring(0, newFileName.IndexOf(copySufix));
}
CertificatePath.ValueTextBox.Text = certFilePath.Replace(WorkSpace.Instance.Solution.Folder, @"~\", StringComparison.InvariantCultureIgnoreCase);
}
}

newFileName = newFileName + copySufix + fileNum.ToString() + System.IO.Path.GetExtension(destFile);
destFile = System.IO.Path.Combine(targetPath, newFileName);
}
private bool IsToImportCertificateFile()
{
bool.TryParse(mAct.GetInputParamValue(ActWebAPIBase.Fields.ImportCetificateFile), out var importFileFlag);
return importFileFlag;
}

System.IO.File.Copy(FileName, destFile, true);
CertificatePath.ValueTextBox.Text = @"~\Documents\WebServices\Certificates\" + System.IO.Path.GetFileName(destFile);
private static string GetUniqueFilePath(string destinationFilePath)
{
int fileNum = 1;
string copySufix = "_copy";
string targetDirPath = Path.GetDirectoryName(destinationFilePath);
string fileNameWithoutExt = Path.GetFileNameWithoutExtension(destinationFilePath);
while (File.Exists(destinationFilePath))
{
fileNum++;
if (fileNameWithoutExt.Contains(copySufix, StringComparison.CurrentCulture))
{
fileNameWithoutExt = fileNameWithoutExt.Substring(0, fileNameWithoutExt.IndexOf(copySufix));
}
StringBuilder sb = new StringBuilder();
sb.Append(fileNameWithoutExt);
sb.Append(copySufix);
sb.Append(fileNum);
sb.Append(Path.GetExtension(destinationFilePath));

fileNameWithoutExt = sb.ToString();
destinationFilePath = Path.Combine(targetDirPath, fileNameWithoutExt);
}

return destinationFilePath;
}

private void DoNotCertificateImportFile_Checked(object sender, RoutedEventArgs e)
{
if (IsToImportCertificateFile() && ((CheckBox)sender).IsLoaded)
{
BrowseSSLCertificate(sender, e);
}
}

Expand Down Expand Up @@ -642,6 +668,5 @@ private void xViewRawRequestBtn_Click(object sender, RoutedEventArgs e)
}
Reporter.ToUser(eUserMsgKey.StaticErrorMessage, "Failed to load raw request preview, see log for details.");
}

}
}
}
15 changes: 10 additions & 5 deletions Ginger/Ginger/Actions/ActionsListViewPage.xaml.cs
Original file line number Diff line number Diff line change
Expand Up @@ -194,7 +194,7 @@ private void SetListView()
mActionsListHelper.ActionListItemEvent += MActionListItemInfo_ActionListItemEvent;

mActionsListView.SetDefaultListDataTemplate(mActionsListHelper);

mActionsListView.ListSelectionMode = SelectionMode.Extended;

mActionsListView.PreviewDragItem += listActions_PreviewDragItem;
Expand All @@ -204,10 +204,6 @@ private void SetListView()
// Enable Virtualization for Actions ListView to improve the loading time/performance
mActionsListView.List.SetValue(ScrollViewer.CanContentScrollProperty, true);

if (mPageViewMode == Ginger.General.eRIPageViewMode.View || mPageViewMode == Ginger.General.eRIPageViewMode.ViewAndExecute)
{
mActionsListView.IsDragDropCompatible = false;
}
}
else
{
Expand All @@ -219,6 +215,15 @@ private void SetListView()
}
}

if (mPageViewMode == Ginger.General.eRIPageViewMode.View || mPageViewMode == Ginger.General.eRIPageViewMode.ViewAndExecute)
{
mActionsListView.IsDragDropCompatible = false;
}
else
{
mActionsListView.IsDragDropCompatible = true;
}

if (mActivity != null)
{
//update actions platform
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -181,6 +181,7 @@ private void BrowseButton_Click(object sender, RoutedEventArgs e)
System.IO.Directory.CreateDirectory(filePath);
}
}

if (General.SetupBrowseFile(new System.Windows.Forms.OpenFileDialog()
{
Filter = upperFileType + " Files (*." + fileType + ")|*." + fileType + "|All Files (*.*)|*.*",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -31,9 +31,11 @@ limitations under the License.
using GingerCore;
using GingerCore.Drivers;
using GingerCore.GeneralLib;
using GingerCoreNET.SolutionRepositoryLib.RepositoryObjectsLib.PlatformsLib;
using GingerWPF.UserControlsLib.UCTreeView;
using System;
using System.ComponentModel;
using System.Linq;
using System.Windows;
using System.Windows.Controls;

Expand Down Expand Up @@ -110,7 +112,8 @@ public POMNavPage(Context context)

private void ConfigurePOMPage()
{
ApplicationPOMsTreeItem mPOMsRoot = new ApplicationPOMsTreeItem(WorkSpace.Instance.SolutionRepository.GetRepositoryItemRootFolder<ApplicationPOMModel>());
ApplicationPlatform? activityAppPlatform = WorkSpace.Instance.Solution.ApplicationPlatforms.FirstOrDefault(ap => string.Equals(ap.AppName, mContext.Activity.TargetApplication));
ApplicationPOMsTreeItem mPOMsRoot = new ApplicationPOMsTreeItem(WorkSpace.Instance.SolutionRepository.GetRepositoryItemRootFolder<ApplicationPOMModel>(), activityAppPlatform);
mItemTypeRootNode = mPOMsRoot;
mPOMPage = new SingleItemTreeViewSelectionPage("Page Object Models", eImageType.ApplicationPOMModel, mItemTypeRootNode, SingleItemTreeViewSelectionPage.eItemSelectionType.Multi, true,
new Tuple<string, string>(nameof(ApplicationPOMModel.TargetApplicationKey) + "." + nameof(ApplicationPOMModel.TargetApplicationKey.ItemName), mContext.Activity.TargetApplication),
Expand Down
4 changes: 2 additions & 2 deletions Ginger/Ginger/Ginger.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -707,7 +707,7 @@
<PackageReference Include="Ginger.AccountReport.Contracts" Version="2024.4.1" />
<PackageReference Include="Ginger.ExecuterService.Contracts" Version="24.3.1" />
<PackageReference Include="HtmlAgilityPack" Version="1.11.58" />
<PackageReference Include="LiteDB" Version="5.0.17" />
<PackageReference Include="LiteDB" Version="5.0.21" />
<PackageReference Include="LiveCharts.Wpf.NetCore3" Version="0.9.7" />
<PackageReference Include="log4net" Version="2.0.15" />
<PackageReference Include="Magick.NET-Q16-AnyCPU" Version="13.5.0" />
Expand All @@ -723,7 +723,7 @@
<PackageReference Include="Syncfusion.Shared.WPF" Version="20.1.0.55" />
<PackageReference Include="System.Data.OleDb" Version="8.0.0" />
<PackageReference Include="System.Data.SqlClient" Version="4.8.6" />
<PackageReference Include="System.Drawing.Common" Version="8.0.1" />
<PackageReference Include="System.Drawing.Common" Version="8.0.7" />
<PackageReference Include="System.Management" Version="8.0.0" />
<PackageReference Include="System.Web.Services.Description" Version="8.0.0" />
<PackageReference Include="System.Windows.Forms.DataVisualization" Version="1.0.0-prerelease.20110.1" />
Expand Down
25 changes: 15 additions & 10 deletions Ginger/Ginger/SolutionWindows/AccessibilityRulePage.xaml.cs
Original file line number Diff line number Diff line change
Expand Up @@ -110,25 +110,30 @@ private void CheckBox_Click(object sender, RoutedEventArgs e)
// Do something with data, for example:
data.Active = checkBox.IsChecked ?? false;
mAccessibilityConfiguration.StartDirtyTracking();
if (!data.Active)
if (!mAccessibilityConfiguration.ExcludedRules.Any())
{
if(!mAccessibilityConfiguration.ExcludedRules.Any())
{
GingerCoreNET.GeneralLib.General.CreateDefaultAccessiblityconfiguration();
mAccessibilityConfiguration = WorkSpace.Instance.SolutionRepository.GetFirstRepositoryItem<AccessibilityConfiguration>();
mAccessibilityConfiguration.ExcludedRules = mAccessibilityConfiguration.ExcludedRules != null ? mAccessibilityConfiguration.ExcludedRules : new();
}
GingerCoreNET.GeneralLib.General.CreateDefaultAccessiblityconfiguration();
mAccessibilityConfiguration = WorkSpace.Instance.SolutionRepository.GetFirstRepositoryItem<AccessibilityConfiguration>();
mAccessibilityConfiguration.ExcludedRules = mAccessibilityConfiguration.ExcludedRules != null ? mAccessibilityConfiguration.ExcludedRules : new();
}

if (!mAccessibilityConfiguration.ExcludedRules.Any(x => x.Equals(data.RuleID)))
if (!data.Active)
{
if (!mAccessibilityConfiguration.ExcludedRules.Any(x => x.RuleID.Equals(data.RuleID,StringComparison.CurrentCultureIgnoreCase)))
{
mAccessibilityConfiguration.ExcludedRules.Add(data);
}
}
else
{
if (mAccessibilityConfiguration.ExcludedRules.Any(x => x.Equals(data.RuleID)))
if (mAccessibilityConfiguration.ExcludedRules.Any(x => x.RuleID.Equals(data.RuleID,StringComparison.CurrentCultureIgnoreCase)))
{
mAccessibilityConfiguration.ExcludedRules.Remove(data);
AccessibilityRuleData itemToRemove = mAccessibilityConfiguration.ExcludedRules.FirstOrDefault(x => x.RuleID.Equals(data.RuleID, StringComparison.CurrentCultureIgnoreCase));
if (itemToRemove != null)
{
mAccessibilityConfiguration.ExcludedRules.Remove(itemToRemove);
}

}
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -39,12 +39,17 @@ public class ApplicationPOMsTreeItem : NewTreeViewItemBase, ITreeViewItem
public RepositoryFolder<ApplicationPOMModel> mPOMModelFolder;
private POMModelsPage mPOMModelsPage;
private ObservableList<ApplicationPOMModel> mChildPoms = null;
private ApplicationPlatform? _applicationPlatform;

public ApplicationPOMsTreeItem(RepositoryFolder<ApplicationPOMModel> POMModelFolder)
{
mPOMModelFolder = POMModelFolder;
}

public ApplicationPOMsTreeItem(RepositoryFolder<ApplicationPOMModel> POMModelFolder, ApplicationPlatform? applicationPlatform) : this(POMModelFolder)
{
_applicationPlatform = applicationPlatform;
}
Object ITreeViewItem.NodeObject()
{
return mPOMModelFolder;
Expand Down Expand Up @@ -150,7 +155,11 @@ internal void AddEmptyPOM(object sender, RoutedEventArgs e)
if (GingerCore.General.GetInputWithValidation("Add Page Object Model", "Page Object Model Name:", ref NewPOMName, null, false, emptyPOM))
{
ObservableList<ApplicationPlatform> TargetApplications = GingerCore.General.ConvertListToObservableList(WorkSpace.Instance.Solution.ApplicationPlatforms.Where(x => ApplicationPOMModel.PomSupportedPlatforms.Contains(x.Platform)).ToList());
if (TargetApplications != null && TargetApplications.Count > 0)
if (_applicationPlatform != null)
{
emptyPOM.TargetApplicationKey = _applicationPlatform.Key;
}
else if (TargetApplications != null && TargetApplications.Count > 0)
{
emptyPOM.TargetApplicationKey = TargetApplications[0].Key;
}
Expand Down
7 changes: 1 addition & 6 deletions Ginger/GingerCore/ALM/RQM/ImportFromRQM.cs
Original file line number Diff line number Diff line change
Expand Up @@ -1239,12 +1239,7 @@ public static ObservableList<ExternalItemFieldBase> GetOnlineItemFieldsForDefect
try
{
//TODO: Populate list fields with CategoryTypes
populatedValue = "Starting fields retrieve process... ";
if (bw != null)
{
bw.ReportProgress(totalValues, populatedValue);
}

PopulateLogOnFieldMappingwinodw(bw, "Starting fields retrieve process... ");
string defectfieldurl = ALMCore.DefaultAlmConfig.DefectFieldAPI;
RqmResponseData categoryType = RQM.RQMConnect.Instance.RQMRep.GetRqmResponse(loginData, new Uri(defectfieldurl),true);
XmlDocument categoryTypeList = new XmlDocument();
Expand Down
Binary file modified Ginger/GingerCore/DLLs/RQMExportStd.dll
Binary file not shown.
Binary file modified Ginger/GingerCore/DLLs/RQM_RepositoryStd.dll
Binary file not shown.
2 changes: 1 addition & 1 deletion Ginger/GingerCore/GingerCore.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -621,7 +621,7 @@
<PackageReference Include="System.ComponentModel.Annotations" Version="5.0.0" />
<PackageReference Include="System.Data.DataSetExtensions" Version="4.5.0" />
<PackageReference Include="System.Drawing.Common">
<Version>8.0.1</Version>
<Version>8.0.7</Version>
</PackageReference>
<PackageReference Include="System.Globalization">
<Version>4.3.0</Version>
Expand Down
10 changes: 5 additions & 5 deletions Ginger/GingerCoreCommon/GingerCoreCommon.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -11,16 +11,16 @@
<TargetFramework>net8.0</TargetFramework>
<RootNamespace>Amdocs.Ginger.Common</RootNamespace>

<AssemblyVersion>24.4.0.1</AssemblyVersion>
<FileVersion>24.4.0.1</FileVersion>
<AssemblyVersion>24.4.1.0</AssemblyVersion>
<FileVersion>24.4.1.0</FileVersion>

<PackageId>Ginger.Core.Common</PackageId>
<Authors>Amdocs</Authors>
<Company>Amdocs</Company>
<Product>Ginger by Amdocs</Product>
<Copyright>Copyright © 2014-2024 European Support Limited</Copyright>

<Version>24.4.0.1</Version>
<Version>24.4.1.0</Version>
<Title>Ginger Core Common</Title>
<GeneratePackageOnBuild>True</GeneratePackageOnBuild>
</PropertyGroup>
Expand All @@ -35,14 +35,14 @@

<ItemGroup>
<PackageReference Include="Ginger.External" Version="1.0.0" />
<PackageReference Include="LiteDB" Version="5.0.17" />
<PackageReference Include="LiteDB" Version="5.0.21" />
<PackageReference Include="Microsoft.CodeAnalysis" Version="3.7.0" />
<PackageReference Include="Microsoft.CodeAnalysis.Common" Version="3.7.0" />
<PackageReference Include="Microsoft.CodeAnalysis.CSharp" Version="3.7.0" />
<PackageReference Include="Microsoft.CSharp" Version="4.7.0" />
<PackageReference Include="Newtonsoft.Json" Version="13.0.3" />
<PackageReference Include="NJsonSchema" Version="9.13.10" />
<PackageReference Include="System.Drawing.Common" Version="8.0.1" />
<PackageReference Include="System.Drawing.Common" Version="8.0.7" />
<PackageReference Include="System.Resources.Extensions" Version="8.0.0" />
</ItemGroup>

Expand Down
Loading

0 comments on commit eb57951

Please sign in to comment.