adding_pages_collection.feature 1.51 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
Scenario: Creating a collection AND adding pages
    # Log in as "Admin" user
10
    Given I log in as "admin" with password "Kupuhipa1"
11
12
    # Verifying log in was successful
    And I should see "Admin User"
13
14
15
16
17
    Given the following "pages" exist:
     | title | description| ownertype | ownername |
     | Testing page 1 | UserD's page 01 | user | admin  |
     | Testing page 2 | UserD's page 02 | user | admin |
     | Testing page 3 | UserA's page 01 | user | admin |
18
19
20
21
22
23
24
25
26
27
28
29
30
31
    # Create Test collection
    And I choose "Collections" in "Portfolio"
    And I follow "New collection"
    And I fill in the following:
        | Collection name | Test Collection	|
        | Collection description | Test	|
    # 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
    And I should see "Testing page 1"
    And I should see "Testing page 2"
    And I should see "Testing page 3"
32
33
34
35
36
37
38
      # Sort pages by Last modified
    Then I follow "Portfolio"
    And I select "Last modified" from "Sort by:"
    And I press "Search"
    # Checking they are in the right order
    And "Testing page 1" "link" should appear before "Testing page 2" "link"
    And "Testing page 2" "link" should appear before "Testing page 3" "link"