diff --git a/features/step_definitions/mezuro_steps.rb b/features/step_definitions/mezuro_steps.rb index ea82480..3339751 100644 --- a/features/step_definitions/mezuro_steps.rb +++ b/features/step_definitions/mezuro_steps.rb @@ -52,6 +52,10 @@ Then /^I should see "([^"]*)" button$/ do |button_name| find_button(button_name).should_not be_nil end +Then /^I should see "([^"]*)" in a link$/ do |link_name| + find_link(link_name).should_not be_nil +end + Then /^I should not see "([^"]*)" button$/ do |button_name| find_button(button_name).should be_nil end diff --git a/plugins/mezuro/features/reading.feature b/plugins/mezuro/features/reading.feature new file mode 100644 index 0000000..a385a62 --- /dev/null +++ b/plugins/mezuro/features/reading.feature @@ -0,0 +1,34 @@ +Feature: Reading + As a Mezuro user + I want to create, edit and remove a reading + + Background: + Given the following users + | login | name | + | joaosilva | Joao Silva | + And I am logged in as "joaosilva" + And "Mezuro" plugin is enabled + And I have a Mezuro reading group with the following data + | name | Sample Reading Group | + | description | Sample Description | + | user | joaosilva | + And I am on article "Sample Reading Group" + + @selenium @kalibro_restart + Scenario: I want to see the Mezuro reading input form + When I follow "Add Reading" + Then I should see "Sample Reading Group Reading Group" in a link + And I should see "Label" + And I should see "Grade" + And I should see "Color" + And I should see "Save" button + + @kalibro_restart @current + Scenario: I want to add a reading with no name + When I follow "Add Reading" + When I fill the fields with the new following data + | reading_label | | + | reading_grade | 10.2 | + | reading_color | ABCDEF | + And I press "Save" + Then I should see "Please fill all fields marked with (*)." inside an alert -- libgit2 0.21.2