AutorÃa | Ultima modificación | Ver Log |
@mod @mod_labelFeature: Check label visibility worksIn order to check label visibility worksAs a teacherI should create label activityBackground:Given the following "courses" exist:| fullname | shortname | category || Test | C1 | 0 |And the following "users" exist:| username | firstname | lastname | email || teacher | Teacher | First | teacher1@example.com || student | Student | First | student1@example.com |And the following "course enrolments" exist:| user | course | role || teacher | C1 | editingteacher || student | C1 | student |And the following "activities" exist:| activity | course | section | intro | idnumber | visible || label | C1 | 1 | Swanky label | 1 | 1 || label | C1 | 1 | Swanky label 2 | 2 | 0 |Scenario: Hidden label activity should be show as hidden.Given I log in as "teacher"When I am on "Test" course homepage with editing mode onThen "Swanky label 2" label should be hiddenAnd I turn editing mode offAnd "Swanky label 2" label should be hiddenAnd I log outAnd I log in as "student"And I am on "Test" course homepageAnd I should not see "Swanky label 2"And I log outScenario: Visible label activity should be shown as visible.Given I log in as "teacher"When I am on "Test" course homepage with editing mode onThen "Swanky label" activity should be visibleAnd I log outAnd I log in as "student"And I am on "Test" course homepageAnd "Swanky label" activity should be visibleAnd I log out@javascriptScenario: Teacher can not show label inside the hidden sectionGiven I log in as "teacher"And I am on "Test" course homepage with editing mode onWhen I hide section "1"Then "Swanky label" label should be hiddenAnd I open "Swanky label" actions menuAnd "Swanky label" actions menu should not have "Availability" itemAnd I click on "Edit settings" "link" in the "Swanky label" activityAnd I expand all fieldsetsAnd the "Availability" select box should contain "Hide on course page"And the "Availability" select box should not contain "Make available but don't show on course page"And the "Availability" select box should not contain "Show on course page"And I log outAnd I log in as "student"And I am on "Test" course homepageAnd I should not see "Swanky label"And I log out