Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

EWPP-1096: Fix bottom margin class on contact body field #930

Merged
merged 1 commit into from
Aug 25, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion templates/oe_contact/oe-contact--full.html.twig
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
<div class="ecl-col-12">
{% endif %}
{% if entity.oe_body is not empty %}
<div class="ecl-u-m-l">
<div class="ecl-u-mb-l">
{{ content.oe_body }}
</div>
{% endif %}
Expand Down
4 changes: 2 additions & 2 deletions tests/Kernel/Paragraphs/ContactParagraphTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -137,15 +137,15 @@ public function testContact(): void {
$this->assertCount(0, $crawler->filter('h2.ecl-u-type-heading-2'));
// Assert rendering of the first contact.
$this->assertEquals('General contact', trim($crawler->filter('div.ecl-row.ecl-u-mv-xl:nth-child(1) h3.ecl-u-type-heading-3.ecl-u-mt-none div')->html()));
$this->assertEquals('<p>General contact body text</p>', trim($crawler->filter('div.ecl-col-m-6 div.ecl-u-m-l:nth-child(1) div.ecl')->html()));
$this->assertEquals('<p>General contact body text</p>', trim($crawler->filter('div.ecl-col-m-6 div.ecl-u-mb-l:nth-child(1) div.ecl')->html()));
$this->assertEquals('General contact Organisation', trim($crawler->filter('dl.ecl-description-list.ecl-description-list--horizontal:nth-child(2) dd.ecl-description-list__definition:nth-child(2) div')->html()));
$this->assertEquals('general@example.com', trim($crawler->filter('dl.ecl-description-list.ecl-description-list--horizontal:nth-child(2) dd.ecl-description-list__definition:nth-child(4) div a')->html()));
$this->assertEquals('Address of General contact, 1001 Brussels, Belgium', trim($crawler->filter('dl.ecl-description-list.ecl-description-list--horizontal:nth-child(2) dd.ecl-description-list__definition:nth-child(6) div span')->html()));
$this->assertEquals('Facebook', trim($crawler->filter('dl.ecl-description-list.ecl-description-list--horizontal:nth-child(2) dd.ecl-description-list__definition:nth-child(8) div div div a span')->html()));
$this->assertContains('example_1.jpeg', $crawler->filter('div.ecl-col-m-5 figure.ecl-media-container img')->attr('src'));
// Assert rendering of the second contact.
$this->assertEquals('Press contact', trim($crawler->filter('div.ecl-row.ecl-u-mv-xl:nth-child(2) h3.ecl-u-type-heading-3.ecl-u-mt-none div')->html()));
$this->assertEquals('<p>Press contact body text</p>', trim($crawler->filter('div.ecl-col-12:nth-child(2) div.ecl-u-m-l div.ecl')->html()));
$this->assertEquals('<p>Press contact body text</p>', trim($crawler->filter('div.ecl-col-12:nth-child(2) div.ecl-u-mb-l div.ecl')->html()));

// Set paragraph title and assert rendering is updated.
$paragraph->set('field_oe_title', 'Contact paragraph Test')->save();
Expand Down