Skip to content

Commit

Permalink
EWPP-1830: Fix event details icon size to use xs.
Browse files Browse the repository at this point in the history
  • Loading branch information
22Alexandra committed Jan 6, 2022
1 parent 07b3a9d commit ccd940b
Show file tree
Hide file tree
Showing 4 changed files with 23 additions and 23 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -98,12 +98,12 @@ public function viewElements(ContentEntityInterface $entity) {
'items' => [
[
'icon' => 'file',
'size' => 's',
'size' => 'xs',
'text' => $this->getRenderableSubject($entity),
],
[
'icon' => 'calendar',
'size' => 's',
'size' => 'xs',
'text' => $this->getRenderableDates($entity),
],
],
Expand Down Expand Up @@ -166,7 +166,7 @@ protected function addRenderableLocation(array &$build, ContentEntityInterface $
if ($entity->get('oe_event_online_only')->value) {
$build['#fields']['items'][] = [
'icon' => 'location',
'size' => 's',
'size' => 'xs',
'text' => [
'#markup' => $this->t('Online only'),
],
Expand All @@ -178,7 +178,7 @@ protected function addRenderableLocation(array &$build, ContentEntityInterface $
if (!empty($address)) {
$build['#fields']['items'][] = [
'icon' => 'location',
'size' => 's',
'size' => 'xs',
'text' => [
'#markup' => $address,
],
Expand Down Expand Up @@ -236,7 +236,7 @@ protected function addRenderableOnlineType(array &$build, ContentEntityInterface
$build['#fields']['items'][] = [
'icon' => 'livestreaming',
'text' => $this->t('Live streaming available'),
'size' => 's',
'size' => 'xs',
];
}
}
Expand Down
18 changes: 9 additions & 9 deletions tests/src/Functional/ContentEventRenderTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -225,11 +225,11 @@ public function testEventRendering(): void {
[
'icon' => 'file',
'text' => 'Financing',
'size' => 's',
'size' => 'xs',
], [
'icon' => 'calendar',
'text' => '28 February 2020, 01:00',
'size' => 's',
'size' => 'xs',
],
],
];
Expand Down Expand Up @@ -273,11 +273,11 @@ public function testEventRendering(): void {
[
'icon' => 'file',
'text' => 'Financing',
'size' => 's',
'size' => 'xs',
], [
'icon' => 'calendar',
'text' => "28 February 2020, 01:00\n - 9 March 2020, 01:00",
'size' => 's',
'size' => 'xs',
],
],
];
Expand Down Expand Up @@ -332,7 +332,7 @@ public function testEventRendering(): void {
$icons_text_expected_values['items'][2] = [
'icon' => 'location',
'text' => '<Brussels>, Belgium',
'size' => 's',
'size' => 'xs',
];
$icons_text_assert->assertPattern($icons_text_expected_values, $details_list_content->getOuterHtml());

Expand Down Expand Up @@ -413,7 +413,7 @@ public function testEventRendering(): void {
$icons_text_expected_values['items'][3] = [
'icon' => 'livestreaming',
'text' => 'Live streaming available',
'size' => 's',
'size' => 'xs',
];
$icons_text_assert->assertPattern($icons_text_expected_values, $details_list_content->getOuterHtml());

Expand Down Expand Up @@ -678,15 +678,15 @@ public function testEventRendering(): void {
[
'icon' => 'file',
'text' => 'Financing',
'size' => 's',
'size' => 'xs',
], [
'icon' => 'calendar',
'text' => "28 February 2020, 01:00\n - 9 March 2020, 01:00",
'size' => 's',
'size' => 'xs',
], [
'icon' => 'livestreaming',
'text' => 'Live streaming available',
'size' => 's',
'size' => 'xs',
],
],
];
Expand Down
14 changes: 7 additions & 7 deletions tests/src/Kernel/EventRenderTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -166,7 +166,7 @@ public function testEventTeaser(): void {
[
'icon' => 'location',
'text' => 'Belgium',
'size' => 's',
'size' => 'xs',
],
],
]),
Expand Down Expand Up @@ -207,12 +207,12 @@ public function testEventTeaser(): void {
[
'icon' => 'location',
'text' => '<Brussels>, Belgium',
'size' => 's',
'size' => 'xs',
],
[
'icon' => 'livestreaming',
'text' => t('Live streaming available'),
'size' => 's',
'size' => 'xs',
],
],
]);
Expand All @@ -228,12 +228,12 @@ public function testEventTeaser(): void {
[
'icon' => 'location',
'text' => 'Online only',
'size' => 's',
'size' => 'xs',
],
[
'icon' => 'livestreaming',
'text' => t('Live streaming available'),
'size' => 's',
'size' => 'xs',
],
],
]);
Expand Down Expand Up @@ -285,12 +285,12 @@ public function testEventTeaser(): void {
[
'icon' => 'location',
'text' => '<Brussels>, Белгия',
'size' => 's',
'size' => 'xs',
],
[
'icon' => 'livestreaming',
'text' => t('Live streaming available'),
'size' => 's',
'size' => 'xs',
],
],
]);
Expand Down
4 changes: 2 additions & 2 deletions tests/src/Kernel/fixtures/rendering.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2677,7 +2677,7 @@
text: "Brussels, Belgium"
-
icon: "livestreaming"
size: "s"
size: "xs"
text: "Live streaming available"
assertions:
count:
Expand All @@ -2688,7 +2688,7 @@
'ul li.ecl-unordered-list__item:nth-child(1)': '<svg class="ecl-icon ecl-icon--m ecl-u-mr-s" focusable="false" aria-hidden="true"><use xlink:href="/themes/custom/oe_theme/dist/ec/images/icons/sprites/icons.svg#file"></use></svg>Culture | Innovation'
'ul li.ecl-unordered-list__item:nth-child(2)': '<svg class="ecl-icon ecl-icon--s ecl-u-mr-s" focusable="false" aria-hidden="true"><use xlink:href="/themes/custom/oe_theme/dist/ec/images/icons/sprites/icons.svg#calendar"></use></svg>15-16 November 2019, 08:00 AM'
'ul li.ecl-unordered-list__item:nth-child(3)': '<svg class="ecl-icon ecl-icon--m ecl-u-mr-s" focusable="false" aria-hidden="true"><use xlink:href="/themes/custom/oe_theme/dist/ec/images/icons/sprites/icons.svg#location"></use></svg>Brussels, Belgium'
'ul li.ecl-unordered-list__item:nth-child(4)': '<svg class="ecl-icon ecl-icon--s ecl-u-mr-s" focusable="false" aria-hidden="true"><use xlink:href="/themes/custom/oe_theme/dist/ec/images/icons/sprites/icons.svg#livestreaming"></use></svg>Live streaming available'
'ul li.ecl-unordered-list__item:nth-child(4)': '<svg class="ecl-icon ecl-icon--xs ecl-u-mr-s" focusable="false" aria-hidden="true"><use xlink:href="/themes/custom/oe_theme/dist/ec/images/icons/sprites/icons.svg#livestreaming"></use></svg>Live streaming available'
- array:
'#type': pattern
'#id': icons_with_text
Expand Down

0 comments on commit ccd940b

Please sign in to comment.