/[openfoncier]/trunk/tests/testGuichetUnique.php
ViewVC logotype

Annotation of /trunk/tests/testGuichetUnique.php

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1966 - (hide annotations)
Thu May 30 11:13:34 2013 UTC (11 years, 8 months ago) by vpihour
File size: 6806 byte(s)
Mise à jour de l'history 
Finalisation de l'instruction modifiée, plus de finalisaiton auto à part lors d'un dépôt de demande ou pour l'affichage réglementaire
Mise à jour des tests fonctionnels en fonction des modifications de la finalisation
Ajout des droits pour le guichet unique pour la visualisation des documents finalisés de l'instruction

1 fmichon 1654 <?php
2     /**
3     *
4     *
5     * @package openfoncier
6     * @version SVN : $Id$
7     */
8    
9     //
10 fmichon 1677 require_once "base.php";
11 fmichon 1654
12     /**
13     *
14     */
15     class GuichetUnique extends BaseTestCase {
16    
17     /**
18     * Ce test doit être réalisé juste après la réinitialisation de la base
19     * de données.
20     */
21     public function testAffichageReglementaire() {
22 fmichon 1658 //
23 fmichon 1727 $this->login("guichet", "guichet");
24 fmichon 1654
25     //
26     $this->clickAndWait("link=attestation");
27 fmichon 1719 $this->verifyNoErrors();
28 fmichon 1654 $this->verifyTextPresent("imprimer l'attestation d'affichage réglementaire");
29     //
30     $this->type("id=dossier", "PC0130551200002P0");
31     $this->clickAndWait("//input[@value='Valider']");
32 fmichon 1719 $this->verifyNoErrors();
33 fmichon 1654 $this->verifyTextPresent("Ce dossier n'a jamais été affiché.");
34    
35     //
36     $this->clickAndWait("link=registre");
37 fmichon 1719 $this->verifyNoErrors();
38 fmichon 1654 $this->verifyTextPresent("imprimer le registre d'affichage réglementaire");
39     //
40     $this->click("//input[@value='Valider']");
41     $this->assertTrue((bool)preg_match('/^Etes-vous sur de vouloir confirmer cette action [\s\S]$/',$this->getConfirmation()));
42     //
43     $this->waitForPopUp("", "30000");
44     $this->selectPopUp();
45     sleep(5);
46 fmichon 1719 $this->verifyNoErrors();
47 fmichon 1654 $this->verifyTextPresent("Registre des dossiers en cours");
48     $this->close();
49     //
50     $this->selectWindow();
51 fmichon 1719 $this->verifyNoErrors();
52 fmichon 1654 $this->verifyTextPresent("Traitement terminé. Le registre a été téléchargé.");
53    
54     //
55     $this->clickAndWait("link=attestation");
56 fmichon 1719 $this->verifyNoErrors();
57 fmichon 1654 $this->verifyTextPresent("imprimer l'attestation d'affichage réglementaire");
58     //
59     $this->clickAndWait("//input[@value='Valider']");
60 fmichon 1719 $this->verifyNoErrors();
61 fmichon 1654 $this->verifyTextPresent("Veuiller saisir un N° de dossier.");
62     //
63     $this->type("id=dossier", "123");
64     $this->clickAndWait("//input[@value='Valider']");
65 fmichon 1719 $this->verifyNoErrors();
66 fmichon 1654 $this->verifyTextPresent("Ce dossier n'existe pas.");
67     //
68     $this->type("id=dossier", "PC0130551200002P0");
69     $this->clickAndWait("//input[@value='Valider']");
70 fmichon 1719 $this->verifyNoErrors();
71 fmichon 1654 $this->verifyTextPresent("Cliquez sur le lien ci-dessous pour télécharger votre attestation d'affichage : \n\nAttestation d'affichage");
72 vpihour 1966 $this->assertAttribute( "css=.message .text a@href", "*spg/file.php*");
73 fmichon 1654 //
74     $this->click("link=Attestation d'affichage");
75     $this->waitForPopUp("", "30000");
76     $this->selectPopUp();
77     sleep(5);
78 fmichon 1719 $this->verifyNoErrors();
79 fmichon 1654 $this->verifyTextPresent("ATTESTATION D'AFFICHAGE REGLEMENTAIRE");
80     $this->close();
81     //
82     $this->selectWindow();
83    
84 fmichon 1658 //
85     $this->logout();
86     }
87 fmichon 1654
88 fmichon 1658 /**
89     *
90     */
91     public function testRecepisse() {
92     //
93 fmichon 1727 $this->login("guichet", "guichet");
94 fmichon 1658
95     //
96     $this->clickAndWait("link=récépissé");
97 fmichon 1719 $this->verifyNoErrors();
98 fmichon 1658 $this->verifyTextPresent("demande");
99     //
100 fmichon 1801 $this->clickAndWait("link=AT0130551200001P0");
101 fmichon 1719 $this->verifyNoErrors();
102 fmichon 1658 $this->verifyTextPresent("Demande d'autorisation de construire, d'aménager ou de modifier un ERP");
103 fmichon 1726 // Le nom du pétitionnaire doit apparaître
104     $this->verifyTextPresent("BERNARD LILIANE");
105 fmichon 1658 //
106     $this->click("link=Éditer le récépissé PDF");
107     $this->waitForPopUp("", "30000");
108     $this->selectPopUp();
109     sleep(5);
110 fmichon 1719 $this->verifyNoErrors();
111 fmichon 1658 $this->verifyTextPresent("RECEPISSE DE DEPOT");
112     $this->close();
113     //
114     $this->selectWindow();
115     //
116     $this->clickAndWait("link=Retour");
117 fmichon 1719 $this->verifyNoErrors();
118 fmichon 1658 $this->verifyTextPresent("demande");
119    
120     //
121     $this->logout();
122 fmichon 1654 }
123    
124 fmichon 1658 /**
125     *
126     */
127     public function testPetitionnaireFrequent() {
128     //
129 fmichon 1727 $this->login("guichet", "guichet");
130 fmichon 1658
131     //
132     $this->clickAndWait("link=nouveau dossier");
133 fmichon 1719 $this->verifyNoErrors();
134 fmichon 1658 $this->verifyTextPresent("demande");
135     //
136     $this->select("id=dossier_autorisation_type_detaille", "label=Permis de construire pour une maison individuelle et / ou ses annexes");
137     $this->select("id=demande_type", "label=Dépôt Initial");
138     $this->click("id=add_petitionnaire_principal");
139     $this->type("id=particulier_nom", "DURAND");
140     $this->type("id=particulier_prenom", "MICKAEL");
141     $this->type("id=particulier_date_naissance", "03/01/1956");
142     $this->type("id=particulier_commune_naissance", "LILLE");
143     $this->type("id=particulier_departement_naissance", "NORD");
144     $this->type("id=numero", "12");
145     $this->type("id=voie", "RUE DE LA LOI");
146     $this->type("document.f2.complement", "APPT 12");
147     $this->type("id=localite", "MARSEILLE");
148     $this->type("id=code_postal", "13012");
149     $this->type("id=telephone_fixe", "0404040404");
150     $this->click("id=frequent");
151    
152     $this->click("//input[@value=\"Ajouter l'enregistrement de la table : 'demandeur'\"]");
153     sleep(1);
154 fmichon 1719 $this->verifyNoErrors();
155 fmichon 1658 $this->verifyTextPresent("Vos modifications ont bien été enregistrées.");
156     $this->click("css=form[name=\"f2\"] > div.formControls > a.retour");
157     sleep(1);
158     //
159     $this->verifyTextPresent("DURAND MICKAEL\n 12 RUE DE LA LOI APPT 12 \n 13012 MARSEILLE \n 0404040404");
160     $this->clickAndWait("//input[@value='Ajouter']");
161 fmichon 1719 $this->verifyNoErrors();
162 fmichon 1801 $this->verifyTextPresent("Création du dossier d'autorisation n°PC0130551300001");
163 fmichon 1658 //
164     //$this->click("link= Télécharger le récépissé de la demande");
165     $this->click("css=a.lien");
166     $this->waitForPopUp("", "30000");
167     $this->selectPopUp();
168     sleep(5);
169 fmichon 1719 $this->verifyNoErrors();
170 fmichon 1658 $this->verifyTextPresent("RECEPISSE DE DEPOT");
171     $this->close();
172     //
173     $this->selectWindow();
174     //
175     $this->clickAndWait("link=Retour");
176 fmichon 1719 $this->verifyNoErrors();
177 fmichon 1658 //
178     $this->clickAndWait("link=pétitionnaire fréquent");
179 fmichon 1719 $this->verifyNoErrors();
180 fmichon 1658 $this->verifyTextPresent("pétitionnaire fréquent");
181     $this->verifyTextPresent("DURAND MICKAEL");
182     //
183     $this->clickAndWait("link=DURAND MICKAEL");
184 fmichon 1719 $this->verifyNoErrors();
185 fmichon 1658 $this->verifyTextPresent("RUE DE LA LOI ");
186     //
187     $this->clickAndWait("link=Retour");
188 fmichon 1719 $this->verifyNoErrors();
189 fmichon 1658 $this->verifyTextPresent("pétitionnaire fréquent");
190     //
191     $this->logout();
192     }
193    
194 fmichon 1654 }
195    
196     ?>

Properties

Name Value
svn:keywords Id

[email protected]
ViewVC Help
Powered by ViewVC 1.1.26