diff --git a/test/ci_description.ini b/test/ci_description.ini index b32f6c151..bf2b1ad5f 100644 --- a/test/ci_description.ini +++ b/test/ci_description.ini @@ -5,4 +5,11 @@ itop_backup=test/backups/backup-itop.tar.gz [phpunit] ; when empty phpunit_xml => no phpunit test performed ; phpunit xml file description. required for phpunit testing -phpunit_xml=test/phpunit.xml.dist \ No newline at end of file +phpunit_xml=test/phpunit.xml.dist + +phpunit_suite[]=Status +phpunit_suite[]=Tickets + +behat_feature_test[]=test/features/debug-ci.feature +behat_feature_test[]=test/features/debug-ci.feature +behat_csv_folder[]=test/csv-data/default diff --git a/test/csv-data/default/01.Organization.csv b/test/csv-data/default/01.Organization.csv new file mode 100644 index 000000000..a0022c4ae --- /dev/null +++ b/test/csv-data/default/01.Organization.csv @@ -0,0 +1,6 @@ +name;code;status;parent_id->name +IT Special;IT;active;IT Department +Client Special;;active; +Demo;;active; +IT Department;IT;active; +My Company/Department;SOMECODE;active; diff --git a/test/csv-data/default/02.Person.csv b/test/csv-data/default/02.Person.csv new file mode 100644 index 000000000..59351d54b --- /dev/null +++ b/test/csv-data/default/02.Person.csv @@ -0,0 +1,9 @@ +first_name;name;org_id->name;status;email;phone;notify;function;manager_id->email +Config;Manager;IT Department;active;config.quality@combodo.com;;yes;ConfigManager qui voit tout; +Config;Special;IT Special;active;config-special.quality@combodo.com;+33 01 23 45 67 89;yes;ConfigManager limité à son org et son client; +Power;Portal;Demo;active;power.quality@combodo.com;;yes;power utilisateur portail, sans allowed org;config.quality@combodo.com +Power;Special;Client Special;active;power-special.quality@combodo.com;+33 01 23 45 67 89;yes;power utilisateur portail, limité à son org;config-special.quality@combodo.com +Agent;Standard;IT Department;active;agent-special.quality@combodo.com;;yes;agent de support standard qui voit tout;config.quality@combodo.com +Agent;Special;IT Special;active;agent.quality@combodo.com;+33 01 23 45 67 89;yes;agent de support limité à son org et son client;config-special.quality@combodo.com +Portal;Generic;Demo;active;portal.quality@combodo.com;;yes;utilisateur portail, sans allowed org;power.quality@combodo.com +Portal;Special;Client Special;active;portal-special.quality@combodo.com;+33 01 23 45 67 89;yes;utilisateur portail, limité à son org;power-special.quality@combodo.com diff --git a/test/csv-data/default/03.UserLocal.csv b/test/csv-data/default/03.UserLocal.csv new file mode 100644 index 000000000..8e4da23ab --- /dev/null +++ b/test/csv-data/default/03.UserLocal.csv @@ -0,0 +1,9 @@ +login;password;contactid->org_name;contactid->first_name;contactid->name;status;language;profile_list;allowed_org_list +agent;agent;IT Department;Agent;Standard;enabled;EN US;profileid->name:Support Agent; +config;config;IT Department;Config;Manager;enabled;FR FR;profileid->name:Configuration Manager; +portal;portal;Demo;Portal;Generic;enabled;EN US;profileid->name:Portal user; +power;power;Demo;Power;Portal;enabled;EN US;profileid->name:Portal user|profileid->name:Portal power user; +agent2;agent2;IT Special;Agent;Special;enabled;FR FR;profileid->name:Support Agent;allowed_org_id->name:IT Special|allowed_org_id->name:Client Special +config2;config2;IT Special;Config;Special;enabled;EN US;profileid->name:Configuration Manager;allowed_org_id->name:IT Special|allowed_org_id->name:Client Special +portal2;portal2;Client Special;Portal;Special;enabled;FR FR;profileid->name:Portal user;allowed_org_id->name:Client Special +power2;power2;Client Special;Power;Special;enabled;FR FR;profileid->name:Portal user|profileid->name:Portal power user;allowed_org_id->name:Client Special diff --git a/test/csv-data/default/04.Team.csv b/test/csv-data/default/04.Team.csv new file mode 100644 index 000000000..307e242c3 --- /dev/null +++ b/test/csv-data/default/04.Team.csv @@ -0,0 +1,2 @@ +name;status;org_id->name;email;notify;persons_list +Firemen;active;IT Special;;yes;person_id->email:agent-special.quality@combodo.com|person_id->email:config-special.quality@combodo.com diff --git a/test/csv-data/default/05.DeliveryModel.csv b/test/csv-data/default/05.DeliveryModel.csv new file mode 100644 index 000000000..6d8b6d230 --- /dev/null +++ b/test/csv-data/default/05.DeliveryModel.csv @@ -0,0 +1,2 @@ +name;org_id->name +Special support;IT Special diff --git a/test/csv-data/default/06.Organization.csv b/test/csv-data/default/06.Organization.csv new file mode 100644 index 000000000..75a22f3a5 --- /dev/null +++ b/test/csv-data/default/06.Organization.csv @@ -0,0 +1,2 @@ +name;deliverymodel_id->name;deliverymodel_id->organization_name +Client Special;Special support;IT Special diff --git a/test/csv-data/default/07.lnkDeliveryModelToContact.csv b/test/csv-data/default/07.lnkDeliveryModelToContact.csv new file mode 100644 index 000000000..1b2a1e13d --- /dev/null +++ b/test/csv-data/default/07.lnkDeliveryModelToContact.csv @@ -0,0 +1,3 @@ +deliverymodel_id;contact_id;role_id->name +2;26;Support level1 + diff --git a/test/csv-data/default/08.Service.csv b/test/csv-data/default/08.Service.csv new file mode 100644 index 000000000..1d1c9a17f --- /dev/null +++ b/test/csv-data/default/08.Service.csv @@ -0,0 +1,2 @@ +name;org_id->name;servicefamily_id->name;status +Service pour les Gaulois;IT Special;IT Services;production diff --git a/test/csv-data/default/09.CustomerContract.csv b/test/csv-data/default/09.CustomerContract.csv new file mode 100644 index 000000000..b5421988d --- /dev/null +++ b/test/csv-data/default/09.CustomerContract.csv @@ -0,0 +1,4 @@ +name;status;org_id->name;start_date;provider_id->name;cost_currency +Contract Special;production;Client Special;2016-12-25;IT Special;euros +Contract Standard;implementation;Client Special;2016-01-31;IT Department;dollars +Contract Standard;production;Demo;;IT Department; diff --git a/test/csv-data/default/10.CoverageWindow.csv b/test/csv-data/default/10.CoverageWindow.csv new file mode 100644 index 000000000..e097b2cd1 --- /dev/null +++ b/test/csv-data/default/10.CoverageWindow.csv @@ -0,0 +1,2 @@ +name;description +Business Hours;Monday to Friday 9h-12h + 14h-18h diff --git a/test/csv-data/default/11.CoverageWindowInterval.csv b/test/csv-data/default/11.CoverageWindowInterval.csv new file mode 100644 index 000000000..205851b37 --- /dev/null +++ b/test/csv-data/default/11.CoverageWindowInterval.csv @@ -0,0 +1,11 @@ +coverage_window_id->name;weekday;start_time;end_time +Business Hours;friday;09:00;12:00 +Business Hours;friday;14:00;18:00 +Business Hours;monday;09:00;12:00 +Business Hours;monday;14:00;18:00 +Business Hours;thursday;09:00;12:00 +Business Hours;thursday;14:00;18:00 +Business Hours;tuesday;09:00;12:00 +Business Hours;tuesday;14:00;18:00 +Business Hours;wednesday;09:00;12:00 +Business Hours;wednesday;14:00;18:00 diff --git a/test/csv-data/default/12.lnkCustomerContractToService.csv b/test/csv-data/default/12.lnkCustomerContractToService.csv new file mode 100644 index 000000000..f06af2595 --- /dev/null +++ b/test/csv-data/default/12.lnkCustomerContractToService.csv @@ -0,0 +1,4 @@ +customercontract_id->organization_name;customercontract_id->name;customercontract_id->provider_name;service_id->organization_name;service_id->name;sla_id->name;coveragewindow_id->name;sla_id->organization_name +Client Special;Contract Special;IT Special;IT Special;Service pour les Gaulois;;; +Client Special;Contract Standard;IT Department;IT Department;Computers and peripherals;Standard SLA;Business Hours;Demo +Demo;Contract Standard;IT Department;IT Department;Software;Standard SLA;;Demo diff --git a/test/csv-data/default/13.ApprovalRule.csv b/test/csv-data/default/13.ApprovalRule.csv new file mode 100644 index 000000000..6f1be5c4d --- /dev/null +++ b/test/csv-data/default/13.ApprovalRule.csv @@ -0,0 +1,2 @@ +name;description;level1_rule;level1_timeout;level1_default_approval;level2_rule;level2_default_approval;level2_timeout;coveragewindow_id->name +Manager approval;;SELECT Person AS m JOIN Person AS e ON e.manager_id=m.id WHERE e.id=:this->caller_id;70;yes;;no;70;Business Hours diff --git a/test/csv-data/default/14.ServiceSubcategory.csv b/test/csv-data/default/14.ServiceSubcategory.csv new file mode 100644 index 000000000..e13d0844d --- /dev/null +++ b/test/csv-data/default/14.ServiceSubcategory.csv @@ -0,0 +1,4 @@ +name;service_id->name;status;request_type;description;service_id->organization_name;approvalrule_id->name +Coq au vin;Service pour les Gaulois;production;service_request;Un truc avec Request Template;IT special;Manager approval +Demande de congé;Service pour les Gaulois;production;service_request;Un truc qu'il faut faire approuver;IT special; +Préavis de grève;Service pour les Gaulois;production;incident;Un genre d'incident fréquent en France;IT special; diff --git a/test/csv-data/default/15.TriggerOnLogUpdate.csv b/test/csv-data/default/15.TriggerOnLogUpdate.csv new file mode 100644 index 000000000..10d8dabd6 --- /dev/null +++ b/test/csv-data/default/15.TriggerOnLogUpdate.csv @@ -0,0 +1,3 @@ +description;target_class;target_log +User Request public log update;UserRequest;public_log +User Request private log update;UserRequest;private_log diff --git a/test/csv-data/default/16.ActionEmail.csv b/test/csv-data/default/16.ActionEmail.csv new file mode 100644 index 000000000..5d768377b --- /dev/null +++ b/test/csv-data/default/16.ActionEmail.csv @@ -0,0 +1,5 @@ +name;to;status;subject;from;description;test_recipient;importance;body +Notification to caller on User Request public log update;SELECT Person WHERE id=:this->caller_id;enabled;The ticket $this->ref$ has been updated;test@combodo.com;This action informs a caller that the public log of a ticket has been updated;test@test.com;normal;"$this->head_html(public_log)$
+$this->hyperlink(portal)$" +Notification to agent on User Request private log update;SELECT Person WHERE id=:this->agent_id;enabled;Votre ticket $this->ref$ a été mis à jour;test@combodo.com;This action informs the agent that the private log of a ticket has been updated;test@test.com;normal;"" diff --git a/test/csv-data/default/17.lnkTriggerAction.csv b/test/csv-data/default/17.lnkTriggerAction.csv new file mode 100644 index 000000000..ee7110dc8 --- /dev/null +++ b/test/csv-data/default/17.lnkTriggerAction.csv @@ -0,0 +1,3 @@ +trigger_id;action_id;order +2;4;1 +3;5;1 diff --git a/test/csv-data/default/18.RequestTemplate.csv b/test/csv-data/default/18.RequestTemplate.csv new file mode 100644 index 000000000..20a17bd79 --- /dev/null +++ b/test/csv-data/default/18.RequestTemplate.csv @@ -0,0 +1,6 @@ +name;servicesubcategory_id->name;label;service_id->organization_name;service_id->name +Desktop ordering details;New desktop ordering;Fournir la marque et le modèle souhaité;IT Department;Computers and peripherals +Détail du coq au vin;Coq au vin;Détail pour le Coq au vin;IT Special;Service pour les Gaulois +Laptop ordering;New laptop ordering;Provide Size, Brand & Model;IT Department;Computers and peripherals +Special laptop ordering;New laptop ordering;Provide Color, Brand, Model and date;IT Department;Computers and peripherals +LCD ordering;New LCD monitor ordering;Read-only label of this Request Template;IT Department;Computers and peripherals diff --git a/test/csv-data/default/19.TemplateField.csv b/test/csv-data/default/19.TemplateField.csv new file mode 100644 index 000000000..13d8b2451 --- /dev/null +++ b/test/csv-data/default/19.TemplateField.csv @@ -0,0 +1,24 @@ +code;template_id->name;order;mandatory;input_type;initial_value;label;values;format +brand;Desktop ordering details;11;yes;radio_buttons;;Marque obligatoire;Cisco,HP,Apple,IBM,Samsung; +model;Desktop ordering details;12;yes;drop_down_list;;Modèle imposé;SELECT Model WHERE brand_id_friendlyname = :template->brand; +weight;Laptop ordering;20;yes;radio_buttons;;Size option;light,wide; +brand;Laptop ordering;21;yes;drop_down_list;;Brand required;SELECT Brand; +model;Laptop ordering;22;yes;drop_down_list;;Model if you care;SELECT Model WHERE brand_id=:template->brand; +date;Détail du coq au vin;1;yes;date;;Date de naissance;; +date_time;Détail du coq au vin;2;yes;date_and_time;;Heure de livraison;; +drop_down;Détail du coq au vin;3;yes;drop_down_list;;Cuisson;bleu,à point,bien cuit; +duration;Détail du coq au vin;4;yes;duration;;Durée de cuisson;; +hidden;Détail du coq au vin;5;yes;hidden;Ce texte statique ne doit être visible que depuis la Console;Message pour l'agent;; +list;Détail du coq au vin;6;yes;radio_buttons;;Marque;SELECT Brand; +dropdownlist2;Détail du coq au vin;7;yes;drop_down_list;;Modèle (par Marque);SELECT Model WHERE Model.brand_id = :template->list; +read_only;Détail du coq au vin;8;yes;read_only;Cette valeur visible en console et en portail est non modifiable;Lecture seule;; +text;Détail du coq au vin;9;yes;text;;Commentaire;; +text_area;Détail du coq au vin;10;yes;text_area;;Recette;; +color;Special laptop ordering;30;yes;radio_buttons;;Couleur imposée;bleu,vert,jaune,rouge,orange,violet,noir,blanc; +brand;Special laptop ordering;31;yes;radio_buttons;1;Marque optionelle;SELECT Brand; +model;Special laptop ordering;32;yes;drop_down_list;;Modèle obligatoire;SELECT Model WHERE brand_id=:template->brand; +delivery_date;Special laptop ordering;33;yes;date;;Date de livraison souhaitée;; +brand;LCD ordering;41;yes;text;;Marque textuel obligatoire;; +size;LCD ordering;42;yes;radio_buttons;"21""";Taille de l'écran (choix facultatif);"17"",19"",21"""; +contact_type;LCD ordering;43;yes;drop_down_list;Person;type de contact;Person,Team; +contact;LCD ordering;44;yes;drop_down_list;;contact;SELECT Contact WHERE finalclass = :template->contact_type AND org_id = :current_contact->org_id; diff --git a/test/csv-data/default/reconciliation.json b/test/csv-data/default/reconciliation.json new file mode 100644 index 000000000..4904b3500 --- /dev/null +++ b/test/csv-data/default/reconciliation.json @@ -0,0 +1,20 @@ +{ + "Organization": "name", + "Person": "name,first_name,org_id->name", + "UserLocal": "login", + "Team": "name", + "DeliveryModel": "name", + "lnkDeliveryModelToContact": "deliverymodel_id,contact_id", + "Service": "name,org_id->name", + "CustomerContract": "name,org_id->name", + "CoverageWindow": "name", + "CoverageWindowInterval": "coverage_window_id->name,weekday", + "lnkCustomerContractToService": "customercontract_id->organization_name;customercontract_id->name;customercontract_id->provider_name;service_id->organization_name;service_id->name", + "ApprovalRule": "name", + "ServiceSubcategory": "name,service_id->name,service_id->organization_name", + "TriggerOnLogUpdate": "description", + "ActionEmail": "name", + "lnkTriggerAction": "trigger_id,action_id", + "RequestTemplate": "label", + "TemplateField": "code,template_id->name" +} diff --git a/test/features/debug-ci.feature b/test/features/debug-ci.feature new file mode 100644 index 000000000..5d9f43eae --- /dev/null +++ b/test/features/debug-ci.feature @@ -0,0 +1,10 @@ +Feature: Test itop + In order access the application, users must be able to log in + + @pro @com + Scenario: config voit toutes les organisations + Given there is an iTop installed with the standard datamodel and sample data 'default' + And I login as "config/config" + And I have a valid user account 'config/config' + And I wait for 2 seconds + Then I follow "Déconnexion"