mirror of
https://gitlab.com/Chill-Projet/chill-bundles.git
synced 2025-08-20 22:53:49 +00:00
add form edit metadata in summary page
This commit is contained in:
@@ -33,6 +33,35 @@ class HouseholdControllerTest extends WebTestCase
|
||||
$this->assertResponseIsSuccessful();
|
||||
}
|
||||
|
||||
/**
|
||||
* @dataProvider generateValidHouseholdIds
|
||||
*/
|
||||
public function testEditMetadata($householdId)
|
||||
{
|
||||
|
||||
$crawler = $this->client->request(
|
||||
Request::METHOD_GET,
|
||||
"/fr/person/household/{$householdId}/summary",
|
||||
[
|
||||
'edit' => true
|
||||
]
|
||||
);
|
||||
|
||||
$this->assertResponseIsSuccessful();
|
||||
|
||||
$form = $crawler->selectButton('Enregistrer')
|
||||
->form();
|
||||
|
||||
$form['household[commentMembers][comment]'] = "This is a text **generated** by automatic tests";
|
||||
$form['household[waitingForBirth]']->tick();
|
||||
$form['household[waitingForBirthDate]'] = (new \DateTime('today'))
|
||||
->add(new \DateInterval('P1M'))->format('Y-m-d');
|
||||
|
||||
$this->client->submit($form);
|
||||
|
||||
$this->assertResponseRedirects("/fr/person/household/{$householdId}/summary");
|
||||
}
|
||||
|
||||
/**
|
||||
* @dataProvider generateValidHouseholdIds
|
||||
*/
|
||||
@@ -44,6 +73,7 @@ class HouseholdControllerTest extends WebTestCase
|
||||
);
|
||||
|
||||
$this->assertResponseIsSuccessful();
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
|
Reference in New Issue
Block a user