Skip to content
New issue

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

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

Already on GitHub? Sign in to your account

Shared repository Variable duplicate fix, Re run Failed fix and Edge … #3976

Merged
merged 3 commits into from
Oct 28, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -929,10 +929,7 @@ public static Activity CopySharedRepositoryActivity(Activity srActivity, bool or
action.ParentGuid = action.Guid;
oldNewActionGuidList.Add(new(action.ParentGuid, action.Guid));
}
foreach (VariableBase variable in copy.Variables)
{
variable.ParentGuid = variable.Guid;
}

foreach (FlowControl fc in copy.Acts.SelectMany(a => a.FlowControls))
{
Guid targetGuid = fc.GetGuidFromValue();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -803,12 +803,19 @@ public override void StartDriver()
SetUnhandledPromptBehavior(EDOpts);
if (IsUserProfileFolderPathValid())
{
EDOpts.AddAdditionalEdgeOption("user-data-dir=", UserProfileFolderPath);
EDOpts.AddArgument($"--user-data-dir={UserProfileFolderPath}");
}
else
{
SetProxy(EDOpts);
}
if (SeleniumUserArgs != null)
{
foreach (string arg in SeleniumUserArgs)
{
EDOpts.AddArgument(arg);
}
}
SetCurrentPageLoadStrategy(EDOpts);
driverService = EdgeDriverService.CreateDefaultService();//CreateDefaultServiceFromOptions(EDOpts);
AddCustomDriverPath(driverService);
Expand Down
21 changes: 1 addition & 20 deletions Ginger/GingerCoreNET/Repository/SharedRepositoryOperations.cs
Original file line number Diff line number Diff line change
Expand Up @@ -104,14 +104,7 @@ public Boolean UploadItemToRepository(Context context, UploadItemSelection itemT
}
srAction.ParentGuid = Guid.Empty;
}
foreach (VariableBase srVariable in srActivity.Variables)
{
if (srVariable.ParentGuid != Guid.Empty)
{
srVariable.Guid = srVariable.ParentGuid;
}
srVariable.ParentGuid = Guid.Empty;
}

foreach (Act action in srActivity.Acts.Cast<Act>())
{
foreach (FlowControl fc in action.FlowControls)
Expand All @@ -135,10 +128,6 @@ public Boolean UploadItemToRepository(Context context, UploadItemSelection itemT
{
bfAction.ParentGuid = bfAction.Guid;
}
foreach (VariableBase bfVariable in bfActivity.Variables)
{
bfVariable.ParentGuid = bfVariable.Guid;
}
}
}

Expand Down Expand Up @@ -629,14 +618,6 @@ public static async Task SaveLinkedActivity(Activity LinkedActivity, string Excl
}
action.ParentGuid = Guid.Empty;
}
foreach (VariableBase variable in sharedActivity.Variables)
{
if (variable.ParentGuid != Guid.Empty)
{
variable.Guid = variable.ParentGuid;
}
variable.ParentGuid = Guid.Empty;
}
foreach (FlowControl fc in sharedActivity.Acts.SelectMany(a => a.FlowControls))
{
Guid targetGuid = fc.GetGuidFromValue();
Expand Down
10 changes: 5 additions & 5 deletions Ginger/GingerCoreNET/RunLib/CLILib/CLIHelper.cs
Original file line number Diff line number Diff line change
Expand Up @@ -351,7 +351,7 @@ private bool CheckforReRunConfig()
List<RunsetHLInfoResponse> accountReportRunset = accountReportApiHandler.GetRunsetExecutionDataFromCentralDB((Guid)mRunSetConfig.ReRunConfigurations.ReferenceExecutionID);
if (accountReportRunset != null && accountReportRunset.Count > 0)
{
if (accountReportRunset.Any(x => !x.Status.Equals(eRunStatus.Failed.ToString(), StringComparison.CurrentCultureIgnoreCase)))
if (accountReportRunset.Any(x => !x.Status.Equals(AccountReport.Contracts.Enum.eExecutionStatus.Failed.ToString(), StringComparison.CurrentCultureIgnoreCase)))
prashelke marked this conversation as resolved.
Show resolved Hide resolved
{
Reporter.ToLog(eLogLevel.INFO, string.Format("The Runset is already Passed or In_progress for provided reference execution id: {0}", mRunSetConfig.ReRunConfigurations.ReferenceExecutionID));
Result = false;
Expand All @@ -368,9 +368,9 @@ private bool CheckforReRunConfig()
List<AccountReportRunner> accountReportRunnerList = accountReportApiHandler.GetRunnerExecutionDataFromCentralDB((Guid)mRunSetConfig.ReRunConfigurations.ReferenceExecutionID);
if (accountReportRunnerList != null)
{
if (accountReportRunnerList.Any(x => x.RunStatus.Equals(eRunStatus.Failed)))
if (accountReportRunnerList.Any(x => x.RunStatus.Equals(AccountReport.Contracts.Enum.eExecutionStatus.Failed)))
{
var FailedRunnerGuidList = accountReportRunnerList.Where(x => x.RunStatus.Equals(eRunStatus.Failed)).Select(x => x.EntityId);
var FailedRunnerGuidList = accountReportRunnerList.Where(x => x.RunStatus.Equals(AccountReport.Contracts.Enum.eExecutionStatus.Failed)).Select(x => x.EntityId);
prashelke marked this conversation as resolved.
Show resolved Hide resolved
foreach (GingerRunner runner in mRunsetExecutor.RunSetConfig.GingerRunners)
{
if (!FailedRunnerGuidList.Contains(runner.Guid))
Expand All @@ -396,10 +396,10 @@ private bool CheckforReRunConfig()
List<AccountReportBusinessFlow> accountReportBusinessFlows = accountReportApiHandler.GetBusinessflowExecutionDataFromCentralDB((Guid)mRunSetConfig.ReRunConfigurations.ReferenceExecutionID);
if (accountReportBusinessFlows != null && accountReportBusinessFlows.Count > 0)
{
if (accountReportBusinessFlows.Any(x => x.RunStatus.Equals(eRunStatus.Failed)))
if (accountReportBusinessFlows.Any(x => x.RunStatus.Equals(AccountReport.Contracts.Enum.eExecutionStatus.Failed)))
{

var FailedBFGuidList = accountReportBusinessFlows.Where(x => x.RunStatus.Equals(eRunStatus.Failed)).Select(x => x.InstanceGUID);
var FailedBFGuidList = accountReportBusinessFlows.Where(x => x.RunStatus.Equals(AccountReport.Contracts.Enum.eExecutionStatus.Failed)).Select(x => x.InstanceGUID);
prashelke marked this conversation as resolved.
Show resolved Hide resolved
foreach (GingerRunner runner in mRunsetExecutor.RunSetConfig.GingerRunners)
{
foreach (BusinessFlowRun business in runner.BusinessFlowsRunList)
Expand Down
Loading