add_blogs.feature 2.16 KB
Newer Older
1
@javascript @core @core_artefact
2 3 4 5 6 7 8
Feature: Mahara users can create their blogs
    As a mahara user
    I need to create blogs

 Background:
  Given the following "users" exist:
    | username | password | email | firstname | lastname | institution | authname | role |
9
    | UserA | Kupuh1pa! | UserA@example.org | Angela | User | mahara | internal | member |
10

11 12 13 14
  And the following "pages" exist:
  | title | description| ownertype | ownername |
  | Page UserA_01 | Page 01 | user | UserA |

15
 Scenario: Create blogs
16
  Given I log in as "UserA" with password "Kupuh1pa!"
17
  And I choose "Settings" in "Setting" from user menu
18 19
  And I fill in the following:
    | tagssideblockmaxtags | 10 |
20
  And I enable the switch "Multiple journals"
21 22 23 24 25 26
  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:
    | title | My new journal |
27
  And I fill in select2 input "newblog_tags" with "blog" and select "blog"
28 29
  And I press "Create journal"
  Then I should see "My new journal"
30 31 32 33 34 35 36

  # 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 |
37 38
  And I scroll to the base of id "editpost_tags_container"
  And I fill in select2 input "editpost_tags" with "blogentry" and select "blogentry"
39
  And I press "Save entry"
40
  And I choose "Pages and collections" in "Portfolio" from main menu
41
  And I click on "Edit" in "Page UserA_01" panel menu
42
  And I expand "Journals" node in the "blocktype sidebar" property
43 44 45 46 47
  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\""
48 49 50 51 52 53 54
  And I choose "Journals" in "Content" from main menu
  And I follow "My new journal"
  And I click on "Delete \"Journal entry 1\""
  And I choose "Journals" in "Content" 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"