mirror of
https://github.com/Combodo/iTop.git
synced 2026-03-06 09:34:13 +01:00
test phpunit + behat
This commit is contained in:
@@ -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
|
||||
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
|
||||
|
||||
6
test/csv-data/default/01.Organization.csv
Normal file
6
test/csv-data/default/01.Organization.csv
Normal file
@@ -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;
|
||||
|
9
test/csv-data/default/02.Person.csv
Normal file
9
test/csv-data/default/02.Person.csv
Normal file
@@ -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
|
||||
|
9
test/csv-data/default/03.UserLocal.csv
Normal file
9
test/csv-data/default/03.UserLocal.csv
Normal file
@@ -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
|
||||
|
2
test/csv-data/default/04.Team.csv
Normal file
2
test/csv-data/default/04.Team.csv
Normal file
@@ -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
|
||||
|
2
test/csv-data/default/05.DeliveryModel.csv
Normal file
2
test/csv-data/default/05.DeliveryModel.csv
Normal file
@@ -0,0 +1,2 @@
|
||||
name;org_id->name
|
||||
Special support;IT Special
|
||||
|
2
test/csv-data/default/06.Organization.csv
Normal file
2
test/csv-data/default/06.Organization.csv
Normal file
@@ -0,0 +1,2 @@
|
||||
name;deliverymodel_id->name;deliverymodel_id->organization_name
|
||||
Client Special;Special support;IT Special
|
||||
|
3
test/csv-data/default/07.lnkDeliveryModelToContact.csv
Normal file
3
test/csv-data/default/07.lnkDeliveryModelToContact.csv
Normal file
@@ -0,0 +1,3 @@
|
||||
deliverymodel_id;contact_id;role_id->name
|
||||
2;26;Support level1
|
||||
|
||||
|
2
test/csv-data/default/08.Service.csv
Normal file
2
test/csv-data/default/08.Service.csv
Normal file
@@ -0,0 +1,2 @@
|
||||
name;org_id->name;servicefamily_id->name;status
|
||||
Service pour les Gaulois;IT Special;IT Services;production
|
||||
|
4
test/csv-data/default/09.CustomerContract.csv
Normal file
4
test/csv-data/default/09.CustomerContract.csv
Normal file
@@ -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;
|
||||
|
2
test/csv-data/default/10.CoverageWindow.csv
Normal file
2
test/csv-data/default/10.CoverageWindow.csv
Normal file
@@ -0,0 +1,2 @@
|
||||
name;description
|
||||
Business Hours;Monday to Friday 9h-12h + 14h-18h
|
||||
|
11
test/csv-data/default/11.CoverageWindowInterval.csv
Normal file
11
test/csv-data/default/11.CoverageWindowInterval.csv
Normal file
@@ -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
|
||||
|
@@ -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
|
||||
|
2
test/csv-data/default/13.ApprovalRule.csv
Normal file
2
test/csv-data/default/13.ApprovalRule.csv
Normal file
@@ -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
|
||||
|
4
test/csv-data/default/14.ServiceSubcategory.csv
Normal file
4
test/csv-data/default/14.ServiceSubcategory.csv
Normal file
@@ -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;
|
||||
|
3
test/csv-data/default/15.TriggerOnLogUpdate.csv
Normal file
3
test/csv-data/default/15.TriggerOnLogUpdate.csv
Normal file
@@ -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
|
||||
|
5
test/csv-data/default/16.ActionEmail.csv
Normal file
5
test/csv-data/default/16.ActionEmail.csv
Normal file
@@ -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)$<br>
|
||||
$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;"<ul><li>$this->head_html(public_log)$</li><li>
|
||||
$this->hyperlink(portal)$</li></ul>"
|
||||
|
3
test/csv-data/default/17.lnkTriggerAction.csv
Normal file
3
test/csv-data/default/17.lnkTriggerAction.csv
Normal file
@@ -0,0 +1,3 @@
|
||||
trigger_id;action_id;order
|
||||
2;4;1
|
||||
3;5;1
|
||||
|
6
test/csv-data/default/18.RequestTemplate.csv
Normal file
6
test/csv-data/default/18.RequestTemplate.csv
Normal file
@@ -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
|
||||
|
24
test/csv-data/default/19.TemplateField.csv
Normal file
24
test/csv-data/default/19.TemplateField.csv
Normal file
@@ -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;
|
||||
|
20
test/csv-data/default/reconciliation.json
Normal file
20
test/csv-data/default/reconciliation.json
Normal file
@@ -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"
|
||||
}
|
||||
10
test/features/debug-ci.feature
Normal file
10
test/features/debug-ci.feature
Normal file
@@ -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"
|
||||
Reference in New Issue
Block a user