Rev 1 | Ir a la última revisión | Autoría | Comparar con el anterior | Ultima modificación | Ver Log |
@block @block_myoverviewFeature: Zero state on my overview blockIn order to know what should be the next stepAs a userI should see the proper information based on my capabilitiesBackground:Given the following "users" exist:| username | firstname | lastname | email | idnumber || user | User | X | user@example.com | U1 || manager | Manager | X | manager@example.com | M1 |And the following "role assigns" exist:| user | role | contextlevel | reference || manager | manager | System | |Scenario: Users with no permissions don't see any CTAGiven I am on the "My courses" page logged in as "user"When I should see "You're not enrolled in any courses."Then I should see "Once you're enrolled in a course, it will appear here."And I should not see "Create course"And I should not see "Request a course"Scenario: Users with permissions to request a course should see a Request course buttonGiven the following "permission overrides" exist:| capability | permission | role | contextlevel | reference || moodle/course:request | Allow | user | System | |When I am on the "My courses" page logged in as "user"Then I should see "Request your first course"And "Moodle documentation" "link" should existAnd "Quickstart guide" "link" should existAnd "Request a course" "button" should existAnd I click on "Request a course" "button"And I should see "Details of the course"# Quickstart guide link should not be displayed when $CFG->coursecreationguide is empty.But the following config values are set as admin:| coursecreationguide | |And I am on the "My courses" pageAnd "Moodle documentation" "link" should existAnd "Quickstart guide" "link" should not existScenario: Users with permissions to create a course when there is no course createdGiven I am on the "My courses" page logged in as "manager"When I should see "Create your first course"Then "Moodle documentation" "link" should existAnd "Quickstart guide" "link" should existAnd "Manage courses" "button" should not existAnd "Manage course categories" "button" should existAnd "Create course" "button" should existAnd I click on "Create course" "button"And I should see "Add a new course"# Quickstart guide link should not be displayed when $CFG->coursecreationguide is empty.But the following config values are set as admin:| coursecreationguide | |And I am on the "My courses" pageAnd "Moodle documentation" "link" should existAnd "Quickstart guide" "link" should not existScenario: Users with permissions to create a course but is not enrolled in any existing courseGiven the following "course" exists:| fullname | Course 1 || shortname | C1 |When I am on the "My courses" page logged in as "manager"Then I should see "You're not enrolled in any courses."Then I should see "Once you're enrolled in a course, it will appear here."And "Manage courses" "button" should existAnd "Create course" "button" should existAnd I click on "Create course" "button"And I should see "Add a new course"And I am on the "My courses" pageAnd I click on "Manage courses" "button"And I should see "Course 1"Scenario: Users with permissions to create but not to manage courses and is not enrolled in any existing courseGiven the following "permission overrides" exist:| capability | permission | role | contextlevel | reference || moodle/category:manage | Prohibit | manager | System | |And the following "course" exists:| fullname | Course 1 || shortname | C1 |When I am on the "My courses" page logged in as "manager"Then I should see "You're not enrolled in any courses."Then I should not see "To view all courses on this sie, go to Manage courses"And "Manage courses" "button" should not existAnd "Create course" "button" should existAnd I click on "Create course" "button"And I should see "Add a new course"@javascript @accessibilityScenario: Evaluate the accessibility of the My courses (zero state)When I am on the "My courses" page logged in as "manager"Then the page should meet accessibility standards