Commit fe5a7f00 authored by Achilleas Pipinellis's avatar Achilleas Pipinellis

Merge branch 'ce-to-ee-2018-06-14' into 'master'

CE upstream - 2018-06-14 18:24 UTC

See merge request gitlab-org/gitlab-ee!6144
parents 5f087c0b a94579b0
...@@ -370,10 +370,10 @@ package-and-qa: ...@@ -370,10 +370,10 @@ package-and-qa:
<<: *single-script-job <<: *single-script-job
variables: variables:
<<: *single-script-job-variables <<: *single-script-job-variables
SCRIPT_NAME: trigger-build-omnibus SCRIPT_NAME: trigger-build
retry: 0 retry: 0
script: script:
- ./$SCRIPT_NAME - ./$SCRIPT_NAME omnibus
when: manual when: manual
only: only:
- //@gitlab-org/gitlab-ce - //@gitlab-org/gitlab-ce
......
...@@ -487,7 +487,7 @@ Style/EmptyLiteral: ...@@ -487,7 +487,7 @@ Style/EmptyLiteral:
- 'lib/gitlab/fogbugz_import/importer.rb' - 'lib/gitlab/fogbugz_import/importer.rb'
- 'lib/gitlab/git/diff_collection.rb' - 'lib/gitlab/git/diff_collection.rb'
- 'lib/gitlab/gitaly_client.rb' - 'lib/gitlab/gitaly_client.rb'
- 'scripts/trigger-build-omnibus' - 'scripts/trigger-build'
- 'spec/features/merge_requests/versions_spec.rb' - 'spec/features/merge_requests/versions_spec.rb'
- 'spec/helpers/merge_requests_helper_spec.rb' - 'spec/helpers/merge_requests_helper_spec.rb'
- 'spec/lib/gitlab/request_context_spec.rb' - 'spec/lib/gitlab/request_context_spec.rb'
......
...@@ -304,7 +304,7 @@ The UX team uses labels to manage their workflow. ...@@ -304,7 +304,7 @@ The UX team uses labels to manage their workflow.
The ~"UX" label on an issue is a signal to the UX team that it will need UX attention. The ~"UX" label on an issue is a signal to the UX team that it will need UX attention.
To better understand the priority by which UX tackles issues, see the [UX section](https://about.gitlab.com/handbook/engineering/ux) of the handbook. To better understand the priority by which UX tackles issues, see the [UX section](https://about.gitlab.com/handbook/engineering/ux) of the handbook.
Once an issue has been worked on and is ready for development, a UXer applies the ~"UX ready" label to that issue. Once an issue has been worked on and is ready for development, a UXer removes the ~"UX" label and applies the ~"UX ready" label to that issue.
The UX team has a special type label called ~"design artifact". This label indicates that the final output The UX team has a special type label called ~"design artifact". This label indicates that the final output
for an issue is a UX solution/design. The solution will be developed by frontend and/or backend in a subsequent milestone. for an issue is a UX solution/design. The solution will be developed by frontend and/or backend in a subsequent milestone.
......
...@@ -20,7 +20,13 @@ export default { ...@@ -20,7 +20,13 @@ export default {
}, },
}, },
computed: { computed: {
...mapState(['rightPanelCollapsed', 'viewer', 'panelResizing', 'currentActivityView']), ...mapState([
'rightPanelCollapsed',
'viewer',
'panelResizing',
'currentActivityView',
'rightPane',
]),
...mapGetters([ ...mapGetters([
'currentMergeRequest', 'currentMergeRequest',
'getStagedFile', 'getStagedFile',
...@@ -88,6 +94,9 @@ export default { ...@@ -88,6 +94,9 @@ export default {
this.editor.updateDimensions(); this.editor.updateDimensions();
} }
}, },
rightPane() {
this.editor.updateDimensions();
},
}, },
beforeDestroy() { beforeDestroy() {
this.editor.dispose(); this.editor.dispose();
......
...@@ -31,15 +31,16 @@ export const openMergeRequest = ({ commit, dispatch }, { projectPath, id }) => { ...@@ -31,15 +31,16 @@ export const openMergeRequest = ({ commit, dispatch }, { projectPath, id }) => {
commit(rootTypes.CLEAR_PROJECTS, null, { root: true }); commit(rootTypes.CLEAR_PROJECTS, null, { root: true });
commit(rootTypes.SET_CURRENT_MERGE_REQUEST, `${id}`, { root: true }); commit(rootTypes.SET_CURRENT_MERGE_REQUEST, `${id}`, { root: true });
commit(rootTypes.RESET_OPEN_FILES, null, { root: true }); commit(rootTypes.RESET_OPEN_FILES, null, { root: true });
dispatch('pipelines/resetLatestPipeline', null, { root: true });
dispatch('setCurrentBranchId', '', { root: true }); dispatch('setCurrentBranchId', '', { root: true });
dispatch('pipelines/stopPipelinePolling', null, { root: true }) dispatch('pipelines/stopPipelinePolling', null, { root: true })
.then(() => { .then(() => {
dispatch('pipelines/resetLatestPipeline', null, { root: true });
dispatch('pipelines/clearEtagPoll', null, { root: true }); dispatch('pipelines/clearEtagPoll', null, { root: true });
}) })
.catch(e => { .catch(e => {
throw e; throw e;
}); });
dispatch('setRightPane', null, { root: true });
router.push(`/project/${projectPath}/merge_requests/${id}`); router.push(`/project/${projectPath}/merge_requests/${id}`);
}; };
......
...@@ -106,7 +106,9 @@ export const fetchJobTrace = ({ dispatch, state }) => { ...@@ -106,7 +106,9 @@ export const fetchJobTrace = ({ dispatch, state }) => {
.catch(() => dispatch('receiveJobTraceError')); .catch(() => dispatch('receiveJobTraceError'));
}; };
export const resetLatestPipeline = ({ commit }) => export const resetLatestPipeline = ({ commit }) => {
commit(types.RECEIVE_LASTEST_PIPELINE_SUCCESS, null); commit(types.RECEIVE_LASTEST_PIPELINE_SUCCESS, null);
commit(types.SET_DETAIL_JOB, null);
};
export default () => {}; export default () => {};
...@@ -1675,7 +1675,7 @@ export default class Notes { ...@@ -1675,7 +1675,7 @@ export default class Notes {
<div class="note-header"> <div class="note-header">
<div class="note-header-info"> <div class="note-header-info">
<a href="/${_.escape(currentUsername)}"> <a href="/${_.escape(currentUsername)}">
<span class="d-none d-sm-block">${_.escape( <span class="d-none d-sm-inline-block">${_.escape(
currentUsername, currentUsername,
)}</span> )}</span>
<span class="note-headline-light">${_.escape( <span class="note-headline-light">${_.escape(
...@@ -1694,7 +1694,7 @@ export default class Notes { ...@@ -1694,7 +1694,7 @@ export default class Notes {
</li>`, </li>`,
); );
$tempNote.find('.d-none.d-sm-block').text(_.escape(currentUserFullname)); $tempNote.find('.d-none.d-sm-inline-block').text(_.escape(currentUserFullname));
$tempNote $tempNote
.find('.note-headline-light') .find('.note-headline-light')
.text(`@${_.escape(currentUsername)}`); .text(`@${_.escape(currentUsername)}`);
......
...@@ -180,7 +180,7 @@ export default class UserTabs { ...@@ -180,7 +180,7 @@ export default class UserTabs {
} }
toggleLoading(status) { toggleLoading(status) {
return this.$parentEl.find('.loading-status .loading').toggleClass('hidden', !status); return this.$parentEl.find('.loading-status .loading').toggleClass('hide', !status);
} }
setCurrentAction(source) { setCurrentAction(source) {
......
...@@ -56,7 +56,7 @@ export default { ...@@ -56,7 +56,7 @@ export default {
<gl-modal <gl-modal
:id="`modal-peek-${metric}-details`" :id="`modal-peek-${metric}-details`"
:header-title-text="header" :header-title-text="header"
modal-size="lg" modal-size="xl"
class="performance-bar-modal" class="performance-bar-modal"
> >
<table <table
...@@ -71,7 +71,7 @@ export default { ...@@ -71,7 +71,7 @@ export default {
<td <td
v-for="key in keys" v-for="key in keys"
:key="key" :key="key"
class="break-word all-words" class="break-word"
> >
{{ item[key] }} {{ item[key] }}
</td> </td>
......
<script> <script>
const buttonVariants = ['danger', 'primary', 'success', 'warning']; const buttonVariants = ['danger', 'primary', 'success', 'warning'];
const sizeVariants = ['sm', 'md', 'lg']; const sizeVariants = ['sm', 'md', 'lg', 'xl'];
export default { export default {
name: 'GlModal', name: 'GlModal',
......
...@@ -54,7 +54,7 @@ ...@@ -54,7 +54,7 @@
<div class="note-header"> <div class="note-header">
<div class="note-header-info"> <div class="note-header-info">
<a :href="getUserData.path"> <a :href="getUserData.path">
<span class="d-none d-sm-block">{{ getUserData.name }}</span> <span class="d-none d-sm-inline-block">{{ getUserData.name }}</span>
<span class="note-headline-light">@{{ getUserData.username }}</span> <span class="note-headline-light">@{{ getUserData.username }}</span>
</a> </a>
</div> </div>
......
...@@ -444,10 +444,6 @@ img.emoji { ...@@ -444,10 +444,6 @@ img.emoji {
.break-word { .break-word {
word-wrap: break-word; word-wrap: break-word;
&.all-words {
word-break: break-word;
}
} }
/** COMMON CLASSES **/ /** COMMON CLASSES **/
......
...@@ -19,6 +19,7 @@ ...@@ -19,6 +19,7 @@
.gfm-color_chip { .gfm-color_chip {
display: inline-block; display: inline-block;
line-height: 1;
margin: 0 0 2px 4px; margin: 0 0 2px 4px;
vertical-align: middle; vertical-align: middle;
border-radius: 3px; border-radius: 3px;
......
.modal-xl {
max-width: 98%;
}
.modal-header { .modal-header {
background-color: $modal-body-bg; background-color: $modal-body-bg;
......
...@@ -868,3 +868,5 @@ $input-border-color: $theme-gray-200; ...@@ -868,3 +868,5 @@ $input-border-color: $theme-gray-200;
$input-color: $gl-text-color; $input-color: $gl-text-color;
$font-family-sans-serif: $regular_font; $font-family-sans-serif: $regular_font;
$font-family-monospace: $monospace_font; $font-family-monospace: $monospace_font;
$input-line-height: 20px;
$btn-line-height: 20px;
...@@ -220,7 +220,7 @@ ...@@ -220,7 +220,7 @@
.label-link { .label-link {
display: inline-flex; display: inline-flex;
vertical-align: top; vertical-align: text-bottom;
&:hover .color-label { &:hover .color-label {
text-decoration: underline; text-decoration: underline;
......
...@@ -36,6 +36,7 @@ ...@@ -36,6 +36,7 @@
} }
.table-holder { .table-holder {
overflow: unset;
width: 100%; width: 100%;
} }
......
...@@ -107,12 +107,12 @@ ...@@ -107,12 +107,12 @@
} }
.performance-bar-modal { .performance-bar-modal {
.modal-footer { .modal-body {
display: none; padding: 0;
} }
.modal-dialog { .modal-footer {
width: 860px; display: none;
} }
} }
} }
......
...@@ -5,4 +5,4 @@ ...@@ -5,4 +5,4 @@
- anchors.each do |anchor| - anchors.each do |anchor|
%li.nav-item %li.nav-item
= link_to_if anchor.link, anchor.label, anchor.link, class: anchor.enabled ? 'nav-link stat-link' : "nav-link btn btn-#{anchor.class_modifier || 'missing'}" do = link_to_if anchor.link, anchor.label, anchor.link, class: anchor.enabled ? 'nav-link stat-link' : "nav-link btn btn-#{anchor.class_modifier || 'missing'}" do
%span.stat-text= anchor.label .stat-text= anchor.label
...@@ -25,7 +25,7 @@ ...@@ -25,7 +25,7 @@
= custom_icon ('illustration_no_commits') = custom_icon ('illustration_no_commits')
- else - else
%ul.merge-request-tabs.nav.nav-tabs.nav-links.no-top.no-bottom %ul.merge-request-tabs.nav.nav-tabs.nav-links.no-top.no-bottom
%li.commits-tab.active %li.commits-tab
= link_to url_for(safe_params), data: {target: 'div#commits', action: 'new', toggle: 'tab'} do = link_to url_for(safe_params), data: {target: 'div#commits', action: 'new', toggle: 'tab'} do
Commits Commits
%span.badge.badge-pill= @commits.size %span.badge.badge-pill= @commits.size
......
---
title: Line height fixed
merge_request:
author: Murat Dogan
type: fixed
---
title: Fix active tab highlight when creating new merge request
merge_request: 19781
author: Jan Beckmann
type: fixed
---
title: Change label link vertical alignment property
merge_request: 18777
author: George Tsiolis
type: changed
...@@ -41,7 +41,7 @@ module Peek ...@@ -41,7 +41,7 @@ module Peek
] ]
end.sort_by{ |a,b,c,d,e,f| -f } end.sort_by{ |a,b,c,d,e,f| -f }
output = "<div class='modal-dialog modal-lg'><div class='modal-content'>" output = "<div class='modal-dialog modal-xl'><div class='modal-content'>"
output << "<div class='modal-header'>" output << "<div class='modal-header'>"
output << "<h4>Line profiling: #{human_description(params[:lineprofiler])}</h4>" output << "<h4>Line profiling: #{human_description(params[:lineprofiler])}</h4>"
output << "<button class='close' type='button' data-dismiss='modal' aria-label='close'><span aria-hidden='true'>&times;</span></button>" output << "<button class='close' type='button' data-dismiss='modal' aria-label='close'><span aria-hidden='true'>&times;</span></button>"
......
...@@ -4,44 +4,44 @@ require 'net/http' ...@@ -4,44 +4,44 @@ require 'net/http'
require 'json' require 'json'
require 'cgi' require 'cgi'
module Omnibus module Trigger
PROJECT_PATH = 'gitlab-org/omnibus-gitlab'.freeze OMNIBUS_PROJECT_PATH = 'gitlab-org/omnibus-gitlab'.freeze
CNG_PROJECT_PATH = 'gitlab-org/build/CNG'.freeze
class Trigger
TOKEN = ENV['BUILD_TRIGGER_TOKEN'] TOKEN = ENV['BUILD_TRIGGER_TOKEN']
TRIGGERER = ENV['CI_PROJECT_NAME']
def self.ee?
ENV['CI_PROJECT_NAME'] == 'gitlab-ee' || File.exist?('CHANGELOG-EE.md')
end
class Omnibus
def initialize def initialize
@uri = URI("https://gitlab.com/api/v4/projects/#{CGI.escape(Omnibus::PROJECT_PATH)}/trigger/pipeline") @uri = URI("https://gitlab.com/api/v4/projects/#{CGI.escape(Trigger::OMNIBUS_PROJECT_PATH)}/trigger/pipeline")
@params = env_params.merge(file_params).merge(token: TOKEN) @params = env_params.merge(file_params).merge(token: Trigger::TOKEN)
end end
def invoke! def invoke!
res = Net::HTTP.post_form(@uri, @params) res = Net::HTTP.post_form(@uri, @params)
id = JSON.parse(res.body)['id'] id = JSON.parse(res.body)['id']
project = Trigger::OMNIBUS_PROJECT_PATH
if id if id
puts "Triggered https://gitlab.com/#{Omnibus::PROJECT_PATH}/pipelines/#{id}" puts "Triggered https://gitlab.com/#{project}/pipelines/#{id}"
puts "Waiting for downstream pipeline status" puts "Waiting for downstream pipeline status"
else else
raise "Trigger failed! The response from the trigger is: #{res.body}" raise "Trigger failed! The response from the trigger is: #{res.body}"
end end
Omnibus::Pipeline.new(id) Trigger::Pipeline.new(project, id)
end end
private private
def ee?
TRIGGERER == 'gitlab-ee' || File.exist?('CHANGELOG-EE.md')
end
def env_params def env_params
{ {
"ref" => ENV["OMNIBUS_BRANCH"] || "master", "ref" => ENV["OMNIBUS_BRANCH"] || "master",
"variables[GITLAB_VERSION]" => ENV["CI_COMMIT_SHA"], "variables[GITLAB_VERSION]" => ENV["CI_COMMIT_SHA"],
"variables[ALTERNATIVE_SOURCES]" => true, "variables[ALTERNATIVE_SOURCES]" => true,
"variables[ee]" => ee? ? 'true' : 'false', "variables[ee]" => Trigger.ee? ? 'true' : 'false',
"variables[TRIGGERED_USER]" => ENV["GITLAB_USER_NAME"], "variables[TRIGGERED_USER]" => ENV["GITLAB_USER_NAME"],
"variables[TRIGGER_SOURCE]" => "https://gitlab.com/gitlab-org/#{ENV['CI_PROJECT_NAME']}/-/jobs/#{ENV['CI_JOB_ID']}" "variables[TRIGGER_SOURCE]" => "https://gitlab.com/gitlab-org/#{ENV['CI_PROJECT_NAME']}/-/jobs/#{ENV['CI_JOB_ID']}"
} }
...@@ -56,13 +56,77 @@ module Omnibus ...@@ -56,13 +56,77 @@ module Omnibus
end end
end end
class CNG
def initialize
@uri = URI("https://gitlab.com/api/v4/projects/#{CGI.escape(Trigger::CNG_PROJECT_PATH)}/trigger/pipeline")
@ref_name = ENV['CI_COMMIT_REF_NAME']
@username = ENV['GITLAB_USER_NAME']
@project_name = ENV['CI_PROJECT_NAME']
@job_id = ENV['CI_JOB_ID']
@params = env_params.merge(file_params).merge(token: Trigger::TOKEN)
end
#
# Trigger a pipeline
#
def invoke!
res = Net::HTTP.post_form(@uri, @params)
id = JSON.parse(res.body)['id']
project = Trigger::CNG_PROJECT_PATH
if id
puts "Triggered https://gitlab.com/#{project}/pipelines/#{id}"
puts "Waiting for downstream pipeline status"
else
raise "Trigger failed! The response from the trigger is: #{res.body}"
end
Trigger::Pipeline.new(project, id)
end
private
def env_params
params = {
"ref" => ENV["CNG_BRANCH"] || "master",
"variables[TRIGGERED_USER]" => @username,
"variables[TRIGGER_SOURCE]" => "https://gitlab.com/gitlab-org/#{@project_name}/-/jobs/#{@job_id}"
}
if Trigger.ee?
params["variables[GITLAB_EE_VERSION]"] = @ref_name
params["variables[EE_PIPELINE]"] = 'true'
else
params["variables[GITLAB_CE_VERSION]"] = @ref_name
params["variables[CE_PIPELINE]"] = 'true'
end
params
end
# Read version files from all components
def file_params
Dir.glob("*_VERSION").each_with_object({}) do |version_file, params|
raw_version = File.read(version_file).strip
# if the version matches semver format, treat it as a tag and prepend `v`
version = if raw_version =~ Regexp.compile(/^\d+\.\d+\.\d+(-rc\d+)?(-ee)?$/)
"v#{raw_version}"
else
raw_version
end
params["variables[#{version_file}]"] = version
end
end
end
class Pipeline class Pipeline
INTERVAL = 60 # seconds INTERVAL = 60 # seconds
MAX_DURATION = 3600 * 3 # 3 hours MAX_DURATION = 3600 * 3 # 3 hours
def initialize(id) def initialize(project, id)
@start = Time.now.to_i @start = Time.now.to_i
@uri = URI("https://gitlab.com/api/v4/projects/#{CGI.escape(Omnibus::PROJECT_PATH)}/pipelines/#{id}") @uri = URI("https://gitlab.com/api/v4/projects/#{CGI.escape(project)}/pipelines/#{id}")
end end
def wait! def wait!
...@@ -74,10 +138,10 @@ module Omnibus ...@@ -74,10 +138,10 @@ module Omnibus
print "." print "."
sleep INTERVAL sleep INTERVAL
when :success when :success
puts "Omnibus pipeline succeeded in #{duration} minutes!" puts "Pipeline succeeded in #{duration} minutes!"
break break
else else
raise "Omnibus pipeline did not succeed!" raise "Pipeline did not succeed!"
end end
STDOUT.flush STDOUT.flush
...@@ -105,4 +169,13 @@ module Omnibus ...@@ -105,4 +169,13 @@ module Omnibus
end end
end end
Omnibus::Trigger.new.invoke!.wait! case ARGV[0]
when 'omnibus'
Trigger::Omnibus.new.invoke!.wait!
when 'cng'
Trigger::CNG.new.invoke!.wait!
else
puts "Please provide a valid option:
omnibus - Triggers a pipeline that builds the omnibus-gitlab package
cng - Triggers a pipeline that builds images used by the GitLab helm chart"
end
#!/usr/bin/env ruby
require 'gitlab'
#
# Configure credentials to be used with gitlab gem
#
Gitlab.configure do |config|
config.endpoint = 'https://gitlab.com/api/v4'
end
#
# The remote project
#
GITLAB_CNG_REPO = 'gitlab-org/build/CNG'.freeze
def ee?
ENV['CI_PROJECT_NAME'] == 'gitlab-ee' || File.exist?('CHANGELOG-EE.md')
end
def read_file_version(filename)
raw_version = File.read(filename).strip
# if the version matches semver format, treat it as a tag and prepend `v`
if raw_version =~ Regexp.compile(/^\d+\.\d+\.\d+(-rc\d+)?(-ee)?$/)
"v#{raw_version}"
else
raw_version
end
end
def params
params = {
'GITLAB_SHELL_VERSION' => read_file_version('GITLAB_SHELL_VERSION'),
'GITALY_VERSION' => read_file_version('GITALY_SERVER_VERSION'),
'TRIGGERED_USER' => ENV['GITLAB_USER_NAME'],
'TRIGGER_SOURCE' => "https://gitlab.com/gitlab-org/#{ENV['CI_PROJECT_NAME']}/-/jobs/#{ENV['CI_JOB_ID']}"
}
if ee?
params['EE_PIPELINE'] = 'true'
params['GITLAB_EE_VERSION'] = ENV['CI_COMMIT_REF_NAME']
else
params['CE_PIPELINE'] = 'true'
params['GITLAB_CE_VERSION'] = ENV['CI_COMMIT_REF_NAME']
end
params
end
#
# Trigger a pipeline
#
def trigger_pipeline
# Create the cross project pipeline using CI_JOB_TOKEN
pipeline = Gitlab.run_trigger(GITLAB_CNG_REPO, ENV['CI_JOB_TOKEN'], 'master', params)
puts "Triggered https://gitlab.com/#{GITLAB_CNG_REPO}/pipelines/#{pipeline.id}"
end
trigger_pipeline
...@@ -315,6 +315,17 @@ describe('RepoEditor', () => { ...@@ -315,6 +315,17 @@ describe('RepoEditor', () => {
done(); done();
}); });
}); });
it('calls updateDimensions when rightPane is updated', done => {
vm.$store.state.rightPane = 'testing';
vm.$nextTick(() => {
expect(vm.editor.updateDimensions).toHaveBeenCalled();
expect(vm.editor.updateDiffView).toHaveBeenCalled();
done();
});
});
}); });
describe('show tabs', () => { describe('show tabs', () => {
......
...@@ -208,18 +208,19 @@ describe('IDE merge requests actions', () => { ...@@ -208,18 +208,19 @@ describe('IDE merge requests actions', () => {
expect(commit.calls.argsFor(1)).toEqual(['SET_CURRENT_MERGE_REQUEST', '1', { root: true }]); expect(commit.calls.argsFor(1)).toEqual(['SET_CURRENT_MERGE_REQUEST', '1', { root: true }]);
expect(commit.calls.argsFor(2)).toEqual(['RESET_OPEN_FILES', null, { root: true }]); expect(commit.calls.argsFor(2)).toEqual(['RESET_OPEN_FILES', null, { root: true }]);
expect(dispatch.calls.argsFor(0)).toEqual([ expect(dispatch.calls.argsFor(0)).toEqual(['setCurrentBranchId', '', { root: true }]);
'pipelines/resetLatestPipeline', expect(dispatch.calls.argsFor(1)).toEqual([
'pipelines/stopPipelinePolling',
null, null,
{ root: true }, { root: true },
]); ]);
expect(dispatch.calls.argsFor(1)).toEqual(['setCurrentBranchId', '', { root: true }]); expect(dispatch.calls.argsFor(2)).toEqual(['setRightPane', null, { root: true }]);
expect(dispatch.calls.argsFor(2)).toEqual([ expect(dispatch.calls.argsFor(3)).toEqual([
'pipelines/stopPipelinePolling', 'pipelines/resetLatestPipeline',
null, null,
{ root: true }, { root: true },
]); ]);
expect(dispatch.calls.argsFor(3)).toEqual([ expect(dispatch.calls.argsFor(4)).toEqual([
'pipelines/clearEtagPoll', 'pipelines/clearEtagPoll',
null, null,
{ root: true }, { root: true },
......
...@@ -18,6 +18,7 @@ import actions, { ...@@ -18,6 +18,7 @@ import actions, {
receiveJobTraceError, receiveJobTraceError,
receiveJobTraceSuccess, receiveJobTraceSuccess,
fetchJobTrace, fetchJobTrace,
resetLatestPipeline,
} from '~/ide/stores/modules/pipelines/actions'; } from '~/ide/stores/modules/pipelines/actions';
import state from '~/ide/stores/modules/pipelines/state'; import state from '~/ide/stores/modules/pipelines/state';
import * as types from '~/ide/stores/modules/pipelines/mutation_types'; import * as types from '~/ide/stores/modules/pipelines/mutation_types';
...@@ -416,4 +417,20 @@ describe('IDE pipelines actions', () => { ...@@ -416,4 +417,20 @@ describe('IDE pipelines actions', () => {
}); });
}); });
}); });
describe('resetLatestPipeline', () => {
it('commits reset mutations', done => {
testAction(
resetLatestPipeline,
null,
mockedState,
[
{ type: types.RECEIVE_LASTEST_PIPELINE_SUCCESS, payload: null },
{ type: types.SET_DETAIL_JOB, payload: null },
],
[],
done,
);
});
});
}); });
...@@ -974,7 +974,7 @@ import timeoutPromise from './helpers/set_timeout_promise_helper'; ...@@ -974,7 +974,7 @@ import timeoutPromise from './helpers/set_timeout_promise_helper';
).toBeFalsy(); ).toBeFalsy();
expect( expect(
$tempNoteHeader $tempNoteHeader
.find('.d-none.d-sm-block') .find('.d-none.d-sm-inline-block')
.text() .text()
.trim(), .trim(),
).toEqual(currentUserFullname); ).toEqual(currentUserFullname);
...@@ -1020,7 +1020,7 @@ import timeoutPromise from './helpers/set_timeout_promise_helper'; ...@@ -1020,7 +1020,7 @@ import timeoutPromise from './helpers/set_timeout_promise_helper';
const $tempNoteHeader = $tempNote.find('.note-header'); const $tempNoteHeader = $tempNote.find('.note-header');
expect( expect(
$tempNoteHeader $tempNoteHeader
.find('.d-none.d-sm-block') .find('.d-none.d-sm-inline-block')
.text() .text()
.trim(), .trim(),
).toEqual('Foo &lt;script&gt;alert(&quot;XSS&quot;)&lt;/script&gt;'); ).toEqual('Foo &lt;script&gt;alert(&quot;XSS&quot;)&lt;/script&gt;');
......
...@@ -208,6 +208,14 @@ describe('GlModal', () => { ...@@ -208,6 +208,14 @@ describe('GlModal', () => {
expect(vm.$el.querySelector('.modal-dialog').classList.contains('modal-lg')).toEqual(true); expect(vm.$el.querySelector('.modal-dialog').classList.contains('modal-lg')).toEqual(true);
}); });
it('should render modal-xl', () => {
vm = mountComponent(modalComponent, {
modalSize: 'xl',
});
expect(vm.$el.querySelector('.modal-dialog').classList.contains('modal-xl')).toEqual(true);
});
it('should not add modal size classes when md size is passed', () => { it('should not add modal size classes when md size is passed', () => {
vm = mountComponent(modalComponent, { vm = mountComponent(modalComponent, {
modalSize: 'md', modalSize: 'md',
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment