Let each poll speed up or slow down the scale comments
CI / Deploy / test (push) Successful in 1m12s
CI / Deploy / deploy (push) Skipped

A new poll setting (polls.comment_speed, 50-200 %) scales the display
time of the rotating scale comments in the presentation and embed; the
duration still follows the text length.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
gnilebeinandClaude Opus 5.5 committed 2026-11-11 12:51:08 +01:00
1 parent c1f9be2eef
commit 166cb475c6
10 files changed
+100 -6

No files matched your search

@@ -62,6 +62,27 @@ class AdminControllerTest extends TestCase
$this->assertSame('Neu', $this->pollsTable()->get($poll->id)->title);
}
public function testCommentSpeedIsSavedAndSentToThePresenter(): void
{
[$poll, $token] = $this->createPoll();
$this->get("/admin/$token/state");
$this->assertEquals(1, json_decode((string)$this->_response->getBody(), true)['poll']['commentSpeed']);
$this->post("/admin/$token/settings", ['title' => 'Testumfrage', 'is_active' => '1', 'comment_speed' => '150']);
$this->assertSame(150, $this->pollsTable()->get($poll->id)->comment_speed);
$this->get("/admin/$token/state");
$this->assertEquals(1.5, json_decode((string)$this->_response->getBody(), true)['poll']['commentSpeed']);
}
public function testInvalidCommentSpeedIsRejected(): void
{
[$poll, $token] = $this->createPoll();
$this->post("/admin/$token/settings", ['title' => 'Testumfrage', 'is_active' => '1', 'comment_speed' => '1000']);
$this->assertSame(100, $this->pollsTable()->get($poll->id)->comment_speed);
}
public function testTokenOfOtherPollCannotAccessSlides(): void
{
[$pollA] = $this->createPoll('A');