如何比较列表中的预期值
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']);