gemini-testing / gemini-testing/testplane
Argument of type 'Browser' is not assignable to parameter of type 'BrowserBase'.
- Dominant language
- TypeScript
- Stars
- 830
- Forks
- 76
- Avg merge
- 4d 10h
- Merged PRs (30d)
- 14
Description
### Verify latest release
- [ ] I verified that the issue exists in the latest Hermione release
### Hermione version
8.23.1
### Last Hermione version that worked
_No response_
### Which area(s) of Hermione are affected? (leave empty if unsure)
_No response_
### Link to the code that reproduces this issue or a replay of the bug
_No response_
### Reproduction steps
1. pnpm i -D @testing-library/webdriverio
2. ```
import { setupBrowser } from '@testing-library/webdriverio';
export default {
prepareBrowser(browser) {
setupBrowser(browser);
},
// other
}
```
### Actual Behavior
The object passed as an argument to the prepareBrowser function, which has the type [WebdriverIO.Browser](https://github.com/gemini-testing/testplane/blob/9610610ea77ba4a69128ad89c6ff19b46c8ae377/src/browser/types.ts#L58), does not extend from [BrowserBase](https://github.com/testing-library/webdriverio-testing-library/blob/2eeee0106b1bd687045bbd111f041f0022e62103/src/wdio-types.ts#L55) from @testing-library/webdriverio. This discrepancy results in an error when attempting to pass the object to the `setupBrowser` function, which expects an argument of a type that extends BrowserBase.
In the [documentation](https://testplane.io/docs/v8/guides/how-to-add-testing-library/#connection), it is simply stated that the browser object is passed to `setupBrowser`.
I haven’t written any tests yet, but this might cause issues because the `BrowserBase` type has required fields that are missing in `WebdriverIO.Browser`. This will likely result in problems.
### Expected Behavior
The `WebdriverIO.Browser` object is expected to inherit from `BrowserBase`.
### Which Node.js version are you using?
20.10.0
Contributor guide
Assessment
This issue has not been assessed yet.