Behat: Group admins pushing group portfolios to group members
Bug #1783425 reported by
Steven
This bug affects 1 person
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
Mahara |
Fix Released
|
Medium
|
Unassigned |
Bug Description
Create behat script for testing group admins pushing group portfolios to group members
Feature file to update: group_test.feature
Related to: https:/
description: | updated |
summary: |
- Behat: Update existing behat script to include tests from Bug# 1763163 + Behat: Group admins pushing group portfolios to group members |
Changed in mahara: | |
status: | New → In Progress |
importance: | Undecided → Medium |
milestone: | none → 18.10.0 |
Changed in mahara: | |
status: | In Progress → Fix Committed |
Changed in mahara: | |
status: | Fix Committed → Fix Released |
To post a comment you must log in.
@javascript @core @core_group
Feature: Group admin can push Group portfolio pages and collections to existing Group members
Background:
Given the following "institutions" exist:
| name | displayname | registerallowed | registerconfirm |
| instone | Institution One | ON | OFF |
| insttwo | Institution Two | ON | OFF |
And the following "users" exist:
| username | password | email | firstname | lastname | institution | authname | role |
| UserA | Kupuh1pa! | <email address hidden> | Angela | User | instone | internal | staff |
| UserB | Kupuh1pa! | <email address hidden> | Bob | User | instone | internal | member |
| UserC | Kupuh1pa! | <email address hidden> | Cecilia | User | instone | internal | member |
And the following "groups" exist:
| name | owner | description | grouptype | open | invitefriends | editroles | submittableto | allowarchives | members | staff |
| GroupA | UserA | GroupA owned by UserA | standard | ON | OFF | all | ON | OFF | UserB, UserA | UserA |
| GroupC | UserC | GroupC owned by UserC | standard | ON | OFF | all | OFF | OFF | UserC | UserC |
And the following "pages" exist:
| title | description | ownertype | ownername |
| Page GroupA_01 | Group page 01 | group | GroupA |
| Page GroupA_02 | Group page 02 | group | GroupA |
| Page GroupA_03 | Group page 03 | group | GroupA |
And the following "collections" exist:
| title | description | ownertype | ownername | pages |
| Collection GroupA_01 | Collection 01 | group | GroupA | Page GroupA_02, Page GroupA_03 |
Scenario: Group admin pushes a Group page and collection to existing group members (Bug 1763163)
# Log in as GroupA admin (UserA)
Given I log in as "UserA" with password "Kupuh1pa!"
# Verifying log in was successful
And I should see "Angela"
# Browse to the Share > Advanced options
When I choose "My groups" in "Groups" from main menu
And I click on "GroupA"
And I follow "Share (tab)"
And I click on "Edit access" in "Collection GroupA_01" row
And I click on "Advanced options"
# verify field lalel is displayed on page
Then I should see "Copy for existing group members"
# enable the "Copy for existing group members" toggle
And I enable the switch "Copy for existing group members"
And I click on "Save"
And I follow "Pages"
And I click on "Edit access" in "Page GroupA_01" row
And I follow "Advanced options"
# verify field lalel is displayed on page
Then I should see "Copy for existing group members"
# enable the "Copy for existing group members" toggle
And I enable the switch "Copy for existing group members"
And I click on "Save"
And I log out
# Group members (UserB) should have their Protfolios updated
Given I log in as "UserB" with password "Kupuh1pa!"
And I choose "Pages and collections" in "Portfolio" from main menu
# verify a group member has their Pportfolio updated with the Group pages
Then I should see "Page GroupA_01"
And I should see "Collection GroupA_01"
And I log out
# Non group members (UserC) should not have their Protfolios updated
Given I log in as "UserC" with password "Kupuh1pa!"
And I choose "Pages and collections" in "Portfolio"...