Skip to content

Commit

Permalink
OEL-1291: Tests adapted.
Browse files Browse the repository at this point in the history
  • Loading branch information
Maxfire committed Mar 14, 2022
1 parent 70f0e46 commit ce75ca8
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 9 deletions.
6 changes: 3 additions & 3 deletions tests/src/Functional/ContentEventRenderTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -77,11 +77,11 @@ protected function setUp(): void {
$node = \Drupal::entityTypeManager()
->getStorage('node')
->create([
'type' => 'oe_event',
'type' => 'oe_sc_event',
'title' => 'Test event node',
'oe_summary' => 'http://www.example.org is a web page',
'body' => 'Event body',
'oe_event_dates' => [
'oe_sc_event_dates' => [
'value' => '2022-02-09T20:00:00',
'end_value' => '2022-02-09T22:00:00',
],
Expand Down Expand Up @@ -124,7 +124,7 @@ public function testEventRenderingFull(): void {
// Assert content banner summary.
$this->assertEquals(
'http://www.example.org is a web page',
trim($content_banner->filter('.oe-event__oe-summary')->text())
trim($content_banner->filter('.oe-sc-event__oe-summary')->text())
);
// Assert inpage-navigation.
$this->assertEquals(
Expand Down
12 changes: 6 additions & 6 deletions tests/src/Functional/ContentNewsRenderTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -60,12 +60,12 @@ protected function setUp(): void {
$node = \Drupal::entityTypeManager()
->getStorage('node')
->create([
'type' => 'oe_news',
'type' => 'oe_sc_news',
'title' => 'Test news node',
'oe_summary' => 'http://www.example.org is a web page',
'body' => 'News body',
'oe_publication_date' => [
'value' => '2022-02-09T20:00:00',
'value' => '2022-02-09',
],
'uid' => 1,
'status' => 1,
Expand Down Expand Up @@ -104,18 +104,18 @@ public function testNewsRenderingFull(): void {
);
// Assert content banner publication date.
$this->assertEquals(
'10 February 2022',
'09 February 2022',
trim($content_banner->filter('.card-body > div.my-4')->text())
);
// Assert content banner summary.
$this->assertEquals(
'http://www.example.org is a web page',
trim($content_banner->filter('.oe-news__oe-summary')->text())
trim($content_banner->filter('.oe-sc-news__oe-summary')->text())
);
// Assert the news content.
$this->assertEquals(
'News body',
trim($crawler->filter('.oe-news__body')->text())
trim($crawler->filter('.oe-sc-news__body')->text())
);
}

Expand Down Expand Up @@ -149,7 +149,7 @@ public function testNewsRenderingTeaser(): void {
);
// Assert content banner publication date.
$this->assertEquals(
'10 February 2022',
'09 February 2022',
trim($crawler->filter('div.card-body > span.text-muted')->text())
);
}
Expand Down

0 comments on commit ce75ca8

Please sign in to comment.