【发布时间】:2019-03-05 10:15:02
【问题描述】:
我正在尝试使用 cypress 在 react 应用程序上运行测试。测试很简单。刚刚尝试通过 cy.visit() 访问基本 url
describe('This is my first test', function() {
it('Go to home',function () {
cy.visit('/')
})
});
完全按照the official documentation 中的说明进行操作。但是好像有问题。它说 Uncaught TypeError: Cannot read property 'apply' of undefined。我使用 redux-saga 作为中间件,页面加载时会调用一个 api。。即使没有调用 api,也会发生相同的错误。也许问题是因为redux而出现的。无需 redux 架构即可完美运行。任何帮助表示赞赏。
【问题讨论】:
标签: testing redux e2e-testing cypress end-to-end