Drop the comment interval setting
CI / Deploy / test (push) Successful in 52s
CI / Deploy / deploy (push) Skipped

Comments on the stage are always timed by their length now, so the
selectable interval and results.commentInterval are gone.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
gnilebeinandClaude Opus 5.5 committed 2026-11-09 14:18:01 +01:00
1 parent 05ff5967e3
commit 8d128095ed
7 files changed
+23 -86

No files matched your search

@@ -154,33 +154,18 @@ class ScaleCommentsTest extends TestCase
$this->assertSame([4, 3], array_column($this->presenterResults($token)['comments'], 'value'));
}
public function testCommentIntervalIsConfigurable(): void
public function testCommentIntervalIsNotConfigurable(): void
{
$auto = Slide::COMMENT_INTERVAL_AUTO;
$this->assertSame($auto, SlidesTable::sanitizeSettings(Slide::TYPE_SCALE, [])['comment_interval']);
$this->assertSame(15, SlidesTable::sanitizeSettings(Slide::TYPE_SCALE, ['comment_interval' => '15'])['comment_interval']);
$this->assertSame($auto, SlidesTable::sanitizeSettings(Slide::TYPE_SCALE, ['comment_interval' => '0'])['comment_interval']);
$this->assertSame($auto, SlidesTable::sanitizeSettings(Slide::TYPE_SCALE, ['comment_interval' => '7'])['comment_interval']);
$this->assertSame($auto, SlidesTable::sanitizeSettings(Slide::TYPE_SCALE, ['comment_interval' => '-1'])['comment_interval']);
[, $token] = $this->scaleWithComments(['comment_interval' => 20]);
$this->assertSame(20, $this->presenterResults($token)['commentInterval']);
// The presentation times each comment by its length; there is no setting for it.
$settings = SlidesTable::sanitizeSettings(Slide::TYPE_SCALE, ['comment_interval' => '15']);
$this->assertArrayNotHasKey('comment_interval', $settings);
[, $token] = $this->scaleWithComments();
$this->assertSame($auto, $this->presenterResults($token)['commentInterval']);
$this->assertArrayNotHasKey('commentInterval', $this->presenterResults($token));
$this->get("/admin/$token");
$this->assertResponseOk();
}
public function testFormShowsCommentInterval(): void
{
[, $token] = $this->createPoll();
$this->get("/admin/$token/slides/add?type=scale");
$this->assertResponseContains('name="settings[comment_interval]"');
$this->assertResponseContains('15 Sekunden');
$this->assertResponseContains('automatisch (je nach Länge des Kommentars)');
$this->assertResponseOk();
$this->assertResponseNotContains('comment_interval');
}
public function testParticipantsNeverSeeComments(): void