diff options
author | Winnie Hellmann <winnie@gitlab.com> | 2017-05-16 10:32:53 +0000 |
---|---|---|
committer | Phil Hughes <me@iamphill.com> | 2017-05-16 10:32:53 +0000 |
commit | 2e89eb6a494fa44d254939ea22c20cc557105ee2 (patch) | |
tree | 4b3e815c700be99e2ec452c6bc5c98fdd517805a /spec | |
parent | 051aaf8e53e196fb31a6b3f30cf48306251149da (diff) | |
download | gitlab-ce-2e89eb6a494fa44d254939ea22c20cc557105ee2.tar.gz |
Replace broken autocomplete field for new tags with dropdown
Diffstat (limited to 'spec')
-rw-r--r-- | spec/features/tags/master_creates_tag_spec.rb | 16 |
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' |