mirror of
https://github.com/moodle/moodle.git
synced 2025-04-13 12:32:08 +02:00
MDL-73979 timeline: Views should display consistent information
The course view is updated to display the events that match the filter condition, no matter the course start date is in the future or the course end date is in the past
This commit is contained in:
parent
01eb6d2e9b
commit
f136ae7149
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
@ -61,7 +61,7 @@ function(
|
||||
LOADING_ICON: 'core/loading'
|
||||
};
|
||||
|
||||
var COURSE_CLASSIFICATION = 'inprogress';
|
||||
var COURSE_CLASSIFICATION = 'all';
|
||||
var COURSE_SORT = 'fullname asc';
|
||||
var COURSE_EVENT_LIMIT = 5;
|
||||
var COURSE_LIMIT = 2;
|
||||
|
@ -45,11 +45,14 @@ Feature: The timeline block allows users to see upcoming courses
|
||||
When I click on "Sort by courses" "link" in the "Timeline" "block"
|
||||
Then I should see "Course 1" in the ".block_timeline [data-region='view-courses']" "css_element"
|
||||
And I should see "Course 2" in the ".block_timeline [data-region='view-courses']" "css_element"
|
||||
And I should not see "Show more courses" in the "Timeline" "block"
|
||||
And I should see "Show more courses" in the "Timeline" "block"
|
||||
And I click on "Show more courses" "button" in the "Timeline" "block"
|
||||
And I should see "Course 4" in the ".block_timeline [data-region='view-courses']" "css_element"
|
||||
And "Test choice 1" "link" should exist in the "Timeline" "block"
|
||||
And I should see "Choice closes" in the "Timeline" "block"
|
||||
And "Test feedback 1" "link" should exist in the "Timeline" "block"
|
||||
And I should see "Feedback closes" in the "Timeline" "block"
|
||||
And "Test feedback 4" "link" should exist in the "Timeline" "block"
|
||||
And "Test feedback 5" "link" should exist in the "Timeline" "block"
|
||||
And "Test assign 2" "link" should exist in the "Timeline" "block"
|
||||
And I should not see "Course 3" in the "Timeline" "block"
|
||||
@ -79,10 +82,10 @@ Feature: The timeline block allows users to see upcoming courses
|
||||
And "Test assign 2" "link" should exist in the "Timeline" "block"
|
||||
And I should see "Assignment is due" in the "Timeline" "block"
|
||||
And I should see "Choice closes" in the "Timeline" "block"
|
||||
And I should see "Course 4" in the "Timeline" "block"
|
||||
And I should see "Test feedback 4" in the "Timeline" "block"
|
||||
And I should not see "Show more courses" in the "Timeline" "block"
|
||||
And I should not see "Course 4" in the "Timeline" "block"
|
||||
And "Test choice 2" "link" should not exist in the "Timeline" "block"
|
||||
And I should not see "Test feedback 4" in the "Timeline" "block"
|
||||
|
||||
Scenario: Persistent sort filter
|
||||
Given I log in as "student1"
|
||||
@ -93,9 +96,12 @@ Feature: The timeline block allows users to see upcoming courses
|
||||
When I reload the page
|
||||
Then I should see "Course 1" in the "Timeline" "block"
|
||||
And I should see "Course 2" in the "Timeline" "block"
|
||||
And I should not see "Show more courses" in the "Timeline" "block"
|
||||
And I should see "Show more courses" in the "Timeline" "block"
|
||||
And I click on "Show more courses" "button" in the "Timeline" "block"
|
||||
And I should see "Course 4" in the ".block_timeline [data-region='view-courses']" "css_element"
|
||||
And "Test choice 1" "link" should exist in the "Timeline" "block"
|
||||
And "Test feedback 1" "link" should exist in the "Timeline" "block"
|
||||
And "Test feedback 4" "link" should exist in the "Timeline" "block"
|
||||
And "Test feedback 5" "link" should exist in the "Timeline" "block"
|
||||
And "Test assign 2" "link" should exist in the "Timeline" "block"
|
||||
And I should not see "Course 3" in the "Timeline" "block"
|
||||
@ -126,9 +132,9 @@ Feature: The timeline block allows users to see upcoming courses
|
||||
And "Test feedback 3" "link" should exist in the "Timeline" "block"
|
||||
And "Test assign 1" "link" should exist in the "Timeline" "block"
|
||||
And I should not see "Show more courses" in the "Timeline" "block"
|
||||
And I should not see "Course 4" in the "Timeline" "block"
|
||||
And I should see "Course 4" in the "Timeline" "block"
|
||||
And "Test choice 2" "link" should not exist in the "Timeline" "block"
|
||||
And "Test feedback 4" "link" should not exist in the "Timeline" "block"
|
||||
And "Test feedback 4" "link" should exist in the "Timeline" "block"
|
||||
|
||||
Scenario: Current filtering always applies in courses view
|
||||
Given I log in as "student1"
|
||||
@ -208,8 +214,10 @@ Feature: The timeline block allows users to see upcoming courses
|
||||
And I should see "Course 1" in the ".block-timeline [data-region='view-courses']" "css_element"
|
||||
And I should see "Course 2" in the ".block-timeline [data-region='view-courses']" "css_element"
|
||||
And I should see "Course 3" in the ".block-timeline [data-region='view-courses']" "css_element"
|
||||
And I should see "Course 4" in the ".block-timeline [data-region='view-courses']" "css_element"
|
||||
And I should not see "Course 5" in the ".block-timeline [data-region='view-courses']" "css_element"
|
||||
And I click on "Show more courses" "button" in the "Timeline" "block"
|
||||
And I should see "Course 5" in the ".block-timeline [data-region='view-courses']" "css_element"
|
||||
And I should not see "Course 4" in the ".block-timeline [data-region='view-courses']" "css_element"
|
||||
And "Test assign 1" "link" should exist in the ".block-timeline [data-region='view-courses']" "css_element"
|
||||
And "Test assign 2" "link" should exist in the ".block-timeline [data-region='view-courses']" "css_element"
|
||||
And "Test assign 3" "link" should exist in the ".block-timeline [data-region='view-courses']" "css_element"
|
||||
|
@ -111,16 +111,18 @@ Feature: The timeline block allows users to search for upcoming activities
|
||||
And I click on "Filter timeline by date" "button" in the "Timeline" "block"
|
||||
And I click on "All" "link" in the "Timeline" "block"
|
||||
And I click on "Show more courses" "button" in the "Timeline" "block"
|
||||
And I should see "Course 1" in the ".block-timeline [data-region='view-courses']" "css_element"
|
||||
And I should see "Course 2" in the ".block-timeline [data-region='view-courses']" "css_element"
|
||||
And I should see "Course 3" in the ".block-timeline [data-region='view-courses']" "css_element"
|
||||
And I should see "Course 4" in the ".block-timeline [data-region='view-courses']" "css_element"
|
||||
And I should not see "Course 5" in the ".block-timeline [data-region='view-courses']" "css_element"
|
||||
And I click on "Show more courses" "button" in the "Timeline" "block"
|
||||
And I should see "Course 5" in the ".block-timeline [data-region='view-courses']" "css_element"
|
||||
And I should see "Test choice 1" in the ".block-timeline [data-region='view-courses']" "css_element"
|
||||
And I should see "Test choice 2" in the ".block-timeline [data-region='view-courses']" "css_element"
|
||||
And I should see "Test choice 3" in the ".block-timeline [data-region='view-courses']" "css_element"
|
||||
And I should see "Test choice 7" in the ".block-timeline [data-region='view-courses']" "css_element"
|
||||
And I should see "Test choice 8" in the ".block-timeline [data-region='view-courses']" "css_element"
|
||||
And I should not see "Course 1" in the ".block-timeline [data-region='view-courses']" "css_element"
|
||||
And I should not see "Course 3" in the ".block-timeline [data-region='view-courses']" "css_element"
|
||||
And I should not see "Test choice 2" in the ".block-timeline [data-region='view-courses']" "css_element"
|
||||
And I should not see "Test choice 3" in the ".block-timeline [data-region='view-courses']" "css_element"
|
||||
When I set the field "Search by activity type or name" to "choice 1"
|
||||
And I wait until "Course 4" "text" does not exist
|
||||
Then I should see "Test choice 1" in the "Timeline" "block"
|
||||
|
Loading…
x
Reference in New Issue
Block a user