docs: fixing deprecated tag display and returns (#14387)
* docs: fixing display when return has no description * docs: fixing deprecated tag display to display description * docs: fixing return typing * docs: removing console.log * docs: fixing HTMLElement return for WebdriverIO.Element
This commit is contained in:
parent
834ae62d8d
commit
119e6167e2
21 changed files with 26 additions and 23 deletions
|
|
@ -38,7 +38,7 @@ import type { Selector } from '../../types.js'
|
|||
*
|
||||
* @alias $$
|
||||
* @param {String|Function} selector selector or JS Function to fetch multiple elements
|
||||
* @return {ElementArray}
|
||||
* @return {WebdriverIO.ElementArray}
|
||||
* @example https://github.com/webdriverio/example-recipes/blob/59c122c809d44d343c231bde2af7e8456c8f086c/queryElements/example.html
|
||||
* @example https://github.com/webdriverio/example-recipes/blob/59c122c809d44d343c231bde2af7e8456c8f086c/queryElements/multipleElements.js#L6-L7
|
||||
* @example https://github.com/webdriverio/example-recipes/blob/59c122c809d44d343c231bde2af7e8456c8f086c/queryElements/multipleElements.js#L15-L24
|
||||
|
|
|
|||
|
|
@ -57,7 +57,7 @@ import type { Selector } from '../../types.js'
|
|||
*
|
||||
* @alias $
|
||||
* @param {String|Function|Matcher} selector selector, JS Function, or Matcher object to fetch a certain element
|
||||
* @return {Element}
|
||||
* @return {WebdriverIO.Element}
|
||||
* @example https://github.com/webdriverio/example-recipes/blob/59c122c809d44d343c231bde2af7e8456c8f086c/queryElements/example.html
|
||||
* @example https://github.com/webdriverio/example-recipes/blob/59c122c809d44d343c231bde2af7e8456c8f086c/queryElements/singleElements.js#L9-L10
|
||||
* @example https://github.com/webdriverio/example-recipes/blob/59c122c809d44d343c231bde2af7e8456c8f086c/queryElements/singleElements.js#L16-L25
|
||||
|
|
|
|||
|
|
@ -28,7 +28,7 @@ import type { CustomStrategyFunction } from '../../types.js'
|
|||
* @example https://github.com/webdriverio/example-recipes/blob/f5730428ec3605e856e90bf58be17c9c9da891de/queryElements/customStrategy.js#L2-L11
|
||||
* @example https://github.com/webdriverio/example-recipes/blob/f5730428ec3605e856e90bf58be17c9c9da891de/queryElements/example.html#L8-L12
|
||||
* @example https://github.com/webdriverio/example-recipes/blob/f5730428ec3605e856e90bf58be17c9c9da891de/queryElements/customStrategy.js#L16-L19
|
||||
* @return {Element}
|
||||
* @return {WebdriverIO.Element}
|
||||
*/
|
||||
export async function custom$ (
|
||||
this: WebdriverIO.Browser,
|
||||
|
|
|
|||
|
|
@ -36,7 +36,7 @@ import type { ReactSelectorOptions } from '../../types.js'
|
|||
* @param {ReactSelectorOptions=} options React selector options
|
||||
* @param {Object=} options.props React props the element should contain
|
||||
* @param {`Array<any>|number|string|object|boolean`=} options.state React state the element should be in
|
||||
* @return {ElementArray}
|
||||
* @return {WebdriverIO.ElementArray}
|
||||
*
|
||||
*/
|
||||
export async function react$$ (
|
||||
|
|
|
|||
|
|
@ -45,7 +45,7 @@ import type { ReactSelectorOptions } from '../../types.js'
|
|||
* @param {ReactSelectorOptions=} options React selector options
|
||||
* @param {Object=} options.props React props the element should contain
|
||||
* @param {`Array<any>|number|string|object|boolean`=} options.state React state the element should be in
|
||||
* @return {Element}
|
||||
* @return {WebdriverIO.Element}
|
||||
*
|
||||
*/
|
||||
export async function react$ (
|
||||
|
|
|
|||
|
|
@ -19,8 +19,8 @@ const log = logger('webdriverio')
|
|||
* </example>
|
||||
*
|
||||
* @alias element.scroll
|
||||
* @param {number=} x horizontal scroll position (default: `0`)
|
||||
* @param {number=} y vertical scroll position (default: `0`)
|
||||
* @param {number} [x=0] horizontal scroll position (default: `0`)
|
||||
* @param {number} [y=0] vertical scroll position (default: `0`)
|
||||
* @uses protocol/execute
|
||||
* @type utility
|
||||
*
|
||||
|
|
|
|||
|
|
@ -42,7 +42,7 @@
|
|||
*
|
||||
* @alias $$
|
||||
* @param {String|Function|Matcher} selector selector, JS Function, or Matcher object to fetch multiple elements
|
||||
* @return {ElementArray}
|
||||
* @return {WebdriverIO.ElementArray}
|
||||
* @example https://github.com/webdriverio/example-recipes/blob/59c122c809d44d343c231bde2af7e8456c8f086c/queryElements/example.html
|
||||
* @example https://github.com/webdriverio/example-recipes/blob/59c122c809d44d343c231bde2af7e8456c8f086c/queryElements/multipleElements.js#L6-L7
|
||||
* @example https://github.com/webdriverio/example-recipes/blob/59c122c809d44d343c231bde2af7e8456c8f086c/queryElements/multipleElements.js#L15-L24
|
||||
|
|
|
|||
|
|
@ -57,7 +57,7 @@
|
|||
*
|
||||
* @alias $
|
||||
* @param {String|Function|Matcher} selector selector, JS Function, or Matcher object to fetch a certain element
|
||||
* @return {Element}
|
||||
* @return {WebdriverIO.Element}
|
||||
* @example https://github.com/webdriverio/example-recipes/blob/59c122c809d44d343c231bde2af7e8456c8f086c/queryElements/example.html
|
||||
* @example https://github.com/webdriverio/example-recipes/blob/59c122c809d44d343c231bde2af7e8456c8f086c/queryElements/singleElements.js#L9-L10
|
||||
* @example https://github.com/webdriverio/example-recipes/blob/59c122c809d44d343c231bde2af7e8456c8f086c/queryElements/singleElements.js#L16-L25
|
||||
|
|
|
|||
|
|
@ -28,7 +28,7 @@ import type { CustomStrategyFunction } from '../../types.js'
|
|||
* @alias custom$$
|
||||
* @param {string} strategyName
|
||||
* @param {*} strategyArguments
|
||||
* @return {ElementArray}
|
||||
* @return {WebdriverIO.ElementArray}
|
||||
*/
|
||||
export async function custom$$ (
|
||||
this: WebdriverIO.Element,
|
||||
|
|
|
|||
|
|
@ -30,7 +30,7 @@ import type { CustomStrategyFunction } from '../../types.js'
|
|||
* @example https://github.com/webdriverio/example-recipes/blob/f5730428ec3605e856e90bf58be17c9c9da891de/queryElements/customStrategy.js#L2-L11
|
||||
* @example https://github.com/webdriverio/example-recipes/blob/f5730428ec3605e856e90bf58be17c9c9da891de/queryElements/example.html#L8-L12
|
||||
* @example https://github.com/webdriverio/example-recipes/blob/f5730428ec3605e856e90bf58be17c9c9da891de/queryElements/customStrategy.js#L16-L19
|
||||
* @return {Element}
|
||||
* @return {WebdriverIO.Element}
|
||||
*/
|
||||
export async function custom$ (
|
||||
this: WebdriverIO.Element,
|
||||
|
|
|
|||
|
|
@ -13,7 +13,7 @@ import type { ChainablePromiseElement } from '../../types.js'
|
|||
* </example>
|
||||
*
|
||||
* @alias element.getElement
|
||||
* @return {Element}
|
||||
* @return {WebdriverIO.Element}
|
||||
* @type utility
|
||||
*
|
||||
*/
|
||||
|
|
|
|||
|
|
@ -13,7 +13,7 @@ import type { ChainablePromiseArray } from '../../types.js'
|
|||
* </example>
|
||||
*
|
||||
* @alias element.getElements
|
||||
* @return {Element}
|
||||
* @return {WebdriverIO.ElementArray}
|
||||
* @type utility
|
||||
*
|
||||
*/
|
||||
|
|
|
|||
|
|
@ -18,7 +18,7 @@
|
|||
* </example>
|
||||
*
|
||||
* @alias element.nextElement
|
||||
* @return {Element}
|
||||
* @return {WebdriverIO.Element}
|
||||
* @type utility
|
||||
*/
|
||||
|
||||
|
|
|
|||
|
|
@ -18,7 +18,7 @@
|
|||
* </example>
|
||||
*
|
||||
* @alias element.parentElement
|
||||
* @return {Element}
|
||||
* @return {WebdriverIO.Element}
|
||||
* @type utility
|
||||
*/
|
||||
export function parentElement (this: WebdriverIO.Element) {
|
||||
|
|
|
|||
|
|
@ -18,7 +18,7 @@
|
|||
* </example>
|
||||
*
|
||||
* @alias element.previousElement
|
||||
* @return {Element}
|
||||
* @return {WebdriverIO.Element}
|
||||
* @type utility
|
||||
*/
|
||||
export function previousElement (this: WebdriverIO.Element) {
|
||||
|
|
|
|||
|
|
@ -37,7 +37,7 @@ import type { ReactSelectorOptions } from '../../types.js'
|
|||
* @param {ReactSelectorOptions=} options React selector options
|
||||
* @param {Object=} options.props React props the element should contain
|
||||
* @param {`Array<any>|number|string|object|boolean`=} options.state React state the element should be in
|
||||
* @return {ElementArray}
|
||||
* @return {WebdriverIO.ElementArray}
|
||||
*
|
||||
*/
|
||||
export async function react$$(
|
||||
|
|
|
|||
|
|
@ -46,7 +46,7 @@ import type { ReactSelectorOptions } from '../../types.js'
|
|||
* @param {ReactSelectorOptions=} options React selector options
|
||||
* @param {Object=} options.props React props the element should contain
|
||||
* @param {`Array<any>|number|string|object|boolean`=} options.state React state the element should be in
|
||||
* @return {Element}
|
||||
* @return {WebdriverIO.Element}
|
||||
*
|
||||
*/
|
||||
export async function react$(
|
||||
|
|
|
|||
|
|
@ -34,7 +34,7 @@ const log = logger('webdriverio')
|
|||
*
|
||||
* @alias element.shadow$$
|
||||
* @param {String|Function} selector selector or JS Function to fetch a certain element
|
||||
* @return {ElementArray}
|
||||
* @return {WebdriverIO.ElementArray}
|
||||
* @type utility
|
||||
*
|
||||
*/
|
||||
|
|
|
|||
|
|
@ -32,7 +32,7 @@ const log = logger('webdriverio')
|
|||
*
|
||||
* @alias element.shadow$
|
||||
* @param {String|Function} selector selector or JS Function to fetch a certain element
|
||||
* @return {Element}
|
||||
* @return {WebdriverIO.Element}
|
||||
* @type utility
|
||||
*
|
||||
*/
|
||||
|
|
|
|||
|
|
@ -114,7 +114,10 @@ const ext = it.path.extname(filename).slice(1);
|
|||
<% if (it.returns) { %>
|
||||
##### Returns
|
||||
|
||||
- **<<%= it.returns.type %>> <code><var><%= it.returns.name %></var></code>:** <%= it.returns.description %>
|
||||
- **<<%= it.returns.type %>>**
|
||||
<% if (it.returns.description) { %>
|
||||
**<code><var><%= it.returns.name %></var></code>:** <%= it.returns.description %>
|
||||
<% } %>
|
||||
<% } %>
|
||||
|
||||
<% if (it.throwsTags.length) { %>
|
||||
|
|
|
|||
|
|
@ -51,7 +51,7 @@ export default function (docfile: {
|
|||
const fires: string[] = []
|
||||
const listens: string[] = []
|
||||
const exampleReferences: string[] = []
|
||||
let tagDeprecated = false
|
||||
let tagDeprecated = ''
|
||||
let tagSee = ''
|
||||
let tagVersion = ''
|
||||
let tagAuthor = ''
|
||||
|
|
@ -141,7 +141,7 @@ export default function (docfile: {
|
|||
break
|
||||
}
|
||||
case 'deprecated': {
|
||||
tagDeprecated = true
|
||||
tagDeprecated = source[0].source.split('@deprecated')[1].trim()
|
||||
break
|
||||
}
|
||||
case 'mobileElement': {
|
||||
|
|
|
|||
Loading…
Reference in a new issue