AutorÃa | Ultima modificación | Ver Log |
@block @block_course_listFeature: Enable the course_list block on the dashboard and view it's contentsIn order to enable the course list block on the dashboardAs a userI can add the course list block to the dashboardBackground:Given the following "categories" exist:| name | category | idnumber || Category A | 0 | CATA || Category B | 0 | CATB || Category C | CATB | CATC |And the following "courses" exist:| fullname | shortname | category || Course 1 | C1 | 0 || Course 2 | C2 | CATA || Course 3 | C3 | CATB || Course 4 | C4 | CATC |And the following "users" exist:| username | firstname | lastname | email || teacher1 | Teacher | First | teacher1@example.com |And the following "course enrolments" exist:| user | course | role || teacher1 | C1 | editingteacher || teacher1 | C2 | editingteacher || teacher1 | C3 | editingteacher |Scenario: Add the course list block on the dashboard and navigate to the course listingGiven I log in as "teacher1"And I turn editing mode onAnd the following config values are set as admin:| unaddableblocks | | theme_boost|When I add the "Courses" blockThen I should see "Course 1" in the "My courses" "block"And I should see "Course 2" in the "My courses" "block"And I should see "Course 3" in the "My courses" "block"And I should not see "Course 4" in the "My courses" "block"And I follow "All courses"And I should see "Category 1"Scenario: Add the course list block on the dashboard and navigate to another courseGiven I log in as "teacher1"And I turn editing mode onAnd the following config values are set as admin:| unaddableblocks | | theme_boost|When I add the "Courses" blockThen I should see "Course 1" in the "My courses" "block"And I should see "Course 2" in the "My courses" "block"And I should see "Course 3" in the "My courses" "block"And I should not see "Course 4" in the "My courses" "block"And I am on "Course 3" course homepageAnd I should see "Course 3"Scenario: Add the course list block on the dashboard and view as an adminGiven I log in as "admin"And I turn editing mode onAnd the following config values are set as admin:| unaddableblocks | | theme_boost|When I add the "Courses" blockThen I should see "Category 1" in the "Course categories" "block"And I should see "Category A" in the "Course categories" "block"And I should see "Category B" in the "Course categories" "block"And I should not see "Category C" in the "Course categories" "block"And I should not see "Course 1" in the "Course categories" "block"And I should not see "Course 2" in the "Course categories" "block"And I follow "All courses"And I should see "Category 1"