fix: offer the questionnaire after every placement, the bus part to escorts
This commit is contained in:
1 parent
9fedc5b5d3
commit
2f4f9800dd
30 files changed
+311
-77
No files matched your search
@@ -71,7 +71,9 @@ class TestControllerTest extends WebTestCase
|
||||
|
||||
$this->assertResponseIsSuccessful();
|
||||
$this->assertStringContainsString('Testmodus', $crawler->text());
|
||||
$this->assertStringContainsString('keine Busbegleitung', $crawler->text());
|
||||
// the assignment has no escort, so the questionnaire comes without the bus part
|
||||
$this->assertStringContainsString('Ohne die Fragen zur Busfahrt', $crawler->text());
|
||||
$this->assertCount(0, $crawler->filter('[data-question-key="bus_company"]'));
|
||||
$this->assertCount(1, $crawler->filter('form[data-controller="questionnaire"]'));
|
||||
}
|
||||
|
||||
@@ -102,7 +104,7 @@ class TestControllerTest extends WebTestCase
|
||||
{
|
||||
$this->client->loginUser($this->user('ROLE_TEAM_ADMIN'));
|
||||
$form = $this->open()->selectButton('Absenden')->form();
|
||||
$definition = self::getContainer()->get(QuestionnaireCatalog::class)->get(QuestionnaireCatalog::TEAMER_ESCORT);
|
||||
$definition = self::getContainer()->get(QuestionnaireCatalog::class)->get(QuestionnaireCatalog::TEAMER_ASSIGNMENT)->forFlags([]);
|
||||
|
||||
foreach ($definition->sections as $section) {
|
||||
foreach ($section->questions as $question) {
|
||||
@@ -121,10 +123,19 @@ class TestControllerTest extends WebTestCase
|
||||
$crawler = $this->client->submit($form);
|
||||
|
||||
$this->assertStringContainsString('So würde der abgeschickte Fragebogen gespeichert', $crawler->text());
|
||||
$this->assertStringContainsString('Boonk Reisen', $crawler->text());
|
||||
$this->assertStringContainsString('Sehr gut – Probleme wurden schnell', $crawler->text());
|
||||
$this->assertNothingSaved();
|
||||
}
|
||||
|
||||
public function testTheBusPartCanBeTriedOnAnAssignmentWithoutEscort(): void
|
||||
{
|
||||
$this->client->loginUser($this->user('ROLE_TEAM_ADMIN'));
|
||||
$crawler = $this->client->request('GET', sprintf('/administrative/questionnaire/test/%s?bus_escort=1', $this->assignment->getUuid()));
|
||||
|
||||
$this->assertStringContainsString('Mit den Fragen zur Busfahrt', $crawler->text());
|
||||
$this->assertCount(1, $crawler->filter('[data-question-key="bus_company"]'));
|
||||
}
|
||||
|
||||
/**
|
||||
* The app answers a teamer in the office area with a redirect to their dashboard, not a 403.
|
||||
*/
|
||||
|
||||
Reference in new issue
Block a user