1 |
efrain |
1 |
@tool @tool_messageinbound
|
|
|
2 |
Feature: Incoming mail configuration
|
|
|
3 |
In order to receive email from external
|
|
|
4 |
As a Moodle administrator
|
|
|
5 |
I need to set mail configuration
|
|
|
6 |
|
|
|
7 |
Background:
|
|
|
8 |
Given I log in as "admin"
|
|
|
9 |
|
|
|
10 |
Scenario: Incoming mail server settings without OAuth 2 service setup yet
|
|
|
11 |
Given I navigate to "Server > Email > Incoming mail configuration" in site administration
|
|
|
12 |
And "OAuth 2 service" "select" should not exist
|
|
|
13 |
|
|
|
14 |
Scenario: Incoming mail server settings with OAuth 2 service setup
|
|
|
15 |
Given I navigate to "Server > OAuth 2 services" in site administration
|
|
|
16 |
And I press "Google"
|
|
|
17 |
And I should see "Create new service: Google"
|
|
|
18 |
And I set the following fields to these values:
|
|
|
19 |
| Name | Testing service |
|
|
|
20 |
| Client ID | thisistheclientid |
|
|
|
21 |
| Client secret | supersecret |
|
|
|
22 |
And I press "Save changes"
|
|
|
23 |
When I navigate to "Server > Email > Incoming mail configuration" in site administration
|
|
|
24 |
Then "OAuth 2 service" "select" should exist
|
|
|
25 |
And I should see "Testing service" in the "OAuth 2 service" "select"
|
|
|
26 |
|
|
|
27 |
@javascript
|
|
|
28 |
Scenario: Check character limitations of mailbox name
|
|
|
29 |
When I navigate to "Server > Email > Incoming mail configuration" in site administration
|
|
|
30 |
And I set the field "Mailbox name" to "frogfrogfrogfrog"
|
|
|
31 |
Then I should see "Maximum of 15 characters"
|
|
|
32 |
And the "disabled" attribute of "form#adminsettings button[type='submit']" "css_element" should contain "true"
|
|
|
33 |
And I set the field "Mailbox name" to "frogfrogfrogfro"
|
|
|
34 |
And I should not see "Maximum of 15 characters"
|
|
|
35 |
And the "disabled" attribute of "form#adminsettings button[type='submit']" "css_element" should not be set
|