This repository has been archived by the owner on Jul 27, 2022. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 21
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #2085 from ec-europa/EPIC-5944
- Loading branch information
Showing
27 changed files
with
309 additions
and
14 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -4,6 +4,7 @@ status: true | |
dependencies: | ||
module: | ||
- joinup_core | ||
- joinup_group | ||
- user | ||
theme: | ||
- joinup_theme | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
uuid: 3204b36b-f978-4f1b-bd6d-b2d3fe0660c4 | ||
langcode: en | ||
status: true | ||
dependencies: | ||
module: | ||
- site_alert | ||
theme: | ||
- joinup_theme | ||
id: site_alerts | ||
theme: joinup_theme | ||
region: content_top | ||
weight: -21 | ||
provider: null | ||
plugin: site_alert_block | ||
settings: | ||
id: site_alert_block | ||
label: 'Site alerts' | ||
provider: site_alert | ||
label_display: '0' | ||
timeout: 0 | ||
visibility: { } |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -5,6 +5,7 @@ dependencies: | |
module: | ||
- ctools | ||
- joinup_core | ||
- joinup_group | ||
theme: | ||
- joinup_theme | ||
_core: | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,57 @@ | ||
@api @group-b | ||
Feature: Site alerts | ||
In order to announce scheduled downtime | ||
As a moderator | ||
I want to be able to display a site wide alert | ||
|
||
Scenario: Show a site wide alert and hide it again | ||
# Create a site wide alert as a moderator. | ||
Given I am logged in as a moderator | ||
When I click "Site alerts" in the "Administration toolbar" region | ||
Then I should see the text "There are no site alerts yet." | ||
|
||
When I click "Add Site Alert" | ||
And I fill in "Label" with "Site maintenance 18:00-20:00" | ||
And I select "Medium" from "Severity" | ||
And I enter "Between 18:00 and 20:00 the site will be temporarily unavailable due to scheduled maintenance" in the "Message" wysiwyg editor | ||
And I press "Save" | ||
|
||
# Anonymous users should see the alert. | ||
Given I am not logged in | ||
And I am on the homepage | ||
Then I should see the text "Between 18:00 and 20:00 the site will be temporarily unavailable due to scheduled maintenance" | ||
|
||
# Deactivate the alert without deleting it, so it can be used again later. | ||
Given I am logged in as a moderator | ||
When I click "Site alerts" in the "Administration toolbar" region | ||
And I click "Edit" | ||
And I uncheck "Active" | ||
And I press "Save" | ||
Then I should see the text "Not Active" | ||
|
||
# The alert should no longer be shown. | ||
Given I am not logged in | ||
And I am on the homepage | ||
Then I should not see the text "Between 18:00 and 20:00 the site will be temporarily unavailable due to scheduled maintenance" | ||
|
||
# Re-enable the alert, it should appear again. | ||
Given I am logged in as a moderator | ||
When I click "Site alerts" in the "Administration toolbar" region | ||
And I click "Edit" | ||
And I check "Active" | ||
And I press "Save" | ||
|
||
Given I am not logged in | ||
And I am on the homepage | ||
Then I should see the text "Between 18:00 and 20:00 the site will be temporarily unavailable due to scheduled maintenance" | ||
|
||
# An alert can also be removed entirely, if it does not need to be reused. | ||
Given I am logged in as a moderator | ||
When I click "Site alerts" in the "Administration toolbar" region | ||
And I click "Delete" | ||
And I press "Delete" | ||
Then I should see the message " The Site Alert Site maintenance 18:00-20:00 has been deleted." | ||
|
||
Given I am not logged in | ||
And I am on the homepage | ||
Then I should not see the text "Between 18:00 and 20:00 the site will be temporarily unavailable due to scheduled maintenance" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.