system-testing 1.0.7 → 1.0.9
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 +1 -1
- package/src/system-test.js +5 -1
package/package.json
CHANGED
package/src/system-test.js
CHANGED
|
@@ -180,6 +180,7 @@ export default class SystemTest {
|
|
|
180
180
|
.setCapability("goog:loggingPrefs", {browser: "ALL"})
|
|
181
181
|
.build()
|
|
182
182
|
|
|
183
|
+
await this.setTimeouts(20000)
|
|
183
184
|
await this.driver.manage().setTimeouts({implicit: 20000, pageLoad: 20000, script: 20000})
|
|
184
185
|
|
|
185
186
|
// Web socket server to communicate with browser
|
|
@@ -325,11 +326,14 @@ export default class SystemTest {
|
|
|
325
326
|
const now = new Date()
|
|
326
327
|
const screenshotPath = `${path}/${moment(now).format("YYYY-MM-DD-HH-MM-SS")}.png`
|
|
327
328
|
const htmlPath = `${path}/${moment(now).format("YYYY-MM-DD-HH-MM-SS")}.html`
|
|
329
|
+
const logsPath = `${path}/${moment(now).format("YYYY-MM-DD-HH-MM-SS")}.logs.txt`
|
|
330
|
+
const logsText = await this.getBrowserLogs()
|
|
328
331
|
const html = await this.getHTML()
|
|
329
332
|
const htmlPretty = prettify(html)
|
|
330
333
|
|
|
331
|
-
await fs.writeFile(screenshotPath, imageContent, "base64")
|
|
332
334
|
await fs.writeFile(htmlPath, htmlPretty)
|
|
335
|
+
await fs.writeFile(logsPath, logsText.join("\n"))
|
|
336
|
+
await fs.writeFile(screenshotPath, imageContent, "base64")
|
|
333
337
|
|
|
334
338
|
console.log("Screenshot:", screenshotPath)
|
|
335
339
|
console.log("HTML:", htmlPath)
|