Close an open ordering slide on "next" before moving on
Forward in the presenter view now reveals the solution first (like the quiz build steps) instead of skipping straight to the next slide. Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
This commit is contained in:
1 parent
0f91377de3
commit
7fd4a0da8c
3 files changed
+27
-1
No files matched your search
@@ -93,6 +93,24 @@ class OrderSlideTest extends TestCase
|
||||
$this->assertStringContainsString('komplett richtig sortiert', $html);
|
||||
}
|
||||
|
||||
public function testNextRevealsAnOpenOrderSlideBeforeMovingOn(): void
|
||||
{
|
||||
[$poll, $token] = $this->createPoll();
|
||||
$order = $this->createSlide($poll, Slide::TYPE_ORDER, [], ['Eins', 'Zwei', 'Drei']);
|
||||
$next = $this->createSlide($poll, Slide::TYPE_CONTENT);
|
||||
$this->goLive($poll, $order);
|
||||
|
||||
// First forward closes the voting (solution), the slide stays live.
|
||||
$this->post("/admin/$token/control", ['action' => 'next']);
|
||||
$poll = $this->pollsTable()->get($poll->id);
|
||||
$this->assertSame($order->id, $poll->current_slide_id);
|
||||
$this->assertFalse($this->slidesTable()->get($order->id)->isVotingOpen());
|
||||
|
||||
// A second forward (and a repeated one) really moves on.
|
||||
$this->post("/admin/$token/control", ['action' => 'next']);
|
||||
$this->assertSame($next->id, $this->pollsTable()->get($poll->id)->current_slide_id);
|
||||
}
|
||||
|
||||
public function testRankingHasNoSolutionAndShowsAverageOrder(): void
|
||||
{
|
||||
[$poll, $token] = $this->createPoll();
|
||||
|
||||
Reference in new issue
Block a user