1 |
nhaye |
1714 |
<?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 |
fmichon |
1727 |
$this->login("consu", "consu"); |
23 |
nhaye |
1714 |
$this->setSpeed('120'); |
24 |
|
|
|
25 |
|
|
$this->clickAndWait("link=Demandes en cours"); |
26 |
|
|
// Accès au dossier en visualisation |
27 |
|
|
$this->clickAndWait("link=AZ0130551200001P0"); |
28 |
fmichon |
1719 |
$this->verifyNoErrors(); |
29 |
nhaye |
1714 |
$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 |
fmichon |
1719 |
$this->verifyNoErrors(); |
34 |
nhaye |
1714 |
// Validation sans retour d'avis |
35 |
|
|
$this->click("//input[@value='Modifier']"); |
36 |
fmichon |
1719 |
$this->verifyNoErrors(); |
37 |
nhaye |
1714 |
// 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 |
fmichon |
1719 |
$this->verifyNoErrors(); |
43 |
nhaye |
1714 |
$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 |
fmichon |
1719 |
$this->verifyNoErrors(); |
48 |
nhaye |
1714 |
// 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 |
fmichon |
1720 |
$this->verifyNoErrors(); |
56 |
nhaye |
1714 |
$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 |
fmichon |
1720 |
$this->verifyNoErrors(); |
61 |
nhaye |
1714 |
// Validation de la modification de la demande d'avis |
62 |
|
|
$this->click("//input[@value='Modifier']"); |
63 |
fmichon |
1719 |
$this->verifyNoErrors(); |
64 |
nhaye |
1714 |
$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 |
fmichon |
1720 |
$this->verifyNoErrors(); |
69 |
nhaye |
1714 |
// Vérification que la demande d'avis n'est plus presente |
70 |
|
|
$this->assertTextNotPresent("link=AZ0130551200001P0"); |
71 |
|
|
|
72 |
|
|
// |
73 |
|
|
$this->logout(); |
74 |
|
|
} |
75 |
|
|
|
76 |
nhaye |
1715 |
/** |
77 |
|
|
* |
78 |
|
|
*/ |
79 |
|
|
public function testDemandesAvisPassees() { |
80 |
|
|
// |
81 |
fmichon |
1727 |
$this->login("consu", "consu"); |
82 |
nhaye |
1715 |
|
83 |
fmichon |
1720 |
// |
84 |
nhaye |
1715 |
$this->clickAndWait("link=Demandes passées"); |
85 |
fmichon |
1720 |
$this->verifyNoErrors(); |
86 |
|
|
|
87 |
|
|
// |
88 |
nhaye |
1715 |
$this->clickAndWait("link=AZ0130551200001P0"); |
89 |
fmichon |
1719 |
$this->verifyNoErrors(); |
90 |
nhaye |
1715 |
$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 |
fmichon |
1719 |
// $this->verifyNoErrors(); |
96 |
nhaye |
1715 |
// $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 |
nhaye |
1714 |
} |
105 |
|
|
?> |