mirror of
https://github.com/microsoft/playwright.git
synced 2025-06-26 21:40:17 +00:00
docs: check that description has an empty line before it (#32830)
This commit is contained in:
parent
6465f0b1bd
commit
d07f6cfc5c
@ -177,7 +177,9 @@ Launches a process in the shell on the device and returns a socket to communicat
|
||||
|
||||
### param: AndroidDevice.open.command
|
||||
* since: v1.9
|
||||
- `command` <[string]> Shell command to execute.
|
||||
- `command` <[string]>
|
||||
|
||||
Shell command to execute.
|
||||
|
||||
## async method: AndroidDevice.pinchClose
|
||||
* since: v1.9
|
||||
|
||||
@ -4093,12 +4093,16 @@ await page.GotoAsync("https://www.microsoft.com");
|
||||
### param: Page.setViewportSize.width
|
||||
* since: v1.10
|
||||
* langs: csharp, java
|
||||
- `width` <[int]> page width in pixels.
|
||||
- `width` <[int]>
|
||||
|
||||
Page width in pixels.
|
||||
|
||||
### param: Page.setViewportSize.height
|
||||
* since: v1.10
|
||||
* langs: csharp, java
|
||||
- `height` <[int]> page height in pixels.
|
||||
- `height` <[int]>
|
||||
|
||||
Page height in pixels.
|
||||
|
||||
## async method: Page.tap
|
||||
* since: v1.8
|
||||
|
||||
@ -765,8 +765,6 @@ not recorded. Make sure to call [`method: BrowserContext.close`] for videos to b
|
||||
* langs: csharp, java, python
|
||||
- alias-python: record_video_size
|
||||
- `recordVideoSize` <[Object]>
|
||||
If `viewport` is not configured explicitly the video size defaults to 800x450. Actual picture of each page will be
|
||||
scaled down if necessary to fit the specified size.
|
||||
- `width` <[int]> Video frame width.
|
||||
- `height` <[int]> Video frame height.
|
||||
|
||||
|
||||
@ -1713,7 +1713,8 @@ Whether to box the step in the report. Defaults to `false`. When the step is box
|
||||
### option: Test.step.location
|
||||
* since: v1.48
|
||||
- `location` <[Location]>
|
||||
Specifies a custom location for the step to be shown in test reports. By default, location of the [`method: Test.step`] call is shown.
|
||||
|
||||
Specifies a custom location for the step to be shown in test reports and trace viewer. By default, location of the [`method: Test.step`] call is shown.
|
||||
|
||||
## method: Test.use
|
||||
* since: v1.10
|
||||
|
||||
2
packages/playwright-core/types/types.d.ts
vendored
2
packages/playwright-core/types/types.d.ts
vendored
@ -16825,7 +16825,7 @@ export interface AndroidDevice {
|
||||
|
||||
/**
|
||||
* Launches a process in the shell on the device and returns a socket to communicate with the launched process.
|
||||
* @param command
|
||||
* @param command Shell command to execute.
|
||||
*/
|
||||
open(command: string): Promise<AndroidSocket>;
|
||||
|
||||
|
||||
@ -165,7 +165,7 @@ class ApiParser {
|
||||
if (!name)
|
||||
throw new Error('Invalid member name ' + spec.text);
|
||||
if (match[1] === 'param') {
|
||||
const arg = this.parseProperty(spec);
|
||||
const arg = this.parseProperty(spec, match[2]);
|
||||
if (!arg)
|
||||
return;
|
||||
arg.name = name;
|
||||
@ -182,7 +182,7 @@ class ApiParser {
|
||||
}
|
||||
} else {
|
||||
// match[1] === 'option'
|
||||
const p = this.parseProperty(spec);
|
||||
const p = this.parseProperty(spec, match[2]);
|
||||
if (!p)
|
||||
return;
|
||||
let options = method.argsArray.find(o => o.name === 'options');
|
||||
@ -198,11 +198,14 @@ class ApiParser {
|
||||
|
||||
/**
|
||||
* @param {MarkdownHeaderNode} spec
|
||||
* @param {string} memberName
|
||||
* @returns {docs.Member | null}
|
||||
*/
|
||||
parseProperty(spec) {
|
||||
parseProperty(spec, memberName) {
|
||||
const param = childrenWithoutProperties(spec)[0];
|
||||
const text = /** @type {string}*/(param.text);
|
||||
if (text.substring(text.lastIndexOf('>') + 1).trim())
|
||||
throw new Error(`Extra information after type while processing "${memberName}".\nYou probably need an extra empty line before the description.\n================\n${text}`);
|
||||
let typeStart = text.indexOf('<');
|
||||
while ('?e'.includes(text[typeStart - 1]))
|
||||
typeStart--;
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user