What are you trying to achieve?
Use custom locators in TypeScript.
What do you get instead?
Type errors for all custom strict locators in all tests.
Provide console output if related. Use --verbose mode for more details.
Provide test source code if related
We used to register our custom locators by extending the CodeceptJS.CustomLocators interface, as introduced 3 years ago: #2798
Documentation for this feature is still available: https://codecept.io/typescript/#types-for-custom-strict-locators
Since 3.5.11, the type LocatorOrString does not contain the property types of all CustomLocators interface properties, but the CustomLocators itself which does not make sense in our codebase.
474b5e1#diff-4f45caa500ef03d94d3c2bfa556caa1642df95d4e2b980d76b876a8fd2e8c522L434
type LocatorOrString =
| string
| ILocator
| Locator
- | CustomLocators[keyof CustomLocators];
+ | CustomLocators;
Details
- CodeceptJS version: 3.5.11
- NodeJS Version: 20.9.0
- Operating System: Windows 11
- puppeteer || webdriverio || testcafe version (if related)
- Configuration file:
What are you trying to achieve?
Use custom locators in TypeScript.
What do you get instead?
Type errors for all custom strict locators in all tests.
# paste output hereWe used to register our custom locators by extending the
CodeceptJS.CustomLocatorsinterface, as introduced 3 years ago: #2798Documentation for this feature is still available: https://codecept.io/typescript/#types-for-custom-strict-locators
Since 3.5.11, the type
LocatorOrStringdoes not contain the property types of allCustomLocatorsinterface properties, but theCustomLocatorsitself which does not make sense in our codebase.474b5e1#diff-4f45caa500ef03d94d3c2bfa556caa1642df95d4e2b980d76b876a8fd2e8c522L434
Details