diff options
author | Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com> | 2014-09-05 15:39:40 +0400 |
---|---|---|
committer | Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com> | 2014-09-05 15:39:40 +0400 |
commit | 60a98584f672bafdf86b410809fb408764ad8fe5 (patch) | |
tree | 92852fa4ce6de631306a0664b5cd38ad45442c3e /features | |
parent | 3a971ca9ef612f44950182ded49c3bf9907fa530 (diff) | |
parent | bd2355191fa45ec04ba7b79b7fcb2b26088abc16 (diff) |
Merge pull request #7658 from Razer6/refresh_labels_page_on_delete
Show labels help message if last label is deleted
Diffstat (limited to 'features')
-rw-r--r-- | features/project/issues/labels.feature | 5 | ||||
-rw-r--r-- | features/steps/project/labels.rb | 16 |
2 files changed, 21 insertions, 0 deletions
diff --git a/features/project/issues/labels.feature b/features/project/issues/labels.feature index 29cf5307271..77ee5d8a686 100644 --- a/features/project/issues/labels.feature +++ b/features/project/issues/labels.feature @@ -24,6 +24,11 @@ Feature: Project Labels When I remove label 'bug' Then I should not see label 'bug' + @javascript + Scenario: I remove all labels + When I delete all labels + Then I should see labels help message + Scenario: I create a label with invalid color Given I visit project "Shop" new label page When I submit new label with invalid color diff --git a/features/steps/project/labels.rb b/features/steps/project/labels.rb index 8320405e096..6dd4df8a1ad 100644 --- a/features/steps/project/labels.rb +++ b/features/steps/project/labels.rb @@ -25,6 +25,22 @@ class ProjectLabels < Spinach::FeatureSteps end end + step 'I delete all labels' do + within '.labels' do + all('.btn-remove').each do |remove| + remove.click + sleep 0.05 + end + end + end + + step 'I should see labels help message' do + within '.labels' do + page.should have_content 'Create first label or generate default set of '\ + 'labels' + end + end + step 'I submit new label \'support\'' do fill_in 'Title', with: 'support' fill_in 'Background Color', with: '#F95610' |