Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRobert Schilling <rschilling@student.tugraz.at>2014-08-12 01:59:30 +0400
committerRobert Schilling <rschilling@student.tugraz.at>2014-08-13 17:48:26 +0400
commita3c969cd92a2f658d322bec1cfe07c520b678bf7 (patch)
treeb06cef7d6227c5e3b9129f9c80a50968ff0f28bb /features
parent6085b6a765f4db9c167fb607af5f605f0d9b586d (diff)
Add testcase for invalid color
Diffstat (limited to 'features')
-rw-r--r--features/project/issues/labels.feature5
-rw-r--r--features/steps/project/labels.rb12
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'