如何比较列表中的预期值

时间:2016-06-08 21:32:30

标签: protractor

如何比较列表中的预期值

IncPanel.IncList.count().then(function(count){ for(var i=0; i< count; i++){ CommonFun.getIncCurrentState(i).then(function(State){ switch(State){ case "created": expect(State).toContain('created'); break; case "open": expect(State).toContain('open'); break; case "escalated": expect(State).toContain('escalated'); break; case "closed": expect(State).toContain('closed'); break; }; }); }; });
在Protractor中是否有任何方法可以将期望值与List中的任何内容进行比较,我的意思是如何将上述switch语句更改为expect(State).toBeIn(['created','open','escalated','closed']);

之类的内容

0 个答案:

没有答案