Hide quiz answer options on stage until the quiz starts
CI / Deploy / PHP 8.4 (push) Successful in 1m16s
CI / Deploy / PHP 8.5 (push) Successful in 1m17s
CI / Deploy / test (push) Successful in 1s
CI / Deploy / deploy (push) Skipped

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
This commit is contained in:
gnilebeinandClaude Sonnet 5.5 committed 2026-11-13 08:33:56 +01:00
1 parent 19320f01c4
commit 28bfd535f4
3 files changed
+24 -1

No files matched your search

+16
View File
@@ -110,6 +110,22 @@ class QuizTest extends TestCase
$this->assertSame(Slide::QUIZ_FINISHED, $slide->quizPhase());
}
public function testReadyQuizHidesAnswerOptions(): void
{
[$poll, $slide] = $this->createQuiz();
$results = (new ResultsService())->forSlide($slide);
$this->assertSame('ready', $results['phase']);
$this->assertSame([], $results['options']);
$state = $this->participantState($poll, 'p1');
$this->assertStringNotContainsString('Berlin', (string)json_encode($state));
$slide = $this->setOpen($slide, true);
$results = (new ResultsService())->forSlide($slide);
$this->assertSame(['Berlin', 'Hamburg', 'München'], array_column($results['options'], 'label'));
}
public function testRunningQuizHidesCountsAndCorrectAnswers(): void
{
[$poll, $slide] = $this->createQuiz();