Commit 0462d511970057101868ebee8e9462f56cbca398
1 parent
8eec1318
Exists in
colab
and in
4 other branches
Added acceptance tests for colorpicker presence
signed-off-by: Pedro Bruel <pedro.bruel@gmail.com>
Showing
2 changed files
with
14 additions
and
1 deletions
Show diff stats
features/reading/new.feature
| @@ -14,6 +14,7 @@ Feature: New reading | @@ -14,6 +14,7 @@ Feature: New reading | ||
| 14 | And I should see "Label" | 14 | And I should see "Label" |
| 15 | And I should see "Grade" | 15 | And I should see "Grade" |
| 16 | And I should see "Color" | 16 | And I should see "Color" |
| 17 | + And I press the Pick color button | ||
| 17 | 18 | ||
| 18 | @kalibro_restart | 19 | @kalibro_restart |
| 19 | Scenario: With valid fields | 20 | Scenario: With valid fields |
| @@ -26,7 +27,16 @@ Feature: New reading | @@ -26,7 +27,16 @@ Feature: New reading | ||
| 26 | And I fill the Color field with "00000ff00" | 27 | And I fill the Color field with "00000ff00" |
| 27 | When I press the Save button | 28 | When I press the Save button |
| 28 | Then I should be in the Sample Reading Group page | 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 | @kalibro_restart | 40 | @kalibro_restart |
| 31 | Scenario: With an existing label (Label uniqueness test) | 41 | Scenario: With an existing label (Label uniqueness test) |
| 32 | Given I am a regular user | 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,3 +22,6 @@ Then(/^I should be at the New Reading page$/) do | ||
| 22 | visit new_reading_group_reading_path(@reading_group.id) | 22 | visit new_reading_group_reading_path(@reading_group.id) |
| 23 | end | 23 | end |
| 24 | 24 | ||
| 25 | +Then(/^I should see a color picker Canvas$/) do | ||
| 26 | + page.find('div.colorpicker') | ||
| 27 | +end |