adding_pages_collection.feature 2.77 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
9
Background:
     Given the following "pages" exist:
     | title | description| ownertype | ownername |
10
11
12
     | Testing page 1 | Admin's page 01 | user | admin |
     | Testing page 2 | Admin's page 02 | user | admin |
     | Testing page 3 | Admin's page 03 | user | admin |
13
     | A page 4 | Admin's 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
19
20
    # Verifying log in was successful
    And I should see "Admin User"
    # Create Test collection
21
    And I choose "Pages and collections" in "Portfolio" from Main menu
22
23
    And I follow "Add"
    And I click on "Collection" in the dialog
24
    And I fill in the following:
Son Nguyen's avatar
Son Nguyen committed
25
26
        | Collection name | Test Collection |
        | Collection description | Test |
27
28
29
    # Adding page 1, 2 & 3 to the collection
    And I press "Next: Edit collection pages"
    And I follow "All"
30
    And I wait "1" seconds
31
32
33
34
35
    Then I press "Add pages"
    # Verifying that the pages were added
    And I should see "Testing page 1"
    And I should see "Testing page 2"
    And I should see "Testing page 3"
36
37
    And I should see "A page 4"
    # Sort pages by Last modified
38
    And I click on "Show Menu"
39
    Then I follow "Portfolio"
40
41
42
    And I select "Alphabetical" from "Sort by:"
    And I press the key "Enter" in the "Search:" field
    And "A page 4" "link" should appear before "Testing page 1" "link"
43
    And I select "Last modified" from "Sort by:"
44
    And I press the key "Enter" in the "Search:" field
45
    # Checking they are in the right order
46
    And I wait "1" seconds
47
48
    And "Testing page 1" "link" should appear before "Testing page 2" "link"
    And "Testing page 2" "link" should appear before "Testing page 3" "link"
49
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
67
    And I follow "All"
    And I wait "1" seconds
    And I press "Add pages"
68
    And I should see "1 page added to collection"
69
    And I follow "Done"