cocos2d-cli 2.2.0 → 2.2.1
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.
|
@@ -188,9 +188,13 @@ export async function takeScreenshot(userConfig = {}) {
|
|
|
188
188
|
addLog('requestfailed', request.url(), { error: errorText });
|
|
189
189
|
});
|
|
190
190
|
addLog('info', 'Loading Page');
|
|
191
|
-
const
|
|
192
|
-
|
|
193
|
-
|
|
191
|
+
const baseUrl = `${serverUrl}/index.html`;
|
|
192
|
+
const searchParams = new URLSearchParams();
|
|
193
|
+
searchParams.set('width', config.viewport.width.toString());
|
|
194
|
+
if (config.debugBounds) {
|
|
195
|
+
searchParams.set('debugBounds', 'true');
|
|
196
|
+
}
|
|
197
|
+
const pageUrl = `${baseUrl}?${searchParams.toString()}`;
|
|
194
198
|
await page.goto(pageUrl, {
|
|
195
199
|
waitUntil: 'networkidle',
|
|
196
200
|
timeout: config.timeout
|