@applitools/visual-grid-cli-utils 1.21.21 → 1.21.22
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/package.json
CHANGED
|
@@ -12,13 +12,14 @@ async function waitForRendering(vgUrl, renderId, authToken, waitTimeout = 10 * 6
|
|
|
12
12
|
`failed to get rendering status. Error from Visual Grid: ${await response.text()}`,
|
|
13
13
|
)
|
|
14
14
|
}
|
|
15
|
-
const {status, error, imageLocation, domLocation, selectorRegions} =
|
|
15
|
+
const {status, error, imageLocation, domLocation, selectorRegions, fullPageSize} =
|
|
16
|
+
await response.json()
|
|
16
17
|
if (status === 'error') {
|
|
17
18
|
return [error]
|
|
18
19
|
} else if (status === 'rendering') {
|
|
19
20
|
throw new Error(``)
|
|
20
21
|
} else {
|
|
21
|
-
return [undefined, imageLocation, domLocation, selectorRegions]
|
|
22
|
+
return [undefined, imageLocation, domLocation, selectorRegions, fullPageSize]
|
|
22
23
|
}
|
|
23
24
|
},
|
|
24
25
|
{
|
package/src/rerender.js
CHANGED
|
@@ -40,6 +40,7 @@ async function main({
|
|
|
40
40
|
rca,
|
|
41
41
|
native,
|
|
42
42
|
viewRendering,
|
|
43
|
+
includeFullPageSize,
|
|
43
44
|
canary,
|
|
44
45
|
iosVersion,
|
|
45
46
|
timeout,
|
|
@@ -103,6 +104,7 @@ async function main({
|
|
|
103
104
|
? normalizeSelectorsToFindRegionsForArray(selectorsToFindRegionsFor)
|
|
104
105
|
: undefined,
|
|
105
106
|
enableMultipleResultsPerSelector: true,
|
|
107
|
+
includeFullPageSize,
|
|
106
108
|
sendDom: rca,
|
|
107
109
|
agentId: `visual-grid-cli-utils/${require('../package.json').version}`,
|
|
108
110
|
// browser: {
|
|
@@ -128,7 +130,7 @@ async function main({
|
|
|
128
130
|
|
|
129
131
|
const {renderId: reRenderId} = await response.json()
|
|
130
132
|
|
|
131
|
-
const [err, imageLocation, domLocation, selectorRegions] = await waitForRendering(
|
|
133
|
+
const [err, imageLocation, domLocation, selectorRegions, fullPageSize] = await waitForRendering(
|
|
132
134
|
vgUrl,
|
|
133
135
|
reRenderId,
|
|
134
136
|
authToken,
|
|
@@ -180,6 +182,13 @@ async function main({
|
|
|
180
182
|
console.log('\n' + calculateViewRenderingUrl(renderId, authToken))
|
|
181
183
|
}
|
|
182
184
|
|
|
185
|
+
if (includeFullPageSize) {
|
|
186
|
+
console.log('-----')
|
|
187
|
+
console.log(`Full page size:`)
|
|
188
|
+
console.log(JSON.stringify(fullPageSize, null, 2))
|
|
189
|
+
console.log('-----')
|
|
190
|
+
}
|
|
191
|
+
|
|
183
192
|
return {reRenderId}
|
|
184
193
|
}
|
|
185
194
|
|
|
@@ -224,6 +224,12 @@ async function main(argv, {shouldExitOnError = false} = {}) {
|
|
|
224
224
|
type: 'boolean',
|
|
225
225
|
default: false,
|
|
226
226
|
})
|
|
227
|
+
.option('includeFullPageSize', {
|
|
228
|
+
alias: 'f',
|
|
229
|
+
describe: 'output the full page size after rendering',
|
|
230
|
+
type: 'boolean',
|
|
231
|
+
default: false,
|
|
232
|
+
})
|
|
227
233
|
.option('timeout', {
|
|
228
234
|
alias: 't',
|
|
229
235
|
describe: 'Timeout for operation (ms)',
|