adding_pages_collection.feature 2.36 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
10
11
12
Background:
     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 |
13

14
15
Scenario: Creating a collection AND adding pages
    # Log in as "Admin" user
16
    Given I log in as "admin" with password "Kupuhipa1"
17
18
19
    # Verifying log in was successful
    And I should see "Admin User"
    # Create Test collection
20
21
    # And I choose "Pages and collections" in "Portfolio"
    And I go to "collection/index.php"
22
23
    And I follow "New collection"
    And I fill in the following:
Son Nguyen's avatar
Son Nguyen committed
24
25
        | Collection name | Test Collection |
        | Collection description | Test |
26
27
28
    # Adding page 1, 2 & 3 to the collection
    And I press "Next: Edit collection pages"
    And I follow "All"
29
    And I wait "1" seconds
30
31
32
33
34
    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"
35
36
37
      # Sort pages by Last modified
    Then I follow "Portfolio"
    And I select "Last modified" from "Sort by:"
38
    And I press the key "Enter" in the "Search:" field
39
    # Checking they are in the right order
40
    And I wait "1" seconds
41
42
    And "Testing page 1" "link" should appear before "Testing page 2" "link"
    And "Testing page 2" "link" should appear before "Testing page 3" "link"
43
44
45
46
47
48

    # Sharing the collection then adding in a new page
    And I choose "Shared by me" in "Portfolio"
    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"
50
51
52
53
54
    And I press "Create page"
    And I set the following fields to these values:
    | Page title | New page |
    | Page description | testing |
    And I press "Save"
55
56
    # And I choose "Pages and collections" in "Portfolio"
    And I go to "collection/index.php"
57
58
59
60
61
62
    And I follow "Manage pages"
    And I follow "All"
    And I wait "1" seconds
    And I press "Add pages"
    And I follow "Done"
    Then I should see "New page"