小编Ahm*_*m23的帖子

设置 Cypress 期望断言的超时

我的问题是,我希望 Cypress 库的期望断言有一个超时,但似乎无法找到这样做的方法。

我尝试大大增加 cypress.conf 中的全局超时;然而,这不起作用。

if ($widget.find('report-widget')) {
  SVGCount++;
  expect(barGraphsChange[index]).to.not.equal(undefined)
  console.log(barGraphsChange, index)
  cy.getBarGraphTotal(SVGCount, barGraphsChange[index])
}
Run Code Online (Sandbox Code Playgroud)

如果不是超时,那么合理的解决方法也很好,谢谢!

另请注意:在此阶段之前,barGraphsChange[index] 正在通过调用的自定义 Cypress 命令进行计算和分配。

javascript timeout cypress

5
推荐指数
1
解决办法
9467
查看次数

标签 统计

cypress ×1

javascript ×1

timeout ×1