Skip to content

Commit

Permalink
Merge branch 'MOODLE_401_STABLE' into MOODLE_401_STABLE_GIPRECIA
Browse files Browse the repository at this point in the history
  • Loading branch information
lvillanne-recia committed Dec 22, 2023
2 parents eb4725a + e591ddc commit b6eb80a
Show file tree
Hide file tree
Showing 16 changed files with 141 additions and 49 deletions.
18 changes: 17 additions & 1 deletion calendar/tests/behat/behat_calendar.php
Original file line number Diff line number Diff line change
Expand Up @@ -176,7 +176,23 @@ private function view_the_calendar(string $type, int $day, int $month, int $year
* @return void
*/
public function i_am_viewing_site_calendar() {
$url = new moodle_url('/calendar/view.php', ['view' => 'month']);
$this->i_am_viewing_calendar_in_view('month');
}

/**
* Navigate to a specific view in the calendar.
*
* @Given /^I am viewing calendar in "([^"]+)" view$/
* @param string $view The calendar view ('month', 'day' and 'upcoming') to navigate to.
* @return void
*/
public function i_am_viewing_calendar_in_view(string $view): void {

if (!in_array($view, ['month', 'day', 'upcoming'])) {
throw new Exception("Invalid calendar view. Allowed values are: 'month', 'day' and 'upcoming'");
}

$url = new moodle_url('/calendar/view.php', ['view' => $view]);
$this->execute('behat_general::i_visit', [$url]);
}
}
4 changes: 2 additions & 2 deletions lib/amd/build/str.min.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion lib/amd/build/str.min.js.map

Large diffs are not rendered by default.

Loading

0 comments on commit b6eb80a

Please sign in to comment.