Commit 324090c8abbd3d7feb7a60bfd431edf999a4a9c6
1 parent
df92a500
Exists in
master
and in
29 other branches
Extract content creation into a step
Showing
2 changed files
with
13 additions
and
12 deletions
Show diff stats
@@ -0,0 +1,10 @@ | @@ -0,0 +1,10 @@ | ||
1 | +When /^I create a content of type "([^\"]*)" with the following data$/ do |content_type, fields| | ||
2 | + click_link "New content" | ||
3 | + click_link content_type | ||
4 | + | ||
5 | + fields.rows_hash.each do |name, value| | ||
6 | + When %{I fill in "#{name}" with "#{value}"} | ||
7 | + end | ||
8 | + | ||
9 | + click_button "Save" | ||
10 | +end |
plugins/mezuro/features/mezuro.feature
@@ -35,41 +35,32 @@ Feature: mezuro content | @@ -35,41 +35,32 @@ Feature: mezuro content | ||
35 | 35 | ||
36 | Scenario: I create a sample mezuro content | 36 | Scenario: I create a sample mezuro content |
37 | Given I am on My Community's cms | 37 | Given I am on My Community's cms |
38 | - And I follow "New content" | ||
39 | - And I follow "Kalibro project" | ||
40 | - And I fill in the following: | 38 | + When I create a content of type "Kalibro project" with the following data |
41 | | Title | Sample project | | 39 | | Title | Sample project | |
42 | | License | BSD | | 40 | | License | BSD | |
43 | | Repository type | GIT | | 41 | | Repository type | GIT | |
44 | | Repository url | git://example | | 42 | | Repository url | git://example | |
45 | - And I press "Save" | ||
46 | Then I should see "Sample project" | 43 | Then I should see "Sample project" |
47 | And I should see "Viewed one time" | 44 | And I should see "Viewed one time" |
48 | And I should see "BSD" | 45 | And I should see "BSD" |
49 | 46 | ||
50 | Scenario: I create a real mezuro content | 47 | Scenario: I create a real mezuro content |
51 | Given I am on My Community's cms | 48 | Given I am on My Community's cms |
52 | - And I follow "New content" | ||
53 | - And I follow "Kalibro project" | ||
54 | - And I fill in the following: | 49 | + When I create a content of type "Kalibro project" with the following data |
55 | | Title | Qt-Calculator | | 50 | | Title | Qt-Calculator | |
56 | | License | GPL 2.0 | | 51 | | License | GPL 2.0 | |
57 | | Repository type | SUBVERSION | | 52 | | Repository type | SUBVERSION | |
58 | | Repository url | https://qt-calculator.svn.sourceforge.net/svnroot/qt-calculator | | 53 | | Repository url | https://qt-calculator.svn.sourceforge.net/svnroot/qt-calculator | |
59 | - And I press "Save" | ||
60 | Then I should see "Qt-Calculator" | 54 | Then I should see "Qt-Calculator" |
61 | 55 | ||
62 | Scenario: I see results from a real Kalibro project | 56 | Scenario: I see results from a real Kalibro project |
63 | Given I am on My Community's cms | 57 | Given I am on My Community's cms |
64 | - And I follow "New content" | ||
65 | - And I follow "Kalibro project" | ||
66 | - And I fill in the following: | 58 | + When I create a content of type "Kalibro project" with the following data |
67 | | Title | Qt-Calculator | | 59 | | Title | Qt-Calculator | |
68 | | License | GPL | | 60 | | License | GPL | |
69 | | Repository type | SUBVERSION | | 61 | | Repository type | SUBVERSION | |
70 | | Repository url | https://qt-calculator.svn.sourceforge.net/svnroot/qt-calculator | | 62 | | Repository url | https://qt-calculator.svn.sourceforge.net/svnroot/qt-calculator | |
71 | | Configuration | Kalibro for Java | | 63 | | Configuration | Kalibro for Java | |
72 | - And I press "Save" | ||
73 | Then I should see "Qt-Calculator" | 64 | Then I should see "Qt-Calculator" |
74 | And I should see "GPL" | 65 | And I should see "GPL" |
75 | And I should see "SUBVERSION" | 66 | And I should see "SUBVERSION" |