← Back to team overview

mahara-contributors team mailing list archive

[Bug 1783425] Re: Behat: Update existing behat script to include tests from Bug# 1763163

 

@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! | UserA@xxxxxxxxxxx | Angela | User | instone | internal | staff |
     | UserB | Kupuh1pa! | UserB@xxxxxxxxxxx | Bob | User | instone | internal | member |
	 | UserC | Kupuh1pa! | UserC@xxxxxxxxxxx | 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" from main menu
	# verify a group member has their Pportfolio updated with the Group pages
	Then I should not see "Page GroupA_01"
	And I should not see "Collection GroupA_01"

-- 
You received this bug notification because you are a member of Mahara
Contributors, which is subscribed to Mahara.
Matching subscriptions: Subscription for all Mahara Contributors -- please ask on #mahara-dev or mahara.org forum before editing or unsubscribing it!
https://bugs.launchpad.net/bugs/1783425

Title:
  Behat: Update existing behat script to include tests from Bug# 1763163

Status in Mahara:
  New

Bug description:
  1. Create behat script for testing group admins pushing group
  portfolios to group members

  Feature file to update: group_test.feature
  Related to: https://bugs.launchpad.net/mahara/+bug/1763163

To manage notifications about this bug go to:
https://bugs.launchpad.net/mahara/+bug/1783425/+subscriptions


References