Improve commonCriteriaCreate to allow create a criterion type with different criteria names
FEA: ItEr75S24ResourcesTests
This commit is contained in:
parent
7895184e80
commit
def7885364
4 changed files with 11 additions and 9 deletions
|
|
@ -394,11 +394,11 @@ function commonProgressDelete($name){
|
|||
* Common functions for Criteria
|
||||
*/
|
||||
|
||||
function commonCriteriaCreate($type){
|
||||
function commonCriteriaCreate($type, $list){
|
||||
commonCreate("Criteria");
|
||||
commonCriteriaForm($type);
|
||||
commonCriteriaForm($type, $list);
|
||||
commonSaveValidation("Criterion Type", $type);
|
||||
_log("Create a new criterion", "custom1");
|
||||
_log("Create criterion" + $type, "custom1");
|
||||
}
|
||||
|
||||
function commonCriteriaEdit($oldName, $newName, $cell){
|
||||
|
|
@ -410,13 +410,15 @@ function commonCriteriaEdit($oldName, $newName, $cell){
|
|||
_log("Edit a criterion", "custom1");
|
||||
}
|
||||
|
||||
function commonCriteriaForm($name){
|
||||
function commonCriteriaForm($name, $list){
|
||||
_setValue(_textbox(0, _near(_span("Name"))), $name);
|
||||
_click(_checkbox(0, _near(_div("Multiple values per resource"))));
|
||||
_click(_checkbox(0, _near(_div("Hierarchy"))));
|
||||
_click(_cell("OK"));
|
||||
_setValue(_textbox(0, _near(_span("New criterion"))), $name);
|
||||
_click(_cell("Add"));
|
||||
for (var $i = 0; $i < $list.length; $i++){
|
||||
_setValue(_textbox(0, _near(_span("New criterion"))), $list[$i]);
|
||||
_click(_cell("Add"));
|
||||
}
|
||||
_click(_cell("Save"));
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -110,7 +110,7 @@ function virtualWorkerCheckTabs(){
|
|||
}
|
||||
|
||||
function virtualWorkerCheckAssignedCriteria($workerName, $cell, $criterion){
|
||||
commonCriteriaCreate($criteriaName);
|
||||
commonCriteriaCreate($criteriaName, [$criteriaName]);
|
||||
commonResourceEditAssignedCriteriaForm("Virtual Workers Groups", $workerName, $cell, $criterion);
|
||||
commonCriteriaTryDeleteAssigned($criteriaName);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -105,7 +105,7 @@ function workerCheckTabs(){
|
|||
}
|
||||
|
||||
function workerCheckAssignedCriteria($workerName, $cell, $criterion){
|
||||
commonCriteriaCreate($criteriaName);
|
||||
commonCriteriaCreate($criteriaName, [$criteriaName]);
|
||||
commonResourceEditAssignedCriteriaForm("Workers", $workerName, $cell, $criterion);
|
||||
commonCriteriaTryDeleteAssigned($criteriaName);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -141,7 +141,7 @@ var $taskName2 = "taskForPlanning2";
|
|||
|
||||
commonLogin("admin", "admin");
|
||||
|
||||
commonCriteriaCreate($criterion);
|
||||
commonCriteriaCreate($criterion, [$criterion]);
|
||||
commonCalendarCreate($calendar);
|
||||
commonWorkerCreate($workerName, $workerName, $workerName);
|
||||
commonResourceEditAssignedCriteriaForm("Workers", $workerName, 5, $criterion);
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue