Línea 1... |
Línea 1... |
1 |
@block @block_myoverview @javascript
|
1 |
@block @block_myoverview
|
2 |
Feature: Zero state on my overview block
|
2 |
Feature: Zero state on my overview block
|
3 |
In order to know what should be the next step
|
3 |
In order to know what should be the next step
|
4 |
As a user
|
4 |
As a user
|
5 |
I should see the proper information based on my capabilities
|
5 |
I should see the proper information based on my capabilities
|
Línea 13... |
Línea 13... |
13 |
| user | role | contextlevel | reference |
|
13 |
| user | role | contextlevel | reference |
|
14 |
| manager | manager | System | |
|
14 |
| manager | manager | System | |
|
Línea 15... |
Línea 15... |
15 |
|
15 |
|
16 |
Scenario: Users with no permissions don't see any CTA
|
16 |
Scenario: Users with no permissions don't see any CTA
|
17 |
Given I am on the "My courses" page logged in as "user"
|
17 |
Given I am on the "My courses" page logged in as "user"
|
18 |
When I should see "You're not enrolled in any course"
|
18 |
When I should see "You're not enrolled in any courses."
|
19 |
Then I should see "Once you're enrolled in a course, it will appear here."
|
19 |
Then I should see "Once you're enrolled in a course, it will appear here."
|
20 |
And I should not see "Create course"
|
20 |
And I should not see "Create course"
|
Línea 21... |
Línea 21... |
21 |
And I should not see "Request a course"
|
21 |
And I should not see "Request a course"
|
Línea 29... |
Línea 29... |
29 |
And "Moodle documentation" "link" should exist
|
29 |
And "Moodle documentation" "link" should exist
|
30 |
And "Quickstart guide" "link" should exist
|
30 |
And "Quickstart guide" "link" should exist
|
31 |
And "Request a course" "button" should exist
|
31 |
And "Request a course" "button" should exist
|
32 |
And I click on "Request a course" "button"
|
32 |
And I click on "Request a course" "button"
|
33 |
And I should see "Details of the course"
|
33 |
And I should see "Details of the course"
|
- |
|
34 |
# Quickstart guide link should not be displayed when $CFG->coursecreationguide is empty.
|
- |
|
35 |
But the following config values are set as admin:
|
- |
|
36 |
| coursecreationguide | |
|
- |
|
37 |
And I am on the "My courses" page
|
- |
|
38 |
And "Moodle documentation" "link" should exist
|
- |
|
39 |
And "Quickstart guide" "link" should not exist
|
Línea 34... |
Línea 40... |
34 |
|
40 |
|
35 |
Scenario: Users with permissions to create a course when there is no course created
|
41 |
Scenario: Users with permissions to create a course when there is no course created
|
36 |
Given I am on the "My courses" page logged in as "manager"
|
42 |
Given I am on the "My courses" page logged in as "manager"
|
37 |
When I should see "Create your first course"
|
43 |
When I should see "Create your first course"
|
38 |
Then "Moodle documentation" "link" should exist
|
44 |
Then "Moodle documentation" "link" should exist
|
- |
|
45 |
And "Quickstart guide" "link" should exist
|
- |
|
46 |
And "Manage courses" "button" should not exist
|
39 |
And "View Quickstart guide" "button" should exist
|
47 |
And "Manage course categories" "button" should exist
|
40 |
And "Create course" "button" should exist
|
48 |
And "Create course" "button" should exist
|
41 |
And I click on "Create course" "button"
|
49 |
And I click on "Create course" "button"
|
- |
|
50 |
And I should see "Add a new course"
|
- |
|
51 |
# Quickstart guide link should not be displayed when $CFG->coursecreationguide is empty.
|
- |
|
52 |
But the following config values are set as admin:
|
- |
|
53 |
| coursecreationguide | |
|
- |
|
54 |
And I am on the "My courses" page
|
- |
|
55 |
And "Moodle documentation" "link" should exist
|
Línea 42... |
Línea 56... |
42 |
And I should see "Add a new course"
|
56 |
And "Quickstart guide" "link" should not exist
|
43 |
|
57 |
|
44 |
Scenario: Users with permissions to create a course but is not enrolled in any existing course
|
58 |
Scenario: Users with permissions to create a course but is not enrolled in any existing course
|
45 |
Given the following "course" exists:
|
59 |
Given the following "course" exists:
|
46 |
| fullname | Course 1 |
|
60 |
| fullname | Course 1 |
|
47 |
| shortname | C1 |
|
61 |
| shortname | C1 |
|
48 |
When I am on the "My courses" page logged in as "manager"
|
62 |
When I am on the "My courses" page logged in as "manager"
|
49 |
Then I should see "You're not enrolled in any course"
|
63 |
Then I should see "You're not enrolled in any courses."
|
50 |
Then I should see "Once you're enrolled in a course, it will appear here."
|
64 |
Then I should see "Once you're enrolled in a course, it will appear here."
|
51 |
And "Manage courses" "button" should exist
|
65 |
And "Manage courses" "button" should exist
|
52 |
And "Create course" "button" should exist
|
66 |
And "Create course" "button" should exist
|
Línea 62... |
Línea 76... |
62 |
| moodle/category:manage | Prohibit | manager | System | |
|
76 |
| moodle/category:manage | Prohibit | manager | System | |
|
63 |
And the following "course" exists:
|
77 |
And the following "course" exists:
|
64 |
| fullname | Course 1 |
|
78 |
| fullname | Course 1 |
|
65 |
| shortname | C1 |
|
79 |
| shortname | C1 |
|
66 |
When I am on the "My courses" page logged in as "manager"
|
80 |
When I am on the "My courses" page logged in as "manager"
|
67 |
Then I should see "You're not enrolled in any course"
|
81 |
Then I should see "You're not enrolled in any courses."
|
68 |
Then I should not see "To view all courses on this sie, go to Manage courses"
|
82 |
Then I should not see "To view all courses on this sie, go to Manage courses"
|
69 |
And "Manage courses" "button" should not exist
|
83 |
And "Manage courses" "button" should not exist
|
70 |
And "Create course" "button" should exist
|
84 |
And "Create course" "button" should exist
|
71 |
And I click on "Create course" "button"
|
85 |
And I click on "Create course" "button"
|
72 |
And I should see "Add a new course"
|
86 |
And I should see "Add a new course"
|
Línea 73... |
Línea 87... |
73 |
|
87 |
|
74 |
@accessibility
|
88 |
@javascript @accessibility
|
75 |
Scenario: Evaluate the accessibility of the My courses (zero state)
|
89 |
Scenario: Evaluate the accessibility of the My courses (zero state)
|
76 |
When I am on the "My courses" page logged in as "manager"
|
90 |
When I am on the "My courses" page logged in as "manager"
|