Fix scheduling functional tests

FEA: ItEr76S04BugFixing
This commit is contained in:
Manuel Rego Casasnovas 2012-07-18 16:33:56 +02:00
parent 630471871e
commit a911fc7137
2 changed files with 13 additions and 12 deletions

View file

@ -109,13 +109,13 @@ function planningCheckAssignedCriterion($criterion){
} }
function planningCheckIncorrectWorkerValidation(){ function planningCheckIncorrectWorkerValidation(){
_assertExists(_div("The resource's calendar has no available days starting from the start of the task.")); _assertExists(_div("Resource is not available from task's start"));
_assert(_isVisible(_div("The resource's calendar has no available days starting from the start of the task."))); _assert(_isVisible(_div("Resource is not available from task's start")));
} }
function planningCheckIncorrectCriterionValidation(){ function planningCheckIncorrectCriterionValidation(){
_assertExists(_div("There are no days available due to not satisfying the criteria. Another possibility is that the resources don't have days available due to their calendars.")); _assertExists(_div("There are no days available due to not satisfying the criteria. Another possibility is that the resources do not have days available due to their calendars."));
_assert(_isVisible(_div("There are no days available due to not satisfying the criteria. Another possibility is that the resources don't have days available due to their calendars."))); _assert(_isVisible(_div("There are no days available due to not satisfying the criteria. Another possibility is that the resources do not have days available due to their calendars.")));
} }
function deleteRequiredElements(){ function deleteRequiredElements(){

View file

@ -61,13 +61,14 @@ function templateTaskCreateTaskChild($name, $hours){
_setValue(_textbox(0, _near(_span("New task"))), $name); _setValue(_textbox(0, _near(_span("New task"))), $name);
_setValue(_textbox("z-intbox", _near(_span("Hours"))), $hours); _setValue(_textbox("z-intbox", _near(_span("Hours"))), $hours);
_click(_cell("Add")); _click(_cell("Add"));
_setValue(_textbox(21), "subTaskforTasks2");
_click(_image("ico_save.png")); _click(_image("ico_save.png"));
_click(_cell("OK")); _click(_cell("OK"));
_log("Create task tree", "custom1") _log("Create task tree", "custom1")
} }
function templateTaskCreateTemplate(){ function templateTaskCreateTemplate(){
_click(_span("C")); _click(_span("F"));
_click(_image("ico_derived1.png", _near(_span("Selected node:")))); _click(_image("ico_derived1.png", _near(_span("Selected node:"))));
_click(_cell("OK")); _click(_cell("OK"));
_click(_cell("Save & Continue")); _click(_cell("Save & Continue"));
@ -79,7 +80,7 @@ function templateTaskAssignTemplate($projectName, $taskName){
commonEditProject($projectName); commonEditProject($projectName);
_click(_cell("Add From Template")); _click(_cell("Add From Template"));
_click(_italic(0, _cell("z-caption-l"))); _click(_italic(0, _cell("z-caption-l")));
_click(_div("new container")); _click(_div("taskfortasks"));
_click(_cell("Create task")); _click(_cell("Create task"));
_click(_image("ico_save.png")); _click(_image("ico_save.png"));
_click(_cell("OK")); _click(_cell("OK"));
@ -87,7 +88,7 @@ function templateTaskAssignTemplate($projectName, $taskName){
} }
function templateTryDeleteAssigned($name){ function templateTryDeleteAssigned($name){
_click(_link("Project Templates")); _click(_link("Templates"));
_click(_image("ico_borrar1.png", _in(_cell(6, _near(_cell($name)))))); _click(_image("ico_borrar1.png", _in(_cell(6, _near(_cell($name))))));
_click(_cell("OK")); _click(_cell("OK"));
templateTaskTryDeleteValidation(); templateTaskTryDeleteValidation();
@ -98,11 +99,11 @@ function templateDeleteAllRequiredElements(){
commonDeleteProject($projectName); commonDeleteProject($projectName);
commonDeleteProject($projectTemplate); commonDeleteProject($projectTemplate);
templateDelete($projectTemplate); templateDelete($projectTemplate);
templateDelete("new container"); templateDelete("taskfortasks");
} }
function templateDelete($name){ function templateDelete($name){
commonDelete("Project Templates", $name, 6); commonDelete("Templates", $name, 6);
_log("Delete template", "custom1") _log("Delete template", "custom1")
} }
@ -129,8 +130,8 @@ function templateSaveValidation(){
} }
function templateTaskTryDeleteValidation(){ function templateTaskTryDeleteValidation(){
_assertExists(_div("This template can not be removed because it has applications.")); _assertExists(_div("Template cannot be removed because it has applications"));
_assert(_isVisible(_div("This template can not be removed because it has applications."))); _assert(_isVisible(_div("Template cannot be removed because it has applications")));
} }
/* test values */ /* test values */
@ -155,7 +156,7 @@ templateTaskCreateTemplate();
templateTaskAssignTemplate($projectName, $taskName); templateTaskAssignTemplate($projectName, $taskName);
templateTaskCheckAssignedValidation($totalTaskhours); templateTaskCheckAssignedValidation($totalTaskhours);
templateTryDeleteAssigned($projectTemplate); templateTryDeleteAssigned($projectTemplate);
templateTryDeleteAssigned("new container"); templateTryDeleteAssigned("taskfortasks");
templateDeleteAllRequiredElements(); templateDeleteAllRequiredElements();
commonLogout(); commonLogout();