1441 |
ariadna |
1 |
@block @block_rss_client
|
|
|
2 |
Feature: Enable RSS client block menu on the frontpage
|
|
|
3 |
In order to enable the RSS client block on the frontpage
|
|
|
4 |
As an admin
|
|
|
5 |
I can add RSS client block to the frontpage
|
|
|
6 |
|
|
|
7 |
Background:
|
|
|
8 |
Given I log in as "admin"
|
|
|
9 |
When I navigate to "Plugins > Blocks > Manage blocks" in site administration
|
|
|
10 |
Then I enable "rss_client" "block" plugin
|
|
|
11 |
And the following "blocks" exist:
|
|
|
12 |
| blockname | contextlevel | reference | pagetypepattern | defaultregion |
|
|
|
13 |
| rss_client | System | 1 | site-index | side-pre |
|
|
|
14 |
|
|
|
15 |
@javascript
|
|
|
16 |
Scenario: Configuring the RSS block on the frontpage
|
|
|
17 |
Given I log in as "admin"
|
|
|
18 |
And I am on site homepage
|
|
|
19 |
And I turn editing mode on
|
|
|
20 |
And "RSS feed" "block" should exist
|
|
|
21 |
And I configure the "RSS feed" block
|
|
|
22 |
And I should see "There are not yet any RSS feeds. Choose 'Add new RSS feed'."
|
|
|
23 |
|
|
|
24 |
# Test filling in an empty URL in the input.
|
|
|
25 |
And I click on "Add new RSS feed" "radio"
|
|
|
26 |
And I press "Save changes"
|
|
|
27 |
And I should see "You must supply a value here."
|
|
|
28 |
|
|
|
29 |
# Test filling in with a non-valid URL in the input.
|
|
|
30 |
And I set the field "config_feedurl" to "https://example.com/notvalid.rss"
|
|
|
31 |
And I press "Save changes"
|
|
|
32 |
And I should see "Could not find or load the RSS feed."
|
|
|
33 |
|
|
|
34 |
# Test filling in with the correct URL in the input.
|
|
|
35 |
And I set the field "config_feedurl" to "https://www.nasa.gov/rss/dyn/breaking_news.rss"
|
|
|
36 |
And I set the field "config_block_rss_client_show_channel_link" to "Yes"
|
|
|
37 |
And I press "Save changes"
|
|
|
38 |
And I should see "NASA"
|
|
|
39 |
And I should see "Source site..."
|
|
|
40 |
|
|
|
41 |
# Test the existence of the available feeds.
|
|
|
42 |
When I configure the "NASA" block
|
|
|
43 |
Then I should see "NASA" in the "Select feeds to display" "select"
|
|
|
44 |
And I click on "Cancel" "button" in the "Configure NASA block" "dialogue"
|
|
|
45 |
|
|
|
46 |
# Test the Manage RSS feeds page.
|
|
|
47 |
And I click on "Manage RSS feeds" "link"
|
|
|
48 |
And I should see "NASA"
|