webdriverio: Using @wdio/jasmine-framework does not support spec retry on failure
Pre-check
- I’m aware that I can edit the docs and submit a pull request
Describe the improvement
I’d like to report
- Unclear documentation
- A typo
- Missing documentation
- Other
Description of the improvement/report When I use @wdio/jasmine-framework as a plugin for jasmine. The docs say that I can pass test retry count as the last parameter for the spec or hook. But when I try to do that it picking it as a timeout parameter instead of test retry which is the behaviour of jasmine framework.
** package.json
"dependencies": {
"@wdio/cli": "^5.7.15",
"@wdio/jasmine-framework": "^5.7.13",
"@wdio/local-runner": "^5.7.15",
"webdriverio": "^5.7.13"
}
** test.js
describe('Webdriverio', function () {
it('Testing async function', async () => {
// redirect to url so that we can exceed default 1ms timeout
let title;
browser.url('https://webdriver.io/docs/retry.html');
title = await browser.getUrl();
browser.url('https://webdriver.io/docs/retry.html');
title = await browser.getUrl();
browser.url('https://webdriver.io/docs/retry.html');
title = await browser.getUrl();
browser.url('https://webdriver.io/docs/retry.html');
title = await browser.getUrl();
browser.url('https://webdriver.io/docs/retry.html');
title = await browser.getUrl();
browser.url('https://webdriver.io/docs/retry.html');
title = await browser.getUrl();
browser.url('https://webdriver.io/docs/retry.html');
title = await browser.getUrl();
browser.url('https://webdriver.io/docs/retry.html');
title = await browser.getUrl();
expect(title).toBeTruthy();
}, 1);
});
Error from @wdio/jasmine-framework adapter:
"Error: Timeout - Async callback was not invoked within 1ms (custom timeout)
at <Jasmine>
at ontimeout (timers.js:436:11)
at tryOnTimeout (timers.js:300:5)
at listOnTimeout (timers.js:263:5)
at Timer.processTimers (timers.js:223:10)"
About this issue
- Original URL
- State: closed
- Created 5 years ago
- Comments: 15 (14 by maintainers)
Commits related to this issue
- Update retry documentation as per #4008 Elaborate that retry-per-block only works in `@wdio/sync` and is not expected to be working in async WebdriverIO. — committed to mike-d-davydov/webdriverio by mike-d-davydov 5 years ago
- Update retry documentation as per #4008 (#4031) Elaborate that retry-per-block only works in `@wdio/sync` and is not expected to be working in async WebdriverIO. — committed to webdriverio/webdriverio by mike-d-davydov 5 years ago
- add smoke tests for retries - closes #4008 — committed to webdriverio/webdriverio by christian-bromann 5 years ago
- add smoke tests for retries - closes #4008 (#4415) — committed to webdriverio/webdriverio by christian-bromann 5 years ago
- Update retry documentation as per #4008 (#4031) Elaborate that retry-per-block only works in `@wdio/sync` and is not expected to be working in async WebdriverIO. — committed to MoveInc/webdriverio by mike-d-davydov 5 years ago
- add smoke tests for retries - closes #4008 (#4415) — committed to MoveInc/webdriverio by christian-bromann 5 years ago
To fix the above name-checking, I think we need to check the name of constructor. Below is an example of what I think
"""AsyncFunction""AsyncFunction""Function"If the above approach is fine then i can send a pr for this