如何在使用量角器时为单个规范设置默认Jasmine超时和不同的超时

如何在使用量角器时为单个规范设置默认Jasmine超时和不同的超时,jasmine,protractor,Jasmine,Protractor,我想在运行量角器测试时为整个套件设置一个10000毫秒的Jasmine超时;然而,由于第一个规范需要一些设置,我希望这个规范的超时时间再延长10000毫秒 我在量角器配置文件中将jasmineNodeOpts defaultTimeoutInterval设置为10000,如下所示: jasmineNodeOpts: { defaultTimeoutInterval: 10000 } it('should allow user to navigate to the homepage', asyn

我想在运行量角器测试时为整个套件设置一个10000毫秒的Jasmine超时;然而,由于第一个规范需要一些设置,我希望这个规范的超时时间再延长10000毫秒

我在量角器配置文件中将jasmineNodeOpts defaultTimeoutInterval设置为10000,如下所示:

jasmineNodeOpts: {
defaultTimeoutInterval: 10000
}
it('should allow user to navigate to the homepage', async (done): 
Promise<any> => {
await sideMenuPage.clickMenuItem(sideMenuPage.homeOption);
await secureHomepage.isDisplayed(secureHomepage.accountBreakdown)
  .then(isDisplayed => expect(isDisplayed).toBeTruthy())
  .then(done, done.fail);
  }, 20000); 
对于第一个规范,我在it块中包含了第三个参数20000,如下所示:

jasmineNodeOpts: {
defaultTimeoutInterval: 10000
}
it('should allow user to navigate to the homepage', async (done): 
Promise<any> => {
await sideMenuPage.clickMenuItem(sideMenuPage.homeOption);
await secureHomepage.isDisplayed(secureHomepage.accountBreakdown)
  .then(isDisplayed => expect(isDisplayed).toBeTruthy())
  .then(done, done.fail);
  }, 20000); 
it('应允许用户导航到主页'),异步(完成):
承诺=>{
等待sideMenuPage。单击菜单项(sideMenuPage.homeOption);
等待secureHomepage.isDisplayed(secureHomepage.accountBreakdown)
.then(isDisplayed=>expect(isDisplayed).toBeTruthy())
.然后(完成,完成,失败);
}, 20000); 
我还没有为任何进一步的规范添加第三个参数

但是,第一个规范仍然会经历jasmine.DEFAULT\u TIMEOUT\u间隔。10000毫秒后出错

哪一个茉莉花超时会成为先例?jasmineNodeOpts defaultTimeoutInterval还是it块的第三个参数

一套规范中的一个规范是否可以有不同的Jasmine超时,同时也可以使用jasmineNodeOpts defaultTimeoutInterval?如果是,怎么做


谢谢

我也在想同样的问题。如果你发现了什么,请告诉我:)我也在试图找出同样的答案。如果你发现了什么,请告诉我:)