test element file routing

This commit is contained in:
Yisroel Baum 2026-06-14 23:05:45 +03:00
parent 14d2ce2284
commit 0d5783ba9c
Signed by: yisroelbaum
GPG key ID: 0FA60884F75520A9
14 changed files with 951 additions and 388 deletions

View file

@ -43,7 +43,8 @@ class DemoSeedDataTest extends TestCase
Storage::disk('public')->assertExists(
'element-icons/baderech-haavodah-icon.png',
);
$this->assertNull($rootElement->getPdfPath());
$this->assertNull($rootElement->getShortPdfPath());
$this->assertNull($rootElement->getLongPdfPath());
$this->assertNull($rootElement->getYoutubeUrl());
$this->assertCount(6, $childElements);
$this->assertSame(
@ -96,10 +97,13 @@ class DemoSeedDataTest extends TestCase
$childElements[0]->getRichText(),
);
$this->assertSame(
'element-pdfs/baderech.pdf',
$childElements[0]->getPdfPath(),
'element-pdfs/short/baderech.pdf',
$childElements[0]->getShortPdfPath(),
);
$this->assertNull($childElements[0]->getLongPdfPath());
Storage::disk('public')->assertExists(
'element-pdfs/short/baderech.pdf',
);
Storage::disk('public')->assertExists('element-pdfs/baderech.pdf');
$introductionChildElements = $elementRepository->findByParentElement(
$childElements[0],
@ -114,7 +118,8 @@ class DemoSeedDataTest extends TestCase
$this->assertSame('', $introductionAudioElement->getDescription());
$this->assertNull($introductionAudioElement->getIconImageUrl());
$this->assertSame('', $introductionAudioElement->getRichText());
$this->assertNull($introductionAudioElement->getPdfPath());
$this->assertNull($introductionAudioElement->getShortPdfPath());
$this->assertNull($introductionAudioElement->getLongPdfPath());
$this->assertSame(
'https://www.youtube.com/watch?v=yHx-r4p6hHU&t=1s',
$introductionAudioElement->getYoutubeUrl(),