Fix problems in the tests, created for some changes in work report form
FEA: ItEr75S24ResourcesTests
This commit is contained in:
parent
0687fc1eb8
commit
81ce80d9f4
3 changed files with 21 additions and 13 deletions
|
|
@ -293,6 +293,21 @@ function commonVirtualWorkerAcctionValidation($action){
|
|||
_assert(_isVisible(_span("Worker "+$action)));
|
||||
}
|
||||
|
||||
/*
|
||||
* Common functions for Work report
|
||||
*/
|
||||
|
||||
function commonWorkReportDelete ($name){
|
||||
commonDelete("Work Reports", $name, 4);
|
||||
commonWorkReportDeleteValidation();
|
||||
_log("Delete the work report", "custom1");
|
||||
}
|
||||
|
||||
function commonWorkReportDeleteValidation (){
|
||||
_assertExists(_span("Work report removed successfully"));
|
||||
_assert(_isVisible(_span("Work report removed successfully")));
|
||||
}
|
||||
|
||||
/*
|
||||
* Common functions for Companies
|
||||
*/
|
||||
|
|
|
|||
|
|
@ -85,9 +85,7 @@ function workHourAssign($hWorkNewName, $ModelName, $materialName, $materialDescr
|
|||
workHourTryDelete($hWorkNewName, "work report line");
|
||||
reportModelTryDelete($ModelName);
|
||||
commonTryDeleteProject("new project");
|
||||
commonDelete("Work Reports", $ModelName, 4);
|
||||
// Pending of a bug 1131
|
||||
// workReportDeleteValidation();
|
||||
commonWorkReportDelete($ModelName);
|
||||
commonDeleteProject("new project");
|
||||
commonMachineDelete($materialName);
|
||||
commonWorkReportModelDelete($ModelName);
|
||||
|
|
@ -145,7 +143,7 @@ function workReportForm($machine, $project, $workHour) {
|
|||
_setValue(_textbox(2, _near(_parentTable(_div("Date")))),$machine);
|
||||
_click(_italic(0, _near(_textbox(3, _near(_parentTable(_div("Date")))))));
|
||||
_click(_div($project+"[2]", _parentTable(_div("Project code[1]"))));
|
||||
_setValue(_textbox("z-intbox"),"8");
|
||||
_setValue(_textbox("z-textbox[1]"),"8");
|
||||
_setSelected(_select(2), $workHour);
|
||||
_click(_cell("Save"));
|
||||
_assertExists(_div("Work report saved"));
|
||||
|
|
|
|||
|
|
@ -114,7 +114,7 @@ function workReportEditForm($name){
|
|||
_click(_div($projectName+"[2]", _parentTable(_div("Project code[1]"))));
|
||||
_click(_cell("Save"));
|
||||
workReportHourValidation();
|
||||
_setValue(_textbox("z-intbox z-intbox-text-invalid"), "8");
|
||||
_setValue(_textbox("z-textbox z-textbox-text-invalid"), "8");
|
||||
_click(_cell("Save"));
|
||||
}
|
||||
|
||||
|
|
@ -132,11 +132,6 @@ function workReportLinesDeleteRequiredElements(){
|
|||
commonWorkReportModelDelete($workReportModelName2);
|
||||
}
|
||||
|
||||
function workReportDelete($modelName){
|
||||
commonDelete("Work Reports", $modelName, 4);
|
||||
_log("Delete the work report", "custom1")
|
||||
}
|
||||
|
||||
function DeleteRequiredElements(){
|
||||
commonWorkReportModelDelete($modelName);
|
||||
}
|
||||
|
|
@ -171,8 +166,8 @@ function workReportTaskValidation(){
|
|||
}
|
||||
|
||||
function workReportHourValidation(){
|
||||
_assertExists(_div("Hours cannot be null"));
|
||||
_assert(_isVisible(_div("Hours cannot be null")));
|
||||
_assertExists(_div("Effort must be greater than zero"));
|
||||
_assert(_isVisible(_div("Effort must be greater than zero")));
|
||||
}
|
||||
|
||||
/* test values */
|
||||
|
|
@ -192,7 +187,7 @@ workReportCreateWithoutElements();
|
|||
workReportCreateLineModel($workReportModelName);
|
||||
workReportCreateHeadingModel($workReportModelName2);
|
||||
workReportEdit($workReportModelName);
|
||||
workReportDelete($workReportModelName);
|
||||
commonWorkReportDelete($workReportModelName);
|
||||
workReportLinesDeleteRequiredElements();
|
||||
|
||||
commonLogout();
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue