Commit 0462d511970057101868ebee8e9462f56cbca398

Authored by Thiago Kenji Okada
1 parent 8eec1318

Added acceptance tests for colorpicker presence

signed-off-by: Pedro Bruel <pedro.bruel@gmail.com>
features/reading/new.feature
... ... @@ -14,6 +14,7 @@ Feature: New reading
14 14 And I should see "Label"
15 15 And I should see "Grade"
16 16 And I should see "Color"
  17 + And I press the Pick color button
17 18  
18 19 @kalibro_restart
19 20 Scenario: With valid fields
... ... @@ -26,7 +27,16 @@ Feature: New reading
26 27 And I fill the Color field with "00000ff00"
27 28 When I press the Save button
28 29 Then I should be in the Sample Reading Group page
29   -
  30 +
  31 + @kalibro_restart @javascript
  32 + Scenario: Using Colorpicker
  33 + Given I am a regular user
  34 + And I am signed in
  35 + And I own a sample reading group
  36 + And I am at the New Reading page
  37 + When I press the Pick color button
  38 + Then I should see a color picker Canvas
  39 +
30 40 @kalibro_restart
31 41 Scenario: With an existing label (Label uniqueness test)
32 42 Given I am a regular user
... ...
features/step_definitions/reading_steps.rb
... ... @@ -22,3 +22,6 @@ Then(/^I should be at the New Reading page$/) do
22 22 visit new_reading_group_reading_path(@reading_group.id)
23 23 end
24 24  
  25 +Then(/^I should see a color picker Canvas$/) do
  26 + page.find('div.colorpicker')
  27 +end
... ...