Skip to content

Commit

Permalink
test: update mod searchbar for testing
Browse files Browse the repository at this point in the history
  • Loading branch information
NabbeunNabi committed Jan 29, 2025
1 parent d6a5680 commit 6855e2b
Show file tree
Hide file tree
Showing 4 changed files with 379 additions and 378 deletions.
4 changes: 4 additions & 0 deletions components/ModEditHealthcareProfessionalSection.vue
Original file line number Diff line number Diff line change
Expand Up @@ -139,6 +139,7 @@
</label>
<ModSearchbar
v-model="healthcareProfessionalAcceptedInsurancesArray"
data-test-id="mod-healthcare-professional-section-accepted-insurances"
:place-holder-text="$t('modHealthcareProfessionalSection.placeholderTextAcceptedInsurances')"
:no-match-text="$t('modHealthcareProfessionalSection.noInsurancesWereFound')"
:fields-to-display-callback="insurancesToDisplayCallback"
Expand All @@ -161,6 +162,7 @@
</label>
<ModSearchbar
v-model="healthcareProfessionalDegreesArray"
data-test-id="mod-healthcare-professional-section-degrees"
:place-holder-text="$t('modHealthcareProfessionalSection.placeholderTextDegrees')"
:no-match-text="$t('modHealthcareProfessionalSection.noDegreesWereFound')"
:fields-to-display-callback="degreesToDisplayCallback"
Expand All @@ -183,6 +185,7 @@
</label>
<ModSearchbar
v-model="healthcareProfessionalSpecialtiesArray"
data-test-id="mod-healthcare-professional-section-specialties"
:place-holder-text="$t('modHealthcareProfessionalSection.placeholderTextSpecialties')"
:no-match-text="$t('modHealthcareProfessionalSection.noSpecialtiesWereFound')"
:fields-to-display-callback="specialtiesToDisplayCallback"
Expand All @@ -205,6 +208,7 @@
</label>
<ModSearchbar
v-model="healthcareProfessionalSpokenLanguages"
data-test-id="mod-healthcare-professional-section-spoken-locales"
:place-holder-text="$t('modHealthcareProfessionalSection.placeholderTextLocales')"
:no-match-text="$t('modHealthcareProfessionalSection.noLocalesWereFound')"
:fields-to-display-callback="localesToDisplayCallback"
Expand Down
3 changes: 3 additions & 0 deletions components/ModSearchBar.vue
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@
ref="searchInputElement"
type="text"
:placeholder="placeHolderText"
:data-testid="`${dataTestId}`"
class="grow focus-visible:outline-none"
@blur="handleSearchInputBlur"
@keydown.esc="handleSearchInputBlur"
Expand Down Expand Up @@ -136,6 +137,8 @@ type Props = {
noMatchText: string
// Callback to display the desired output
fieldsToDisplayCallback: (item: SetType<T>) => string[]
//Optional test id for testing the component
dataTestId?: string
}
const { placeHolderText, noMatchText, fieldsToDisplayCallback } = defineProps<Props>()
Expand Down
Loading

0 comments on commit 6855e2b

Please sign in to comment.