You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I have a pretty slow before function in some tests, that exceeds the default asyncHookTimeout with 10000 ms.
I know, that I can increase the timeout in the external globals file.
But the problem is that I need to make these tests run on external environments with default settings, where is no access to editing the globals file.
Suggested solution
Would be great to have the ability to set (override) the asyncHookTimeout value from the test code itself, to make expectedly long-running tests work well in any environment with default settings.
Alternatives / Workarounds
No response
Additional Information
No response
The text was updated successfully, but these errors were encountered:
If you're writing tests in BDD-style (describe/it), you can also set the asyncHookTimeout directly inside the describe body so that it applies to that particular test case only:
describe('tests',asyncfunction(){this.settings.globals.asyncHookTimeout=5000;before(()=>{console.log(browser.globals.asyncHookTimeout);browser.navigateTo('https://ecosia.org/')returnnewPromise((resolve)=>{setTimeout(()=>{resolve();},15000);});});it('loads local website',()=>{browser.element.find('input[type=search]').assert.visible();});after(()=>{browser.end();});});
Note: Make sure that the callback passed to the describe function is a normal JS function (function () {}) and not an arrow function because this.setting would be undefined in an arrow function.
Description
I have a pretty slow
before
function in some tests, that exceeds the defaultasyncHookTimeout
with 10000 ms.I know, that I can increase the timeout in the external globals file.
But the problem is that I need to make these tests run on external environments with default settings, where is no access to editing the globals file.
Suggested solution
Would be great to have the ability to set (override) the
asyncHookTimeout
value from the test code itself, to make expectedly long-running tests work well in any environment with default settings.Alternatives / Workarounds
No response
Additional Information
No response
The text was updated successfully, but these errors were encountered: