summaryrefslogtreecommitdiff
path: root/spec/features
diff options
context:
space:
mode:
authorAndré Luís <me@andr3.net>2018-04-18 22:29:58 +0000
committerMike Greiling <mike@pixelcog.com>2018-04-18 22:29:58 +0000
commitc352f695d7f27858fb011c60e4facfe9dbca6a59 (patch)
treedbbb35c4a1684799738a3230df03d1158b8278a4 /spec/features
parent8cce96b189393420b0c22fa1298f8d5db78bdf7a (diff)
downloadgitlab-ce-c352f695d7f27858fb011c60e4facfe9dbca6a59.tar.gz
Resolve "View labels when editing labels in sidebar and board sidebar"
Diffstat (limited to 'spec/features')
-rw-r--r--spec/features/boards/sidebar_spec.rb20
-rw-r--r--spec/features/issues/issue_sidebar_spec.rb9
2 files changed, 27 insertions, 2 deletions
diff --git a/spec/features/boards/sidebar_spec.rb b/spec/features/boards/sidebar_spec.rb
index d4c44c1adf9..4d31123a699 100644
--- a/spec/features/boards/sidebar_spec.rb
+++ b/spec/features/boards/sidebar_spec.rb
@@ -237,6 +237,22 @@ describe 'Issue Boards', :js do
end
context 'labels' do
+ it 'shows current labels when editing' do
+ click_card(card)
+
+ page.within('.labels') do
+ click_link 'Edit'
+
+ wait_for_requests
+
+ page.within('.value') do
+ expect(page).to have_selector('.label', count: 2)
+ expect(page).to have_content(development.title)
+ expect(page).to have_content(stretch.title)
+ end
+ end
+ end
+
it 'adds a single label' do
click_card(card)
@@ -296,7 +312,9 @@ describe 'Issue Boards', :js do
wait_for_requests
- click_link stretch.title
+ within('.dropdown-menu-labels') do
+ click_link stretch.title
+ end
wait_for_requests
diff --git a/spec/features/issues/issue_sidebar_spec.rb b/spec/features/issues/issue_sidebar_spec.rb
index 27551bb70ee..830c794376d 100644
--- a/spec/features/issues/issue_sidebar_spec.rb
+++ b/spec/features/issues/issue_sidebar_spec.rb
@@ -5,9 +5,9 @@ feature 'Issue Sidebar' do
let(:group) { create(:group, :nested) }
let(:project) { create(:project, :public, namespace: group) }
- let(:issue) { create(:issue, project: project) }
let!(:user) { create(:user)}
let!(:label) { create(:label, project: project, title: 'bug') }
+ let(:issue) { create(:labeled_issue, project: project, labels: [label]) }
let!(:xss_label) { create(:label, project: project, title: '&lt;script&gt;alert("xss");&lt;&#x2F;script&gt;') }
before do
@@ -112,11 +112,18 @@ feature 'Issue Sidebar' do
context 'editing issue labels', :js do
before do
+ issue.update_attributes(labels: [label])
page.within('.block.labels') do
find('.edit-link').click
end
end
+ it 'shows the current set of labels' do
+ page.within('.issuable-show-labels') do
+ expect(page).to have_content label.title
+ end
+ end
+
it 'shows option to create a project label' do
page.within('.block.labels') do
expect(page).to have_content 'Create project'