Skip to content

Instantly share code, notes, and snippets.

@danpoltawski
Created February 13, 2013 04:21
Show Gist options
  • Select an option

  • Save danpoltawski/4942239 to your computer and use it in GitHub Desktop.

Select an option

Save danpoltawski/4942239 to your computer and use it in GitHub Desktop.
@block_rss
Feature: Add blocks
In order to add more functionality to pages
As a teacher
I need to add rss feeds
@javascript
Scenario: Add and configure an RSS block
Given the following "courses" exists:
| fullname | shortname | format |
| Course 1 | C1 | topics |
And I log in as "admin"
And I follow "Course 1"
And I turn editing mode on
When I add the "Remote RSS feeds" block
Then I should see "Click the edit icon above to configure this block to display RSS feeds"
When I follow "Configure Remote news feed block"
And I follow "Add/edit feeds"
And I press "Add a new feed"
Then I should see "Add a new feed"
When I fill in "Feed URL" with "http://download.moodle.org/unittest/rsstest.xml"
And I fill in "Custom title (leave blank to use title supplied by feed):" with "BEHAT Test Feed"
And I press "Add a new feed"
Then I should see "BEHAT Test Feed"
And I should see "http://download.moodle.org/unittest/rsstest.xml"
# Commence horrible navigation dance due to poor navigation..
When I follow "C1"
And I follow "Configure Remote news feed block"
# We're back on the feed config screen..
And I select "BEHAT Test Feed" from "Choose the feeds which you would like to make available in this block:"
And I select "No" from "Display each link's description?"
And I press "Save changes"
Then I should see "BEHAT Test Feed"
And I should see "Google HOP contest encourages pre-University students to work on Moodle"
And I should not see "Source site..."
When I follow "Configure Remote news feed block"
And I select "No" from "Display each link's description?"
Then I should see "Google HOP contest encourages pre-University students to work on Moodle"
And I should see "Source site...
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment