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:
authorSimon Knox <psimyn@gmail.com>2017-09-19 16:01:01 +0300
committerSimon Knox <psimyn@gmail.com>2017-10-13 03:11:02 +0300
commitc9a7f51b0f5b1c15c71762a59e9297424ac2af31 (patch)
tree44053e1691431a4253e77c05775c668884f95147 /spec/features/boards
parente49e443b70fc819bf19866523f08ef0707e1b5a4 (diff)
backport for gitlab-ee!2869
Diffstat (limited to 'spec/features/boards')
-rw-r--r--spec/features/boards/sidebar_spec.rb32
1 files changed, 17 insertions, 15 deletions
diff --git a/spec/features/boards/sidebar_spec.rb b/spec/features/boards/sidebar_spec.rb
index c4817eb947b..4965f803883 100644
--- a/spec/features/boards/sidebar_spec.rb
+++ b/spec/features/boards/sidebar_spec.rb
@@ -1,6 +1,8 @@
require 'rails_helper'
describe 'Issue Boards', :js do
+ include BoardHelpers
+
let(:user) { create(:user) }
let(:user2) { create(:user) }
let(:project) { create(:project, :public) }
@@ -309,6 +311,21 @@ describe 'Issue Boards', :js do
expect(card).to have_selector('.label', count: 1)
expect(card).not_to have_content(stretch.title)
end
+
+ it 'creates new label' do
+ click_card(card)
+
+ page.within('.labels') do
+ click_link 'Edit'
+ click_link 'Create new label'
+ fill_in 'new_label_name', with: 'test label'
+ first('.suggest-colors-dropdown a').click
+ click_button 'Create'
+ wait_for_requests
+
+ expect(page).to have_link 'test label'
+ end
+ end
end
context 'subscription' do
@@ -322,19 +339,4 @@ describe 'Issue Boards', :js do
end
end
end
-
- def click_card(card)
- page.within(card) do
- first('.card-number').click
- end
-
- wait_for_sidebar
- end
-
- def wait_for_sidebar
- # loop until the CSS transition is complete
- Timeout.timeout(0.5) do
- loop until evaluate_script('$(".right-sidebar").outerWidth()') == 290
- end
- end
end