adding_pages_collection.feature 3.14 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
30
31
32
33
34
    # 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"
35
36
    And I should see "A page 4"
    # Sort pages by Last modified
37
    Then I choose "Portfolio" from main menu
38
39
40
    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"
41
    And I select "Last modified" from "Sort by:"
42
    And I press the key "Enter" in the "Search:" field
43
44
45
    # 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"
46

47
48
49
50
51
52
53
54
55
56
57
    # 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"

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