diff --git a/tests/Kernel/Paragraphs/MediaParagraphsTest.php b/tests/Kernel/Paragraphs/MediaParagraphsTest.php index c37a41ee55..3b2899131d 100644 --- a/tests/Kernel/Paragraphs/MediaParagraphsTest.php +++ b/tests/Kernel/Paragraphs/MediaParagraphsTest.php @@ -363,7 +363,7 @@ public function testBanner(): void { $this->assertEquals('Description', trim($crawler->filter('div.ecl-hero-banner__content p.ecl-hero-banner__description')->text())); $this->assertCount(1, $crawler->filter('div.ecl-hero-banner__content a.ecl-link.ecl-link--cta.ecl-link--icon.ecl-link--icon-after')); $this->assertContains('Example', trim($crawler->filter('div.ecl-hero-banner__content a.ecl-link.ecl-link--cta.ecl-link--icon.ecl-link--icon-after span.ecl-link__label')->text())); - $this->assertCount(0, $crawler->filter('div.ecl-page-banner--full-width')); + $this->assertCount(0, $crawler->filter('.ecl-hero-banner--full-width')); // Render paragraph in Bulgarian. $html = $this->renderParagraph($paragraph, 'bg'); @@ -414,7 +414,7 @@ public function testBanner(): void { $this->assertEquals('Description', trim($crawler->filter('div.ecl-hero-banner__content p.ecl-hero-banner__description')->text())); $this->assertCount(1, $crawler->filter('div.ecl-hero-banner__content a.ecl-link.ecl-link--cta.ecl-link--icon.ecl-link--icon-after')); $this->assertContains('Example', trim($crawler->filter('div.ecl-hero-banner__content a.ecl-link.ecl-link--cta.ecl-link--icon.ecl-link--icon-after span.ecl-link__label')->text())); - $this->assertCount(0, $crawler->filter('div.ecl-page-banner--full-width')); + $this->assertCount(0, $crawler->filter('.ecl-hero-banner--full-width')); // Variant - image / Modifier - page_center / Full width - No. $paragraph->get('field_oe_banner_type')->setValue('page_center'); @@ -433,7 +433,7 @@ public function testBanner(): void { $this->assertEquals('Description', trim($crawler->filter('div.ecl-page-banner__content p.ecl-page-banner__description')->text())); $this->assertCount(1, $crawler->filter('div.ecl-page-banner__content a.ecl-link.ecl-link--cta.ecl-link--icon.ecl-link--icon-after')); $this->assertContains('Example', trim($crawler->filter('div.ecl-page-banner__content a.ecl-link.ecl-link--cta.ecl-link--icon.ecl-link--icon-after span.ecl-link__label')->text())); - $this->assertCount(0, $crawler->filter('div.ecl-page-banner--full-width')); + $this->assertCount(0, $crawler->filter('.ecl-page-banner--full-width')); // Variant - image / Modifier - page_left / Full width - Yes. $paragraph->get('field_oe_banner_type')->setValue('page_left'); @@ -443,7 +443,7 @@ public function testBanner(): void { $crawler = new Crawler($html); $this->assertCount(0, $crawler->filter('section.ecl-page-banner.ecl-page-banner--image.ecl-page-banner--centered')); - $this->assertCount(1, $crawler->filter('section.ecl-page-banner.ecl-page-banner--image')); + $this->assertCount(1, $crawler->filter('section.ecl-page-banner.ecl-page-banner--image.ecl-page-banner--full-width')); $image_element = $crawler->filter('section.ecl-page-banner.ecl-page-banner--image div.ecl-page-banner__image'); $this->assertCount(1, $image_element); $this->assertContains( @@ -454,7 +454,6 @@ public function testBanner(): void { $this->assertEquals('Description', trim($crawler->filter('div.ecl-page-banner__content p.ecl-page-banner__description')->text())); $this->assertCount(1, $crawler->filter('div.ecl-page-banner__content a.ecl-link.ecl-link--cta.ecl-link--icon.ecl-link--icon-after')); $this->assertContains('Example', trim($crawler->filter('div.ecl-page-banner__content a.ecl-link.ecl-link--cta.ecl-link--icon.ecl-link--icon-after span.ecl-link__label')->text())); - $this->assertCount(1, $crawler->filter('div.ecl-page-banner--full-width')); // Variant - image-shade / Modifier - hero_center / Full width - Yes. $paragraph->get('oe_paragraphs_variant')->setValue('oe_banner_image_shade'); @@ -463,7 +462,7 @@ public function testBanner(): void { $html = $this->renderParagraph($paragraph); $crawler = new Crawler($html); - $this->assertCount(1, $crawler->filter('section.ecl-hero-banner.ecl-hero-banner--image-shade.ecl-hero-banner--centered')); + $this->assertCount(1, $crawler->filter('section.ecl-hero-banner.ecl-hero-banner--image-shade.ecl-hero-banner--centered.ecl-hero-banner--full-width')); $image_element = $crawler->filter('section.ecl-hero-banner.ecl-hero-banner--image-shade.ecl-hero-banner--centered div.ecl-hero-banner__image'); $this->assertCount(1, $image_element); $this->assertContains( @@ -474,7 +473,6 @@ public function testBanner(): void { $this->assertEquals('Description', trim($crawler->filter('div.ecl-hero-banner__content p.ecl-hero-banner__description')->text())); $this->assertCount(1, $crawler->filter('div.ecl-hero-banner__content a.ecl-link.ecl-link--cta.ecl-link--icon.ecl-link--icon-after')); $this->assertContains('Example', trim($crawler->filter('div.ecl-hero-banner__content a.ecl-link.ecl-link--cta.ecl-link--icon.ecl-link--icon-after span.ecl-link__label')->text())); - $this->assertCount(1, $crawler->filter('div.ecl-page-banner--full-width')); // Variant - image-shade / Modifier - hero_left / Full width - Yes. $paragraph->get('field_oe_banner_type')->setValue('hero_left'); @@ -483,7 +481,7 @@ public function testBanner(): void { $crawler = new Crawler($html); $this->assertCount(0, $crawler->filter('section.ecl-hero-banner.ecl-hero-banner--image-shade.ecl-hero-banner--centered')); - $this->assertCount(1, $crawler->filter('section.ecl-hero-banner.ecl-hero-banner--image-shade')); + $this->assertCount(1, $crawler->filter('section.ecl-hero-banner.ecl-hero-banner--image-shade.ecl-hero-banner--full-width')); $image_element = $crawler->filter('section.ecl-hero-banner.ecl-hero-banner--image-shade div.ecl-hero-banner__image'); $this->assertCount(1, $image_element); $this->assertContains( @@ -494,7 +492,6 @@ public function testBanner(): void { $this->assertEquals('Description', trim($crawler->filter('div.ecl-hero-banner__content p.ecl-hero-banner__description')->text())); $this->assertCount(1, $crawler->filter('div.ecl-hero-banner__content a.ecl-link.ecl-link--cta.ecl-link--icon.ecl-link--icon-after')); $this->assertContains('Example', trim($crawler->filter('div.ecl-hero-banner__content a.ecl-link.ecl-link--cta.ecl-link--icon.ecl-link--icon-after span.ecl-link__label')->text())); - $this->assertCount(1, $crawler->filter('div.ecl-page-banner--full-width')); // Variant - image-shade / Modifier - page_center / Full width - No. $paragraph->get('field_oe_banner_type')->setValue('page_center'); @@ -514,7 +511,7 @@ public function testBanner(): void { $this->assertEquals('Description', trim($crawler->filter('div.ecl-page-banner__content p.ecl-page-banner__description')->text())); $this->assertCount(1, $crawler->filter('div.ecl-page-banner__content a.ecl-link.ecl-link--cta.ecl-link--icon.ecl-link--icon-after')); $this->assertContains('Example', trim($crawler->filter('div.ecl-page-banner__content a.ecl-link.ecl-link--cta.ecl-link--icon.ecl-link--icon-after span.ecl-link__label')->text())); - $this->assertCount(0, $crawler->filter('div.ecl-page-banner--full-width')); + $this->assertCount(0, $crawler->filter('.ecl-page-banner--full-width')); // Variant - image-shade / Modifier - page_left / Full width - No. $paragraph->get('field_oe_banner_type')->setValue('page_left'); @@ -534,7 +531,7 @@ public function testBanner(): void { $this->assertEquals('Description', trim($crawler->filter('div.ecl-page-banner__content p.ecl-page-banner__description')->text())); $this->assertCount(1, $crawler->filter('div.ecl-page-banner__content a.ecl-link.ecl-link--cta.ecl-link--icon.ecl-link--icon-after')); $this->assertContains('Example', trim($crawler->filter('div.ecl-page-banner__content a.ecl-link.ecl-link--cta.ecl-link--icon.ecl-link--icon-after span.ecl-link__label')->text())); - $this->assertCount(0, $crawler->filter('div.ecl-page-banner--full-width')); + $this->assertCount(0, $crawler->filter('.ecl-page-banner--full-width')); // Variant - default / Modifier - hero_center / Full width - No. $paragraph->get('oe_paragraphs_variant')->setValue('default'); @@ -555,7 +552,7 @@ public function testBanner(): void { $this->assertEquals('Description', trim($crawler->filter('div.ecl-hero-banner__content p.ecl-hero-banner__description')->text())); $this->assertCount(1, $crawler->filter('div.ecl-hero-banner__content a.ecl-link.ecl-link--cta.ecl-link--icon.ecl-link--icon-after')); $this->assertContains('Example', trim($crawler->filter('div.ecl-hero-banner__content a.ecl-link.ecl-link--cta.ecl-link--icon.ecl-link--icon-after span.ecl-link__label')->text())); - $this->assertCount(0, $crawler->filter('div.ecl-page-banner--full-width')); + $this->assertCount(0, $crawler->filter('.ecl-hero-banner--full-width')); // Variant - default / Modifier - hero_left / Full width - Yes. $paragraph->get('field_oe_banner_type')->setValue('hero_left'); @@ -565,7 +562,7 @@ public function testBanner(): void { $crawler = new Crawler($html); $this->assertCount(0, $crawler->filter('section.ecl-hero-banner.ecl-hero-banner--default.ecl-hero-banner--centered')); - $this->assertCount(1, $crawler->filter('section.ecl-hero-banner.ecl-hero-banner--default')); + $this->assertCount(1, $crawler->filter('section.ecl-hero-banner.ecl-hero-banner--default.ecl-hero-banner--full-width')); // No image should be displayed on 'default' variant. $this->assertCount(0, $crawler->filter('section.ecl-hero-banner.ecl-hero-banner--image div.ecl-hero-banner__image')); @@ -577,7 +574,6 @@ public function testBanner(): void { $this->assertEquals('Description', trim($crawler->filter('div.ecl-hero-banner__content p.ecl-hero-banner__description')->text())); $this->assertCount(1, $crawler->filter('div.ecl-hero-banner__content a.ecl-link.ecl-link--cta.ecl-link--icon.ecl-link--icon-after')); $this->assertContains('Example', trim($crawler->filter('div.ecl-hero-banner__content a.ecl-link.ecl-link--cta.ecl-link--icon.ecl-link--icon-after span.ecl-link__label')->text())); - $this->assertCount(1, $crawler->filter('div.ecl-page-banner--full-width')); // Variant - default / Modifier - page_center / Full width - Yes. $paragraph->get('field_oe_banner_type')->setValue('page_center'); @@ -585,7 +581,7 @@ public function testBanner(): void { $html = $this->renderParagraph($paragraph); $crawler = new Crawler($html); - $this->assertCount(1, $crawler->filter('section.ecl-page-banner.ecl-page-banner--default.ecl-page-banner--centered')); + $this->assertCount(1, $crawler->filter('section.ecl-page-banner.ecl-page-banner--default.ecl-page-banner--centered.ecl-page-banner--full-width')); // No image should be displayed on 'default' variant. $this->assertCount(0, $crawler->filter('section.ecl-hero-banner.ecl-hero-banner--image div.ecl-hero-banner__image')); @@ -597,7 +593,6 @@ public function testBanner(): void { $this->assertEquals('Description', trim($crawler->filter('div.ecl-page-banner__content p.ecl-page-banner__description')->text())); $this->assertCount(1, $crawler->filter('div.ecl-page-banner__content a.ecl-link.ecl-link--cta.ecl-link--icon.ecl-link--icon-after')); $this->assertContains('Example', trim($crawler->filter('div.ecl-page-banner__content a.ecl-link.ecl-link--cta.ecl-link--icon.ecl-link--icon-after span.ecl-link__label')->text())); - $this->assertCount(1, $crawler->filter('div.ecl-page-banner--full-width')); // Variant - default / Modifier - page_left / Full width - Yes. $paragraph->get('field_oe_banner_type')->setValue('page_left'); @@ -606,7 +601,7 @@ public function testBanner(): void { $crawler = new Crawler($html); $this->assertCount(0, $crawler->filter('section.ecl-page-banner.ecl-page-banner--default.ecl-page-banner--centered')); - $this->assertCount(1, $crawler->filter('section.ecl-page-banner.ecl-page-banner--default')); + $this->assertCount(1, $crawler->filter('section.ecl-page-banner.ecl-page-banner--default.ecl-page-banner--full-width')); // No image should be displayed on 'default' variant. $this->assertCount(0, $crawler->filter('section.ecl-hero-banner.ecl-hero-banner--image div.ecl-hero-banner__image')); @@ -618,7 +613,6 @@ public function testBanner(): void { $this->assertEquals('Description', trim($crawler->filter('div.ecl-page-banner__content p.ecl-page-banner__description')->text())); $this->assertCount(1, $crawler->filter('div.ecl-page-banner__content a.ecl-link.ecl-link--cta.ecl-link--icon.ecl-link--icon-after')); $this->assertContains('Example', trim($crawler->filter('div.ecl-page-banner__content a.ecl-link.ecl-link--cta.ecl-link--icon.ecl-link--icon-after span.ecl-link__label')->text())); - $this->assertCount(1, $crawler->filter('div.ecl-page-banner--full-width')); // Variant - primary / Modifier - hero_center / Full width - Yes. $paragraph->get('oe_paragraphs_variant')->setValue('oe_banner_primary'); @@ -627,7 +621,7 @@ public function testBanner(): void { $html = $this->renderParagraph($paragraph); $crawler = new Crawler($html); - $this->assertCount(1, $crawler->filter('section.ecl-hero-banner.ecl-hero-banner--primary.ecl-hero-banner--centered')); + $this->assertCount(1, $crawler->filter('section.ecl-hero-banner.ecl-hero-banner--primary.ecl-hero-banner--centered.ecl-hero-banner--full-width')); // No image should be displayed on 'primary' variant. $this->assertCount(0, $crawler->filter('section.ecl-hero-banner.ecl-hero-banner--image.ecl-hero-banner--centered div.ecl-hero-banner__image')); @@ -639,7 +633,6 @@ public function testBanner(): void { $this->assertEquals('Description', trim($crawler->filter('div.ecl-hero-banner__content p.ecl-hero-banner__description')->text())); $this->assertCount(1, $crawler->filter('div.ecl-hero-banner__content a.ecl-link.ecl-link--cta.ecl-link--icon.ecl-link--icon-after')); $this->assertContains('Example', trim($crawler->filter('div.ecl-hero-banner__content a.ecl-link.ecl-link--cta.ecl-link--icon.ecl-link--icon-after span.ecl-link__label')->text())); - $this->assertCount(1, $crawler->filter('div.ecl-page-banner--full-width')); // Variant - primary / Modifier - hero_left / Full width - Yes. $paragraph->get('field_oe_banner_type')->setValue('hero_left'); @@ -648,7 +641,7 @@ public function testBanner(): void { $crawler = new Crawler($html); $this->assertCount(0, $crawler->filter('section.ecl-hero-banner.ecl-hero-banner--primary.ecl-hero-banner--centered')); - $this->assertCount(1, $crawler->filter('section.ecl-hero-banner.ecl-hero-banner--primary')); + $this->assertCount(1, $crawler->filter('section.ecl-hero-banner.ecl-hero-banner--primary.ecl-hero-banner--full-width')); // No image should be displayed on 'primary' variant. $this->assertCount(0, $crawler->filter('section.ecl-hero-banner.ecl-hero-banner--image div.ecl-hero-banner__image')); @@ -660,7 +653,6 @@ public function testBanner(): void { $this->assertEquals('Description', trim($crawler->filter('div.ecl-hero-banner__content p.ecl-hero-banner__description')->text())); $this->assertCount(1, $crawler->filter('div.ecl-hero-banner__content a.ecl-link.ecl-link--cta.ecl-link--icon.ecl-link--icon-after')); $this->assertContains('Example', trim($crawler->filter('div.ecl-hero-banner__content a.ecl-link.ecl-link--cta.ecl-link--icon.ecl-link--icon-after span.ecl-link__label')->text())); - $this->assertCount(1, $crawler->filter('div.ecl-page-banner--full-width')); // Variant - primary / Modifier - page_center / Full width - Yes. $paragraph->get('field_oe_banner_type')->setValue('page_center'); @@ -668,7 +660,7 @@ public function testBanner(): void { $html = $this->renderParagraph($paragraph); $crawler = new Crawler($html); - $this->assertCount(1, $crawler->filter('section.ecl-page-banner.ecl-page-banner--primary.ecl-page-banner--centered')); + $this->assertCount(1, $crawler->filter('section.ecl-page-banner.ecl-page-banner--primary.ecl-page-banner--centered.ecl-page-banner--full-width')); // No image should be displayed on 'primary' variant. $this->assertCount(0, $crawler->filter('section.ecl-hero-banner.ecl-hero-banner--image.ecl-hero-banner--centered div.ecl-hero-banner__image')); @@ -680,7 +672,6 @@ public function testBanner(): void { $this->assertEquals('Description', trim($crawler->filter('div.ecl-page-banner__content p.ecl-page-banner__description')->text())); $this->assertCount(1, $crawler->filter('div.ecl-page-banner__content a.ecl-link.ecl-link--cta.ecl-link--icon.ecl-link--icon-after')); $this->assertContains('Example', trim($crawler->filter('div.ecl-page-banner__content a.ecl-link.ecl-link--cta.ecl-link--icon.ecl-link--icon-after span.ecl-link__label')->text())); - $this->assertCount(1, $crawler->filter('div.ecl-page-banner--full-width')); // Variant - primary / Modifier - page_left / Full width - No. $paragraph->get('field_oe_banner_type')->setValue('page_left'); @@ -702,7 +693,7 @@ public function testBanner(): void { $this->assertEquals('Description', trim($crawler->filter('div.ecl-page-banner__content p.ecl-page-banner__description')->text())); $this->assertCount(1, $crawler->filter('div.ecl-page-banner__content a.ecl-link.ecl-link--cta.ecl-link--icon.ecl-link--icon-after')); $this->assertContains('Example', trim($crawler->filter('div.ecl-page-banner__content a.ecl-link.ecl-link--cta.ecl-link--icon.ecl-link--icon-after span.ecl-link__label')->text())); - $this->assertCount(0, $crawler->filter('div.ecl-page-banner--full-width')); + $this->assertCount(0, $crawler->filter('.ecl-page-banner--full-width')); // Create a media using AV Portal image and add it to the paragraph. $media = $media_storage->create([