diff options
Diffstat (limited to 'spec/frontend/boards/components/board_column_deprecated_spec.js')
-rw-r--r-- | spec/frontend/boards/components/board_column_deprecated_spec.js | 14 |
1 files changed, 13 insertions, 1 deletions
diff --git a/spec/frontend/boards/components/board_column_deprecated_spec.js b/spec/frontend/boards/components/board_column_deprecated_spec.js index 4466e966302..e6d65e48c3f 100644 --- a/spec/frontend/boards/components/board_column_deprecated_spec.js +++ b/spec/frontend/boards/components/board_column_deprecated_spec.js @@ -1,6 +1,6 @@ import { shallowMount } from '@vue/test-utils'; import AxiosMockAdapter from 'axios-mock-adapter'; -import Vue from 'vue'; +import Vue, { nextTick } from 'vue'; import { TEST_HOST } from 'helpers/test_constants'; import { listObj } from 'jest/boards/mock_data'; @@ -30,6 +30,7 @@ describe('Board Column Component', () => { const createComponent = ({ listType = ListType.backlog, collapsed = false, + highlighted = false, withLocalStorage = true, } = {}) => { const boardId = '1'; @@ -37,6 +38,7 @@ describe('Board Column Component', () => { const listMock = { ...listObj, list_type: listType, + highlighted, collapsed, }; @@ -91,4 +93,14 @@ describe('Board Column Component', () => { expect(isCollapsed()).toBe(true); }); }); + + describe('highlighting', () => { + it('scrolls to column when highlighted', async () => { + createComponent({ highlighted: true }); + + await nextTick(); + + expect(wrapper.element.scrollIntoView).toHaveBeenCalled(); + }); + }); }); |