summaryrefslogtreecommitdiff
path: root/features/steps/project/labels.rb
diff options
context:
space:
mode:
Diffstat (limited to 'features/steps/project/labels.rb')
-rw-r--r--features/steps/project/labels.rb18
1 files changed, 18 insertions, 0 deletions
diff --git a/features/steps/project/labels.rb b/features/steps/project/labels.rb
index 12ce23da832..8320405e096 100644
--- a/features/steps/project/labels.rb
+++ b/features/steps/project/labels.rb
@@ -31,18 +31,36 @@ class ProjectLabels < Spinach::FeatureSteps
click_button 'Save'
end
+ step 'I submit new label \'bug\'' do
+ fill_in 'Title', with: 'bug'
+ fill_in 'Background Color', with: '#F95610'
+ 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 label exist error message' do
+ within '.label-form' do
+ page.should have_content 'Title has already been taken'
+ end
+ 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 see label \'bug\'' do
+ within '.manage-labels-list' do
+ page.should have_content 'bug'
+ end
+ end
+
step 'I should not see label \'bug\'' do
within '.manage-labels-list' do
page.should_not have_content 'bug'