Skip to content

Commit

Permalink
vue3
Browse files Browse the repository at this point in the history
  • Loading branch information
wxsms committed Nov 13, 2021
1 parent 505c262 commit 8d28fb6
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions src/components/datepicker/DatePicker.spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -248,7 +248,7 @@ describe('DatePicker.vue', () => {
await nextTick()
const picker = wrapper.findAll('[data-role="date-picker"]')[0]
const dateView = picker.findAll('table')[0]
const dateBtn = dateView.find('tbody').findAll('button').at(15)
const dateBtn = dateView.find('tbody').findAll('button')[15]
await triggerEvent(dateBtn, 'click')
expect(dateBtn.classes()).toContain('btn-primary')
})
Expand Down Expand Up @@ -446,7 +446,7 @@ describe('DatePicker.vue', () => {
const weekdays = dateView.findAll('thead tr:last-child td')
const weekdayNames = []
for (let i = 0; i < weekdays.length; i++)
weekdayNames.push(weekdays.at(i).text())
weekdayNames.push(weekdays[i].text())
const { week1, week2, week3, week4, week5, week6, week7 } = locale
expect(weekdayNames).toEqual([
week7,
Expand Down
2 changes: 1 addition & 1 deletion src/components/dropdown/Dropdown.spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@ async function assertKeyboardNav(
keyCode,
called = true
) {
const spy = jest.spyOn(wrapper.findAll('li > a').at(index).element, 'focus')
const spy = jest.spyOn(wrapper.findAll('li > a')[index].element, 'focus')
await triggerEvent(trigger, `keydown.${keyCode}`)
if (called) {
expect(spy).toBeCalled()
Expand Down

0 comments on commit 8d28fb6

Please sign in to comment.