From a911fc7137e4a1a6814c7e6aadc8de454d704a8a Mon Sep 17 00:00:00 2001 From: Manuel Rego Casasnovas Date: Wed, 18 Jul 2012 16:33:56 +0200 Subject: [PATCH] Fix scheduling functional tests FEA: ItEr76S04BugFixing --- .../scheduling/planning_criteria_test.sah | 8 ++++---- .../scheduling/templates_test.sah | 17 +++++++++-------- 2 files changed, 13 insertions(+), 12 deletions(-) diff --git a/scripts/functional-tests/scheduling/planning_criteria_test.sah b/scripts/functional-tests/scheduling/planning_criteria_test.sah index 2c4d5b446..a68b0d9a1 100644 --- a/scripts/functional-tests/scheduling/planning_criteria_test.sah +++ b/scripts/functional-tests/scheduling/planning_criteria_test.sah @@ -109,13 +109,13 @@ function planningCheckAssignedCriterion($criterion){ } function planningCheckIncorrectWorkerValidation(){ - _assertExists(_div("The resource's calendar has no available days starting from the start of the task.")); - _assert(_isVisible(_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("Resource is not available from task's start"))); } 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.")); - _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."))); + _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 do not have days available due to their calendars."))); } function deleteRequiredElements(){ diff --git a/scripts/functional-tests/scheduling/templates_test.sah b/scripts/functional-tests/scheduling/templates_test.sah index d1626e746..534d06171 100644 --- a/scripts/functional-tests/scheduling/templates_test.sah +++ b/scripts/functional-tests/scheduling/templates_test.sah @@ -61,13 +61,14 @@ function templateTaskCreateTaskChild($name, $hours){ _setValue(_textbox(0, _near(_span("New task"))), $name); _setValue(_textbox("z-intbox", _near(_span("Hours"))), $hours); _click(_cell("Add")); + _setValue(_textbox(21), "subTaskforTasks2"); _click(_image("ico_save.png")); _click(_cell("OK")); _log("Create task tree", "custom1") } function templateTaskCreateTemplate(){ - _click(_span("C")); + _click(_span("F")); _click(_image("ico_derived1.png", _near(_span("Selected node:")))); _click(_cell("OK")); _click(_cell("Save & Continue")); @@ -79,7 +80,7 @@ function templateTaskAssignTemplate($projectName, $taskName){ commonEditProject($projectName); _click(_cell("Add From Template")); _click(_italic(0, _cell("z-caption-l"))); - _click(_div("new container")); + _click(_div("taskfortasks")); _click(_cell("Create task")); _click(_image("ico_save.png")); _click(_cell("OK")); @@ -87,7 +88,7 @@ function templateTaskAssignTemplate($projectName, $taskName){ } function templateTryDeleteAssigned($name){ - _click(_link("Project Templates")); + _click(_link("Templates")); _click(_image("ico_borrar1.png", _in(_cell(6, _near(_cell($name)))))); _click(_cell("OK")); templateTaskTryDeleteValidation(); @@ -98,11 +99,11 @@ function templateDeleteAllRequiredElements(){ commonDeleteProject($projectName); commonDeleteProject($projectTemplate); templateDelete($projectTemplate); - templateDelete("new container"); + templateDelete("taskfortasks"); } function templateDelete($name){ - commonDelete("Project Templates", $name, 6); + commonDelete("Templates", $name, 6); _log("Delete template", "custom1") } @@ -129,8 +130,8 @@ function templateSaveValidation(){ } function templateTaskTryDeleteValidation(){ - _assertExists(_div("This template can not be removed because it has applications.")); - _assert(_isVisible(_div("This template can not be removed because it has applications."))); + _assertExists(_div("Template cannot be removed because it has applications")); + _assert(_isVisible(_div("Template cannot be removed because it has applications"))); } /* test values */ @@ -155,7 +156,7 @@ templateTaskCreateTemplate(); templateTaskAssignTemplate($projectName, $taskName); templateTaskCheckAssignedValidation($totalTaskhours); templateTryDeleteAssigned($projectTemplate); -templateTryDeleteAssigned("new container"); +templateTryDeleteAssigned("taskfortasks"); templateDeleteAllRequiredElements(); commonLogout();