testplane 8.20.4 → 8.20.6
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/build/package.json +1 -1
- package/build/src/browser/commands/types.d.ts +1 -81
- package/build/src/bundle/index.js +96 -1
- package/build/src/config/index.js +5 -2
- package/build/src/config/index.js.map +1 -1
- package/build/src/config/options-builder.d.ts +1 -1
- package/build/src/config/types.d.ts +90 -10
- package/build/src/config/utils.d.ts +14 -11
- package/build/src/config/utils.js +47 -19
- package/build/src/config/utils.js.map +1 -1
- package/build/src/index.d.ts +2 -2
- package/build/src/runner/browser-env/vite/plugins/generate-index-html.js +1 -0
- package/build/src/runner/browser-env/vite/plugins/generate-index-html.js.map +1 -1
- package/build/src/types/index.d.ts +0 -1
- package/build/src/types/index.js.map +1 -1
- package/build/src/utils/module.d.ts +1 -0
- package/build/src/utils/module.js +5 -1
- package/build/src/utils/module.js.map +1 -1
- package/package.json +1 -1
package/build/package.json
CHANGED
|
@@ -1,85 +1,5 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { AssertViewOpts } from "../../config/types";
|
|
2
2
|
import { ChainablePromiseElement } from "webdriverio";
|
|
3
|
-
export interface AssertViewOpts extends Partial<AssertViewOptsConfig> {
|
|
4
|
-
/**
|
|
5
|
-
* Maximum allowed difference between colors.
|
|
6
|
-
* Overrides config {@link https://github.com/gemini-testing/testplane#browsers browsers}.{@link https://github.com/gemini-testing/testplane#tolerance tolerance} value.
|
|
7
|
-
*
|
|
8
|
-
* @remarks
|
|
9
|
-
* Indicates maximum allowed CIEDE2000 difference between colors. Used only in non-strict mode.
|
|
10
|
-
* Increasing global default is not recommended, prefer changing tolerance for particular suites or states instead.
|
|
11
|
-
* By default it's 2.3 which should be enough for the most cases.
|
|
12
|
-
*
|
|
13
|
-
* @defaultValue `2.3`
|
|
14
|
-
*/
|
|
15
|
-
tolerance?: number;
|
|
16
|
-
/**
|
|
17
|
-
* Minimum difference in brightness (zero by default) between the darkest/lightest pixel (which is adjacent to the antialiasing pixel) and theirs adjacent pixels.
|
|
18
|
-
* Overrides config {@link https://github.com/gemini-testing/testplane#browsers browsers}.{@link https://github.com/gemini-testing/testplane#antialiasingTolerance antialiasingTolerance} value.
|
|
19
|
-
*
|
|
20
|
-
* @remarks
|
|
21
|
-
* Read more about this option in {@link https://github.com/gemini-testing/looks-same#comparing-images-with-ignoring-antialiasing looks-same}
|
|
22
|
-
*
|
|
23
|
-
* @defaultValue `4`
|
|
24
|
-
*/
|
|
25
|
-
antialiasingTolerance?: number;
|
|
26
|
-
/**
|
|
27
|
-
* Allows testing of regions which bottom bounds are outside of a viewport height.
|
|
28
|
-
* Overrides config {@link https://github.com/gemini-testing/testplane#browsers browsers}.{@link https://github.com/gemini-testing/testplane#compositeImage compositeImage} value.
|
|
29
|
-
*
|
|
30
|
-
* @remarks
|
|
31
|
-
* In the resulting screenshot the area which fits the viewport bounds will be joined with the area which is outside of the viewport height.
|
|
32
|
-
*
|
|
33
|
-
* @defaultValue `true`
|
|
34
|
-
*/
|
|
35
|
-
compositeImage?: boolean;
|
|
36
|
-
/**
|
|
37
|
-
* Allows to specify a delay (in milliseconds) before making any screenshot.
|
|
38
|
-
* Overrides config {@link https://github.com/gemini-testing/testplane#browsers browsers}.{@link https://github.com/gemini-testing/testplane#screenshotDelay screenshotDelay} value.
|
|
39
|
-
*
|
|
40
|
-
* @remarks
|
|
41
|
-
* This is useful when the page has elements which are animated or if you do not want to screen a scrollbar.
|
|
42
|
-
*
|
|
43
|
-
* @defaultValue `0`
|
|
44
|
-
*/
|
|
45
|
-
screenshotDelay?: number;
|
|
46
|
-
/**
|
|
47
|
-
* Ability to set DOM-node selector which should be scroll when the captured element does not completely fit on the screen.
|
|
48
|
-
*
|
|
49
|
-
* @remarks
|
|
50
|
-
* Useful when you capture the modal (popup). In this case a duplicate of the modal appears on the screenshot.
|
|
51
|
-
* That happens because we scroll the page using `window` selector, which scroll only the background of the modal, and the modal itself remains in place.
|
|
52
|
-
* Default value is `undefined` (it means scroll relative to `window`). Works only when `compositeImage` is `true` (default).
|
|
53
|
-
*
|
|
54
|
-
* @defaultValue `undefined`
|
|
55
|
-
*/
|
|
56
|
-
selectorToScroll?: string;
|
|
57
|
-
/**
|
|
58
|
-
* Ability to disable animations and transitions while making a screenshot
|
|
59
|
-
*
|
|
60
|
-
* @remarks
|
|
61
|
-
* Usefull when you capture screenshot of a page, having animations and transitions.
|
|
62
|
-
* Iframe animations are only disabled when using webdriver protocol.
|
|
63
|
-
*
|
|
64
|
-
* @defaultValue `true`
|
|
65
|
-
*/
|
|
66
|
-
disableAnimation?: boolean;
|
|
67
|
-
/**
|
|
68
|
-
* Ability to ignore a small amount of different pixels to classify screenshots as being "identical"
|
|
69
|
-
*
|
|
70
|
-
* @example 5
|
|
71
|
-
* @example '1.5%'
|
|
72
|
-
*
|
|
73
|
-
* @remarks
|
|
74
|
-
* Useful when you encounter a few pixels difference that cannot be eliminated using the tolerance and antialiasingTolerance settings.
|
|
75
|
-
*
|
|
76
|
-
* @note
|
|
77
|
-
* This should be considered a last resort and only used in small number of cases where necessary.
|
|
78
|
-
*
|
|
79
|
-
* @defaultValue `0`
|
|
80
|
-
*/
|
|
81
|
-
ignoreDiffPixelCount?: `${number}%` | number;
|
|
82
|
-
}
|
|
83
3
|
export type AssertViewCommandWithSelector = (this: WebdriverIO.Browser, state: string, selectors: string | string[], opts?: AssertViewOpts) => Promise<void>;
|
|
84
4
|
export type AssertViewCommandWithoutSelector = (this: WebdriverIO.Browser, state: string, opts?: AssertViewOpts) => Promise<void>;
|
|
85
5
|
export type AssertViewCommand = AssertViewCommandWithSelector & AssertViewCommandWithoutSelector;
|
|
@@ -74135,7 +74135,14 @@ var import_pirates = __toESM(require_lib34());
|
|
|
74135
74135
|
var TRANSFORM_EXTENSIONS = [".jsx", ".cjsx", ".mjsx", ".tsx", ".ctsx", ".mtsx"];
|
|
74136
74136
|
var JS_EXTENSION_RE = /^\.([cm]?[tj]sx?|json)$/;
|
|
74137
74137
|
|
|
74138
|
+
// src/utils/module.ts
|
|
74139
|
+
var requireModuleSync = (modulePath) => {
|
|
74140
|
+
return require(modulePath);
|
|
74141
|
+
};
|
|
74142
|
+
|
|
74138
74143
|
// src/bundle/test-transformer.ts
|
|
74144
|
+
var STYLE_EXTESTION_RE = /\.(css|less|scss|sass|styl|stylus|pcss)$/;
|
|
74145
|
+
var IGNORE_STYLE_ERRORS = ["Unexpected token"];
|
|
74139
74146
|
var setupTransformHook = (opts = {}) => {
|
|
74140
74147
|
const transformOptions = {
|
|
74141
74148
|
browserslistConfigFile: false,
|
|
@@ -74155,13 +74162,26 @@ var setupTransformHook = (opts = {}) => {
|
|
|
74155
74162
|
require_lib31()
|
|
74156
74163
|
]
|
|
74157
74164
|
};
|
|
74158
|
-
const customIgnoreImportsPlugin = () => ({
|
|
74165
|
+
const customIgnoreImportsPlugin = ({ types: t }) => ({
|
|
74159
74166
|
name: "ignore-imports",
|
|
74160
74167
|
visitor: {
|
|
74161
74168
|
ImportDeclaration(path) {
|
|
74162
74169
|
const extname2 = nodePath.extname(path.node.source.value);
|
|
74163
74170
|
if (extname2 && !extname2.match(JS_EXTENSION_RE)) {
|
|
74164
74171
|
path.remove();
|
|
74172
|
+
return;
|
|
74173
|
+
}
|
|
74174
|
+
try {
|
|
74175
|
+
requireModuleSync(path.node.source.value);
|
|
74176
|
+
} catch (err) {
|
|
74177
|
+
if (shouldIgnoreImportError(err)) {
|
|
74178
|
+
path.remove();
|
|
74179
|
+
return;
|
|
74180
|
+
}
|
|
74181
|
+
if (err.code === "ERR_REQUIRE_ESM") {
|
|
74182
|
+
mockEsmModuleImport(t, path);
|
|
74183
|
+
return;
|
|
74184
|
+
}
|
|
74165
74185
|
}
|
|
74166
74186
|
}
|
|
74167
74187
|
}
|
|
@@ -74177,6 +74197,81 @@ var setupTransformHook = (opts = {}) => {
|
|
|
74177
74197
|
);
|
|
74178
74198
|
return revertTransformHook;
|
|
74179
74199
|
};
|
|
74200
|
+
function shouldIgnoreImportError(err) {
|
|
74201
|
+
const shouldIgnoreImport = IGNORE_STYLE_ERRORS.some((ignoreImportErr) => {
|
|
74202
|
+
return err.message.startsWith(ignoreImportErr);
|
|
74203
|
+
});
|
|
74204
|
+
if (!shouldIgnoreImport) {
|
|
74205
|
+
return false;
|
|
74206
|
+
}
|
|
74207
|
+
const firstStackFrame = err.stack?.split("\n")[0] || "";
|
|
74208
|
+
const filePath = firstStackFrame.split(":")[0];
|
|
74209
|
+
const isStyleFilePath = STYLE_EXTESTION_RE.test(filePath);
|
|
74210
|
+
return isStyleFilePath;
|
|
74211
|
+
}
|
|
74212
|
+
function mockEsmModuleImport(t, path) {
|
|
74213
|
+
const variableKey = genVarDeclKey(t, path.node);
|
|
74214
|
+
const variableValue = genProxy(t, [
|
|
74215
|
+
t.objectExpression([]),
|
|
74216
|
+
t.objectExpression([genProxyGetHandler(t), genProxyApplyHandler(t)])
|
|
74217
|
+
]);
|
|
74218
|
+
const variableDecl = t.variableDeclaration("const", [t.variableDeclarator(variableKey, variableValue)]);
|
|
74219
|
+
path.replaceWith(variableDecl);
|
|
74220
|
+
}
|
|
74221
|
+
function genVarDeclKey(t, node) {
|
|
74222
|
+
if (node.specifiers.length === 1) {
|
|
74223
|
+
if (["ImportDefaultSpecifier", "ImportNamespaceSpecifier"].includes(node.specifiers[0].type)) {
|
|
74224
|
+
return t.identifier(node.specifiers[0].local.name);
|
|
74225
|
+
}
|
|
74226
|
+
return t.objectPattern([
|
|
74227
|
+
t.objectProperty(
|
|
74228
|
+
t.identifier(node.specifiers[0].local.name),
|
|
74229
|
+
t.identifier(node.specifiers[0].local.name),
|
|
74230
|
+
false,
|
|
74231
|
+
true
|
|
74232
|
+
)
|
|
74233
|
+
]);
|
|
74234
|
+
}
|
|
74235
|
+
const objectProperties = node.specifiers.map((spec) => {
|
|
74236
|
+
return t.objectProperty(t.identifier(spec.local.name), t.identifier(spec.local.name), false, true);
|
|
74237
|
+
});
|
|
74238
|
+
return t.objectPattern(objectProperties);
|
|
74239
|
+
}
|
|
74240
|
+
function genProxy(t, args) {
|
|
74241
|
+
return t.newExpression(t.identifier("Proxy"), args);
|
|
74242
|
+
}
|
|
74243
|
+
function genProxyGetHandler(t) {
|
|
74244
|
+
return t.objectProperty(
|
|
74245
|
+
t.identifier("get"),
|
|
74246
|
+
t.functionExpression(
|
|
74247
|
+
null,
|
|
74248
|
+
[t.identifier("target"), t.identifier("prop")],
|
|
74249
|
+
t.blockStatement([
|
|
74250
|
+
t.returnStatement(
|
|
74251
|
+
t.conditionalExpression(
|
|
74252
|
+
t.binaryExpression("in", t.identifier("prop"), t.identifier("target")),
|
|
74253
|
+
t.memberExpression(t.identifier("target"), t.identifier("prop"), true),
|
|
74254
|
+
genProxy(t, [t.arrowFunctionExpression([], t.blockStatement([])), t.thisExpression()])
|
|
74255
|
+
)
|
|
74256
|
+
)
|
|
74257
|
+
])
|
|
74258
|
+
)
|
|
74259
|
+
);
|
|
74260
|
+
}
|
|
74261
|
+
function genProxyApplyHandler(t) {
|
|
74262
|
+
return t.objectProperty(
|
|
74263
|
+
t.identifier("apply"),
|
|
74264
|
+
t.functionExpression(
|
|
74265
|
+
null,
|
|
74266
|
+
[],
|
|
74267
|
+
t.blockStatement([
|
|
74268
|
+
t.returnStatement(
|
|
74269
|
+
genProxy(t, [t.arrowFunctionExpression([], t.blockStatement([])), t.thisExpression()])
|
|
74270
|
+
)
|
|
74271
|
+
])
|
|
74272
|
+
)
|
|
74273
|
+
);
|
|
74274
|
+
}
|
|
74180
74275
|
// Annotate the CommonJS export names for ESM import in node:
|
|
74181
74276
|
0 && (module.exports = {
|
|
74182
74277
|
JS_EXTENSION_RE,
|
|
@@ -33,6 +33,7 @@ const defaults_1 = __importDefault(require("./defaults"));
|
|
|
33
33
|
const browser_config_1 = require("./browser-config");
|
|
34
34
|
const options_1 = __importDefault(require("./options"));
|
|
35
35
|
const logger_1 = __importDefault(require("../utils/logger"));
|
|
36
|
+
const utils_1 = require("./utils");
|
|
36
37
|
class Config {
|
|
37
38
|
static create(config) {
|
|
38
39
|
return new Config(config);
|
|
@@ -80,11 +81,13 @@ class Config {
|
|
|
80
81
|
if (_.isFunction(options.prepareEnvironment)) {
|
|
81
82
|
options.prepareEnvironment();
|
|
82
83
|
}
|
|
83
|
-
|
|
84
|
+
const parsedOptions = (0, options_1.default)({
|
|
84
85
|
options,
|
|
85
86
|
env: process.env,
|
|
86
87
|
argv: process.argv,
|
|
87
|
-
})
|
|
88
|
+
});
|
|
89
|
+
(0, utils_1.addUserAgentToArgs)(parsedOptions);
|
|
90
|
+
_.extend(this, parsedOptions);
|
|
88
91
|
this.browsers = _.mapValues(this.browsers, (browser, id) => {
|
|
89
92
|
const browserOptions = _.extend({}, browser, {
|
|
90
93
|
id: id,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/config/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,2CAA6B;AAC7B,0CAA4B;AAC5B,0DAAkC;AAClC,qDAAiD;AACjD,wDAAqC;AACrC,6DAAqC;
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/config/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,2CAA6B;AAC7B,0CAA4B;AAC5B,0DAAkC;AAClC,qDAAiD;AACjD,wDAAqC;AACrC,6DAAqC;AAErC,mCAA6C;AAE7C,MAAa,MAAM;IAGf,MAAM,CAAC,MAAM,CAAC,MAA6B;QACvC,OAAO,IAAI,MAAM,CAAC,MAAM,CAAC,CAAC;IAC9B,CAAC;IAED,MAAM,CAAC,IAAI,CAAC,UAAkB;QAC1B,IAAI,CAAC;YACD,8DAA8D;YAC9D,MAAM,YAAY,GAAG,OAAO,CAAC,IAAI,CAAC,OAAO,CAAC,OAAO,CAAC,GAAG,EAAE,EAAE,UAAU,CAAC,CAAC,CAAC;YAEtE,OAAO,YAAY,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SAAS,CAAC,IAAI,EAAE,MAAM,EAAE,CAAC,CAAC,EAAE,CAAC,EAAE,EAAE;YAC/B,IAAI,CAAC,CAAC,YAAY,CAAC,CAAC,CAAC,EAAE,CAAC;gBACpB,OAAO;YACX,CAAC;YAED,6DAA6D;YAC7D,wFAAwF;YACxF,OAAO,OAAO,CAAC,KAAK,OAAO,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC;QACzC,CAAC,CAAC,CAAC;IACP,CAAC;CACJ;AAvGD,wBAuGC"}
|
|
@@ -6,7 +6,7 @@ declare function _exports(defaultFactory: any): {
|
|
|
6
6
|
optionalArray: (name: any) => configparser.Parser<any>;
|
|
7
7
|
optionalObject: (name: any) => configparser.Parser<any>;
|
|
8
8
|
optionalFunction: (name: any) => configparser.Parser<any>;
|
|
9
|
-
anyObject: () => configparser.Parser<Record<string,
|
|
9
|
+
anyObject: () => configparser.Parser<Record<string, unknown>>;
|
|
10
10
|
nonNegativeInteger: (name: any) => configparser.Parser<any>;
|
|
11
11
|
optionalNonNegativeInteger: (name: any, opts?: {
|
|
12
12
|
isDeprecated: boolean;
|
|
@@ -14,13 +14,13 @@ export interface BuildDiffOptsConfig {
|
|
|
14
14
|
ignoreAntialiasing: boolean;
|
|
15
15
|
ignoreCaret: boolean;
|
|
16
16
|
}
|
|
17
|
-
export interface
|
|
17
|
+
export interface AssertViewOpts {
|
|
18
18
|
/**
|
|
19
19
|
* DOM-node selectors which will be ignored (painted with a black rectangle) when comparing images.
|
|
20
20
|
*
|
|
21
21
|
* @defaultValue `[]`
|
|
22
22
|
*/
|
|
23
|
-
ignoreElements
|
|
23
|
+
ignoreElements?: string | Array<string>;
|
|
24
24
|
/**
|
|
25
25
|
* Ability to set capture element from the top area or from current position.
|
|
26
26
|
*
|
|
@@ -29,7 +29,7 @@ export interface AssertViewOptsConfig {
|
|
|
29
29
|
*
|
|
30
30
|
* @defaultValue `true`
|
|
31
31
|
*/
|
|
32
|
-
captureElementFromTop
|
|
32
|
+
captureElementFromTop?: boolean;
|
|
33
33
|
/**
|
|
34
34
|
* Disables check that element is outside of the viewport left, top, right or bottom bounds.
|
|
35
35
|
*
|
|
@@ -41,7 +41,85 @@ export interface AssertViewOptsConfig {
|
|
|
41
41
|
*
|
|
42
42
|
* @defaultValue `false`
|
|
43
43
|
*/
|
|
44
|
-
allowViewportOverflow
|
|
44
|
+
allowViewportOverflow?: boolean;
|
|
45
|
+
/**
|
|
46
|
+
* Maximum allowed difference between colors.
|
|
47
|
+
* Overrides config {@link https://github.com/gemini-testing/testplane#browsers browsers}.{@link https://github.com/gemini-testing/testplane#tolerance tolerance} value.
|
|
48
|
+
*
|
|
49
|
+
* @remarks
|
|
50
|
+
* Indicates maximum allowed CIEDE2000 difference between colors. Used only in non-strict mode.
|
|
51
|
+
* Increasing global default is not recommended, prefer changing tolerance for particular suites or states instead.
|
|
52
|
+
* By default it's 2.3 which should be enough for the most cases.
|
|
53
|
+
*
|
|
54
|
+
* @defaultValue `2.3`
|
|
55
|
+
*/
|
|
56
|
+
tolerance?: number;
|
|
57
|
+
/**
|
|
58
|
+
* Minimum difference in brightness (zero by default) between the darkest/lightest pixel (which is adjacent to the antialiasing pixel) and theirs adjacent pixels.
|
|
59
|
+
* Overrides config {@link https://github.com/gemini-testing/testplane#browsers browsers}.{@link https://github.com/gemini-testing/testplane#antialiasingTolerance antialiasingTolerance} value.
|
|
60
|
+
*
|
|
61
|
+
* @remarks
|
|
62
|
+
* Read more about this option in {@link https://github.com/gemini-testing/looks-same#comparing-images-with-ignoring-antialiasing looks-same}
|
|
63
|
+
*
|
|
64
|
+
* @defaultValue `4`
|
|
65
|
+
*/
|
|
66
|
+
antialiasingTolerance?: number;
|
|
67
|
+
/**
|
|
68
|
+
* Allows testing of regions which bottom bounds are outside of a viewport height.
|
|
69
|
+
* Overrides config {@link https://github.com/gemini-testing/testplane#browsers browsers}.{@link https://github.com/gemini-testing/testplane#compositeImage compositeImage} value.
|
|
70
|
+
*
|
|
71
|
+
* @remarks
|
|
72
|
+
* In the resulting screenshot the area which fits the viewport bounds will be joined with the area which is outside of the viewport height.
|
|
73
|
+
*
|
|
74
|
+
* @defaultValue `true`
|
|
75
|
+
*/
|
|
76
|
+
compositeImage?: boolean;
|
|
77
|
+
/**
|
|
78
|
+
* Allows to specify a delay (in milliseconds) before making any screenshot.
|
|
79
|
+
* Overrides config {@link https://github.com/gemini-testing/testplane#browsers browsers}.{@link https://github.com/gemini-testing/testplane#screenshotDelay screenshotDelay} value.
|
|
80
|
+
*
|
|
81
|
+
* @remarks
|
|
82
|
+
* This is useful when the page has elements which are animated or if you do not want to screen a scrollbar.
|
|
83
|
+
*
|
|
84
|
+
* @defaultValue `0`
|
|
85
|
+
*/
|
|
86
|
+
screenshotDelay?: number;
|
|
87
|
+
/**
|
|
88
|
+
* Ability to set DOM-node selector which should be scroll when the captured element does not completely fit on the screen.
|
|
89
|
+
*
|
|
90
|
+
* @remarks
|
|
91
|
+
* Useful when you capture the modal (popup). In this case a duplicate of the modal appears on the screenshot.
|
|
92
|
+
* That happens because we scroll the page using `window` selector, which scroll only the background of the modal, and the modal itself remains in place.
|
|
93
|
+
* Default value is `undefined` (it means scroll relative to `window`). Works only when `compositeImage` is `true` (default).
|
|
94
|
+
*
|
|
95
|
+
* @defaultValue `undefined`
|
|
96
|
+
*/
|
|
97
|
+
selectorToScroll?: string;
|
|
98
|
+
/**
|
|
99
|
+
* Ability to disable animations and transitions while making a screenshot
|
|
100
|
+
*
|
|
101
|
+
* @remarks
|
|
102
|
+
* Usefull when you capture screenshot of a page, having animations and transitions.
|
|
103
|
+
* Iframe animations are only disabled when using webdriver protocol.
|
|
104
|
+
*
|
|
105
|
+
* @defaultValue `true`
|
|
106
|
+
*/
|
|
107
|
+
disableAnimation?: boolean;
|
|
108
|
+
/**
|
|
109
|
+
* Ability to ignore a small amount of different pixels to classify screenshots as being "identical"
|
|
110
|
+
*
|
|
111
|
+
* @example 5
|
|
112
|
+
* @example '1.5%'
|
|
113
|
+
*
|
|
114
|
+
* @remarks
|
|
115
|
+
* Useful when you encounter a few pixels difference that cannot be eliminated using the tolerance and antialiasingTolerance settings.
|
|
116
|
+
*
|
|
117
|
+
* @note
|
|
118
|
+
* This should be considered a last resort and only used in small number of cases where necessary.
|
|
119
|
+
*
|
|
120
|
+
* @defaultValue `0`
|
|
121
|
+
*/
|
|
122
|
+
ignoreDiffPixelCount?: `${number}%` | number;
|
|
45
123
|
}
|
|
46
124
|
export interface ExpectOptsConfig {
|
|
47
125
|
wait: number;
|
|
@@ -124,7 +202,7 @@ export interface CommonConfig {
|
|
|
124
202
|
antialiasingTolerance: number;
|
|
125
203
|
compareOpts: CompareOptsConfig;
|
|
126
204
|
buildDiffOpts: BuildDiffOptsConfig;
|
|
127
|
-
assertViewOpts:
|
|
205
|
+
assertViewOpts: AssertViewOpts;
|
|
128
206
|
expectOpts: ExpectOptsConfig;
|
|
129
207
|
meta: {
|
|
130
208
|
[name: string]: unknown;
|
|
@@ -184,16 +262,18 @@ export type ConfigInput = Partial<CommonConfig> & {
|
|
|
184
262
|
sets?: Record<string, SetsConfig>;
|
|
185
263
|
prepareEnvironment?: () => void | null;
|
|
186
264
|
};
|
|
265
|
+
export interface ConfigParsed extends CommonConfig {
|
|
266
|
+
browsers: Record<string, BrowserConfig>;
|
|
267
|
+
plugins: Record<string, Record<string, unknown>>;
|
|
268
|
+
sets: Record<string, SetsConfigParsed>;
|
|
269
|
+
prepareEnvironment?: () => void | null;
|
|
270
|
+
}
|
|
187
271
|
export interface RuntimeConfig {
|
|
188
272
|
extend: (data: unknown) => this;
|
|
189
273
|
[key: string]: unknown;
|
|
190
274
|
}
|
|
191
275
|
declare module "." {
|
|
192
|
-
interface Config extends
|
|
193
|
-
browsers: Record<string, BrowserConfig>;
|
|
194
|
-
plugins: Record<string, Record<string, unknown>>;
|
|
195
|
-
sets: Record<string, SetsConfigParsed>;
|
|
196
|
-
prepareEnvironment?: () => void | null;
|
|
276
|
+
interface Config extends ConfigParsed {
|
|
197
277
|
}
|
|
198
278
|
}
|
|
199
279
|
declare module "./browser-config" {
|
|
@@ -1,11 +1,14 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
export
|
|
4
|
-
export
|
|
5
|
-
export
|
|
6
|
-
export
|
|
7
|
-
export
|
|
8
|
-
export const
|
|
9
|
-
export const
|
|
10
|
-
export
|
|
11
|
-
export
|
|
1
|
+
import { ConfigParsed } from "./types";
|
|
2
|
+
type ValueType = "string" | "number" | "boolean" | "object" | "undefined" | "function";
|
|
3
|
+
export declare const is: (type: ValueType, name: string) => (value: unknown) => void;
|
|
4
|
+
export declare const assertNonNegativeNumber: (value: number, name: string) => void;
|
|
5
|
+
export declare const assertOptionalObject: (value: unknown, name: string) => void;
|
|
6
|
+
export declare const assertOptionalArray: (value: unknown, name: string) => void;
|
|
7
|
+
export declare const assertNonNegativeInteger: (value: number, name: string) => void;
|
|
8
|
+
export declare const assertEnum: (enumValues: string[], value: string, name: string) => void;
|
|
9
|
+
export declare const assertPositiveInteger: (value: number, name: string) => void;
|
|
10
|
+
export declare const assertPositiveIntegerOrInfinity: (value: number, name: string) => void;
|
|
11
|
+
export declare const parseBoolean: (value: string, name: string) => boolean;
|
|
12
|
+
export declare const parsePrimitive: <T = unknown>(str: string) => T;
|
|
13
|
+
export declare const addUserAgentToArgs: (config: ConfigParsed) => ConfigParsed;
|
|
14
|
+
export {};
|
|
@@ -1,53 +1,64 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
-
|
|
3
|
-
|
|
2
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
|
+
};
|
|
5
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
+
exports.addUserAgentToArgs = exports.parsePrimitive = exports.parseBoolean = exports.assertPositiveIntegerOrInfinity = exports.assertPositiveInteger = exports.assertEnum = exports.assertNonNegativeInteger = exports.assertOptionalArray = exports.assertOptionalObject = exports.assertNonNegativeNumber = exports.is = void 0;
|
|
7
|
+
const lodash_1 = __importDefault(require("lodash"));
|
|
4
8
|
const is = (type, name) => {
|
|
5
|
-
return value => {
|
|
9
|
+
return (value) => {
|
|
6
10
|
if (typeof value !== type) {
|
|
7
11
|
throw new Error(`"${name}" must be a ${type}`);
|
|
8
12
|
}
|
|
9
13
|
};
|
|
10
14
|
};
|
|
11
15
|
exports.is = is;
|
|
12
|
-
|
|
13
|
-
is("number", name)(value);
|
|
16
|
+
const assertNonNegativeNumber = (value, name) => {
|
|
17
|
+
(0, exports.is)("number", name)(value);
|
|
14
18
|
if (value < 0) {
|
|
15
19
|
throw new Error(`"${name}" must be non-negative`);
|
|
16
20
|
}
|
|
17
21
|
};
|
|
18
|
-
exports.
|
|
19
|
-
|
|
22
|
+
exports.assertNonNegativeNumber = assertNonNegativeNumber;
|
|
23
|
+
const assertOptionalObject = (value, name) => {
|
|
24
|
+
if (!lodash_1.default.isNull(value) && !lodash_1.default.isPlainObject(value)) {
|
|
20
25
|
throw new Error(`"${name}" must be an object`);
|
|
21
26
|
}
|
|
22
27
|
};
|
|
23
|
-
exports.
|
|
24
|
-
|
|
28
|
+
exports.assertOptionalObject = assertOptionalObject;
|
|
29
|
+
const assertOptionalArray = (value, name) => {
|
|
30
|
+
if (!lodash_1.default.isArray(value)) {
|
|
25
31
|
throw new Error(`"${name}" must be an array`);
|
|
26
32
|
}
|
|
27
33
|
};
|
|
28
|
-
exports.
|
|
34
|
+
exports.assertOptionalArray = assertOptionalArray;
|
|
35
|
+
const assertNonNegativeInteger = (value, name) => {
|
|
29
36
|
if (!Number.isInteger(value) || value < 0) {
|
|
30
37
|
throw new Error(`"${name}" must be a non-negative integer`);
|
|
31
38
|
}
|
|
32
39
|
};
|
|
33
|
-
exports.
|
|
34
|
-
|
|
35
|
-
|
|
40
|
+
exports.assertNonNegativeInteger = assertNonNegativeInteger;
|
|
41
|
+
const assertEnum = (enumValues, value, name) => {
|
|
42
|
+
(0, exports.is)("string", name)(value);
|
|
43
|
+
if (!lodash_1.default.includes(enumValues, value)) {
|
|
36
44
|
throw new Error(`"${name}" must be one of: ${enumValues.join(", ")}`);
|
|
37
45
|
}
|
|
38
46
|
};
|
|
39
|
-
|
|
40
|
-
|
|
47
|
+
exports.assertEnum = assertEnum;
|
|
48
|
+
const isPositiveInteger = (value) => Number.isInteger(value) && value > 0;
|
|
49
|
+
const assertPositiveInteger = (value, name) => {
|
|
41
50
|
if (!isPositiveInteger(value)) {
|
|
42
51
|
throw new Error(`"${name}" must be a positive integer`);
|
|
43
52
|
}
|
|
44
53
|
};
|
|
45
|
-
exports.
|
|
54
|
+
exports.assertPositiveInteger = assertPositiveInteger;
|
|
55
|
+
const assertPositiveIntegerOrInfinity = (value, name) => {
|
|
46
56
|
if (!isPositiveInteger(value) && value !== Infinity) {
|
|
47
57
|
throw new Error(`"${name}" must be a positive integer or Infinity`);
|
|
48
58
|
}
|
|
49
59
|
};
|
|
50
|
-
exports.
|
|
60
|
+
exports.assertPositiveIntegerOrInfinity = assertPositiveIntegerOrInfinity;
|
|
61
|
+
const parseBoolean = (value, name) => {
|
|
51
62
|
switch (value.toLowerCase()) {
|
|
52
63
|
case "1":
|
|
53
64
|
case "yes":
|
|
@@ -61,7 +72,8 @@ exports.parseBoolean = exports.parseBoolean = (value, name) => {
|
|
|
61
72
|
throw new Error(`Unexpected value for boolean option "${name}"`);
|
|
62
73
|
}
|
|
63
74
|
};
|
|
64
|
-
exports.
|
|
75
|
+
exports.parseBoolean = parseBoolean;
|
|
76
|
+
const parsePrimitive = (str) => {
|
|
65
77
|
try {
|
|
66
78
|
return JSON.parse(str);
|
|
67
79
|
}
|
|
@@ -69,5 +81,21 @@ exports.parsePrimitive = exports.parsePrimitive = str => {
|
|
|
69
81
|
throw new Error("a value must be a primitive type");
|
|
70
82
|
}
|
|
71
83
|
};
|
|
72
|
-
exports.
|
|
84
|
+
exports.parsePrimitive = parsePrimitive;
|
|
85
|
+
const addUserAgentToArgs = (config) => {
|
|
86
|
+
for (const browserKey in config.browsers) {
|
|
87
|
+
const browserConfig = config.browsers[browserKey];
|
|
88
|
+
const chromeOptions = browserConfig.desiredCapabilities?.["goog:chromeOptions"];
|
|
89
|
+
if (chromeOptions?.mobileEmulation?.userAgent) {
|
|
90
|
+
const userAgent = chromeOptions.mobileEmulation.userAgent;
|
|
91
|
+
chromeOptions.args = chromeOptions.args || [];
|
|
92
|
+
const userAgentArg = `user-agent=${userAgent}`;
|
|
93
|
+
if (!chromeOptions.args.find(arg => arg.startsWith("user-agent="))) {
|
|
94
|
+
chromeOptions.args.push(userAgentArg);
|
|
95
|
+
}
|
|
96
|
+
}
|
|
97
|
+
}
|
|
98
|
+
return config;
|
|
99
|
+
};
|
|
100
|
+
exports.addUserAgentToArgs = addUserAgentToArgs;
|
|
73
101
|
//# sourceMappingURL=utils.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"utils.js","sourceRoot":"","sources":["../../../src/config/utils.
|
|
1
|
+
{"version":3,"file":"utils.js","sourceRoot":"","sources":["../../../src/config/utils.ts"],"names":[],"mappings":";;;;;;AAAA,oDAAuB;AAKhB,MAAM,EAAE,GAAG,CAAC,IAAe,EAAE,IAAY,EAAE,EAAE;IAChD,OAAO,CAAC,KAAc,EAAQ,EAAE;QAC5B,IAAI,OAAO,KAAK,KAAK,IAAI,EAAE,CAAC;YACxB,MAAM,IAAI,KAAK,CAAC,IAAI,IAAI,eAAe,IAAI,EAAE,CAAC,CAAC;QACnD,CAAC;IACL,CAAC,CAAC;AACN,CAAC,CAAC;AANW,QAAA,EAAE,MAMb;AAEK,MAAM,uBAAuB,GAAG,CAAC,KAAa,EAAE,IAAY,EAAQ,EAAE;IACzE,IAAA,UAAE,EAAC,QAAQ,EAAE,IAAI,CAAC,CAAC,KAAK,CAAC,CAAC;IAC1B,IAAI,KAAK,GAAG,CAAC,EAAE,CAAC;QACZ,MAAM,IAAI,KAAK,CAAC,IAAI,IAAI,wBAA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C,OAAO,KAAK,EAAE,CAAC;QACb,MAAM,IAAI,KAAK,CAAC,kCAAkC,CAAC,CAAC;IACxD,CAAC;AACL,CAAC,CAAC;AANW,QAAA,cAAc,kBAMzB;AAEK,MAAM,kBAAkB,GAAG,CAAC,MAAoB,EAAgB,EAAE;IACrE,KAAK,MAAM,UAAU,IAAI,MAAM,CAAC,QAAQ,EAAE,CAAC;QACvC,MAAM,aAAa,GAAG,MAAM,CAAC,QAAQ,CAAC,UAAU,CAAC,CAAC;QAClD,MAAM,aAAa,GAAG,aAAa,CAAC,mBAAmB,EAAE,CAAC,oBAAoB,CAAC,CAAC;QAEhF,IAAI,aAAa,EAAE,eAAe,EAAE,SAAS,EAAE,CAAC;YAC5C,MAAM,SAAS,GAAG,aAAa,CAAC,eAAe,CAAC,SAAS,CAAC;YAC1D,aAAa,CAAC,IAAI,GAAG,aAAa,CAAC,IAAI,IAAI,EAAE,CAAC;YAE9C,MAAM,YAAY,GAAG,cAAc,SAAS,EAAE,CAAC;YAC/C,IAAI,CAAC,aAAa,CAAC,IAAI,CAAC,IAAI,CAAC,GAAG,CAAC,EAAE,CAAC,GAAG,CAAC,UAAU,CAAC,aAAa,CAAC,CAAC,EAAE,CAAC;gBACjE,aAAa,CAAC,IAAI,CAAC,IAAI,CAAC,YAAY,CAAC,CAAC;YAC1C,CAAC;QACL,CAAC;IACL,CAAC;IAED,OAAO,MAAM,CAAC;AAClB,CAAC,CAAC;AAjBW,QAAA,kBAAkB,sBAiB7B"}
|
package/build/src/index.d.ts
CHANGED
|
@@ -5,9 +5,9 @@ import "expect-webdriverio";
|
|
|
5
5
|
import { GlobalHelper } from "./types";
|
|
6
6
|
export { Testplane as default } from "./testplane";
|
|
7
7
|
export { Key } from "webdriverio";
|
|
8
|
-
export type { WdioBrowser, TestResult, Test, Suite, TestError,
|
|
8
|
+
export type { WdioBrowser, TestResult, Test, Suite, TestError, HermioneCtx, GlobalHelper, TestplaneCtx, TestFunctionCtx, } from "./types";
|
|
9
9
|
export type { Config } from "./config";
|
|
10
|
-
export type { ConfigInput } from "./config/types";
|
|
10
|
+
export type { ConfigInput, AssertViewOpts } from "./config/types";
|
|
11
11
|
export type { TestCollection, FormatterTreeSuite, FormatterTreeTest, FormatterTreeMainRunnable, FormatterListTest, } from "./test-collection";
|
|
12
12
|
export type { StatsResult } from "./stats";
|
|
13
13
|
import type { TestDefinition, SuiteDefinition, TestHookDefinition } from "./test-reader/test-object/types";
|
|
@@ -123,6 +123,7 @@ function generateTemplate(env, runUuid) {
|
|
|
123
123
|
<html>
|
|
124
124
|
<head>
|
|
125
125
|
<title>Testplane Browser Test</title>
|
|
126
|
+
<link rel="icon" href="https://testplane.io/img/favicon.ico">
|
|
126
127
|
<script type="module">
|
|
127
128
|
window.__testplane__ = ${JSON.stringify({ runUuid, ...env })};
|
|
128
129
|
</script>
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"generate-index-html.js","sourceRoot":"","sources":["../../../../../../src/runner/browser-env/vite/plugins/generate-index-html.ts"],"names":[],"mappings":";;;;;;AAAA,0DAA6B;AAC7B,wDAA2B;AAC3B,6CAA6C;AAC7C,oDAAuB;AACvB,kDAAgC;AAChC,4CAAyF;AACzF,oCAA+D;AAC/D,0CAA2C;AAC3C,sEAA8C;AAK9C,MAAM,KAAK,GAAG,IAAA,eAAW,EAAC,+BAA+B,CAAC,CAAC;AAE3D,6EAA6E;AAC7E,MAAM,uBAAuB,GAAG,CAAC,gBAAgB,EAAE,UAAU,EAAE,YAAY,EAAE,OAAO,CAAC,CAAC;AACtF,MAAM,SAAS,GAAG,CAAC,GAAG,4BAAc,EAAE,GAAG,4BAAc,CAAC,GAAG,CAAC,CAAC,CAAC,EAAE,CAAC,QAAQ,CAAC,EAAE,CAAC,CAAC,CAAC;AAE/E,MAAM,qBAAqB,GAAG,2BAA2B,CAAC;AAE1D,MAAM,cAAc,GAAG;IACnB,MAAM,EAAE;QACJ,EAAE,EAAE,qBAAqB;QACzB,UAAU,EAAE,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oBACzB,OAAO,IAAA,uBAAY,EAAC,EAAE,CAAC,OAAO,CAAC,WAAW,EAAE,EAAE,CAAC,CAAC,CAAC;gBACrD,CAAC;gBAED,IAAI,MAAM,CAAC,IAAI,CAAC,aAAa,CAAC,CAAC,QAAQ,CAAC,EAAE,CAAC,EAAE,CAAC;oBAC1C,OAAO,aAAa,CAAC,EAAE,CAAC,CAAC;gBAC7B,CAAC;YACL,CAAC;YAED,IAAI,EAAE,CAAC,EAAU,EAA4B,EAAE;gBAC3C,IAAI,EAAE,KAAK,cAAc,CAAC,MAAM,CAAC,UAAU,EAAE,CAAC;oBAC1C,OAAO,yCAAyC,IAAI,CAAC,SAAS,CAAC,sBAAsB,CAAC,GAAG,CAAC;gBAC9F,CAAC;YACL,CAAC;YAED,SAAS,CAAC,IAAI,EAAE,EAAE;gBACd,IAAI,EAAE,CAAC,QAAQ,CAAC,sBAAsB,CAAC,EAAE,CAAC;oBACtC,OAAO;wBACH,IAAI,EAAE,IAAI,CAAC,OAAO,CAAC,0DAA0D,EAAE,cAAc,CAAC;qBACjG,CAAC;gBACN,CAAC;gBAED,OAAO,EAAE,IAAI,EAAE,CAAC;YACpB,CAAC;SACJ;KACJ,CAAC;AACN,CAAC,CAAC;AAlHW,QAAA,MAAM,UAkHjB;AAEF,SAAS,gBAAgB,CAAC,GAA4B,EAAE,OAAe;IACnE,OAAO
|
|
1
|
+
{"version":3,"file":"generate-index-html.js","sourceRoot":"","sources":["../../../../../../src/runner/browser-env/vite/plugins/generate-index-html.ts"],"names":[],"mappings":";;;;;;AAAA,0DAA6B;AAC7B,wDAA2B;AAC3B,6CAA6C;AAC7C,oDAAuB;AACvB,kDAAgC;AAChC,4CAAyF;AACzF,oCAA+D;AAC/D,0CAA2C;AAC3C,sEAA8C;AAK9C,MAAM,KAAK,GAAG,IAAA,eAAW,EAAC,+BAA+B,CAAC,CAAC;AAE3D,6EAA6E;AAC7E,MAAM,uBAAuB,GAAG,CAAC,gBAAgB,EAAE,UAAU,E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,CAAC;;qCAEnC,wBAAY,CAAC,OAAO;qCACpB,wBAAY,CAAC,KAAK;qCAClB,wBAAY,CAAC,aAAa;;;;CAI9D,CAAC;AACF,CAAC;AAED,SAAS,qBAAqB,CAAC,KAAY;IACvC,OAAO;;;;eAII,KAAK,CAAC,KAAK;;;CAGzB,CAAC;AACF,CAAC"}
|
|
@@ -19,7 +19,6 @@ export type { Browser as WdioBrowser } from "webdriverio";
|
|
|
19
19
|
export type { Test } from "../test-reader/test-object/test";
|
|
20
20
|
export type { Suite } from "../test-reader/test-object/suite";
|
|
21
21
|
export type { TestFunctionCtx } from "../test-reader/test-object/types";
|
|
22
|
-
export type { AssertViewOpts } from "../browser/commands/types";
|
|
23
22
|
export interface RootSuite extends Suite {
|
|
24
23
|
root: true;
|
|
25
24
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/types/index.ts"],"names":[],"mappings":";;;
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/types/index.ts"],"names":[],"mappings":";;;AAwGA,IAAY,WAYX;AAZD,WAAY,WAAW;IACnB,yBAAU,CAAA;IACV,yBAAU,CAAA;IACV,0BAAW,CAAA;IACX,6BAAc,CAAA;IACd,+BAAgB,CAAA;IAChB,6BAAc,CAAA;IACd,kCAAmB,CAAA;IACnB,4BAAa,CAAA;IACb,6BAAc,CAAA;IACd,6BAAc,CAAA;IACd,wBAAS,CAAA;AACb,CAAC,EAZW,WAAW,2BAAX,WAAW,QAYtB"}
|
|
@@ -3,7 +3,7 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
|
3
3
|
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
4
|
};
|
|
5
5
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
-
exports.requireModule = void 0;
|
|
6
|
+
exports.requireModuleSync = exports.requireModule = void 0;
|
|
7
7
|
const path_1 = __importDefault(require("path"));
|
|
8
8
|
const fs_1 = require("./fs");
|
|
9
9
|
const requireModule = async (modulePath) => {
|
|
@@ -11,4 +11,8 @@ const requireModule = async (modulePath) => {
|
|
|
11
11
|
return require(isModuleLocal ? path_1.default.resolve(modulePath) : modulePath);
|
|
12
12
|
};
|
|
13
13
|
exports.requireModule = requireModule;
|
|
14
|
+
const requireModuleSync = (modulePath) => {
|
|
15
|
+
return require(modulePath);
|
|
16
|
+
};
|
|
17
|
+
exports.requireModuleSync = requireModuleSync;
|
|
14
18
|
//# sourceMappingURL=module.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"module.js","sourceRoot":"","sources":["../../../src/utils/module.ts"],"names":[],"mappings":";;;;;;AAAA,gDAAwB;AACxB,6BAA8B;AAEvB,MAAM,aAAa,GAAG,KAAK,EAAe,UAAkB,EAAc,EAAE;IAC/E,MAAM,aAAa,GAAG,MAAM,IAAA,WAAM,EAAC,UAAU,CAAC,CAAC;IAE/C,OAAO,OAAO,CAAC,aAAa,CAAC,CAAC,CAAC,cAAI,CAAC,OAAO,CAAC,UAAU,CAAC,CAAC,CAAC,CAAC,UAAU,CAAC,CAAC;AAC1E,CAAC,CAAC;AAJW,QAAA,aAAa,iBAIxB"}
|
|
1
|
+
{"version":3,"file":"module.js","sourceRoot":"","sources":["../../../src/utils/module.ts"],"names":[],"mappings":";;;;;;AAAA,gDAAwB;AACxB,6BAA8B;AAEvB,MAAM,aAAa,GAAG,KAAK,EAAe,UAAkB,EAAc,EAAE;IAC/E,MAAM,aAAa,GAAG,MAAM,IAAA,WAAM,EAAC,UAAU,CAAC,CAAC;IAE/C,OAAO,OAAO,CAAC,aAAa,CAAC,CAAC,CAAC,cAAI,CAAC,OAAO,CAAC,UAAU,CAAC,CAAC,CAAC,CAAC,UAAU,CAAC,CAAC;AAC1E,CAAC,CAAC;AAJW,QAAA,aAAa,iBAIxB;AAEK,MAAM,iBAAiB,GAAG,CAAC,UAAkB,EAAW,EAAE;IAC7D,OAAO,OAAO,CAAC,UAAU,CAAC,CAAC;AAC/B,CAAC,CAAC;AAFW,QAAA,iBAAiB,qBAE5B"}
|