我想测试确认消息的内容,但似乎即使我的测试失败,我的案例也会通过
it('Should Get Confirm Message', () => {
cy.get('.button')
.click();
cy.on('window:confirm', str => {
expect(2 + 2).to.equal(5);
})
})
Run Code Online (Sandbox Code Playgroud)
cypress ×1