diff --git a/Resources/translations/messages.en.yml b/Resources/translations/messages.en.yml index 2f3a97ca3..a99af9e74 100644 --- a/Resources/translations/messages.en.yml +++ b/Resources/translations/messages.en.yml @@ -66,3 +66,6 @@ Reset: 'Remise à zéro' 'Create accompanying period': 'Create accompanying period' 'Closing motive': 'Motif de clôture' 'Person details': 'Détails de la personne' + +Create an accompanying period: Create an accompanying period +'Create': Create \ No newline at end of file diff --git a/Tests/Controller/AccompanyingPeriodControllerTest.php b/Tests/Controller/AccompanyingPeriodControllerTest.php index b59a7e001..40f4936b4 100644 --- a/Tests/Controller/AccompanyingPeriodControllerTest.php +++ b/Tests/Controller/AccompanyingPeriodControllerTest.php @@ -161,7 +161,7 @@ class AccompanyingPeriodControllerTest extends WebTestCase $crawler = $this->client->request('GET', '/en/person/' .$this->person->getId().'/accompanying-period/close'); - $form = $crawler->selectButton('Submit')->form(); + $form = $crawler->selectButton('Close accompanying period')->form(); $form->get(self::CLOSING_MOTIVE_INPUT) ->setValue($this->getLastValueOnClosingMotive($form)); @@ -195,7 +195,7 @@ class AccompanyingPeriodControllerTest extends WebTestCase $crawler = $this->client->request('GET', '/en/person/' .$this->person->getId().'/accompanying-period/close'); - $form = $crawler->selectButton('Submit')->form(); + $form = $crawler->selectButton('Close accompanying period')->form(); $form->get(self::CLOSING_MOTIVE_INPUT) ->setValue($this->getLastValueOnClosingMotive($form)); @@ -226,7 +226,7 @@ class AccompanyingPeriodControllerTest extends WebTestCase $crawler = $this->client->request('GET', '/en/person/' .$this->person->getId().'/accompanying-period/create'); - $form = $crawler->selectButton('Submit')->form(); + $form = $crawler->selectButton('Create an accompanying period')->form(); $form->get(self::CLOSING_MOTIVE_INPUT) ->setValue($this->getLastValueOnClosingMotive($form)); $form->get(self::CLOSING_INPUT) @@ -260,7 +260,7 @@ class AccompanyingPeriodControllerTest extends WebTestCase $crawler = $this->client->request('GET', '/en/person/' .$this->person->getId().'/accompanying-period/create'); - $form = $crawler->selectButton('Submit')->form(); + $form = $crawler->selectButton('Create an accompanying period')->form(); $form->get(self::CLOSING_MOTIVE_INPUT) ->setValue($this->getLastValueOnClosingMotive($form)); $form->get(self::CLOSING_INPUT) @@ -292,7 +292,7 @@ class AccompanyingPeriodControllerTest extends WebTestCase $crawler = $this->client->request('GET', '/en/person/' .$this->person->getId().'/accompanying-period/create'); - $form = $crawler->selectButton('Submit')->form(); + $form = $crawler->selectButton('Create an accompanying period')->form(); $form->get(self::CLOSING_MOTIVE_INPUT) ->setValue($this->getLastValueOnClosingMotive($form)); $form->get(self::CLOSING_INPUT) @@ -333,7 +333,7 @@ class AccompanyingPeriodControllerTest extends WebTestCase $crawler = $this->client->request('GET', '/en/person/' .$this->person->getId().'/accompanying-period/create'); - $form = $crawler->selectButton('Submit')->form();; + $form = $crawler->selectButton('Create an accompanying period')->form();; $form->get(self::CLOSING_MOTIVE_INPUT) ->setValue($this->getLastValueOnClosingMotive($form)); $form->get(self::CLOSING_INPUT) @@ -364,7 +364,7 @@ class AccompanyingPeriodControllerTest extends WebTestCase $crawler = $this->client->request('GET', '/en/person/' .$this->person->getId().'/accompanying-period/create'); - $form = $crawler->selectButton('Submit')->form(); + $form = $crawler->selectButton('Create an accompanying period')->form(); $form->get(self::CLOSING_MOTIVE_INPUT) ->setValue($this->getLastValueOnClosingMotive($form)); $form->get(self::CLOSING_INPUT) @@ -406,7 +406,7 @@ class AccompanyingPeriodControllerTest extends WebTestCase $crawler = $this->client->request('GET', '/en/person/' .$this->person->getId().'/accompanying-period/create'); - $form = $crawler->selectButton('Submit')->form(); + $form = $crawler->selectButton('Create an accompanying period')->form(); $form->get(self::CLOSING_MOTIVE_INPUT) ->setValue($this->getLastValueOnClosingMotive($form)); $form->get(self::CLOSING_INPUT) @@ -447,7 +447,7 @@ class AccompanyingPeriodControllerTest extends WebTestCase $crawler = $this->client->request('GET', '/en/person/' .$this->person->getId().'/accompanying-period/create'); - $form = $crawler->selectButton('Submit')->form(); + $form = $crawler->selectButton('Create an accompanying period')->form(); $form->get(self::CLOSING_MOTIVE_INPUT) ->setValue($this->getLastValueOnClosingMotive($form)); $form->get(self::CLOSING_INPUT) diff --git a/Tests/Controller/PersonAddressControllerTest.php b/Tests/Controller/PersonAddressControllerTest.php index 6dc35555d..83fd540fb 100644 --- a/Tests/Controller/PersonAddressControllerTest.php +++ b/Tests/Controller/PersonAddressControllerTest.php @@ -126,7 +126,7 @@ class PersonAddressControllerTest extends WebTestCase $this->assertTrue($this->client->getResponse()->isSuccessful()); // get the form and populate the most obvious fields (postcode will come later) - $form = $crawler->selectButton('Envoi')->form(array( + $form = $crawler->filter('.bt-create')->form(array( 'address[streetAddress1]' => 'Rue de la Paix, 50', 'address[streetAddress2]' => $this->postalCode->getId(), 'address[validFrom]' => '15-01-2016' @@ -167,7 +167,7 @@ class PersonAddressControllerTest extends WebTestCase $this->assertTrue($this->client->getResponse()->isSuccessful()); - $form = $crawler->selectButton('Envoi')->form(array( + $form = $crawler->filter('.bt-save')->form(array( 'address[streetAddress1]' => 'Rue du Trou Normand, 15', 'address[validFrom]' => '15-01-2015' )); diff --git a/Tests/Search/PersonSearchTest.php b/Tests/Search/PersonSearchTest.php index 2b600af7a..b2c94b6bc 100644 --- a/Tests/Search/PersonSearchTest.php +++ b/Tests/Search/PersonSearchTest.php @@ -204,7 +204,7 @@ class PersonSearchTest extends WebTestCase $this->assertRegExp('/Gérard/', $crawlerCanSee->text(), 'center a_social may see "Gérard" in center a'); - $this->assertRegExp('/Aucune personne ne correspond aux termes de recherche "gerard"/', + $this->assertRegExp('/Aucune personne ne correspond aux termes de recherche/', $crawlerCannotSee->text(), 'center b_social may not see any "Gérard" associated to center b');