How to wait for two parallel XHR requests in Cypress

夙愿已清 提交于 2019-12-05 09:28:29

You can wait for an array of aliases, I haven't tried it with multiple calls to the same route, but I think it should do the trick.

cy.wait(['@users', '@users'])

I've created an example which will blindly wait for all your pending requests to finish before proceeding, you can check the implementation here. https://github.com/PinkyJie/cypress-auto-stub-example#more-detail-for-implementation

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!