我正在使用量角器茉莉花进行角度单页应用程序的 e2e 测试。考虑以下代码片段。
describe('Search', function(){
it('Should Open the search modal popup', function() {
//code
expect(modalOpened).toBe(true)
})
it('Search should return results', function(){
})
it('Search should not return results', function() {
})
})
在上面的例子中,如果失败,那么下面的Should Open the search modal popup
规范也会失败,因为模态本身没有打开。因此,运行以下规格毫无意义。我可以有条件地运行最后两个规范吗?就像只有当第一个规范通过时,下面的规范才应该运行。Should Open the search modal popup
Should Open the search modal popup