Add latest changes from gitlab-org/gitlab@master

This commit is contained in:
GitLab Bot 2024-12-24 03:31:34 +00:00
parent d225ea9ab2
commit 29cb6e6712
2 changed files with 18 additions and 2 deletions

View File

@ -196,8 +196,9 @@ export default {
fixed
>
<template #head(actions)>
<span class="gl-block lg:!gl-hidden">{{ s__('Pipeline|Actions') }}</span>
<slot name="table-header-actions"></slot>
<slot name="table-header-actions">
<span class="gl-block gl-text-right">{{ s__('Pipeline|Actions') }}</span>
</slot>
</template>
<template #table-colgroup="{ fields }">

View File

@ -27,6 +27,7 @@ Vue.use(VueApollo);
describe('Pipelines Table', () => {
let wrapper;
let trackingSpy;
let slots;
const defaultProvide = {
fullPath: '/my-project/',
@ -62,6 +63,7 @@ describe('Pipelines Table', () => {
...stubs,
},
apolloProvider: createMockApollo(),
slots,
});
};
@ -330,4 +332,17 @@ describe('Pipelines Table', () => {
});
});
});
describe('table-header-actions slot', () => {
it('should replace actions column header by the slot content', () => {
const content = 'Actions slot content';
slots = {
'table-header-actions': `<div>${content}</div>`,
};
createComponent();
expect(findActionsTh().text()).toBe(content);
});
});
});