OEL-1653: Show time in event dates
Created by: escuriola
Merge request reports
Activity
54 54 oe_content_short_title: true 55 55 oe_documents: true 56 56 oe_featured_media: true 57 search_api_excerpt: true Created by: donquixote
I do see the "Event teaser" part in the pdf now. It does use hyphen with spaces. I see that we don't need to add the spaces with the separator here, the core formatter already adds the spaces. So it seems ok.
Can we add a line in ContentEventRenderTest::testEventRenderingTeaser() to test the date output? I think we currently don't have it.
1 langcode: en 2 status: true 3 dependencies: { } 4 id: oe_whitelabel_date_time_long 5 label: 'Date and time, long names' 6 default_pattern: 'l d F Y, H.i (T)' 7 default_separator: ' - ' 8 same_day_start_pattern: 'l d F Y, H.i' 9 same_day_end_pattern: 'H.i (T)' 10 same_day_separator: '-' 9 9 "php": ">=7.4", 10 10 "cweagans/composer-patches": "^1.7", 11 11 "drupal/core": "^9.2", 12 "drupal/daterange_compact": "^2.0", Created by: donquixote
The module seems like a good idea, but: Are these formats translatable?
I found this issue: https://www.drupal.org/project/daterange_compact/issues/3023808
Thanks for the contributions. Formats are translatable in version 2.0, using a combination of #3 and #7.
But how do we translate them?
130 80 trim($content_banner->filter('.oe-sc-event__oe-summary')->text()) 131 81 ); 132 82 83 $date = $crawler->filter('dl > dd'); 84 85 // Assert event dates starting and ending same day. 86 $this->assertEquals('Wednesday 09 February 2022, 21.00-23.00 (CET)', trim($date->text())); 87 88 // Assert event dates starting and ending at different days. Created by: donquixote
Review: Changes requested
A bit of feedback.
And one question: Should we have tests for the date range formats in isolation, or is it enough to test them as part of a content type? If we test in isolation we could also cover translatability.
But not a blocker, I would be ok to merge this without these additional tests. The event test will reveal regressions in the date range formats.