1 |
<?php |
2 |
/** |
3 |
* |
4 |
* |
5 |
* @package openfoncier |
6 |
* @version SVN : $Id$ |
7 |
*/ |
8 |
|
9 |
// |
10 |
require_once "base.php"; |
11 |
|
12 |
/** |
13 |
* |
14 |
*/ |
15 |
class ServiceConsulte extends BaseTestCase { |
16 |
|
17 |
/** |
18 |
* |
19 |
*/ |
20 |
public function testSaisieDemandeAvis() { |
21 |
// |
22 |
$this->login("consu", "consu"); |
23 |
$this->setSpeed('120'); |
24 |
|
25 |
$this->clickAndWait("link=Demandes en cours"); |
26 |
// Accès au dossier en visualisation |
27 |
$this->clickAndWait("link=AZ0130551200001P0"); |
28 |
$this->verifyNoErrors(); |
29 |
$this->verifyTextPresent("Demandes d'avis > en cours"); |
30 |
// Accès à l'onglet des consultations |
31 |
$this->click("//div[@id='portlet-actions']/ul/li/a/span"); |
32 |
$this->verifyTextPresent("consultations 2"); |
33 |
$this->verifyNoErrors(); |
34 |
// Validation sans retour d'avis |
35 |
$this->click("//input[@value='Modifier']"); |
36 |
$this->verifyNoErrors(); |
37 |
// Retour à la liste des demandes |
38 |
$this->click("css=form[name=\"f2\"] > div.formControls > a.retour"); |
39 |
|
40 |
// Accès au dossier en visualisation |
41 |
$this->clickAndWait("link=AZ0130551200001P0"); |
42 |
$this->verifyNoErrors(); |
43 |
$this->verifyTextPresent("Demandes d'avis > en cours"); |
44 |
// Accès à l'onglet des consultations |
45 |
$this->click("//div[@id='portlet-actions']/ul/li/a/span"); |
46 |
$this->verifyTextPresent("consultations 2"); |
47 |
$this->verifyNoErrors(); |
48 |
// Saisie de valeurs |
49 |
$this->select("id=avis_consultation", "label=Defavorable"); |
50 |
$this->type("id=motivation", "Pas motivé"); |
51 |
// Upload de fichier |
52 |
$this->click("css=span.ui-icon.ui-icon-arrowthickstop-1-s"); |
53 |
// Validation sans saisie de fichier |
54 |
$this->click("name=submit"); |
55 |
$this->verifyNoErrors(); |
56 |
$this->verifyTextPresent("Vous devez sélectionner un fichier."); |
57 |
// Saisie de fichier |
58 |
$this->type("name=userfile[]", dirname(__FILE__)."/binaire/lettre_rar16042013124515.pdf"); |
59 |
$this->click("name=submit"); |
60 |
$this->verifyNoErrors(); |
61 |
// Validation de la modification de la demande d'avis |
62 |
$this->click("//input[@value='Modifier']"); |
63 |
$this->verifyNoErrors(); |
64 |
$this->verifyTextPresent("Vos modifications ont bien été enregistrées."); |
65 |
|
66 |
// Retour à la liste des demandes |
67 |
$this->click("css=form[name=\"f2\"] > div.formControls > a.retour"); |
68 |
$this->verifyNoErrors(); |
69 |
// Vérification que la demande d'avis n'est plus presente |
70 |
$this->assertTextNotPresent("link=AZ0130551200001P0"); |
71 |
|
72 |
// |
73 |
$this->logout(); |
74 |
} |
75 |
|
76 |
/** |
77 |
* |
78 |
*/ |
79 |
public function testDemandesAvisPassees() { |
80 |
// |
81 |
$this->login("consu", "consu"); |
82 |
|
83 |
// |
84 |
$this->clickAndWait("link=Demandes passées"); |
85 |
$this->verifyNoErrors(); |
86 |
|
87 |
// |
88 |
$this->clickAndWait("link=AZ0130551200001P0"); |
89 |
$this->verifyNoErrors(); |
90 |
$this->verifyTextPresent("Demandes d'avis > passées"); |
91 |
// $this->click("//div[@id='portlet-actions']/ul/li/a/span"); |
92 |
// $this->waitForPopUp("", "30000"); |
93 |
// $this->selectPopUp(); |
94 |
// sleep(5); |
95 |
// $this->verifyNoErrors(); |
96 |
// $this->verifyTextPresent("Avis solicité pour conformité"); |
97 |
// $this->verifyTextPresent("Direction de l'Eau et de l'Assainissement"); |
98 |
// $this->close(); |
99 |
// $this->selectWindow(); |
100 |
// |
101 |
$this->logout(); |
102 |
} |
103 |
|
104 |
} |
105 |
?> |