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
path: root/spec
diff options
context:
space:
mode:
authorGitLab Bot <gitlab-bot@gitlab.com>2022-09-22 12:15:04 +0300
committerGitLab Bot <gitlab-bot@gitlab.com>2022-09-22 12:15:04 +0300
commit2fa173410ad24b37aba6450ae4530ec231844d86 (patch)
tree8bb24a83b6240f1da43b6ab7b1f9b96181f26831 /spec
parent8cfb9f566dae84d7ff76cdc3c4afa864fca94737 (diff)
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'spec')
-rw-r--r--spec/features/issues/incident_issue_spec.rb8
-rw-r--r--spec/frontend/boards/board_card_inner_spec.js8
-rw-r--r--spec/frontend/vue_shared/issuable/__snapshots__/issuable_blocked_icon_spec.js.snap (renamed from spec/frontend/boards/components/__snapshots__/board_blocked_icon_spec.js.snap)12
-rw-r--r--spec/frontend/vue_shared/issuable/issuable_blocked_icon_spec.js (renamed from spec/frontend/boards/components/board_blocked_icon_spec.js)13
4 files changed, 22 insertions, 19 deletions
diff --git a/spec/features/issues/incident_issue_spec.rb b/spec/features/issues/incident_issue_spec.rb
index 56be1493ed2..6afdb0bd379 100644
--- a/spec/features/issues/incident_issue_spec.rb
+++ b/spec/features/issues/incident_issue_spec.rb
@@ -67,13 +67,13 @@ RSpec.describe 'Incident Detail', :js do
expect(incident_tabs).to have_content('"yet.another": 73')
# does not show the linked issues and notes/comment components' do
- hidden_items = find_all('.js-issue-widgets')
+ hidden_items = find_all('.js-issue-widgets', wait: false)
# Linked Issues/MRs and comment box are hidden on page
expect(hidden_items.count).to eq(0)
# does not show the edit title and description button
- edit_button = find_all('[aria-label="Edit title and description"]')
+ edit_button = find_all('[aria-label="Edit title and description"]', wait: false)
expect(edit_button.count).to eq(0)
end
end
@@ -83,12 +83,14 @@ RSpec.describe 'Incident Detail', :js do
before do
visit project_issue_path(project, incident)
wait_for_requests
+
click_link 'Timeline'
+ wait_for_requests
end
it 'does not show the linked issues and notes/comment components' do
page.within('.issuable-details') do
- hidden_items = find_all('.js-issue-widgets')
+ hidden_items = find_all('.js-issue-widgets', wait: false)
# Linked Issues/MRs and comment box are hidden on page
expect(hidden_items.count).to eq(0)
diff --git a/spec/frontend/boards/board_card_inner_spec.js b/spec/frontend/boards/board_card_inner_spec.js
index 2c3ec69f9ae..ab80f306ec5 100644
--- a/spec/frontend/boards/board_card_inner_spec.js
+++ b/spec/frontend/boards/board_card_inner_spec.js
@@ -5,7 +5,7 @@ import { nextTick } from 'vue';
import setWindowLocation from 'helpers/set_window_location_helper';
import { createMockDirective, getBinding } from 'helpers/vue_mock_directive';
import { mountExtended } from 'helpers/vue_test_utils_helper';
-import BoardBlockedIcon from '~/boards/components/board_blocked_icon.vue';
+import IssuableBlockedIcon from '~/vue_shared/components/issuable_blocked_icon/issuable_blocked_icon.vue';
import BoardCardInner from '~/boards/components/board_card_inner.vue';
import BoardCardMoveToPosition from '~/boards/components/board_card_move_to_position.vue';
import WorkItemTypeIcon from '~/work_items/components/work_item_type_icon.vue';
@@ -39,7 +39,7 @@ describe('Board card component', () => {
let list;
let store;
- const findBoardBlockedIcon = () => wrapper.findComponent(BoardBlockedIcon);
+ const findIssuableBlockedIcon = () => wrapper.findComponent(IssuableBlockedIcon);
const findLoadingIcon = () => wrapper.findComponent(GlLoadingIcon);
const findEpicCountablesTotalTooltip = () => wrapper.findComponent(GlTooltip);
const findEpicCountables = () => wrapper.findByTestId('epic-countables');
@@ -189,7 +189,7 @@ describe('Board card component', () => {
},
});
- expect(findBoardBlockedIcon().exists()).toBe(true);
+ expect(findIssuableBlockedIcon().exists()).toBe(true);
});
it('does not show blocked icon if issue is not blocked', () => {
@@ -200,7 +200,7 @@ describe('Board card component', () => {
},
});
- expect(findBoardBlockedIcon().exists()).toBe(false);
+ expect(findIssuableBlockedIcon().exists()).toBe(false);
});
});
diff --git a/spec/frontend/boards/components/__snapshots__/board_blocked_icon_spec.js.snap b/spec/frontend/vue_shared/issuable/__snapshots__/issuable_blocked_icon_spec.js.snap
index 34e4f996ff0..dd011b9d84e 100644
--- a/spec/frontend/boards/components/__snapshots__/board_blocked_icon_spec.js.snap
+++ b/spec/frontend/vue_shared/issuable/__snapshots__/issuable_blocked_icon_spec.js.snap
@@ -1,23 +1,23 @@
// Jest Snapshot v1, https://goo.gl/fbAQLP
-exports[`BoardBlockedIcon on mouseenter on blocked icon with more than three blocking issues matches the snapshot 1`] = `
-"<div class=\\"gl-display-inline\\"><svg data-testid=\\"issue-blocked-icon\\" role=\\"img\\" aria-hidden=\\"true\\" class=\\"issue-blocked-icon gl-mr-2 gl-cursor-pointer gl-text-red-500 gl-icon s16\\" id=\\"blocked-icon-uniqueId\\">
+exports[`IssuableBlockedIcon on mouseenter on blocked icon with more than three blocking issues matches the snapshot 1`] = `
+"<div class=\\"gl-display-inline\\"><svg data-testid=\\"issuable-blocked-icon\\" role=\\"img\\" aria-hidden=\\"true\\" class=\\"issuable-blocked-icon gl-mr-2 gl-cursor-pointer gl-text-red-500 gl-icon s16\\" id=\\"blocked-icon-uniqueId\\">
<use href=\\"#issue-block\\"></use>
</svg>
<div class=\\"gl-popover\\">
- <ul class=\\"gl-list-style-none gl-p-0\\">
+ <ul class=\\"gl-list-style-none gl-p-0 gl-mb-0\\">
<li><a href=\\"http://gdk.test:3000/gitlab-org/my-project-1/-/issues/6\\" class=\\"gl-link gl-text-blue-500! gl-font-sm\\">my-project-1#6</a>
- <p data-testid=\\"issuable-title\\" class=\\"gl-mb-3 gl-display-block!\\">
+ <p data-testid=\\"issuable-title\\" class=\\"gl-display-block! gl-mb-3\\">
blocking issue title 1
</p>
</li>
<li><a href=\\"http://gdk.test:3000/gitlab-org/my-project-1/-/issues/5\\" class=\\"gl-link gl-text-blue-500! gl-font-sm\\">my-project-1#5</a>
- <p data-testid=\\"issuable-title\\" class=\\"gl-mb-3 gl-display-block!\\">
+ <p data-testid=\\"issuable-title\\" class=\\"gl-display-block! gl-mb-3\\">
blocking issue title 2 + blocking issue title 2 + blocking issue title 2 + bloc…
</p>
</li>
<li><a href=\\"http://gdk.test:3000/gitlab-org/my-project-1/-/issues/4\\" class=\\"gl-link gl-text-blue-500! gl-font-sm\\">my-project-1#4</a>
- <p data-testid=\\"issuable-title\\" class=\\"gl-mb-3 gl-display-block!\\">
+ <p data-testid=\\"issuable-title\\" class=\\"gl-display-block! gl-mb-0\\">
blocking issue title 3
</p>
</li>
diff --git a/spec/frontend/boards/components/board_blocked_icon_spec.js b/spec/frontend/vue_shared/issuable/issuable_blocked_icon_spec.js
index ffdc0a7cecc..d59cbce6633 100644
--- a/spec/frontend/boards/components/board_blocked_icon_spec.js
+++ b/spec/frontend/vue_shared/issuable/issuable_blocked_icon_spec.js
@@ -5,8 +5,9 @@ import VueApollo from 'vue-apollo';
import createMockApollo from 'helpers/mock_apollo_helper';
import { extendedWrapper } from 'helpers/vue_test_utils_helper';
import waitForPromises from 'helpers/wait_for_promises';
-import BoardBlockedIcon from '~/boards/components/board_blocked_icon.vue';
-import { blockingIssuablesQueries, issuableTypes } from '~/boards/constants';
+import IssuableBlockedIcon from '~/vue_shared/components/issuable_blocked_icon/issuable_blocked_icon.vue';
+import { blockingIssuablesQueries } from '~/vue_shared/components/issuable_blocked_icon/constants';
+import { issuableTypes } from '~/boards/constants';
import { truncate } from '~/lib/utils/text_utility';
import {
mockIssue,
@@ -21,9 +22,9 @@ import {
mockBlockedIssue2,
mockBlockedEpic1,
mockBlockingEpicIssuablesResponse1,
-} from '../mock_data';
+} from '../../boards/mock_data';
-describe('BoardBlockedIcon', () => {
+describe('IssuableBlockedIcon', () => {
let wrapper;
let mockApollo;
@@ -64,7 +65,7 @@ describe('BoardBlockedIcon', () => {
Vue.use(VueApollo);
wrapper = extendedWrapper(
- mount(BoardBlockedIcon, {
+ mount(IssuableBlockedIcon, {
apolloProvider: mockApollo,
propsData: {
item: {
@@ -88,7 +89,7 @@ describe('BoardBlockedIcon', () => {
issuableType = issuableTypes.issue,
} = {}) => {
wrapper = extendedWrapper(
- shallowMount(BoardBlockedIcon, {
+ shallowMount(IssuableBlockedIcon, {
propsData: {
item: {
...mockIssuable,