feat: add the house manager questionnaire per travel and compact the questionnaire layout
This commit is contained in:
1 parent
d760ed3cdf
commit
bfef08b519
50 files changed
+2763
-180
No files matched your search
@@ -69,9 +69,10 @@ class QuestionnaireTemplateTest extends KernelTestCase
|
||||
}
|
||||
|
||||
/**
|
||||
* Long scales are selects, starting empty; Ja/Nein stays radios, each answer a clickable row.
|
||||
* Long scales are selects, starting empty; Ja/Nein stays radios, answered with a button each
|
||||
* beside the question - the label around the hidden radio is the click target.
|
||||
*/
|
||||
public function testLongScalesAreSelectsAndYesNoAreClickableRows(): void
|
||||
public function testLongScalesAreSelectsAndYesNoAreButtons(): void
|
||||
{
|
||||
$crawler = $this->renderForm();
|
||||
|
||||
@@ -80,13 +81,13 @@ class QuestionnaireTemplateTest extends KernelTestCase
|
||||
$this->assertSame('', $seminar->filter('option')->first()->attr('value'));
|
||||
$this->assertCount(1, $crawler->filter('[data-question-key="bus_feedback.outbound.wc"] select'));
|
||||
|
||||
// the labels wrapping a radio: the whole row is the click target
|
||||
$rows = $crawler
|
||||
->filter('[data-question-key="teamer_feedback.had_organisational_problems"] label')
|
||||
$buttons = $crawler
|
||||
->filter('[data-question-key="teamer_feedback.had_organisational_problems"] [role="radiogroup"] label')
|
||||
->reduce(static fn (Crawler $label): bool => 1 === $label->filter('input[type="radio"]')->count())
|
||||
;
|
||||
$this->assertCount(2, $rows);
|
||||
$this->assertStringContainsString('hover:', $rows->first()->attr('class'));
|
||||
$this->assertCount(2, $buttons);
|
||||
$this->assertStringContainsString('sr-only', $buttons->first()->filter('input')->attr('class'));
|
||||
$this->assertStringContainsString('hover:', $buttons->first()->filter('span')->attr('class'));
|
||||
}
|
||||
|
||||
public function testRatingIsFiveRadiosInARadioGroup(): void
|
||||
|
||||
Reference in new issue
Block a user