Commit fb0f86a68767d2cee2294ced2041e93c77e4bff9
Committed by
Paulo Meireles
1 parent
cc96bccc
Exists in
master
and in
28 other branches
[Mezuro] Created configuration feature.
Showing
2 changed files
with
135 additions
and
1 deletions
Show diff stats
@@ -0,0 +1,134 @@ | @@ -0,0 +1,134 @@ | ||
1 | +Feature: Configuration | ||
2 | + As a mezuro user | ||
3 | + I want to create, edit and remove a Mezuro configuration | ||
4 | + | ||
5 | + Background: | ||
6 | + Given the following users | ||
7 | + | login | name | | ||
8 | + | joaosilva | Joao Silva | | ||
9 | + Given I am logged in as "joaosilva" | ||
10 | + And "Mezuro" plugin is enabled | ||
11 | + | ||
12 | + Scenario: I see Mezuro configurantion's input form | ||
13 | + Given I am on joaosilva's control panel | ||
14 | + When I follow "Mezuro configuration" | ||
15 | + Then I should see "Title" | ||
16 | + And I should see "Description" | ||
17 | + And I should see "Clone Configuration" | ||
18 | + | ||
19 | + #TODO: Create step for Mezuro configuration with clone. | ||
20 | + @selenium @kalibro_restart | ||
21 | + Scenario: I create a Mezuro configuration with valid attributes without cloning | ||
22 | + Given I am on joaosilva's control panel | ||
23 | + When I create a Mezuro configuration with the following data | ||
24 | + | Title | Sample Configuration | | ||
25 | + | Description | Sample Description | | ||
26 | + | Clone | None | | ||
27 | + Then I should see "Sample Configuration" | ||
28 | + And I should see "Sample Description" | ||
29 | + And I should see "Add Metric" | ||
30 | + | ||
31 | + Scenario: I try to create a Mezuro configuration without title | ||
32 | + Given I am on joaosilva's control panel | ||
33 | + And I follow "Mezuro configuration" | ||
34 | + And the field "article_name" is empty | ||
35 | + When I press "Save" | ||
36 | + Then I should see "Title can't be blank" | ||
37 | + | ||
38 | + @kalibro_restart | ||
39 | + Scenario: I try to create a Mezuro configuration with title already in use | ||
40 | + Given I have a Mezuro configuration with the following data | ||
41 | + | name | Sample Configuration | | ||
42 | + | description | Sample Description | | ||
43 | + | user | joaosilva | | ||
44 | + And I am on joaosilva's control panel | ||
45 | + When I create a Mezuro configuration with the following data | ||
46 | + | Title | Sample Configuration | | ||
47 | + | Description | Sample Description | | ||
48 | + | Clone | None | | ||
49 | + Then I should see "Slug The title (article name) is already being used by another article, please use another title." | ||
50 | + | ||
51 | + @selenium @kalibro_restart | ||
52 | + Scenario: I see a Mezuro configuration edit form | ||
53 | + Given I have a Mezuro configuration with the following data | ||
54 | + | name | Sample Configuration | | ||
55 | + | description | Sample Description | | ||
56 | + | user | joaosilva | | ||
57 | + And I am on article "Sample Configuration" | ||
58 | + When I follow "Edit" | ||
59 | + Then I should see "Sample Configuration" in the "article_name" input | ||
60 | + And I should see "Sample Description" in the "article_description" input | ||
61 | + And I should see "Save" button | ||
62 | + | ||
63 | + @selenium @kalibro_restart | ||
64 | + Scenario: I edit a Mezuro configuration with valid attributes | ||
65 | + Given I have a Mezuro configuration with the following data | ||
66 | + | name | Sample Configuration | | ||
67 | + | description | Sample Description | | ||
68 | + | user | joaosilva | | ||
69 | + And I am on article "Sample Configuration" | ||
70 | + And I follow "Edit" | ||
71 | + When I fill the fields with the new following data | ||
72 | + | article_name | Another Configuration | | ||
73 | + | article_description | Another Description | | ||
74 | + And I press "Save" | ||
75 | + Then I should see "Another Configuration" | ||
76 | + And I should see "Another Description" | ||
77 | + And I should see "Add Metric" | ||
78 | + | ||
79 | + @selenium @kalibro_restart | ||
80 | + Scenario: I try to edit a Mezuro configuration leaving empty its title | ||
81 | + Given I have a Mezuro configuration with the following data | ||
82 | + | name | Sample Configuration | | ||
83 | + | description | Sample Description | | ||
84 | + | user | joaosilva | | ||
85 | + And I am on article "Sample Configuration" | ||
86 | + And I follow "Edit" | ||
87 | + When I erase the "article_name" field | ||
88 | + And I press "Save" | ||
89 | + Then I should see "Title can't be blank" | ||
90 | + | ||
91 | + @selenium @kalibro_restart | ||
92 | + Scenario: I try to edit a Mezuro configuration with title of an existing Mezuro Configuration | ||
93 | + Given I have a Mezuro configuration with the following data | ||
94 | + | name | Sample Configuration | | ||
95 | + | description | Sample Description | | ||
96 | + | user | joaosilva | | ||
97 | + And I have a Mezuro configuration with the following data | ||
98 | + | name | Another Configuration | | ||
99 | + | description | Another Description | | ||
100 | + | user | joaosilva | | ||
101 | + And I am on article "Sample Configuration" | ||
102 | + And I follow "Edit" | ||
103 | + When I fill the fields with the new following data | ||
104 | + | article_name | Another Configuration | | ||
105 | + | article_description | Another Description | | ||
106 | + And I press "Save" | ||
107 | + Then I should see "Slug The title (article name) is already being used by another article, please use another title." | ||
108 | + | ||
109 | + @selenium @kalibro_restart | ||
110 | + Scenario: I delete a Mezuro configuration that belongs to me | ||
111 | + Given I have a Mezuro configuration with the following data | ||
112 | + | name | Sample Configuration | | ||
113 | + | description | Sample Description | | ||
114 | + | user | joaosilva | | ||
115 | + And I am on article "Sample Configuration" | ||
116 | + When I follow "Delete" | ||
117 | + And I confirm the "Are you sure that you want to remove the item "Sample Configuration"?" dialog | ||
118 | + Then I go to /joaosilva/sample-configuration | ||
119 | + And I should see "There is no such page: /joaosilva/sample-configuration" | ||
120 | + | ||
121 | + @selenium @kalibro_restart | ||
122 | + Scenario: I cannot edit or delete a Mezuro configuration that doesn't belong to me | ||
123 | + Given I have a Mezuro configuration with the following data | ||
124 | + | name | Sample Configuration | | ||
125 | + | description | Sample Description | | ||
126 | + | user | joaosilva | | ||
127 | + And the following users | ||
128 | + | login | name | | ||
129 | + | adminuser | Admin | | ||
130 | + And I am logged in as "adminuser" | ||
131 | + When I am on article "Sample Configuration" | ||
132 | + Then I should not see "Delete" | ||
133 | + And I should not see "Edit" | ||
134 | + |
plugins/mezuro/features/reading.feature
@@ -23,7 +23,7 @@ Feature: Reading | @@ -23,7 +23,7 @@ Feature: Reading | ||
23 | And I should see "Color" | 23 | And I should see "Color" |
24 | And I should see "Save" button | 24 | And I should see "Save" button |
25 | 25 | ||
26 | - @kalibro_restart @current | 26 | + @selenium @kalibro_restart |
27 | Scenario: I want to add a reading with no name | 27 | Scenario: I want to add a reading with no name |
28 | When I follow "Add Reading" | 28 | When I follow "Add Reading" |
29 | When I fill the fields with the new following data | 29 | When I fill the fields with the new following data |