Index: System tests/AutomatedSystemTests/AutomatedSystemTests/Modules/ActionsDocumentView/ValidateSectionResultAsCombinationContributionsInFMResultView.cs
===================================================================
diff -u -r7fec103bc9d7e1840bc248d72addd1685799b4bb -r70c06d4581be84be61f501b70704c8cb25f18bc1
--- System tests/AutomatedSystemTests/AutomatedSystemTests/Modules/ActionsDocumentView/ValidateSectionResultAsCombinationContributionsInFMResultView.cs (.../ValidateSectionResultAsCombinationContributionsInFMResultView.cs) (revision 7fec103bc9d7e1840bc248d72addd1685799b4bb)
+++ System tests/AutomatedSystemTests/AutomatedSystemTests/Modules/ActionsDocumentView/ValidateSectionResultAsCombinationContributionsInFMResultView.cs (.../ValidateSectionResultAsCombinationContributionsInFMResultView.cs) (revision 70c06d4581be84be61f501b70704c8cb25f18bc1)
@@ -38,6 +38,16 @@
set { _jsonDataScenariosView = value; }
}
+
+ string _labelFM = "";
+ [TestVariable("3052acf7-896a-4e60-8e9e-634849f4cc8d")]
+ public string labelFM
+ {
+ get { return _labelFM; }
+ set { _labelFM = value; }
+ }
+
+
///
/// Constructs a new instance.
///
@@ -67,13 +77,8 @@
var headerRow =rows[0];
int indexColumnSectionName = GetIndex(headerRow, "Vak");
- int indexColumnCombinedProbability = GetIndex(headerRow, "Gedetailleerde toets per vak\r\nfaalkans");
- if (indexColumnCombinedProbability>0) {
- Report.Warn("Old Result View Windows. Using column with header containing 'Gedetailleerde toets per vak\r\nfaalkans'");
- } else {
- Report.Warn("New Results View. Using column with header containing 'mechanisme per doorsnede'");
- indexColumnCombinedProbability = GetIndex(headerRow, "mechanisme per doorsnede");
- }
+ int indexColumnCombinedProbability = GetIndexCombinedProbability(headerRow);
+
rows.RemoveAt(0);
foreach (var dataSection in dataSectionScenariosView) {
@@ -88,6 +93,27 @@
}
}
+ private int GetIndexCombinedProbability(Ranorex.Row row)
+ {
+ string queryOldResultTable = "Gedetailleerde toets per vak\r\nfaalkans";
+ string queryNewResultTable ="";
+ var newResultTableType1 = new List(){"STPH", "STBI"};
+ var newResultTableType2 = new List(){"HTKW", "BSKW"};
+ if (newResultTableType1.Contains(labelFM)) {
+ queryNewResultTable = "mechanisme per doorsnede";
+ }
+ else if(newResultTableType2.Contains(labelFM)) {
+ queryNewResultTable = "mechanisme per vak";
+ }
+ int indexColumnCombinedProbability = GetIndex(row, queryOldResultTable);
+ if (indexColumnCombinedProbability>0) {
+ Report.Warn($"Old Result View Windows. Using column with header containing {queryOldResultTable}");
+ } else {
+ Report.Warn($"New Results View. Using column with header containing '{queryNewResultTable}'");
+ indexColumnCombinedProbability = GetIndex(row, queryNewResultTable);
+ }
+ return indexColumnCombinedProbability;
+ }
private void ValidateSectionResult(DataSectionScenariosView data, string actualProb)
{
System.Globalization.CultureInfo currentCulture = CultureInfo.CurrentCulture;
Index: System tests/AutomatedSystemTests/AutomatedSystemTests/Script17.rxtst
===================================================================
diff -u -ra45fc884a9dd4952da3a8d8ad685db1a093ae48c -r70c06d4581be84be61f501b70704c8cb25f18bc1
--- System tests/AutomatedSystemTests/AutomatedSystemTests/Script17.rxtst (.../Script17.rxtst) (revision a45fc884a9dd4952da3a8d8ad685db1a093ae48c)
+++ System tests/AutomatedSystemTests/AutomatedSystemTests/Script17.rxtst (.../Script17.rxtst) (revision 70c06d4581be84be61f501b70704c8cb25f18bc1)
@@ -975,6 +975,12 @@
variableid="ec137b62-f031-4865-9b56-d28ed3a2ceb6"
variablename="jsonDataScenariosView">
+
+