diff options
Diffstat (limited to 'features')
| -rw-r--r-- | features/project/issues/labels.feature | 5 | ||||
| -rw-r--r-- | features/steps/project/labels.rb | 12 |
2 files changed, 17 insertions, 0 deletions
diff --git a/features/project/issues/labels.feature b/features/project/issues/labels.feature index 4a37b6dc9fa..b88108af719 100644 --- a/features/project/issues/labels.feature +++ b/features/project/issues/labels.feature @@ -23,3 +23,8 @@ Feature: Project Labels Scenario: I remove label When I remove label 'bug' Then I should not see label 'bug' + + Scenario: I create a label with invalid color + Given I visit new label page + When I submit new label with invalid color + Then I should see label color error message diff --git a/features/steps/project/labels.rb b/features/steps/project/labels.rb index 3d9aa29299c..12ce23da832 100644 --- a/features/steps/project/labels.rb +++ b/features/steps/project/labels.rb @@ -31,6 +31,18 @@ class ProjectLabels < Spinach::FeatureSteps click_button 'Save' end + step 'I submit new label with invalid color' do + fill_in 'Title', with: 'support' + fill_in 'Background Color', with: '#12' + click_button 'Save' + end + + step 'I should see label color error message' do + within '.label-form' do + page.should have_content 'Color is invalid' + end + end + step 'I should not see label \'bug\'' do within '.manage-labels-list' do page.should_not have_content 'bug' |
