-
-
Notifications
You must be signed in to change notification settings - Fork 57
Labels
Description
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
I created a repository where I tried to reproduce the problems I found, when setting up visual testing: https://github.com/htho/wdio-repro-visual-service
TypeScript can't tell, what type to expect for the configuration object for visual.
This could be improved, so we have IntelliSense when editing the object.
services: [
[
"visual",
{
// no automatic type information
// therefore the `satisfies VisualServiceOptions` below.
// TODO: REPORT
} satisfies VisualServiceOptions,
],
],To fix this I added satisfies VisualServiceOptions.
I gather the type like this, because VisualServiceOptions is not exported.
import type { ClassOptions } from 'webdriver-image-comparison';
// should be exported
// TODO: REPORT
// https://github.com/webdriverio/visual-testing/blob/f4d9e654a746d09e9ca2567ffe69200c161cc14b/packages/visual-service/src/types.ts#L62
type VisualServiceOptions = ClassOptions;To improve Documentation/DX, VisualServiceOptions should be available for import.
Also there should be type information, about the config object for visual