如何在aurelia组件中为e2e测试完全呈现自定义元素



我正在尝试为Aurelia组件编写一个测试,该组件使用Aurelia bootstrap Plugins中的Aurelia bootstrap datetimepicker。我正试图弄清楚如何在abp日期时间选择器元素上触发输入事件,但由于该元素没有完全呈现出来,我遇到了问题。以下是我目前如何设置正在测试的组件:

const bindingContext = {
model: {...}
};
const component = StageComponent
.withResources([
`${componentPath}`,
'resources/elements/custom-input-field/custom-input-field',
'resources/elements/custom-radio-field/custom-radio-field'
])
.inView(`<compose view-model="${componentPath}" model.bind="model"></compose>`)
.boundTo(bindingContext);
component.bootstrap(aurelia => {
aurelia.use
.standardConfiguration()
.plugin('aurelia-validation');

如果abp日期时间选择器组件没有完全呈现在正在测试的文档上,我如何设置它的值?

更新:

这个问题出现在我的karma.config.js中,它没有提供node_modules html文件。修复是将{pattern: 'node_modules/**/*.html', included: false}添加到因果报应的config.files

最新更新