【发布时间】:2017-10-03 23:09:38
【问题描述】:
我是量角器框架的新手,即使未满足预期条件测试也没有失败
这是我执行测试时的输出:
这是最后一步的代码
this.Then(/^"View All Interactions" link button should stay at the top of list$/, () => {
waitForPresence(mobileQADashboard.pageElements.viewAllInteractionsLink);
waitForPresence(mobileQADashboard.getVisibleDataContainer());
mobileQADashboard.getVisibleDataContainer().getLocation().then(function (ContainerLocation) {
return expect(mobileQADashboard.pageElements.viewAllInteractionsLink.getLocation(),"View Interactions Link is not above").to.eventually.have.property('y').that.is.below(
ContainerLocation.y
);
})
});
- 为什么即使未满足预期条件也会通过该步骤
- 如何处理预期条件引发的异常
【问题讨论】:
-
我不确定,但请尝试在期望之前删除 return。
标签: protractor mocha.js chai cucumberjs