From 17e0919fb7de125ac88b22566355d6711891a6bb Mon Sep 17 00:00:00 2001 From: KobeNguyenT <7845001+kobenguyent@users.noreply.github.com> Date: Wed, 10 Jan 2024 05:48:43 +0100 Subject: [PATCH] fix(types): CustomLocator typing broken for custom strict locators (#4120) --- typings/index.d.ts | 15 +++++++++------ 1 file changed, 9 insertions(+), 6 deletions(-) diff --git a/typings/index.d.ts b/typings/index.d.ts index 51e92c4f9..b16cfbd79 100644 --- a/typings/index.d.ts +++ b/typings/index.d.ts @@ -97,7 +97,7 @@ declare namespace CodeceptJS { * } * } * ``` - */ + */ helpers?: { /** * Run web tests controlling browsers via Playwright engine. @@ -289,7 +289,7 @@ declare namespace CodeceptJS { * ```js * bootstrap: 'bootstrap.js', * ``` - */ + */ bootstrap?: (() => Promise) | boolean | string; /** * [Execute code after tests](https://codecept.io/bootstrap/) finished. @@ -303,7 +303,7 @@ declare namespace CodeceptJS { * ```js * teardown: 'teardown.js', * ``` - */ + */ teardown?: (() => Promise) | boolean | string; /** * [Execute code before launching tests in parallel mode](https://codecept.io/bootstrap/#bootstrapall-teardownall) @@ -312,7 +312,7 @@ declare namespace CodeceptJS { bootstrapAll?: (() => Promise) | boolean | string; /** * [Execute JS code after finishing tests in parallel mode](https://codecept.io/bootstrap/#bootstrapall-teardownall) - */ + */ teardownAll?: (() => Promise) | boolean | string; /** Enable [localized test commands](https://codecept.io/translation/) */ @@ -328,7 +328,7 @@ declare namespace CodeceptJS { * ``` * require: ["should"] * ``` - */ + */ require?: Array; /** @@ -423,15 +423,18 @@ declare namespace CodeceptJS { | { ios: string } | { android: string; ios: string } | { react: string } + | { vue: string } | { shadow: string[] } | { custom: string }; interface CustomLocators {} + interface OtherLocators { props?: object } type LocatorOrString = | string | ILocator | Locator - | CustomLocators; + | OtherLocators + | CustomLocators[keyof CustomLocators]; type StringOrSecret = string | CodeceptJS.Secret;