diff --git a/public/blocks/calendar_month/tests/behat/block_calendar_month_dashboard.feature b/public/blocks/calendar_month/tests/behat/block_calendar_month_dashboard.feature index 5ce66709b7c..a83528f6ad5 100644 --- a/public/blocks/calendar_month/tests/behat/block_calendar_month_dashboard.feature +++ b/public/blocks/calendar_month/tests/behat/block_calendar_month_dashboard.feature @@ -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" diff --git a/public/calendar/tests/behat/calendar.feature b/public/calendar/tests/behat/calendar.feature index f9fb463385d..98d0ed35ede 100644 --- a/public/calendar/tests/behat/calendar.feature +++ b/public/calendar/tests/behat/calendar.feature @@ -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" diff --git a/public/calendar/tests/behat/humandate.feature b/public/calendar/tests/behat/humandate.feature index 6d98246e9b0..a04dcff7bd9 100644 --- a/public/calendar/tests/behat/humandate.feature +++ b/public/calendar/tests/behat/humandate.feature @@ -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" diff --git a/public/lib/blocklib.php b/public/lib/blocklib.php index b803163b317..55a81f63dab 100644 --- a/public/lib/blocklib.php +++ b/public/lib/blocklib.php @@ -2817,11 +2817,11 @@ function blocks_add_default_system_blocks() { $page->blocks->add_blocks($page->blocks->filter_nonexistent_blocks([ BLOCK_POS_RIGHT => [ + 'calendar_month', 'recentlyaccesseditems', ], 'content' => [ 'timeline', - 'calendar_month', ]]), 'my-index', $subpagepattern diff --git a/public/mod/assign/tests/behat/timed_assignment.feature b/public/mod/assign/tests/behat/timed_assignment.feature index 98c1ec9bf46..5f166ecb84b 100644 --- a/public/mod/assign/tests/behat/timed_assignment.feature +++ b/public/mod/assign/tests/behat/timed_assignment.feature @@ -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. diff --git a/public/my/tests/behat/reset_page.feature b/public/my/tests/behat/reset_page.feature index 9515fc53be5..901819a54fd 100644 --- a/public/my/tests/behat/reset_page.feature +++ b/public/my/tests/behat/reset_page.feature @@ -25,4 +25,6 @@ Feature: Reset dashboard page to default Then "Latest announcements" "block" should not 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"