diff --git a/scripts/functional-tests/data-types/criteria_test.sah b/scripts/functional-tests/data-types/criteria_test.sah index 0a2d32edd..2f88de03d 100644 --- a/scripts/functional-tests/data-types/criteria_test.sah +++ b/scripts/functional-tests/data-types/criteria_test.sah @@ -38,12 +38,14 @@ function criteriaCreate($type){ commonCreate("Criteria"); criteriaForm($type); commonSaveValidation("Criterion Type", $type); + _log("Create a new criterion", "custom1"); } function criteriaCreateDuplicateType($type){ commonCreate("Criteria"); criteriaForm($type); criteriaNotValid(); + _log("Do not allow create a criterion Duplicate type", "custom1"); } function criteriaCreateEmpty(){ @@ -51,6 +53,7 @@ function criteriaCreateEmpty(){ criteriaForm(""); _assertExists(_div("name: criterion type name not specified")); _assert(_isVisible(_div("name: criterion type name not specified"))); + _log("Do not allow create a criterion with empty type", "custom1"); } function criteriaCreateDuplicateName($type, $name){ @@ -62,6 +65,7 @@ function criteriaCreateDuplicateName($type, $name){ _click(_cell("Add")); _assertExists(_div("Already exists other criterion with the same name")); _assert(_isVisible(_div("Already exists other criterion with the same name"))); + _log("Do not allow create a criterion with duplicate name", "custom1"); } function criteriaCreateWithHierarchy($type, $name, $name2){ @@ -75,6 +79,7 @@ function criteriaCreateWithHierarchy($type, $name, $name2){ _assertExists(_span("z-tree-line z-tree-spacer")); _assert(_isVisible(_span("z-tree-line z-tree-spacer"))); _click(_cell("Save")); + _log("Create a criterion with Hierarchy", "custom1"); } function criteriaCreateWithoutHierarchy($type, $name, $name2){ @@ -90,6 +95,7 @@ function criteriaCreateWithoutHierarchy($type, $name, $name2){ _assertExists(_span("z-tree-ico z-tree-firstspacer[1]")); _assert(_isVisible(_span("z-tree-ico z-tree-firstspacer[1]"))); _click(_cell("Save")); + _log("Create a criterion without Hierarchy", "custom1"); } function criteriaEdit($oldName, $newName, $cell){ @@ -98,6 +104,7 @@ function criteriaEdit($oldName, $newName, $cell){ _removeFocus(_textbox(0, _near(_span("Name"))), $newName); _click(_cell("Save & Continue")); commonSaveValidation("Criterion Type", $newName); + _log("Edit a criterion", "custom1"); } function criteriaForm($name){ @@ -120,6 +127,7 @@ function criteriaCheckCode($criteriaType){ commonConfigurationChangeCheckboxMainPreferences("Criterion"); criteriaCreateWithoutCode($criteriaType); commonConfigurationChangeCheckboxMainPreferences("Criterion"); + _log("Check code label", "custom1"); } function criteriaCreateWithoutCode($type){ @@ -157,5 +165,6 @@ commonDelete("Criteria", $criteriaType2, 4); commonDeleteValidation("Criterion Type", $criteriaType2); commonDelete("Criteria", $criteriaType3, 4); commonDeleteValidation("Criterion Type", $criteriaType3); +_log("Delete all criteria", "custom1"); commonLogout(); diff --git a/scripts/functional-tests/data-types/exception_days_test.sah b/scripts/functional-tests/data-types/exception_days_test.sah index abd7298c0..c314dcff5 100644 --- a/scripts/functional-tests/data-types/exception_days_test.sah +++ b/scripts/functional-tests/data-types/exception_days_test.sah @@ -20,9 +20,9 @@ /* Included tests * * 1 - Create a new Exception Day - * 2 - Create a Exception Day with duplicate type (most be failure) - * 3 - Create a Exception Day with empty type (most be failure) - * 4 - Create a Exception Day with duplicate name (most be failure) + * 2 - Create a Exception Day with duplicate type (it should be a failure) + * 3 - Create a Exception Day with empty type (it should be a failure) + * 4 - Create a Exception Day with duplicate name (it should be a failure) * 5 - Edit a Exception Day * 6 - Delete Exception Day * @@ -33,12 +33,14 @@ function exceptDayCreate($name, $standar, $color) { commonCreate("Exception Days"); exceptDayForm($name, $standar, $color); commonSaveValidation("Exception Day Type", $name); + _log("Create a new Exception Day", "custom1"); } -function exceptDayCreateDuplicateType($name, $standar, $color) { +function exceptDayCreateDuplicateName($name, $standar, $color) { commonCreate("Exception Days"); exceptDayForm($name, $standar, $color); exceptDayNotValid($name); + _log("Do not allow create an exception day with duplicate name", "custom1"); } function exceptDayCreateEmpty($name, $standar, $color) { @@ -46,6 +48,7 @@ function exceptDayCreateEmpty($name, $standar, $color) { exceptDayForm($name, $standar, $color); _assertExists(_div("cannot be null or empty")); _assert(_isVisible(_div("cannot be null or empty"))); + _log("Do not allow create an exception day without name", "custom1"); } function exceptDayForm($name, $standar, $color){ @@ -67,6 +70,7 @@ function exceptDayEdit($oldName, $newName, $cell){ commonEdit($oldName, $cell); exceptDayForm($newName); commonSaveValidation("Exception Day Type", $newName); + _log("Edit the exception day", "custom1"); } @@ -74,19 +78,20 @@ function exceptDayEdit($oldName, $newName, $cell){ var $exceptDayName = "new"; var $exceptDaystandar = "8"; var $exceptDayName2 = "new2"; -var $exceptDayNewType = "newest"; +var $exceptDayNewName = "newest"; /* test actions */ commonLogin("admin", "admin"); exceptDayCreate($exceptDayName, $exceptDaystandar, 2); -exceptDayCreateDuplicateType($exceptDayName, $exceptDaystandar, 1); +exceptDayCreateDuplicateName($exceptDayName, $exceptDaystandar, 1); exceptDayCreateEmpty("", $exceptDaystandar); -exceptDayEdit($exceptDayName, $exceptDayNewType, 5); +exceptDayEdit($exceptDayName, $exceptDayNewName, 5); -commonDelete("Exception Days", $exceptDayNewType, 5); -commonDeleteValidation("Exception Day Type", $exceptDayNewType); +commonDelete("Exception Days", $exceptDayNewName, 5); +commonDeleteValidation("Exception Day Type", $exceptDayNewName); +_log("Delete the exception day", "custom1"); commonLogout(); diff --git a/scripts/functional-tests/data-types/label_test.sah b/scripts/functional-tests/data-types/label_test.sah index ecd563f87..1d6fadb0f 100755 --- a/scripts/functional-tests/data-types/label_test.sah +++ b/scripts/functional-tests/data-types/label_test.sah @@ -20,14 +20,14 @@ /* Included tests * * 1 - Create a new Label - * 2 - Create a Label with duplicate type (most be failure) - * 3 - Create a Label with empty type (most be failure) - * 4 - Create a Label with duplicate name (most be failure) + * 2 - Create a Label with duplicate type (it should be a failure) + * 3 - Create a Label with empty type (it should be a failure) + * 4 - Create a Label with duplicate name (it should be a failure) * 5 - Edit a Label * 6 - Assign a Label * 6.1 - Create a project * 6.2 - Add a Label to a project - * 6.3 - Try to delete this assigned Label (most be failure) + * 6.3 - Try to delete this assigned Label (it should be a failure) * 6.4 - Delete the project * 7 - Delete Label * @@ -38,12 +38,14 @@ function labelCreate($type, $name){ commonCreate("Labels"); labelForm($type, $name); commonSaveValidation("Label Type", $type); + _log("Create a new label", "custom1"); } function labelCreateDuplicateType($type){ commonCreate("Labels"); labelForm($type); labelNotValid($type); + _log("Do not allow create a label with duplicate type", "custom1"); } function labelCreateEmpty(){ @@ -51,6 +53,7 @@ function labelCreateEmpty(){ labelForm(""); _assertExists(_div("cannot be null or empty")); _assert(_isVisible(_div("cannot be null or empty"))); + _log("Do not allow create a label without type", "custom1"); } function labelCreateDuplicateName($type, $name){ @@ -62,6 +65,7 @@ function labelCreateDuplicateName($type, $name){ _click(_cell("Add")); _assertExists(_span("Already exists other label with the same name")); _assert(_isVisible(_span("Already exists other label with the same name"))); + _log("Do not allow create a label with duplicate name", "custom1"); } function labelForm($name, $labelName){ @@ -81,6 +85,7 @@ function labelEdit($oldName, $newName, $cell){ commonEdit($oldName, $cell); labelForm($newName); commonSaveValidation("Label Type", $newName); + _log("Edit the label", "custom1"); } function labelAssig($project, $labelName, $labelType2){ @@ -88,6 +93,7 @@ function labelAssig($project, $labelName, $labelType2){ labelAssignProject($project); labeltryDelete($labelType2); commonDeleteProject($project); + _log("Assign the label", "custom1"); } function labelAssignProject($project){ @@ -131,5 +137,6 @@ labelAssig($projectName, $labelName, $labelNewType); commonDelete("Labels", $labelNewType, 2); commonDeleteValidation("Label Type", $labelNewType); +_log("Delete the label", "custom1"); commonLogout(); diff --git a/scripts/functional-tests/data-types/progress_test.sah b/scripts/functional-tests/data-types/progress_test.sah index 5c0c2ea45..23cd61614 100644 --- a/scripts/functional-tests/data-types/progress_test.sah +++ b/scripts/functional-tests/data-types/progress_test.sah @@ -21,13 +21,13 @@ * ============== * * 1 - Create a new process - * 2 - Create a process with the same name (most be failure) - * 3 - Create a new process without name (most be failure) + * 2 - Create a process with the same name (it should be a failure) + * 3 - Create a new process without name (it should be a failure) * 4 - Check Max value and precision * 4.1 - Wrong values (last input precision) * 4.2 - Wrong values (last input Max Value) * 5 - Edit a process - * 6 - Try to delete a previously assigned progress (most be failure) + * 6 - Try to delete a previously assigned progress (it should be a failure) * 6.1 - Create a Project * 6.2 - Assign a progress to a project * 6.3 - try to delete this progress @@ -42,12 +42,14 @@ function progressCreate($name) { commonCreate("Progress"); progressForm($name); commonSaveValidation("Progress Type", $name); + _log("Create a new progress", "custom1"); } function progressCreateDuplicate($name) { commonCreate("Progress"); progressForm($name); progressNotValid(); + _log("Do not allow create a progress with duplicate name", "custom1"); } function progressCreateEmpty() { @@ -56,6 +58,7 @@ function progressCreateEmpty() { _assertExists(_div("The name is not valid, the name must not be null")); _assert(_isVisible(_div("The name is not valid, the name must not be null"))); _click(_link("Progress")); + _log("Do not allow create a progress without name", "custom1"); } function progressForm($name) { @@ -73,6 +76,7 @@ function progressNotValid(){ function progressCreateWrongPrecisson($name, $maxValue, $precission){ progressPrecisson($name, $maxValue, $precission); progressMaxValue($name, $maxValue, $precission); + _log("Check Max value and precision", "custom1"); } function progressPrecisson($name, $maxValue, $precission){ @@ -100,6 +104,7 @@ function progressEdit($oldName, $newName, $cell) { commonEdit($oldName, 3); progressForm($newName); commonSaveValidation("Progress Type", $newName); + _log("Edit a progress", "custom1"); } function progressTryEditDefault($defaultValue){ @@ -111,12 +116,14 @@ function progressTryEditDefault($defaultValue){ _assertExists(_div("Percentage")); _assert(_isVisible(_div("Percentage"))); _click(_link("Progress")); + _log("Try to edit a default progress", "custom1"); } function progressTryDelDefault($defaultValue){ _click(_image("ico_borrar1.png", _in(_cell(3, _near(_cell($defaultValue)))))); _assertNotEqual("Delete Progress Type \""+$defaultValue+"\". Are you sure?"); _assertNull(_cell("Delete Progress Type \""+$defaultValue+"\". Are you sure?")); + _log("Try to delete a default progress", "custom1"); } function progressAssigned($projectName, $progressNewName){ @@ -125,6 +132,7 @@ function progressAssigned($projectName, $progressNewName){ _click(_link("Progress")); progressTryDelDefault($progressNewName); commonDeleteProject($projectName); + _log("Assign the progress", "custom1"); } function progressAssignProject($projectName, $progressNewName){ @@ -162,6 +170,7 @@ progressEdit($progressName, $progressNewName, 3); progressAssigned($projectName, $progressNewName); commonDelete("Progress", $progressNewName, 3); commonDeleteValidation("Progress Type", $progressNewName); +_log("Delete a progress", "custom1"); progressTryEditDefault($defaultValue); progressTryDelDefault($defaultValue); commonLogout(); diff --git a/scripts/functional-tests/data-types/unit_measures_test.sah b/scripts/functional-tests/data-types/unit_measures_test.sah index d98139c7d..5f5a819ff 100644 --- a/scripts/functional-tests/data-types/unit_measures_test.sah +++ b/scripts/functional-tests/data-types/unit_measures_test.sah @@ -36,14 +36,14 @@ function unitMeasureCreate($type){ commonCreate("Unit Measures"); unitMeasureForm($type); commonSaveValidation("Unit Measure", $type); - _log("Create a new Unit Measure SUCCESS", "success"); + _log("Create a new Unit Measure", "custom1"); } function unitMeasureCreateDuplicate($type){ commonCreate("Unit Measures"); unitMeasureForm($type); unitMeasureNotValidation($type); - _log("Create Unit Measure Duplicate SUCCESS", "success"); + _log("Create Unit Measure Duplicate", "custom1"); } function unitMeasureCreateEmpty(){ @@ -51,7 +51,7 @@ function unitMeasureCreateEmpty(){ unitMeasureForm(""); _assertExists(_div("Unit type name cannot be empty")); _assert(_isVisible(_div("Unit type name cannot be empty"))); - _log("Create Unit Measure Empty SUCCESS", "success"); + _log("Create Unit Measure Empty", "custom1"); } function unitMeasureForm($name){ @@ -70,14 +70,14 @@ function unitMeasureEdit($oldName, $newName, $cell){ commonEdit($oldName, $cell); unitMeasureForm($newName); commonSaveValidation("Unit Measure", $newName); - _log("Edit the Unit Measure SUCCESS", "success"); + _log("Edit the Unit Measure", "custom1"); } function unitMeasureAssign($UMeasure, $materialName){ materialFormCreate($materialName, $UMeasure); unitMeasureTryDeleteAssigned($UMeasure); materialFormDelete($materialName); - _log("Assign an Unit Measure to a material SUCCESS", "success"); + _log("Assign an Unit Measure to a material", "custom1"); } function materialFormCreate($material, $measure){ @@ -126,5 +126,5 @@ unitMeasureEdit($UMeasureName, $UMeasureName2, 1); unitMeasureAssign($UMeasureName2, $materialName); commonDelete("Unit Measures", $UMeasureName2, 1); commonDeleteValidation("Unit Measure", $UMeasureName2); -_log("Delete the Unit Measure SUCCESS", "success"); +_log("Delete the Unit Measure", "custom1"); commonLogout(); diff --git a/scripts/functional-tests/data-types/work_hours_test.sah b/scripts/functional-tests/data-types/work_hours_test.sah index cdcb0349f..f0971fd13 100644 --- a/scripts/functional-tests/data-types/work_hours_test.sah +++ b/scripts/functional-tests/data-types/work_hours_test.sah @@ -49,14 +49,14 @@ function workHourCreate($type, $price){ commonCreate("Work Hours"); workHourForm($type, $price); commonSaveValidation("Type of hours", $type); - _log("Create a new Work Hour SUCCESS", "success"); + _log("Create a new Work Hour", "custom1"); } function workHourCreateDuplicateType($type, $price){ commonCreate("Work Hours"); workHourForm($type, $price); workHourNotValid($type); - _log("Do not allow create a duplicate Work Hour SUCCESS", "success"); + _log("Do not allow create a duplicate Work Hour", "custom1"); } function workHourCreateEmpty(){ @@ -64,7 +64,7 @@ function workHourCreateEmpty(){ workHourForm("", 10); _assertExists(_div("cannot be null or empty")); _assert(_isVisible(_div("cannot be null or empty"))); - _log("Do not allow create a empty Work Hour SUCCESS", "success"); + _log("Do not allow create a empty Work Hour", "custom1"); } function workHourForm($name, $price){ @@ -83,7 +83,7 @@ function workHourEdit($oldName, $newName, $hWorkPrice, $cell) { commonEdit($oldName, $cell); workHourForm($newName, $hWorkPrice); commonSaveValidation("Type of hours", $newName); - _log("Edit the Work Hour SUCCESS", "success"); + _log("Edit the Work Hour", "custom1"); } function workHourAssign($hWorkNewName, $ModelName, $materialName, $materialDescription){ @@ -101,6 +101,7 @@ function workHourAssign($hWorkNewName, $ModelName, $materialName, $materialDescr commonDeleteValidation("Machine", $materialName); commonDelete("Work Report Models", $ModelName, 1); commonDeleteValidation("Work Report Type", $ModelName); + _log("Assign the work hour to project", "custom1"); } function workHourTryDelete($hWorkNewName,$something){ @@ -109,7 +110,7 @@ function workHourTryDelete($hWorkNewName,$something){ _assertExists(_span("Cannot delete type of work hours. It is being used at this moment in some "+$something+".")); _assert(_isVisible(_span("Cannot delete type of work hours. It is being used at this moment in some "+$something+"."))); _click(_cell("OK")); - _log("Do not allow delete the Work Hour SUCCESS", "success"); + _log("Do not allow delete the Work Hour", "custom1"); } /* @@ -120,7 +121,7 @@ function machineCreate($name, $description){ commonCreate("Machines"); machineForm($name, $description); commonSaveValidation("Machine", $name); - _log("Create a new machine SUCCESS", "success"); + _log("Create a new machine", "custom1"); } function machineForm($name, $description){ @@ -137,7 +138,7 @@ function reportModelCreate($modelName) { commonCreate("Work Report Models"); reportModelForm($modelName); commonSaveValidation("Work Report Type", $modelName); - _log("Create a Work Report Model SUCCESS", "success"); + _log("Create a Work Report Model", "custom1"); } function reportModelForm($name) { @@ -153,7 +154,7 @@ function reportModelTryDelete($ModelName){ _assertExists(_span("Cannot delete work report type. There are some work reports bound to it.")); _assert(_isVisible(_span("Cannot delete work report type. There are some work reports bound to it."))); _click(_cell("OK")); - _log("Do not allow delete Work Report Model SUCCESS", "success"); + _log("Do not allow delete Work Report Model", "custom1"); } /* @@ -163,7 +164,7 @@ function reportModelTryDelete($ModelName){ function workReportCreate($wReport, $project, $workHour) { _click(_link("Work Reports")); workReportForm($wReport, $project, $workHour); - _log("Create a Work Report SUCCESS", "success"); + _log("Create a Work Report", "custom1"); } function workReportForm($machine, $project, $workHour) { @@ -185,7 +186,7 @@ function commonTryDeleteProject($name){ _click(_cell("OK")); _assertExists(_div("You can not remove the project \"new project\" because of any of its tasks are already in use in some work reports and the project just exists in the current scenario")); _assert(_isVisible(_div("You can not remove the project \"new project\" because of any of its tasks are already in use in some work reports and the project just exists in the current scenario"))); - _log("Do not allow delete Work Report SUCCESS", "success"); + _log("Do not allow delete Work Report", "custom1"); } /* @@ -197,14 +198,14 @@ function workHourAssignCostCategory($categoryName, $hworkName){ workHourTryDelete($hWorkName,"cost category"); commonDelete("Cost Categories", $categoryName, 2); commonDeleteValidation("Cost Category", $categoryName); - _log("Delete the Cost Category SUCCESS", "success"); + _log("Assign to a Cost Category", "custom1"); } function costCategoryCreate($name, $hworkName){ commonCreate("Cost Categories"); costCategoryForm($name, $hworkName); commonSaveValidation("Cost Category", $name); - _log("Create a Cost Category SUCCESS", "success"); + _log("Create a Cost Category", "custom1"); } function costCategoryForm($name, $hworkName){ @@ -239,5 +240,5 @@ workHourCreate($hWorkName, $hWorkPrice); workHourAssignCostCategory($cCategoryName, $hWorkName); commonDelete("Work Hours", $hWorkName, 4); commonDeleteValidation("Type of hours", $hWorkName); -_log("Delete the work Hour SUCCESS", "success"); +_log("Delete the work Hour", "custom1"); commonLogout();