Skip to content
Snippets Groups Projects
Commit af5da756 authored by Takuya Noguchi's avatar Takuya Noguchi Committed by Rémy Coutable
Browse files
parent 423c4c43
No related branches found
No related tags found
No related merge requests found
Showing
with 54 additions and 54 deletions
Loading
Loading
@@ -7373,13 +7373,13 @@ msgstr ""
msgid "JiraService|If different from Web URL"
msgstr ""
 
msgid "JiraService|JIRA API URL"
msgid "JiraService|Jira API URL"
msgstr ""
 
msgid "JiraService|JIRA comments will be created when an issue gets referenced in a commit."
msgid "JiraService|Jira comments will be created when an issue gets referenced in a commit."
msgstr ""
 
msgid "JiraService|JIRA comments will be created when an issue gets referenced in a merge request."
msgid "JiraService|Jira comments will be created when an issue gets referenced in a merge request."
msgstr ""
 
msgid "JiraService|Jira issue tracker"
Loading
Loading
Loading
Loading
@@ -7477,13 +7477,13 @@ msgstr ""
msgid "JiraService|If different from Web URL"
msgstr ""
 
msgid "JiraService|JIRA API URL"
msgid "JiraService|Jira API URL"
msgstr ""
 
msgid "JiraService|JIRA comments will be created when an issue gets referenced in a commit."
msgid "JiraService|Jira comments will be created when an issue gets referenced in a commit."
msgstr ""
 
msgid "JiraService|JIRA comments will be created when an issue gets referenced in a merge request."
msgid "JiraService|Jira comments will be created when an issue gets referenced in a merge request."
msgstr ""
 
msgid "JiraService|Jira issue tracker"
Loading
Loading
Loading
Loading
@@ -7321,13 +7321,13 @@ msgstr "%{noteable_model_name} 事件已禁用。"
msgid "JiraService|If different from Web URL"
msgstr "如果与 Web URL 不同"
 
msgid "JiraService|JIRA API URL"
msgid "JiraService|Jira API URL"
msgstr "JIRA API URL"
 
msgid "JiraService|JIRA comments will be created when an issue gets referenced in a commit."
msgid "JiraService|Jira comments will be created when an issue gets referenced in a commit."
msgstr "在提交中引用议题时将创建 JIRA 评论。"
 
msgid "JiraService|JIRA comments will be created when an issue gets referenced in a merge request."
msgid "JiraService|Jira comments will be created when an issue gets referenced in a merge request."
msgstr "在合并请求中引用议题时将创建 JIRA 评论。"
 
msgid "JiraService|Jira issue tracker"
Loading
Loading
Loading
Loading
@@ -7321,13 +7321,13 @@ msgstr ""
msgid "JiraService|If different from Web URL"
msgstr ""
 
msgid "JiraService|JIRA API URL"
msgid "JiraService|Jira API URL"
msgstr ""
 
msgid "JiraService|JIRA comments will be created when an issue gets referenced in a commit."
msgid "JiraService|Jira comments will be created when an issue gets referenced in a commit."
msgstr ""
 
msgid "JiraService|JIRA comments will be created when an issue gets referenced in a merge request."
msgid "JiraService|Jira comments will be created when an issue gets referenced in a merge request."
msgstr ""
 
msgid "JiraService|Jira issue tracker"
Loading
Loading
Loading
Loading
@@ -7321,13 +7321,13 @@ msgstr ""
msgid "JiraService|If different from Web URL"
msgstr ""
 
msgid "JiraService|JIRA API URL"
msgid "JiraService|Jira API URL"
msgstr ""
 
msgid "JiraService|JIRA comments will be created when an issue gets referenced in a commit."
msgid "JiraService|Jira comments will be created when an issue gets referenced in a commit."
msgstr ""
 
msgid "JiraService|JIRA comments will be created when an issue gets referenced in a merge request."
msgid "JiraService|Jira comments will be created when an issue gets referenced in a merge request."
msgstr ""
 
msgid "JiraService|Jira issue tracker"
Loading
Loading
Loading
Loading
@@ -128,7 +128,7 @@ describe Projects::ServicesController do
params: { namespace_id: project.namespace, project_id: project, id: service.to_param, service: { active: true } }
 
expect(response).to redirect_to(project_settings_integrations_path(project))
expect(flash[:notice]).to eq 'JIRA activated.'
expect(flash[:notice]).to eq 'Jira activated.'
end
end
 
Loading
Loading
@@ -137,17 +137,17 @@ describe Projects::ServicesController do
put :update,
params: { namespace_id: project.namespace, project_id: project, id: service.to_param, service: { active: false } }
 
expect(flash[:notice]).to eq 'JIRA settings saved, but not activated.'
expect(flash[:notice]).to eq 'Jira settings saved, but not activated.'
end
end
 
context 'when activating JIRA service from a template' do
context 'when activating Jira service from a template' do
let(:template_service) { create(:jira_service, project: project, template: true) }
 
it 'activate JIRA service from template' do
it 'activate Jira service from template' do
put :update, params: { namespace_id: project.namespace, project_id: project, id: service.to_param, service: { active: true } }
 
expect(flash[:notice]).to eq 'JIRA activated.'
expect(flash[:notice]).to eq 'Jira activated.'
end
end
end
Loading
Loading
Loading
Loading
@@ -29,27 +29,27 @@ describe 'User activates Jira', :js do
server_info = { key: 'value' }.to_json
WebMock.stub_request(:get, test_url).with(basic_auth: %w(username password)).to_return(body: server_info)
 
click_link('JIRA')
click_link('Jira')
fill_form
click_button('Test settings and save changes')
wait_for_requests
end
 
it 'activates the JIRA service' do
expect(page).to have_content('JIRA activated.')
it 'activates the Jira service' do
expect(page).to have_content('Jira activated.')
expect(current_path).to eq(project_settings_integrations_path(project))
end
 
it 'shows the JIRA link in the menu' do
it 'shows the Jira link in the menu' do
page.within('.nav-sidebar') do
expect(page).to have_link('JIRA', href: url)
expect(page).to have_link('Jira', href: url)
end
end
end
 
context 'when Jira connection test fails' do
it 'shows errors when some required fields are not filled in' do
click_link('JIRA')
click_link('Jira')
 
check 'Active'
fill_in 'service_password', with: 'password'
Loading
Loading
@@ -60,11 +60,11 @@ describe 'User activates Jira', :js do
end
end
 
it 'activates the JIRA service' do
it 'activates the Jira service' do
WebMock.stub_request(:get, test_url).with(basic_auth: %w(username password))
.to_raise(JIRA::HTTPError.new(double(message: 'message')))
 
click_link('JIRA')
click_link('Jira')
fill_form
click_button('Test settings and save changes')
wait_for_requests
Loading
Loading
@@ -75,7 +75,7 @@ describe 'User activates Jira', :js do
find('.flash-alert .flash-action').click
wait_for_requests
 
expect(page).to have_content('JIRA activated.')
expect(page).to have_content('Jira activated.')
expect(current_path).to eq(project_settings_integrations_path(project))
end
end
Loading
Loading
@@ -83,19 +83,19 @@ describe 'User activates Jira', :js do
 
describe 'user sets Jira Service but keeps it disabled' do
before do
click_link('JIRA')
click_link('Jira')
fill_form(false)
click_button('Save changes')
end
 
it 'saves but does not activate the JIRA service' do
expect(page).to have_content('JIRA settings saved, but not activated.')
it 'saves but does not activate the Jira service' do
expect(page).to have_content('Jira settings saved, but not activated.')
expect(current_path).to eq(project_settings_integrations_path(project))
end
 
it 'does not show the JIRA link in the menu' do
it 'does not show the Jira link in the menu' do
page.within('.nav-sidebar') do
expect(page).not_to have_link('JIRA', href: url)
expect(page).not_to have_link('Jira', href: url)
end
end
end
Loading
Loading
Loading
Loading
@@ -6760,7 +6760,7 @@
},
{
"id": 95,
"title": "JIRA",
"title": "Jira",
"project_id": 5,
"created_at": "2016-06-14T15:01:51.255Z",
"updated_at": "2016-06-14T15:01:51.255Z",
Loading
Loading
Loading
Loading
@@ -26,7 +26,7 @@ describe Gitlab::IssuableSorter do
expect(described_class.sort(project1, unsorted)).to eq(sorted)
end
 
context 'for JIRA issues' do
context 'for Jira issues' do
let(:sorted) do
[ExternalIssue.new('JIRA-1', project1),
ExternalIssue.new('JIRA-2', project1),
Loading
Loading
Loading
Loading
@@ -197,14 +197,14 @@ describe Gitlab::ReferenceExtractor do
let(:issue) { create(:issue, project: project) }
 
context 'when GitLab issues are enabled' do
it 'returns both JIRA and internal issues' do
it 'returns both Jira and internal issues' do
subject.analyze("JIRA-123 and FOOBAR-4567 and #{issue.to_reference}")
expect(subject.issues).to eq [ExternalIssue.new('JIRA-123', project),
ExternalIssue.new('FOOBAR-4567', project),
issue]
end
 
it 'returns only JIRA issues if the internal one does not exists' do
it 'returns only Jira issues if the internal one does not exists' do
subject.analyze("JIRA-123 and FOOBAR-4567 and #999")
expect(subject.issues).to eq [ExternalIssue.new('JIRA-123', project),
ExternalIssue.new('FOOBAR-4567', project)]
Loading
Loading
@@ -217,7 +217,7 @@ describe Gitlab::ReferenceExtractor do
project.save!
end
 
it 'returns only JIRA issues' do
it 'returns only Jira issues' do
subject.analyze("JIRA-123 and FOOBAR-4567 and #{issue.to_reference}")
expect(subject.issues).to eq [ExternalIssue.new('JIRA-123', project),
ExternalIssue.new('FOOBAR-4567', project)]
Loading
Loading
Loading
Loading
@@ -18,7 +18,7 @@ describe Mentionable do
let(:project) { create(:project) }
let(:mentionable) { Example.new }
 
it 'excludes JIRA references' do
it 'excludes Jira references' do
allow(project).to receive_messages(jira_tracker?: true)
 
mentionable.project = project
Loading
Loading
Loading
Loading
@@ -158,7 +158,7 @@ describe JiraService do
WebMock.stub_request(:post, @remote_link_url).with(basic_auth: %w(gitlab_jira_username gitlab_jira_password))
end
 
it 'calls JIRA API' do
it 'calls Jira API' do
@jira_service.close_issue(resource, ExternalIssue.new('JIRA-123', project))
 
expect(WebMock).to have_requested(:post, @comment_url).with(
Loading
Loading
@@ -175,14 +175,14 @@ describe JiraService do
 
# Check https://developer.atlassian.com/jiradev/jira-platform/guides/other/guide-jira-remote-issue-links/fields-in-remote-issue-links
# for more information
it 'creates Remote Link reference in JIRA for comment' do
it 'creates Remote Link reference in Jira for comment' do
@jira_service.close_issue(resource, ExternalIssue.new('JIRA-123', project))
 
favicon_path = "http://localhost/assets/#{find_asset('favicon.png').digest_path}"
 
# Creates comment
expect(WebMock).to have_requested(:post, @comment_url)
# Creates Remote Link in JIRA issue fields
# Creates Remote Link in Jira issue fields
expect(WebMock).to have_requested(:post, @remote_link_url).with(
body: hash_including(
GlobalID: 'GitLab',
Loading
Loading
@@ -319,7 +319,7 @@ describe JiraService do
end
 
context 'when the test succeeds' do
it 'tries to get JIRA project with URL when API URL not set' do
it 'tries to get Jira project with URL when API URL not set' do
test_settings('jira.example.com')
end
 
Loading
Loading
@@ -327,7 +327,7 @@ describe JiraService do
expect(test_settings).to eq( { success: true, result: { 'url' => 'http://url' } })
end
 
it 'tries to get JIRA project with API URL if set' do
it 'tries to get Jira project with API URL if set' do
jira_service.update(api_url: 'http://jira.api.com')
test_settings('jira.api.com')
end
Loading
Loading
@@ -462,7 +462,7 @@ describe JiraService do
end
 
it 'is initialized' do
expect(@service.title).to eq('JIRA')
expect(@service.title).to eq('Jira')
expect(@service.description).to eq('Jira issue tracker')
end
end
Loading
Loading
Loading
Loading
@@ -58,7 +58,7 @@ describe MergeRequests::MergeService do
expect(issue.reload.closed?).to be_truthy
end
 
context 'with JIRA integration' do
context 'with Jira integration' do
include JiraServiceHelper
 
let(:jira_tracker) { project.create_jira_service }
Loading
Loading
@@ -72,7 +72,7 @@ describe MergeRequests::MergeService do
allow(merge_request).to receive(:commits).and_return([commit])
end
 
it 'closes issues on JIRA issue tracker' do
it 'closes issues on Jira issue tracker' do
jira_issue = ExternalIssue.new('JIRA-123', project)
stub_jira_urls(jira_issue)
commit = double('commit', safe_message: "Fixes #{jira_issue.to_reference}")
Loading
Loading
@@ -98,7 +98,7 @@ describe MergeRequests::MergeService do
end
 
context "wrong issue markdown" do
it 'does not close issues on JIRA issue tracker' do
it 'does not close issues on Jira issue tracker' do
jira_issue = ExternalIssue.new('#JIRA-123', project)
stub_jira_urls(jira_issue)
commit = double('commit', safe_message: "Fixes #{jira_issue.to_reference}")
Loading
Loading
Loading
Loading
@@ -750,7 +750,7 @@ describe SystemNoteService do
end
end
 
describe 'JIRA integration' do
describe 'Jira integration' do
include JiraServiceHelper
 
let(:project) { create(:jira_project, :repository) }
Loading
Loading
Loading
Loading
@@ -4,7 +4,7 @@ module JiraServiceHelper
 
def jira_service_settings
properties = {
title: "JIRA tracker",
title: "Jira tracker",
url: JIRA_URL,
username: 'jira-user',
password: 'my-secret-password',
Loading
Loading
Loading
Loading
@@ -28,7 +28,7 @@ describe 'projects/services/_form' do
expect(rendered).to have_content('Event will be triggered when a merge request is created/updated/merged')
end
 
context 'when service is JIRA' do
context 'when service is Jira' do
let(:project) { create(:jira_project) }
 
before do
Loading
Loading
@@ -38,8 +38,8 @@ describe 'projects/services/_form' do
it 'display merge_request_events and commit_events descriptions' do
render
 
expect(rendered).to have_content('JIRA comments will be created when an issue gets referenced in a commit.')
expect(rendered).to have_content('JIRA comments will be created when an issue gets referenced in a merge request.')
expect(rendered).to have_content('Jira comments will be created when an issue gets referenced in a commit.')
expect(rendered).to have_content('Jira comments will be created when an issue gets referenced in a merge request.')
end
end
end
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment