Commit 10b34502 authored by Steven Spinelli's avatar Steven Spinelli Committed by Robert Lyon
Browse files

Bug #1749631 Behat: Update script - check that settings can be changed

Change-Id: I84dadf23c095ce515711d7b8cf1ed647c2de6852
parent 02bdc8d4
......@@ -16,6 +16,7 @@ define ("LOCATOR_CONSTANTS", json_encode(array(
'Resume field block' => array(".bt-resumefield", "css_element"),
'Watched pages' => array(".bt-watchlist", "css_element"),
'Select' => array(".btn[title='Select']", "css_element"),
'Top right button group' => array(".btn-top-right.btn-group", "css_element"),
'Comment preview' => array(".commentreplyview", "css_element"),
'Comment text' => array(".comment-text", "css_element"),
'Extensions sub-menu' => array(".configextensions ul", "css_element"),
......
......@@ -13,7 +13,7 @@ Feature: Mahara users can create their blogs
| Page UserA_01 | Page 01 | user | UserA |
Scenario: Create blogs
Given I log in as "UserA" with password "Kupuh1pa!"
Given I log in as "UserA" with password "Kupuh1pa!"
# Confirm page contains text "No entries yet. Add one". (Bug 1017785)
When I choose "Journals" in "Create" from main menu
Then I should see "No entries yet."
......@@ -21,41 +21,51 @@ Feature: Mahara users can create their blogs
When I follow "Add one"
Then I should see "New journal entry in journal"
And I move backward one page
And I choose "Settings" in "Setting" from user menu
And I fill in the following:
And I choose "Settings" in "Setting" from user menu
And I fill in the following:
| tagssideblockmaxtags | 10 |
And I enable the switch "Multiple journals"
And I press "Save"
When I go to "artefact/blog/index.php"
And I should see "Journals"
When I click on "Create journal"
And I fill in the following:
And I enable the switch "Multiple journals"
And I press "Save"
When I go to "artefact/blog/index.php"
And I should see "Journals"
# check that settings can be changed by change the title of your default journal, add a description and tags
When I click on "Angela User's Journal"
And I follow "Settings" in the "Top right button group" property
When I fill in the following:
| Title | Angela User's Best Journal |
And I fill in "This is the edited description" in first editor
And I fill in select2 input "editblog_tags" with "Angela" and select "Angela"
And I press "Save settings"
Then I should see "Angela User's Best Journal"
When I choose "Journals" in "Create" from main menu
And I click on "Create journal"
And I fill in the following:
| title | My new journal |
And I fill in select2 input "newblog_tags" with "blog" and select "blog"
And I press "Create journal"
Then I should see "My new journal"
And I fill in select2 input "newblog_tags" with "blog" and select "blog"
And I press "Create journal"
Then I should see "My new journal"
# Check that we can add the blog to tagged blogs block
Given I follow "My new journal"
And I follow "New entry"
And I set the following fields to these values:
| Title | Journal entry 1 |
| Entry | This is a test |
And I scroll to the base of id "editpost_tags_container"
And I fill in select2 input "editpost_tags" with "blogentry" and select "blogentry"
And I press "Save entry"
And I choose "Pages and collections" in "Create" from main menu
And I click on "Edit" in "Page UserA_01" panel menu
And I expand "Journals" node in the "blocktype sidebar" property
And I follow "Tagged journal entries"
And I press "Add"
And I fill in select2 input "instconf_tagselect" with "blogentry" and select "blogentry"
And I press "Save"
Then I should see "Journal entries with tag \"blogentry\""
And I choose "Journals" in "Create" from main menu
And I follow "My new journal"
And I click on "Delete \"Journal entry 1\""
And I choose "Journals" in "Create" from main menu
And I should see "My new journal No entries yet."
And I click on "Delete \"My new journal\""
Then I should not see "My new journal"
# Check that we can add the blog to tagged blogs block
Given I follow "My new journal"
And I follow "New entry"
And I set the following fields to these values:
| Title | Journal entry 1 |
| Entry | This is a test |
And I scroll to the base of id "editpost_tags_container"
And I fill in select2 input "editpost_tags" with "blogentry" and select "blogentry"
And I press "Save entry"
And I choose "Pages and collections" in "Create" from main menu
And I click on "Edit" in "Page UserA_01" panel menu
And I expand "Journals" node in the "blocktype sidebar" property
And I follow "Tagged journal entries"
And I press "Add"
And I fill in select2 input "instconf_tagselect" with "blogentry" and select "blogentry"
And I press "Save"
Then I should see "Journal entries with tag \"blogentry\""
And I choose "Journals" in "Create" from main menu
And I follow "My new journal"
And I click on "Delete \"Journal entry 1\""
And I choose "Journals" in "Create" from main menu
And I should see "My new journal No entries yet."
And I click on "Delete \"My new journal\""
Then I should not see "My new journal"
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment