newsletter_plugin.feature
3.01 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
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
Feature: newsletter plugin
Background:
Given I am logged in as admin
Scenario: as admin I can configure plugin
When I go to the environment control panel
And I follow "Plugins"
Then I should see "Configuration" linking to "/admin/plugin/newsletter"
Scenario: in the newsletter settings I can see the field to enable/disable
When I go to the environment control panel
And I follow "Plugins"
And I follow "Configuration"
Then I should see "Enable send of newsletter to members on this environment"
Scenario: redirect to newsletter visualization after save and visualize
Given "NewsletterPlugin" plugin is enabled
When I go to the environment control panel
And I follow "Plugins"
And I follow "Configuration"
And I press "Save and visualize"
Then I should see "If you can't view this email, click here"
And I should not see "Newsletter settings"
Scenario: stay on newsletter settings page after save
Given "NewsletterPlugin" plugin is enabled
When I go to the environment control panel
And I follow "Plugins"
And I follow "Configuration"
And I press "Save"
Then I should see "Newsletter settings"
And I should not see "If you can't view this email, click here"
@selenium
Scenario: search community and select blog for newsletter
Given the following communities
| identifier | name |
| sample-community | Sample Community |
And the following blogs
| owner | name |
| sample-community | Sample Blog |
And "NewsletterPlugin" plugin is enabled
When I go to the environment control panel
And I follow "Plugins"
And I follow "Configuration"
And I type in "Sample Community" into autocomplete list "search-profiles" and I choose "Sample Blog in Sample Community"
And I press "Save"
Then I should see "Sample Blog in Sample Community"
@selenium
Scenario: search profile and select blog for newsletter
Given the following users
| login | name |
| joaosilva | Joao Silva |
And the following blogs
| owner | name |
| joaosilva | Joao Blog |
And "NewsletterPlugin" plugin is enabled
When I go to the environment control panel
And I follow "Plugins"
And I follow "Configuration"
And I type in "Silva" into autocomplete list "search-profiles" and I choose "Joao Blog in Joao Silva"
And I press "Save"
Then I should see "Joao Blog in Joao Silva"
@selenium
Scenario: search blog and select it for newsletter
Given the following communities
| identifier | name |
| sample-community | Sample Community |
And the following blogs
| owner | name |
| sample-community | Sample Blog |
And "NewsletterPlugin" plugin is enabled
When I go to the environment control panel
And I follow "Plugins"
And I follow "Configuration"
And I type in "Sample Blog" into autocomplete list "search-profiles" and I choose "Sample Blog in Sample Community"
And I press "Save"
Then I should see "Sample Blog in Sample Community"