【发布时间】:2020-06-16 20:15:44
【问题描述】:
似乎它应该工作,但它没有。 有人知道在 v-select 上选择的技巧吗?
我的.vue
<v-select
data-cy="exp_month"
name="exp_month"
v-model="card.expiration.month"
:items="months"
label="exp month">
</v-select>
myTest.js
it('should select the first month', () => {
cy.get("[data-cy=exp_month]").select("01")
})
结果
CypressError: cy.select() can only be called on a <select>. Your subject is a: <input aria-label="exp month" data-cy="exp_month" name="exp_month" readonly="readonly" type="text" placeholder=" " autocomplete="on" aria-readonly="false">
【问题讨论】:
标签: vue.js cypress e2e-testing