Code development platform for open source projects from the European Union institutions

Skip to content
Snippets Groups Projects
Commit 665b5795 authored by Sergio Elvira Perez's avatar Sergio Elvira Perez
Browse files

OEL-1291: Tests adapted.

parent f928de4c
No related branches found
No related tags found
1 merge request!92OEL-1291: News and Event content types renamed.
......@@ -77,11 +77,11 @@ class ContentEventRenderTest extends WhitelabelBrowserTestBase {
$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',
],
......@@ -124,7 +124,7 @@ class ContentEventRenderTest extends WhitelabelBrowserTestBase {
// 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(
......
......@@ -60,12 +60,12 @@ class ContentNewsRenderTest extends WhitelabelBrowserTestBase {
$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,
......@@ -104,18 +104,18 @@ class ContentNewsRenderTest extends WhitelabelBrowserTestBase {
);
// 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())
);
}
......@@ -149,7 +149,7 @@ class ContentNewsRenderTest extends WhitelabelBrowserTestBase {
);
// Assert content banner publication date.
$this->assertEquals(
'10 February 2022',
'09 February 2022',
trim($crawler->filter('div.card-body > span.text-muted')->text())
);
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment