Walk through Q&A stages with "next" before leaving the slide
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
This commit is contained in:
1 parent
7475f096ea
commit
d1d748f760
3 files changed
+28
-9
No files matched your search
@@ -172,6 +172,24 @@ class AdminControllerTest extends TestCase
|
||||
$this->assertSame(Slide::QUIZ_READY, $slide->quizPhase());
|
||||
}
|
||||
|
||||
public function testForwardOnQaWalksThroughStagesBeforeNextSlide(): void
|
||||
{
|
||||
[$poll, $token] = $this->createPoll();
|
||||
$qa = $this->createSlide($poll, Slide::TYPE_QA, [], []);
|
||||
$this->createSlide($poll);
|
||||
$this->goLive($poll, $qa);
|
||||
|
||||
$this->post("/admin/$token/control", ['action' => 'next']);
|
||||
$this->assertSame(Slide::QA_VOTE, $this->slidesTable()->get($qa->id)->qaStage());
|
||||
$this->post("/admin/$token/control", ['action' => 'next']);
|
||||
$this->assertSame(Slide::QA_DISCUSS, $this->slidesTable()->get($qa->id)->qaStage());
|
||||
$this->assertSame($qa->id, $this->pollsTable()->get($poll->id)->current_slide_id);
|
||||
|
||||
// No questions to step through: now it goes to the next slide.
|
||||
$this->post("/admin/$token/control", ['action' => 'next']);
|
||||
$this->assertNotSame($qa->id, $this->pollsTable()->get($poll->id)->current_slide_id);
|
||||
}
|
||||
|
||||
public function testEditKeepsVotesOfUnchangedOptions(): void
|
||||
{
|
||||
[$poll, $token] = $this->createPoll();
|
||||
|
||||
Reference in new issue
Block a user