diff options
author | Sarah German <sgerman@gitlab.com> | 2022-06-16 12:54:51 +0300 |
---|---|---|
committer | David O'Regan <doregan@gitlab.com> | 2022-06-16 12:54:51 +0300 |
commit | 700448adb96fe2a19bfb0c31b751ae99d188d9d7 (patch) | |
tree | 8e37cf20cf8a67ab35284bc2b7384ab6d94e58b8 /spec | |
parent | be62e2e61b36d9619ee368aa7d0156a5d1590b2a (diff) |
Use instantsearch-vue for the dedicated search page
Diffstat (limited to 'spec')
-rw-r--r-- | spec/frontend/__mocks__/style_mock.js | 1 | ||||
-rw-r--r-- | spec/frontend/search/search_spec.js | 24 |
2 files changed, 25 insertions, 0 deletions
diff --git a/spec/frontend/__mocks__/style_mock.js b/spec/frontend/__mocks__/style_mock.js new file mode 100644 index 00000000..f053ebf7 --- /dev/null +++ b/spec/frontend/__mocks__/style_mock.js @@ -0,0 +1 @@ +module.exports = {}; diff --git a/spec/frontend/search/search_spec.js b/spec/frontend/search/search_spec.js new file mode 100644 index 00000000..e009fdf4 --- /dev/null +++ b/spec/frontend/search/search_spec.js @@ -0,0 +1,24 @@ +/** + * @jest-environment jsdom + */ + +import { mount } from '@vue/test-utils'; +import SearchPage from '../../../content/frontend/search/components/search_page.vue'; + +const propsData = { docsVersion: 'main' }; +const searchFormSelector = '[data-testid="docs-search"]'; + +describe('component: Search page', () => { + it('Search form renders', () => { + const wrapper = mount(SearchPage, { + propsData, + stubs: { + 'ais-instant-search': true, + 'ais-search-box': true, + 'ais-state-results': true, + 'ais-configure': true, + }, + }); + expect(wrapper.find(searchFormSelector).isVisible()).toBe(true); + }); +}); |