Hide quiz answer options on stage until the quiz starts
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
This commit is contained in:
1 parent
19320f01c4
commit
28bfd535f4
3 files changed
+24
-1
No files matched your search
@@ -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();
|
||||
|
||||
Reference in new issue
Block a user