summaryrefslogtreecommitdiff
path: root/spec
diff options
context:
space:
mode:
authorPhil Hughes <me@iamphill.com>2017-05-16 10:32:55 +0000
committerkushalpandya <kushal@gitlab.com>2017-05-19 14:04:54 +0530
commit05aad53440547306771390d2958b4bd4b831b8aa (patch)
treee0e66d4448af87388d47ec9b4891ba6e4eea018f /spec
parentc5247a596d0dded76e4f9589a6c5e284583affa9 (diff)
downloadgitlab-ce-05aad53440547306771390d2958b4bd4b831b8aa.tar.gz
Merge branch 'winh-autocomplete-error' into 'master'
Replace broken autocomplete field for new tags with dropdown Closes #32127 See merge request !11290
Diffstat (limited to 'spec')
-rw-r--r--spec/features/tags/master_creates_tag_spec.rb16
1 files changed, 15 insertions, 1 deletions
diff --git a/spec/features/tags/master_creates_tag_spec.rb b/spec/features/tags/master_creates_tag_spec.rb
index ca25c696f75..af25eebed13 100644
--- a/spec/features/tags/master_creates_tag_spec.rb
+++ b/spec/features/tags/master_creates_tag_spec.rb
@@ -51,10 +51,24 @@ feature 'Master creates tag', feature: true do
end
end
+ scenario 'opens dropdown for ref', js: true do
+ click_link 'New tag'
+ ref_row = find('.form-group:nth-of-type(2) .col-sm-10')
+ page.within ref_row do
+ ref_input = find('[name="ref"]', visible: false)
+ expect(ref_input.value).to eq 'master'
+ expect(find('.dropdown-toggle-text')).to have_content 'master'
+
+ find('.js-branch-select').trigger('click')
+
+ expect(find('.dropdown-menu')).to have_content 'empty-branch'
+ end
+ end
+
def create_tag_in_form(tag:, ref:, message: nil, desc: nil)
click_link 'New tag'
fill_in 'tag_name', with: tag
- fill_in 'ref', with: ref
+ find('#ref', visible: false).set(ref)
fill_in 'message', with: message unless message.nil?
fill_in 'release_description', with: desc unless desc.nil?
click_button 'Create tag'