diff --git a/scripts/functional-tests/administration-management/configuration_test.sah b/scripts/functional-tests/administration-management/configuration_test.sah index 53c3ad30a..341be1f2b 100644 --- a/scripts/functional-tests/administration-management/configuration_test.sah +++ b/scripts/functional-tests/administration-management/configuration_test.sah @@ -1,7 +1,7 @@ /* * This file is part of LibrePlan * - * Copyright (C) 2011 Igalia, S.L. + * Copyright (C) 2011-2012 Igalia, S.L. * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU Affero General Public License as published by @@ -188,7 +188,7 @@ function configCheckCalendarWorker($name){ } function configCheckCalendarProject($name){ - _click(_link("Projects List")); + _click(_link("Projects")); _click(_image("ico_add.png")); if (_condition(_textbox(0, _near(_span("Calendar"))).value == $name)){ _log("The correct calendar is assigned", "custom1"); diff --git a/scripts/functional-tests/administration-management/quality_forms_test.sah b/scripts/functional-tests/administration-management/quality_forms_test.sah index b1312a6b5..b99583b9d 100644 --- a/scripts/functional-tests/administration-management/quality_forms_test.sah +++ b/scripts/functional-tests/administration-management/quality_forms_test.sah @@ -1,7 +1,7 @@ /* * This file is part of LibrePlan * - * Copyright (C) 2011 Igalia, S.L. + * Copyright (C) 2011-2012 Igalia, S.L. * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU Affero General Public License as published by @@ -95,7 +95,7 @@ function qualityFormAssign($qualityFormName, $project){ } function qualityFormAssingProject($qualityFormName, $project){ - _click(_link("Projects List")); + _click(_link("Projects")); _click(_image("ico_editar1.png", _in(_cell(8,_near(_cell($project)))))); _click(_span("Task quality forms")); _click(_italic(0, _near(_span("Assign quality form")))); diff --git a/scripts/functional-tests/common_functions.sah b/scripts/functional-tests/common_functions.sah index b4a4ebfbd..46d5a7742 100644 --- a/scripts/functional-tests/common_functions.sah +++ b/scripts/functional-tests/common_functions.sah @@ -1,7 +1,7 @@ /* * This file is part of LibrePlan * - * Copyright (C) 2011 Igalia, S.L. + * Copyright (C) 2011-2012 Igalia, S.L. * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU Affero General Public License as published by @@ -49,7 +49,7 @@ function commonDelete ($something, $name, $cell) { /* Create new project */ function commonCreateProject($name, $calendar){ - _click(_link("Projects List")); + _click(_link("Projects")); _click(_image("ico_add.png")); _setValue(_textbox(0, _near(_span("Name"))), $name); if ($calendar != null){ @@ -62,13 +62,13 @@ function commonCreateProject($name, $calendar){ } function commonEditProject($name){ - _click(_link("Projects List")); + _click(_link("Projects")); _click(_image("ico_editar1.png", _in(_cell(8,_near(_cell($name)))))); } /* Delete a project */ function commonDeleteProject($name){ - _click(_link("Projects List")); + _click(_link("Projects")); _click(_image("ico_borrar1.png", _in(_cell(8, _near(_cell($name)))))); _click(_cell("OK")); _assertExists(_div("Removed "+$name)); @@ -78,7 +78,7 @@ function commonDeleteProject($name){ /* Create a task in a project */ function commonCreateTask($projectName, $name, $hours){ - _click(_link("Projects List")); + _click(_link("Projects")); _click(_image("ico_editar1.png", _in(_cell(8,_near(_cell($projectName)))))); _setValue(_textbox(0, _near(_span("New task"))), $name); _setValue(_textbox("z-intbox", _near(_span("Hours"))), $hours); @@ -89,7 +89,7 @@ function commonCreateTask($projectName, $name, $hours){ } function commonConfigurationChangeCheckboxMainPreferences($element){ - _click(_link("LibrePlan Configuration")); + _click(_link("Main Settings")); _click(_checkbox(0, _near(_label($element)))); _click(_cell("Save")); commonSaveConfigurationValidation(); @@ -298,14 +298,14 @@ function commonVirtualWorkerAcctionValidation($action){ */ function commonWorkReportDelete ($name){ - commonDelete("Work Reports", $name, 4); + commonDelete("Timesheets", $name, 5); commonWorkReportDeleteValidation(); _log("Delete the work report", "custom1"); } function commonWorkReportDeleteValidation (){ - _assertExists(_span("Work report removed successfully")); - _assert(_isVisible(_span("Work report removed successfully"))); + _assertExists(_span("Timesheet removed successfully")); + _assert(_isVisible(_span("Timesheet removed successfully"))); } /* @@ -409,7 +409,7 @@ function commonCostCategoryTryDeleteAssignedCostCategory($cCategory, $cell){ */ function commonProgressCreate($name) { - commonCreate("Progress"); + commonCreate("Progress Types"); commonProgressForm($name); commonSaveValidation("Progress Type", $name); _log("Create a progress", "custom1"); @@ -425,7 +425,7 @@ function commonProgressForm($name) { function commonProgressAssigned($projectName, $progressNewName){ commonCreateProject($projectName); commonProgressAssignProject($projectName, $progressNewName); - _click(_link("Progress")); + _click(_link("Progress Types")); commonDeleteProject($projectName); } @@ -435,14 +435,14 @@ function commonProgressAssignProject($projectName, $progressNewName){ _click(_cell("Add new progress assignment")); _setValue(_textbox("z-combobox-inp", _near(_row("footer"))), $progressNewName); _click(_cell("z-button-cm", _near(_textbox("z-combobox-inp")))); - _setValue(_textbox(0, _near(_parentTable(_div("Value")))), "30"); + _setValue(_textbox(0, _near(_parentTable(_div("Value[1]")))), "30"); _click(_image("ico_save.png")); _click(_cell("OK")); _log("Progress assigned", "custom1"); } function commonProgressDelete($name){ - commonDelete("Progress", $progressNewName, 3); + commonDelete("Progress Types", $progressNewName, 3); commonDeleteValidation("Progress Type", $progressNewName); _log("Delete the progress", "custom1"); } @@ -522,14 +522,14 @@ function commonLabelDelete($name){ } /* - * Common functions for Work Report Model + * Common functions for Timesheet Model */ function commonWorkReportModelCreate($name, $type){ - commonCreate("Work Report Models"); + commonCreate("Timesheets Templates"); commonWorkReportModelForm($name, $type); - commonSaveValidation("Work Report Type", $name); - _log("Create a new Work Report Model", "custom1"); + commonSaveValidation("Timesheets Template", $name); + _log("Create a new Timesheet Model", "custom1"); } function commonWorkReportModelForm($name, $type){ @@ -545,14 +545,14 @@ function commonWorkReportModelForm($name, $type){ function commonWorkReportModelEdit($oldName, $newName, $cell){ commonEdit($oldName, $cell); commonWorkReportModelForm($newName); - commonSaveValidation("Work Report Type", $newName); - _log("Edit a Work Report Model", "custom1"); + commonSaveValidation("Timesheets Template", $newName); + _log("Edit a Timesheet Model", "custom1"); } function commonWorkReportModelDelete($name){ - commonDelete("Work Report Models", $name, 1); - commonDeleteValidation("Work Report Type", $name); - _log("Delete the Work Report Model", "custom1"); + commonDelete("Timesheets Templates", $name, 1); + commonDeleteValidation("Timesheets Template", $name); + _log("Delete the Timesheet Model", "custom1"); } /* @@ -560,10 +560,10 @@ function commonWorkReportModelDelete($name){ */ function commonWorkHourCreate($type, $price){ - commonCreate("Work Hours"); + commonCreate("Hours Types"); commonWorkHourForm($type, $price); - commonSaveValidation("Type of hours", $type); - _log("Create a new Work Hour", "custom1"); + commonSaveValidation("Hours Type", $type); + _log("Create a new Hours Type", "custom1"); } function commonWorkHourForm($name, $price){ @@ -573,7 +573,7 @@ function commonWorkHourForm($name, $price){ } function commonWorkHourDelete($name){ - commonDelete("Work Hours", $name, 4); - commonDeleteValidation("Type of hours", $name); - _log("Delete the Work Hour", "custom1"); + commonDelete("Hours Types", $name, 8); + commonDeleteValidation("Hours Type", $name); + _log("Delete the Hours Type", "custom1"); } diff --git a/scripts/functional-tests/data-types/criteria_test.sah b/scripts/functional-tests/data-types/criteria_test.sah index b7df78687..90c1ba00a 100644 --- a/scripts/functional-tests/data-types/criteria_test.sah +++ b/scripts/functional-tests/data-types/criteria_test.sah @@ -1,7 +1,7 @@ /* * This file is part of LibrePlan * - * Copyright (C) 2011 Igalia, S.L. + * Copyright (C) 2011-2012 Igalia, S.L. * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU Affero General Public License as published by @@ -45,8 +45,8 @@ function criteriaCreateDuplicateType($type, $names){ function criteriaCreateEmpty($type, $names){ commonCreate("Criteria"); commonCriteriaForm($type, $names); - _assertExists(_div("name: criterion type name not specified")); - _assert(_isVisible(_div("name: criterion type name not specified"))); + _assertExists(_div("criterion type name not specified")); + _assert(_isVisible(_div("criterion type name not specified"))); _log("Do not allow create a criterion with empty type", "custom1"); } @@ -57,8 +57,8 @@ function criteriaCreateDuplicateName($type, $name){ _click(_cell("Add")); _setValue(_textbox(0, _near(_span("New criterion"))), $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"))); + _assertExists(_div("Already exists another criterion with the same name")); + _assert(_isVisible(_div("Already exists another criterion with the same name"))); _log("Do not allow create a criterion with duplicate name", "custom1"); } @@ -103,14 +103,14 @@ function criteriaEdit($oldName, $newName, $cell){ /* test to check a that LibrePlan give us a error */ function criteriaNotValid(){ - _assertExists(_div("checkConstraintUniqueCriterionTypeName: criterion type name is already being used")); - _assert(_isVisible(_div("checkConstraintUniqueCriterionTypeName: criterion type name is already being used"))); + _assertExists(_div("Criterion Type name is already being used")); + _assert(_isVisible(_div("Criterion Type name is already being used"))); } function criteriaCheckCode($criteriaType){ - commonConfigurationChangeCheckboxMainPreferences("Criterion"); + commonConfigurationChangeCheckboxMainPreferences("Criteria"); criteriaCreateWithoutCode($criteriaType); - commonConfigurationChangeCheckboxMainPreferences("Criterion"); + commonConfigurationChangeCheckboxMainPreferences("Criteria"); _log("Check code label", "custom1"); } diff --git a/scripts/functional-tests/data-types/exception_days_test.sah b/scripts/functional-tests/data-types/exception_days_test.sah index f2c487d7b..72deefe6f 100644 --- a/scripts/functional-tests/data-types/exception_days_test.sah +++ b/scripts/functional-tests/data-types/exception_days_test.sah @@ -1,7 +1,7 @@ /* * This file is part of LibrePlan * - * Copyright (C) 2011 Igalia, S.L. + * Copyright (C) 2011-2012 Igalia, S.L. * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU Affero General Public License as published by @@ -19,36 +19,36 @@ /* Included tests * - * 1 - Create a new Exception Day - * 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 + * 1 - Create a new Calendar Exception Day + * 2 - Create a Calendar Exception Day with duplicate type (it should be a failure) + * 3 - Create a Calendar Exception Day with empty type (it should be a failure) + * 4 - Create a Calendar Exception Day with duplicate name (it should be a failure) + * 5 - Edit a Calendar Exception Day * 6 - Check code label * 6.1 - Change configuration * 6.2 - Try to create a new Exception day without Code (it should be a failure) * 6.3 - Change configuration like before - * 7 - Delete Exception Day + * 7 - Delete Calendar Exception Day * */ _include("../common_functions.sah"); function exceptDayCreate($name, $standar, $color) { - commonCreate("Exception Days"); + commonCreate("Calendar Exception Days"); exceptDayForm($name, $standar, $color); - commonSaveValidation("Exception Day Type", $name); - _log("Create a new Exception Day", "custom1"); + commonSaveValidation("Calendar Exception Day", $name); + _log("Create a new Calendar Exception Day", "custom1"); } function exceptDayCreateDuplicateName($name, $standar, $color) { - commonCreate("Exception Days"); + commonCreate("Calendar 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) { - commonCreate("Exception Days"); + commonCreate("Calendar Exception Days"); exceptDayForm($name, $standar, $color); _assertExists(_div("cannot be empty")); _assert(_isVisible(_div("cannot be empty"))); @@ -66,14 +66,14 @@ function exceptDayForm($name, $standar, $color){ /* test to check a that LibrePlan give us a error */ function exceptDayNotValid($ExceptDayName){ - _assertExists(_span("checkConstraintUniqueName: name is already used")); - _assert(_isVisible(_span("checkConstraintUniqueName: name is already used"))); + _assertExists(_span("name is already used")); + _assert(_isVisible(_span("name is already used"))); } function exceptDayEdit($oldName, $newName, $cell){ commonEdit($oldName, $cell); exceptDayFormSaveAndContinue($newName); - commonSaveValidation("Exception Day Type", $newName); + commonSaveValidation("Calendar Exception Day", $newName); _log("Edit the exception day", "custom1"); } @@ -86,14 +86,14 @@ function exceptDayFormSaveAndContinue($name){ } function exceptDayCheckCode($exceptDayName){ - commonConfigurationChangeCheckboxMainPreferences("Calendar exception types"); + commonConfigurationChangeCheckboxMainPreferences("Calendar exception days"); exceptDayCreateWithoutCode($exceptDayName); - commonConfigurationChangeCheckboxMainPreferences("Calendar exception types"); + commonConfigurationChangeCheckboxMainPreferences("Calendar exception days"); _log("Check code label", "custom1"); } function exceptDayCreateWithoutCode($name){ - commonCreate("Exception Days"); + commonCreate("Calendar Exception Days"); exceptDayForm($name,"",""); commonEmptyCodeValidation(); } @@ -116,8 +116,8 @@ exceptDayEdit($exceptDayName, $exceptDayNewName, 5); exceptDayCheckCode($exceptDayName); -commonDelete("Exception Days", $exceptDayNewName, 5); -commonDeleteValidation("Exception Day Type", $exceptDayNewName); +commonDelete("Calendar Exception Days", $exceptDayNewName, 5); +commonDeleteValidation("Calendar Exception Day", $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 3121d4e4a..684eb8c3c 100755 --- a/scripts/functional-tests/data-types/label_test.sah +++ b/scripts/functional-tests/data-types/label_test.sah @@ -1,7 +1,7 @@ /* * This file is part of LibrePlan * - * Copyright (C) 2011 Igalia, S.L. + * Copyright (C) 2011-2012 Igalia, S.L. * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU Affero General Public License as published by @@ -68,8 +68,8 @@ function labelCreateDuplicateName($type, $name){ /* test to check a that LibrePlan give us a error */ function labelNotValid($labelType){ - _assertExists(_div("name: "+$labelType+" already exists")); - _assert(_isVisible(_div("name: "+$labelType+" already exists"))); + _assertExists(_div($labelType+" already exists")); + _assert(_isVisible(_div($labelType+" already exists"))); } function labelEdit($oldName, $newName, $cell){ @@ -88,7 +88,7 @@ function labelAssig($project, $labelName, $labelType2){ } function labelAssignProject($project){ - _click(_link("Projects List")); + _click(_link("Projects")); _click(_image("ico_editar1.png", _in(_cell(8, _near(_cell($project)))))); _click(_span("Label")); _click(_textbox(0, _near(_cell("Assign")))); @@ -109,9 +109,9 @@ function labeltryDelete($labelNewType){ } function labelCheckCode($labelType, $labelName){ - commonConfigurationChangeCheckboxMainPreferences("Label"); + commonConfigurationChangeCheckboxMainPreferences("Labels"); labelCreateWithoutCode($labelType, $labelName); - commonConfigurationChangeCheckboxMainPreferences("Label"); + commonConfigurationChangeCheckboxMainPreferences("Labels"); _log("Check code label", "custom1"); } @@ -133,8 +133,8 @@ function labelFormEmptyCode($name, $labelName){ } function labelEmptyCodeValidation(){ - _assertExists(_div("code: code not specified")); - _assert(_isVisible(_div("code: code not specified"))); + _assertExists(_div("code not specified")); + _assert(_isVisible(_div("code not specified"))); } /* test values */ diff --git a/scripts/functional-tests/data-types/progress_test.sah b/scripts/functional-tests/data-types/progress_test.sah index 3e2300584..651ea1b26 100644 --- a/scripts/functional-tests/data-types/progress_test.sah +++ b/scripts/functional-tests/data-types/progress_test.sah @@ -1,7 +1,7 @@ /* * This file is part of LibrePlan * - * Copyright (C) 2011 Igalia, S.L. + * Copyright (C) 2011-2012 Igalia, S.L. * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU Affero General Public License as published by @@ -39,18 +39,18 @@ _include("../common_functions.sah"); function progressCreateDuplicate($name) { - commonCreate("Progress"); + commonCreate("Progress Types"); commonProgressForm($name); progressNotValid(); _log("Do not allow create a progress with duplicate name", "custom1"); } function progressCreateEmpty() { - commonCreate("Progress"); + commonCreate("Progress Types"); _click(_cell("Save")); _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")); + _click(_link("Progress Types")); _log("Do not allow create a progress without name", "custom1"); } @@ -67,18 +67,18 @@ function progressCreateWrongPrecisson($name, $maxValue, $precission){ } function progressPrecisson($name, $maxValue, $precission){ - commonCreate("Progress"); + commonCreate("Progress Types"); _setValue(_textbox(0, _near(_div("Unit name"))), $name); _removeFocus(_textbox(0, _near(_div("Unit name")))); _setValue(_textbox(0, _near(_div("Default max value"))), $maxValue); _setValue(_textbox(0, _near(_div("Precision"))), $precission); _click(_cell("Save")); - _assertExists(_div("Value is not valid, the Precision value must be less than the defalt max value.")); - _assert(_isVisible(_div("Value is not valid, the Precision value must be less than the defalt max value."))); + _assertExists(_div("Invalid value. Precission value must be lower than the Default Max value.")); + _assert(_isVisible(_div("Invalid value. Precission value must be lower than the Default Max value."))); } function progressMaxValue($name, $maxValue, $precission){ - commonCreate("Progress"); + commonCreate("Progress Types"); _setValue(_textbox(0, _near(_div("Unit name"))), $name); _removeFocus(_textbox(0, _near(_div("Unit name")))); _setValue(_textbox(0, _near(_div("Precision"))), $precission); @@ -104,7 +104,7 @@ function progressTryEditDefault($defaultValue){ _assertNull(_cell("Progress Type \""+$fakeName+"\" saved")); _assertExists(_div("Percentage")); _assert(_isVisible(_div("Percentage"))); - _click(_link("Progress")); + _click(_link("Progress Types")); _log("Try to edit a default progress", "custom1"); } diff --git a/scripts/functional-tests/data-types/unit_measures_test.sah b/scripts/functional-tests/data-types/unit_measures_test.sah index ad806d045..580638496 100644 --- a/scripts/functional-tests/data-types/unit_measures_test.sah +++ b/scripts/functional-tests/data-types/unit_measures_test.sah @@ -1,7 +1,7 @@ /* * This file is part of LibrePlan * - * Copyright (C) 2011 Igalia, S.L. + * Copyright (C) 2011-2012 Igalia, S.L. * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU Affero General Public License as published by @@ -19,48 +19,48 @@ /* Included tests * - * 1 - Create a new Unit Measure - * 2 - Create a Unit Measure with duplicate type (it should be a failure) - * 3 - Create a Unit Measure with empty type (it should be a failure) - * 4 - Edit a Unit Measure - * 5 - Assign a Unit Measure to a material + * 1 - Create a new Material Unit + * 2 - Create a Material Unit with duplicate type (it should be a failure) + * 3 - Create a Material Unit with empty type (it should be a failure) + * 4 - Edit a Material Unit + * 5 - Assign a Material Unit to a material * 5.1 Create a material and assign the Unit * 5.1 Try to delete the assigned Unit (it should be a failure) * 5.2 Delete the material * 6 - Check code * 6.1 - Change configuration - * 6.2 - Try to create a new Unit Measure without Code (it should be a failure) + * 6.2 - Try to create a new Material Unit without Code (it should be a failure) * 6.3 - Change configuration like before - * 7 - Delete Unit Measure + * 7 - Delete Material Unit * */ _include("../common_functions.sah"); function unitMeasureCreate($type){ - commonCreate("Unit Measures"); + commonCreate("Material Units"); unitMeasureForm($type); - commonSaveValidation("Unit Measure", $type); - _log("Create a new Unit Measure", "custom1"); + commonSaveValidation("Material Unit", $type); + _log("Create a new Material Unit", "custom1"); } function unitMeasureCreateDuplicate($type){ - commonCreate("Unit Measures"); + commonCreate("Material Units"); unitMeasureForm($type); unitMeasureNotValidation($type); - _log("Create Unit Measure Duplicate", "custom1"); + _log("Create Material Unit Duplicate", "custom1"); } function unitMeasureCreateEmpty(){ - commonCreate("Unit Measures"); + commonCreate("Material Units"); unitMeasureForm(""); - _assertExists(_div("Unit type name cannot be empty")); - _assert(_isVisible(_div("Unit type name cannot be empty"))); - _log("Create Unit Measure Empty", "custom1"); + _assertExists(_div("cannot be empty")); + _assert(_isVisible(_div("cannot be empty"))); + _log("Create Material Unit Empty", "custom1"); } function unitMeasureForm($name){ - _setValue(_textbox(0, _near(_span("Unit measure name"))), $name); - _removeFocus(_textbox(0, _near(_span("Unit measure name")))); + _setValue(_textbox(0, _near(_span("Name"))), $name); + _removeFocus(_textbox(0, _near(_span("Name")))); _click(_cell("Save & Continue")); } @@ -73,15 +73,15 @@ function unitMeasureNotValidation(){ function unitMeasureEdit($oldName, $newName, $cell){ commonEdit($oldName, $cell); unitMeasureForm($newName); - commonSaveValidation("Unit Measure", $newName); - _log("Edit the Unit Measure", "custom1"); + commonSaveValidation("Material Unit", $newName); + _log("Edit the Material Unit", "custom1"); } function unitMeasureAssign($UMeasure, $materialName){ materialFormCreate($materialName, $UMeasure); unitMeasureTryDeleteAssigned($UMeasure); materialFormDelete($materialName); - _log("Assign an Unit Measure to a material", "custom1"); + _log("Assign an Material Unit to a material", "custom1"); } function materialFormCreate($material, $measure){ @@ -96,7 +96,7 @@ function materialFormCreate($material, $measure){ } function unitMeasureTryDeleteAssigned($UMeasure){ - _click(_link("Unit Measures")); + _click(_link("Material Units")); _click(_image("ico_borrar1.png", _in(_cell(1, _near(_cell($UMeasure)))))); _assertNotExists(_cell("OK")); _assertNull(_cell("OK")); @@ -105,21 +105,21 @@ function unitMeasureTryDeleteAssigned($UMeasure){ } function unitMeasureCheckCode($unitMeasureName){ - commonConfigurationChangeCheckboxMainPreferences("Unit Measures"); + commonConfigurationChangeCheckboxMainPreferences("Material Units"); unitMeasureCreateWithoutCode($unitMeasureName); - commonConfigurationChangeCheckboxMainPreferences("Unit Measures"); + commonConfigurationChangeCheckboxMainPreferences("Material Units"); _log("Check code label", "custom1"); } function unitMeasureCreateWithoutCode($name){ - commonCreate("Unit Measures"); + commonCreate("Material Units"); unitMeasureForm($name); unitMeasureEmptyCodeValidation(); } function unitMeasureEmptyCodeValidation(){ - _assertExists(_div("Unit type code cannot be empty")); - _assert(_isVisible(_div("Unit type code cannot be empty"))); + _assertExists(_div("cannot be empty")); + _assert(_isVisible(_div("cannot be empty"))); } function materialFormDelete($materialName){ @@ -147,7 +147,7 @@ unitMeasureCreateEmpty(); unitMeasureEdit($UMeasureName, $UMeasureName2, 1); unitMeasureAssign($UMeasureName2, $materialName); unitMeasureCheckCode($UMeasureName); -commonDelete("Unit Measures", $UMeasureName2, 1); -commonDeleteValidation("Unit Measure", $UMeasureName2); -_log("Delete the Unit Measure", "custom1"); +commonDelete("Material Units", $UMeasureName2, 1); +commonDeleteValidation("Material Unit", $UMeasureName2); +_log("Delete the Material Unit", "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 60cc6c09b..dfa0f67dd 100644 --- a/scripts/functional-tests/data-types/work_hours_test.sah +++ b/scripts/functional-tests/data-types/work_hours_test.sah @@ -1,7 +1,7 @@ /* * This file is part of LibrePlan * - * Copyright (C) 2011 Igalia, S.L. + * Copyright (C) 2011-2012 Igalia, S.L. * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU Affero General Public License as published by @@ -19,62 +19,62 @@ /* Included tests * - * 1 - Create a new Work Hour - * 2 - Create a Work Hour with duplicate name (it should be a failure) - * 3 - Create a Work Hour with empty name (it should be a failure) - * 4 - Edit a Work Hour + * 1 - Create a new Hours Type + * 2 - Create a Hours Type with duplicate name (it should be a failure) + * 3 - Create a Hours Type with empty name (it should be a failure) + * 4 - Edit a Hours Type * 5 - Assign a work Hour to a project with Work Report Model * 5.1 - Create a new Work Report Models * 5.2 - Create a new proyect * 5.3 - Create a new Machine * 5.4 - Create a new Work Report and assign our Work hour and Work Report Models - * 5.5 - Try to delete the assigned Work Hour (it should be a failure) + * 5.5 - Try to delete the assigned Hours Type (it should be a failure) * 5.6 - Try to delete the assigned Work Report Models (it should be a failure) * 5.7 - Try to delete the project (it should be a failure) * 5.8 - Delete the Work Report * 5.9 - Delete the project * 5.10 - Delete the machine * 5.11 - Delete the work report model - * 6 - Delete Work Hour + * 6 - Delete Hours Type * 7 - Check code * 7.1 - Change configuration - * 7.2 - Try to create a new Work Hour without Code (it should be a failure) + * 7.2 - Try to create a new Hours Type without Code (it should be a failure) * 7.3 - Change configuration like before * 8 - Assign a work Hour to a Cost Category - * 8.1 - Create a Work Hour again - * 8.2 - Create a Cost Category and associate our Work Hour - * 8.3 - Try to delete the Work Hour + * 8.1 - Create a Hours Type again + * 8.2 - Create a Cost Category and associate our Hours Type + * 8.3 - Try to delete the Hours Type * 8.4 - Delete the Cost Category - * 8.5 - Delete the Work Hour + * 8.5 - Delete the Hours Type */ _include("../common_functions.sah"); function workHourCreateDuplicateType($type, $price){ - commonCreate("Work Hours"); + commonCreate("Hours Types"); commonWorkHourForm($type, $price); workHourNotValid($type); - _log("Do not allow create a duplicate Work Hour", "custom1"); + _log("Do not allow create a duplicate Hours Type", "custom1"); } function workHourCreateEmpty(){ - commonCreate("Work Hours"); + commonCreate("Hours Types"); commonWorkHourForm("", 10); _assertExists(_div("cannot be empty")); _assert(_isVisible(_div("cannot be empty"))); - _log("Do not allow create a empty Work Hour", "custom1"); + _log("Do not allow create a empty Hours Type", "custom1"); } /* test to check a that LibrePlan give us a error */ function workHourNotValid($hWorkType){ - _assertExists(_span("checkConstraintUniqueName: the type of work hours name has to be unique. It is already used")); - _assert(_isVisible(_span("checkConstraintUniqueName: the type of work hours name has to be unique. It is already used"))); + _assertExists(_span("the type of work hours name has to be unique. It is already used")); + _assert(_isVisible(_span("the type of work hours name has to be unique. It is already used"))); } function workHourEdit($oldName, $newName, $hWorkPrice, $cell) { commonEdit($oldName, $cell); commonWorkHourForm($newName, $hWorkPrice); - commonSaveValidation("Type of hours", $newName); - _log("Edit the Work Hour", "custom1"); + commonSaveValidation("Hours Type", $newName); + _log("Edit the Hours Type", "custom1"); } function workHourAssign($hWorkNewName, $ModelName, $materialName, $materialDescription){ @@ -82,7 +82,7 @@ function workHourAssign($hWorkNewName, $ModelName, $materialName, $materialDescr commonCreateProject("new project"); commonMachineCreate($materialName, $materialDescription); workReportCreate($materialName, "new project", $hWorkNewName, $ModelName); - workHourTryDelete($hWorkNewName, "work report line"); + workHourTryDelete($hWorkNewName, "timesheet line"); reportModelTryDelete($ModelName); commonTryDeleteProject("new project"); commonWorkReportDelete($ModelName); @@ -93,23 +93,23 @@ function workHourAssign($hWorkNewName, $ModelName, $materialName, $materialDescr } function workHourTryDelete($hWorkNewName,$something){ - _click(_link("Work Hours")); - _click(_image("ico_borrar1.png", _in(_cell(4, _near(_cell($hWorkNewName)))))); + _click(_link("Hours Types")); + _click(_image("ico_borrar1.png", _in(_cell(8, _near(_cell($hWorkNewName)))))); _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", "custom1"); + _log("Do not allow delete the Hours Type", "custom1"); } function workHourCheckCode($workHourName){ - commonConfigurationChangeCheckboxMainPreferences("Types of work hours"); + commonConfigurationChangeCheckboxMainPreferences("Hours Types"); workHourCreateWithoutCode($workHourName); - commonConfigurationChangeCheckboxMainPreferences("Types of work hours"); + commonConfigurationChangeCheckboxMainPreferences("Hours Types"); _log("Check code label", "custom1"); } function workHourCreateWithoutCode($type){ - commonCreate("Work Hours"); + commonCreate("Hours Types"); commonWorkHourForm($type); commonEmptyCodeValidation(); } @@ -119,10 +119,10 @@ function workHourCreateWithoutCode($type){ * */ function reportModelTryDelete($ModelName){ - _click(_link("Work Report Models")); + _click(_link("Timesheets Templates")); _click(_image("ico_borrar1.png", _in(_cell(1, _near(_cell($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."))); + _assertExists(_span("Cannot delete timesheet template. There are some timesheets bound to it.")); + _assert(_isVisible(_span("Cannot delete timesheet template. There are some timesheets bound to it."))); _click(_cell("OK")); _log("Do not allow delete Work Report Model", "custom1"); } @@ -132,31 +132,31 @@ function reportModelTryDelete($ModelName){ * */ function workReportCreate($wReport, $project, $workHour, $modelName) { - _click(_link("Work Reports")); + _click(_link("Timesheets")); workReportForm($wReport, $project, $workHour, $modelName); _log("Create a Work Report", "custom1"); } function workReportForm($machine, $project, $workHour, $modelName) { - _setSelected(_select(0, _near(_span("Select type:"))), $modelName); - _click(_cell("New work report")); + _setSelected(_select(0, _near(_span("Select template:"))), $modelName); + _click(_cell("New timesheet")); _click(_cell("Add new row")); - _setValue(_textbox(2, _near(_span("Work report lines"))), $machine); - _click(_italic(0, _near(_textbox(3, _near(_span("Work report lines")))))); + _setValue(_textbox(2, _near(_span("Timesheet lines"))), $machine); + _click(_italic(0, _near(_textbox(3, _near(_span("Timesheet lines")))))); _click(_div($project+"[2]", _parentTable(_div("Project code[1]")))); _setValue(_textbox("z-textbox[1]"), "8"); _setSelected(_select(2), $workHour); _click(_cell("Save")); - _assertExists(_div("Work report saved")); - _assert(_isVisible(_div("Work report saved"))); + _assertExists(_div("Timesheet saved")); + _assert(_isVisible(_div("Timesheet saved"))); } function commonTryDeleteProject($name){ - _click(_link("Projects List")); + _click(_link("Projects")); _click(_image("ico_borrar1.png", _in(_cell(8, _near(_cell($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"))); + _assertExists(_div("You can not remove the project \"new project\" because it has time tracked at some of its tasks")); + _assert(_isVisible(_div("You can not remove the project \"new project\" because it has time tracked at some of its tasks"))); _log("Do not allow delete Work Report", "custom1"); } @@ -186,7 +186,7 @@ commonLogin("admin", "admin"); commonWorkHourCreate($hWorkName, $hWorkPrice); workHourCreateDuplicateType($hWorkName, $hWorkPrice); workHourCreateEmpty(); -workHourEdit($hWorkName, $hWorkNewName, $hWorkPrice, 4); +workHourEdit($hWorkName, $hWorkNewName, $hWorkPrice, 8); workHourAssign($hWorkNewName, $ModelName, $materialName, $materialDescription); workHourCheckCode($hWorkName); commonWorkHourDelete($hWorkNewName); diff --git a/scripts/functional-tests/data-types/work_report_model.sah b/scripts/functional-tests/data-types/work_report_model.sah index 39ae96058..fa29141b5 100644 --- a/scripts/functional-tests/data-types/work_report_model.sah +++ b/scripts/functional-tests/data-types/work_report_model.sah @@ -1,7 +1,7 @@ /* * This file is part of LibrePlan * - * Copyright (C) 2011 Igalia, S.L. + * Copyright (C) 2011-2012 Igalia, S.L. * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU Affero General Public License as published by @@ -40,24 +40,24 @@ _include("../common_functions.sah"); function workReportModelCreate($name){ - commonCreate("Work Report Models"); + commonCreate("Timesheets Templates"); workReportModelForm($name); - commonSaveValidation("Work Report Type", $name); + commonSaveValidation("Timesheets Template", $name); _log("Create a new Work Report Model", "custom1"); } function workReportModelCreateDuplicateName($name){ - commonCreate("Work Report Models"); + commonCreate("Timesheets Templates"); workReportModelForm($name); workReportModelNotValid(); _log("Do not allow create a duplicate Work Report Model", "custom1"); } function workReportModelCreateEmpty(){ - commonCreate("Work Report Models"); + commonCreate("Timesheets Templates"); workReportModelForm(""); - _assertExists(_div("the name must be not null or not empty")); - _assert(_isVisible(_div("the name must be not null or not empty"))); + _assertExists(_div("name cannot be empty")); + _assert(_isVisible(_div("name cannot be empty"))); _log("Do not allow create Work Report Model without name", "custom1"); } @@ -73,14 +73,14 @@ function workReportModelForm($name){ /* test to check a that LibrePlan give us a error */ function workReportModelNotValid(){ - _assertExists(_div("There exists other workReportType with the same name.")); - _assert(_isVisible(_div("There exists other workReportType with the same name."))); + _assertExists(_div("There is another timesheet template with the same name")); + _assert(_isVisible(_div("There is another timesheet template with the same name"))); } function workReportModelEdit($oldName, $newName, $cell){ commonEdit($oldName, $cell); workReportModelEditForm($newName); - commonSaveValidation("Work Report Type", $newName); + commonSaveValidation("Timesheets Template", $newName); _log("Edit a Work Report Model", "custom1"); } @@ -91,9 +91,9 @@ function workReportModelEditForm($name){ } function workReportModelCheckCode($name){ - commonConfigurationChangeCheckboxMainPreferences("Work report types"); + commonConfigurationChangeCheckboxMainPreferences("Timesheet templates"); workReportModelCreateWithoutCode($name); - commonConfigurationChangeCheckboxMainPreferences("Work report types"); + commonConfigurationChangeCheckboxMainPreferences("Timesheet templates"); _log("Check code label", "custom1"); } @@ -105,18 +105,18 @@ function workReportModelCheckValues($name, $name2){ } function workReportModelCreateWithoutCode($type){ - commonCreate("Work Report Models"); + commonCreate("Timesheets Templates"); workReportModelForm($type); workReportModelEmptyCodeValidation(); } function workReportModelEmptyCodeValidation(){ - _assertExists(_div("the code must be not null or not empty")); - _assert(_isVisible(_div("the code must be not null or not empty"))); + _assertExists(_div("Code cannot be empty")); + _assert(_isVisible(_div("Code cannot be empty"))); } function workReportModelCheckComplementaryTextFields($name){ - commonCreate("Work Report Models"); + commonCreate("Timesheets Templates"); _setValue(_textbox(0, _near(_span("Name"))), $name); _removeFocus(_textbox(0, _near(_div("Name")))); _click(_cell("Add New Complementary Field")); @@ -130,18 +130,18 @@ function workReportModelCheckComplementaryTextFields($name){ } function workReportModelCheckComplementaryTextFieldsValidationName(){ - _assertExists(_div("The field name must be unique, not null and not empty")); - _assert(_isVisible(_div("The field name must be unique, not null and not empty"))); + _assertExists(_div("The field name must be unique and not empty")); + _assert(_isVisible(_div("The field name must be unique and not empty"))); } function workReportModelCheckComplementaryTextFieldsValidationLength(){ - _assertExists(_div("The length must be greater than 0, and not null.")); - _assert(_isVisible(_div("The length must be greater than 0, and not null."))) + _assertExists(_div("The length must be greater than 0 and not empty")); + _assert(_isVisible(_div("The length must be greater than 0 and not empty"))) } function workReportModelCheckLabelTypeFields($name){ commonLabelCreate("labelforModel",["New"]); - commonCreate("Work Report Models"); + commonCreate("Timesheets Templates"); _setValue(_textbox(0, _near(_span("Name"))), $name); _removeFocus(_textbox(0, _near(_div("Name")))); _click(_cell("Add New Label Type Field")); @@ -180,10 +180,10 @@ workReportModelEdit($workReportModelName, $workReportModelNewName, 1); workReportModelCheckCode($workReportModelName); workReportModelCheckValues($workReportModelName, $workReportModelName2); -commonDelete("Work Report Models", $workReportModelNewName, 1); -commonDeleteValidation("Work Report Type", $workReportModelNewName); -commonDelete("Work Report Models", $workReportModelName, 1); -commonDeleteValidation("Work Report Type", $workReportModelName); +commonDelete("Timesheets Templates", $workReportModelNewName, 1); +commonDeleteValidation("Timesheets Template", $workReportModelNewName); +commonDelete("Timesheets Templates", $workReportModelName, 1); +commonDeleteValidation("Timesheets Template", $workReportModelName); _log("Delete the Work Report Model", "custom1"); commonLogout(); diff --git a/scripts/functional-tests/resources/subcontracting_test.sah b/scripts/functional-tests/resources/subcontracting_test.sah index 88855df62..96e84ce69 100644 --- a/scripts/functional-tests/resources/subcontracting_test.sah +++ b/scripts/functional-tests/resources/subcontracting_test.sah @@ -1,7 +1,7 @@ /* * This file is part of LibrePlan * - * Copyright (C) 2011 Igalia, S.L. + * Copyright (C) 2011-2012 Igalia, S.L. * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU Affero General Public License as published by @@ -82,7 +82,7 @@ function subcontractingCheckAssignedProgress($projectName){ function subcontractingDeleteAllRequiredElements(){ commonDeleteProject($projectName); - _click(_link("Projects List")); + _click(_link("Projects")); _click(_image("ico_borrar1.png", _in(_cell(8, _near(_cell($subProjectName)))))); _click(_cell("OK")); subcontractingDeleteValidation(); diff --git a/scripts/functional-tests/resources/work_report_test.sah b/scripts/functional-tests/resources/work_report_test.sah index c65f4cae1..78dcfcce6 100644 --- a/scripts/functional-tests/resources/work_report_test.sah +++ b/scripts/functional-tests/resources/work_report_test.sah @@ -1,7 +1,7 @@ /* * This file is part of LibrePlan * - * Copyright (C) 2011 Igalia, S.L. + * Copyright (C) 2011-2012 Igalia, S.L. * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU Affero General Public License as published by @@ -40,9 +40,9 @@ _include("../common_functions.sah"); function workReportCreateLineModel($modelName){ workReportModelLineCreate($modelName); - _click(_link("Work Reports")); - _setSelected(_select(0, _near(_span("Select type:"))), $modelName); - _click(_cell("New work report")); + _click(_link("Timesheets")); + _setSelected(_select(0, _near(_span("Select template:"))), $modelName); + _click(_cell("New timesheet")); _click(_cell("Save")); workReportAcctionValidation("saved"); _log("Create a new work report from a model type line", "custom1"); @@ -66,9 +66,9 @@ function workReportModelLineForm($name){ function workReportCreateHeadingModel($modelName){ workReportModelHeadingCreate($modelName); - _click(_link("Work Reports")); - _setSelected(_select(0, _near(_span("Select type:"))), $modelName); - _click(_cell("New work report")); + _click(_link("Timesheets")); + _setSelected(_select(0, _near(_span("Select template:"))), $modelName); + _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"); @@ -97,8 +97,8 @@ function workReportEdit($name){ } function workReportEditForm($name){ - _click(_link("Work Reports")); - commonEdit($name, 4); + _click(_link("Timesheets")); + commonEdit($name, 5); _click(_cell("Add new row")); _click(_cell("Save")); workReportResourceValidation(); diff --git a/scripts/functional-tests/scheduling/templates_test.sah b/scripts/functional-tests/scheduling/templates_test.sah index bb94a7df5..d1626e746 100644 --- a/scripts/functional-tests/scheduling/templates_test.sah +++ b/scripts/functional-tests/scheduling/templates_test.sah @@ -1,7 +1,7 @@ /* * This file is part of LibrePlan * - * Copyright (C) 2011 Igalia, S.L. + * Copyright (C) 2011-2012 Igalia, S.L. * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU Affero General Public License as published by @@ -35,7 +35,7 @@ _include("../common_functions.sah"); function templateProjectCreateTemplate($projectName, $template){ - _click(_link("Projects List")); + _click(_link("Projects")); _click(_image("ico_derived1.png", _in(_cell(8,_near(_cell($projectName)))))); _setValue(_textbox(0, _near(_span("Name"))), $template); _click(_cell("Save & Continue")); @@ -44,7 +44,7 @@ function templateProjectCreateTemplate($projectName, $template){ } function templateProjectAssignTemplate($template){ - _click(_link("Projects List")); + _click(_link("Projects")); _click(_image("ico_add.png")); _setValue(_textbox(0, _near(_span("Name"))), "ProjectTemplate"); _click(_italic(0, _cell("z-caption-l"))); @@ -112,13 +112,13 @@ function templateDelete($name){ function templateProjectCheckAssigned($projectTemplate){ - _click(_link("Projects List")); + _click(_link("Projects")); _assertExists(_span($projectTemplate)); _assert(_isVisible(_span($projectTemplate))); } function templateTaskCheckAssignedValidation($totalTaskhours){ - _click(_link("Projects List")); + _click(_link("Projects")); _assertExists(_div($totalTaskhours)); _assert(_isVisible(_div($totalTaskhours))); }