mirror of
https://github.com/moodle/moodle.git
synced 2025-04-14 04:52:36 +02:00
Merge branch 'MDL-74114-master' of https://github.com/aanabit/moodle
This commit is contained in:
commit
89e020a872
2
blocks/myoverview/amd/build/view.min.js
vendored
2
blocks/myoverview/amd/build/view.min.js
vendored
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
@ -436,7 +436,7 @@ const setCourseFavouriteState = (courseId, status) => {
|
||||
if (result.warnings.length === 0) {
|
||||
loadedPages.forEach(courseList => {
|
||||
courseList.courses.forEach((course, index) => {
|
||||
if (course.id === courseId) {
|
||||
if (course.id == courseId) {
|
||||
courseList.courses[index].isfavourite = status;
|
||||
}
|
||||
});
|
||||
|
@ -39,10 +39,8 @@ Feature: The my overview block allows users to favourite their courses
|
||||
And I hover "//div[@class='card dashboard-card' and contains(.,'Course 5')]" "xpath_element"
|
||||
When I click on ".coursemenubtn" "css_element" in the "//div[@class='card dashboard-card' and contains(.,'Course 5')]" "xpath_element"
|
||||
And I click on "Star this course" "link" in the "//div[@class='card dashboard-card' and contains(.,'Course 5')]" "xpath_element"
|
||||
And I reload the page
|
||||
And I click on "Display drop-down menu" "button" in the "Course overview" "block"
|
||||
And I click on "List" "link" in the "Course overview" "block"
|
||||
And I reload the page
|
||||
Then "//li[contains(concat(' ', normalize-space(@class), ' '), 'list-group-item') and contains(.,'Course 5')]//span[@data-region='is-favourite' and @aria-hidden='false']" "xpath_element" should exist
|
||||
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
|
||||
@ -53,10 +51,8 @@ Feature: The my overview block allows users to favourite their courses
|
||||
And I hover "//div[@class='card dashboard-card' and contains(.,'Course 5')]" "xpath_element"
|
||||
When I click on ".coursemenubtn" "css_element" in the "//div[@class='card dashboard-card' and contains(.,'Course 5')]" "xpath_element"
|
||||
And I click on "Star this course" "link" in the "//div[@class='card dashboard-card' and contains(.,'Course 5')]" "xpath_element"
|
||||
And I reload the page
|
||||
And I click on "Display drop-down menu" "button" in the "Course overview" "block"
|
||||
And I click on "Summary" "link" in the "Course overview" "block"
|
||||
And I reload the page
|
||||
Then "//div[contains(concat(' ', normalize-space(@class), ' '), 'course-summaryitem') and contains(.,'Course 5')]//span[@data-region='is-favourite' and @aria-hidden='false']" "xpath_element" should exist
|
||||
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
|
||||
|
Loading…
x
Reference in New Issue
Block a user