Skip to content

Commit

Permalink
WIP - behat and text updates
Browse files Browse the repository at this point in the history
  • Loading branch information
mickhawkins committed Aug 24, 2023
1 parent 623ecd5 commit 4519f9a
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -168,5 +168,8 @@ public static function set_form_definition(\MoodleQuickForm $mform): void {
$mform->addRule('customlinkurl', get_string('required'), 'required', null, 'server');
$mform->addRule('customlinkurl', get_string('maximumchars', '', 255), 'maxlength', 255, 'client');
$mform->addRule('customlinkurl', get_string('maximumchars', '', 255), 'maxlength', 255, 'server');
$mform->insertElementBefore($mform->createElement('static', 'customlinkurlinfo', '',
get_string('customlinkurlinfo', 'communication_customlink'),
'addcommunicationoptionshere'), 'addcommunicationoptionshere');
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@

$string['cachedef_customlink'] = 'Custom link data';
$string['customlinkurl'] = 'Custom link URL';
$string['customlinkurl_help'] = 'The URL of an existing room/channel set up for this course in a messaging or other communication service you would like to link to.';
$string['customlinkurl_help'] = 'Provide a link to an existing room from any communication service you would like to make available to participants - such as Microsoft Teams, Slack or Matrix.';
$string['customlinkurlinfo'] = 'The URL of an existing room already set up for this course.';
$string['pluginname'] = 'Custom link';
$string['privacy:metadata'] = 'Custom link communication plugin does not store any personal data.';
Original file line number Diff line number Diff line change
Expand Up @@ -23,18 +23,17 @@ Feature: Communication custom link
When I am on the "Course 1" "Course" page logged in as "teacher1"
#TODO: Try to avoid CSS elements
And ".btn-footer-communication" "css_element" should not be visible
And I am on the "Course 1" "course editing" page
And I expand all fieldsets
And I navigate to "Communication" in current page administration
And the "Communication service" select box should contain "Custom link"
And I should not see "Custom link URL"
And I select "Custom link" from the "Communication service" singleselect
And I should see "Custom link URL"
# Simulate a custom link using the FQDN of an internal URL to avoid external dependency.
And I set the following fields to these values:
| communicationroomname | Test URL |
| customlinkurl | /stable_master/my/ |
| communicationroomname | Test URL |
| customlinkurl | /stable_master/my/ |
#TODO: Have a better way to do a FQDN ^^
And I press "Save and display"
And I press "Save changes"
Then I should see "Your Custom link room is ready"
And ".btn-footer-communication" "css_element" should be visible
And I click on ".btn-footer-communication" "css_element"
Expand Down

0 comments on commit 4519f9a

Please sign in to comment.