Skip to content

Commit

Permalink
wip
Browse files Browse the repository at this point in the history
  • Loading branch information
gabaldon committed Sep 4, 2024
1 parent 2d76532 commit 3015c19
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/components/Select/WSelect.spec.ts
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
import { describe, it, expect } from 'vitest'
import { shallowMount } from '@vue/test-utils'
import { mount, shallowMount } from '@vue/test-utils'

Check warning on line 2 in src/components/Select/WSelect.spec.ts

View workflow job for this annotation

GitHub Actions / cache-and-install

'shallowMount' is defined but never used
import WSelect from './WSelect.vue'
import { DropdownPosition } from './WSelect'
import Icon from '@/assets/svg/navigation-cursor.svg?component'

describe('WSelect', () => {
it('renders properly', () => {
const wrapper = shallowMount(WSelect, {
const wrapper = mount(WSelect, {
emits: ['update:modelValue'],
props: {
dropdownPosition: DropdownPosition.Bottom,
Expand All @@ -33,7 +33,7 @@ describe('WSelect', () => {
})

Check failure on line 34 in src/components/Select/WSelect.spec.ts

View workflow job for this annotation

GitHub Actions / cache-and-install

src/components/Select/WSelect.spec.ts > WSelect > renders properly

Error: Snapshot `WSelect > renders properly 1` mismatched - Expected + Received - <anonymous-stub - appendtobody="false" - autocomplete="off" - calculateposition="[Function]" - class="language-selector" - clearable="false" - clearsearchonblur="[Function]" - clearsearchonselect="true" - closeonselect="true" - components="[object Object]" - createoption="[Function]" - deselectfromdropdown="false" + <div + class="v-select vs--single vs--unsearchable language-selector" dir="auto" - disabled="false" - dropdownshouldopen="[Function]" - filter="[Function]" - filterable="false" - filterby="[Function]" - getoptionkey="[Function]" - getoptionlabel="[Function]" - label="label" - mapkeydown="[Function]" - modelvalue="[object Object]" - multiple="false" - nodrop="false" - options="[object Object],[object Object]" - placeholder="" - pushtags="false" - reduce="[Function]" - resetonoptionschange="false" - searchable="false" - searchinputqueryselector="[type=search]" - selectable="[Function]" - selectonkeycodes="13" - selectontab="false" - taggable="false" - transition="dropdown" - uid="1" - /> + > + + + <div + aria-expanded="false" + aria-label="Search for option" + aria-owns="vs1__listbox" + class="vs__dropdown-toggle" + id="vs1__combobox" + role="combobox" + > + <div + class="vs__selected-options" + > + + + <span + class="vs__selected" + > + <!--v-if--> + English + </span> + + + + <input + aria-autocomplete="list" + aria-controls="vs1__listbox" + aria-labelledby="vs1__combobox" + autocomplete="off" + class="vs__search" + readonly="" + type="search" + value="" + /> + + </div> + <div + class="vs__actions" + > + <button + aria-label="Clear Selected" + class="vs__clear" + style="display: none;" + title="Clear Selected" + type="button" + > + <svg + height="10" + width="10" + xmlns="http://www.w3.org/2000/svg" + > + <path + d="M6.895455 5l2.842897-2.842898c.348864-.348863.348864-.914488 0-1.263636L9.106534.261648c-.348864-.348864-.914489-.348864-1.263636 0L5 3.104545 2.157102.261648c-.348863-.348864-.914488-.348864-1.263636 0L.261648.893466c-.348864.348864-.348864.914489 0 1.263636L3.104545 5 .261648 7.842898c-.348864.348863-.348864.914488 0 1.263636l.631818.631818c.348864.348864.914773.348864 1.263636 0L5 6.895455l2.842898 2.842897c.348863.348864.914772.348864 1.263636 0l.631818-.631818c.348864-.348864.348864-.914489 0-1.263636L6.895455 5z" + /> + </svg> + </button> + + <svg + class="vs__open-indicator" + height="10" + role="presentation" + width="14" + xmlns="http://www.w3.org/2000/svg" + > + <path + d="M9.211364 7.59931l4.48338-4.867229c.407008-.441854.407008-1.158247 0-1.60046l-.73712-.80023c-.407008-.441854-1.066904-.441854-1.474243 0L7 5.198617 2.51662.33139c-.407008-.441853-1.066904-.441853-1.474243 0l-.737121.80023c-.407008.441854-.407008 1.158248 0 1.600461l4.48338 4.867228L7 10l2.211364-2.40069z" + /> + </svg> + + + <div + class="vs__spinner" + style="display: none;" + > + Loading... + </div> + + </div> + </div> + <transition-stub + appear="false" + css="true" + name="dropdown" + persisted="false" + > + <ul + id="vs1__listbox" + role="listbox" + style="display: none; visibility: hidden;" + /> + </transition-stub> + + + </div> ❯ src/components/Select/WSelect.spec.ts:34:29
it('renders properly an icon when provided', () => {
const wrapper = shallowMount(WSelect, {
const wrapper = mount(WSelect, {
emits: ['update:modelValue'],
props: {
dropdownPosition: DropdownPosition.Bottom,
Expand Down

0 comments on commit 3015c19

Please sign in to comment.