Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--Gemfile2
-rw-r--r--Gemfile.lock4
-rw-r--r--app/assets/stylesheets/pages/projects.scss6
-rw-r--r--changelogs/unreleased/37034-increase-margin-between-commits-branches-tags-size-row-in-project-d.yml5
-rw-r--r--changelogs/unreleased/sh-fix-api-project-template-creation.yml5
-rw-r--r--lib/api/projects.rb1
-rw-r--r--package.json2
-rw-r--r--spec/frontend/jobs/components/erased_block_spec.js35
-rw-r--r--spec/frontend/vue_shared/components/user_popover/user_popover_spec.js37
-rw-r--r--yarn.lock8
10 files changed, 64 insertions, 41 deletions
diff --git a/Gemfile b/Gemfile
index f580c197200..4b5293cada0 100644
--- a/Gemfile
+++ b/Gemfile
@@ -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'
diff --git a/Gemfile.lock b/Gemfile.lock
index 5938ec21fd0..1e93b011ffa 100644
--- a/Gemfile.lock
+++ b/Gemfile.lock
@@ -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)
diff --git a/app/assets/stylesheets/pages/projects.scss b/app/assets/stylesheets/pages/projects.scss
index b728f501967..8b2c67378d9 100644
--- a/app/assets/stylesheets/pages/projects.scss
+++ b/app/assets/stylesheets/pages/projects.scss
@@ -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 {
diff --git a/changelogs/unreleased/37034-increase-margin-between-commits-branches-tags-size-row-in-project-d.yml b/changelogs/unreleased/37034-increase-margin-between-commits-branches-tags-size-row-in-project-d.yml
new file mode 100644
index 00000000000..75a64974725
--- /dev/null
+++ b/changelogs/unreleased/37034-increase-margin-between-commits-branches-tags-size-row-in-project-d.yml
@@ -0,0 +1,5 @@
+---
+title: Increase margin between project stats
+merge_request: 20606
+author:
+type: other
diff --git a/changelogs/unreleased/sh-fix-api-project-template-creation.yml b/changelogs/unreleased/sh-fix-api-project-template-creation.yml
new file mode 100644
index 00000000000..787bd147c91
--- /dev/null
+++ b/changelogs/unreleased/sh-fix-api-project-template-creation.yml
@@ -0,0 +1,5 @@
+---
+title: Fix project creation with templates using /projects/user/:id API
+merge_request: 20590
+author:
+type: fixed
diff --git a/lib/api/projects.rb b/lib/api/projects.rb
index 669def2b63c..a1fce9e8b20 100644
--- a/lib/api/projects.rb
+++ b/lib/api/projects.rb
@@ -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
diff --git a/package.json b/package.json
index 96d443758d6..38dd30ee438 100644
--- a/package.json
+++ b/package.json
@@ -38,7 +38,7 @@
"@babel/plugin-syntax-import-meta": "^7.2.0",
"@babel/preset-env": "^7.6.2",
"@gitlab/svgs": "^1.82.0",
- "@gitlab/ui": "7.15.2",
+ "@gitlab/ui": "7.16.1",
"@gitlab/visual-review-tools": "1.2.0",
"@sentry/browser": "^5.7.1",
"@sourcegraph/code-host-integration": "^0.0.14",
diff --git a/spec/frontend/jobs/components/erased_block_spec.js b/spec/frontend/jobs/components/erased_block_spec.js
index 8e0433d3fb7..5e6570f72e0 100644
--- a/spec/frontend/jobs/components/erased_block_spec.js
+++ b/spec/frontend/jobs/components/erased_block_spec.js
@@ -1,23 +1,30 @@
-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);
});
});
});
diff --git a/spec/frontend/vue_shared/components/user_popover/user_popover_spec.js b/spec/frontend/vue_shared/components/user_popover/user_popover_spec.js
index fc2eb6329b0..2750b54521a 100644
--- a/spec/frontend/vue_shared/components/user_popover/user_popover_spec.js
+++ b/spec/frontend/vue_shared/components/user_popover/user_popover_spec.js
@@ -1,5 +1,7 @@
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'),
diff --git a/yarn.lock b/yarn.lock
index ab929647c4b..f6565af4cad 100644
--- a/yarn.lock
+++ b/yarn.lock
@@ -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"