diff --git a/scripts/functional-tests/common_functions.sah b/scripts/functional-tests/common_functions.sah index 46d5a7742..ef7a90a82 100644 --- a/scripts/functional-tests/common_functions.sah +++ b/scripts/functional-tests/common_functions.sah @@ -199,8 +199,8 @@ function commonResourceEmptyCategoryName(){ } function commonResourceEmptyCategoryDate(){ -_assertExists(_div("The init date cannot be empty")); -_assert(_isVisible(_div("The init date cannot be empty"))); +_assertExists(_div("Start date cannot be empty")); +_assert(_isVisible(_div("Start date cannot be empty"))); } function commonResourceTryDeleteAssignedValidation(){ @@ -273,7 +273,7 @@ function commonVirtualWorkerCreate($name) { } function commonVirtualWorkerGoToCreate (){ - _click(_link("Virtual Workers Groups")); + _click(_link("Virtual Workers")); _click(_cell("Create Virtual Worker")); } @@ -283,7 +283,7 @@ function commonVirtualWorkerForm($name) { } function commonVirtualWorkerDelete($name){ - commonDelete("Virtual Workers Groups", $name, 3); + commonDelete("Virtual Workers", $name, 3); commonVirtualWorkerAcctionValidation("deleted"); _log("Delete the virtual worker", "custom1"); } @@ -324,11 +324,11 @@ function commonCompanyForm($name, $ID) { _setValue(_textbox(0, _near(_span("Company ID:"))), $ID); _click(_checkbox(0, _near(_span("Client:")))); _click(_checkbox(0, _near(_span("Subcontractor:")))); - _setValue(_textbox(0, _near(_span("User:"))), "wswriter"); + _setValue(_textbox(0, _near(_span("User:"))), "wssubcontracting"); _click(_checkbox(0, _near(_span("Interacts with applications:")))); _setValue(_textbox(0, _near(_span("Application URI:"))), "http://localhost:8080/libreplan-webapp/"); - _setValue(_textbox(0, _near(_span("Our company login:"))), "wswriter"); - _setValue(_textbox(0, _near(_span("Our company password:"))), "wswriter"); + _setValue(_textbox(0, _near(_span("Our company username:"))), "wssubcontracting"); + _setValue(_textbox(0, _near(_span("Company password:"))), "wssubcontracting"); _click(_cell("Save")); } @@ -488,8 +488,8 @@ function commonCriteriaDelete($criteriaName){ function commonCriteriaTryDeleteAssigned($criteriaName){ _click(_link("Criteria")); _click(_image("ico_borrar1.png", _in(_cell(4, _near(_cell($criteriaName)))))); - _assertExists(_span("This criterion type cannot be deleted because it has assignments to projects or resources")); - _assert(_isVisible(_span("This criterion type cannot be deleted because it has assignments to projects or resources"))); + _assertExists(_span("This criterion type cannot be deleted because it is assigned to projects or resources")); + _assert(_isVisible(_span("This criterion type cannot be deleted because it is assigned to projects or resources"))); _log("Do not allow criteria because it's assigned", "custom1"); } diff --git a/scripts/functional-tests/resources/companies_test.sah b/scripts/functional-tests/resources/companies_test.sah index 1161ce71d..699bbb69d 100644 --- a/scripts/functional-tests/resources/companies_test.sah +++ b/scripts/functional-tests/resources/companies_test.sah @@ -58,13 +58,13 @@ function companyEdit($oldName, $newName, $cell) { */ function companyDuplicatedName(){ - _assertExists(_span("checkConstraintUniqueName: company name has to be unique. It is already used")); - _assert(_isVisible(_span("checkConstraintUniqueName: company name has to be unique. It is already used"))); + _assertExists(_span("company name must be unique. Company name already used")); + _assert(_isVisible(_span("company name must be unique. Company name already used"))); } function companyDuplicatedId(){ - _assertExists(_span("checkConstraintUniqueNif: Company ID already used. It has to be be unique")); - _assert(_isVisible(_span("checkConstraintUniqueNif: Company ID already used. It has to be be unique"))); + _assertExists(_span("Company ID already used. It must be unique")); + _assert(_isVisible(_span("Company ID already used. It must be unique"))); } function companyEmptyField(){ diff --git a/scripts/functional-tests/resources/machines_test.sah b/scripts/functional-tests/resources/machines_test.sah index c9fbabaeb..7bc3fc5f2 100644 --- a/scripts/functional-tests/resources/machines_test.sah +++ b/scripts/functional-tests/resources/machines_test.sah @@ -132,7 +132,7 @@ function machineAssignProjectForm($machine){ _click(_div($machine)); _click(_cell($machine)); _click(_cell("Add")); - _setValue(_textbox(0, _near(_span("Sum of all rows"))), "1"); + _setValue(_textbox(0, _near(_span("Total"))), "1"); _click(_row("Accept[2]")); _assertExists(_div("box standard-task assigned")); _log("Task assigned", "custom1"); @@ -174,13 +174,13 @@ function criteriaForm($name){ * */ function machineNameEmptyValidation(){ - _assertExists(_div("Name cannot be empty")); - _assert(_isVisible(_div("Name cannot be empty"))); + _assertExists(_div("cannot be empty")); + _assert(_isVisible(_div("cannot be empty"))); } function machineDescriptionEmptyValidation(){ - _assertExists(_div("Description cannot be empty")); - _assert(_isVisible(_div("Description cannot be empty"))); + _assertExists(_div("cannot be empty")); + _assert(_isVisible(_div("cannot be empty"))); } function machineEmptyFields(){ @@ -189,8 +189,8 @@ _assert(_isVisible(_div("This field may not be empty or contain only spaces."))) } function machineTryDeleteAssignedValidation(){ - _assertExists(_span("This machine cannot be deleted because it has assignments to projects or imputed hours")); - _assert(_isVisible(_span("This machine cannot be deleted because it has assignments to projects or imputed hours"))); + _assertExists(_span("Machine cannot be deleted. Machine is allocated to a project or contains imputed hours")); + _assert(_isVisible(_span("Machine cannot be deleted. Machine is allocated to a project or contains imputed hours"))); } /* test values */ diff --git a/scripts/functional-tests/resources/search_resources_test.sah b/scripts/functional-tests/resources/search_resources_test.sah index cc783a611..7d8e29ed6 100644 --- a/scripts/functional-tests/resources/search_resources_test.sah +++ b/scripts/functional-tests/resources/search_resources_test.sah @@ -110,10 +110,10 @@ searchResourceCheckFilter($workerList); for (var $i = 0; $i < $virtualWorkerList.length; $i++){ commonVirtualWorkerCreate($virtualWorkerList[$i][0], $virtualWorkerList[$i][1]); - commonResourceEditAssignedCriteriaForm("Virtual Workers Groups", $virtualWorkerList[$i][0], 3, $virtualWorkerList[$i][1]); + commonResourceEditAssignedCriteriaForm("Virtual Workers", $virtualWorkerList[$i][0], 3, $virtualWorkerList[$i][1]); _log("Create a virtual worker", "custom1"); } -commonResourceFilter("Virtual Workers Groups",$criteriaType1, $criteriaType1List[0]); +commonResourceFilter("Virtual Workers",$criteriaType1, $criteriaType1List[0]); searchResourceCheckFilter($virtualWorkerList); searchResourcesDeleteWorkerElements($workerList, "Worker"); diff --git a/scripts/functional-tests/resources/subcontracting_test.sah b/scripts/functional-tests/resources/subcontracting_test.sah index 96e84ce69..131ea470f 100644 --- a/scripts/functional-tests/resources/subcontracting_test.sah +++ b/scripts/functional-tests/resources/subcontracting_test.sah @@ -50,7 +50,7 @@ function subcontractingTaskForSubcontractForm($company, $subProjectName){ _setValue(_textbox(0, _near(_span("External company"))), $company); _setValue(_textbox(0, _near(_span("Work description "))), $subProjectName); _setValue(_textbox(0, _near(_span("Subcontract price"))), "6000"); - _setValue(_textbox(0, _near(_span("Subcontracted code"))), $companyId); + _setValue(_textbox(0, _near(_span("Subcontracting code"))), $companyId); _click(_checkbox(0, _near(_span("Hours groups")))); _click(_row("Accept[2]")); _click(_image("ico_save.png")); @@ -58,7 +58,7 @@ function subcontractingTaskForSubcontractForm($company, $subProjectName){ } function subcontractingSendTask(){ - _click(_link("Subcontracted Tasks")); + _click(_link("Send To Subcontractors")); _click(_cell("Send")) subcontractingSendSubValidation(); _log("Task was sent", "custom1"); @@ -66,7 +66,7 @@ function subcontractingSendTask(){ function subcontractingReportTask($projectName, $progressName){ commonProgressAssignProject($projectName, $progressName); - _click(_link("Report Progress")); + _click(_link("Send To Customers")); _click(_cell("Send")); subcontractingSendProgressValidation(); _log("Progress was sent", "custom1"); @@ -107,8 +107,8 @@ function subcontractingSendProgressValidation(){ } function subcontractingDeleteValidation(){ - _assertExists(_span("Deleting this subcontracted project, you are going to lose the relation to report progress. Are you sure?")); - _assert(_isVisible(_span("Deleting this subcontracted project, you are going to lose the relation to report progress. Are you sure?"))); + _assertExists(_span("This project is a subcontracted project. If you delete it, you won't be able to report progress anymore. Are you sure?")); + _assert(_isVisible(_span("This project is a subcontracted project. If you delete it, you won't be able to report progress anymore. Are you sure?"))); } /* test values */ var $companyName = "subcompany"; diff --git a/scripts/functional-tests/resources/virtual_worker_test.sah b/scripts/functional-tests/resources/virtual_worker_test.sah index 769d9e630..a0e41400a 100644 --- a/scripts/functional-tests/resources/virtual_worker_test.sah +++ b/scripts/functional-tests/resources/virtual_worker_test.sah @@ -94,20 +94,20 @@ function virtualWorkerCheckTabs(){ function virtualWorkerCheckAssignedCriteria($workerName, $cell, $criterion){ commonCriteriaCreate($criteriaName, [$criteriaName]); - commonResourceEditAssignedCriteriaForm("Virtual Workers Groups", $workerName, $cell, $criterion); + commonResourceEditAssignedCriteriaForm("Virtual Workers", $workerName, $cell, $criterion); commonCriteriaTryDeleteAssigned($criteriaName); } function virtualWorkerCheckAssignedCalendar($workerName, $cell, $calendar){ commonCalendarCreate($calendar); - commonResourceEditAssignedCalendarForm("Virtual Workers Groups", $workerName, $cell, $calendar); + commonResourceEditAssignedCalendarForm("Virtual Workers", $workerName, $cell, $calendar); commonCalendarTryDeleteAssignedCalendar($calendar, 3); } function virtualWorkerCheckAssignedCostCategory($workerName, $cell, $cCategory){ commonWorkHourCreate("HourForWorker", "12"); commonCostCategoryCreate($cCategory, "HourForWorker"); - commonResourceEditAssignedCostCategoryForm("Virtual Workers Groups", $workerName, $cell, $cCategory); + commonResourceEditAssignedCostCategoryForm("Virtual Workers", $workerName, $cell, $cCategory); commonVirtualWorkerAcctionValidation("saved"); _log("Assign the created cost category", "custom1"); commonCostCategoryTryDeleteAssignedCostCategory($cCategory, 3); @@ -145,14 +145,15 @@ function virtualWorkerAssignProjectForm($workerName){ } function virtualWorkerTryDeleteAssigned($worker){ - commonDelete ("Virtual Workers Groups", $worker, 3); + _click(_link("Virtual Workers")); + _click(_image("ico_borrar1.png", _in(_cell(3, _near(_cell($worker)))))); commonResourceTryDeleteAssignedValidation(); } /* Validations */ function virtualWorkerNotValid($worker){ - _assertExists(_span("checkConstraintUniqueVirtualGroupName: Virtual worker group name must be unique")); - _assert(_isVisible(_span("checkConstraintUniqueVirtualGroupName: Virtual worker group name must be unique"))); + _assertExists(_span("Virtual worker group name must be unique")); + _assert(_isVisible(_span("Virtual worker group name must be unique"))); } /* test values */ diff --git a/scripts/functional-tests/resources/work_report_test.sah b/scripts/functional-tests/resources/work_report_test.sah index 78dcfcce6..d3526be7c 100644 --- a/scripts/functional-tests/resources/work_report_test.sah +++ b/scripts/functional-tests/resources/work_report_test.sah @@ -20,10 +20,10 @@ /* Included tests * * 1 - Create a work report without any work report model (it should be a failure) - * 2 - Create a Work report from a lineal work report model + * 2 - Create a Timesheet from a lineal work report model * 2.1 - Create a lineal work report model * 2.2 - Create a work report - * 3 - Create a Work report from a heading work report model + * 3 - Create a Timesheet from a heading work report model * 3.1 - Create a heading work report model * 3.2 - Try to create a work report from heading model without task (it should be a failure) * 4 - Edit the work report including a line @@ -49,10 +49,10 @@ function workReportCreateLineModel($modelName){ } function workReportModelLineCreate($name){ - commonCreate("Work Report Models"); + commonCreate("Timesheets Templates"); workReportModelLineForm($name); - commonSaveValidation("Work Report Type", $name); - _log("Create a new Work Report Model", "custom1"); + commonSaveValidation("Timesheets Template", $name); + _log("Create a new Timesheets Template", "custom1"); } function workReportModelLineForm($name){ @@ -68,17 +68,17 @@ function workReportCreateHeadingModel($modelName){ workReportModelHeadingCreate($modelName); _click(_link("Timesheets")); _setSelected(_select(0, _near(_span("Select template:"))), $modelName); - _click(_cell("New Timesheet")); + _click(_cell("New timesheet")); _click(_cell("Save")); workReportHeadingCodeValidation(); _log("Do not allow create a new work report from a model type heading without task", "custom1"); } function workReportModelHeadingCreate($name){ - commonCreate("Work Report Models"); + commonCreate("Timesheets Templates"); workReportModelHeadingForm($name); - commonSaveValidation("Work Report Type", $name); - _log("Create a new Work Report Model", "custom1"); + commonSaveValidation("Timesheets Template", $name); + _log("Create a new Timesheets Template", "custom1"); } function workReportModelHeadingForm($name){ @@ -102,10 +102,10 @@ function workReportEditForm($name){ _click(_cell("Add new row")); _click(_cell("Save")); workReportResourceValidation(); - _setValue(_textbox(2, _near(_span("Work report lines"))), $machineName); + _setValue(_textbox(2, _near(_span("Timesheet lines"))), $machineName); _click(_cell("Save")); workReportTaskValidation(); - _click(_italic(0, _near(_textbox(3, _near(_span("Work report lines")))))); + _click(_italic(0, _near(_textbox(3, _near(_span("Timesheet lines")))))); _click(_div($projectName+"[2]", _parentTable(_div("Project code[1]")))); _click(_cell("Save")); workReportHourValidation(); @@ -136,23 +136,23 @@ function DeleteRequiredElements(){ */ function workReportAcctionValidation($action){ - _assertExists(_span("Work report "+$action)); - _assert(_isVisible(_span("Work report "+$action))); + _assertExists(_span("Timesheet "+$action)); + _assert(_isVisible(_span("Timesheet "+$action))); } function workReportHeadingCodeValidation(){ - _assertExists(_div("Task code cannot be null")); - _assert(_isVisible(_div("Task code cannot be null"))); + _assertExists(_div("cannot be empty")); + _assert(_isVisible(_div("cannot be empty"))); } function workReportResourceValidation(){ - _assertExists(_div("The resource cannot be null")); - _assert(_isVisible(_div("The resource cannot be null"))); + _assertExists(_div("cannot be empty")); + _assert(_isVisible(_div("cannot be empty"))); } function workReportTaskValidation(){ - _assertExists(_div("The task code cannot be null")); - _assert(_isVisible(_div("The task code cannot be null"))); + _assertExists(_div("cannot be empty")); + _assert(_isVisible(_div("cannot be empty"))); } function workReportHourValidation(){ diff --git a/scripts/functional-tests/resources/worker_test.sah b/scripts/functional-tests/resources/worker_test.sah index 41ad9dcc0..211e0f12f 100644 --- a/scripts/functional-tests/resources/worker_test.sah +++ b/scripts/functional-tests/resources/worker_test.sah @@ -157,15 +157,16 @@ function workerAssignProjectForm($workerName, $workerSurName){ } function workerTryDeleteAssigned($worker){ - commonDelete ("Workers", $worker, 5); + _click(_link("Workers")); + _click(_image("ico_borrar1.png", _in(_cell(5, _near(_cell($worker)))))); commonResourceTryDeleteAssignedValidation(); } /* Validations */ function workerNotValid($worker){ - _assertExists(_span("checkConstraintUniqueFiscalCode: ID already used. It has to be be unique")); - _assert(_isVisible(_span("checkConstraintUniqueFiscalCode: ID already used. It has to be be unique"))); + _assertExists(_span("ID already used. It has to be be unique")); + _assert(_isVisible(_span("ID already used. It has to be be unique"))); } function workerEmptyFields(){