Commit 1b8945a77460ffa53e0d02ee45e71a35a0dd12ad

Authored by Diego Camarinha
Committed by Paulo Meireles
1 parent 6df08cce

[Mezuro] Creating project feature.

features/step_definitions/mezuro_steps.rb
@@ -33,6 +33,14 @@ Then /^I should see "([^\"]*)" inside an alert$/ do |message| @@ -33,6 +33,14 @@ Then /^I should see "([^\"]*)" inside an alert$/ do |message|
33 selenium.chooseOkOnNextConfirmation(); 33 selenium.chooseOkOnNextConfirmation();
34 end 34 end
35 35
  36 +Then /^I should see "([^"]*)" in the "([^"]*)" input$/ do |content, labeltext|
  37 + find_field("#{labeltext}").value.should == content
  38 +end
  39 +
  40 +Then /^I should see "([^"]*)" in the "([^"]*)" button$/ do |content, button_class|
  41 + find_button("#{button_class}").value.should == content
  42 +end
  43 +
36 When /^I have a Mezuro project with the following data$/ do |fields| 44 When /^I have a Mezuro project with the following data$/ do |fields|
37 item = {} 45 item = {}
38 fields.rows_hash.each do |name, value| 46 fields.rows_hash.each do |name, value|
plugins/mezuro/features/project.feature
@@ -30,17 +30,17 @@ Feature: Project @@ -30,17 +30,17 @@ Feature: Project
30 30
31 @selenium 31 @selenium
32 Scenario: I edit a Mezuro project 32 Scenario: I edit a Mezuro project
33 - When I have a Mezuro project with the following data 33 + Given I have a Mezuro project with the following data
34 | name | Sample Project | 34 | name | Sample Project |
35 | description | Sample Description | 35 | description | Sample Description |
36 | community | mycommunity | 36 | community | mycommunity |
37 And I am on article "Sample Project" 37 And I am on article "Sample Project"
38 And I should be on /mycommunity/sample-project 38 And I should be on /mycommunity/sample-project
39 - Then I should see "Sample Project"  
40 - And I should see "Sample Description"  
41 - And I should see "Add Repository"  
42 When I follow "Edit" 39 When I follow "Edit"
43 - # Not complete 40 + Then I should see "Sample Project" in the "article_name" input
  41 + And I should see "Sample Description" in the "article_description" input
  42 + And I should see "Save" button
  43 +
44 44
45 # @selenium 45 # @selenium
46 # Scenario: I delete a Mezuro project that belongs to me 46 # Scenario: I delete a Mezuro project that belongs to me