adding_pages_collection.feature 2.69 KB
Newer Older
1
@javascript @core @core_artefact @core_portfolio @core_collection
2
3
Feature: Adding pages to a collection
   In order to add pages to a collection
4
   As an normal user I need pages
5
6
   So I can add them to the collection

7
Background:
8
9
10
11
12

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

13
     Given the following "pages" exist:
14
     | title | description | ownertype | ownername |
15
16
17
18
     | Page UserA_01 | Page 01 | user | UserA |
     | Page UserA_02 | Page 02 | user | UserA |
     | Page UserA_03 | Page 03 | user | UserA |
     | Page UserA_04 | Page 04 | user | UserA |
19

20
Scenario: Creating a collection AND adding pages
21
22
    # Log in as "Normal" user
    Given I log in as "UserA" with password "Kupuhipa1"
23
    # Create Test collection
24
    # This is the test for manually creating a collection
25
    And I choose "Pages and collections" in "Portfolio" from main menu
26
27
    And I follow "Add"
    And I click on "Collection" in the dialog
28
    And I fill in the following:
Son Nguyen's avatar
Son Nguyen committed
29
30
        | Collection name | Test Collection |
        | Collection description | Test |
31
32
33
34
35
    # Adding page 1, 2 & 3 to the collection
    And I press "Next: Edit collection pages"
    And I follow "All"
    Then I press "Add pages"
    # Verifying that the pages were added
36
37
    And I should see "Page UserA_01"
    And I should see "Page UserA_04"
38

39
40
41
42
43
44
45
46
47
48
49
    # Exporting pages and collections
    And I choose "Export" in "Portfolio" from main menu
    And I select the radio "Standalone HTML website"
    And I select the radio "Just some of my pages"
    And I should see "Pages to export"
    And I select the radio "Just some of my collections"
    And I should see "Collections to export"
    And I select the radio "All my data"
    And I should not see "Pages to export"
    And I should not see "Collections to export"

50
    # Sharing the collection then adding in a new page
51
    And I choose "Shared by me" in "Portfolio" from main menu
52
53
54
    And I follow "Edit access"
    And I select "Registered users" from "accesslist[0][searchtype]"
    And I press "Save"
55
    And I choose "Pages and collections" in "Portfolio" from main menu
56
57
    And I follow "Add"
    And I click on "Page" in the dialog
58
59
60
61
    And I set the following fields to these values:
    | Page title | New page |
    | Page description | testing |
    And I press "Save"
62
    And I choose "Pages and collections" in "Portfolio" from main menu
63
64
    And I click on "Test Collection" panel menu
    And I click on "Manage" in "Test Collection" panel menu
65
66
    And I follow "All"
    And I press "Add pages"
67
    And I should see "1 page added to collection"