test element icons
This commit is contained in:
parent
c5ea3640b7
commit
ac7af2463d
7 changed files with 80 additions and 0 deletions
|
|
@ -28,6 +28,7 @@ class ElementsEndpointTest extends TestCase
|
||||||
set: $set,
|
set: $set,
|
||||||
title: 'Baderech HaAvodah',
|
title: 'Baderech HaAvodah',
|
||||||
description: 'A structured path for growth',
|
description: 'A structured path for growth',
|
||||||
|
iconImageUrl: '/assets/baderech-haavodah-icon.png',
|
||||||
richText: '<p>A structured path for growth</p>',
|
richText: '<p>A structured path for growth</p>',
|
||||||
pdfPath: '/assets/pdfs/baderech.pdf',
|
pdfPath: '/assets/pdfs/baderech.pdf',
|
||||||
youtubeUrl: $sampleYoutubeUrl,
|
youtubeUrl: $sampleYoutubeUrl,
|
||||||
|
|
@ -37,6 +38,7 @@ class ElementsEndpointTest extends TestCase
|
||||||
set: $set,
|
set: $set,
|
||||||
title: 'Avodah Foundations',
|
title: 'Avodah Foundations',
|
||||||
description: 'Foundations for steady avodah',
|
description: 'Foundations for steady avodah',
|
||||||
|
iconImageUrl: null,
|
||||||
richText: '<p>Foundations rich text</p>',
|
richText: '<p>Foundations rich text</p>',
|
||||||
pdfPath: '/assets/pdfs/foundations.pdf',
|
pdfPath: '/assets/pdfs/foundations.pdf',
|
||||||
youtubeUrl: null,
|
youtubeUrl: null,
|
||||||
|
|
@ -46,6 +48,7 @@ class ElementsEndpointTest extends TestCase
|
||||||
set: $set,
|
set: $set,
|
||||||
title: 'Daily Practice',
|
title: 'Daily Practice',
|
||||||
description: 'Daily practices for growth',
|
description: 'Daily practices for growth',
|
||||||
|
iconImageUrl: null,
|
||||||
richText: '<p>Daily practice rich text</p>',
|
richText: '<p>Daily practice rich text</p>',
|
||||||
pdfPath: null,
|
pdfPath: null,
|
||||||
youtubeUrl: null,
|
youtubeUrl: null,
|
||||||
|
|
@ -72,6 +75,7 @@ class ElementsEndpointTest extends TestCase
|
||||||
'id' => $element->getId(),
|
'id' => $element->getId(),
|
||||||
'title' => 'Baderech HaAvodah',
|
'title' => 'Baderech HaAvodah',
|
||||||
'description' => 'A structured path for growth',
|
'description' => 'A structured path for growth',
|
||||||
|
'iconImageUrl' => '/assets/baderech-haavodah-icon.png',
|
||||||
'richText' => '<p>A structured path for growth</p>',
|
'richText' => '<p>A structured path for growth</p>',
|
||||||
'pdfPath' => '/assets/pdfs/baderech.pdf',
|
'pdfPath' => '/assets/pdfs/baderech.pdf',
|
||||||
'youtubeUrl' => $sampleYoutubeUrl,
|
'youtubeUrl' => $sampleYoutubeUrl,
|
||||||
|
|
|
||||||
|
|
@ -32,6 +32,7 @@ class SetsEndpointTest extends TestCase
|
||||||
set: $baderechSet,
|
set: $baderechSet,
|
||||||
title: $baderechSet->getName(),
|
title: $baderechSet->getName(),
|
||||||
description: $baderechSet->getDescription(),
|
description: $baderechSet->getDescription(),
|
||||||
|
iconImageUrl: null,
|
||||||
richText: '',
|
richText: '',
|
||||||
pdfPath: null,
|
pdfPath: null,
|
||||||
youtubeUrl: null,
|
youtubeUrl: null,
|
||||||
|
|
|
||||||
|
|
@ -30,6 +30,7 @@ class ElementControllerTest extends TestCase
|
||||||
$set,
|
$set,
|
||||||
'Baderech HaAvodah',
|
'Baderech HaAvodah',
|
||||||
'A structured path for growth',
|
'A structured path for growth',
|
||||||
|
'/assets/baderech-icon.png',
|
||||||
'<p>A structured path for growth</p>',
|
'<p>A structured path for growth</p>',
|
||||||
'/assets/pdfs/baderech.pdf',
|
'/assets/pdfs/baderech.pdf',
|
||||||
'https://www.youtube.com/watch?v=yHx-r4p6hHU&t=1s',
|
'https://www.youtube.com/watch?v=yHx-r4p6hHU&t=1s',
|
||||||
|
|
@ -39,6 +40,7 @@ class ElementControllerTest extends TestCase
|
||||||
$set,
|
$set,
|
||||||
'Avodah Foundations',
|
'Avodah Foundations',
|
||||||
'Foundations for steady avodah',
|
'Foundations for steady avodah',
|
||||||
|
null,
|
||||||
'<p>Foundations rich text</p>',
|
'<p>Foundations rich text</p>',
|
||||||
'/assets/pdfs/foundations.pdf',
|
'/assets/pdfs/foundations.pdf',
|
||||||
null,
|
null,
|
||||||
|
|
@ -48,6 +50,7 @@ class ElementControllerTest extends TestCase
|
||||||
$set,
|
$set,
|
||||||
'Daily Practice',
|
'Daily Practice',
|
||||||
'Daily practices for growth',
|
'Daily practices for growth',
|
||||||
|
null,
|
||||||
'<p>Daily practice rich text</p>',
|
'<p>Daily practice rich text</p>',
|
||||||
null,
|
null,
|
||||||
null,
|
null,
|
||||||
|
|
@ -68,6 +71,10 @@ class ElementControllerTest extends TestCase
|
||||||
'<p>A structured path for growth</p>',
|
'<p>A structured path for growth</p>',
|
||||||
$body['element']['richText'],
|
$body['element']['richText'],
|
||||||
);
|
);
|
||||||
|
$this->assertSame(
|
||||||
|
'/assets/baderech-icon.png',
|
||||||
|
$body['element']['iconImageUrl'],
|
||||||
|
);
|
||||||
$this->assertSame(
|
$this->assertSame(
|
||||||
'/assets/pdfs/baderech.pdf',
|
'/assets/pdfs/baderech.pdf',
|
||||||
$body['element']['pdfPath'],
|
$body['element']['pdfPath'],
|
||||||
|
|
@ -126,6 +133,7 @@ class ElementControllerTest extends TestCase
|
||||||
DomainSet $set,
|
DomainSet $set,
|
||||||
string $title,
|
string $title,
|
||||||
string $description,
|
string $description,
|
||||||
|
?string $iconImageUrl,
|
||||||
string $richText,
|
string $richText,
|
||||||
?string $pdfPath,
|
?string $pdfPath,
|
||||||
?string $youtubeUrl,
|
?string $youtubeUrl,
|
||||||
|
|
@ -135,6 +143,7 @@ class ElementControllerTest extends TestCase
|
||||||
set: $set,
|
set: $set,
|
||||||
title: $title,
|
title: $title,
|
||||||
description: $description,
|
description: $description,
|
||||||
|
iconImageUrl: $iconImageUrl,
|
||||||
richText: $richText,
|
richText: $richText,
|
||||||
pdfPath: $pdfPath,
|
pdfPath: $pdfPath,
|
||||||
youtubeUrl: $youtubeUrl,
|
youtubeUrl: $youtubeUrl,
|
||||||
|
|
|
||||||
|
|
@ -20,6 +20,7 @@ class ElementTest extends TestCase
|
||||||
id: 1,
|
id: 1,
|
||||||
title: 'Root',
|
title: 'Root',
|
||||||
description: 'Root description',
|
description: 'Root description',
|
||||||
|
iconImageUrl: null,
|
||||||
richText: '<p>Root rich text</p>',
|
richText: '<p>Root rich text</p>',
|
||||||
pdfPath: null,
|
pdfPath: null,
|
||||||
youtubeUrl: null,
|
youtubeUrl: null,
|
||||||
|
|
@ -30,6 +31,7 @@ class ElementTest extends TestCase
|
||||||
id: 2,
|
id: 2,
|
||||||
title: 'Child',
|
title: 'Child',
|
||||||
description: 'Child description',
|
description: 'Child description',
|
||||||
|
iconImageUrl: '/assets/child-icon.svg',
|
||||||
richText: '<p>Child rich text</p>',
|
richText: '<p>Child rich text</p>',
|
||||||
pdfPath: '/assets/pdfs/child.pdf',
|
pdfPath: '/assets/pdfs/child.pdf',
|
||||||
youtubeUrl: 'https://www.youtube.com/watch?v=yHx-r4p6hHU&t=1s',
|
youtubeUrl: 'https://www.youtube.com/watch?v=yHx-r4p6hHU&t=1s',
|
||||||
|
|
@ -43,6 +45,10 @@ class ElementTest extends TestCase
|
||||||
'Child description',
|
'Child description',
|
||||||
$childElement->getDescription(),
|
$childElement->getDescription(),
|
||||||
);
|
);
|
||||||
|
$this->assertSame(
|
||||||
|
'/assets/child-icon.svg',
|
||||||
|
$childElement->getIconImageUrl(),
|
||||||
|
);
|
||||||
$this->assertSame(
|
$this->assertSame(
|
||||||
'<p>Child rich text</p>',
|
'<p>Child rich text</p>',
|
||||||
$childElement->getRichText(),
|
$childElement->getRichText(),
|
||||||
|
|
@ -57,6 +63,7 @@ class ElementTest extends TestCase
|
||||||
);
|
);
|
||||||
$this->assertSame($set, $childElement->getSet());
|
$this->assertSame($set, $childElement->getSet());
|
||||||
$this->assertSame($rootElement, $childElement->getParentElement());
|
$this->assertSame($rootElement, $childElement->getParentElement());
|
||||||
|
$this->assertNull($rootElement->getIconImageUrl());
|
||||||
$this->assertNull($rootElement->getPdfPath());
|
$this->assertNull($rootElement->getPdfPath());
|
||||||
$this->assertNull($rootElement->getYoutubeUrl());
|
$this->assertNull($rootElement->getYoutubeUrl());
|
||||||
$this->assertNull($rootElement->getParentElement());
|
$this->assertNull($rootElement->getParentElement());
|
||||||
|
|
|
||||||
|
|
@ -48,6 +48,7 @@ class CreateElementTest extends TestCase
|
||||||
setId: $set->getId(),
|
setId: $set->getId(),
|
||||||
title: 'Root',
|
title: 'Root',
|
||||||
description: 'Root description',
|
description: 'Root description',
|
||||||
|
iconImageUrl: '/assets/root-icon.svg',
|
||||||
richText: '<p>Root rich text</p>',
|
richText: '<p>Root rich text</p>',
|
||||||
pdfPath: '/assets/pdfs/root.pdf',
|
pdfPath: '/assets/pdfs/root.pdf',
|
||||||
youtubeUrl: 'https://www.youtube.com/watch?v=yHx-r4p6hHU&t=1s',
|
youtubeUrl: 'https://www.youtube.com/watch?v=yHx-r4p6hHU&t=1s',
|
||||||
|
|
@ -57,6 +58,10 @@ class CreateElementTest extends TestCase
|
||||||
$this->assertInstanceOf(Element::class, $element);
|
$this->assertInstanceOf(Element::class, $element);
|
||||||
$this->assertSame('Root', $element->getTitle());
|
$this->assertSame('Root', $element->getTitle());
|
||||||
$this->assertSame('Root description', $element->getDescription());
|
$this->assertSame('Root description', $element->getDescription());
|
||||||
|
$this->assertSame(
|
||||||
|
'/assets/root-icon.svg',
|
||||||
|
$element->getIconImageUrl(),
|
||||||
|
);
|
||||||
$this->assertSame('<p>Root rich text</p>', $element->getRichText());
|
$this->assertSame('<p>Root rich text</p>', $element->getRichText());
|
||||||
$this->assertSame('/assets/pdfs/root.pdf', $element->getPdfPath());
|
$this->assertSame('/assets/pdfs/root.pdf', $element->getPdfPath());
|
||||||
$this->assertSame(
|
$this->assertSame(
|
||||||
|
|
@ -75,6 +80,7 @@ class CreateElementTest extends TestCase
|
||||||
setId: $set->getId(),
|
setId: $set->getId(),
|
||||||
title: 'Root',
|
title: 'Root',
|
||||||
description: 'Root description',
|
description: 'Root description',
|
||||||
|
iconImageUrl: null,
|
||||||
richText: '<p>Root rich text</p>',
|
richText: '<p>Root rich text</p>',
|
||||||
pdfPath: null,
|
pdfPath: null,
|
||||||
youtubeUrl: null,
|
youtubeUrl: null,
|
||||||
|
|
@ -87,6 +93,7 @@ class CreateElementTest extends TestCase
|
||||||
setId: $set->getId(),
|
setId: $set->getId(),
|
||||||
title: 'Child',
|
title: 'Child',
|
||||||
description: 'Child description',
|
description: 'Child description',
|
||||||
|
iconImageUrl: '/assets/child-icon.svg',
|
||||||
richText: '<p>Child rich text</p>',
|
richText: '<p>Child rich text</p>',
|
||||||
pdfPath: '/assets/pdfs/child.pdf',
|
pdfPath: '/assets/pdfs/child.pdf',
|
||||||
youtubeUrl: 'https://youtu.be/yHx-r4p6hHU',
|
youtubeUrl: 'https://youtu.be/yHx-r4p6hHU',
|
||||||
|
|
@ -99,6 +106,10 @@ class CreateElementTest extends TestCase
|
||||||
'Child description',
|
'Child description',
|
||||||
$childElement->getDescription(),
|
$childElement->getDescription(),
|
||||||
);
|
);
|
||||||
|
$this->assertSame(
|
||||||
|
'/assets/child-icon.svg',
|
||||||
|
$childElement->getIconImageUrl(),
|
||||||
|
);
|
||||||
$this->assertSame(
|
$this->assertSame(
|
||||||
'<p>Child rich text</p>',
|
'<p>Child rich text</p>',
|
||||||
$childElement->getRichText(),
|
$childElement->getRichText(),
|
||||||
|
|
@ -125,6 +136,7 @@ class CreateElementTest extends TestCase
|
||||||
setId: $set->getId(),
|
setId: $set->getId(),
|
||||||
title: 'Root',
|
title: 'Root',
|
||||||
description: null,
|
description: null,
|
||||||
|
iconImageUrl: null,
|
||||||
richText: null,
|
richText: null,
|
||||||
pdfPath: null,
|
pdfPath: null,
|
||||||
youtubeUrl: null,
|
youtubeUrl: null,
|
||||||
|
|
@ -132,11 +144,30 @@ class CreateElementTest extends TestCase
|
||||||
));
|
));
|
||||||
|
|
||||||
$this->assertSame('', $element->getDescription());
|
$this->assertSame('', $element->getDescription());
|
||||||
|
$this->assertNull($element->getIconImageUrl());
|
||||||
$this->assertSame('', $element->getRichText());
|
$this->assertSame('', $element->getRichText());
|
||||||
$this->assertNull($element->getPdfPath());
|
$this->assertNull($element->getPdfPath());
|
||||||
$this->assertNull($element->getYoutubeUrl());
|
$this->assertNull($element->getYoutubeUrl());
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public function testCreatesElementWithNullIconImageUrlWhenBlank(): void
|
||||||
|
{
|
||||||
|
$set = $this->createSet('Daily learning');
|
||||||
|
|
||||||
|
$element = $this->createElement->execute(new CreateElementRequest(
|
||||||
|
setId: $set->getId(),
|
||||||
|
title: 'Root',
|
||||||
|
description: 'Root description',
|
||||||
|
iconImageUrl: '',
|
||||||
|
richText: '<p>Root rich text</p>',
|
||||||
|
pdfPath: null,
|
||||||
|
youtubeUrl: null,
|
||||||
|
parentElementId: null,
|
||||||
|
));
|
||||||
|
|
||||||
|
$this->assertNull($element->getIconImageUrl());
|
||||||
|
}
|
||||||
|
|
||||||
public function testCreatesElementWithNullPdfPathWhenBlank(): void
|
public function testCreatesElementWithNullPdfPathWhenBlank(): void
|
||||||
{
|
{
|
||||||
$set = $this->createSet('Daily learning');
|
$set = $this->createSet('Daily learning');
|
||||||
|
|
@ -145,6 +176,7 @@ class CreateElementTest extends TestCase
|
||||||
setId: $set->getId(),
|
setId: $set->getId(),
|
||||||
title: 'Root',
|
title: 'Root',
|
||||||
description: 'Root description',
|
description: 'Root description',
|
||||||
|
iconImageUrl: null,
|
||||||
richText: '<p>Root rich text</p>',
|
richText: '<p>Root rich text</p>',
|
||||||
pdfPath: '',
|
pdfPath: '',
|
||||||
youtubeUrl: null,
|
youtubeUrl: null,
|
||||||
|
|
@ -162,6 +194,7 @@ class CreateElementTest extends TestCase
|
||||||
setId: $set->getId(),
|
setId: $set->getId(),
|
||||||
title: 'Root',
|
title: 'Root',
|
||||||
description: 'Root description',
|
description: 'Root description',
|
||||||
|
iconImageUrl: null,
|
||||||
richText: '<p>Root rich text</p>',
|
richText: '<p>Root rich text</p>',
|
||||||
pdfPath: null,
|
pdfPath: null,
|
||||||
youtubeUrl: '',
|
youtubeUrl: '',
|
||||||
|
|
@ -180,6 +213,7 @@ class CreateElementTest extends TestCase
|
||||||
setId: null,
|
setId: null,
|
||||||
title: 'Root',
|
title: 'Root',
|
||||||
description: 'Root description',
|
description: 'Root description',
|
||||||
|
iconImageUrl: null,
|
||||||
richText: '<p>Root rich text</p>',
|
richText: '<p>Root rich text</p>',
|
||||||
pdfPath: null,
|
pdfPath: null,
|
||||||
youtubeUrl: null,
|
youtubeUrl: null,
|
||||||
|
|
@ -196,6 +230,7 @@ class CreateElementTest extends TestCase
|
||||||
setId: 1,
|
setId: 1,
|
||||||
title: null,
|
title: null,
|
||||||
description: 'Root description',
|
description: 'Root description',
|
||||||
|
iconImageUrl: null,
|
||||||
richText: '<p>Root rich text</p>',
|
richText: '<p>Root rich text</p>',
|
||||||
pdfPath: null,
|
pdfPath: null,
|
||||||
youtubeUrl: null,
|
youtubeUrl: null,
|
||||||
|
|
@ -212,6 +247,7 @@ class CreateElementTest extends TestCase
|
||||||
setId: 99,
|
setId: 99,
|
||||||
title: 'Root',
|
title: 'Root',
|
||||||
description: 'Root description',
|
description: 'Root description',
|
||||||
|
iconImageUrl: null,
|
||||||
richText: '<p>Root rich text</p>',
|
richText: '<p>Root rich text</p>',
|
||||||
pdfPath: null,
|
pdfPath: null,
|
||||||
youtubeUrl: null,
|
youtubeUrl: null,
|
||||||
|
|
@ -232,6 +268,7 @@ class CreateElementTest extends TestCase
|
||||||
setId: $set->getId(),
|
setId: $set->getId(),
|
||||||
title: 'Child',
|
title: 'Child',
|
||||||
description: 'Child description',
|
description: 'Child description',
|
||||||
|
iconImageUrl: null,
|
||||||
richText: '<p>Child rich text</p>',
|
richText: '<p>Child rich text</p>',
|
||||||
pdfPath: null,
|
pdfPath: null,
|
||||||
youtubeUrl: null,
|
youtubeUrl: null,
|
||||||
|
|
@ -246,6 +283,7 @@ class CreateElementTest extends TestCase
|
||||||
setId: $set->getId(),
|
setId: $set->getId(),
|
||||||
title: 'Root',
|
title: 'Root',
|
||||||
description: 'Root description',
|
description: 'Root description',
|
||||||
|
iconImageUrl: null,
|
||||||
richText: '<p>Root rich text</p>',
|
richText: '<p>Root rich text</p>',
|
||||||
pdfPath: null,
|
pdfPath: null,
|
||||||
youtubeUrl: null,
|
youtubeUrl: null,
|
||||||
|
|
@ -261,6 +299,7 @@ class CreateElementTest extends TestCase
|
||||||
setId: $set->getId(),
|
setId: $set->getId(),
|
||||||
title: 'Another root',
|
title: 'Another root',
|
||||||
description: 'Another root description',
|
description: 'Another root description',
|
||||||
|
iconImageUrl: null,
|
||||||
richText: '<p>Another root rich text</p>',
|
richText: '<p>Another root rich text</p>',
|
||||||
pdfPath: null,
|
pdfPath: null,
|
||||||
youtubeUrl: null,
|
youtubeUrl: null,
|
||||||
|
|
@ -277,6 +316,7 @@ class CreateElementTest extends TestCase
|
||||||
setId: $parentSet->getId(),
|
setId: $parentSet->getId(),
|
||||||
title: 'Parent root',
|
title: 'Parent root',
|
||||||
description: 'Parent root description',
|
description: 'Parent root description',
|
||||||
|
iconImageUrl: null,
|
||||||
richText: '<p>Parent root rich text</p>',
|
richText: '<p>Parent root rich text</p>',
|
||||||
pdfPath: null,
|
pdfPath: null,
|
||||||
youtubeUrl: null,
|
youtubeUrl: null,
|
||||||
|
|
@ -293,6 +333,7 @@ class CreateElementTest extends TestCase
|
||||||
setId: $childSet->getId(),
|
setId: $childSet->getId(),
|
||||||
title: 'Invalid child',
|
title: 'Invalid child',
|
||||||
description: 'Invalid child description',
|
description: 'Invalid child description',
|
||||||
|
iconImageUrl: null,
|
||||||
richText: '<p>Invalid child rich text</p>',
|
richText: '<p>Invalid child rich text</p>',
|
||||||
pdfPath: null,
|
pdfPath: null,
|
||||||
youtubeUrl: null,
|
youtubeUrl: null,
|
||||||
|
|
|
||||||
|
|
@ -31,6 +31,7 @@ class GetElementTest extends TestCase
|
||||||
$set,
|
$set,
|
||||||
'Baderech HaAvodah',
|
'Baderech HaAvodah',
|
||||||
'A structured path for growth',
|
'A structured path for growth',
|
||||||
|
'/assets/baderech-icon.png',
|
||||||
'<p>A structured path for growth</p>',
|
'<p>A structured path for growth</p>',
|
||||||
'/assets/pdfs/baderech.pdf',
|
'/assets/pdfs/baderech.pdf',
|
||||||
'https://www.youtube.com/watch?v=yHx-r4p6hHU&t=1s',
|
'https://www.youtube.com/watch?v=yHx-r4p6hHU&t=1s',
|
||||||
|
|
@ -49,6 +50,10 @@ class GetElementTest extends TestCase
|
||||||
'A structured path for growth',
|
'A structured path for growth',
|
||||||
$foundElement->getDescription(),
|
$foundElement->getDescription(),
|
||||||
);
|
);
|
||||||
|
$this->assertSame(
|
||||||
|
'/assets/baderech-icon.png',
|
||||||
|
$foundElement->getIconImageUrl(),
|
||||||
|
);
|
||||||
$this->assertSame(
|
$this->assertSame(
|
||||||
'<p>A structured path for growth</p>',
|
'<p>A structured path for growth</p>',
|
||||||
$foundElement->getRichText(),
|
$foundElement->getRichText(),
|
||||||
|
|
@ -70,6 +75,7 @@ class GetElementTest extends TestCase
|
||||||
$set,
|
$set,
|
||||||
'Baderech HaAvodah',
|
'Baderech HaAvodah',
|
||||||
'A structured path for growth',
|
'A structured path for growth',
|
||||||
|
null,
|
||||||
'<p>A structured path for growth</p>',
|
'<p>A structured path for growth</p>',
|
||||||
'/assets/pdfs/baderech.pdf',
|
'/assets/pdfs/baderech.pdf',
|
||||||
null,
|
null,
|
||||||
|
|
@ -79,6 +85,7 @@ class GetElementTest extends TestCase
|
||||||
$set,
|
$set,
|
||||||
'Avodah Foundations',
|
'Avodah Foundations',
|
||||||
'Foundations for steady avodah',
|
'Foundations for steady avodah',
|
||||||
|
null,
|
||||||
'<p>Foundations rich text</p>',
|
'<p>Foundations rich text</p>',
|
||||||
'/assets/pdfs/foundations.pdf',
|
'/assets/pdfs/foundations.pdf',
|
||||||
null,
|
null,
|
||||||
|
|
@ -88,6 +95,7 @@ class GetElementTest extends TestCase
|
||||||
$set,
|
$set,
|
||||||
'Daily Practice',
|
'Daily Practice',
|
||||||
'Daily practices for growth',
|
'Daily practices for growth',
|
||||||
|
null,
|
||||||
'<p>Daily practice rich text</p>',
|
'<p>Daily practice rich text</p>',
|
||||||
null,
|
null,
|
||||||
null,
|
null,
|
||||||
|
|
@ -97,6 +105,7 @@ class GetElementTest extends TestCase
|
||||||
$set,
|
$set,
|
||||||
'Nested Practice',
|
'Nested Practice',
|
||||||
'Nested description',
|
'Nested description',
|
||||||
|
null,
|
||||||
'<p>Nested rich text</p>',
|
'<p>Nested rich text</p>',
|
||||||
null,
|
null,
|
||||||
null,
|
null,
|
||||||
|
|
@ -107,6 +116,7 @@ class GetElementTest extends TestCase
|
||||||
$otherSet,
|
$otherSet,
|
||||||
'Other Parent',
|
'Other Parent',
|
||||||
'Other parent description',
|
'Other parent description',
|
||||||
|
null,
|
||||||
'<p>Other parent rich text</p>',
|
'<p>Other parent rich text</p>',
|
||||||
null,
|
null,
|
||||||
null,
|
null,
|
||||||
|
|
@ -116,6 +126,7 @@ class GetElementTest extends TestCase
|
||||||
$otherSet,
|
$otherSet,
|
||||||
'Other Child',
|
'Other Child',
|
||||||
'Other child description',
|
'Other child description',
|
||||||
|
null,
|
||||||
'<p>Other child rich text</p>',
|
'<p>Other child rich text</p>',
|
||||||
null,
|
null,
|
||||||
null,
|
null,
|
||||||
|
|
@ -178,6 +189,7 @@ class GetElementTest extends TestCase
|
||||||
DomainSet $set,
|
DomainSet $set,
|
||||||
string $title,
|
string $title,
|
||||||
string $description,
|
string $description,
|
||||||
|
?string $iconImageUrl,
|
||||||
string $richText,
|
string $richText,
|
||||||
?string $pdfPath,
|
?string $pdfPath,
|
||||||
?string $youtubeUrl,
|
?string $youtubeUrl,
|
||||||
|
|
@ -187,6 +199,7 @@ class GetElementTest extends TestCase
|
||||||
set: $set,
|
set: $set,
|
||||||
title: $title,
|
title: $title,
|
||||||
description: $description,
|
description: $description,
|
||||||
|
iconImageUrl: $iconImageUrl,
|
||||||
richText: $richText,
|
richText: $richText,
|
||||||
pdfPath: $pdfPath,
|
pdfPath: $pdfPath,
|
||||||
youtubeUrl: $youtubeUrl,
|
youtubeUrl: $youtubeUrl,
|
||||||
|
|
|
||||||
|
|
@ -41,6 +41,10 @@ describe('media page sets', () => {
|
||||||
cy.location('pathname').should('eq', '/element/1')
|
cy.location('pathname').should('eq', '/element/1')
|
||||||
cy.get('[data-cy="element-page"]').should('be.visible')
|
cy.get('[data-cy="element-page"]').should('be.visible')
|
||||||
cy.contains('h1', 'Baderech HaAvodah').should('be.visible')
|
cy.contains('h1', 'Baderech HaAvodah').should('be.visible')
|
||||||
|
cy.get('[data-cy="element-icon"]')
|
||||||
|
.should('be.visible')
|
||||||
|
.and('have.attr', 'src')
|
||||||
|
.and('include', '/assets/baderech-haavodah-icon.png')
|
||||||
cy.get('[data-cy="element-rich-text"]').within(() => {
|
cy.get('[data-cy="element-rich-text"]').within(() => {
|
||||||
cy.contains('Begin with a clear map for avodah growth.')
|
cy.contains('Begin with a clear map for avodah growth.')
|
||||||
.should('be.visible')
|
.should('be.visible')
|
||||||
|
|
@ -82,6 +86,7 @@ describe('media page sets', () => {
|
||||||
.click()
|
.click()
|
||||||
cy.location('pathname').should('eq', '/element/2')
|
cy.location('pathname').should('eq', '/element/2')
|
||||||
cy.contains('h1', 'Avodah Foundations').should('be.visible')
|
cy.contains('h1', 'Avodah Foundations').should('be.visible')
|
||||||
|
cy.get('[data-cy="element-icon"]').should('not.exist')
|
||||||
cy.get('[data-cy="element-rich-text"]')
|
cy.get('[data-cy="element-rich-text"]')
|
||||||
.should(
|
.should(
|
||||||
'contain.text',
|
'contain.text',
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue