Merge branch 'MDL-64094' of https://github.com/NeillM/moodle
This commit is contained in:
@@ -23,11 +23,11 @@
|
||||
*/
|
||||
|
||||
$string['allincludinghidden'] = 'All';
|
||||
$string['all'] = 'All (except hidden)';
|
||||
$string['all'] = 'All (except removed from view)';
|
||||
$string['addtofavourites'] = 'Star this course';
|
||||
$string['aria:addtofavourites'] = 'Star for';
|
||||
$string['aria:allcoursesincludinghidden'] = 'All courses';
|
||||
$string['aria:allcourses'] = 'All courses except hidden courses';
|
||||
$string['aria:allcoursesincludinghidden'] = 'Show all courses';
|
||||
$string['aria:allcourses'] = 'Show all courses except courses removed from view';
|
||||
$string['aria:card'] = 'Switch to card view';
|
||||
$string['aria:controls'] = 'Course overview controls';
|
||||
$string['aria:courseactions'] = 'Actions for current course';
|
||||
@@ -70,13 +70,13 @@ $string['privacy:metadata:overviewpagingpreference'] = 'The Course overview bloc
|
||||
$string['removefromfavourites'] = 'Unstar this course';
|
||||
$string['summary'] = 'Summary';
|
||||
$string['title'] = 'Course name';
|
||||
$string['aria:hidecourse'] = 'Hide {$a} from view';
|
||||
$string['aria:showcourse'] = 'Show {$a} in view';
|
||||
$string['aria:hiddencourses'] = 'Show hidden courses';
|
||||
$string['hidden'] = 'Hidden courses';
|
||||
$string['hidecourse'] = 'Hide from view';
|
||||
$string['hiddencourses'] = 'Hidden';
|
||||
$string['show'] = 'Show this course';
|
||||
$string['aria:hidecourse'] = 'Remove {$a} from view';
|
||||
$string['aria:showcourse'] = 'Restore {$a} to view';
|
||||
$string['aria:hiddencourses'] = 'Show courses removed from view';
|
||||
$string['hidden'] = 'Courses removed from view';
|
||||
$string['hidecourse'] = 'Remove from view';
|
||||
$string['hiddencourses'] = 'Removed from view';
|
||||
$string['show'] = 'Restore to view';
|
||||
$string['privacy:request:preference:set'] = 'The value of the setting \'{$a->name}\' was \'{$a->value}\'';
|
||||
|
||||
// Deprecated since Moodle 3.6.
|
||||
|
||||
@@ -33,10 +33,9 @@ Feature: The my overview block allows admins to easily configure the students' c
|
||||
And I press "Save"
|
||||
And I log out
|
||||
Then I log in as "student1"
|
||||
And I click on "All (except hidden)" "button" in the "Course overview" "block"
|
||||
# We have to check for the data attribute instead of the list element text as we would get false positives from the "All (except hidden)" element otherwise
|
||||
And I click on "All (except removed from view)" "button" in the "Course overview" "block"
|
||||
# We have to check for the data attribute instead of the list element text as we would get false positives from the "All (except removed from view)" element otherwise
|
||||
Then "[data-value='allincludinghidden']" "css_element" should exist in the ".block_myoverview .dropdown-menu" "css_element"
|
||||
And I log out
|
||||
|
||||
Scenario: Disable 'All' course filter option
|
||||
Given I log in as "admin"
|
||||
@@ -45,33 +44,30 @@ Feature: The my overview block allows admins to easily configure the students' c
|
||||
And I press "Save"
|
||||
And I log out
|
||||
Then I log in as "student1"
|
||||
And I click on "All (except hidden)" "button" in the "Course overview" "block"
|
||||
# We have to check for the data attribute instead of the list element text as we would get false negatives "All (except hidden)" element otherwise
|
||||
And I click on "All (except removed from view)" "button" in the "Course overview" "block"
|
||||
# We have to check for the data attribute instead of the list element text as we would get false negatives "All (except removed from view)" element otherwise
|
||||
Then "[data-value='allincludinghidden']" "css_element" should not exist in the ".block_myoverview .dropdown-menu" "css_element"
|
||||
And I log out
|
||||
|
||||
Scenario: Enable 'All (except hidden)' course filter option
|
||||
Scenario: Enable 'All (except removed from view)' course filter option
|
||||
Given I log in as "admin"
|
||||
And I navigate to "Plugins > Blocks > Course overview" in site administration
|
||||
And I set the field "All (except hidden)" to "1"
|
||||
And I set the field "All (except removed from view)" to "1"
|
||||
And I press "Save"
|
||||
And I log out
|
||||
Then I log in as "student1"
|
||||
And I click on "All (except hidden)" "button" in the "Course overview" "block"
|
||||
Then "All (except hidden)" "list_item" should exist in the ".block_myoverview .dropdown-menu" "css_element"
|
||||
And I log out
|
||||
And I click on "All (except removed from view)" "button" in the "Course overview" "block"
|
||||
Then "All (except removed from view)" "list_item" should exist in the ".block_myoverview .dropdown-menu" "css_element"
|
||||
|
||||
Scenario: Disable 'All (except hidden)' course filter option
|
||||
Scenario: Disable 'All (except removed from view)' course filter option
|
||||
Given I log in as "admin"
|
||||
And I navigate to "Plugins > Blocks > Course overview" in site administration
|
||||
And I set the field "All (except hidden)" to "0"
|
||||
And I set the field "All (except removed from view)" to "0"
|
||||
And I press "Save"
|
||||
And I log out
|
||||
Then I log in as "student1"
|
||||
# 'All (except hidden)' option has been disabled, so the button is falling back to the 'In progress' option which is the next enabled option.
|
||||
# 'All (except removed from view)' option has been disabled, so the button is falling back to the 'In progress' option which is the next enabled option.
|
||||
And I click on "In progress" "button" in the "Course overview" "block"
|
||||
Then "All (except hidden)" "list_item" should not exist in the ".block_myoverview .dropdown-menu" "css_element"
|
||||
And I log out
|
||||
Then "All (except removed from view)" "list_item" should not exist in the ".block_myoverview .dropdown-menu" "css_element"
|
||||
|
||||
Scenario: Enable 'In progress' course filter option
|
||||
Given I log in as "admin"
|
||||
@@ -80,9 +76,8 @@ Feature: The my overview block allows admins to easily configure the students' c
|
||||
And I press "Save"
|
||||
And I log out
|
||||
Then I log in as "student1"
|
||||
And I click on "All (except hidden)" "button" in the "Course overview" "block"
|
||||
And I click on "All (except removed from view)" "button" in the "Course overview" "block"
|
||||
Then "In progress" "list_item" should exist in the ".block_myoverview .dropdown-menu" "css_element"
|
||||
And I log out
|
||||
|
||||
Scenario: Disable 'In progress' course filter option
|
||||
Given I log in as "admin"
|
||||
@@ -91,9 +86,8 @@ Feature: The my overview block allows admins to easily configure the students' c
|
||||
And I press "Save"
|
||||
And I log out
|
||||
Then I log in as "student1"
|
||||
And I click on "All (except hidden)" "button" in the "Course overview" "block"
|
||||
And I click on "All (except removed from view)" "button" in the "Course overview" "block"
|
||||
Then "In progress" "list_item" should not exist in the ".block_myoverview .dropdown-menu" "css_element"
|
||||
And I log out
|
||||
|
||||
Scenario: Enable 'Future' course filter option
|
||||
Given I log in as "admin"
|
||||
@@ -102,9 +96,8 @@ Feature: The my overview block allows admins to easily configure the students' c
|
||||
And I press "Save"
|
||||
And I log out
|
||||
Then I log in as "student1"
|
||||
And I click on "All (except hidden)" "button" in the "Course overview" "block"
|
||||
And I click on "All (except removed from view)" "button" in the "Course overview" "block"
|
||||
Then "Future" "list_item" should exist in the ".block_myoverview .dropdown-menu" "css_element"
|
||||
And I log out
|
||||
|
||||
Scenario: Disable 'Future' course filter option
|
||||
Given I log in as "admin"
|
||||
@@ -113,9 +106,8 @@ Feature: The my overview block allows admins to easily configure the students' c
|
||||
And I press "Save"
|
||||
And I log out
|
||||
Then I log in as "student1"
|
||||
And I click on "All (except hidden)" "button" in the "Course overview" "block"
|
||||
And I click on "All (except removed from view)" "button" in the "Course overview" "block"
|
||||
Then "Future" "list_item" should not exist in the ".block_myoverview .dropdown-menu" "css_element"
|
||||
And I log out
|
||||
|
||||
Scenario: Enable 'Past' course filter option
|
||||
Given I log in as "admin"
|
||||
@@ -124,9 +116,8 @@ Feature: The my overview block allows admins to easily configure the students' c
|
||||
And I press "Save"
|
||||
And I log out
|
||||
Then I log in as "student1"
|
||||
And I click on "All (except hidden)" "button" in the "Course overview" "block"
|
||||
And I click on "All (except removed from view)" "button" in the "Course overview" "block"
|
||||
Then "Past" "list_item" should exist in the ".block_myoverview .dropdown-menu" "css_element"
|
||||
And I log out
|
||||
|
||||
Scenario: Disable 'Past' course filter option
|
||||
Given I log in as "admin"
|
||||
@@ -135,9 +126,8 @@ Feature: The my overview block allows admins to easily configure the students' c
|
||||
And I press "Save"
|
||||
And I log out
|
||||
Then I log in as "student1"
|
||||
And I click on "All (except hidden)" "button" in the "Course overview" "block"
|
||||
And I click on "All (except removed from view)" "button" in the "Course overview" "block"
|
||||
Then "Past" "list_item" should not exist in the ".block_myoverview .dropdown-menu" "css_element"
|
||||
And I log out
|
||||
|
||||
Scenario: Enable 'Starred' course filter option
|
||||
Given I log in as "admin"
|
||||
@@ -146,9 +136,8 @@ Feature: The my overview block allows admins to easily configure the students' c
|
||||
And I press "Save"
|
||||
And I log out
|
||||
Then I log in as "student1"
|
||||
And I click on "All (except hidden)" "button" in the "Course overview" "block"
|
||||
And I click on "All (except removed from view)" "button" in the "Course overview" "block"
|
||||
Then "Starred" "list_item" should exist in the ".block_myoverview .dropdown-menu" "css_element"
|
||||
And I log out
|
||||
|
||||
Scenario: Disable 'Starred' course filter option
|
||||
Given I log in as "admin"
|
||||
@@ -157,42 +146,39 @@ Feature: The my overview block allows admins to easily configure the students' c
|
||||
And I press "Save"
|
||||
And I log out
|
||||
Then I log in as "student1"
|
||||
And I click on "All (except hidden)" "button" in the "Course overview" "block"
|
||||
And I click on "All (except removed from view)" "button" in the "Course overview" "block"
|
||||
Then "Starred" "list_item" should not exist in the ".block_myoverview .dropdown-menu" "css_element"
|
||||
And I log out
|
||||
|
||||
Scenario: Enable 'Hidden' course filter option
|
||||
Scenario: Enable 'Removed courses' course filter option
|
||||
Given I log in as "admin"
|
||||
And I navigate to "Plugins > Blocks > Course overview" in site administration
|
||||
And I set the field "Hidden" to "1"
|
||||
And I set the field "Removed from view" to "1"
|
||||
And I press "Save"
|
||||
And I log out
|
||||
Then I log in as "student1"
|
||||
And I click on "All (except hidden)" "button" in the "Course overview" "block"
|
||||
Then "Hidden" "list_item" should exist in the ".block_myoverview .dropdown-menu" "css_element"
|
||||
And I log out
|
||||
And I click on "All (except removed from view)" "button" in the "Course overview" "block"
|
||||
Then "Removed from view" "list_item" should exist in the ".block_myoverview .dropdown-menu" "css_element"
|
||||
|
||||
Scenario: Disable 'Hidden' course filter option
|
||||
Scenario: Disable 'Removed courses' course filter option
|
||||
Given I log in as "admin"
|
||||
And I navigate to "Plugins > Blocks > Course overview" in site administration
|
||||
And I set the field "Hidden" to "0"
|
||||
And I set the field "Removed from view" to "0"
|
||||
And I press "Save"
|
||||
And I log out
|
||||
Then I log in as "student1"
|
||||
And I click on "All (except hidden)" "button" in the "Course overview" "block"
|
||||
Then "Hidden" "list_item" should not exist in the ".block_myoverview .dropdown-menu" "css_element"
|
||||
And I log out
|
||||
And I click on "All (except removed from view)" "button" in the "Course overview" "block"
|
||||
Then "Removed from view" "list_item" should not exist in the ".block_myoverview .dropdown-menu" "css_element"
|
||||
|
||||
Scenario: Disable all course filter options
|
||||
Given I log in as "admin"
|
||||
And I navigate to "Plugins > Blocks > Course overview" in site administration
|
||||
And I set the field "All" to "0"
|
||||
And I set the field "All (except hidden)" to "0"
|
||||
And I set the field "All (except removed from view)" to "0"
|
||||
And I set the field "In progress" to "0"
|
||||
And I set the field "Future" to "0"
|
||||
And I set the field "Past" to "0"
|
||||
And I set the field "Starred" to "0"
|
||||
And I set the field "Hidden" to "0"
|
||||
And I set the field "Removed from view" to "0"
|
||||
And I press "Save"
|
||||
And I log out
|
||||
And I log in as "student1"
|
||||
@@ -202,18 +188,17 @@ Feature: The my overview block allows admins to easily configure the students' c
|
||||
And I should see "Course 3" in the "Course overview" "block"
|
||||
And I should see "Course 4" in the "Course overview" "block"
|
||||
And I should see "Course 5" in the "Course overview" "block"
|
||||
And I log out
|
||||
|
||||
Scenario: Disable all but one course filter option
|
||||
Given I log in as "admin"
|
||||
And I navigate to "Plugins > Blocks > Course overview" in site administration
|
||||
And I set the field "All" to "0"
|
||||
And I set the field "All (except hidden)" to "0"
|
||||
And I set the field "All (except removed from view)" to "0"
|
||||
And I set the field "In progress" to "1"
|
||||
And I set the field "Future" to "0"
|
||||
And I set the field "Past" to "0"
|
||||
And I set the field "Starred" to "0"
|
||||
And I set the field "Hidden" to "0"
|
||||
And I set the field "Removed from view" to "0"
|
||||
And I press "Save"
|
||||
And I log out
|
||||
And I log in as "student1"
|
||||
@@ -223,4 +208,3 @@ Feature: The my overview block allows admins to easily configure the students' c
|
||||
And I should see "Course 4" in the "Course overview" "block"
|
||||
And I should not see "Course 1" in the "Course overview" "block"
|
||||
And I should not see "Course 5" in the "Course overview" "block"
|
||||
And I log out
|
||||
|
||||
@@ -28,66 +28,61 @@ Feature: The my overview block allows users to easily access their courses
|
||||
|
||||
Scenario: View past courses
|
||||
Given I log in as "student1"
|
||||
And I click on "All (except hidden)" "button" in the "Course overview" "block"
|
||||
And I click on "All (except removed from view)" "button" in the "Course overview" "block"
|
||||
When I click on "Past" "link" in the "Course overview" "block"
|
||||
Then I should see "Course 1" in the "Course overview" "block"
|
||||
And I should not see "Course 2" in the "Course overview" "block"
|
||||
And I should not see "Course 3" in the "Course overview" "block"
|
||||
And I should not see "Course 4" in the "Course overview" "block"
|
||||
And I should not see "Course 5" in the "Course overview" "block"
|
||||
And I log out
|
||||
|
||||
Scenario: View future courses
|
||||
Given I log in as "student1"
|
||||
And I click on "All (except hidden)" "button" in the "Course overview" "block"
|
||||
And I click on "All (except removed from view)" "button" in the "Course overview" "block"
|
||||
When I click on "Future" "link" in the "Course overview" "block"
|
||||
Then I should see "Course 5" in the "Course overview" "block"
|
||||
And I should not see "Course 1" in the "Course overview" "block"
|
||||
And I should not see "Course 2" in the "Course overview" "block"
|
||||
And I should not see "Course 3" in the "Course overview" "block"
|
||||
And I should not see "Course 4" in the "Course overview" "block"
|
||||
And I log out
|
||||
|
||||
Scenario: View inprogress courses
|
||||
Given I log in as "student1"
|
||||
And I click on "All (except hidden)" "button" in the "Course overview" "block"
|
||||
And I click on "All (except removed from view)" "button" in the "Course overview" "block"
|
||||
When I click on "In progress" "link" in the "Course overview" "block"
|
||||
Then I should see "Course 2" in the "Course overview" "block"
|
||||
Then I should see "Course 3" in the "Course overview" "block"
|
||||
Then I should see "Course 4" in the "Course overview" "block"
|
||||
And I should not see "Course 1" in the "Course overview" "block"
|
||||
And I should not see "Course 5" in the "Course overview" "block"
|
||||
And I log out
|
||||
|
||||
Scenario: View all (except hidden) courses
|
||||
Scenario: View all (except removed) courses
|
||||
Given I log in as "student1"
|
||||
And I click on "All (except hidden)" "button" in the "Course overview" "block"
|
||||
When I click on "All (except hidden)" "link" in the "Course overview" "block"
|
||||
And I click on "All (except removed from view)" "button" in the "Course overview" "block"
|
||||
When I click on "All (except removed from view)" "link" in the "Course overview" "block"
|
||||
Then I should see "Course 1" in the "Course overview" "block"
|
||||
Then I should see "Course 2" in the "Course overview" "block"
|
||||
Then I should see "Course 3" in the "Course overview" "block"
|
||||
Then I should see "Course 4" in the "Course overview" "block"
|
||||
Then I should see "Course 5" in the "Course overview" "block"
|
||||
And I log out
|
||||
|
||||
Scenario: View all (including hidden) courses
|
||||
Scenario: View all (including removed) courses
|
||||
Given the following config values are set as admin:
|
||||
| config | value | plugin |
|
||||
| displaygroupingallincludinghidden | 1 | block_myoverview |
|
||||
And I log in as "student1"
|
||||
And I click on "All (except hidden)" "button" in the "Course overview" "block"
|
||||
# We have to click on the data attribute instead of the button element text as we might risk to click on the false positive "All (except hidden)" element instead
|
||||
And I click on "All (except removed from view)" "button" in the "Course overview" "block"
|
||||
# We have to click on the data attribute instead of the button element text as we might risk to click on the false positive "All (except removed from view)" element instead
|
||||
When I click on "[data-value='allincludinghidden']" "css_element" in the "Course overview" "block"
|
||||
Then I should see "Course 1" in the "Course overview" "block"
|
||||
Then I should see "Course 2" in the "Course overview" "block"
|
||||
Then I should see "Course 3" in the "Course overview" "block"
|
||||
Then I should see "Course 4" in the "Course overview" "block"
|
||||
Then I should see "Course 5" in the "Course overview" "block"
|
||||
And I log out
|
||||
|
||||
Scenario: View inprogress courses - test persistence
|
||||
Given I log in as "student1"
|
||||
And I click on "All (except hidden)" "button" in the "Course overview" "block"
|
||||
And I click on "All (except removed from view)" "button" in the "Course overview" "block"
|
||||
And I click on "In progress" "link" in the "Course overview" "block"
|
||||
And I reload the page
|
||||
Then I should see "In progress" in the "Course overview" "block"
|
||||
@@ -96,24 +91,22 @@ Feature: The my overview block allows users to easily access their courses
|
||||
Then I should see "Course 4" in the "Course overview" "block"
|
||||
And I should not see "Course 1" in the "Course overview" "block"
|
||||
And I should not see "Course 5" in the "Course overview" "block"
|
||||
And I log out
|
||||
|
||||
Scenario: View all (except hidden) courses - w/ persistence
|
||||
Scenario: View all (except removed) courses - w/ persistence
|
||||
Given I log in as "student1"
|
||||
And I click on "All (except hidden)" "button" in the "Course overview" "block"
|
||||
When I click on "All (except hidden)" "link" in the "Course overview" "block"
|
||||
And I click on "All (except removed from view)" "button" in the "Course overview" "block"
|
||||
When I click on "All (except removed from view)" "link" in the "Course overview" "block"
|
||||
And I reload the page
|
||||
Then I should see "All (except hidden)" in the "Course overview" "block"
|
||||
Then I should see "All (except removed from view)" in the "Course overview" "block"
|
||||
Then I should see "Course 1" in the "Course overview" "block"
|
||||
Then I should see "Course 2" in the "Course overview" "block"
|
||||
Then I should see "Course 3" in the "Course overview" "block"
|
||||
Then I should see "Course 4" in the "Course overview" "block"
|
||||
Then I should see "Course 5" in the "Course overview" "block"
|
||||
And I log out
|
||||
|
||||
Scenario: View past courses - w/ persistence
|
||||
Given I log in as "student1"
|
||||
And I click on "All (except hidden)" "button" in the "Course overview" "block"
|
||||
And I click on "All (except removed from view)" "button" in the "Course overview" "block"
|
||||
When I click on "Past" "link" in the "Course overview" "block"
|
||||
And I reload the page
|
||||
Then I should see "Past" in the "Course overview" "block"
|
||||
@@ -122,11 +115,10 @@ Feature: The my overview block allows users to easily access their courses
|
||||
And I should not see "Course 3" in the "Course overview" "block"
|
||||
And I should not see "Course 4" in the "Course overview" "block"
|
||||
And I should not see "Course 5" in the "Course overview" "block"
|
||||
And I log out
|
||||
|
||||
Scenario: View future courses - w/ persistence
|
||||
Given I log in as "student1"
|
||||
And I click on "All (except hidden)" "button" in the "Course overview" "block"
|
||||
And I click on "All (except removed from view)" "button" in the "Course overview" "block"
|
||||
When I click on "Future" "link" in the "Course overview" "block"
|
||||
And I reload the page
|
||||
Then I should see "Future" in the "Course overview" "block"
|
||||
@@ -135,7 +127,6 @@ Feature: The my overview block allows users to easily access their courses
|
||||
And I should not see "Course 2" in the "Course overview" "block"
|
||||
And I should not see "Course 3" in the "Course overview" "block"
|
||||
And I should not see "Course 4" in the "Course overview" "block"
|
||||
And I log out
|
||||
|
||||
Scenario: List display persistence
|
||||
Given I log in as "student1"
|
||||
@@ -179,77 +170,72 @@ Feature: The my overview block allows users to easily access their courses
|
||||
|
||||
Scenario: View inprogress courses with hide persistent functionality
|
||||
Given I log in as "student1"
|
||||
And I click on "All (except hidden)" "button" in the "Course overview" "block"
|
||||
And I click on "All (except removed from view)" "button" in the "Course overview" "block"
|
||||
When I click on "In progress" "link" in the "Course overview" "block"
|
||||
And I click on ".coursemenubtn" "css_element" in the "//div[@class='card dashboard-card' and contains(.,'Course 2')]" "xpath_element"
|
||||
And I click on "Hide from view" "link" in the "//div[@class='card dashboard-card' and contains(.,'Course 2')]" "xpath_element"
|
||||
And I click on "Remove from view" "link" in the "//div[@class='card dashboard-card' and contains(.,'Course 2')]" "xpath_element"
|
||||
And I reload the page
|
||||
Then I should see "Course 3" in the "Course overview" "block"
|
||||
Then I should see "Course 4" in the "Course overview" "block"
|
||||
And I should not see "Course 2" in the "Course overview" "block"
|
||||
And I should not see "Course 1" in the "Course overview" "block"
|
||||
And I should not see "Course 5" in the "Course overview" "block"
|
||||
And I log out
|
||||
|
||||
Scenario: View past courses with hide persistent functionality
|
||||
Given I log in as "student1"
|
||||
And I click on "All (except hidden)" "button" in the "Course overview" "block"
|
||||
And I click on "All (except removed from view)" "button" in the "Course overview" "block"
|
||||
When I click on "Past" "link" in the "Course overview" "block"
|
||||
And I click on ".coursemenubtn" "css_element" in the "//div[@class='card dashboard-card' and contains(.,'Course 1')]" "xpath_element"
|
||||
And I click on "Hide from view" "link" in the "//div[@class='card dashboard-card' and contains(.,'Course 1')]" "xpath_element"
|
||||
And I click on "Remove from view" "link" in the "//div[@class='card dashboard-card' and contains(.,'Course 1')]" "xpath_element"
|
||||
And I reload the page
|
||||
Then I should not see "Course 1" in the "Course overview" "block"
|
||||
And I should not see "Course 2" in the "Course overview" "block"
|
||||
And I should not see "Course 3" in the "Course overview" "block"
|
||||
And I should not see "Course 4" in the "Course overview" "block"
|
||||
And I should not see "Course 5" in the "Course overview" "block"
|
||||
And I log out
|
||||
|
||||
Scenario: View future courses with hide persistent functionality
|
||||
Given I log in as "student1"
|
||||
And I click on "All (except hidden)" "button" in the "Course overview" "block"
|
||||
And I click on "All (except removed from view)" "button" in the "Course overview" "block"
|
||||
When I click on "Future" "link" in the "Course overview" "block"
|
||||
And I click on ".coursemenubtn" "css_element" in the "//div[@class='card dashboard-card' and contains(.,'Course 5')]" "xpath_element"
|
||||
And I click on "Hide from view" "link" in the "//div[@class='card dashboard-card' and contains(.,'Course 5')]" "xpath_element"
|
||||
And I click on "Remove from view" "link" in the "//div[@class='card dashboard-card' and contains(.,'Course 5')]" "xpath_element"
|
||||
And I reload the page
|
||||
Then I should not see "Course 5" in the "Course overview" "block"
|
||||
And I should not see "Course 1" in the "Course overview" "block"
|
||||
And I should not see "Course 2" in the "Course overview" "block"
|
||||
And I should not see "Course 3" in the "Course overview" "block"
|
||||
And I should not see "Course 4" in the "Course overview" "block"
|
||||
And I log out
|
||||
|
||||
Scenario: View all (except hidden) courses with hide persistent functionality
|
||||
Given I log in as "student1"
|
||||
And I click on "All (except hidden)" "button" in the "Course overview" "block"
|
||||
When I click on "All (except hidden)" "link" in the "Course overview" "block"
|
||||
And I click on "All (except removed from view)" "button" in the "Course overview" "block"
|
||||
When I click on "All (except removed from view)" "link" in the "Course overview" "block"
|
||||
And I click on ".coursemenubtn" "css_element" in the "//div[@class='card dashboard-card' and contains(.,'Course 5')]" "xpath_element"
|
||||
And I click on "Hide from view" "link" in the "//div[@class='card dashboard-card' and contains(.,'Course 5')]" "xpath_element"
|
||||
And I click on "Remove from view" "link" in the "//div[@class='card dashboard-card' and contains(.,'Course 5')]" "xpath_element"
|
||||
And I reload the page
|
||||
Then I should not see "Course 5" in the "Course overview" "block"
|
||||
And I should see "Course 1" in the "Course overview" "block"
|
||||
And I should see "Course 2" in the "Course overview" "block"
|
||||
And I should see "Course 3" in the "Course overview" "block"
|
||||
And I should see "Course 4" in the "Course overview" "block"
|
||||
And I log out
|
||||
|
||||
Scenario: View all (including hidden) courses with hide persistent functionality
|
||||
Scenario: View all (including removed) courses with hide persistent functionality
|
||||
Given the following config values are set as admin:
|
||||
| config | value | plugin |
|
||||
| displaygroupingallincludinghidden | 1 | block_myoverview |
|
||||
And I log in as "student1"
|
||||
And I click on "All (except hidden)" "button" in the "Course overview" "block"
|
||||
# We have to click on the data attribute instead of the button element text as we might risk to click on the false positive "All (except hidden)" element instead
|
||||
And I click on "All (except removed from view)" "button" in the "Course overview" "block"
|
||||
# We have to click on the data attribute instead of the button element text as we might risk to click on the false positive "All (except removed from view)" element instead
|
||||
When I click on "[data-value='allincludinghidden']" "css_element" in the "Course overview" "block"
|
||||
And I click on ".coursemenubtn" "css_element" in the "//div[@class='card dashboard-card' and contains(.,'Course 5')]" "xpath_element"
|
||||
And I click on "Hide from view" "link" in the "//div[@class='card dashboard-card' and contains(.,'Course 5')]" "xpath_element"
|
||||
And I click on "Remove from view" "link" in the "//div[@class='card dashboard-card' and contains(.,'Course 5')]" "xpath_element"
|
||||
And I reload the page
|
||||
Then I should see "Course 5" in the "Course overview" "block"
|
||||
And I should see "Course 1" in the "Course overview" "block"
|
||||
And I should see "Course 2" in the "Course overview" "block"
|
||||
And I should see "Course 3" in the "Course overview" "block"
|
||||
And I should see "Course 4" in the "Course overview" "block"
|
||||
And I log out
|
||||
|
||||
Scenario: Show course category in cards display
|
||||
Given I log in as "student1"
|
||||
|
||||
@@ -32,7 +32,6 @@ Feature: The my overview block allows users to favourite their courses
|
||||
And "//div[@class='card dashboard-card' and contains(.,'Course 2')]//span[@data-region='is-favourite' and @aria-hidden='true']" "xpath_element" should not exist
|
||||
And "//div[@class='card dashboard-card' and contains(.,'Course 1')]//span[@data-region='is-favourite' and @aria-hidden='true']" "xpath_element" should exist
|
||||
And "//div[@class='card dashboard-card' and contains(.,'Course 3')]//span[@data-region='is-favourite' and @aria-hidden='true']" "xpath_element" should exist
|
||||
And I log out
|
||||
|
||||
Scenario: Star a course and switch display to list
|
||||
Given I log in as "student1"
|
||||
@@ -46,7 +45,6 @@ Feature: The my overview block allows users to favourite their courses
|
||||
And "//li[contains(concat(' ', normalize-space(@class), ' '), 'list-group-item') and contains(.,'Course 5')]//span[@data-region='is-favourite' and @aria-hidden='true']" "xpath_element" should not exist
|
||||
And "//li[contains(concat(' ', normalize-space(@class), ' '), 'list-group-item') and contains(.,'Course 1')]//span[@data-region='is-favourite' and @aria-hidden='true']" "xpath_element" should exist
|
||||
And "//li[contains(concat(' ', normalize-space(@class), ' '), 'list-group-item') and contains(.,'Course 3')]//span[@data-region='is-favourite' and @aria-hidden='true']" "xpath_element" should exist
|
||||
And I log out
|
||||
|
||||
Scenario: Star a course and switch display to summary
|
||||
Given I log in as "student1"
|
||||
@@ -60,4 +58,3 @@ Feature: The my overview block allows users to favourite their courses
|
||||
And "//div[contains(concat(' ', normalize-space(@class), ' '), 'course-summaryitem') and contains(.,'Course 5')]//span[@data-region='is-favourite' and @aria-hidden='true']" "xpath_element" should not exist
|
||||
And "//div[contains(concat(' ', normalize-space(@class), ' '), 'course-summaryitem') and contains(.,'Course 1')]//span[@data-region='is-favourite' and @aria-hidden='true']" "xpath_element" should exist
|
||||
And "//div[contains(concat(' ', normalize-space(@class), ' '), 'course-summaryitem') and contains(.,'Course 3')]//span[@data-region='is-favourite' and @aria-hidden='true']" "xpath_element" should exist
|
||||
And I log out
|
||||
|
||||
@@ -25,97 +25,91 @@ Feature: The my overview block allows users to hide their courses
|
||||
|
||||
Scenario: Test hide toggle functionality
|
||||
Given I log in as "student1"
|
||||
And I click on "All (except hidden)" "button" in the "Course overview" "block"
|
||||
When I click on "All (except hidden)" "link" in the "Course overview" "block"
|
||||
And I click on "All (except removed from view)" "button" in the "Course overview" "block"
|
||||
When I click on "All (except removed from view)" "link" in the "Course overview" "block"
|
||||
And I click on ".coursemenubtn" "css_element" in the "//div[@class='card dashboard-card' and contains(.,'Course 2')]" "xpath_element"
|
||||
And I click on "Hide from view" "link" in the "//div[@class='card dashboard-card' and contains(.,'Course 2')]" "xpath_element"
|
||||
And I click on "Remove from view" "link" in the "//div[@class='card dashboard-card' and contains(.,'Course 2')]" "xpath_element"
|
||||
And I reload the page
|
||||
Then I should not see "Course 2" in the "Course overview" "block"
|
||||
And I log out
|
||||
|
||||
Scenario: Test hide toggle functionality w/ favorites
|
||||
Given I log in as "student1"
|
||||
And I click on "All (except hidden)" "button" in the "Course overview" "block"
|
||||
When I click on "All (except hidden)" "link" in the "Course overview" "block"
|
||||
And I click on "All (except removed from view)" "button" in the "Course overview" "block"
|
||||
When I click on "All (except removed from view)" "link" in the "Course overview" "block"
|
||||
And I click on ".coursemenubtn" "css_element" in the "//div[@class='card dashboard-card' and contains(.,'Course 2')]" "xpath_element"
|
||||
And I click on "Star this course" "link" in the "//div[@class='card dashboard-card' and contains(.,'Course 2')]" "xpath_element"
|
||||
And I click on ".coursemenubtn" "css_element" in the "//div[@class='card dashboard-card' and contains(.,'Course 2')]" "xpath_element"
|
||||
And I click on "Hide from view" "link" in the "//div[@class='card dashboard-card' and contains(.,'Course 2')]" "xpath_element"
|
||||
And I click on "Remove from view" "link" in the "//div[@class='card dashboard-card' and contains(.,'Course 2')]" "xpath_element"
|
||||
When I reload the page
|
||||
Then I should not see "Course 2" in the "Course overview" "block"
|
||||
And I click on "All (except hidden)" "button" in the "Course overview" "block"
|
||||
And I click on "All (except removed from view)" "button" in the "Course overview" "block"
|
||||
And I click on "Starred" "link" in the "Course overview" "block"
|
||||
Then I should not see "Course 2" in the "Course overview" "block"
|
||||
And I click on "Starred" "button" in the "Course overview" "block"
|
||||
And I click on "Hidden" "link" in the "Course overview" "block"
|
||||
And I click on "Removed from view" "link" in the "Course overview" "block"
|
||||
Then I should see "Course 2" in the "Course overview" "block"
|
||||
And I log out
|
||||
|
||||
Scenario: Test show toggle functionality
|
||||
Given I log in as "student1"
|
||||
And I click on "All (except hidden)" "button" in the "Course overview" "block"
|
||||
When I click on "All (except hidden)" "link" in the "Course overview" "block"
|
||||
And I click on "All (except removed from view)" "button" in the "Course overview" "block"
|
||||
When I click on "All (except removed from view)" "link" in the "Course overview" "block"
|
||||
And I click on ".coursemenubtn" "css_element" in the "//div[@class='card dashboard-card' and contains(.,'Course 2')]" "xpath_element"
|
||||
And I click on "Hide from view" "link" in the "//div[@class='card dashboard-card' and contains(.,'Course 2')]" "xpath_element"
|
||||
When I click on "All (except hidden)" "button" in the "Course overview" "block"
|
||||
And I click on "Hidden" "link" in the "Course overview" "block"
|
||||
And I click on "Remove from view" "link" in the "//div[@class='card dashboard-card' and contains(.,'Course 2')]" "xpath_element"
|
||||
When I click on "All (except removed from view)" "button" in the "Course overview" "block"
|
||||
And I click on "Removed from view" "link" in the "Course overview" "block"
|
||||
When I click on ".coursemenubtn" "css_element" in the "//div[@class='card dashboard-card' and contains(.,'Course 2')]" "xpath_element"
|
||||
And I click on "Show this course" "link" in the "//div[@class='card dashboard-card' and contains(.,'Course 2')]" "xpath_element"
|
||||
And I click on "Restore to view" "link" in the "//div[@class='card dashboard-card' and contains(.,'Course 2')]" "xpath_element"
|
||||
And I reload the page
|
||||
And I click on "Hidden" "button" in the "Course overview" "block"
|
||||
When I click on "All (except hidden)" "link" in the "Course overview" "block"
|
||||
And I click on "Removed from view" "button" in the "Course overview" "block"
|
||||
When I click on "All (except removed from view)" "link" in the "Course overview" "block"
|
||||
Then I should see "Course 2" in the "Course overview" "block"
|
||||
And I log out
|
||||
|
||||
Scenario: Test show toggle functionality w/ favorites
|
||||
Given I log in as "student1"
|
||||
And I click on "All (except hidden)" "button" in the "Course overview" "block"
|
||||
When I click on "All (except hidden)" "link" in the "Course overview" "block"
|
||||
And I click on "All (except removed from view)" "button" in the "Course overview" "block"
|
||||
When I click on "All (except removed from view)" "link" in the "Course overview" "block"
|
||||
And I click on ".coursemenubtn" "css_element" in the "//div[@class='card dashboard-card' and contains(.,'Course 2')]" "xpath_element"
|
||||
And I click on "Star this course" "link" in the "//div[@class='card dashboard-card' and contains(.,'Course 2')]" "xpath_element"
|
||||
And I click on ".coursemenubtn" "css_element" in the "//div[@class='card dashboard-card' and contains(.,'Course 2')]" "xpath_element"
|
||||
And I click on "Hide from view" "link" in the "//div[@class='card dashboard-card' and contains(.,'Course 2')]" "xpath_element"
|
||||
And I click on "All (except hidden)" "button" in the "Course overview" "block"
|
||||
And I click on "Hidden" "link" in the "Course overview" "block"
|
||||
And I click on "Remove from view" "link" in the "//div[@class='card dashboard-card' and contains(.,'Course 2')]" "xpath_element"
|
||||
And I click on "All (except removed from view)" "button" in the "Course overview" "block"
|
||||
And I click on "Removed from view" "link" in the "Course overview" "block"
|
||||
And I should see "Course 2" in the "Course overview" "block"
|
||||
And I click on ".coursemenubtn" "css_element" in the "//div[@class='card dashboard-card' and contains(.,'Course 2')]" "xpath_element"
|
||||
And I click on "Show this course" "link" in the "//div[@class='card dashboard-card' and contains(.,'Course 2')]" "xpath_element"
|
||||
And I click on "Restore to view" "link" in the "//div[@class='card dashboard-card' and contains(.,'Course 2')]" "xpath_element"
|
||||
When I reload the page
|
||||
Then I should not see "Course 2" in the "Course overview" "block"
|
||||
And I click on "Hidden" "button" in the "Course overview" "block"
|
||||
And I click on "All (except hidden)" "link" in the "Course overview" "block"
|
||||
And I click on "Removed from view" "button" in the "Course overview" "block"
|
||||
And I click on "All (except removed from view)" "link" in the "Course overview" "block"
|
||||
Then I should see "Course 2" in the "Course overview" "block"
|
||||
And I click on "All (except hidden)" "button" in the "Course overview" "block"
|
||||
And I click on "All (except removed from view)" "button" in the "Course overview" "block"
|
||||
And I click on "Starred" "link" in the "Course overview" "block"
|
||||
Then I should see "Course 2" in the "Course overview" "block"
|
||||
And I log out
|
||||
|
||||
Scenario: Test a course is hidden directly with "All (except hidden)" courses
|
||||
Scenario: Test a course is hidden directly with "All (except removed from view)" courses
|
||||
Given I log in as "student1"
|
||||
And I click on "All (except hidden)" "button" in the "Course overview" "block"
|
||||
When I click on "All (except hidden)" "link" in the "Course overview" "block"
|
||||
And I click on "All (except removed from view)" "button" in the "Course overview" "block"
|
||||
When I click on "All (except removed from view)" "link" in the "Course overview" "block"
|
||||
And I click on ".coursemenubtn" "css_element" in the "//div[@class='card dashboard-card' and contains(.,'Course 2')]" "xpath_element"
|
||||
And I click on "Hide from view" "link" in the "//div[@class='card dashboard-card' and contains(.,'Course 2')]" "xpath_element"
|
||||
And I click on "Remove from view" "link" in the "//div[@class='card dashboard-card' and contains(.,'Course 2')]" "xpath_element"
|
||||
Then I should not see "Course 2" in the "Course overview" "block"
|
||||
And I log out
|
||||
|
||||
Scenario: Test a course is never hidden with "All (including hidden)" courses
|
||||
Scenario: Test a course is never hidden with "All (including removed)" courses
|
||||
Given the following config values are set as admin:
|
||||
| config | value | plugin |
|
||||
| displaygroupingallincludinghidden | 1 | block_myoverview |
|
||||
And I log in as "student1"
|
||||
And I click on "All (except hidden)" "button" in the "Course overview" "block"
|
||||
And I click on "All (except removed from view)" "button" in the "Course overview" "block"
|
||||
# We have to click on the data attribute instead of the button element text as we might risk to click on the false positive "All (except hidden)" element instead
|
||||
When I click on "[data-value='allincludinghidden']" "css_element" in the "Course overview" "block"
|
||||
And I click on ".coursemenubtn" "css_element" in the "//div[@class='card dashboard-card' and contains(.,'Course 2')]" "xpath_element"
|
||||
And I click on "Hide from view" "link" in the "//div[@class='card dashboard-card' and contains(.,'Course 2')]" "xpath_element"
|
||||
And I click on "Remove from view" "link" in the "//div[@class='card dashboard-card' and contains(.,'Course 2')]" "xpath_element"
|
||||
Then I should see "Course 2" in the "Course overview" "block"
|
||||
And I click on ".coursemenubtn" "css_element" in the "//div[@class='card dashboard-card' and contains(.,'Course 2')]" "xpath_element"
|
||||
And I should not see "Hide from view" in the "//div[@class='card dashboard-card' and contains(.,'Course 2')]" "xpath_element"
|
||||
And I should see "Show this course" in the "//div[@class='card dashboard-card' and contains(.,'Course 2')]" "xpath_element"
|
||||
And I click on "Show this course" "link" in the "//div[@class='card dashboard-card' and contains(.,'Course 2')]" "xpath_element"
|
||||
And I should not see "Remove from view" in the "//div[@class='card dashboard-card' and contains(.,'Course 2')]" "xpath_element"
|
||||
And I should see "Restore to view" in the "//div[@class='card dashboard-card' and contains(.,'Course 2')]" "xpath_element"
|
||||
And I click on "Restore to view" "link" in the "//div[@class='card dashboard-card' and contains(.,'Course 2')]" "xpath_element"
|
||||
Then I should see "Course 2" in the "Course overview" "block"
|
||||
And I click on ".coursemenubtn" "css_element" in the "//div[@class='card dashboard-card' and contains(.,'Course 2')]" "xpath_element"
|
||||
And I should see "Hide from view" in the "//div[@class='card dashboard-card' and contains(.,'Course 2')]" "xpath_element"
|
||||
And I should not see "Show this course" in the "//div[@class='card dashboard-card' and contains(.,'Course 2')]" "xpath_element"
|
||||
And I log out
|
||||
And I should see "Remove from view" in the "//div[@class='card dashboard-card' and contains(.,'Course 2')]" "xpath_element"
|
||||
And I should not see "Restore to view" in the "//div[@class='card dashboard-card' and contains(.,'Course 2')]" "xpath_element"
|
||||
|
||||
@@ -44,14 +44,12 @@ Feature: The my overview block allows users to persistence of their page limits
|
||||
And I reload the page
|
||||
Then I should see "Course 13"
|
||||
And I should see "All" in the "[data-action='limit-toggle']" "css_element"
|
||||
And I log out
|
||||
|
||||
Scenario: Toggle the page limit between grouping changes
|
||||
Given I log in as "student1"
|
||||
When I click on "[data-toggle='dropdown']" "css_element" in the "Course overview" "block"
|
||||
And I click on "All" "link"
|
||||
And I click on "All (except hidden)" "button" in the "Course overview" "block"
|
||||
And I click on "All (except removed from view)" "button" in the "Course overview" "block"
|
||||
And I click on "In progress" "link" in the "Course overview" "block"
|
||||
Then I should see "Course 13"
|
||||
And I should see "All" in the "[data-action='limit-toggle']" "css_element"
|
||||
And I log out
|
||||
|
||||
@@ -22,10 +22,9 @@ Feature: Course overview block show users their progress on courses
|
||||
|
||||
Scenario: Course progress percentage should not be displayed if completion is not enabled
|
||||
Given I log in as "student1"
|
||||
And I click on "All (except hidden)" "button" in the "Course overview" "block"
|
||||
When I click on "All (except hidden)" "link" in the "Course overview" "block"
|
||||
And I click on "All (except removed from view)" "button" in the "Course overview" "block"
|
||||
When I click on "All (except removed from view)" "link" in the "Course overview" "block"
|
||||
Then I should not see "0%" in the "Course overview" "block"
|
||||
And I log out
|
||||
|
||||
Scenario: User complete activity and verify his progress
|
||||
Given I log in as "teacher1"
|
||||
@@ -38,12 +37,11 @@ Feature: Course overview block show users their progress on courses
|
||||
And I press "Save and return to course"
|
||||
And I log out
|
||||
When I log in as "student1"
|
||||
And I click on "All (except hidden)" "button" in the "Course overview" "block"
|
||||
And I click on "All (except removed from view)" "button" in the "Course overview" "block"
|
||||
Then I should see "Course 1" in the "Course overview" "block"
|
||||
And I should see "0%" in the "Course overview" "block"
|
||||
And I am on "Course 1" course homepage
|
||||
And I follow "Test choice 1"
|
||||
And I follow "Dashboard" in the user menu
|
||||
And I click on "All (except hidden)" "button" in the "Course overview" "block"
|
||||
And I click on "All (except removed from view)" "button" in the "Course overview" "block"
|
||||
And I should see "100%" in the "Course overview" "block"
|
||||
And I log out
|
||||
|
||||
@@ -77,6 +77,8 @@ class block_myoverview_privacy_testcase extends \core_privacy\tests\provider_tes
|
||||
array('block_myoverview_user_grouping_preference', 'inprogress', ''),
|
||||
array('block_myoverview_user_grouping_preference', 'future', ''),
|
||||
array('block_myoverview_user_grouping_preference', 'past', ''),
|
||||
array('block_myoverview_user_grouping_preference', 'hidden', ''),
|
||||
array('block_myoverview_user_grouping_preference', 'favourites', ''),
|
||||
array('block_myoverview_user_view_preference', 'card', ''),
|
||||
array('block_myoverview_user_view_preference', 'list', ''),
|
||||
array('block_myoverview_user_view_preference', 'summary', ''),
|
||||
|
||||
@@ -24,6 +24,6 @@
|
||||
|
||||
defined('MOODLE_INTERNAL') || die();
|
||||
|
||||
$plugin->version = 2019070401; // The current plugin version (Date: YYYYMMDDXX).
|
||||
$plugin->version = 2019090500; // The current plugin version (Date: YYYYMMDDXX).
|
||||
$plugin->requires = 2019051100; // Requires this Moodle version.
|
||||
$plugin->component = 'block_myoverview'; // Full name of the plugin (used for diagnostics).
|
||||
|
||||
Reference in New Issue
Block a user