Skip to content

Commit

Permalink
refactor: change search input test
Browse files Browse the repository at this point in the history
  • Loading branch information
andreadlgdo committed May 21, 2024
1 parent 206b59e commit 3bd4c74
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ import { createLocalVue, mount, Wrapper } from '@vue/test-utils';
import Vuex, { Store } from 'vuex';
import { getXComponentXModuleName, isXComponent } from '../../../../components/x-component.utils';
import { RootXStoreState } from '../../../../store/store.types';
import { installNewXPlugin } from '../../../../__tests__/utils';
import { getDataTestSelector, installNewXPlugin } from '../../../../__tests__/utils';
import { WireMetadata } from '../../../../wiring/wiring.types';
import SearchInput from '../search-input.vue';
import { resetXSearchBoxStateWith } from './utils';
Expand All @@ -28,7 +28,7 @@ function mountNewSearchInput(overrideProps: Partial<SearchInputProps> = {}): Tes
localVue,
propsData: overrideProps
});
const input = wrapper.vm.$refs.inputElement as HTMLInputElement;
const input = wrapper.find(getDataTestSelector('search-input')).element as HTMLInputElement;

return {
wrapper,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -91,8 +91,6 @@
const inputElement = ref<HTMLInputElement>();
const searchInputMessage = ref('type your query here');
const debouncedUserAcceptedAQuery = ref<DebouncedFunction<[string]>>();
/**
Expand Down Expand Up @@ -278,7 +276,6 @@
return {
query,
inputElement,
searchInputMessage,
emitUserHoveredInSearchBox,
emitUserHoveredOutSearchBox,
emitUserBlurredSearchBox,
Expand Down

0 comments on commit 3bd4c74

Please sign in to comment.