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-11-17 06:08:08 +0300
committerGitLab Bot <gitlab-bot@gitlab.com>2022-11-17 06:08:08 +0300
commit4d528bfd734a021b42f9c829831029e5515deb8f (patch)
tree7de2ac96f393f4c09de19d171d0155c12c6a583a /spec/frontend/boards/components
parentcc626f14115f740bd4aa247cf3ac42dfb2082a4e (diff)
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'spec/frontend/boards/components')
-rw-r--r--spec/frontend/boards/components/board_content_spec.js21
1 files changed, 19 insertions, 2 deletions
diff --git a/spec/frontend/boards/components/board_content_spec.js b/spec/frontend/boards/components/board_content_spec.js
index b2138700602..39b2fe2ebbf 100644
--- a/spec/frontend/boards/components/board_content_spec.js
+++ b/spec/frontend/boards/components/board_content_spec.js
@@ -123,15 +123,32 @@ describe('BoardContent', () => {
expect(wrapper.findComponent(GlAlert).exists()).toBe(false);
});
- it('resizes the list on resize', async () => {
+ 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();
- expect(wrapper.findComponent({ ref: 'list' }).attributes('style')).toBe('height: 900px;');
+ 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;');
});
});