Skip to content

Commit

Permalink
Code checker fixes.
Browse files Browse the repository at this point in the history
  • Loading branch information
JohnOLane committed Jul 16, 2024
1 parent cca7a98 commit c9879a4
Show file tree
Hide file tree
Showing 2 changed files with 46 additions and 1 deletion.
2 changes: 1 addition & 1 deletion mod_form.php
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ public function definition() {

$isnew = empty($this->_cm);

$service = new mod_zoom_webservice();
$service = new \mod_zoom\webservice();
// UofR HACK ADDED.
$zoomuser = zoom_email_alias($USER, $service);
// END of ADDED.
Expand Down
45 changes: 45 additions & 0 deletions tests/behat/zoomtest.feature
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
@mod @mod_zoom
Feature: Create and delete a Zoom activity
In order to manage course content
As a user
I need to be able to create and delete a Zoom activity in Moodle

Background:
Given the following "courses" exist:
| fullname | shortname | category |
| Test Course | TC | 0 |
And the following "users" exist:
| username | firstname | lastname | email |
| admin2 | Admin | 2 | lane206j@uregina.ca |
And the following "course enrolments" exist:
| user | course | role |
| admin2 | TC | manager |
And the following config values are set as admin:
| accountid | mPu89yKFStKeho7aseleyQ | zoom |
| clientid | rjYCdmTpRf2zW5uBW3Rtg | zoom |
| clientsecret | K5urZmDwufjyYiMokKwdvZJRC9AZioHW | zoom |
| zoomurl | https://uregina-ca.zoom.us | zoom |
And I log in as "admin2"
And I am on "Test Course" course homepage with editing mode on

@javascript
Scenario: Create and delete a Zoom activity
Given I click on "Add an activity or resource" "button" in the "Topic 1" "section"
And I click on "Zoom meeting" "link" in the ".modal-body" "css_element"
And I set the field "Title" to "Test Zoom Meeting"
And I set the field "Description" to "This is a test Zoom meeting."
And I set the field "start_time[day]" to "20"
And I set the field "start_time[month]" to "July"
And I set the field "start_time[year]" to "2024"
And I set the field "start_time[hour]" to "10"
And I set the field "duration[number]" to "2"
And I set the field "duration[timeunit]" to "hours"
And I set the field "option_participants_video" to "1"
And I press "Save and return to course"
And I should see "Test Zoom Meeting" in the "Topic 1" "section"

When I turn editing mode on
And I open "Test Zoom Meeting" actions menu
And I click on "Delete" "link" in the "Test Zoom Meeting" activity
And I click on "Delete" "button" in the ".modal-footer" "css_element"
And I should not see "Test Zoom Meeting" in the "Topic 1" "section"

0 comments on commit c9879a4

Please sign in to comment.