131 |
$this->byId("code_postal")->value("13012"); |
$this->byId("code_postal")->value("13012"); |
132 |
// On remplit le champ |
// On remplit le champ |
133 |
$this->byId("telephone_fixe")->value("0404040404"); |
$this->byId("telephone_fixe")->value("0404040404"); |
134 |
|
// On remplit le champ |
135 |
|
$this->byId("fax")->value("0405040404"); |
136 |
// On clique sur ajouter |
// On clique sur ajouter |
137 |
$this->byCssSelector("div#sformulaire form div.formControls input.om-button")->click();sleep(1); |
$this->byCssSelector("div#sformulaire form div.formControls input.om-button")->click();sleep(1); |
138 |
// On vérifie qu'il n'y ait pas d'erreur |
// On vérifie qu'il n'y ait pas d'erreur |
250 |
// On vérifie qu'il n'y ait pas d'erreur |
// On vérifie qu'il n'y ait pas d'erreur |
251 |
$this->verifynoerrors(); |
$this->verifynoerrors(); |
252 |
// On vérifie le message |
// On vérifie le message |
253 |
$this->assertRegExp("/^[\s\S]*Création du dossier d'autorisation n°PC 013055 14 00003[\s\S]*$/",$this->byCssSelector(".message")->text()); |
$this->assertContains("Création du dossier d'autorisation n°",$this->byCssSelector(".message .text")->text()); |
254 |
|
// Récupération du numéro de dossier |
255 |
|
preg_match('/(PC)[0-9 ]*(P0)/', $this->byCssSelector(".message .text")->text(), $dossier); |
256 |
|
$dossier = $dossier[0]; |
257 |
// On se déconnecte |
// On se déconnecte |
258 |
$this->logout(); |
$this->logout(); |
259 |
} |
} |
263 |
*/ |
*/ |
264 |
public function testAjoutDemandeModification() { |
public function testAjoutDemandeModification() { |
265 |
|
|
|
// Instancie la timezone |
|
|
date_default_timezone_set('Europe/Paris'); |
|
|
|
|
266 |
// Année en cours |
// Année en cours |
267 |
$annee = date("y"); |
$annee = date("y"); |
268 |
|
|
284 |
// On vérifie qu'il n'y a pas d'erreur sur l'élément affiché |
// On vérifie qu'il n'y a pas d'erreur sur l'élément affiché |
285 |
$this->verifyNoErrors(); |
$this->verifyNoErrors(); |
286 |
// On choisi l'événement |
// On choisi l'événement |
287 |
$this->select($this->byId("evenement"))->selectOptionByLabel("accepter un dossier sans réserve [acceptation]"); |
$this->select($this->byId("evenement"))->selectOptionByValue(81); |
288 |
// On clique sur le bouton ajouter |
// On clique sur le bouton ajouter |
289 |
$this->byXPath("//input[@value='Ajouter']")->click(); |
$this->byXPath("//input[@value='Ajouter']")->click(); |
290 |
// On vérifie que l'instruction s'est bien ajouté |
// On vérifie que l'instruction s'est bien ajouté |
668 |
$this->byCssSelector(".reference_cadastrale_custom_field:nth-child(1)")->value("001"); |
$this->byCssSelector(".reference_cadastrale_custom_field:nth-child(1)")->value("001"); |
669 |
$this->byCssSelector(".reference_cadastrale_custom_field:nth-child(2)")->value("DC"); |
$this->byCssSelector(".reference_cadastrale_custom_field:nth-child(2)")->value("DC"); |
670 |
$this->byCssSelector(".reference_cadastrale_custom_field:nth-child(3)")->value("0015"); |
$this->byCssSelector(".reference_cadastrale_custom_field:nth-child(3)")->value("0015"); |
671 |
|
// réf 2 |
672 |
|
$this->byLinkText("ajouter d'autres lignes")->click(); |
673 |
|
$this->byCssSelector(".reference_cadastrale_custom_field:nth-child(1)")->value("002"); |
674 |
|
$this->byCssSelector(".reference_cadastrale_custom_field:nth-child(2)")->value("DC"); |
675 |
|
$this->byCssSelector(".reference_cadastrale_custom_field:nth-child(3)")->value("0015"); |
676 |
|
// réf 3 |
677 |
|
$this->byLinkText("ajouter d'autres lignes")->click(); |
678 |
|
$this->byCssSelector(".reference_cadastrale_custom_field:nth-child(1)")->value("003"); |
679 |
|
$this->byCssSelector(".reference_cadastrale_custom_field:nth-child(2)")->value("DC"); |
680 |
|
$this->byCssSelector(".reference_cadastrale_custom_field:nth-child(3)")->value("0015"); |
681 |
|
// réf 4 |
682 |
|
$this->byLinkText("ajouter d'autres lignes")->click(); |
683 |
|
$this->byCssSelector(".reference_cadastrale_custom_field:nth-child(1)")->value("004"); |
684 |
|
$this->byCssSelector(".reference_cadastrale_custom_field:nth-child(2)")->value("DC"); |
685 |
|
$this->byCssSelector(".reference_cadastrale_custom_field:nth-child(3)")->value("0015"); |
686 |
|
// réf 5 |
687 |
|
$this->byLinkText("ajouter d'autres lignes")->click(); |
688 |
|
$this->byCssSelector(".reference_cadastrale_custom_field:nth-child(1)")->value("005"); |
689 |
|
$this->byCssSelector(".reference_cadastrale_custom_field:nth-child(2)")->value("DC"); |
690 |
|
$this->byCssSelector(".reference_cadastrale_custom_field:nth-child(3)")->value("0015"); |
691 |
|
// réf 6 |
692 |
|
$this->byLinkText("ajouter d'autres lignes")->click(); |
693 |
|
$this->byCssSelector(".reference_cadastrale_custom_field:nth-child(1)")->value("006"); |
694 |
|
$this->byCssSelector(".reference_cadastrale_custom_field:nth-child(2)")->value("DC"); |
695 |
|
$this->byCssSelector(".reference_cadastrale_custom_field:nth-child(3)")->value("0015"); |
696 |
|
// réf 7 |
697 |
|
$this->byLinkText("ajouter d'autres lignes")->click(); |
698 |
|
$this->byCssSelector(".reference_cadastrale_custom_field:nth-child(1)")->value("007"); |
699 |
|
$this->byCssSelector(".reference_cadastrale_custom_field:nth-child(2)")->value("DC"); |
700 |
|
$this->byCssSelector(".reference_cadastrale_custom_field:nth-child(3)")->value("0015"); |
701 |
|
// réf 8 |
702 |
|
$this->byLinkText("ajouter d'autres lignes")->click(); |
703 |
|
$this->byCssSelector(".reference_cadastrale_custom_field:nth-child(1)")->value("008"); |
704 |
|
$this->byCssSelector(".reference_cadastrale_custom_field:nth-child(2)")->value("DC"); |
705 |
|
$this->byCssSelector(".reference_cadastrale_custom_field:nth-child(3)")->value("0015"); |
706 |
|
// réf 9 |
707 |
|
$this->byLinkText("ajouter d'autres lignes")->click(); |
708 |
|
$this->byCssSelector(".reference_cadastrale_custom_field:nth-child(1)")->value("009"); |
709 |
|
$this->byCssSelector(".reference_cadastrale_custom_field:nth-child(2)")->value("DC"); |
710 |
|
$this->byCssSelector(".reference_cadastrale_custom_field:nth-child(3)")->value("0015"); |
711 |
|
// réf 10 |
712 |
|
$this->byLinkText("ajouter d'autres lignes")->click(); |
713 |
|
$this->byCssSelector(".reference_cadastrale_custom_field:nth-child(1)")->value("010"); |
714 |
|
$this->byCssSelector(".reference_cadastrale_custom_field:nth-child(2)")->value("DC"); |
715 |
|
$this->byCssSelector(".reference_cadastrale_custom_field:nth-child(3)")->value("0015"); |
716 |
|
// réf 11 |
717 |
|
$this->byLinkText("ajouter d'autres lignes")->click(); |
718 |
|
$this->byCssSelector(".reference_cadastrale_custom_field:nth-child(1)")->value("011"); |
719 |
|
$this->byCssSelector(".reference_cadastrale_custom_field:nth-child(2)")->value("DC"); |
720 |
|
$this->byCssSelector(".reference_cadastrale_custom_field:nth-child(3)")->value("0015"); |
721 |
|
// réf 12 |
722 |
|
$this->byLinkText("ajouter d'autres lignes")->click(); |
723 |
|
$this->byCssSelector(".reference_cadastrale_custom_field:nth-child(1)")->value("012"); |
724 |
|
$this->byCssSelector(".reference_cadastrale_custom_field:nth-child(2)")->value("DC"); |
725 |
|
$this->byCssSelector(".reference_cadastrale_custom_field:nth-child(3)")->value("0015"); |
726 |
|
// réf 13 |
727 |
|
$this->byLinkText("ajouter d'autres lignes")->click(); |
728 |
|
$this->byCssSelector(".reference_cadastrale_custom_field:nth-child(1)")->value("013"); |
729 |
|
$this->byCssSelector(".reference_cadastrale_custom_field:nth-child(2)")->value("DC"); |
730 |
|
$this->byCssSelector(".reference_cadastrale_custom_field:nth-child(3)")->value("0015"); |
731 |
|
// réf 14 |
732 |
|
$this->byLinkText("ajouter d'autres lignes")->click(); |
733 |
|
$this->byCssSelector(".reference_cadastrale_custom_field:nth-child(1)")->value("014"); |
734 |
|
$this->byCssSelector(".reference_cadastrale_custom_field:nth-child(2)")->value("DC"); |
735 |
|
$this->byCssSelector(".reference_cadastrale_custom_field:nth-child(3)")->value("0015"); |
736 |
//On clique sur le bouton de recherche "Cadastrale = > Adresse" |
//On clique sur le bouton de recherche "Cadastrale = > Adresse" |
737 |
$this->byId("cad-adr-them")->click(); |
$this->byId("cad-adr-them")->click(); |
738 |
sleep(1); |
sleep(1); |
739 |
// On vérifie que le format des champs est mise à jour automatiquement |
// On vérifie que le format des champs est mise à jour automatiquement |
740 |
$this->assertEquals("001", $this->byCssSelector(".reference_cadastrale_custom_field:nth-child(1)")->value()); |
$this->assertEquals("001", $this->byCssSelector(".reference_cadastrale_custom_field:nth-child(1)")->attribute('value')); |
741 |
$this->assertEquals("DC", $this->byCssSelector(".reference_cadastrale_custom_field:nth-child(2)")->value()); |
$this->assertEquals("DC", $this->byCssSelector(".reference_cadastrale_custom_field:nth-child(2)")->attribute('value')); |
742 |
$this->assertEquals("0015", $this->byCssSelector(".reference_cadastrale_custom_field:nth-child(3)")->value()); |
$this->assertEquals("0015", $this->byCssSelector(".reference_cadastrale_custom_field:nth-child(3)")->attribute('value')); |
743 |
//On verifie l'adresse |
//On verifie l'adresse |
744 |
$this->assertEquals("0075", $this->byId("terrain_adresse_voie_numero")->value()); |
$this->assertEquals("0075", $this->byId("terrain_adresse_voie_numero")->attribute('value')); |
745 |
$this->assertEquals("TRA DE LA DOMINIQUE", $this->byId("terrain_adresse_voie")->value()); |
$this->assertEquals("TRA DE LA DOMINIQUE", $this->byId("terrain_adresse_voie")->attribute('value')); |
746 |
$this->assertEquals("13011", $this->byId("terrain_adresse_code_postal")->value()); |
$this->assertEquals("13011", $this->byId("terrain_adresse_code_postal")->attribute('value')); |
747 |
$this->assertEquals("MARSEILLE", $this->byId("terrain_adresse_localite")->value()); |
$this->assertEquals("MARSEILLE", $this->byId("terrain_adresse_localite")->attribute('value')); |
748 |
// On valide le formulaire |
// On valide le formulaire |
749 |
$this->byXPath("//input[@value='Ajouter']")->click(); |
$this->byXPath("//input[@value='Ajouter']")->click(); |
750 |
// On vérifie le message d'erreur |
// On vérifie le message d'erreur |
751 |
$this->assertRegExp("/^[\s\S]*SAISIE NON ENREGISTRÉE[\s\S]*$/", $this->byCssSelector(".message")->text()); |
$this->assertRegExp("/^[\s\S]*SAISIE NON ENREGISTRÉE[\s\S]*$/", $this->byCssSelector(".message")->text()); |
752 |
sleep(1); |
sleep(1); |
753 |
// On vérifie que les références cadastrales soient toujours affiché |
// On vérifie que les références cadastrales soient toujours affiché |
754 |
$this->assertEquals("001", $this->byCssSelector(".reference_cadastrale_custom_field:nth-child(1)")->value()); |
$this->assertEquals("001", $this->byCssSelector(".reference_cadastrale_custom_field:nth-child(1)")->attribute('value')); |
755 |
$this->assertEquals("DC", $this->byCssSelector(".reference_cadastrale_custom_field:nth-child(2)")->value()); |
$this->assertEquals("DC", $this->byCssSelector(".reference_cadastrale_custom_field:nth-child(2)")->attribute('value')); |
756 |
$this->assertEquals("0015", $this->byCssSelector(".reference_cadastrale_custom_field:nth-child(3)")->value()); |
$this->assertEquals("0015", $this->byCssSelector(".reference_cadastrale_custom_field:nth-child(3)")->attribute('value')); |
757 |
//On saisie les références cadastrales |
//On saisie les références cadastrales |
758 |
$this->byCssSelector(".reference_cadastrale_custom_field:nth-child(1)")->clear(); |
$this->byCssSelector(".reference_cadastrale_custom_field:nth-child(1)")->clear(); |
759 |
$this->byCssSelector(".reference_cadastrale_custom_field:nth-child(2)")->clear(); |
$this->byCssSelector(".reference_cadastrale_custom_field:nth-child(2)")->clear(); |
963 |
$this->byLinkText("Autre Dossier")->click(); |
$this->byLinkText("Autre Dossier")->click(); |
964 |
// On vérifie qu'il n'y ait pas d'erreur |
// On vérifie qu'il n'y ait pas d'erreur |
965 |
$this->verifynoerrors(); |
$this->verifynoerrors(); |
966 |
// On vérifie que ledossier qui ne doit pas être dans |
// On vérifie que le dossier qui ne doit pas être dans |
967 |
// "Dossier En Cours" sont ici |
// "Dossier En Cours" sont ici |
968 |
$this->assertRegExp("/^[\s\S]*PC 013055 14 00001P0[\s\S]*$/", |
$this->assertRegExp("/^[\s\S]*PC 013055 ".date("y")." 00001P0[\s\S]*$/", |
969 |
$this->byCssSelector("#tab-demande_autre_dossier .tab-tab")->text()); |
$this->byCssSelector("#tab-demande_autre_dossier .tab-tab")->text()); |
970 |
// On clique sur "Dossier En Cours" |
// On clique sur "Dossier En Cours" |
971 |
$this->byLinkText("Dossier En Cours")->click(); |
$this->byLinkText("Dossier En Cours")->click(); |