Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitlab-docs.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
path: root/spec
diff options
context:
space:
mode:
authorSarah German <sgerman@gitlab.com>2023-06-30 12:53:42 +0300
committerAchilleas Pipinellis <axil@gitlab.com>2023-06-30 12:53:42 +0300
commit5274c4174aff1796205b2ff797b53db787ac9b06 (patch)
tree72cb2dd7dd9ddc1472cd79325297fef222bd11e5 /spec
parent4ac2098b05545f9eaa7c205ee74772bfb4da2c12 (diff)
Add context to Lunr search page
Diffstat (limited to 'spec')
-rw-r--r--spec/frontend/search/lunr_search_spec.js12
1 files changed, 12 insertions, 0 deletions
diff --git a/spec/frontend/search/lunr_search_spec.js b/spec/frontend/search/lunr_search_spec.js
index 9f890b35..e45b2ee3 100644
--- a/spec/frontend/search/lunr_search_spec.js
+++ b/spec/frontend/search/lunr_search_spec.js
@@ -4,8 +4,20 @@
import { shallowMount } from '@vue/test-utils';
import SearchPage from '../../../content/frontend/search/components/lunr_results.vue';
+import { setVersionMetatag } from '../default/components/helpers/versions_menu_helper';
describe('content/frontend/search/components/lunr_results.vue', () => {
+ const mockVersion = '16.2';
+ beforeEach(() => {
+ setVersionMetatag(mockVersion);
+ });
+
+ it('Page title includes the site version', () => {
+ const wrapper = shallowMount(SearchPage);
+ const version = wrapper.find('[data-testid="version-header"]').text();
+ expect(version).toContain(mockVersion);
+ });
+
it('Search form renders', () => {
const wrapper = shallowMount(SearchPage);
expect(wrapper.findComponent(SearchPage).isVisible()).toBe(true);