AutorÃa | Ultima modificación | Ver Log |
@core @core_courseFeature: Browse course list and return back from enrolment pageIn order to navigate between course list consistentlyAs a userI need to be able to return back from enrolment pageBackground:Given the following "users" exist:| username | firstname | lastname | email || user1 | User | 1 | user1@example.com || user2 | User | 2 | user2@example.com |And the following "categories" exist:| name | category | idnumber || Sample category | 0 | CAT1 |And the following "courses" exist:| fullname | shortname | category || Sample course | C1 | 0 || Course 1 | COURSE1 | CAT1 |Scenario: A user can return to the category page from enrolment pageWhen I log in as "user2"And I am on course indexAnd I follow "Category 1"And I follow "Sample course"And I press "Continue"Then I should see "Courses" in the ".breadcrumb" "css_element"And I click on "Courses" "link" in the ".breadcrumb" "css_element"And I follow "Sample category"And I am on "Course 1" course homepageAnd I press "Continue"And I should see "Sample category" in the ".breadcrumb" "css_element"@javascriptScenario: A user can return to the previous page from enrolment page by clicking navigation linksGiven I log in as "admin"And I am on site homepageAnd I turn editing mode onAnd the following config values are set as admin:| unaddableblocks | | theme_boost|And I add the "Navigation" block if not presentAnd I configure the "Navigation" blockAnd I set the following fields to these values:| Page contexts | Display throughout the entire site |And I press "Save changes"And I log outWhen I log in as "user2"And I change window size to "large"And I open my profile in edit modeAnd I expand "Courses" nodeAnd I expand "Sample category" nodeAnd I follow "Course 1"And I press "Continue"Then I should see "Edit profile" in the ".breadcrumb" "css_element"Scenario: User can return to the choice activity from enrolment pageGiven the following "roles" exist:| name | shortname | description | archetype || Non-enrolled | custom1 | My custom role 1 | user |And the following "role assigns" exist:| user | role | contextlevel | reference || user1 | custom1 | Course | C1 |And the following "activities" exist:| activity | name | intro | course | idnumber || choice | Test choice | Test choice description | C1 | choice1 |And the following "role capability" exists:| role | custom1 || moodle/course:view | allow |When I log in as "user1"And I am on course indexAnd I follow "Category 1"And I follow "Sample course"And I follow "Test choice"And I should see "Sorry, only enrolled users are allowed to make choices."And I press "Enrol me in this course"And I press "Continue"Then I should see "Test choice" in the ".breadcrumb" "css_element"