I am using WDIO with Jasmine and Chai.
I am getting the below error and I have been trying to find the root cause for more than a day now.
Error: Timeout - Async function did not complete within 10000ms (set by jasmine.DEFAULT_TIMEOUT_INTERVAL)
Code:
describe('Lead Routing Functionality', () => {
beforeEach(function () {
LightningLeadPage.open();
LightningLeadPage.login();
console.log('[TEST STEP INFO]: Checking Header: ');
});
it('Verify validation', () => {
LightningLeadPage.click_app_launcher();
});
*************
export default class Lightning_Page {
click_app_launcher() {
console.log("[TEST STEP INFO]: Verify App launcher icon is present. ");
console.log('DEBUG : I am waiting...')
this.appLauncher().waitForExist(this.waitDuration());
console.log("[TEST STEP INFO]: Clicking on App Launcher");
this.appLauncher().click();
}
I noticed console.log('DEBUG : I am waiting...') is not printed on console.
Error log:
[0-0] Error in "Verify validation"
Error: Timeout - Async function did not complete within 10000ms (set by jasmine.DEFAULT_TIMEOUT_INTERVAL)
at <Jasmine>
at listOnTimeout (internal/timers.js:549:17)
at processTimers (internal/timers.js:492:7)
[0-0] DEPRECATION: An asynchronous before/it/after function took a done callback but also returned a promise. This is not supported and will stop working in the future. Either remove the done callback (recommended) or change the function to not return a promise.
config.js values:
waitforTimeout: 10000,
connectionRetryTimeout: 90000,
connectionRetryCount: 3,
wdioRetries:3,
jasmineNodeOpts: {
defaultTimeoutInterval: (24 * 60 * 60 * 1000),
expectationResultHandler: function(passed, assertion) {
// do something
}
},
I came across this as well while trying to upgrade WDIO to v7. While looking into this further, I noticed that the name to specify jasmine options in wdio config has changed from
jasmineNodeOpts
tojasmineOpts
. It is in their updated documentation as well. Once I updated that in my wdio configs, it is now good with v7.