MDL-68483 contentbank: improve search API
[moodle.git] / contentbank / tests / behat / access_permissions.feature
CommitLineData
bd4e0a76
AA
1@core @core_contentbank
2Feature: Access permission to content Bank
3 In order to control access to content bank
4 As an admin
5 I need to be able to configure users' permissions
6
7 Background:
8 Given the following "users" exist:
9 | username | firstname | lastname | email |
10 | teacher1 | Teacher | 1 | user1@example.com |
11 And the following "courses" exist:
12 | fullname | shortname | category |
13 | Course 1 | C1 | 0 |
14 And the following "course enrolments" exist:
15 | user | course | role |
16 | teacher1 | C1 | editingteacher |
17
18 Scenario: Admins access content bank
19 Given I log in as "admin"
20 Then "Content bank" "link" should exist
21
22 Scenario: Editing teachers can access content bank at course level
23 Given I log in as "teacher1"
24 And I am on "Course 1" course homepage with editing mode on
25 Then "Content bank" "link" should exist
26
27 Scenario: Editing teachers can't access content bank at system level
28 Given I log in as "teacher1"
7afd16ad 29 Then "Content bank" "link" should not exist