plugins.feature
1.93 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
Feature: plugins
As a noosfero\'s developer
I want to create hot spots that a plugin should use
As a plugins\' developer
I want to create plugins that uses noosfero\'s hot spots
As an admin of a noosfero environment
I want to activate and deactivate some plugins
As a user
I want to use the features implemented by the plugins
Background:
Given the following users
| login | name |
| joaosilva | Joao Silva |
And I am logged in as "joaosilva"
Scenario: a user must see the plugin\'s button in the control panel if the plugin is enabled
Given plugin Foo is enabled on environment
And I go to joaosilva's control panel
Then I should see "Foo plugin button"
Scenario: a user must see the plugin\'s tab in in the profile if the plugin is enabled
Given plugin Foo is enabled on environment
And I am on joaosilva's profile
Then I should see "Foo plugin tab"
Scenario: a user must not see the plugin\'s button in the control panel if the plugin is disabled
Given plugin Foo is disabled on environment
And I go to joaosilva's control panel
Then I should not see "Foo plugin button"
Scenario: a user must not see the plugin\'s tab in in the profile if the plugin is disabled
Given plugin Foo is disabled on environment
And I am on joaosilva's profile
Then I should not see "Foo plugin tab"
Scenario: an admin should be able to deactivate a plugin
Given plugin Foo is enabled on environment
And I am logged in as admin
When I go to admin_user's control panel
Then I should see "Foo plugin button"
When I go to admin_user's profile
Then I should see "Foo plugin tab"
And I go to the environment control panel
And I follow "Plugins"
And I uncheck "Foo"
And I press "Save changes"
When I go to admin_user's control panel
Then I should not see "Foo plugin button"
When I go to admin_user's profile
Then I should not see "Foo plugin tab"