AutorÃa | Ultima modificación | Ver Log |
@mod @mod_unilabelFeature: Show teachers and users the unilabel on the course pageIn order to edit the unilabel contentAs a teacherI need to see the button "Edit content"As a studentI do not see the button "Edit content"Background:Given the following "users" exist:| username | firstname | lastname || teacher1 | Teacher | 1 || student1 | Student | 1 |And the following "courses" exist:| fullname | shortname || Course 1 | C1 |And the following "course enrolments" exist:| user | course | role || teacher1 | C1 | editingteacher || student1 | C1 | student |@javascriptScenario: See the "Edit content" button as teacher# Set up a unilabel.When I log in as "teacher1"And I am on "Course 1" course homepage with editing mode onAnd I add a unilabel to course "Course 1" section "1" and I fill the form with:| Name | Testlabel1 || Unilabel text | Hello label || Label type | Simple text |# Should See the unilabel and the buttonThen I should see "Hello label"And I should see "Edit content"@javascriptScenario: Do not see the "Edit content" button as studentWhen I log in as "teacher1"And I am on "Course 1" course homepage with editing mode onAnd I add a unilabel to course "Course 1" section "1" and I fill the form with:| Name | Testlabel1 || Unilabel text | Hello label || Label type | Simple text |And I log outAnd I log in as "student1"And I am on "Course 1" course homepage# Should See the unilabel and the buttonThen I should see "Hello label"And I should not see "Edit content"