Commit 92a72586 authored by Niranjan Bandi's avatar Niranjan Bandi Committed by Robert Lyon

Bug 1692746: Changes to the shared pages feature file.

Donot merge
Done with the changes below
search_users_by_share_pages.feature
don't confirm login
add pages in Background
consider combining with the share_with_group.feature

Change-Id: I96c4f56e93ebcac7073feb7a7b576c354be08494
parent bd5f28f7
@javascript @core @core_group
Feature: Show created or updated time for shared pages to a group
In order to see shared pages
As as admin
To see that they display in the most recently updated order
Background:
Given the following "users" exist:
| username | password | email | firstname | lastname | institution | authname | role |
| UserA | Kupuhipa1 | UserA@example.org | Angela | User | mahara | internal | member |
| UserB | Kupuhipa1 | UserB@example.org | Bob | User | mahara | internal | member |
| UserC | Kupuhipa1 | UserC@example.org | Cecilia | User | mahara | internal | member |
Given the following "groups" exist:
| name | owner | description | grouptype | open | invitefriends | editroles | submittableto | allowarchives | members | staff |
| GroupA | admin | GroupA owned by admin | standard | ON | ON | all | ON | ON | UserA, UserB, UserC | |
Given the following "pages" exist:
| title | description | ownertype | ownername |
| Page GroupA_01 | Page 01 | group | GroupA |
| Page GroupA_02 | Page 02 | group | GroupA |
| Page GroupA_03 | Page 03 | group | GroupA |
Scenario: Displaying shared pages in most recently updated order (Bug 1490569)
Given I log in as "admin" with password "Kupuhipa1"
And I choose "Groups" from main menu
And I follow "GroupA"
And I follow "Edit this page"
And I scroll to the id "column-container"
And I configure the block "Group portfolios"
When I set the following fields to these values:
| Sort shared pages and collections by | Most recently updated |
And I click on "Save"
Then "Page GroupA_01" "text" should appear before "Page GroupA_02" "text"
And "Page GroupA_03" "text" should appear after "Page GroupA_02" "text"
......@@ -9,95 +9,118 @@ Background:
| username | password | email | firstname | lastname | institution | authname | role |
| UserA | Kupuhipa1 | UserA@example.org | Angela | User | mahara | internal | member |
| UserB | Kupuhipa1 | UserB@example.org | Bob | User | mahara | internal | member |
| UserC | Kupuhipa1 | UserC@example.org | Cecilia | User | mahara | internal | member |
And the following "groups" exist:
| name | owner | description | grouptype | open | invitefriends | editroles | submittableto | allowarchives | members | staff |
| GroupA | UserB | GroupA owned by UserB | standard | ON | OFF | all | OFF | OFF | UserA | |
| GroupB | UserB | GroupB owned by UserB | standard | ON | OFF | all | OFF | OFF | UserA | |
| GroupB | admin | GroupB owned by admin | standard | ON | ON | all | ON | ON | UserA, UserB, UserC | |
And the following "pages" exist:
| title | description | ownertype | ownername |
| title | description| ownertype | ownername |
| Page UserA_01 | Page 01 | user | UserA |
| Page UserA_02 | Page 02 | user | UserA |
| Page UserA_03 | Page 03 | user | UserA |
| Page UserA_04 | Page 04 | user | UserA |
| Page UserA_05 | Page 05 | user | UserA |
| Page UserA_06 | Page 06 | user | UserA |
| Page UserA_07 | Page 07 | user | UserA |
| Page UserA_07 | Page 07 to be used as solo page | user | UserA |
| Page UserA_08 | Page 08 | user | UserA |
| Page UserA_09 | Page 09 | user | UserA |
| Page UserA_10 | Page 10 | user | UserA |
| Page UserA_11 | Page 11 | user | UserA |
| Page UserA_12 | Page 12 | user | UserA |
| Page GroupB_01 | Group page 01 | group | GroupB |
| Page GroupB_02 | Group page 02 | group | GroupB |
| Page GroupB_03 | Group page 03 | group | GroupB |
And the following "collections" exist:
| title | description | ownertype | ownername | pages |
| title | description| ownertype | ownername | pages |
| Collection UserA_01 | Collection 01 | user | UserA | Page UserA_06, Page UserA_12 |
| Collection UserA_02 | Collection 02 | user | UserA | Page UserA_07 |
| Collection UserA_03 | Collection 03 | user | UserA | Page UserA_08 |
| Collection UserA_04 | Collection 04 | user | UserA | Page UserA_09 |
| Collection UserA_05 | Collection 05 | user | UserA | Page UserA_10 |
| Collection UserA_06 | Collection 06 | user | UserA | Page UserA_11 |
Scenario: Share pages and collections to a group.
The list of shared pages must take into account of access date (Bug 1374163)
# Log in as a normal user
Given I log in as "UserA" with password "Kupuhipa1"
# Verifying log in was successful
And I should see "Angela"
And I should see "GroupB"
# Edit access for Page UserA_01
# Edit access for Page 01
And I choose "Shared by me" in "Portfolio" from main menu
And I follow "Pages" in the "div#main-column-container" "css_element"
And I click on "Edit access" in "Page UserA_01" row
And I select "GroupB" from "accesslist[0][searchtype]"
And I select "GroupA" from "accesslist[0][searchtype]"
And I fill in "accesslist[0][startdate]" with "2015/06/15 03:00"
And I press "Save"
# Edit access for Page UserA_02
And I choose "Shared by me" in "Portfolio" from main menu
And I follow "Pages"
And I should see "GroupA"
# Edit access for Page 02
And I follow "Pages" in the "div#main-column-container" "css_element"
And I click on "Edit access" in "Page UserA_02" row
And I select "GroupB" from "accesslist[0][searchtype]"
And I select "GroupA" from "accesslist[0][searchtype]"
And I fill in "accesslist[0][stopdate]" with "2015/04/15 02:50"
And I press "Save"
And I should see "The end date for 'group' access cannot be in the past."
And I press "Cancel"
# Edit access for Page UserA_03
And I choose "Shared by me" in "Portfolio" from main menu
# Edit access for Page 02
#And I follow "Pages" in the "div#main-column-container" "css_element"
#And I click on "Edit access" in "Page UserA_02" row
#And I select "GroupA" from "accesslist[0][searchtype]"
#And I fill in "accesslist[0][startdate]" with "2015/06/15 03:00"
#And I fill in "accesslist[0][stopdate]" with "+2 days" date in the format "Y/m/d"
#And I press "Save"
# Edit access for Page 03
And I follow "Pages" in the "div#main-column-container" "css_element"
And I click on "Edit access" in "Page UserA_03" row
And I follow "Advanced options"
And I fill in the following:
| Access start date/time | 2015/06/15 00:00 |
And I press "Save"
# Edit access for Page UserA_05
And I choose "Shared by me" in "Portfolio" from main menu
# Edit access for Page 05
And I follow "Pages" in the "div#main-column-container" "css_element"
And I click on "Edit access" in "Page UserA_05" row
And I select "GroupB" from "accesslist[0][searchtype]"
And I select "GroupA" from "accesslist[0][searchtype]"
And I press "Save"
# Edit access for Collection UserA_01
And I choose "Shared by me" in "Portfolio" from main menu
# Edit access for Collection 01
And I click on "Edit access" in "Collection UserA_01" row
And I set the select2 value "Collection UserA_01" for "editaccess_collections"
And I select "GroupB" from "accesslist[0][searchtype]"
And I select "GroupA" from "accesslist[0][searchtype]"
And I fill in "accesslist[0][startdate]" with "2015/06/15 03:00"
And I press "Save"
# Edit access for Collection UserA_03
And I choose "Shared by me" in "Portfolio" from main menu
# Edit access for Collection 03
And I click on "Edit access" in "Collection UserA_03" row
And I set the select2 value "Collection UserA_03" for "editaccess_collections"
And I follow "Advanced options"
And I fill in the following:
| Access start date/time | 2015/06/15 00:00 |
And I press "Save"
# Edit access for Collection UserA_05
And I choose "Shared by me" in "Portfolio" from main menu
# Edit access for Collection 05
And I click on "Edit access" in "Collection UserA_05" row
And I set the select2 value "Collection UserA_05" for "editaccess_collections"
And I select "GroupB" from "accesslist[0][searchtype]"
And I select "GroupA" from "accesslist[0][searchtype]"
And I press "Save"
# Check the list of shared pages to group "GroupB"
# Check the list of shared pages to group "GroupA"
And I choose "Groups" from main menu
And I follow "GroupB"
And I follow "GroupA"
And I should see "Page UserA_05"
And I should see "Collection UserA_05"
And I should not see "Page UserA_03"
And I should not see "Collection UserA_03"
#Testing that view access for views in collections are editable properly
And I choose "Shared by me" in "Portfolio" from main menu
Then I should see "Collection UserA_01"
And I follow "Edit access"
Then I should see "Collection UserA_01"
And I should not see "Page UserA_01"
And I choose "Shared by me" in "Portfolio" from main menu
And I follow "Pages"
Then I click on "Edit access" in "Page UserA_07" row
Then I should see "Page UserA_07"
And I should not see "Collection UserA_01"
And I log out
#Displaying shared pages in most recently updated order (Bug 1490569)
Given I log in as "admin" with password "Kupuhipa1"
And I choose "Groups" from main menu
And I follow "GroupB"
And I follow "Edit this page"
And I scroll to the id "column-container"
And I configure the block "Group portfolios"
When I set the following fields to these values:
| Sort shared pages and collections by | Most recently updated |
And I press "Save"
Then "GroupB_01" "text" should appear before "GroupB_02" "text"
And "GroupB_03" "text" should appear after "GroupB_02" "text"
@javascript @core @core_view @core_portfolio
Feature: The 'Share page' link on the "Edit content" screen
In order to be able to see the right view access selections I need to
add a page to a collection.
Background:
Given the following "users" exist:
| username | password | email | firstname | lastname | institution | authname | role |
| UserA | Kupuhipa1 | UserA@example.org | Angela | User | mahara | internal | member |
And the following "pages" exist:
| title | description | ownertype | ownername |
| Page UserA_01 | Page 01 | user | UserA |
| Page UserA_02 | Page 02 | user | UserA |
And the following "collections" exist:
| title | description | ownertype | ownername | pages |
| Collection UserA_01 | Collection 01 | user | UserA | Page UserA_01 |
Scenario: Testing that view access for views in collections are editable properly
# Checking the right selected options display on view access
Given I log in as "UserA" with password "Kupuhipa1"
And I choose "Shared by me" in "Portfolio" from main menu
Then I should see "Collection UserA_01"
And I follow "Edit access"
Then I should see "Collection UserA_01"
And I should not see "Page UserA_01"
And I choose "Shared by me" in "Portfolio" from main menu
And I follow "Pages"
Then I click on "Edit access" in "Page UserA_02" row
Then I should see "Page UserA_02"
And I should not see "Collection UserA_01"
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment