我在测试Vue组件时遇到问题,我打算将e2e testcafe与testcafe-vue-selector一起使用,但是我尝试测试的某些组件女巫,如果根本看不到它们,则它们没有任何状态,计算的道具: (其他组件工作正常。
组件
dframe = data.frame(sample = c("text1", "text2", "text3", "text4", "text5", "text6", "text7", "text8", "text9", "text10"), productid = c(33, 5, 33, 34, 12, 54, 22, 9, 45, 22),
manifucturerid = c(1, 1, 2, 2, 3, 4, 5, 6, 7, 7),
text = c("a,b", "NA", "a,b", "c,d", "NA", "e,f,g", "h,i,j,k", "NA", "l,m", "h,i,j,k"))
Testcafe中的e2e
export default {
name: 'Auth',
inject: ['app'],
data: () => ({
form: 'login'
}),
mounted() {
if (this.$route.params.resetPasswordCode) {
this.form = 'set-password'
}
},
methods: {
updateFormType(form) {
this.form = form
}
},
computed: {
...mapGetters({
session: 'user/session'
}),
matchFormType() {
return (form) => {
return this.form === form
}
},
title() {
const form = this.form
switch (form) {
case 'login':
return 'form.action.login.into.curse'
case 'signup':
return 'form.action.signup.into.curse'
case 'remind-password':
return 'form.action.remind.password'
case 'set-password':
return 'form.action.set.password'
}
}
}
}