Skip to content

Commit

Permalink
Merge branch 'master' into BugFix/38239-OKButtonOnRunnerConfig
Browse files Browse the repository at this point in the history
  • Loading branch information
Maheshkale447 committed Mar 27, 2024
2 parents 8d5a52e + dd556bb commit 3ff1ad2
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 13 deletions.
5 changes: 3 additions & 2 deletions Ginger/Ginger/UserControlsLib/MultiSelectComboBox.xaml.cs
Original file line number Diff line number Diff line change
Expand Up @@ -333,11 +333,12 @@ private void SetText()
if (this.SelectedItems != null)
{
StringBuilder displayText = new StringBuilder();
bool allSelected = _nodeList.Count(x => x.IsSelected) == _nodeList.Count - 1;
foreach (Node s in _nodeList)
{
if (s._ShowEnumDesc)
{
if (s.IsSelected && s._title == "All")
if (allSelected || (s.IsSelected && s._title == "All"))
{
displayText = new StringBuilder();
displayText.Append("All");
Expand All @@ -351,7 +352,7 @@ private void SetText()
}
else
{
if (s.IsSelected && s.Title == "All")
if (allSelected || (s.IsSelected && s.Title == "All"))
{
displayText = new StringBuilder();
displayText.Append("All");
Expand Down
21 changes: 10 additions & 11 deletions Ginger/GingerCoreNET/ActionsLib/UI/Web/ActAccessibilityTesting.cs
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,7 @@ limitations under the License.
using Newtonsoft.Json;
using OpenQA.Selenium;
using System;
using System.Collections;
using System.Collections.Generic;
using System.ComponentModel;
using System.IO;
Expand Down Expand Up @@ -744,8 +745,8 @@ public void AnalyzerAccessibility(IWebDriver Driver,IWebElement element)
{
Directory.CreateDirectory(folderPath);
}
string DatetimeFormate = DateTime.Now.ToString("dd_MM_yyyy_HH_mm_ss_fff");
string reportname = $"{ItemName}{DatetimeFormate}_AccessibilityReport.html";
string DatetimeFormate = DateTime.Now.ToString("ddMMyyyy_HHmmssfff");
string reportname = $"{ItemName}_AccessibilityReport_{DatetimeFormate}.html";
path = $"{folderPath}{Path.DirectorySeparatorChar}{reportname}";
}

Expand Down Expand Up @@ -824,23 +825,20 @@ public void SetAxeResultToAction(AxeResult axeResult)
{
bool hasAnyViolations = axeResult.Violations.Any();
bool ActionResult = true;

IEnumerable<string> AcceptableSeverity = Enumerable.Empty<string>().ToList();
if (GetInputParamValue(ActAccessibilityTesting.Fields.Analyzer) == ActAccessibilityTesting.eAnalyzer.ByStandard.ToString() && SeverityList != null && SeverityList.Any())
{
List<string> sevritylist = SeverityList.Select(x => x.Value.ToLower()).ToList();
List<string> Violationsevrity = axeResult.Violations.Any() ? axeResult.Violations.Select(x => x.Impact.ToLower()).ToList() : new List<string>();
foreach (string severity in sevritylist)
{
ActionResult = !Violationsevrity.Any(y => y.Equals(severity));
}
AcceptableSeverity = SeverityList.Select(x => x.Value.ToLower()).ToList();
IEnumerable<string> Violationseverity = axeResult.Violations.Any() ? axeResult.Violations.Select(x => x.Impact.ToLower()) : Enumerable.Empty<string>().ToList();
ActionResult = Violationseverity.Intersect(AcceptableSeverity).Any();
}
else if (GetInputParamValue(ActAccessibilityTesting.Fields.Analyzer) == ActAccessibilityTesting.eAnalyzer.BySeverity.ToString() && SeverityList != null && SeverityList.Any())
{
List<string> sevritylist = SeverityList.Select(x => x.Value.ToLower()).ToList();
List<string> Violationsevrity = axeResult.Violations.Any() ? axeResult.Violations.Select(x => x.Impact.ToLower()).ToList() : new List<string>();
IEnumerable<string> Violationseverity = axeResult.Violations.Any() ? axeResult.Violations.Select(x => x.Impact.ToLower()) : Enumerable.Empty<string>().ToList();
foreach (string severity in sevritylist)
{
ActionResult = Violationsevrity.Any(y => y.Equals(severity));
ActionResult = Violationseverity.Any(y => y.Equals(severity));
}
}
var jsonresponse = JsonConvert.SerializeObject(axeResult, Newtonsoft.Json.Formatting.Indented);
Expand All @@ -859,6 +857,7 @@ public void SetAxeResultToAction(AxeResult axeResult)
Error = $"Accessibility testing resulted in violations.";
AddOrUpdateReturnParamActual(ParamName: "ViolationCount", ActualValue: axeResult.Violations.Length.ToString());
AddOrUpdateReturnParamActual(ParamName: "ViolationList", ActualValue: String.Join(",", axeResult.Violations.Select(x => x.Id)));
AddOrUpdateReturnParamActual(ParamName: "AcceptableSeverity", ActualValue: string.Join(",", AcceptableSeverity));
int violatedNodeIndex = 0;
foreach (AxeResultItem violation in axeResult.Violations)
{
Expand Down
2 changes: 2 additions & 0 deletions Ginger/GingerCoreNET/RunLib/AgentOperations.cs
Original file line number Diff line number Diff line change
Expand Up @@ -355,6 +355,8 @@ public void SetDriverConfiguration()
}
ValueExpression ve = new ValueExpression(Agent.ProjEnvironment, Agent.BusinessFlow, Agent.DSList);

ve.DecryptFlag = true;

if (Agent.AgentType == Agent.eAgentType.Service)
{
SetServiceConfiguration();
Expand Down

0 comments on commit 3ff1ad2

Please sign in to comment.