Skip to content
Snippets Groups Projects
Commit 1bf2ab5a authored by Alexandre Dias's avatar Alexandre Dias Committed by Claudiu Cristea
Browse files

ISAICP-9192: Use bundles and remove extra tests.

parent d5bf58a0
No related branches found
No related tags found
1 merge request!207Release 2.1.1
......@@ -4,6 +4,7 @@ status: true
dependencies:
module:
- joinup_core
- node
- oe_webtools_etrans
- system
theme:
......@@ -36,5 +37,15 @@ visibility:
- entity.taxonomy_term.delete_form
request_path:
id: request_path
negate: true
pages: ''
'entity_bundle:node':
id: 'entity_bundle:node'
negate: false
pages: "/interoperable-europe/news/*\r\n/interoperable-europe/event/*\r\n/interoperable-europe/document/*\r\n/interoperable-europe/discussion/*"
context_mapping: { }
bundles:
custom_page: custom_page
discussion: discussion
document: document
event: event
news: news
......@@ -9,15 +9,13 @@ Feature:
When I click "Discover more"
Then I should see the heading "Joinup is becoming Interoperable Europe Portal"
And the page should be rendered using the "Interoperable Europe" theme
# Uncomment this in ISAICP-9192.
# And I should not see the link "Report abusive content"
And I should not see the link "Report abusive content"
# Test other pages.
When I visit "/interoperable-europe/initiatives"
Then the page should be rendered using the "Interoperable Europe" theme
And I should see the heading "Initiatives"
And I should see the heading "Join our community!"
And I should not see the link "Report abusive content"
# Event.
When I visit "/interoperable-europe/event/save-date-semic-coming-back-8-december-2021"
......@@ -25,7 +23,6 @@ Feature:
And I should see the text "Event"
And I should not see the heading "Event"
And I should see the link "more events"
And I should not see the link "Report abusive content"
And I should see the text "Published on: 19/11/2021"
And I should see the heading "Join our community!"
When I click "more events"
......@@ -37,7 +34,6 @@ Feature:
And I should see the text "News"
And I should not see the heading "News"
And I should see the link "more news"
And I should not see the link "Report abusive content"
And I should see the text "Published on: 19/11/2021"
And I should see the heading "Join our community!"
When I click "more news"
......@@ -82,18 +78,7 @@ Feature:
Then I should see the error message "Title field is required."
@javascript
Scenario: Report link and eTranslate button are not available in IOP custom pages.
Given custom_page content:
| title | collection |
| IOP page | Interoperable Europe |
When I am logged in as a user with the authenticated role
And I go to the "IOP page" custom page
Then I should not see the link "Report abusive content"
And I should not see the button "Translate"
@javascript
Scenario Outline: Report link and eTranslate button are not available in IOP.
Scenario Outline: Visibility of Report link and eTranslate button.
Given <type> content:
| title | collection |
| IOP <type> | Interoperable Europe |
......@@ -104,11 +89,12 @@ Feature:
And I should see the button "Translate"
Examples:
| type |
| news |
| event |
| discussion |
| document |
| type |
| news |
| event |
| discussion |
| document |
| custom_page |
@javascript
Scenario: Regression test that ensures that search bar works fine.
......
......@@ -122,8 +122,7 @@ function iop_preprocess_node(array &$variables): void {
}
// Disables the "Report" link for IOP.
$node = \Drupal::routeMatch()->getParameter('node');
if (!$node instanceof NodeInterface || isset($variables['content']['report'])) {
if (isset($variables['content']['report'])) {
$variables['content']['report']['#access'] = FALSE;
}
......
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