AutorÃa | Ultima modificación | Ver Log |
@core @core_adminFeature: MoodleNet outbound configurationIn order to send activity/resource to MoodleNetAs a Moodle administratorI need to set outbound configurationBackground:Given I log in as "admin"Scenario: Share to MoodleNet experimental flagGiven I navigate to "Development > Experimental" in site administrationThen "Enable sharing to MoodleNet" "field" should existAnd the field "Enable sharing to MoodleNet" matches value "0"Scenario: Outbound configuration without experimental flag enable yetGiven I navigate to "MoodleNet" in site administrationThen I should not see "MoodleNet outbound settings"Scenario: Outbound configuration without OAuth 2 service setup yetGiven the following config values are set as admin:| enablesharingtomoodlenet | 1 |When I navigate to "MoodleNet" in site administrationThen I should see "MoodleNet outbound settings"And I click on "MoodleNet outbound settings" "link"And the field "OAuth 2 service" matches value "None"And I should see "Select a MoodleNet OAuth 2 service to enable sharing to that MoodleNet site. If the service doesn't exist yet, you will need to create it."And I click on "create" "link"And I should see "OAuth 2 services"Scenario: Outbound configuration with OAuth 2 service setupGiven a MoodleNet mock server is configuredAnd the following config values are set as admin:| enablesharingtomoodlenet | 1 |And I navigate to "Server > OAuth 2 services" in site administrationAnd I press "Custom"And I should see "Create new service: Custom"And I set the following fields to these values:| Name | Testing custom service || Client ID | thisistheclientid || Client secret | supersecret |And I press "Save changes"When I navigate to "MoodleNet > MoodleNet outbound settings" in site administrationThen the field "OAuth 2 service" matches value "None"And I navigate to "Server > OAuth 2 services" in site administrationAnd I press "MoodleNet"And I should see "Create new service: MoodleNet"And I change the MoodleNet field "Service base URL" to mock serverAnd I press "Save changes"And I navigate to "MoodleNet > MoodleNet outbound settings" in site administrationAnd the "OAuth 2 service" "field" should be enabledAnd I should see "MoodleNet" in the "OAuth 2 service" "select"And I should not see "Testing custom service" in the "OAuth 2 service" "select"