diff options
Diffstat (limited to 'spec/frontend/filtered_search')
-rw-r--r-- | spec/frontend/filtered_search/components/recent_searches_dropdown_content_spec.js | 12 | ||||
-rw-r--r-- | spec/frontend/filtered_search/droplab/drop_down_spec.js | 12 |
2 files changed, 12 insertions, 12 deletions
diff --git a/spec/frontend/filtered_search/components/recent_searches_dropdown_content_spec.js b/spec/frontend/filtered_search/components/recent_searches_dropdown_content_spec.js index 897ad5ee2bf..91457f10bf8 100644 --- a/spec/frontend/filtered_search/components/recent_searches_dropdown_content_spec.js +++ b/spec/frontend/filtered_search/components/recent_searches_dropdown_content_spec.js @@ -1,4 +1,4 @@ -import { shallowMount } from '@vue/test-utils'; +import { shallowMountExtended } from 'helpers/vue_test_utils_helper'; import RecentSearchesDropdownContent from '~/filtered_search/components/recent_searches_dropdown_content.vue'; import eventHub from '~/filtered_search/event_hub'; import IssuableFilteredSearchTokenKeys from '~/filtered_search/issuable_filtered_search_token_keys'; @@ -6,12 +6,12 @@ import IssuableFilteredSearchTokenKeys from '~/filtered_search/issuable_filtered describe('Recent Searches Dropdown Content', () => { let wrapper; - const findLocalStorageNote = () => wrapper.find({ ref: 'localStorageNote' }); - const findDropdownItems = () => wrapper.findAll({ ref: 'dropdownItem' }); - const findDropdownNote = () => wrapper.find({ ref: 'dropdownNote' }); + const findLocalStorageNote = () => wrapper.findByTestId('local-storage-note'); + const findDropdownItems = () => wrapper.findAllByTestId('dropdown-item'); + const findDropdownNote = () => wrapper.findByTestId('dropdown-note'); const createComponent = (props) => { - wrapper = shallowMount(RecentSearchesDropdownContent, { + wrapper = shallowMountExtended(RecentSearchesDropdownContent, { propsData: { allowedKeys: IssuableFilteredSearchTokenKeys.getKeys(), items: [], @@ -94,7 +94,7 @@ describe('Recent Searches Dropdown Content', () => { }); it('emits requestClearRecentSearches on Clear resent searches button', () => { - wrapper.find({ ref: 'clearButton' }).trigger('click'); + wrapper.findByTestId('clear-button').trigger('click'); expect(onRequestClearRecentSearchesSpy).toHaveBeenCalled(); }); diff --git a/spec/frontend/filtered_search/droplab/drop_down_spec.js b/spec/frontend/filtered_search/droplab/drop_down_spec.js index f49dbfcf79c..6fbb4394944 100644 --- a/spec/frontend/filtered_search/droplab/drop_down_spec.js +++ b/spec/frontend/filtered_search/droplab/drop_down_spec.js @@ -557,11 +557,11 @@ describe('DropLab DropDown', () => { DropDown.prototype.show.call(testContext.dropdown); }); - it('it should set .list display to block', () => { + it('should set .list display to block', () => { expect(testContext.list.style.display).toBe('block'); }); - it('it should set .hidden to false', () => { + it('should set .hidden to false', () => { expect(testContext.dropdown.hidden).toBe(false); }); @@ -591,11 +591,11 @@ describe('DropLab DropDown', () => { DropDown.prototype.hide.call(testContext.dropdown); }); - it('it should set .list display to none', () => { + it('should set .list display to none', () => { expect(testContext.list.style.display).toBe('none'); }); - it('it should set .hidden to true', () => { + it('should set .hidden to true', () => { expect(testContext.dropdown.hidden).toBe(true); }); }); @@ -648,11 +648,11 @@ describe('DropLab DropDown', () => { DropDown.prototype.destroy.call(testContext.dropdown); }); - it('it should call .hide', () => { + it('should call .hide', () => { expect(testContext.dropdown.hide).toHaveBeenCalled(); }); - it('it should call .removeEventListener', () => { + it('should call .removeEventListener', () => { expect(testContext.list.removeEventListener).toHaveBeenCalledWith( 'click', testContext.eventWrapper.clickEvent, |