Commit cc96bccc860ff729d90ed6d1e9cf6b039ec41c79
Committed by
Paulo Meireles
1 parent
70b6f54c
Exists in
master
and in
29 other branches
[Mezuro] Creating reading.feature
Showing
2 changed files
with
38 additions
and
0 deletions
Show diff stats
features/step_definitions/mezuro_steps.rb
@@ -52,6 +52,10 @@ Then /^I should see "([^"]*)" button$/ do |button_name| | @@ -52,6 +52,10 @@ Then /^I should see "([^"]*)" button$/ do |button_name| | ||
52 | find_button(button_name).should_not be_nil | 52 | find_button(button_name).should_not be_nil |
53 | end | 53 | end |
54 | 54 | ||
55 | +Then /^I should see "([^"]*)" in a link$/ do |link_name| | ||
56 | + find_link(link_name).should_not be_nil | ||
57 | +end | ||
58 | + | ||
55 | Then /^I should not see "([^"]*)" button$/ do |button_name| | 59 | Then /^I should not see "([^"]*)" button$/ do |button_name| |
56 | find_button(button_name).should be_nil | 60 | find_button(button_name).should be_nil |
57 | end | 61 | end |
@@ -0,0 +1,34 @@ | @@ -0,0 +1,34 @@ | ||
1 | +Feature: Reading | ||
2 | + As a Mezuro user | ||
3 | + I want to create, edit and remove a reading | ||
4 | + | ||
5 | + Background: | ||
6 | + Given the following users | ||
7 | + | login | name | | ||
8 | + | joaosilva | Joao Silva | | ||
9 | + And I am logged in as "joaosilva" | ||
10 | + And "Mezuro" plugin is enabled | ||
11 | + And I have a Mezuro reading group with the following data | ||
12 | + | name | Sample Reading Group | | ||
13 | + | description | Sample Description | | ||
14 | + | user | joaosilva | | ||
15 | + And I am on article "Sample Reading Group" | ||
16 | + | ||
17 | + @selenium @kalibro_restart | ||
18 | + Scenario: I want to see the Mezuro reading input form | ||
19 | + When I follow "Add Reading" | ||
20 | + Then I should see "Sample Reading Group Reading Group" in a link | ||
21 | + And I should see "Label" | ||
22 | + And I should see "Grade" | ||
23 | + And I should see "Color" | ||
24 | + And I should see "Save" button | ||
25 | + | ||
26 | + @kalibro_restart @current | ||
27 | + Scenario: I want to add a reading with no name | ||
28 | + When I follow "Add Reading" | ||
29 | + When I fill the fields with the new following data | ||
30 | + | reading_label | | | ||
31 | + | reading_grade | 10.2 | | ||
32 | + | reading_color | ABCDEF | | ||
33 | + And I press "Save" | ||
34 | + Then I should see "Please fill all fields marked with (*)." inside an alert |