Commit 2eaa98f2 authored by GitLab Bot's avatar GitLab Bot

Automatic merge of gitlab-org/gitlab master

parents 85030933 4b1e65aa
......@@ -51,10 +51,6 @@ export default {
},
methods: {
...mapActions(['toggleBoardItem', 'setAssignees']),
updateAssignees(data) {
const assignees = data.issueSetAssignees?.issue?.assignees?.nodes || [];
this.setAssignees(assignees);
},
handleClose() {
this.toggleBoardItem({ boardItem: this.activeIssue, sidebarType: this.sidebarType });
},
......@@ -78,7 +74,7 @@ export default {
:full-path="fullPath"
:initial-assignees="activeIssue.assignees"
class="assignee"
@assignees-updated="updateAssignees"
@assignees-updated="setAssignees"
/>
<board-sidebar-epic-select class="epic" />
<div>
......
......@@ -69,6 +69,7 @@ export default {
'milestoneTitle',
'releaseTag',
'search',
'myReactionEmoji',
]);
filterParams.not = transformNotFilters(filters);
commit(types.SET_FILTERS, filterParams);
......
......@@ -66,8 +66,8 @@ export default {
},
listClasses() {
return {
'gl-pl-7': this.nestedLevel === 1,
'gl-pl-9': this.nestedLevel === 2,
'gl-pl-9': this.nestedLevel === 1,
'gl-pl-11-5': this.nestedLevel === 2,
};
},
},
......
......@@ -88,8 +88,8 @@ export default {
},
listClasses() {
return {
'gl-pl-7': this.nestedLevel === 1,
'gl-pl-8': this.nestedLevel === 2,
'gl-pl-9': this.nestedLevel === 1,
'gl-pl-11-5': this.nestedLevel === 2,
};
},
},
......
......@@ -51,7 +51,7 @@ export default {
if (!this.nestedSummary) {
return ['gl-px-5'];
}
return ['gl-pl-7', 'gl-pr-5', { 'gl-bg-gray-10': this.statusIcon === ICON_WARNING }];
return ['gl-pl-9', 'gl-pr-5', { 'gl-bg-gray-10': this.statusIcon === ICON_WARNING }];
},
statusIconSize() {
if (!this.nestedSummary) {
......
......@@ -24,7 +24,7 @@ export default {
n__(
'Reports|Failed %{count} time in %{base_branch} in the last 14 days',
'Reports|Failed %{count} times in %{base_branch} in the last 14 days',
this.issue.recent_failures.count,
this.issue.recent_failures?.count,
),
this.issue.recent_failures,
);
......@@ -44,20 +44,20 @@ export default {
<template>
<div class="gl-display-flex gl-mt-2 gl-mb-2">
<issue-status-icon :status="status" :status-icon-size="24" class="gl-mr-3" />
<gl-badge
v-if="showRecentFailures"
variant="warning"
class="gl-mr-2"
data-testid="test-issue-body-recent-failures"
>
{{ recentFailureMessage }}
</gl-badge>
<gl-button
button-text-classes="gl-white-space-normal! gl-word-break-all gl-text-left"
variant="link"
data-testid="test-issue-body-description"
@click="openModal({ issue })"
>
<gl-badge
v-if="showRecentFailures"
variant="warning"
class="gl-mr-2"
data-testid="test-issue-body-recent-failures"
>
{{ recentFailureMessage }}
</gl-badge>
{{ issue.name }}
</gl-button>
</div>
......
......@@ -9,6 +9,7 @@ import {
GlDropdownItem,
GlIcon,
} from '@gitlab/ui';
import { isEmpty } from 'lodash';
import { __, s__ } from '~/locale';
import ModalCopyButton from '~/vue_shared/components/modal_copy_button.vue';
import {
......@@ -79,7 +80,7 @@ export default {
return Object.keys(this.selectedPlatform).length > 0;
},
instructionsEmpty() {
return Object.keys(this.instructions).length === 0;
return isEmpty(this.instructions);
},
groupId() {
return this.group?.id ?? '';
......@@ -212,10 +213,7 @@ export default {
<pre
class="gl-bg-gray gl-flex-fill-1 gl-white-space-pre-line"
data-testid="binary-instructions"
>
{{ instructions.installInstructions }}
</pre
>{{ instructions.installInstructions }}</pre
>
<modal-copy-button
:title="$options.i18n.copyInstructions"
......
......@@ -19,5 +19,5 @@
type: 'group',
reset_token_url: reset_registration_token_group_settings_ci_cd_path,
project_path: '',
group_path: @group.path }
group_path: @group.full_path }
%br
---
title: Fix updating GraphQL boards cards on assignees update
merge_request: 57687
author:
type: fixed
---
title: Display error message when runner installation instructions modal cannot be
loaded correctly
merge_request: 57588
author:
type: fixed
---
title: Fix test report merge request widget summary and issues alignment
merge_request: 56768
author:
type: fixed
This diff is collapsed.
......@@ -200,7 +200,7 @@ An invoice is generated for the renewal and available for viewing or download on
### Seat Link
> [Introduced](https://gitlab.com/gitlab-org/gitlab/-/issues/208832) in [GitLab Starter](https://about.gitlab.com/pricing/) 12.9.
> [Introduced](https://gitlab.com/gitlab-org/gitlab/-/issues/208832) in GitLab 12.9.
Seat Link allows GitLab Inc. to provide our GitLab self-managed customers with prorated charges for user growth throughout the year using a quarterly reconciliation process.
......@@ -269,7 +269,7 @@ You can view the exact JSON payload in the administration panel. To view the pay
#### Disable Seat Link
> [Introduced](https://gitlab.com/gitlab-org/gitlab/-/issues/212375) in [GitLab Starter](https://about.gitlab.com/pricing/) 12.10.
> [Introduced](https://gitlab.com/gitlab-org/gitlab/-/issues/212375) in GitLab 12.10.
Seat Link is enabled by default.
......
......@@ -126,6 +126,7 @@ export default {
'releaseTag',
'search',
'weight',
'myReactionEmoji',
]);
// Temporarily disabled until negated filters are supported for epic boards
......
<script>
import { GlButton, GlSprintf } from '@gitlab/ui';
import { numberToHumanSize } from '~/lib/utils/number_utils';
import { s__ } from '~/locale';
export default {
components: {
GlButton,
GlSprintf,
},
props: {
totalSize: {
type: Number,
required: true,
},
},
i18n: {
totalSize: s__('CorpusManagement|Total Size: %{totalSize}'),
newCorpus: s__('CorpusManagement|New corpus'),
},
computed: {
formattedFileSize() {
return numberToHumanSize(this.totalSize);
},
},
methods: {
newCorpus() {
this.$emit('newcorpus');
},
},
};
</script>
<template>
<div
class="gl-h-11 gl-bg-gray-10 gl-display-flex gl-justify-content-space-between gl-align-items-center"
>
<div class="gl-ml-5">
<gl-sprintf :message="$options.i18n.totalSize">
<template #totalSize>
<span class="gl-font-weight-bold">{{ formattedFileSize }}</span>
</template>
</gl-sprintf>
</div>
<gl-button class="gl-mr-5" category="primary" variant="confirm" @click="newCorpus">
{{ this.$options.i18n.newCorpus }}
</gl-button>
</div>
</template>
// Jest Snapshot v1, https://goo.gl/fbAQLP
exports[`Corpus Upload component renders header 1`] = `
<div
class="gl-h-11 gl-bg-gray-10 gl-display-flex gl-justify-content-space-between gl-align-items-center"
>
<div
class="gl-ml-5"
>
<gl-sprintf-stub
message="Total Size: %{totalSize}"
/>
</div>
<gl-button-stub
buttontextclasses=""
category="primary"
class="gl-mr-5"
icon=""
size="medium"
variant="confirm"
>
New corpus
</gl-button-stub>
</div>
`;
import { GlButton } from '@gitlab/ui';
import { shallowMount } from '@vue/test-utils';
import CorpusUpload from 'ee/security_configuration/corpus_management/components/corpus_upload.vue';
describe('Corpus Upload', () => {
let wrapper;
const createComponentFactory = (mountFn = shallowMount) => (options = {}) => {
const defaultProps = { totalSize: 4e8 };
wrapper = mountFn(CorpusUpload, {
propsData: defaultProps,
...options,
});
};
const createComponent = createComponentFactory();
afterEach(() => {
wrapper.destroy();
});
describe('component', () => {
it('renders header', () => {
createComponent();
expect(wrapper.findComponent(GlButton).exists()).toBe(true);
expect(wrapper.element).toMatchSnapshot();
});
it('calls the `uploadCorpus` callback on `new corpus` button click', async () => {
createComponent({ stubs: { GlButton } });
await wrapper.findComponent(GlButton).trigger('click');
expect(wrapper.emitted().newcorpus).toEqual([[]]);
});
});
});
......@@ -8645,6 +8645,12 @@ msgstr ""
msgid "CorpusManagement|Fuzz testing corpus management"
msgstr ""
msgid "CorpusManagement|New corpus"
msgstr ""
msgid "CorpusManagement|Total Size: %{totalSize}"
msgstr ""
msgid "Could not add admins as members"
msgstr ""
......
......@@ -17,8 +17,6 @@ RSpec.describe 'Project issue boards sidebar assignee', :js do
let(:card) { find('.board:nth-child(2)').first('.board-card') }
before do
stub_feature_flags(graphql_board_lists: false)
project.add_maintainer(user)
sign_in(user)
......
......@@ -52,7 +52,7 @@ describe('Test issue body', () => {
});
it('renders issue name', () => {
expect(findDescription().text()).toBe(failedIssue.name);
expect(findDescription().text()).toContain(failedIssue.name);
});
it('renders failed status icon', () => {
......
import { GlAlert } from '@gitlab/ui';
import { shallowMount, createLocalVue } from '@vue/test-utils';
import VueApollo from 'vue-apollo';
import createMockApollo from 'helpers/mock_apollo_helper';
......@@ -14,7 +15,10 @@ localVue.use(VueApollo);
describe('RunnerInstructions component', () => {
let wrapper;
let fakeApollo;
let runnerPlatformsHandler;
let runnerSetupInstructionsHandler;
const findAlert = () => wrapper.findComponent(GlAlert);
const findModalButton = () => wrapper.find('[data-testid="show-modal-button"]');
const findPlatformButtons = () => wrapper.findAll('[data-testid="platform-button"]');
const findArchitectureDropdownItems = () =>
......@@ -22,10 +26,10 @@ describe('RunnerInstructions component', () => {
const findBinaryInstructionsSection = () => wrapper.find('[data-testid="binary-instructions"]');
const findRunnerInstructionsSection = () => wrapper.find('[data-testid="runner-instructions"]');
beforeEach(async () => {
const createComponent = () => {
const requestHandlers = [
[getRunnerPlatforms, jest.fn().mockResolvedValue(mockGraphqlRunnerPlatforms)],
[getRunnerSetupInstructions, jest.fn().mockResolvedValue(mockGraphqlInstructions)],
[getRunnerPlatforms, runnerPlatformsHandler],
[getRunnerSetupInstructions, runnerSetupInstructionsHandler],
];
fakeApollo = createMockApollo(requestHandlers);
......@@ -37,6 +41,13 @@ describe('RunnerInstructions component', () => {
localVue,
apolloProvider: fakeApollo,
});
};
beforeEach(async () => {
runnerPlatformsHandler = jest.fn().mockResolvedValue(mockGraphqlRunnerPlatforms);
runnerSetupInstructionsHandler = jest.fn().mockResolvedValue(mockGraphqlInstructions);
createComponent();
await wrapper.vm.$nextTick();
});
......@@ -46,6 +57,10 @@ describe('RunnerInstructions component', () => {
wrapper = null;
});
it('should not show alert', () => {
expect(findAlert().exists()).toBe(false);
});
it('should show the "Show Runner installation instructions" button', () => {
const button = findModalButton();
......@@ -110,4 +125,23 @@ describe('RunnerInstructions component', () => {
expect(runner.text()).toMatch(mockGraphqlInstructions.data.runnerSetup.registerInstructions);
});
describe('when instructions cannot be loaded', () => {
beforeEach(async () => {
runnerSetupInstructionsHandler.mockRejectedValue();
createComponent();
await wrapper.vm.$nextTick();
});
it('should show alert', () => {
expect(findAlert().exists()).toBe(true);
});
it('should not show instructions', () => {
expect(findBinaryInstructionsSection().exists()).toBe(false);
expect(findRunnerInstructionsSection().exists()).toBe(false);
});
});
});
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