This commit is contained in:
Huong Nguyen
2026-02-24 16:06:52 +07:00
6 changed files with 22 additions and 26 deletions
@@ -19,15 +19,3 @@ Feature: View a site event on the dashboard
Given I log in as "student1"
When I hover over today in the mini-calendar block
Then I should see "Site Event"
@javascript
Scenario: The calendar block on the dashboard should be responsive
Given I log in as "student1"
When I change viewport size to "1200x1000"
Then I should see "Site Event"
And I change viewport size to "600x1000"
# We need to give the browser a couple seconds to re-render the page after the screen has been resized.
And I wait "1" seconds
And I should not see "Site Event"
When I hover over today in the mini-calendar block responsive view
And I should see "Site Event"
@@ -159,6 +159,7 @@ Feature: Perform basic calendar functionality
Scenario: Edit a newly created event using TinyMCE editor
Given I log in as "teacher1"
And I follow "Dashboard"
And I click on "Full calendar" "link"
And I click on "New event" "button"
And I set the field "Event title" to "Newly created event"
When I press "Save"
@@ -30,31 +30,32 @@ Feature: Confirm dates are human readable
# Far in the future
| Future event | user | ##today noon +2 days## | 86400 |
When I am on homepage
And I click on "This day one hour event" "link"
# Click event links within the Upcoming events block to ensure proper targeting.
And I click on "This day one hour event" "link" in the "Upcoming events" "block"
Then I should see "Today" in the "This day one hour event" "dialogue"
And I should not see "Yesterday" in the "This day one hour event" "dialogue"
And I should not see "Tomorrow" in the "This day one hour event" "dialogue"
And "Warning" "icon" should exist in the "This day one hour event" "dialogue"
And I click on "Close" "button" in the "This day one hour event" "dialogue"
And I click on "This day and 1 day event" "link"
And I click on "This day and 1 day event" "link" in the "Upcoming events" "block"
And I should see "Today" in the "This day and 1 day event" "dialogue"
And I should not see "Yesterday" in the "This day and 1 day event" "dialogue"
And I should see "Tomorrow" in the "This day and 1 day event" "dialogue"
And "Warning" "icon" should exist in the "This day and 1 day event" "dialogue"
And I click on "Close" "button" in the "This day and 1 day event" "dialogue"
And I click on "Last day one day event" "link"
And I click on "Last day one day event" "link" in the "Upcoming events" "block"
And I should see "Today" in the "Last day one day event" "dialogue"
And I should see "Yesterday" in the "Last day one day event" "dialogue"
And I should not see "Tomorrow" in the "Last day one day event" "dialogue"
And "Warning" "icon" should exist in the "Last day one day event" "dialogue"
And I click on "Close" "button" in the "Last day one day event" "dialogue"
And I click on "Next day event" "link"
And I click on "Next day event" "link" in the "Upcoming events" "block"
And I should not see "Today" in the "Next day event" "dialogue"
And I should not see "Yesterday" in the "Next day event" "dialogue"
And I should see "Tomorrow" in the "Next day event" "dialogue"
And "Warning" "icon" should exist in the "Next day event" "dialogue"
And I click on "Close" "button" in the "Next day event" "dialogue"
And I click on "Future event" "link"
And I click on "Future event" "link" in the "Upcoming events" "block"
And I should not see "Today" in the "Future event" "dialogue"
And I should not see "Yesterday" in the "Future event" "dialogue"
And I should not see "Tomorrow" in the "Future event" "dialogue"
+1 -1
View File
@@ -2817,12 +2817,12 @@ function blocks_add_default_system_blocks() {
$page->blocks->add_blocks($page->blocks->filter_nonexistent_blocks([
BLOCK_POS_RIGHT => [
'calendar_month',
'recentlyaccesseditems',
],
'content' => [
'myoverview',
'timeline',
'calendar_month',
]]),
'my-index',
$subpagepattern
@@ -34,16 +34,18 @@ Feature: In a timed assignment, students should confirm before starting the time
@javascript
Scenario: Access a timed assignment from the Dashboard
Given I am logged in as student1
When I click on "Timed assignment 1" "link" in the "Calendar" "block"
And I click on "Add submission" "link" in the ".modal-footer" "css_element"
When I click on today in the mini-calendar block to view the detail
And I should see "Timed assignment 1"
And I click on "Add submission" "link" in the "//div[contains(concat(' ', normalize-space(@class), ' '), ' card ')][contains(., 'Timed assignment 1')]" "xpath_element"
Then "Begin assignment" "link" should exist
And I reload the page
And "Begin assignment" "link" should exist
And "#mod_assign_timelimit_block" "css_element" should not exist
# Repeat the steps to confirm timer doesn't start automatically.
And I follow "Dashboard"
And I click on "Timed assignment 1" "link" in the "Calendar" "block"
And I click on "Add submission" "link" in the ".modal-footer" "css_element"
And I click on today in the mini-calendar block to view the detail
And I should see "Timed assignment 1"
And I click on "Add submission" "link" in the "//div[contains(concat(' ', normalize-space(@class), ' '), ' card ')][contains(., 'Timed assignment 1')]" "xpath_element"
And "Begin assignment" "link" should exist
And "#mod_assign_timelimit_block" "css_element" should not exist
# Now start the timer.
@@ -61,16 +63,18 @@ Feature: In a timed assignment, students should confirm before starting the time
| student1 | CG1 |
| student2 | CG1 |
And I am logged in as student1
When I click on "Group assignment 2" "link" in the "Calendar" "block"
And I click on "Add submission" "link" in the ".modal-footer" "css_element"
When I click on today in the mini-calendar block to view the detail
And I should see "Group assignment 2"
And I click on "Add submission" "link" in the "//div[contains(concat(' ', normalize-space(@class), ' '), ' card ')][contains(., 'Group assignment 2')]" "xpath_element"
Then "Begin assignment" "link" should exist
And I reload the page
And "Begin assignment" "link" should exist
And "#mod_assign_timelimit_block" "css_element" should not exist
# Repeat the steps to confirm timer doesn't start automatically.
And I follow "Dashboard"
And I click on "Group assignment 2" "link" in the "Calendar" "block"
And I click on "Add submission" "link" in the ".modal-footer" "css_element"
And I click on today in the mini-calendar block to view the detail
And I should see "Group assignment 2"
And I click on "Add submission" "link" in the "//div[contains(concat(' ', normalize-space(@class), ' '), ' card ')][contains(., 'Group assignment 2')]" "xpath_element"
And "Begin assignment" "link" should exist
And "#mod_assign_timelimit_block" "css_element" should not exist
# Now start the timer.
+2
View File
@@ -26,4 +26,6 @@ Feature: Reset dashboard page to default
And "Course overview" "block" should exist
And "Timeline" "block" should exist
And "Calendar" "block" should exist
# The calendar block is on the side.
And "Calendar" "block" should not exist in the "region-main" "region"
And I should not see "Reset page to default"