2016-06-02 11:05:42 +05:30
|
|
|
require 'spec_helper'
|
|
|
|
|
2017-09-10 17:25:29 +05:30
|
|
|
feature 'Master updates tag' do
|
2016-06-02 11:05:42 +05:30
|
|
|
let(:user) { create(:user) }
|
2017-09-10 17:25:29 +05:30
|
|
|
let(:project) { create(:project, :repository, namespace: user.namespace) }
|
2016-06-02 11:05:42 +05:30
|
|
|
|
|
|
|
before do
|
2018-03-17 18:26:18 +05:30
|
|
|
project.add_master(user)
|
2017-09-10 17:25:29 +05:30
|
|
|
sign_in(user)
|
|
|
|
visit project_tags_path(project)
|
2016-06-02 11:05:42 +05:30
|
|
|
end
|
|
|
|
|
|
|
|
context 'from the tags list page' do
|
|
|
|
scenario 'updates the release notes' do
|
2016-06-16 23:09:34 +05:30
|
|
|
page.within(first('.content-list .controls')) do
|
2016-06-02 11:05:42 +05:30
|
|
|
click_link 'Edit release notes'
|
|
|
|
end
|
|
|
|
|
|
|
|
fill_in 'release_description', with: 'Awesome release notes'
|
|
|
|
click_button 'Save changes'
|
|
|
|
|
|
|
|
expect(current_path).to eq(
|
2017-09-10 17:25:29 +05:30
|
|
|
project_tag_path(project, 'v1.1.0'))
|
2016-06-02 11:05:42 +05:30
|
|
|
expect(page).to have_content 'v1.1.0'
|
|
|
|
expect(page).to have_content 'Awesome release notes'
|
|
|
|
end
|
2017-09-10 17:25:29 +05:30
|
|
|
|
|
|
|
scenario 'description has autocomplete', :js do
|
|
|
|
page.within(first('.content-list .controls')) do
|
|
|
|
click_link 'Edit release notes'
|
|
|
|
end
|
|
|
|
|
|
|
|
find('#release_description').native.send_keys('')
|
|
|
|
fill_in 'release_description', with: '@'
|
|
|
|
|
|
|
|
expect(page).to have_selector('.atwho-view')
|
|
|
|
end
|
2016-06-02 11:05:42 +05:30
|
|
|
end
|
|
|
|
|
|
|
|
context 'from a specific tag page' do
|
|
|
|
scenario 'updates the release notes' do
|
|
|
|
click_on 'v1.1.0'
|
|
|
|
click_link 'Edit release notes'
|
|
|
|
fill_in 'release_description', with: 'Awesome release notes'
|
|
|
|
click_button 'Save changes'
|
|
|
|
|
|
|
|
expect(current_path).to eq(
|
2017-09-10 17:25:29 +05:30
|
|
|
project_tag_path(project, 'v1.1.0'))
|
2016-06-02 11:05:42 +05:30
|
|
|
expect(page).to have_content 'v1.1.0'
|
|
|
|
expect(page).to have_content 'Awesome release notes'
|
|
|
|
end
|
|
|
|
end
|
|
|
|
end
|