Added check Code label functions in all data type tests
FEA: ItEr75S18DataTypesTests
This commit is contained in:
parent
26196e69ee
commit
a7a043b4f5
4 changed files with 112 additions and 10 deletions
|
|
@ -24,7 +24,11 @@
|
|||
* 3 - Create a Exception Day with empty type (it should be a failure)
|
||||
* 4 - Create a Exception Day with duplicate name (it should be a failure)
|
||||
* 5 - Edit a Exception Day
|
||||
* 6 - Delete Exception Day
|
||||
* 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
|
||||
*
|
||||
*/
|
||||
_include("../common_functions.sah");
|
||||
|
|
@ -68,11 +72,31 @@ function exceptDayNotValid($ExceptDayName){
|
|||
|
||||
function exceptDayEdit($oldName, $newName, $cell){
|
||||
commonEdit($oldName, $cell);
|
||||
exceptDayForm($newName);
|
||||
exceptDayFormSaveAndContinue($newName);
|
||||
commonSaveValidation("Exception Day Type", $newName);
|
||||
_log("Edit the exception day", "custom1");
|
||||
}
|
||||
|
||||
function exceptDayFormSaveAndContinue($name){
|
||||
_setValue(_textbox(0, _near(_span("Name"))), $name);
|
||||
_removeFocus(_textbox(0, _near(_span("Name"))));
|
||||
_click(_cell("Save and Continue"));
|
||||
_assertExists(_cell("Save and Continue"));
|
||||
_assert(_isVisible(_cell("Save and Continue")));
|
||||
}
|
||||
|
||||
function exceptDayCheckCode($exceptDayName){
|
||||
commonConfigurationChangeCheckboxMainPreferences("Calendar exception types");
|
||||
exceptDayCreateWithoutCode($exceptDayName);
|
||||
commonConfigurationChangeCheckboxMainPreferences("Calendar exception types");
|
||||
_log("Check code label", "custom1");
|
||||
}
|
||||
|
||||
function exceptDayCreateWithoutCode($name){
|
||||
commonCreate("Exception Days");
|
||||
exceptDayForm($name);
|
||||
commonEmptyCodeValidation();
|
||||
}
|
||||
|
||||
/* test values */
|
||||
var $exceptDayName = "new";
|
||||
|
|
@ -90,6 +114,8 @@ exceptDayCreateEmpty("", $exceptDaystandar);
|
|||
|
||||
exceptDayEdit($exceptDayName, $exceptDayNewName, 5);
|
||||
|
||||
exceptDayCheckCode($exceptDayName);
|
||||
|
||||
commonDelete("Exception Days", $exceptDayNewName, 5);
|
||||
commonDeleteValidation("Exception Day Type", $exceptDayNewName);
|
||||
_log("Delete the exception day", "custom1");
|
||||
|
|
|
|||
|
|
@ -29,7 +29,12 @@
|
|||
* 6.2 - Add a Label to a project
|
||||
* 6.3 - Try to delete this assigned Label (it should be a failure)
|
||||
* 6.4 - Delete the project
|
||||
* 7 - Delete Label
|
||||
* 7 - Check code
|
||||
* 7.1 - Change configuration
|
||||
* 7.2 - Try to create a new Label type without Code (it should be a failure)
|
||||
* 7.3 - Try to create a new Label name without Code (it should be a failure)
|
||||
* 7.4 - Change configuration like before
|
||||
* 8 - Delete Label
|
||||
*
|
||||
*/
|
||||
_include("../common_functions.sah");
|
||||
|
|
@ -117,6 +122,35 @@ function labeltryDelete($labelNewType){
|
|||
_assert(_isVisible(_cell($labelNewType)));
|
||||
}
|
||||
|
||||
function labelCheckCode($labelType, $labelName){
|
||||
commonConfigurationChangeCheckboxMainPreferences("Label");
|
||||
labelCreateWithoutCode($labelType, $labelName);
|
||||
commonConfigurationChangeCheckboxMainPreferences("Label");
|
||||
_log("Check code label", "custom1");
|
||||
}
|
||||
|
||||
function labelCreateWithoutCode($type, $labelName){
|
||||
commonCreate("Labels");
|
||||
labelFormEmptyCode($type, $labelName);
|
||||
commonEmptyCodeValidation();
|
||||
}
|
||||
|
||||
function labelFormEmptyCode($name, $labelName){
|
||||
_setValue(_textbox(0, _near(_span("Name"))), $name);
|
||||
_click(_cell("Save"));
|
||||
labelEmptyCodeValidation();
|
||||
_setValue(_textbox(0, _near(_span("Code"))), "RamdonCode1234");
|
||||
_removeFocus(_textbox(0, _near(_span("Code"))));
|
||||
_setValue(_textbox(0, _near(_span("New label"))), $labelName);
|
||||
_click(_cell("Add"));
|
||||
_click(_cell("Save"));
|
||||
}
|
||||
|
||||
function labelEmptyCodeValidation(){
|
||||
_assertExists(_div("code: code not specified"));
|
||||
_assert(_isVisible(_div("code: code not specified")));
|
||||
}
|
||||
|
||||
/* test values */
|
||||
var $labelType = "new";
|
||||
var $labelType2 = "new2";
|
||||
|
|
@ -134,6 +168,7 @@ labelCreateDuplicateName($labelType2, $labelName);
|
|||
|
||||
labelEdit($labelType, $labelNewType, 2);
|
||||
labelAssig($projectName, $labelName, $labelNewType);
|
||||
labelCheckCode($labelType, $labelName);
|
||||
|
||||
commonDelete("Labels", $labelNewType, 2);
|
||||
commonDeleteValidation("Label Type", $labelNewType);
|
||||
|
|
|
|||
|
|
@ -27,7 +27,11 @@
|
|||
* 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 - Delete Unit Measure
|
||||
* 6 - Check code
|
||||
* 6.1 - Change configuration
|
||||
* 6.2 - Try to create a new Unit Measure without Code (it should be a failure)
|
||||
* 6.3 - Change configuration like before
|
||||
* 7 - Delete Unit Measure
|
||||
*
|
||||
*/
|
||||
_include("../common_functions.sah");
|
||||
|
|
@ -100,6 +104,24 @@ function unitMeasureTryDeleteAssigned($UMeasure){
|
|||
_assert(_isVisible(_cell($UMeasure)));
|
||||
}
|
||||
|
||||
function unitMeasureCheckCode($unitMeasureName){
|
||||
commonConfigurationChangeCheckboxMainPreferences("Unit Measures");
|
||||
unitMeasureCreateWithoutCode($unitMeasureName);
|
||||
commonConfigurationChangeCheckboxMainPreferences("Unit Measures");
|
||||
_log("Check code label", "custom1");
|
||||
}
|
||||
|
||||
function unitMeasureCreateWithoutCode($name){
|
||||
commonCreate("Unit Measures");
|
||||
unitMeasureForm($name);
|
||||
unitMeasureEmptyCodeValidation();
|
||||
}
|
||||
|
||||
function unitMeasureEmptyCodeValidation(){
|
||||
_assertExists(_div("Unit type code cannot be empty"));
|
||||
_assert(_isVisible(_div("Unit type code cannot be empty")));
|
||||
}
|
||||
|
||||
function materialFormDelete($materialName){
|
||||
_click(_link("Materials"));
|
||||
var $qtengo = _getValue(_textbox(1, _near(_select(0))));
|
||||
|
|
@ -124,6 +146,7 @@ unitMeasureCreateDuplicate($UMeasureName);
|
|||
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");
|
||||
|
|
|
|||
|
|
@ -36,12 +36,16 @@
|
|||
* 5.10 - Delete the machine
|
||||
* 5.11 - Delete the work report model
|
||||
* 6 - Delete Work Hour
|
||||
* 7 - Assign a work Hour to a Cost Category
|
||||
* 7.1 - Create a Work Hour again
|
||||
* 7.2 - Create a Cost Category and associate our Work Hour
|
||||
* 7.3 - Try to delete the Work Hour
|
||||
* 7.4 - Delete the Cost Category
|
||||
* 7.5 - Delete the Work Hour
|
||||
* 7 - Check code
|
||||
* 7.1 - Change configuration
|
||||
* 7.2 - Try to create a new Work Hour 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.4 - Delete the Cost Category
|
||||
* 8.5 - Delete the Work Hour
|
||||
*/
|
||||
_include("../common_functions.sah");
|
||||
|
||||
|
|
@ -215,6 +219,19 @@ function costCategoryForm($name, $hworkName){
|
|||
_click(_cell("Save"));
|
||||
}
|
||||
|
||||
function workHourCheckCode($workHourName){
|
||||
commonConfigurationChangeCheckboxMainPreferences("Types of work hours");
|
||||
workHourCreateWithoutCode($workHourName);
|
||||
commonConfigurationChangeCheckboxMainPreferences("Types of work hours");
|
||||
_log("Check code label", "custom1");
|
||||
}
|
||||
|
||||
function workHourCreateWithoutCode($type){
|
||||
commonCreate("Work Hours");
|
||||
workHourForm($type);
|
||||
commonEmptyCodeValidation();
|
||||
}
|
||||
|
||||
/* test values */
|
||||
var $hWorkName = "new";
|
||||
var $hWorkNewName = "newest";
|
||||
|
|
@ -232,6 +249,7 @@ workHourCreateDuplicateType($hWorkName, $hWorkPrice);
|
|||
workHourCreateEmpty();
|
||||
workHourEdit($hWorkName, $hWorkNewName, $hWorkPrice, 4);
|
||||
workHourAssign($hWorkNewName, $ModelName, $materialName, $materialDescription);
|
||||
workHourCheckCode($hWorkName);
|
||||
|
||||
commonDelete("Work Hours", $hWorkNewName, 4);
|
||||
commonDeleteValidation("Type of hours", $hWorkNewName);
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue