summaryrefslogtreecommitdiff
path: root/spec/frontend/boards/components/board_content_spec.js
diff options
context:
space:
mode:
authorGitLab Bot <gitlab-bot@gitlab.com>2023-05-10 21:13:10 +0000
committerGitLab Bot <gitlab-bot@gitlab.com>2023-05-10 21:13:10 +0000
commitd9710d79c52bc73438022e79c79cfe3ab35b084b (patch)
tree4ccba377283753036ad28a75d061f7ee61afa806 /spec/frontend/boards/components/board_content_spec.js
parent20a86e7f6fd58882025b1c85b21e891d75220da5 (diff)
downloadgitlab-ce-d9710d79c52bc73438022e79c79cfe3ab35b084b.tar.gz
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'spec/frontend/boards/components/board_content_spec.js')
-rw-r--r--spec/frontend/boards/components/board_content_spec.js54
1 files changed, 1 insertions, 53 deletions
diff --git a/spec/frontend/boards/components/board_content_spec.js b/spec/frontend/boards/components/board_content_spec.js
index b109c2a3ab1..e14f661a8bd 100644
--- a/spec/frontend/boards/components/board_content_spec.js
+++ b/spec/frontend/boards/components/board_content_spec.js
@@ -1,9 +1,8 @@
import { GlAlert } from '@gitlab/ui';
import { shallowMount } from '@vue/test-utils';
-import Vue, { nextTick } from 'vue';
+import Vue from 'vue';
import Draggable from 'vuedraggable';
import Vuex from 'vuex';
-
import eventHub from '~/boards/eventhub';
import { stubComponent } from 'helpers/stub_component';
import waitForPromises from 'helpers/wait_for_promises';
@@ -77,29 +76,6 @@ describe('BoardContent', () => {
});
};
- beforeAll(() => {
- global.ResizeObserver = class MockResizeObserver {
- constructor(callback) {
- this.callback = callback;
-
- this.entries = [];
- }
-
- observe(entry) {
- this.entries.push(entry);
- }
-
- disconnect() {
- this.entries = [];
- this.callback = null;
- }
-
- trigger() {
- this.callback(this.entries);
- }
- };
- });
-
describe('default', () => {
beforeEach(() => {
createComponent();
@@ -118,34 +94,6 @@ describe('BoardContent', () => {
expect(wrapper.findComponent(GlAlert).exists()).toBe(false);
});
- it('on small screens, sets board container height to full height', async () => {
- window.innerHeight = 1000;
- window.innerWidth = 767;
- jest.spyOn(Element.prototype, 'getBoundingClientRect').mockReturnValue({ top: 100 });
-
- wrapper.vm.resizeObserver.trigger();
-
- await nextTick();
-
- const style = wrapper.findComponent({ ref: 'list' }).attributes('style');
-
- expect(style).toBe('height: 1000px;');
- });
-
- it('on large screens, sets board container height fill area below filters', async () => {
- window.innerHeight = 1000;
- window.innerWidth = 768;
- jest.spyOn(Element.prototype, 'getBoundingClientRect').mockReturnValue({ top: 100 });
-
- wrapper.vm.resizeObserver.trigger();
-
- await nextTick();
-
- const style = wrapper.findComponent({ ref: 'list' }).attributes('style');
-
- expect(style).toBe('height: 900px;');
- });
-
it('sets delay and delayOnTouchOnly attributes on board list', () => {
const listEl = wrapper.findComponent({ ref: 'list' });