94 lines
5.4 KiB
Gherkin
94 lines
5.4 KiB
Gherkin
|
@block @block_timeline @app @javascript @lms_upto3.11
|
||
|
Feature: Timeline block.
|
||
|
|
||
|
Background:
|
||
|
Given the following "users" exist:
|
||
|
| username |
|
||
|
| student1 |
|
||
|
And the following "courses" exist:
|
||
|
| fullname | shortname |
|
||
|
| Course 1 | C1 |
|
||
|
| Course 2 | C2 |
|
||
|
| Course 3 | C3 |
|
||
|
| Course 4 | C4 |
|
||
|
And the following "course enrolments" exist:
|
||
|
| user | course | role |
|
||
|
| student1 | C1 | student |
|
||
|
| student1 | C2 | student |
|
||
|
| student1 | C3 | student |
|
||
|
| student1 | Acceptance test site | student |
|
||
|
And the following "activities" exist:
|
||
|
| activity | course | idnumber | name | duedate |
|
||
|
| assign | Acceptance test site | assign00 | Assignment 00 | ##tomorrow## |
|
||
|
| assign | C2 | assign01 | Assignment 01 | ##yesterday## |
|
||
|
| assign | C1 | assign02 | Assignment 02 | ##tomorrow## |
|
||
|
| assign | C1 | assign03 | Assignment 03 | ##tomorrow## |
|
||
|
| assign | C2 | assign04 | Assignment 04 | ##+2 days## |
|
||
|
| assign | C1 | assign05 | Assignment 05 | ##+5 days## |
|
||
|
| assign | C2 | assign06 | Assignment 06 | ##+1 month## |
|
||
|
| assign | C2 | assign07 | Assignment 07 | ##+1 month## |
|
||
|
| assign | C3 | assign08 | Assignment 08 | ##+1 month## |
|
||
|
| assign | C2 | assign09 | Assignment 09 | ##+1 month## |
|
||
|
| assign | C1 | assign10 | Assignment 10 | ##+1 month## |
|
||
|
| assign | C1 | assign11 | Assignment 11 | ##+6 months## |
|
||
|
| assign | C1 | assign12 | Assignment 12 | ##+6 months## |
|
||
|
| assign | C1 | assign13 | Assignment 13 | ##+6 months## |
|
||
|
| assign | C2 | assign14 | Assignment 14 | ##+6 months## |
|
||
|
| assign | C2 | assign15 | Assignment 15 | ##+6 months## |
|
||
|
| assign | C2 | assign16 | Assignment 16 | ##+6 months## |
|
||
|
| assign | C3 | assign17 | Assignment 17 | ##+6 months## |
|
||
|
| assign | C3 | assign18 | Assignment 18 | ##+6 months## |
|
||
|
| assign | C3 | assign19 | Assignment 19 | ##+6 months## |
|
||
|
| assign | C1 | assign20 | Assignment 20 | ##+1 year## |
|
||
|
| assign | C1 | assign21 | Assignment 21 | ##+1 year## |
|
||
|
| assign | C2 | assign22 | Assignment 22 | ##+1 year## |
|
||
|
| assign | C2 | assign23 | Assignment 23 | ##+1 year## |
|
||
|
| assign | C3 | assign24 | Assignment 24 | ##+1 year## |
|
||
|
| assign | C3 | assign25 | Assignment 25 | ##+1 year## |
|
||
|
|
||
|
Scenario: See courses inside block
|
||
|
Given I entered the app as "student1"
|
||
|
And I press "Open block drawer" in the app
|
||
|
Then I should find "Assignment 00" within "Timeline" "ion-card" in the app
|
||
|
And I should find "Assignment 02" within "Timeline" "ion-card" in the app
|
||
|
And I should find "Assignment 05" within "Timeline" "ion-card" in the app
|
||
|
And I should find "Course 1" within "Timeline" "ion-card" in the app
|
||
|
And I should find "Course 2" within "Timeline" "ion-card" in the app
|
||
|
But I should not find "Assignment 01" within "Timeline" "ion-card" in the app
|
||
|
And I should not find "Course 3" within "Timeline" "ion-card" in the app
|
||
|
|
||
|
When I press "Next 30 days" in the app
|
||
|
And I press "Overdue" in the app
|
||
|
Then I should find "Assignment 01" within "Timeline" "ion-card" in the app
|
||
|
And I should find "Course 2" within "Timeline" "ion-card" in the app
|
||
|
But I should not find "Assignment 00" within "Timeline" "ion-card" in the app
|
||
|
And I should not find "Assignment 02" within "Timeline" "ion-card" in the app
|
||
|
And I should not find "Course 1" within "Timeline" "ion-card" in the app
|
||
|
And I should not find "Course 3" within "Timeline" "ion-card" in the app
|
||
|
|
||
|
When I press "Overdue" in the app
|
||
|
And I press "All" in the app
|
||
|
Then I should find "Assignment 19" within "Timeline" "ion-card" in the app
|
||
|
And I should find "Course 3" within "Timeline" "ion-card" in the app
|
||
|
But I should not find "Assignment 20" within "Timeline" "ion-card" in the app
|
||
|
|
||
|
When I press "Load more" in the app
|
||
|
Then I should find "Assignment 21" within "Timeline" "ion-card" in the app
|
||
|
And I should find "Assignment 25" within "Timeline" "ion-card" in the app
|
||
|
|
||
|
When I press "All" in the app
|
||
|
And I press "Next 7 days" in the app
|
||
|
And I press "Sort by" in the app
|
||
|
And I press "Sort by courses" in the app
|
||
|
Then I should find "Course 1" "h3" within "Timeline" "ion-card" in the app
|
||
|
And I should find "Course 2" "h3" within "Timeline" "ion-card" in the app
|
||
|
And I should find "Assignment 02" within "Timeline" "ion-card" in the app
|
||
|
And I should find "Assignment 04" within "Timeline" "ion-card" in the app
|
||
|
But I should not find "Course 3" within "Timeline" "ion-card" in the app
|
||
|
|
||
|
When the following "activities" exist:
|
||
|
| activity | course | idnumber | name | duedate |
|
||
|
| assign | C1 | newassign | New Assignment | ##tomorrow## |
|
||
|
And I pull to refresh in the app
|
||
|
Then I should find "New Assignment" in the app
|