diff --git a/features/step_definitions/content_steps.rb b/features/step_definitions/content_steps.rb new file mode 100644 index 0000000..20ebd3c --- /dev/null +++ b/features/step_definitions/content_steps.rb @@ -0,0 +1,10 @@ +When /^I create a content of type "([^\"]*)" with the following data$/ do |content_type, fields| + click_link "New content" + click_link content_type + + fields.rows_hash.each do |name, value| + When %{I fill in "#{name}" with "#{value}"} + end + + click_button "Save" +end diff --git a/plugins/mezuro/features/mezuro.feature b/plugins/mezuro/features/mezuro.feature index f3078f0..cd82b68 100644 --- a/plugins/mezuro/features/mezuro.feature +++ b/plugins/mezuro/features/mezuro.feature @@ -35,41 +35,32 @@ Feature: mezuro content Scenario: I create a sample mezuro content Given I am on My Community's cms - And I follow "New content" - And I follow "Kalibro project" - And I fill in the following: + When I create a content of type "Kalibro project" with the following data | Title | Sample project | | License | BSD | | Repository type | GIT | | Repository url | git://example | - And I press "Save" Then I should see "Sample project" And I should see "Viewed one time" And I should see "BSD" Scenario: I create a real mezuro content Given I am on My Community's cms - And I follow "New content" - And I follow "Kalibro project" - And I fill in the following: + When I create a content of type "Kalibro project" with the following data | Title | Qt-Calculator | | License | GPL 2.0 | | Repository type | SUBVERSION | | Repository url | https://qt-calculator.svn.sourceforge.net/svnroot/qt-calculator | - And I press "Save" Then I should see "Qt-Calculator" Scenario: I see results from a real Kalibro project Given I am on My Community's cms - And I follow "New content" - And I follow "Kalibro project" - And I fill in the following: + When I create a content of type "Kalibro project" with the following data | Title | Qt-Calculator | | License | GPL | | Repository type | SUBVERSION | | Repository url | https://qt-calculator.svn.sourceforge.net/svnroot/qt-calculator | | Configuration | Kalibro for Java | - And I press "Save" Then I should see "Qt-Calculator" And I should see "GPL" And I should see "SUBVERSION" -- libgit2 0.21.2