Commit 5cb94fc4 authored by GitLab Bot's avatar GitLab Bot

Add latest changes from gitlab-org/gitlab@master

parent 69a23cbe
......@@ -264,7 +264,7 @@ gem 'licensee', '~> 8.9'
gem 'ace-rails-ap', '~> 4.1.0'
# Detect and convert string character encoding
gem 'charlock_holmes', '~> 0.7.7'
gem 'charlock_holmes', '~> 0.7.5'
# Detect mime content type from content
gem 'mimemagic', '~> 0.3.2'
......
......@@ -142,7 +142,7 @@ GEM
mime-types (>= 1.16)
cause (0.1)
character_set (1.1.2)
charlock_holmes (0.7.7)
charlock_holmes (0.7.6)
childprocess (0.9.0)
ffi (~> 1.0, >= 1.0.11)
chronic (0.10.2)
......@@ -1143,7 +1143,7 @@ DEPENDENCIES
capybara (~> 3.22.0)
capybara-screenshot (~> 1.0.22)
carrierwave (~> 1.3)
charlock_holmes (~> 0.7.7)
charlock_holmes (~> 0.7.5)
chronic (~> 0.10.2)
commonmarker (~> 0.20)
concurrent-ruby (~> 1.1)
......
......@@ -742,7 +742,7 @@
display: inline-block;
&:not(:last-child) {
margin-right: $gl-padding-8;
margin-right: $gl-padding;
}
&.right {
......@@ -812,6 +812,10 @@
@extend .btn;
@extend .btn-default;
}
.nav > li:not(:last-child) {
margin-right: $gl-padding-8;
}
}
.repository-languages-bar {
......
---
title: Increase margin between project stats
merge_request: 20606
author:
type: other
---
title: Fix project creation with templates using /projects/user/:id API
merge_request: 20590
author:
type: fixed
......@@ -191,6 +191,7 @@ module API
optional :path, type: String, desc: 'The path of the repository'
optional :default_branch, type: String, desc: 'The default branch of the project'
use :optional_project_params
use :optional_create_project_params
use :create_params
end
# rubocop: disable CodeReuse/ActiveRecord
......
import Vue from 'vue';
import { mount } from '@vue/test-utils';
import { GlLink } from '@gitlab/ui';
import { getTimeago } from '~/lib/utils/datetime_utility';
import component from '~/jobs/components/erased_block.vue';
import mountComponent from '../../helpers/vue_mount_component_helper';
import ErasedBlock from '~/jobs/components/erased_block.vue';
describe('Erased block', () => {
const Component = Vue.extend(component);
let vm;
let wrapper;
const erasedAt = '2016-11-07T11:11:16.525Z';
const timeago = getTimeago();
const formatedDate = timeago.format(erasedAt);
const createComponent = props => {
wrapper = mount(ErasedBlock, {
propsData: props,
sync: false,
attachToDocument: true,
});
};
afterEach(() => {
vm.$destroy();
wrapper.destroy();
});
describe('with job erased by user', () => {
beforeEach(() => {
vm = mountComponent(Component, {
createComponent({
user: {
username: 'root',
web_url: 'gitlab.com/root',
......@@ -27,30 +34,30 @@ describe('Erased block', () => {
});
it('renders username and link', () => {
expect(vm.$el.querySelector('a').getAttribute('href')).toEqual('gitlab.com/root');
expect(wrapper.find(GlLink).attributes('href')).toEqual('gitlab.com/root');
expect(vm.$el.textContent).toContain('Job has been erased by');
expect(vm.$el.textContent).toContain('root');
expect(wrapper.text().trim()).toContain('Job has been erased by');
expect(wrapper.text().trim()).toContain('root');
});
it('renders erasedAt', () => {
expect(vm.$el.textContent).toContain(formatedDate);
expect(wrapper.text().trim()).toContain(formatedDate);
});
});
describe('with erased job', () => {
beforeEach(() => {
vm = mountComponent(Component, {
createComponent({
erasedAt,
});
});
it('renders username and link', () => {
expect(vm.$el.textContent).toContain('Job has been erased');
expect(wrapper.text().trim()).toContain('Job has been erased');
});
it('renders erasedAt', () => {
expect(vm.$el.textContent).toContain(formatedDate);
expect(wrapper.text().trim()).toContain(formatedDate);
});
});
});
import UserPopover from '~/vue_shared/components/user_popover/user_popover.vue';
import { mount } from '@vue/test-utils';
import { GlSkeletonLoading } from '@gitlab/ui';
import Icon from '~/vue_shared/components/icon.vue';
import { shallowMount } from '@vue/test-utils';
const DEFAULT_PROPS = {
loaded: true,
......@@ -29,7 +31,7 @@ describe('User Popover Component', () => {
describe('Empty', () => {
beforeEach(() => {
wrapper = mount(UserPopover, {
wrapper = shallowMount(UserPopover, {
propsData: {
target: document.querySelector('.js-user-link'),
user: {
......@@ -41,18 +43,19 @@ describe('User Popover Component', () => {
status: null,
},
},
attachToDocument: true,
sync: false,
});
});
it('should return skeleton loaders', () => {
expect(wrapper.findAll('.animation-container').length).toBe(4);
expect(wrapper.find(GlSkeletonLoading).exists()).toBe(true);
});
});
describe('basic data', () => {
it('should show basic fields', () => {
wrapper = mount(UserPopover, {
wrapper = shallowMount(UserPopover, {
propsData: {
...DEFAULT_PROPS,
target: document.querySelector('.js-user-link'),
......@@ -66,9 +69,9 @@ describe('User Popover Component', () => {
});
it('shows icon for location', () => {
const iconEl = wrapper.find('.js-location svg');
const iconEl = wrapper.find(Icon);
expect(iconEl.find('use').element.getAttribute('xlink:href')).toContain('location');
expect(iconEl.props('name')).toEqual('location');
});
});
......@@ -77,7 +80,7 @@ describe('User Popover Component', () => {
const testProps = Object.assign({}, DEFAULT_PROPS);
testProps.user.bio = 'Engineer';
wrapper = mount(UserPopover, {
wrapper = shallowMount(UserPopover, {
propsData: {
...testProps,
target: document.querySelector('.js-user-link'),
......@@ -92,7 +95,7 @@ describe('User Popover Component', () => {
const testProps = Object.assign({}, DEFAULT_PROPS);
testProps.user.organization = 'GitLab';
wrapper = mount(UserPopover, {
wrapper = shallowMount(UserPopover, {
propsData: {
...testProps,
target: document.querySelector('.js-user-link'),
......@@ -108,7 +111,7 @@ describe('User Popover Component', () => {
testProps.user.bio = 'Engineer';
testProps.user.organization = 'GitLab';
wrapper = mount(UserPopover, {
wrapper = shallowMount(UserPopover, {
propsData: {
...DEFAULT_PROPS,
target: document.querySelector('.js-user-link'),
......@@ -125,7 +128,7 @@ describe('User Popover Component', () => {
testProps.user.bio = 'Manager & Team Lead';
testProps.user.organization = 'Me & my <funky> Company';
wrapper = mount(UserPopover, {
wrapper = shallowMount(UserPopover, {
propsData: {
...DEFAULT_PROPS,
target: document.querySelector('.js-user-link'),
......@@ -138,15 +141,13 @@ describe('User Popover Component', () => {
});
it('shows icon for bio', () => {
const iconEl = wrapper.find('.js-bio svg');
expect(iconEl.find('use').element.getAttribute('xlink:href')).toContain('profile');
expect(wrapper.findAll(Icon).filter(icon => icon.props('name') === 'profile').length).toEqual(
1,
);
});
it('shows icon for organization', () => {
const iconEl = wrapper.find('.js-organization svg');
expect(iconEl.find('use').element.getAttribute('xlink:href')).toContain('work');
expect(wrapper.findAll(Icon).filter(icon => icon.props('name') === 'work').length).toEqual(1);
});
});
......@@ -155,7 +156,7 @@ describe('User Popover Component', () => {
const testProps = Object.assign({}, DEFAULT_PROPS);
testProps.user.status = { message_html: 'Hello World' };
wrapper = mount(UserPopover, {
wrapper = shallowMount(UserPopover, {
propsData: {
...DEFAULT_PROPS,
target: document.querySelector('.js-user-link'),
......@@ -170,7 +171,7 @@ describe('User Popover Component', () => {
const testProps = Object.assign({}, DEFAULT_PROPS);
testProps.user.status = { emoji: 'basketball_player', message_html: 'Hello World' };
wrapper = mount(UserPopover, {
wrapper = shallowMount(UserPopover, {
propsData: {
...DEFAULT_PROPS,
target: document.querySelector('.js-user-link'),
......
......@@ -722,10 +722,10 @@
resolved "https://registry.yarnpkg.com/@gitlab/svgs/-/svgs-1.82.0.tgz#c059c460afc13ebfe9df370521ca8963fa5afb80"
integrity sha512-9L4Brys2LCk44lHvFsCFDKN768lYjoMVYDb4PD7FSjqUEruQQ1SRj0rvb1RWKLhiTCDKrtDOXkH6I1TTEms24w==
"@gitlab/ui@7.15.2":
version "7.15.2"
resolved "https://registry.yarnpkg.com/@gitlab/ui/-/ui-7.15.2.tgz#924c202ea43ad79032d91d803665b1f7b8f0a42e"
integrity sha512-XNrs2iH8waHk/LDp3sTUSlq3vASHUL4WwCiKwoPJP7PZyXZvvumrkNmiDS0ZvPRPB3ZvIrSywRf61sL0PiQZEA==
"@gitlab/ui@7.16.1":
version "7.16.1"
resolved "https://registry.yarnpkg.com/@gitlab/ui/-/ui-7.16.1.tgz#a539bd2e39866549f71d8678efe7cca8478ebde3"
integrity sha512-7SdwSC2P2/PKZNaIzNihAudSpP95cex98i6IMcukK0ocJYvHr8S9s8GoznaD8YugTR1EGhu+f1M6ubneU5vUwQ==
dependencies:
"@babel/standalone" "^7.0.0"
"@gitlab/vue-toasted" "^1.3.0"
......
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