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:
authorGitLab Bot <gitlab-bot@gitlab.com>2022-06-14 00:09:12 +0300
committerGitLab Bot <gitlab-bot@gitlab.com>2022-06-14 00:09:12 +0300
commit4ea2496094922fc17d9f7f84c2a44d691c483190 (patch)
tree1c9824c696e3deca5f0a5be96617e9d6659d90b3 /spec/frontend
parentd4a7d0bec23c624bd0e7d690bdc0cb3fe8387378 (diff)
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'spec/frontend')
-rw-r--r--spec/frontend/ide/components/jobs/__snapshots__/stage_spec.js.snap2
-rw-r--r--spec/frontend/lib/utils/table_utility_spec.js7
-rw-r--r--spec/frontend/nav/components/responsive_header_spec.js4
-rw-r--r--spec/frontend/notes/components/noteable_discussion_spec.js19
-rw-r--r--spec/frontend/vue_mr_widget/components/approvals/approvals_spec.js6
5 files changed, 31 insertions, 7 deletions
diff --git a/spec/frontend/ide/components/jobs/__snapshots__/stage_spec.js.snap b/spec/frontend/ide/components/jobs/__snapshots__/stage_spec.js.snap
index d1cf9f2e248..45444166a50 100644
--- a/spec/frontend/ide/components/jobs/__snapshots__/stage_spec.js.snap
+++ b/spec/frontend/ide/components/jobs/__snapshots__/stage_spec.js.snap
@@ -35,7 +35,7 @@ exports[`IDE pipeline stage renders stage details & icon 1`] = `
<gl-icon-stub
class="ide-stage-collapse-icon"
- name="angle-down"
+ name="chevron-lg-down"
size="16"
/>
</div>
diff --git a/spec/frontend/lib/utils/table_utility_spec.js b/spec/frontend/lib/utils/table_utility_spec.js
index 0ceccbe4c74..df9006f4909 100644
--- a/spec/frontend/lib/utils/table_utility_spec.js
+++ b/spec/frontend/lib/utils/table_utility_spec.js
@@ -9,6 +9,13 @@ describe('table_utility', () => {
});
});
+ describe('thWidthPercent', () => {
+ it('returns the width class including default table header classes', () => {
+ const width = 50;
+ expect(tableUtils.thWidthPercent(width)).toBe(`gl-w-${width}p`);
+ });
+ });
+
describe('sortObjectToString', () => {
it('returns the expected sorting string ending in "DESC" when sortDesc is true', () => {
expect(tableUtils.sortObjectToString({ sortBy: 'mergedAt', sortDesc: true })).toBe(
diff --git a/spec/frontend/nav/components/responsive_header_spec.js b/spec/frontend/nav/components/responsive_header_spec.js
index 937c44727c7..f87de0afb14 100644
--- a/spec/frontend/nav/components/responsive_header_spec.js
+++ b/spec/frontend/nav/components/responsive_header_spec.js
@@ -43,7 +43,7 @@ describe('~/nav/components/top_nav_menu_sections.vue', () => {
menuItem: {
id: 'home',
view: 'home',
- icon: 'angle-left',
+ icon: 'chevron-lg-left',
},
iconOnly: true,
});
@@ -60,7 +60,7 @@ describe('~/nav/components/top_nav_menu_sections.vue', () => {
it('emits menu-item-click', () => {
expect(wrapper.emitted()).toEqual({
- 'menu-item-click': [[{ id: 'home', view: 'home', icon: 'angle-left' }]],
+ 'menu-item-click': [[{ id: 'home', view: 'home', icon: 'chevron-lg-left' }]],
});
});
});
diff --git a/spec/frontend/notes/components/noteable_discussion_spec.js b/spec/frontend/notes/components/noteable_discussion_spec.js
index c46d3bbe5b2..ddfa77117ca 100644
--- a/spec/frontend/notes/components/noteable_discussion_spec.js
+++ b/spec/frontend/notes/components/noteable_discussion_spec.js
@@ -87,10 +87,27 @@ describe('noteable_discussion component', () => {
expect(noteFormProps.discussion).toBe(discussionMock);
expect(noteFormProps.line).toBe(null);
- expect(noteFormProps.saveButtonTitle).toBe('Comment');
expect(noteFormProps.autosaveKey).toBe(`Note/Issue/${discussionMock.id}/Reply`);
});
+ it.each`
+ noteType | isNoteInternal | saveButtonTitle
+ ${'public'} | ${false} | ${'Reply'}
+ ${'internal'} | ${true} | ${'Reply internally'}
+ `(
+ 'reply button on form should have title "$saveButtonTitle" when note is $noteType',
+ async ({ isNoteInternal, saveButtonTitle }) => {
+ wrapper.setProps({ discussion: { ...discussionMock, confidential: isNoteInternal } });
+ await nextTick();
+
+ const replyPlaceholder = wrapper.find(ReplyPlaceholder);
+ replyPlaceholder.vm.$emit('focus');
+ await nextTick();
+
+ expect(wrapper.find(NoteForm).props('saveButtonTitle')).toBe(saveButtonTitle);
+ },
+ );
+
it('should expand discussion', async () => {
const discussion = { ...discussionMock, expanded: false };
diff --git a/spec/frontend/vue_mr_widget/components/approvals/approvals_spec.js b/spec/frontend/vue_mr_widget/components/approvals/approvals_spec.js
index e7a98d2ebee..86ae0c72005 100644
--- a/spec/frontend/vue_mr_widget/components/approvals/approvals_spec.js
+++ b/spec/frontend/vue_mr_widget/components/approvals/approvals_spec.js
@@ -171,7 +171,7 @@ describe('MRWidget approvals', () => {
it('approve action is rendered', () => {
expect(findActionData()).toEqual({
- variant: 'info',
+ variant: 'confirm',
text: 'Approve',
category: 'primary',
});
@@ -192,7 +192,7 @@ describe('MRWidget approvals', () => {
it('approve action (with inverted style) is rendered', () => {
expect(findActionData()).toEqual({
- variant: 'info',
+ variant: 'confirm',
text: 'Approve',
category: 'secondary',
});
@@ -208,7 +208,7 @@ describe('MRWidget approvals', () => {
it('approve additionally action is rendered', () => {
expect(findActionData()).toEqual({
- variant: 'info',
+ variant: 'confirm',
text: 'Approve additionally',
category: 'secondary',
});