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

7
8
Background:
     Given the following "pages" exist:
9
10
11
12
13
     | title | description | ownertype | ownername |
     | Page admin_01 | Page 01 | user | admin |
     | Page admin_02 | Page 02 | user | admin |
     | Page admin_03 | Page 03 | user | admin |
     | AA Page admin_04 | Page 04 | user | admin |
14

15
16
Scenario: Creating a collection AND adding pages
    # Log in as "Admin" user
17
    Given I log in as "admin" with password "Kupuhipa1"
18
    # Create Test collection
19
    And I choose "Pages and collections" in "Portfolio" from main menu
20
21
    And I follow "Add"
    And I click on "Collection" in the dialog
22
    And I fill in the following:
Son Nguyen's avatar
Son Nguyen committed
23
24
        | Collection name | Test Collection |
        | Collection description | Test |
25
26
27
28
29
    # 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
30
31
    And I should see "Page admin_01"
    And I should see "AA Page admin_04"
32

33
34
35
36
37
38
39
40
41
42
43
    # 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"

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