send_email_plugin.feature
1.46 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
Feature: send_email_plugin
Background:
Given the following users
| login | name |
| joaosilva | Joao Silva |
And I am logged in as "joaosilva"
Scenario: expand macro in article content
Given plugin SendEmail is enabled on environment
And the following articles
| owner | name | body |
| joaosilva | sample-article | URL path to {sendemail} action |
When I go to /joaosilva/sample-article
Then I should see "URL path to /profile/joaosilva/plugin/send_email/deliver action"
Scenario: expand macro in block content
Given plugin SendEmail is enabled on environment
And the following blocks
| owner | type | html |
| joaosilva | RawHTMLBlock | URL path to {sendemail} action |
When I go to Joao Silva's homepage
Then I should see "URL path to /profile/joaosilva/plugin/send_email/deliver action"
Scenario: as admin I can configure plugin
Given I am logged in as admin
When I go to the environment control panel
And I follow "Plugins"
Then I should see "Configuration" linking to "/admin/plugin/send_email"
Scenario: configure plugin to allow emails to john@example.com
Given I am logged in as admin
When I go to /admin/plugin/send_email
Then I should not see "john@example.com"
When I fill in "E-Mail addresses you want to allow to send" with "john@example.com"
And I press "Save"
When I go to /admin/plugin/send_email
Then I should see "john@example.com"