Add latest changes from gitlab-org/gitlab@master
This commit is contained in:
parent
91608af1b7
commit
a1c59f6d02
6 changed files with 22 additions and 75 deletions
|
@ -16,7 +16,7 @@ stages:
|
||||||
# in cases where jobs require Docker-in-Docker, the job
|
# in cases where jobs require Docker-in-Docker, the job
|
||||||
# definition must be extended with `.use-docker-in-docker`
|
# definition must be extended with `.use-docker-in-docker`
|
||||||
default:
|
default:
|
||||||
image: ${REGISTRY_HOST}/${REGISTRY_GROUP}/gitlab-build-images:ruby-2.7.patched-golang-1.16-git-2.33-lfs-2.9-chrome-89-node-14.15-yarn-1.22-postgresql-11-graphicsmagick-1.3.36
|
image: ${REGISTRY_HOST}/${REGISTRY_GROUP}/gitlab-build-images:debian-bullseye-ruby-2.7.patched-golang-1.16-git-2.33-lfs-2.9-chrome-97-node-14.15-yarn-1.22-postgresql-11-graphicsmagick-1.3.36
|
||||||
tags:
|
tags:
|
||||||
- gitlab-org
|
- gitlab-org
|
||||||
# All jobs are interruptible by default
|
# All jobs are interruptible by default
|
||||||
|
|
|
@ -11,7 +11,7 @@
|
||||||
- .default-retry
|
- .default-retry
|
||||||
- .default-before_script
|
- .default-before_script
|
||||||
- .assets-compile-cache
|
- .assets-compile-cache
|
||||||
image: ${REGISTRY_HOST}/${REGISTRY_GROUP}/gitlab-build-images:ruby-2.7-git-2.33-lfs-2.9-node-14.15-yarn-1.22-graphicsmagick-1.3.36
|
image: ${REGISTRY_HOST}/${REGISTRY_GROUP}/gitlab-build-images:debian-bullseye-ruby-2.7-git-2.33-lfs-2.9-node-14.15-yarn-1.22-graphicsmagick-1.3.36
|
||||||
variables:
|
variables:
|
||||||
SETUP_DB: "false"
|
SETUP_DB: "false"
|
||||||
WEBPACK_VENDOR_DLL: "true"
|
WEBPACK_VENDOR_DLL: "true"
|
||||||
|
|
|
@ -18,7 +18,7 @@
|
||||||
- source scripts/prepare_build.sh
|
- source scripts/prepare_build.sh
|
||||||
|
|
||||||
.ruby-gems-cache: &ruby-gems-cache
|
.ruby-gems-cache: &ruby-gems-cache
|
||||||
key: "ruby-gems-v1"
|
key: "ruby-gems-v2"
|
||||||
paths:
|
paths:
|
||||||
- vendor/ruby/
|
- vendor/ruby/
|
||||||
policy: pull
|
policy: pull
|
||||||
|
@ -28,7 +28,7 @@
|
||||||
policy: push # We want to rebuild the cache from scratch to ensure stale dependencies are cleaned up.
|
policy: push # We want to rebuild the cache from scratch to ensure stale dependencies are cleaned up.
|
||||||
|
|
||||||
.gitaly-ruby-gems-cache: &gitaly-ruby-gems-cache
|
.gitaly-ruby-gems-cache: &gitaly-ruby-gems-cache
|
||||||
key: "gitaly-ruby-gems-v1"
|
key: "gitaly-ruby-gems-v2"
|
||||||
paths:
|
paths:
|
||||||
- vendor/gitaly-ruby/
|
- vendor/gitaly-ruby/
|
||||||
policy: pull
|
policy: pull
|
||||||
|
@ -213,7 +213,7 @@
|
||||||
- *storybook-node-modules-cache-push
|
- *storybook-node-modules-cache-push
|
||||||
|
|
||||||
.use-pg11:
|
.use-pg11:
|
||||||
image: ${REGISTRY_HOST}/${REGISTRY_GROUP}/gitlab-build-images:ruby-2.7.patched-golang-1.16-git-2.33-lfs-2.9-chrome-89-node-14.15-yarn-1.22-postgresql-11-graphicsmagick-1.3.36
|
image: ${REGISTRY_HOST}/${REGISTRY_GROUP}/gitlab-build-images:debian-bullseye-ruby-2.7.patched-golang-1.16-git-2.33-lfs-2.9-chrome-97-node-14.15-yarn-1.22-postgresql-11-graphicsmagick-1.3.36
|
||||||
services:
|
services:
|
||||||
- name: postgres:11.6
|
- name: postgres:11.6
|
||||||
command: ["postgres", "-c", "fsync=off", "-c", "synchronous_commit=off", "-c", "full_page_writes=off"]
|
command: ["postgres", "-c", "fsync=off", "-c", "synchronous_commit=off", "-c", "full_page_writes=off"]
|
||||||
|
@ -222,7 +222,7 @@
|
||||||
POSTGRES_HOST_AUTH_METHOD: trust
|
POSTGRES_HOST_AUTH_METHOD: trust
|
||||||
|
|
||||||
.use-pg12:
|
.use-pg12:
|
||||||
image: ${REGISTRY_HOST}/${REGISTRY_GROUP}/gitlab-build-images:ruby-2.7.patched-golang-1.16-git-2.33-lfs-2.9-chrome-89-node-14.15-yarn-1.22-postgresql-12-graphicsmagick-1.3.36
|
image: ${REGISTRY_HOST}/${REGISTRY_GROUP}/gitlab-build-images:debian-bullseye-ruby-2.7.patched-golang-1.16-git-2.33-lfs-2.9-chrome-97-node-14.15-yarn-1.22-postgresql-12-graphicsmagick-1.3.36
|
||||||
services:
|
services:
|
||||||
- name: postgres:12
|
- name: postgres:12
|
||||||
command: ["postgres", "-c", "fsync=off", "-c", "synchronous_commit=off", "-c", "full_page_writes=off"]
|
command: ["postgres", "-c", "fsync=off", "-c", "synchronous_commit=off", "-c", "full_page_writes=off"]
|
||||||
|
@ -231,7 +231,7 @@
|
||||||
POSTGRES_HOST_AUTH_METHOD: trust
|
POSTGRES_HOST_AUTH_METHOD: trust
|
||||||
|
|
||||||
.use-pg13:
|
.use-pg13:
|
||||||
image: ${REGISTRY_HOST}/${REGISTRY_GROUP}/gitlab-build-images:ruby-2.7.patched-golang-1.16-git-2.33-lfs-2.9-chrome-89-node-14.15-yarn-1.22-postgresql-13-graphicsmagick-1.3.36
|
image: ${REGISTRY_HOST}/${REGISTRY_GROUP}/gitlab-build-images:debian-bullseye-ruby-2.7.patched-golang-1.16-git-2.33-lfs-2.9-chrome-97-node-14.15-yarn-1.22-postgresql-13-graphicsmagick-1.3.36
|
||||||
services:
|
services:
|
||||||
- name: postgres:13
|
- name: postgres:13
|
||||||
command: ["postgres", "-c", "fsync=off", "-c", "synchronous_commit=off", "-c", "full_page_writes=off"]
|
command: ["postgres", "-c", "fsync=off", "-c", "synchronous_commit=off", "-c", "full_page_writes=off"]
|
||||||
|
@ -240,7 +240,7 @@
|
||||||
POSTGRES_HOST_AUTH_METHOD: trust
|
POSTGRES_HOST_AUTH_METHOD: trust
|
||||||
|
|
||||||
.use-pg11-ee:
|
.use-pg11-ee:
|
||||||
image: ${REGISTRY_HOST}/${REGISTRY_GROUP}/gitlab-build-images:ruby-2.7.patched-golang-1.16-git-2.33-lfs-2.9-chrome-89-node-14.15-yarn-1.22-postgresql-11-graphicsmagick-1.3.36
|
image: ${REGISTRY_HOST}/${REGISTRY_GROUP}/gitlab-build-images:debian-bullseye-ruby-2.7.patched-golang-1.16-git-2.33-lfs-2.9-chrome-97-node-14.15-yarn-1.22-postgresql-11-graphicsmagick-1.3.36
|
||||||
services:
|
services:
|
||||||
- name: postgres:11.6
|
- name: postgres:11.6
|
||||||
command: ["postgres", "-c", "fsync=off", "-c", "synchronous_commit=off", "-c", "full_page_writes=off"]
|
command: ["postgres", "-c", "fsync=off", "-c", "synchronous_commit=off", "-c", "full_page_writes=off"]
|
||||||
|
@ -251,7 +251,7 @@
|
||||||
POSTGRES_HOST_AUTH_METHOD: trust
|
POSTGRES_HOST_AUTH_METHOD: trust
|
||||||
|
|
||||||
.use-pg12-ee:
|
.use-pg12-ee:
|
||||||
image: ${REGISTRY_HOST}/${REGISTRY_GROUP}/gitlab-build-images:ruby-2.7.patched-golang-1.16-git-2.33-lfs-2.9-chrome-89-node-14.15-yarn-1.22-postgresql-12-graphicsmagick-1.3.36
|
image: ${REGISTRY_HOST}/${REGISTRY_GROUP}/gitlab-build-images:debian-bullseye-ruby-2.7.patched-golang-1.16-git-2.33-lfs-2.9-chrome-97-node-14.15-yarn-1.22-postgresql-12-graphicsmagick-1.3.36
|
||||||
services:
|
services:
|
||||||
- name: postgres:12
|
- name: postgres:12
|
||||||
command: ["postgres", "-c", "fsync=off", "-c", "synchronous_commit=off", "-c", "full_page_writes=off"]
|
command: ["postgres", "-c", "fsync=off", "-c", "synchronous_commit=off", "-c", "full_page_writes=off"]
|
||||||
|
@ -262,7 +262,7 @@
|
||||||
POSTGRES_HOST_AUTH_METHOD: trust
|
POSTGRES_HOST_AUTH_METHOD: trust
|
||||||
|
|
||||||
.use-pg13-ee:
|
.use-pg13-ee:
|
||||||
image: ${REGISTRY_HOST}/${REGISTRY_GROUP}/gitlab-build-images:ruby-2.7.patched-golang-1.16-git-2.33-lfs-2.9-chrome-89-node-14.15-yarn-1.22-postgresql-13-graphicsmagick-1.3.36
|
image: ${REGISTRY_HOST}/${REGISTRY_GROUP}/gitlab-build-images:debian-bullseye-ruby-2.7.patched-golang-1.16-git-2.33-lfs-2.9-chrome-97-node-14.15-yarn-1.22-postgresql-13-graphicsmagick-1.3.36
|
||||||
services:
|
services:
|
||||||
- name: postgres:13
|
- name: postgres:13
|
||||||
command: ["postgres", "-c", "fsync=off", "-c", "synchronous_commit=off", "-c", "full_page_writes=off"]
|
command: ["postgres", "-c", "fsync=off", "-c", "synchronous_commit=off", "-c", "full_page_writes=off"]
|
||||||
|
|
|
@ -22,8 +22,8 @@ workhorse:verify:
|
||||||
|
|
||||||
workhorse:test using go 1.16:
|
workhorse:test using go 1.16:
|
||||||
extends: .workhorse:test
|
extends: .workhorse:test
|
||||||
image: ${REGISTRY_HOST}/${REGISTRY_GROUP}/gitlab-build-images:ruby-2.7-golang-1.16-git-2.31
|
image: ${REGISTRY_HOST}/${REGISTRY_GROUP}/gitlab-build-images:debian-bullseye-ruby-2.7-golang-1.16-git-2.31
|
||||||
|
|
||||||
workhorse:test using go 1.17:
|
workhorse:test using go 1.17:
|
||||||
extends: .workhorse:test
|
extends: .workhorse:test
|
||||||
image: ${REGISTRY_HOST}/${REGISTRY_GROUP}/gitlab-build-images:ruby-2.7-golang-1.17-git-2.31
|
image: ${REGISTRY_HOST}/${REGISTRY_GROUP}/gitlab-build-images:debian-bullseye-ruby-2.7-golang-1.17-git-2.31
|
||||||
|
|
|
@ -11,12 +11,10 @@ import { sortBy } from 'lodash';
|
||||||
import { mapActions, mapGetters, mapState } from 'vuex';
|
import { mapActions, mapGetters, mapState } from 'vuex';
|
||||||
import boardCardInner from 'ee_else_ce/boards/mixins/board_card_inner';
|
import boardCardInner from 'ee_else_ce/boards/mixins/board_card_inner';
|
||||||
import { isScopedLabel } from '~/lib/utils/common_utils';
|
import { isScopedLabel } from '~/lib/utils/common_utils';
|
||||||
import { updateHistory } from '~/lib/utils/url_utility';
|
|
||||||
import { sprintf, __, n__ } from '~/locale';
|
import { sprintf, __, n__ } from '~/locale';
|
||||||
import TooltipOnTruncate from '~/vue_shared/components/tooltip_on_truncate/tooltip_on_truncate.vue';
|
import TooltipOnTruncate from '~/vue_shared/components/tooltip_on_truncate/tooltip_on_truncate.vue';
|
||||||
import UserAvatarLink from '../../vue_shared/components/user_avatar/user_avatar_link.vue';
|
import UserAvatarLink from '../../vue_shared/components/user_avatar/user_avatar_link.vue';
|
||||||
import { ListType } from '../constants';
|
import { ListType } from '../constants';
|
||||||
import eventHub from '../eventhub';
|
|
||||||
import BoardBlockedIcon from './board_blocked_icon.vue';
|
import BoardBlockedIcon from './board_blocked_icon.vue';
|
||||||
import IssueDueDate from './issue_due_date.vue';
|
import IssueDueDate from './issue_due_date.vue';
|
||||||
import IssueTimeEstimate from './issue_time_estimate.vue';
|
import IssueTimeEstimate from './issue_time_estimate.vue';
|
||||||
|
@ -176,18 +174,10 @@ export default {
|
||||||
)
|
)
|
||||||
);
|
);
|
||||||
},
|
},
|
||||||
filterByLabel(label) {
|
labelTarget(label) {
|
||||||
if (!this.updateFilters) return;
|
|
||||||
const filterPath = window.location.search ? `${window.location.search}&` : '?';
|
const filterPath = window.location.search ? `${window.location.search}&` : '?';
|
||||||
const filter = `label_name[]=${encodeURIComponent(label.title)}`;
|
const value = encodeURIComponent(label.title);
|
||||||
|
return `${filterPath}label_name[]=${value}`;
|
||||||
if (!filterPath.includes(filter)) {
|
|
||||||
updateHistory({
|
|
||||||
url: `${filterPath}${filter}`,
|
|
||||||
});
|
|
||||||
this.performSearch();
|
|
||||||
eventHub.$emit('updateTokens');
|
|
||||||
}
|
|
||||||
},
|
},
|
||||||
showScopedLabel(label) {
|
showScopedLabel(label) {
|
||||||
return this.scopedLabelsAvailable && isScopedLabel(label);
|
return this.scopedLabelsAvailable && isScopedLabel(label);
|
||||||
|
@ -242,7 +232,7 @@ export default {
|
||||||
:description="label.description"
|
:description="label.description"
|
||||||
size="sm"
|
size="sm"
|
||||||
:scoped="showScopedLabel(label)"
|
:scoped="showScopedLabel(label)"
|
||||||
@click="filterByLabel(label)"
|
:target="labelTarget(label)"
|
||||||
/>
|
/>
|
||||||
</template>
|
</template>
|
||||||
</div>
|
</div>
|
||||||
|
|
|
@ -2,15 +2,12 @@ import { GlLabel, GlLoadingIcon, GlTooltip } from '@gitlab/ui';
|
||||||
import { range } from 'lodash';
|
import { range } from 'lodash';
|
||||||
import Vuex from 'vuex';
|
import Vuex from 'vuex';
|
||||||
import { nextTick } from 'vue';
|
import { nextTick } from 'vue';
|
||||||
import setWindowLocation from 'helpers/set_window_location_helper';
|
|
||||||
import { createMockDirective, getBinding } from 'helpers/vue_mock_directive';
|
import { createMockDirective, getBinding } from 'helpers/vue_mock_directive';
|
||||||
import { mountExtended } from 'helpers/vue_test_utils_helper';
|
import { mountExtended } from 'helpers/vue_test_utils_helper';
|
||||||
import BoardBlockedIcon from '~/boards/components/board_blocked_icon.vue';
|
import BoardBlockedIcon from '~/boards/components/board_blocked_icon.vue';
|
||||||
import BoardCardInner from '~/boards/components/board_card_inner.vue';
|
import BoardCardInner from '~/boards/components/board_card_inner.vue';
|
||||||
import { issuableTypes } from '~/boards/constants';
|
import { issuableTypes } from '~/boards/constants';
|
||||||
import eventHub from '~/boards/eventhub';
|
|
||||||
import defaultStore from '~/boards/stores';
|
import defaultStore from '~/boards/stores';
|
||||||
import { updateHistory } from '~/lib/utils/url_utility';
|
|
||||||
import { mockLabelList, mockIssue, mockIssueFullPath } from './mock_data';
|
import { mockLabelList, mockIssue, mockIssueFullPath } from './mock_data';
|
||||||
|
|
||||||
jest.mock('~/lib/utils/url_utility');
|
jest.mock('~/lib/utils/url_utility');
|
||||||
|
@ -54,6 +51,7 @@ describe('Board card component', () => {
|
||||||
state: {
|
state: {
|
||||||
...defaultStore.state,
|
...defaultStore.state,
|
||||||
issuableType: issuableTypes.issue,
|
issuableType: issuableTypes.issue,
|
||||||
|
isShowingLabels: true,
|
||||||
},
|
},
|
||||||
getters: {
|
getters: {
|
||||||
isGroupBoard: () => true,
|
isGroupBoard: () => true,
|
||||||
|
@ -405,53 +403,12 @@ describe('Board card component', () => {
|
||||||
expect(wrapper.findAll(GlLabel).length).toBe(1);
|
expect(wrapper.findAll(GlLabel).length).toBe(1);
|
||||||
expect(wrapper.text()).not.toContain('closed');
|
expect(wrapper.text()).not.toContain('closed');
|
||||||
});
|
});
|
||||||
});
|
|
||||||
|
|
||||||
describe('filterByLabel method', () => {
|
describe('when label params arent set', () => {
|
||||||
beforeEach(() => {
|
it('passes the right target to GlLabel', () => {
|
||||||
wrapper.setProps({
|
expect(wrapper.findAll(GlLabel).at(0).props('target')).toEqual(
|
||||||
updateFilters: true,
|
'?label_name[]=testing%20123',
|
||||||
});
|
);
|
||||||
});
|
|
||||||
|
|
||||||
describe('when selected label is not in the filter', () => {
|
|
||||||
beforeEach(() => {
|
|
||||||
jest.spyOn(wrapper.vm, 'performSearch').mockImplementation(() => {});
|
|
||||||
setWindowLocation('?');
|
|
||||||
wrapper.vm.filterByLabel(label1);
|
|
||||||
});
|
|
||||||
|
|
||||||
it('calls updateHistory', () => {
|
|
||||||
expect(updateHistory).toHaveBeenCalledTimes(1);
|
|
||||||
});
|
|
||||||
|
|
||||||
it('dispatches performSearch vuex action', () => {
|
|
||||||
expect(wrapper.vm.performSearch).toHaveBeenCalledTimes(1);
|
|
||||||
});
|
|
||||||
|
|
||||||
it('emits updateTokens event', () => {
|
|
||||||
expect(eventHub.$emit).toHaveBeenCalledTimes(1);
|
|
||||||
expect(eventHub.$emit).toHaveBeenCalledWith('updateTokens');
|
|
||||||
});
|
|
||||||
});
|
|
||||||
|
|
||||||
describe('when selected label is already in the filter', () => {
|
|
||||||
beforeEach(() => {
|
|
||||||
jest.spyOn(wrapper.vm, 'performSearch').mockImplementation(() => {});
|
|
||||||
setWindowLocation('?label_name[]=testing%20123');
|
|
||||||
wrapper.vm.filterByLabel(label1);
|
|
||||||
});
|
|
||||||
|
|
||||||
it('does not call updateHistory', () => {
|
|
||||||
expect(updateHistory).not.toHaveBeenCalled();
|
|
||||||
});
|
|
||||||
|
|
||||||
it('does not dispatch performSearch vuex action', () => {
|
|
||||||
expect(wrapper.vm.performSearch).not.toHaveBeenCalled();
|
|
||||||
});
|
|
||||||
|
|
||||||
it('does not emit updateTokens event', () => {
|
|
||||||
expect(eventHub.$emit).not.toHaveBeenCalled();
|
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|
Loading…
Reference in a new issue