Make "comment without rating" a choice in a comment dropdown
The scale form replaces the comment checkbox with a dropdown: no comment field, comment with mandatory rating, or comment alone is enough. Existing slides keep their behaviour (rating mandatory). Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
This commit is contained in:
1 parent
dbac9e93c7
commit
b496032604
8 files changed
+49
-18
No files matched your search
@@ -74,7 +74,7 @@ class VoteServiceTest extends TestCase
|
||||
public function testScaleCommentOnlyCountsAsParticipantButNotInAverage(): void
|
||||
{
|
||||
[$poll] = $this->createPoll();
|
||||
$slide = $this->createSlide($poll, Slide::TYPE_SCALE, ['settings' => ['scale_min' => 1, 'scale_max' => 5, 'comments' => true]]);
|
||||
$slide = $this->createSlide($poll, Slide::TYPE_SCALE, ['settings' => ['scale_min' => 1, 'scale_max' => 5, 'comments' => true, 'comment_only' => true]]);
|
||||
$poll = $this->goLive($poll, $slide);
|
||||
$service = new VoteService();
|
||||
$service->submit($poll, $slide, 'p1', ['value' => '4']);
|
||||
@@ -93,10 +93,10 @@ class VoteServiceTest extends TestCase
|
||||
$service->submit($poll, $slide, 'p2', ['value' => '2']);
|
||||
}
|
||||
|
||||
public function testScaleWithoutRatingNeedsCommentField(): void
|
||||
public function testScaleWithoutRatingNeedsCommentOnlySetting(): void
|
||||
{
|
||||
[$poll] = $this->createPoll();
|
||||
$slide = $this->createSlide($poll, Slide::TYPE_SCALE);
|
||||
$slide = $this->createSlide($poll, Slide::TYPE_SCALE, ['settings' => ['comments' => true]]);
|
||||
$poll = $this->goLive($poll, $slide);
|
||||
|
||||
$this->expectExceptionMessage('zwischen 1 und 5');
|
||||
@@ -106,7 +106,7 @@ class VoteServiceTest extends TestCase
|
||||
public function testScaleNeedsRatingOrComment(): void
|
||||
{
|
||||
[$poll] = $this->createPoll();
|
||||
$slide = $this->createSlide($poll, Slide::TYPE_SCALE, ['settings' => ['comments' => true]]);
|
||||
$slide = $this->createSlide($poll, Slide::TYPE_SCALE, ['settings' => ['comments' => true, 'comment_only' => true]]);
|
||||
$poll = $this->goLive($poll, $slide);
|
||||
|
||||
$this->expectExceptionMessage('oder schreibe einen Kommentar');
|
||||
@@ -116,7 +116,7 @@ class VoteServiceTest extends TestCase
|
||||
public function testCommentOnlyAnswerCanBeEditedButNotEmptied(): void
|
||||
{
|
||||
[$poll] = $this->createPoll();
|
||||
$slide = $this->createSlide($poll, Slide::TYPE_SCALE, ['settings' => ['comments' => true]]);
|
||||
$slide = $this->createSlide($poll, Slide::TYPE_SCALE, ['settings' => ['comments' => true, 'comment_only' => true]]);
|
||||
$poll = $this->goLive($poll, $slide);
|
||||
$service = new VoteService();
|
||||
$service->submit($poll, $slide, 'p1', ['comment' => 'Erst']);
|
||||
|
||||
Reference in new issue
Block a user