Fix tests after introduction of bootstrap

This commit is contained in:
2021-07-22 15:20:45 +00:00
parent 08e396195c
commit 2699d48533
7 changed files with 31 additions and 22 deletions

View File

@@ -102,7 +102,6 @@ class PersonControllerUpdateTest extends WebTestCase
public function testHiddenFielsArePresent()
{
$crawler = $this->client->request('GET', $this->editUrl);
$configurables = array('placeOfBirth', 'phonenumber', 'email',
'countryOfBirth', 'nationality', 'spokenLanguages', 'maritalStatus');
$form = $crawler->selectButton('Enregistrer')->form(); //;
@@ -190,7 +189,7 @@ class PersonControllerUpdateTest extends WebTestCase
'the value '.$field.' is updated in db');
$crawler = $this->client->followRedirect();
$this->assertGreaterThan(0, $crawler->filter('.success')->count(),
$this->assertGreaterThan(0, $crawler->filter('.alert-success')->count(),
'a element .success is shown');
if($field == 'birthdate' or $field == 'memo' or $field == 'countryOfBirth' or $field == 'nationality'
@@ -245,7 +244,7 @@ class PersonControllerUpdateTest extends WebTestCase
$this->assertFalse($this->client->getResponse()->isRedirect(),
'the page is not redirected to /general');
$this->assertGreaterThan(0, $crawler->filter('.error')->count(),
$this->assertGreaterThan(0, $crawler->filter('.alert-danger')->count(),
'a element .error is shown');
}