Skip to content

Commit

Permalink
test(VDatePicker): add range test
Browse files Browse the repository at this point in the history
  • Loading branch information
KaelWD committed Jan 25, 2024
1 parent 9ceade2 commit dd32fc6
Showing 1 changed file with 24 additions and 0 deletions.
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
/// <reference types="../../../../types/cypress" />

import { VDatePicker } from '..'
import { Application } from '@/../cypress/templates'

// Utilities
import { ref } from 'vue'

describe('VDatePicker', () => {
it('selects a range of dates', () => {
const model = ref<unknown[]>([])
cy.mount(() => (
<Application>
<VDatePicker v-model={ model.value } multiple="range" />
</Application>
))

cy.get('.v-date-picker-month__day').contains(10).click()
cy.get('.v-date-picker-month__day').contains(20).click()
.then(() => {
expect(model.value).to.have.length(11)
})
})
})

0 comments on commit dd32fc6

Please sign in to comment.