cherry-pick(1.20): add name for screenshot animations option (#12608)
This commit is contained in:
parent
84f36df415
commit
503dc782b6
|
|
@ -328,7 +328,7 @@ Waits for the specific [`param: selector`] to either appear or disappear, depend
|
|||
Selector to wait for.
|
||||
|
||||
### option: AndroidDevice.wait.state
|
||||
- `state` <"gone">
|
||||
- `state` <[AndroidDeviceState]<"gone">>
|
||||
|
||||
Optional state. Can be either:
|
||||
* default - wait for element to be present.
|
||||
|
|
|
|||
|
|
@ -28,7 +28,7 @@ Determines whether sink is interested in the logger with the given name and seve
|
|||
logger name
|
||||
|
||||
### param: Logger.isEnabled.severity
|
||||
- `severity` <"verbose"|"info"|"warning"|"error">
|
||||
- `severity` <[LogSeverity]<"verbose"|"info"|"warning"|"error">>
|
||||
|
||||
## method: Logger.log
|
||||
|
||||
|
|
@ -38,7 +38,7 @@ logger name
|
|||
logger name
|
||||
|
||||
### param: Logger.log.severity
|
||||
- `severity` <"verbose"|"info"|"warning"|"error">
|
||||
- `severity` <[LogSeverity]<"verbose"|"info"|"warning"|"error">>
|
||||
|
||||
### param: Logger.log.message
|
||||
- `message` <[string]|[Error]>
|
||||
|
|
|
|||
|
|
@ -902,7 +902,7 @@ Note that outer and inner locators must belong to the same frame. Inner locator
|
|||
- %%-locator-option-has-%%
|
||||
|
||||
## screenshot-option-animations
|
||||
- `animations` <"disabled">
|
||||
- `animations` <[ScreenshotAnimations]<"disabled">>
|
||||
|
||||
When set to `"disabled"`, stops CSS animations, CSS transitions and Web Animations. Animations get different treatment depending on their duration:
|
||||
* finite animations are fast-forwarded to completion, so they'll fire `transitionend` event.
|
||||
|
|
|
|||
|
|
@ -288,7 +288,7 @@ test('runs second', async ({ page }) => {});
|
|||
```
|
||||
|
||||
### option: Test.describe.configure.mode
|
||||
- `mode` <"parallel"|"serial">
|
||||
- `mode` <[TestMode]<"parallel"|"serial">>
|
||||
|
||||
|
||||
|
||||
|
|
|
|||
|
|
@ -448,7 +448,11 @@ Documentation.Type = class {
|
|||
* @return {Documentation.Type}
|
||||
*/
|
||||
static fromParsedType(parsedType, inUnion = false) {
|
||||
if (!inUnion && parsedType.union) {
|
||||
if (!inUnion && !parsedType.unionName && isStringUnion(parsedType) ) {
|
||||
throw new Error('Enum must have a name:\n' + JSON.stringify(parsedType, null, 2));
|
||||
}
|
||||
|
||||
if (!inUnion && (parsedType.union || parsedType.unionName)) {
|
||||
const type = new Documentation.Type(parsedType.unionName || '');
|
||||
type.union = [];
|
||||
for (let t = parsedType; t; t = t.union) {
|
||||
|
|
@ -568,8 +572,6 @@ Documentation.Type = class {
|
|||
* @returns {boolean}
|
||||
*/
|
||||
function isStringUnion(type) {
|
||||
if (!type.union)
|
||||
return false;
|
||||
while (type) {
|
||||
if (!type.name.startsWith('"') || !type.name.endsWith('"'))
|
||||
return false;
|
||||
|
|
|
|||
Loading…
Reference in a new issue