Commit 324090c8abbd3d7feb7a60bfd431edf999a4a9c6
1 parent
df92a500
Exists in
staging
and in
42 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 @@ |
| 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 | 35 | |
| 36 | 36 | Scenario: I create a sample mezuro content |
| 37 | 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 | 39 | | Title | Sample project | |
| 42 | 40 | | License | BSD | |
| 43 | 41 | | Repository type | GIT | |
| 44 | 42 | | Repository url | git://example | |
| 45 | - And I press "Save" | |
| 46 | 43 | Then I should see "Sample project" |
| 47 | 44 | And I should see "Viewed one time" |
| 48 | 45 | And I should see "BSD" |
| 49 | 46 | |
| 50 | 47 | Scenario: I create a real mezuro content |
| 51 | 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 | 50 | | Title | Qt-Calculator | |
| 56 | 51 | | License | GPL 2.0 | |
| 57 | 52 | | Repository type | SUBVERSION | |
| 58 | 53 | | Repository url | https://qt-calculator.svn.sourceforge.net/svnroot/qt-calculator | |
| 59 | - And I press "Save" | |
| 60 | 54 | Then I should see "Qt-Calculator" |
| 61 | 55 | |
| 62 | 56 | Scenario: I see results from a real Kalibro project |
| 63 | 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 | 59 | | Title | Qt-Calculator | |
| 68 | 60 | | License | GPL | |
| 69 | 61 | | Repository type | SUBVERSION | |
| 70 | 62 | | Repository url | https://qt-calculator.svn.sourceforge.net/svnroot/qt-calculator | |
| 71 | 63 | | Configuration | Kalibro for Java | |
| 72 | - And I press "Save" | |
| 73 | 64 | Then I should see "Qt-Calculator" |
| 74 | 65 | And I should see "GPL" |
| 75 | 66 | And I should see "SUBVERSION" | ... | ... |