Add personal ranking mode to order slides and show image placement only with an image
Order slides get a "ranking" setting without a correct solution: the stage shows the live average ranking, participants only get a confirmation. The image placement question in the slide form is only shown for an existing image or a chosen file. Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
This commit is contained in:
1 parent
85627b364d
commit
0aac113f30
15 files changed
+239
-15
No files matched your search
@@ -66,6 +66,21 @@ class SlideImageTest extends TestCase
|
||||
$this->assertSame([$slide->image], $this->storedImages($poll->id));
|
||||
}
|
||||
|
||||
public function testPlacementIsOnlyOfferedWithAnImage(): void
|
||||
{
|
||||
[$poll, $token, $slide] = $this->slideWithImage();
|
||||
$empty = $this->createSlide($poll, Slide::TYPE_CONTENT, ['question' => 'Ohne Bild']);
|
||||
|
||||
// The placement fieldset is always rendered (usable without JavaScript); the script shows it only
|
||||
// for an existing image or a chosen file, marked by data-has-image.
|
||||
$this->get("/admin/$token/slides/{$slide->id}/edit");
|
||||
$this->assertResponseContains('data-image-layout');
|
||||
$this->assertResponseContains('data-has-image');
|
||||
$this->get("/admin/$token/slides/{$empty->id}/edit");
|
||||
$this->assertResponseContains('data-image-layout');
|
||||
$this->assertResponseNotContains('data-has-image');
|
||||
}
|
||||
|
||||
public function testLayoutDefaultsByType(): void
|
||||
{
|
||||
[$poll, , $content] = $this->slideWithImage();
|
||||
|
||||
Reference in new issue
Block a user