Merge pull request 'Rotate scale comments by reading time' (#39) from feature/comment-auto-interval into main
CI / Deploy / test (push) Successful in 57s
CI / Deploy / deploy (push) Successful in 7s

Reviewed-on: #39
This commit was merged in pull request #39.
This commit is contained in:
gnilebein committed 2026-11-09 14:11:23 +01:00
commit db22863608
6 files changed
+68 -25

No files matched your search

@@ -156,14 +156,19 @@ class ScaleCommentsTest extends TestCase
public function testCommentIntervalIsConfigurable(): void
{
$this->assertSame(8, SlidesTable::sanitizeSettings(Slide::TYPE_SCALE, [])['comment_interval']);
$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(8, SlidesTable::sanitizeSettings(Slide::TYPE_SCALE, ['comment_interval' => '7'])['comment_interval']);
$this->assertSame(8, SlidesTable::sanitizeSettings(Slide::TYPE_SCALE, ['comment_interval' => '-1'])['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']);
[, $token] = $this->scaleWithComments();
$this->assertSame($auto, $this->presenterResults($token)['commentInterval']);
$this->get("/admin/$token");
$this->assertResponseOk();
}
@@ -175,6 +180,7 @@ class ScaleCommentsTest extends TestCase
$this->assertResponseContains('name="settings[comment_interval]"');
$this->assertResponseContains('15 Sekunden');
$this->assertResponseContains('automatisch (je nach Länge des Kommentars)');
}
public function testParticipantsNeverSeeComments(): void