Fix data types functional tests
Lots of changes due to several reasons: * Menu revamp * String fixes * UI changes FEA: ItEr76S04BugFixing
This commit is contained in:
parent
1900a39a0e
commit
e8822273ef
13 changed files with 191 additions and 191 deletions
|
|
@ -1,7 +1,7 @@
|
||||||
/*
|
/*
|
||||||
* This file is part of LibrePlan
|
* 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
|
* 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
|
* it under the terms of the GNU Affero General Public License as published by
|
||||||
|
|
@ -188,7 +188,7 @@ function configCheckCalendarWorker($name){
|
||||||
}
|
}
|
||||||
|
|
||||||
function configCheckCalendarProject($name){
|
function configCheckCalendarProject($name){
|
||||||
_click(_link("Projects List"));
|
_click(_link("Projects"));
|
||||||
_click(_image("ico_add.png"));
|
_click(_image("ico_add.png"));
|
||||||
if (_condition(_textbox(0, _near(_span("Calendar"))).value == $name)){
|
if (_condition(_textbox(0, _near(_span("Calendar"))).value == $name)){
|
||||||
_log("The correct calendar is assigned", "custom1");
|
_log("The correct calendar is assigned", "custom1");
|
||||||
|
|
|
||||||
|
|
@ -1,7 +1,7 @@
|
||||||
/*
|
/*
|
||||||
* This file is part of LibrePlan
|
* 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
|
* 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
|
* 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){
|
function qualityFormAssingProject($qualityFormName, $project){
|
||||||
_click(_link("Projects List"));
|
_click(_link("Projects"));
|
||||||
_click(_image("ico_editar1.png", _in(_cell(8,_near(_cell($project))))));
|
_click(_image("ico_editar1.png", _in(_cell(8,_near(_cell($project))))));
|
||||||
_click(_span("Task quality forms"));
|
_click(_span("Task quality forms"));
|
||||||
_click(_italic(0, _near(_span("Assign quality form"))));
|
_click(_italic(0, _near(_span("Assign quality form"))));
|
||||||
|
|
|
||||||
|
|
@ -1,7 +1,7 @@
|
||||||
/*
|
/*
|
||||||
* This file is part of LibrePlan
|
* 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
|
* 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
|
* 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 */
|
/* Create new project */
|
||||||
function commonCreateProject($name, $calendar){
|
function commonCreateProject($name, $calendar){
|
||||||
_click(_link("Projects List"));
|
_click(_link("Projects"));
|
||||||
_click(_image("ico_add.png"));
|
_click(_image("ico_add.png"));
|
||||||
_setValue(_textbox(0, _near(_span("Name"))), $name);
|
_setValue(_textbox(0, _near(_span("Name"))), $name);
|
||||||
if ($calendar != null){
|
if ($calendar != null){
|
||||||
|
|
@ -62,13 +62,13 @@ function commonCreateProject($name, $calendar){
|
||||||
}
|
}
|
||||||
|
|
||||||
function commonEditProject($name){
|
function commonEditProject($name){
|
||||||
_click(_link("Projects List"));
|
_click(_link("Projects"));
|
||||||
_click(_image("ico_editar1.png", _in(_cell(8,_near(_cell($name))))));
|
_click(_image("ico_editar1.png", _in(_cell(8,_near(_cell($name))))));
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Delete a project */
|
/* Delete a project */
|
||||||
function commonDeleteProject($name){
|
function commonDeleteProject($name){
|
||||||
_click(_link("Projects List"));
|
_click(_link("Projects"));
|
||||||
_click(_image("ico_borrar1.png", _in(_cell(8, _near(_cell($name))))));
|
_click(_image("ico_borrar1.png", _in(_cell(8, _near(_cell($name))))));
|
||||||
_click(_cell("OK"));
|
_click(_cell("OK"));
|
||||||
_assertExists(_div("Removed "+$name));
|
_assertExists(_div("Removed "+$name));
|
||||||
|
|
@ -78,7 +78,7 @@ function commonDeleteProject($name){
|
||||||
|
|
||||||
/* Create a task in a project */
|
/* Create a task in a project */
|
||||||
function commonCreateTask($projectName, $name, $hours){
|
function commonCreateTask($projectName, $name, $hours){
|
||||||
_click(_link("Projects List"));
|
_click(_link("Projects"));
|
||||||
_click(_image("ico_editar1.png", _in(_cell(8,_near(_cell($projectName))))));
|
_click(_image("ico_editar1.png", _in(_cell(8,_near(_cell($projectName))))));
|
||||||
_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);
|
||||||
|
|
@ -89,7 +89,7 @@ function commonCreateTask($projectName, $name, $hours){
|
||||||
}
|
}
|
||||||
|
|
||||||
function commonConfigurationChangeCheckboxMainPreferences($element){
|
function commonConfigurationChangeCheckboxMainPreferences($element){
|
||||||
_click(_link("LibrePlan Configuration"));
|
_click(_link("Main Settings"));
|
||||||
_click(_checkbox(0, _near(_label($element))));
|
_click(_checkbox(0, _near(_label($element))));
|
||||||
_click(_cell("Save"));
|
_click(_cell("Save"));
|
||||||
commonSaveConfigurationValidation();
|
commonSaveConfigurationValidation();
|
||||||
|
|
@ -298,14 +298,14 @@ function commonVirtualWorkerAcctionValidation($action){
|
||||||
*/
|
*/
|
||||||
|
|
||||||
function commonWorkReportDelete ($name){
|
function commonWorkReportDelete ($name){
|
||||||
commonDelete("Work Reports", $name, 4);
|
commonDelete("Timesheets", $name, 5);
|
||||||
commonWorkReportDeleteValidation();
|
commonWorkReportDeleteValidation();
|
||||||
_log("Delete the work report", "custom1");
|
_log("Delete the work report", "custom1");
|
||||||
}
|
}
|
||||||
|
|
||||||
function commonWorkReportDeleteValidation (){
|
function commonWorkReportDeleteValidation (){
|
||||||
_assertExists(_span("Work report removed successfully"));
|
_assertExists(_span("Timesheet removed successfully"));
|
||||||
_assert(_isVisible(_span("Work report removed successfully")));
|
_assert(_isVisible(_span("Timesheet removed successfully")));
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|
|
@ -409,7 +409,7 @@ function commonCostCategoryTryDeleteAssignedCostCategory($cCategory, $cell){
|
||||||
*/
|
*/
|
||||||
|
|
||||||
function commonProgressCreate($name) {
|
function commonProgressCreate($name) {
|
||||||
commonCreate("Progress");
|
commonCreate("Progress Types");
|
||||||
commonProgressForm($name);
|
commonProgressForm($name);
|
||||||
commonSaveValidation("Progress Type", $name);
|
commonSaveValidation("Progress Type", $name);
|
||||||
_log("Create a progress", "custom1");
|
_log("Create a progress", "custom1");
|
||||||
|
|
@ -425,7 +425,7 @@ function commonProgressForm($name) {
|
||||||
function commonProgressAssigned($projectName, $progressNewName){
|
function commonProgressAssigned($projectName, $progressNewName){
|
||||||
commonCreateProject($projectName);
|
commonCreateProject($projectName);
|
||||||
commonProgressAssignProject($projectName, $progressNewName);
|
commonProgressAssignProject($projectName, $progressNewName);
|
||||||
_click(_link("Progress"));
|
_click(_link("Progress Types"));
|
||||||
commonDeleteProject($projectName);
|
commonDeleteProject($projectName);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -435,14 +435,14 @@ function commonProgressAssignProject($projectName, $progressNewName){
|
||||||
_click(_cell("Add new progress assignment"));
|
_click(_cell("Add new progress assignment"));
|
||||||
_setValue(_textbox("z-combobox-inp", _near(_row("footer"))), $progressNewName);
|
_setValue(_textbox("z-combobox-inp", _near(_row("footer"))), $progressNewName);
|
||||||
_click(_cell("z-button-cm", _near(_textbox("z-combobox-inp"))));
|
_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(_image("ico_save.png"));
|
||||||
_click(_cell("OK"));
|
_click(_cell("OK"));
|
||||||
_log("Progress assigned", "custom1");
|
_log("Progress assigned", "custom1");
|
||||||
}
|
}
|
||||||
|
|
||||||
function commonProgressDelete($name){
|
function commonProgressDelete($name){
|
||||||
commonDelete("Progress", $progressNewName, 3);
|
commonDelete("Progress Types", $progressNewName, 3);
|
||||||
commonDeleteValidation("Progress Type", $progressNewName);
|
commonDeleteValidation("Progress Type", $progressNewName);
|
||||||
_log("Delete the progress", "custom1");
|
_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){
|
function commonWorkReportModelCreate($name, $type){
|
||||||
commonCreate("Work Report Models");
|
commonCreate("Timesheets Templates");
|
||||||
commonWorkReportModelForm($name, $type);
|
commonWorkReportModelForm($name, $type);
|
||||||
commonSaveValidation("Work Report Type", $name);
|
commonSaveValidation("Timesheets Template", $name);
|
||||||
_log("Create a new Work Report Model", "custom1");
|
_log("Create a new Timesheet Model", "custom1");
|
||||||
}
|
}
|
||||||
|
|
||||||
function commonWorkReportModelForm($name, $type){
|
function commonWorkReportModelForm($name, $type){
|
||||||
|
|
@ -545,14 +545,14 @@ function commonWorkReportModelForm($name, $type){
|
||||||
function commonWorkReportModelEdit($oldName, $newName, $cell){
|
function commonWorkReportModelEdit($oldName, $newName, $cell){
|
||||||
commonEdit($oldName, $cell);
|
commonEdit($oldName, $cell);
|
||||||
commonWorkReportModelForm($newName);
|
commonWorkReportModelForm($newName);
|
||||||
commonSaveValidation("Work Report Type", $newName);
|
commonSaveValidation("Timesheets Template", $newName);
|
||||||
_log("Edit a Work Report Model", "custom1");
|
_log("Edit a Timesheet Model", "custom1");
|
||||||
}
|
}
|
||||||
|
|
||||||
function commonWorkReportModelDelete($name){
|
function commonWorkReportModelDelete($name){
|
||||||
commonDelete("Work Report Models", $name, 1);
|
commonDelete("Timesheets Templates", $name, 1);
|
||||||
commonDeleteValidation("Work Report Type", $name);
|
commonDeleteValidation("Timesheets Template", $name);
|
||||||
_log("Delete the Work Report Model", "custom1");
|
_log("Delete the Timesheet Model", "custom1");
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|
|
@ -560,10 +560,10 @@ function commonWorkReportModelDelete($name){
|
||||||
*/
|
*/
|
||||||
|
|
||||||
function commonWorkHourCreate($type, $price){
|
function commonWorkHourCreate($type, $price){
|
||||||
commonCreate("Work Hours");
|
commonCreate("Hours Types");
|
||||||
commonWorkHourForm($type, $price);
|
commonWorkHourForm($type, $price);
|
||||||
commonSaveValidation("Type of hours", $type);
|
commonSaveValidation("Hours Type", $type);
|
||||||
_log("Create a new Work Hour", "custom1");
|
_log("Create a new Hours Type", "custom1");
|
||||||
}
|
}
|
||||||
|
|
||||||
function commonWorkHourForm($name, $price){
|
function commonWorkHourForm($name, $price){
|
||||||
|
|
@ -573,7 +573,7 @@ function commonWorkHourForm($name, $price){
|
||||||
}
|
}
|
||||||
|
|
||||||
function commonWorkHourDelete($name){
|
function commonWorkHourDelete($name){
|
||||||
commonDelete("Work Hours", $name, 4);
|
commonDelete("Hours Types", $name, 8);
|
||||||
commonDeleteValidation("Type of hours", $name);
|
commonDeleteValidation("Hours Type", $name);
|
||||||
_log("Delete the Work Hour", "custom1");
|
_log("Delete the Hours Type", "custom1");
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -1,7 +1,7 @@
|
||||||
/*
|
/*
|
||||||
* This file is part of LibrePlan
|
* 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
|
* 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
|
* 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){
|
function criteriaCreateEmpty($type, $names){
|
||||||
commonCreate("Criteria");
|
commonCreate("Criteria");
|
||||||
commonCriteriaForm($type, $names);
|
commonCriteriaForm($type, $names);
|
||||||
_assertExists(_div("name: criterion type name not specified"));
|
_assertExists(_div("criterion type name not specified"));
|
||||||
_assert(_isVisible(_div("name: criterion type name not specified")));
|
_assert(_isVisible(_div("criterion type name not specified")));
|
||||||
_log("Do not allow create a criterion with empty type", "custom1");
|
_log("Do not allow create a criterion with empty type", "custom1");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -57,8 +57,8 @@ function criteriaCreateDuplicateName($type, $name){
|
||||||
_click(_cell("Add"));
|
_click(_cell("Add"));
|
||||||
_setValue(_textbox(0, _near(_span("New criterion"))), $name);
|
_setValue(_textbox(0, _near(_span("New criterion"))), $name);
|
||||||
_click(_cell("Add"));
|
_click(_cell("Add"));
|
||||||
_assertExists(_div("Already exists other criterion with the same name"));
|
_assertExists(_div("Already exists another criterion with the same name"));
|
||||||
_assert(_isVisible(_div("Already exists other 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");
|
_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 */
|
/* test to check a that LibrePlan give us a error */
|
||||||
function criteriaNotValid(){
|
function criteriaNotValid(){
|
||||||
_assertExists(_div("checkConstraintUniqueCriterionTypeName: criterion type name is already being used"));
|
_assertExists(_div("Criterion Type name is already being used"));
|
||||||
_assert(_isVisible(_div("checkConstraintUniqueCriterionTypeName: criterion type name is already being used")));
|
_assert(_isVisible(_div("Criterion Type name is already being used")));
|
||||||
}
|
}
|
||||||
|
|
||||||
function criteriaCheckCode($criteriaType){
|
function criteriaCheckCode($criteriaType){
|
||||||
commonConfigurationChangeCheckboxMainPreferences("Criterion");
|
commonConfigurationChangeCheckboxMainPreferences("Criteria");
|
||||||
criteriaCreateWithoutCode($criteriaType);
|
criteriaCreateWithoutCode($criteriaType);
|
||||||
commonConfigurationChangeCheckboxMainPreferences("Criterion");
|
commonConfigurationChangeCheckboxMainPreferences("Criteria");
|
||||||
_log("Check code label", "custom1");
|
_log("Check code label", "custom1");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -1,7 +1,7 @@
|
||||||
/*
|
/*
|
||||||
* This file is part of LibrePlan
|
* 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
|
* 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
|
* it under the terms of the GNU Affero General Public License as published by
|
||||||
|
|
@ -19,36 +19,36 @@
|
||||||
|
|
||||||
/* Included tests
|
/* Included tests
|
||||||
*
|
*
|
||||||
* 1 - Create a new Exception Day
|
* 1 - Create a new Calendar Exception Day
|
||||||
* 2 - Create a Exception Day with duplicate type (it should be a failure)
|
* 2 - Create a Calendar Exception Day with duplicate type (it should be a failure)
|
||||||
* 3 - Create a Exception Day with empty type (it should be a failure)
|
* 3 - Create a Calendar Exception Day with empty type (it should be a failure)
|
||||||
* 4 - Create a Exception Day with duplicate name (it should be a failure)
|
* 4 - Create a Calendar Exception Day with duplicate name (it should be a failure)
|
||||||
* 5 - Edit a Exception Day
|
* 5 - Edit a Calendar Exception Day
|
||||||
* 6 - Check code label
|
* 6 - Check code label
|
||||||
* 6.1 - Change configuration
|
* 6.1 - Change configuration
|
||||||
* 6.2 - Try to create a new Exception day without Code (it should be a failure)
|
* 6.2 - Try to create a new Exception day without Code (it should be a failure)
|
||||||
* 6.3 - Change configuration like before
|
* 6.3 - Change configuration like before
|
||||||
* 7 - Delete Exception Day
|
* 7 - Delete Calendar Exception Day
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
_include("../common_functions.sah");
|
_include("../common_functions.sah");
|
||||||
|
|
||||||
function exceptDayCreate($name, $standar, $color) {
|
function exceptDayCreate($name, $standar, $color) {
|
||||||
commonCreate("Exception Days");
|
commonCreate("Calendar Exception Days");
|
||||||
exceptDayForm($name, $standar, $color);
|
exceptDayForm($name, $standar, $color);
|
||||||
commonSaveValidation("Exception Day Type", $name);
|
commonSaveValidation("Calendar Exception Day", $name);
|
||||||
_log("Create a new Exception Day", "custom1");
|
_log("Create a new Calendar Exception Day", "custom1");
|
||||||
}
|
}
|
||||||
|
|
||||||
function exceptDayCreateDuplicateName($name, $standar, $color) {
|
function exceptDayCreateDuplicateName($name, $standar, $color) {
|
||||||
commonCreate("Exception Days");
|
commonCreate("Calendar Exception Days");
|
||||||
exceptDayForm($name, $standar, $color);
|
exceptDayForm($name, $standar, $color);
|
||||||
exceptDayNotValid($name);
|
exceptDayNotValid($name);
|
||||||
_log("Do not allow create an exception day with duplicate name", "custom1");
|
_log("Do not allow create an exception day with duplicate name", "custom1");
|
||||||
}
|
}
|
||||||
|
|
||||||
function exceptDayCreateEmpty($name, $standar, $color) {
|
function exceptDayCreateEmpty($name, $standar, $color) {
|
||||||
commonCreate("Exception Days");
|
commonCreate("Calendar Exception Days");
|
||||||
exceptDayForm($name, $standar, $color);
|
exceptDayForm($name, $standar, $color);
|
||||||
_assertExists(_div("cannot be empty"));
|
_assertExists(_div("cannot be empty"));
|
||||||
_assert(_isVisible(_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 */
|
/* test to check a that LibrePlan give us a error */
|
||||||
function exceptDayNotValid($ExceptDayName){
|
function exceptDayNotValid($ExceptDayName){
|
||||||
_assertExists(_span("checkConstraintUniqueName: name is already used"));
|
_assertExists(_span("name is already used"));
|
||||||
_assert(_isVisible(_span("checkConstraintUniqueName: name is already used")));
|
_assert(_isVisible(_span("name is already used")));
|
||||||
}
|
}
|
||||||
|
|
||||||
function exceptDayEdit($oldName, $newName, $cell){
|
function exceptDayEdit($oldName, $newName, $cell){
|
||||||
commonEdit($oldName, $cell);
|
commonEdit($oldName, $cell);
|
||||||
exceptDayFormSaveAndContinue($newName);
|
exceptDayFormSaveAndContinue($newName);
|
||||||
commonSaveValidation("Exception Day Type", $newName);
|
commonSaveValidation("Calendar Exception Day", $newName);
|
||||||
_log("Edit the exception day", "custom1");
|
_log("Edit the exception day", "custom1");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -86,14 +86,14 @@ function exceptDayFormSaveAndContinue($name){
|
||||||
}
|
}
|
||||||
|
|
||||||
function exceptDayCheckCode($exceptDayName){
|
function exceptDayCheckCode($exceptDayName){
|
||||||
commonConfigurationChangeCheckboxMainPreferences("Calendar exception types");
|
commonConfigurationChangeCheckboxMainPreferences("Calendar exception days");
|
||||||
exceptDayCreateWithoutCode($exceptDayName);
|
exceptDayCreateWithoutCode($exceptDayName);
|
||||||
commonConfigurationChangeCheckboxMainPreferences("Calendar exception types");
|
commonConfigurationChangeCheckboxMainPreferences("Calendar exception days");
|
||||||
_log("Check code label", "custom1");
|
_log("Check code label", "custom1");
|
||||||
}
|
}
|
||||||
|
|
||||||
function exceptDayCreateWithoutCode($name){
|
function exceptDayCreateWithoutCode($name){
|
||||||
commonCreate("Exception Days");
|
commonCreate("Calendar Exception Days");
|
||||||
exceptDayForm($name,"","");
|
exceptDayForm($name,"","");
|
||||||
commonEmptyCodeValidation();
|
commonEmptyCodeValidation();
|
||||||
}
|
}
|
||||||
|
|
@ -116,8 +116,8 @@ exceptDayEdit($exceptDayName, $exceptDayNewName, 5);
|
||||||
|
|
||||||
exceptDayCheckCode($exceptDayName);
|
exceptDayCheckCode($exceptDayName);
|
||||||
|
|
||||||
commonDelete("Exception Days", $exceptDayNewName, 5);
|
commonDelete("Calendar Exception Days", $exceptDayNewName, 5);
|
||||||
commonDeleteValidation("Exception Day Type", $exceptDayNewName);
|
commonDeleteValidation("Calendar Exception Day", $exceptDayNewName);
|
||||||
_log("Delete the exception day", "custom1");
|
_log("Delete the exception day", "custom1");
|
||||||
|
|
||||||
commonLogout();
|
commonLogout();
|
||||||
|
|
|
||||||
|
|
@ -1,7 +1,7 @@
|
||||||
/*
|
/*
|
||||||
* This file is part of LibrePlan
|
* 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
|
* 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
|
* 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 */
|
/* test to check a that LibrePlan give us a error */
|
||||||
function labelNotValid($labelType){
|
function labelNotValid($labelType){
|
||||||
_assertExists(_div("name: "+$labelType+" already exists"));
|
_assertExists(_div($labelType+" already exists"));
|
||||||
_assert(_isVisible(_div("name: "+$labelType+" already exists")));
|
_assert(_isVisible(_div($labelType+" already exists")));
|
||||||
}
|
}
|
||||||
|
|
||||||
function labelEdit($oldName, $newName, $cell){
|
function labelEdit($oldName, $newName, $cell){
|
||||||
|
|
@ -88,7 +88,7 @@ function labelAssig($project, $labelName, $labelType2){
|
||||||
}
|
}
|
||||||
|
|
||||||
function labelAssignProject($project){
|
function labelAssignProject($project){
|
||||||
_click(_link("Projects List"));
|
_click(_link("Projects"));
|
||||||
_click(_image("ico_editar1.png", _in(_cell(8, _near(_cell($project))))));
|
_click(_image("ico_editar1.png", _in(_cell(8, _near(_cell($project))))));
|
||||||
_click(_span("Label"));
|
_click(_span("Label"));
|
||||||
_click(_textbox(0, _near(_cell("Assign"))));
|
_click(_textbox(0, _near(_cell("Assign"))));
|
||||||
|
|
@ -109,9 +109,9 @@ function labeltryDelete($labelNewType){
|
||||||
}
|
}
|
||||||
|
|
||||||
function labelCheckCode($labelType, $labelName){
|
function labelCheckCode($labelType, $labelName){
|
||||||
commonConfigurationChangeCheckboxMainPreferences("Label");
|
commonConfigurationChangeCheckboxMainPreferences("Labels");
|
||||||
labelCreateWithoutCode($labelType, $labelName);
|
labelCreateWithoutCode($labelType, $labelName);
|
||||||
commonConfigurationChangeCheckboxMainPreferences("Label");
|
commonConfigurationChangeCheckboxMainPreferences("Labels");
|
||||||
_log("Check code label", "custom1");
|
_log("Check code label", "custom1");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -133,8 +133,8 @@ function labelFormEmptyCode($name, $labelName){
|
||||||
}
|
}
|
||||||
|
|
||||||
function labelEmptyCodeValidation(){
|
function labelEmptyCodeValidation(){
|
||||||
_assertExists(_div("code: code not specified"));
|
_assertExists(_div("code not specified"));
|
||||||
_assert(_isVisible(_div("code: code not specified")));
|
_assert(_isVisible(_div("code not specified")));
|
||||||
}
|
}
|
||||||
|
|
||||||
/* test values */
|
/* test values */
|
||||||
|
|
|
||||||
|
|
@ -1,7 +1,7 @@
|
||||||
/*
|
/*
|
||||||
* This file is part of LibrePlan
|
* 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
|
* 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
|
* it under the terms of the GNU Affero General Public License as published by
|
||||||
|
|
@ -39,18 +39,18 @@
|
||||||
_include("../common_functions.sah");
|
_include("../common_functions.sah");
|
||||||
|
|
||||||
function progressCreateDuplicate($name) {
|
function progressCreateDuplicate($name) {
|
||||||
commonCreate("Progress");
|
commonCreate("Progress Types");
|
||||||
commonProgressForm($name);
|
commonProgressForm($name);
|
||||||
progressNotValid();
|
progressNotValid();
|
||||||
_log("Do not allow create a progress with duplicate name", "custom1");
|
_log("Do not allow create a progress with duplicate name", "custom1");
|
||||||
}
|
}
|
||||||
|
|
||||||
function progressCreateEmpty() {
|
function progressCreateEmpty() {
|
||||||
commonCreate("Progress");
|
commonCreate("Progress Types");
|
||||||
_click(_cell("Save"));
|
_click(_cell("Save"));
|
||||||
_assertExists(_div("The name is not valid, the name must not be null"));
|
_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")));
|
_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");
|
_log("Do not allow create a progress without name", "custom1");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -67,18 +67,18 @@ function progressCreateWrongPrecisson($name, $maxValue, $precission){
|
||||||
}
|
}
|
||||||
|
|
||||||
function progressPrecisson($name, $maxValue, $precission){
|
function progressPrecisson($name, $maxValue, $precission){
|
||||||
commonCreate("Progress");
|
commonCreate("Progress Types");
|
||||||
_setValue(_textbox(0, _near(_div("Unit name"))), $name);
|
_setValue(_textbox(0, _near(_div("Unit name"))), $name);
|
||||||
_removeFocus(_textbox(0, _near(_div("Unit name"))));
|
_removeFocus(_textbox(0, _near(_div("Unit name"))));
|
||||||
_setValue(_textbox(0, _near(_div("Default max value"))), $maxValue);
|
_setValue(_textbox(0, _near(_div("Default max value"))), $maxValue);
|
||||||
_setValue(_textbox(0, _near(_div("Precision"))), $precission);
|
_setValue(_textbox(0, _near(_div("Precision"))), $precission);
|
||||||
_click(_cell("Save"));
|
_click(_cell("Save"));
|
||||||
_assertExists(_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("Value is not valid, the Precision value must be less than the defalt max value.")));
|
_assert(_isVisible(_div("Invalid value. Precission value must be lower than the Default Max value.")));
|
||||||
}
|
}
|
||||||
|
|
||||||
function progressMaxValue($name, $maxValue, $precission){
|
function progressMaxValue($name, $maxValue, $precission){
|
||||||
commonCreate("Progress");
|
commonCreate("Progress Types");
|
||||||
_setValue(_textbox(0, _near(_div("Unit name"))), $name);
|
_setValue(_textbox(0, _near(_div("Unit name"))), $name);
|
||||||
_removeFocus(_textbox(0, _near(_div("Unit name"))));
|
_removeFocus(_textbox(0, _near(_div("Unit name"))));
|
||||||
_setValue(_textbox(0, _near(_div("Precision"))), $precission);
|
_setValue(_textbox(0, _near(_div("Precision"))), $precission);
|
||||||
|
|
@ -104,7 +104,7 @@ function progressTryEditDefault($defaultValue){
|
||||||
_assertNull(_cell("Progress Type \""+$fakeName+"\" saved"));
|
_assertNull(_cell("Progress Type \""+$fakeName+"\" saved"));
|
||||||
_assertExists(_div("Percentage"));
|
_assertExists(_div("Percentage"));
|
||||||
_assert(_isVisible(_div("Percentage")));
|
_assert(_isVisible(_div("Percentage")));
|
||||||
_click(_link("Progress"));
|
_click(_link("Progress Types"));
|
||||||
_log("Try to edit a default progress", "custom1");
|
_log("Try to edit a default progress", "custom1");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -1,7 +1,7 @@
|
||||||
/*
|
/*
|
||||||
* This file is part of LibrePlan
|
* 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
|
* 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
|
* it under the terms of the GNU Affero General Public License as published by
|
||||||
|
|
@ -19,48 +19,48 @@
|
||||||
|
|
||||||
/* Included tests
|
/* Included tests
|
||||||
*
|
*
|
||||||
* 1 - Create a new Unit Measure
|
* 1 - Create a new Material Unit
|
||||||
* 2 - Create a Unit Measure with duplicate type (it should be a failure)
|
* 2 - Create a Material Unit with duplicate type (it should be a failure)
|
||||||
* 3 - Create a Unit Measure with empty type (it should be a failure)
|
* 3 - Create a Material Unit with empty type (it should be a failure)
|
||||||
* 4 - Edit a Unit Measure
|
* 4 - Edit a Material Unit
|
||||||
* 5 - Assign a Unit Measure to a material
|
* 5 - Assign a Material Unit to a material
|
||||||
* 5.1 Create a material and assign the Unit
|
* 5.1 Create a material and assign the Unit
|
||||||
* 5.1 Try to delete the assigned Unit (it should be a failure)
|
* 5.1 Try to delete the assigned Unit (it should be a failure)
|
||||||
* 5.2 Delete the material
|
* 5.2 Delete the material
|
||||||
* 6 - Check code
|
* 6 - Check code
|
||||||
* 6.1 - Change configuration
|
* 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
|
* 6.3 - Change configuration like before
|
||||||
* 7 - Delete Unit Measure
|
* 7 - Delete Material Unit
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
_include("../common_functions.sah");
|
_include("../common_functions.sah");
|
||||||
|
|
||||||
function unitMeasureCreate($type){
|
function unitMeasureCreate($type){
|
||||||
commonCreate("Unit Measures");
|
commonCreate("Material Units");
|
||||||
unitMeasureForm($type);
|
unitMeasureForm($type);
|
||||||
commonSaveValidation("Unit Measure", $type);
|
commonSaveValidation("Material Unit", $type);
|
||||||
_log("Create a new Unit Measure", "custom1");
|
_log("Create a new Material Unit", "custom1");
|
||||||
}
|
}
|
||||||
|
|
||||||
function unitMeasureCreateDuplicate($type){
|
function unitMeasureCreateDuplicate($type){
|
||||||
commonCreate("Unit Measures");
|
commonCreate("Material Units");
|
||||||
unitMeasureForm($type);
|
unitMeasureForm($type);
|
||||||
unitMeasureNotValidation($type);
|
unitMeasureNotValidation($type);
|
||||||
_log("Create Unit Measure Duplicate", "custom1");
|
_log("Create Material Unit Duplicate", "custom1");
|
||||||
}
|
}
|
||||||
|
|
||||||
function unitMeasureCreateEmpty(){
|
function unitMeasureCreateEmpty(){
|
||||||
commonCreate("Unit Measures");
|
commonCreate("Material Units");
|
||||||
unitMeasureForm("");
|
unitMeasureForm("");
|
||||||
_assertExists(_div("Unit type name cannot be empty"));
|
_assertExists(_div("cannot be empty"));
|
||||||
_assert(_isVisible(_div("Unit type name cannot be empty")));
|
_assert(_isVisible(_div("cannot be empty")));
|
||||||
_log("Create Unit Measure Empty", "custom1");
|
_log("Create Material Unit Empty", "custom1");
|
||||||
}
|
}
|
||||||
|
|
||||||
function unitMeasureForm($name){
|
function unitMeasureForm($name){
|
||||||
_setValue(_textbox(0, _near(_span("Unit measure name"))), $name);
|
_setValue(_textbox(0, _near(_span("Name"))), $name);
|
||||||
_removeFocus(_textbox(0, _near(_span("Unit measure name"))));
|
_removeFocus(_textbox(0, _near(_span("Name"))));
|
||||||
_click(_cell("Save & Continue"));
|
_click(_cell("Save & Continue"));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -73,15 +73,15 @@ function unitMeasureNotValidation(){
|
||||||
function unitMeasureEdit($oldName, $newName, $cell){
|
function unitMeasureEdit($oldName, $newName, $cell){
|
||||||
commonEdit($oldName, $cell);
|
commonEdit($oldName, $cell);
|
||||||
unitMeasureForm($newName);
|
unitMeasureForm($newName);
|
||||||
commonSaveValidation("Unit Measure", $newName);
|
commonSaveValidation("Material Unit", $newName);
|
||||||
_log("Edit the Unit Measure", "custom1");
|
_log("Edit the Material Unit", "custom1");
|
||||||
}
|
}
|
||||||
|
|
||||||
function unitMeasureAssign($UMeasure, $materialName){
|
function unitMeasureAssign($UMeasure, $materialName){
|
||||||
materialFormCreate($materialName, $UMeasure);
|
materialFormCreate($materialName, $UMeasure);
|
||||||
unitMeasureTryDeleteAssigned($UMeasure);
|
unitMeasureTryDeleteAssigned($UMeasure);
|
||||||
materialFormDelete($materialName);
|
materialFormDelete($materialName);
|
||||||
_log("Assign an Unit Measure to a material", "custom1");
|
_log("Assign an Material Unit to a material", "custom1");
|
||||||
}
|
}
|
||||||
|
|
||||||
function materialFormCreate($material, $measure){
|
function materialFormCreate($material, $measure){
|
||||||
|
|
@ -96,7 +96,7 @@ function materialFormCreate($material, $measure){
|
||||||
}
|
}
|
||||||
|
|
||||||
function unitMeasureTryDeleteAssigned($UMeasure){
|
function unitMeasureTryDeleteAssigned($UMeasure){
|
||||||
_click(_link("Unit Measures"));
|
_click(_link("Material Units"));
|
||||||
_click(_image("ico_borrar1.png", _in(_cell(1, _near(_cell($UMeasure))))));
|
_click(_image("ico_borrar1.png", _in(_cell(1, _near(_cell($UMeasure))))));
|
||||||
_assertNotExists(_cell("OK"));
|
_assertNotExists(_cell("OK"));
|
||||||
_assertNull(_cell("OK"));
|
_assertNull(_cell("OK"));
|
||||||
|
|
@ -105,21 +105,21 @@ function unitMeasureTryDeleteAssigned($UMeasure){
|
||||||
}
|
}
|
||||||
|
|
||||||
function unitMeasureCheckCode($unitMeasureName){
|
function unitMeasureCheckCode($unitMeasureName){
|
||||||
commonConfigurationChangeCheckboxMainPreferences("Unit Measures");
|
commonConfigurationChangeCheckboxMainPreferences("Material Units");
|
||||||
unitMeasureCreateWithoutCode($unitMeasureName);
|
unitMeasureCreateWithoutCode($unitMeasureName);
|
||||||
commonConfigurationChangeCheckboxMainPreferences("Unit Measures");
|
commonConfigurationChangeCheckboxMainPreferences("Material Units");
|
||||||
_log("Check code label", "custom1");
|
_log("Check code label", "custom1");
|
||||||
}
|
}
|
||||||
|
|
||||||
function unitMeasureCreateWithoutCode($name){
|
function unitMeasureCreateWithoutCode($name){
|
||||||
commonCreate("Unit Measures");
|
commonCreate("Material Units");
|
||||||
unitMeasureForm($name);
|
unitMeasureForm($name);
|
||||||
unitMeasureEmptyCodeValidation();
|
unitMeasureEmptyCodeValidation();
|
||||||
}
|
}
|
||||||
|
|
||||||
function unitMeasureEmptyCodeValidation(){
|
function unitMeasureEmptyCodeValidation(){
|
||||||
_assertExists(_div("Unit type code cannot be empty"));
|
_assertExists(_div("cannot be empty"));
|
||||||
_assert(_isVisible(_div("Unit type code cannot be empty")));
|
_assert(_isVisible(_div("cannot be empty")));
|
||||||
}
|
}
|
||||||
|
|
||||||
function materialFormDelete($materialName){
|
function materialFormDelete($materialName){
|
||||||
|
|
@ -147,7 +147,7 @@ unitMeasureCreateEmpty();
|
||||||
unitMeasureEdit($UMeasureName, $UMeasureName2, 1);
|
unitMeasureEdit($UMeasureName, $UMeasureName2, 1);
|
||||||
unitMeasureAssign($UMeasureName2, $materialName);
|
unitMeasureAssign($UMeasureName2, $materialName);
|
||||||
unitMeasureCheckCode($UMeasureName);
|
unitMeasureCheckCode($UMeasureName);
|
||||||
commonDelete("Unit Measures", $UMeasureName2, 1);
|
commonDelete("Material Units", $UMeasureName2, 1);
|
||||||
commonDeleteValidation("Unit Measure", $UMeasureName2);
|
commonDeleteValidation("Material Unit", $UMeasureName2);
|
||||||
_log("Delete the Unit Measure", "custom1");
|
_log("Delete the Material Unit", "custom1");
|
||||||
commonLogout();
|
commonLogout();
|
||||||
|
|
|
||||||
|
|
@ -1,7 +1,7 @@
|
||||||
/*
|
/*
|
||||||
* This file is part of LibrePlan
|
* 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
|
* 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
|
* it under the terms of the GNU Affero General Public License as published by
|
||||||
|
|
@ -19,62 +19,62 @@
|
||||||
|
|
||||||
/* Included tests
|
/* Included tests
|
||||||
*
|
*
|
||||||
* 1 - Create a new Work Hour
|
* 1 - Create a new Hours Type
|
||||||
* 2 - Create a Work Hour with duplicate name (it should be a failure)
|
* 2 - Create a Hours Type with duplicate name (it should be a failure)
|
||||||
* 3 - Create a Work Hour with empty name (it should be a failure)
|
* 3 - Create a Hours Type with empty name (it should be a failure)
|
||||||
* 4 - Edit a Work Hour
|
* 4 - Edit a Hours Type
|
||||||
* 5 - Assign a work Hour to a project with Work Report Model
|
* 5 - Assign a work Hour to a project with Work Report Model
|
||||||
* 5.1 - Create a new Work Report Models
|
* 5.1 - Create a new Work Report Models
|
||||||
* 5.2 - Create a new proyect
|
* 5.2 - Create a new proyect
|
||||||
* 5.3 - Create a new Machine
|
* 5.3 - Create a new Machine
|
||||||
* 5.4 - Create a new Work Report and assign our Work hour and Work Report Models
|
* 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.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.7 - Try to delete the project (it should be a failure)
|
||||||
* 5.8 - Delete the Work Report
|
* 5.8 - Delete the Work Report
|
||||||
* 5.9 - Delete the project
|
* 5.9 - Delete the project
|
||||||
* 5.10 - Delete the machine
|
* 5.10 - Delete the machine
|
||||||
* 5.11 - Delete the work report model
|
* 5.11 - Delete the work report model
|
||||||
* 6 - Delete Work Hour
|
* 6 - Delete Hours Type
|
||||||
* 7 - Check code
|
* 7 - Check code
|
||||||
* 7.1 - Change configuration
|
* 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
|
* 7.3 - Change configuration like before
|
||||||
* 8 - Assign a work Hour to a Cost Category
|
* 8 - Assign a work Hour to a Cost Category
|
||||||
* 8.1 - Create a Work Hour again
|
* 8.1 - Create a Hours Type again
|
||||||
* 8.2 - Create a Cost Category and associate our Work Hour
|
* 8.2 - Create a Cost Category and associate our Hours Type
|
||||||
* 8.3 - Try to delete the Work Hour
|
* 8.3 - Try to delete the Hours Type
|
||||||
* 8.4 - Delete the Cost Category
|
* 8.4 - Delete the Cost Category
|
||||||
* 8.5 - Delete the Work Hour
|
* 8.5 - Delete the Hours Type
|
||||||
*/
|
*/
|
||||||
_include("../common_functions.sah");
|
_include("../common_functions.sah");
|
||||||
|
|
||||||
function workHourCreateDuplicateType($type, $price){
|
function workHourCreateDuplicateType($type, $price){
|
||||||
commonCreate("Work Hours");
|
commonCreate("Hours Types");
|
||||||
commonWorkHourForm($type, $price);
|
commonWorkHourForm($type, $price);
|
||||||
workHourNotValid($type);
|
workHourNotValid($type);
|
||||||
_log("Do not allow create a duplicate Work Hour", "custom1");
|
_log("Do not allow create a duplicate Hours Type", "custom1");
|
||||||
}
|
}
|
||||||
|
|
||||||
function workHourCreateEmpty(){
|
function workHourCreateEmpty(){
|
||||||
commonCreate("Work Hours");
|
commonCreate("Hours Types");
|
||||||
commonWorkHourForm("", 10);
|
commonWorkHourForm("", 10);
|
||||||
_assertExists(_div("cannot be empty"));
|
_assertExists(_div("cannot be empty"));
|
||||||
_assert(_isVisible(_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 */
|
/* test to check a that LibrePlan give us a error */
|
||||||
function workHourNotValid($hWorkType){
|
function workHourNotValid($hWorkType){
|
||||||
_assertExists(_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("checkConstraintUniqueName: 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) {
|
function workHourEdit($oldName, $newName, $hWorkPrice, $cell) {
|
||||||
commonEdit($oldName, $cell);
|
commonEdit($oldName, $cell);
|
||||||
commonWorkHourForm($newName, $hWorkPrice);
|
commonWorkHourForm($newName, $hWorkPrice);
|
||||||
commonSaveValidation("Type of hours", $newName);
|
commonSaveValidation("Hours Type", $newName);
|
||||||
_log("Edit the Work Hour", "custom1");
|
_log("Edit the Hours Type", "custom1");
|
||||||
}
|
}
|
||||||
|
|
||||||
function workHourAssign($hWorkNewName, $ModelName, $materialName, $materialDescription){
|
function workHourAssign($hWorkNewName, $ModelName, $materialName, $materialDescription){
|
||||||
|
|
@ -82,7 +82,7 @@ function workHourAssign($hWorkNewName, $ModelName, $materialName, $materialDescr
|
||||||
commonCreateProject("new project");
|
commonCreateProject("new project");
|
||||||
commonMachineCreate($materialName, $materialDescription);
|
commonMachineCreate($materialName, $materialDescription);
|
||||||
workReportCreate($materialName, "new project", $hWorkNewName, $ModelName);
|
workReportCreate($materialName, "new project", $hWorkNewName, $ModelName);
|
||||||
workHourTryDelete($hWorkNewName, "work report line");
|
workHourTryDelete($hWorkNewName, "timesheet line");
|
||||||
reportModelTryDelete($ModelName);
|
reportModelTryDelete($ModelName);
|
||||||
commonTryDeleteProject("new project");
|
commonTryDeleteProject("new project");
|
||||||
commonWorkReportDelete($ModelName);
|
commonWorkReportDelete($ModelName);
|
||||||
|
|
@ -93,23 +93,23 @@ function workHourAssign($hWorkNewName, $ModelName, $materialName, $materialDescr
|
||||||
}
|
}
|
||||||
|
|
||||||
function workHourTryDelete($hWorkNewName,$something){
|
function workHourTryDelete($hWorkNewName,$something){
|
||||||
_click(_link("Work Hours"));
|
_click(_link("Hours Types"));
|
||||||
_click(_image("ico_borrar1.png", _in(_cell(4, _near(_cell($hWorkNewName))))));
|
_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+"."));
|
_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+".")));
|
_assert(_isVisible(_span("Cannot delete type of work hours. It is being used at this moment in some "+$something+".")));
|
||||||
_click(_cell("OK"));
|
_click(_cell("OK"));
|
||||||
_log("Do not allow delete the Work Hour", "custom1");
|
_log("Do not allow delete the Hours Type", "custom1");
|
||||||
}
|
}
|
||||||
|
|
||||||
function workHourCheckCode($workHourName){
|
function workHourCheckCode($workHourName){
|
||||||
commonConfigurationChangeCheckboxMainPreferences("Types of work hours");
|
commonConfigurationChangeCheckboxMainPreferences("Hours Types");
|
||||||
workHourCreateWithoutCode($workHourName);
|
workHourCreateWithoutCode($workHourName);
|
||||||
commonConfigurationChangeCheckboxMainPreferences("Types of work hours");
|
commonConfigurationChangeCheckboxMainPreferences("Hours Types");
|
||||||
_log("Check code label", "custom1");
|
_log("Check code label", "custom1");
|
||||||
}
|
}
|
||||||
|
|
||||||
function workHourCreateWithoutCode($type){
|
function workHourCreateWithoutCode($type){
|
||||||
commonCreate("Work Hours");
|
commonCreate("Hours Types");
|
||||||
commonWorkHourForm($type);
|
commonWorkHourForm($type);
|
||||||
commonEmptyCodeValidation();
|
commonEmptyCodeValidation();
|
||||||
}
|
}
|
||||||
|
|
@ -119,10 +119,10 @@ function workHourCreateWithoutCode($type){
|
||||||
* */
|
* */
|
||||||
|
|
||||||
function reportModelTryDelete($ModelName){
|
function reportModelTryDelete($ModelName){
|
||||||
_click(_link("Work Report Models"));
|
_click(_link("Timesheets Templates"));
|
||||||
_click(_image("ico_borrar1.png", _in(_cell(1, _near(_cell($ModelName))))));
|
_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."));
|
_assertExists(_span("Cannot delete timesheet template. There are some timesheets bound to it."));
|
||||||
_assert(_isVisible(_span("Cannot delete work report type. There are some work reports bound to it.")));
|
_assert(_isVisible(_span("Cannot delete timesheet template. There are some timesheets bound to it.")));
|
||||||
_click(_cell("OK"));
|
_click(_cell("OK"));
|
||||||
_log("Do not allow delete Work Report Model", "custom1");
|
_log("Do not allow delete Work Report Model", "custom1");
|
||||||
}
|
}
|
||||||
|
|
@ -132,31 +132,31 @@ function reportModelTryDelete($ModelName){
|
||||||
* */
|
* */
|
||||||
|
|
||||||
function workReportCreate($wReport, $project, $workHour, $modelName) {
|
function workReportCreate($wReport, $project, $workHour, $modelName) {
|
||||||
_click(_link("Work Reports"));
|
_click(_link("Timesheets"));
|
||||||
workReportForm($wReport, $project, $workHour, $modelName);
|
workReportForm($wReport, $project, $workHour, $modelName);
|
||||||
_log("Create a Work Report", "custom1");
|
_log("Create a Work Report", "custom1");
|
||||||
}
|
}
|
||||||
|
|
||||||
function workReportForm($machine, $project, $workHour, $modelName) {
|
function workReportForm($machine, $project, $workHour, $modelName) {
|
||||||
_setSelected(_select(0, _near(_span("Select type:"))), $modelName);
|
_setSelected(_select(0, _near(_span("Select template:"))), $modelName);
|
||||||
_click(_cell("New work report"));
|
_click(_cell("New timesheet"));
|
||||||
_click(_cell("Add new row"));
|
_click(_cell("Add new row"));
|
||||||
_setValue(_textbox(2, _near(_span("Work report lines"))), $machine);
|
_setValue(_textbox(2, _near(_span("Timesheet lines"))), $machine);
|
||||||
_click(_italic(0, _near(_textbox(3, _near(_span("Work report lines"))))));
|
_click(_italic(0, _near(_textbox(3, _near(_span("Timesheet lines"))))));
|
||||||
_click(_div($project+"[2]", _parentTable(_div("Project code[1]"))));
|
_click(_div($project+"[2]", _parentTable(_div("Project code[1]"))));
|
||||||
_setValue(_textbox("z-textbox[1]"), "8");
|
_setValue(_textbox("z-textbox[1]"), "8");
|
||||||
_setSelected(_select(2), $workHour);
|
_setSelected(_select(2), $workHour);
|
||||||
_click(_cell("Save"));
|
_click(_cell("Save"));
|
||||||
_assertExists(_div("Work report saved"));
|
_assertExists(_div("Timesheet saved"));
|
||||||
_assert(_isVisible(_div("Work report saved")));
|
_assert(_isVisible(_div("Timesheet saved")));
|
||||||
}
|
}
|
||||||
|
|
||||||
function commonTryDeleteProject($name){
|
function commonTryDeleteProject($name){
|
||||||
_click(_link("Projects List"));
|
_click(_link("Projects"));
|
||||||
_click(_image("ico_borrar1.png", _in(_cell(8, _near(_cell($name))))));
|
_click(_image("ico_borrar1.png", _in(_cell(8, _near(_cell($name))))));
|
||||||
_click(_cell("OK"));
|
_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"));
|
_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 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 it has time tracked at some of its tasks")));
|
||||||
_log("Do not allow delete Work Report", "custom1");
|
_log("Do not allow delete Work Report", "custom1");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -186,7 +186,7 @@ commonLogin("admin", "admin");
|
||||||
commonWorkHourCreate($hWorkName, $hWorkPrice);
|
commonWorkHourCreate($hWorkName, $hWorkPrice);
|
||||||
workHourCreateDuplicateType($hWorkName, $hWorkPrice);
|
workHourCreateDuplicateType($hWorkName, $hWorkPrice);
|
||||||
workHourCreateEmpty();
|
workHourCreateEmpty();
|
||||||
workHourEdit($hWorkName, $hWorkNewName, $hWorkPrice, 4);
|
workHourEdit($hWorkName, $hWorkNewName, $hWorkPrice, 8);
|
||||||
workHourAssign($hWorkNewName, $ModelName, $materialName, $materialDescription);
|
workHourAssign($hWorkNewName, $ModelName, $materialName, $materialDescription);
|
||||||
workHourCheckCode($hWorkName);
|
workHourCheckCode($hWorkName);
|
||||||
commonWorkHourDelete($hWorkNewName);
|
commonWorkHourDelete($hWorkNewName);
|
||||||
|
|
|
||||||
|
|
@ -1,7 +1,7 @@
|
||||||
/*
|
/*
|
||||||
* This file is part of LibrePlan
|
* 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
|
* 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
|
* it under the terms of the GNU Affero General Public License as published by
|
||||||
|
|
@ -40,24 +40,24 @@
|
||||||
_include("../common_functions.sah");
|
_include("../common_functions.sah");
|
||||||
|
|
||||||
function workReportModelCreate($name){
|
function workReportModelCreate($name){
|
||||||
commonCreate("Work Report Models");
|
commonCreate("Timesheets Templates");
|
||||||
workReportModelForm($name);
|
workReportModelForm($name);
|
||||||
commonSaveValidation("Work Report Type", $name);
|
commonSaveValidation("Timesheets Template", $name);
|
||||||
_log("Create a new Work Report Model", "custom1");
|
_log("Create a new Work Report Model", "custom1");
|
||||||
}
|
}
|
||||||
|
|
||||||
function workReportModelCreateDuplicateName($name){
|
function workReportModelCreateDuplicateName($name){
|
||||||
commonCreate("Work Report Models");
|
commonCreate("Timesheets Templates");
|
||||||
workReportModelForm($name);
|
workReportModelForm($name);
|
||||||
workReportModelNotValid();
|
workReportModelNotValid();
|
||||||
_log("Do not allow create a duplicate Work Report Model", "custom1");
|
_log("Do not allow create a duplicate Work Report Model", "custom1");
|
||||||
}
|
}
|
||||||
|
|
||||||
function workReportModelCreateEmpty(){
|
function workReportModelCreateEmpty(){
|
||||||
commonCreate("Work Report Models");
|
commonCreate("Timesheets Templates");
|
||||||
workReportModelForm("");
|
workReportModelForm("");
|
||||||
_assertExists(_div("the name must be not null or not empty"));
|
_assertExists(_div("name cannot be empty"));
|
||||||
_assert(_isVisible(_div("the name must be not null or not empty")));
|
_assert(_isVisible(_div("name cannot be empty")));
|
||||||
_log("Do not allow create Work Report Model without name", "custom1");
|
_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 */
|
/* test to check a that LibrePlan give us a error */
|
||||||
function workReportModelNotValid(){
|
function workReportModelNotValid(){
|
||||||
_assertExists(_div("There exists other workReportType with the same name."));
|
_assertExists(_div("There is another timesheet template with the same name"));
|
||||||
_assert(_isVisible(_div("There exists other workReportType with the same name.")));
|
_assert(_isVisible(_div("There is another timesheet template with the same name")));
|
||||||
}
|
}
|
||||||
|
|
||||||
function workReportModelEdit($oldName, $newName, $cell){
|
function workReportModelEdit($oldName, $newName, $cell){
|
||||||
commonEdit($oldName, $cell);
|
commonEdit($oldName, $cell);
|
||||||
workReportModelEditForm($newName);
|
workReportModelEditForm($newName);
|
||||||
commonSaveValidation("Work Report Type", $newName);
|
commonSaveValidation("Timesheets Template", $newName);
|
||||||
_log("Edit a Work Report Model", "custom1");
|
_log("Edit a Work Report Model", "custom1");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -91,9 +91,9 @@ function workReportModelEditForm($name){
|
||||||
}
|
}
|
||||||
|
|
||||||
function workReportModelCheckCode($name){
|
function workReportModelCheckCode($name){
|
||||||
commonConfigurationChangeCheckboxMainPreferences("Work report types");
|
commonConfigurationChangeCheckboxMainPreferences("Timesheet templates");
|
||||||
workReportModelCreateWithoutCode($name);
|
workReportModelCreateWithoutCode($name);
|
||||||
commonConfigurationChangeCheckboxMainPreferences("Work report types");
|
commonConfigurationChangeCheckboxMainPreferences("Timesheet templates");
|
||||||
_log("Check code label", "custom1");
|
_log("Check code label", "custom1");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -105,18 +105,18 @@ function workReportModelCheckValues($name, $name2){
|
||||||
}
|
}
|
||||||
|
|
||||||
function workReportModelCreateWithoutCode($type){
|
function workReportModelCreateWithoutCode($type){
|
||||||
commonCreate("Work Report Models");
|
commonCreate("Timesheets Templates");
|
||||||
workReportModelForm($type);
|
workReportModelForm($type);
|
||||||
workReportModelEmptyCodeValidation();
|
workReportModelEmptyCodeValidation();
|
||||||
}
|
}
|
||||||
|
|
||||||
function workReportModelEmptyCodeValidation(){
|
function workReportModelEmptyCodeValidation(){
|
||||||
_assertExists(_div("the code must be not null or not empty"));
|
_assertExists(_div("Code cannot be empty"));
|
||||||
_assert(_isVisible(_div("the code must be not null or not empty")));
|
_assert(_isVisible(_div("Code cannot be empty")));
|
||||||
}
|
}
|
||||||
|
|
||||||
function workReportModelCheckComplementaryTextFields($name){
|
function workReportModelCheckComplementaryTextFields($name){
|
||||||
commonCreate("Work Report Models");
|
commonCreate("Timesheets Templates");
|
||||||
_setValue(_textbox(0, _near(_span("Name"))), $name);
|
_setValue(_textbox(0, _near(_span("Name"))), $name);
|
||||||
_removeFocus(_textbox(0, _near(_div("Name"))));
|
_removeFocus(_textbox(0, _near(_div("Name"))));
|
||||||
_click(_cell("Add New Complementary Field"));
|
_click(_cell("Add New Complementary Field"));
|
||||||
|
|
@ -130,18 +130,18 @@ function workReportModelCheckComplementaryTextFields($name){
|
||||||
}
|
}
|
||||||
|
|
||||||
function workReportModelCheckComplementaryTextFieldsValidationName(){
|
function workReportModelCheckComplementaryTextFieldsValidationName(){
|
||||||
_assertExists(_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, not null and not empty")));
|
_assert(_isVisible(_div("The field name must be unique and not empty")));
|
||||||
}
|
}
|
||||||
|
|
||||||
function workReportModelCheckComplementaryTextFieldsValidationLength(){
|
function workReportModelCheckComplementaryTextFieldsValidationLength(){
|
||||||
_assertExists(_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 null.")))
|
_assert(_isVisible(_div("The length must be greater than 0 and not empty")))
|
||||||
}
|
}
|
||||||
|
|
||||||
function workReportModelCheckLabelTypeFields($name){
|
function workReportModelCheckLabelTypeFields($name){
|
||||||
commonLabelCreate("labelforModel",["New"]);
|
commonLabelCreate("labelforModel",["New"]);
|
||||||
commonCreate("Work Report Models");
|
commonCreate("Timesheets Templates");
|
||||||
_setValue(_textbox(0, _near(_span("Name"))), $name);
|
_setValue(_textbox(0, _near(_span("Name"))), $name);
|
||||||
_removeFocus(_textbox(0, _near(_div("Name"))));
|
_removeFocus(_textbox(0, _near(_div("Name"))));
|
||||||
_click(_cell("Add New Label Type Field"));
|
_click(_cell("Add New Label Type Field"));
|
||||||
|
|
@ -180,10 +180,10 @@ workReportModelEdit($workReportModelName, $workReportModelNewName, 1);
|
||||||
workReportModelCheckCode($workReportModelName);
|
workReportModelCheckCode($workReportModelName);
|
||||||
workReportModelCheckValues($workReportModelName, $workReportModelName2);
|
workReportModelCheckValues($workReportModelName, $workReportModelName2);
|
||||||
|
|
||||||
commonDelete("Work Report Models", $workReportModelNewName, 1);
|
commonDelete("Timesheets Templates", $workReportModelNewName, 1);
|
||||||
commonDeleteValidation("Work Report Type", $workReportModelNewName);
|
commonDeleteValidation("Timesheets Template", $workReportModelNewName);
|
||||||
commonDelete("Work Report Models", $workReportModelName, 1);
|
commonDelete("Timesheets Templates", $workReportModelName, 1);
|
||||||
commonDeleteValidation("Work Report Type", $workReportModelName);
|
commonDeleteValidation("Timesheets Template", $workReportModelName);
|
||||||
_log("Delete the Work Report Model", "custom1");
|
_log("Delete the Work Report Model", "custom1");
|
||||||
|
|
||||||
commonLogout();
|
commonLogout();
|
||||||
|
|
|
||||||
|
|
@ -1,7 +1,7 @@
|
||||||
/*
|
/*
|
||||||
* This file is part of LibrePlan
|
* 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
|
* 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
|
* it under the terms of the GNU Affero General Public License as published by
|
||||||
|
|
@ -82,7 +82,7 @@ function subcontractingCheckAssignedProgress($projectName){
|
||||||
|
|
||||||
function subcontractingDeleteAllRequiredElements(){
|
function subcontractingDeleteAllRequiredElements(){
|
||||||
commonDeleteProject($projectName);
|
commonDeleteProject($projectName);
|
||||||
_click(_link("Projects List"));
|
_click(_link("Projects"));
|
||||||
_click(_image("ico_borrar1.png", _in(_cell(8, _near(_cell($subProjectName))))));
|
_click(_image("ico_borrar1.png", _in(_cell(8, _near(_cell($subProjectName))))));
|
||||||
_click(_cell("OK"));
|
_click(_cell("OK"));
|
||||||
subcontractingDeleteValidation();
|
subcontractingDeleteValidation();
|
||||||
|
|
|
||||||
|
|
@ -1,7 +1,7 @@
|
||||||
/*
|
/*
|
||||||
* This file is part of LibrePlan
|
* 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
|
* 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
|
* 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){
|
function workReportCreateLineModel($modelName){
|
||||||
workReportModelLineCreate($modelName);
|
workReportModelLineCreate($modelName);
|
||||||
_click(_link("Work Reports"));
|
_click(_link("Timesheets"));
|
||||||
_setSelected(_select(0, _near(_span("Select type:"))), $modelName);
|
_setSelected(_select(0, _near(_span("Select template:"))), $modelName);
|
||||||
_click(_cell("New work report"));
|
_click(_cell("New timesheet"));
|
||||||
_click(_cell("Save"));
|
_click(_cell("Save"));
|
||||||
workReportAcctionValidation("saved");
|
workReportAcctionValidation("saved");
|
||||||
_log("Create a new work report from a model type line", "custom1");
|
_log("Create a new work report from a model type line", "custom1");
|
||||||
|
|
@ -66,9 +66,9 @@ function workReportModelLineForm($name){
|
||||||
|
|
||||||
function workReportCreateHeadingModel($modelName){
|
function workReportCreateHeadingModel($modelName){
|
||||||
workReportModelHeadingCreate($modelName);
|
workReportModelHeadingCreate($modelName);
|
||||||
_click(_link("Work Reports"));
|
_click(_link("Timesheets"));
|
||||||
_setSelected(_select(0, _near(_span("Select type:"))), $modelName);
|
_setSelected(_select(0, _near(_span("Select template:"))), $modelName);
|
||||||
_click(_cell("New work report"));
|
_click(_cell("New Timesheet"));
|
||||||
_click(_cell("Save"));
|
_click(_cell("Save"));
|
||||||
workReportHeadingCodeValidation();
|
workReportHeadingCodeValidation();
|
||||||
_log("Do not allow create a new work report from a model type heading without task", "custom1");
|
_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){
|
function workReportEditForm($name){
|
||||||
_click(_link("Work Reports"));
|
_click(_link("Timesheets"));
|
||||||
commonEdit($name, 4);
|
commonEdit($name, 5);
|
||||||
_click(_cell("Add new row"));
|
_click(_cell("Add new row"));
|
||||||
_click(_cell("Save"));
|
_click(_cell("Save"));
|
||||||
workReportResourceValidation();
|
workReportResourceValidation();
|
||||||
|
|
|
||||||
|
|
@ -1,7 +1,7 @@
|
||||||
/*
|
/*
|
||||||
* This file is part of LibrePlan
|
* 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
|
* 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
|
* it under the terms of the GNU Affero General Public License as published by
|
||||||
|
|
@ -35,7 +35,7 @@
|
||||||
_include("../common_functions.sah");
|
_include("../common_functions.sah");
|
||||||
|
|
||||||
function templateProjectCreateTemplate($projectName, $template){
|
function templateProjectCreateTemplate($projectName, $template){
|
||||||
_click(_link("Projects List"));
|
_click(_link("Projects"));
|
||||||
_click(_image("ico_derived1.png", _in(_cell(8,_near(_cell($projectName))))));
|
_click(_image("ico_derived1.png", _in(_cell(8,_near(_cell($projectName))))));
|
||||||
_setValue(_textbox(0, _near(_span("Name"))), $template);
|
_setValue(_textbox(0, _near(_span("Name"))), $template);
|
||||||
_click(_cell("Save & Continue"));
|
_click(_cell("Save & Continue"));
|
||||||
|
|
@ -44,7 +44,7 @@ function templateProjectCreateTemplate($projectName, $template){
|
||||||
}
|
}
|
||||||
|
|
||||||
function templateProjectAssignTemplate($template){
|
function templateProjectAssignTemplate($template){
|
||||||
_click(_link("Projects List"));
|
_click(_link("Projects"));
|
||||||
_click(_image("ico_add.png"));
|
_click(_image("ico_add.png"));
|
||||||
_setValue(_textbox(0, _near(_span("Name"))), "ProjectTemplate");
|
_setValue(_textbox(0, _near(_span("Name"))), "ProjectTemplate");
|
||||||
_click(_italic(0, _cell("z-caption-l")));
|
_click(_italic(0, _cell("z-caption-l")));
|
||||||
|
|
@ -112,13 +112,13 @@ function templateDelete($name){
|
||||||
|
|
||||||
|
|
||||||
function templateProjectCheckAssigned($projectTemplate){
|
function templateProjectCheckAssigned($projectTemplate){
|
||||||
_click(_link("Projects List"));
|
_click(_link("Projects"));
|
||||||
_assertExists(_span($projectTemplate));
|
_assertExists(_span($projectTemplate));
|
||||||
_assert(_isVisible(_span($projectTemplate)));
|
_assert(_isVisible(_span($projectTemplate)));
|
||||||
}
|
}
|
||||||
|
|
||||||
function templateTaskCheckAssignedValidation($totalTaskhours){
|
function templateTaskCheckAssignedValidation($totalTaskhours){
|
||||||
_click(_link("Projects List"));
|
_click(_link("Projects"));
|
||||||
_assertExists(_div($totalTaskhours));
|
_assertExists(_div($totalTaskhours));
|
||||||
_assert(_isVisible(_div($totalTaskhours)));
|
_assert(_isVisible(_div($totalTaskhours)));
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue