system-testing 1.0.8 → 1.0.10

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
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "system-testing",
3
- "version": "1.0.8",
3
+ "version": "1.0.10",
4
4
  "description": "System testing with Selenium and browsers.",
5
5
  "keywords": [
6
6
  "system",
@@ -44,7 +44,7 @@ export default class SystemTestBrowserHelper {
44
44
  errorClass: "UnhandledRejection",
45
45
  file: null,
46
46
  line: null,
47
- message: event.reason.message || "Unhandled promise rejection",
47
+ message: event.reason.message || event.reason || "Unhandled promise rejection without a message",
48
48
  url: window.location.href
49
49
  })
50
50
  })
@@ -326,12 +326,16 @@ export default class SystemTest {
326
326
  const now = new Date()
327
327
  const screenshotPath = `${path}/${moment(now).format("YYYY-MM-DD-HH-MM-SS")}.png`
328
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()
329
331
  const html = await this.getHTML()
330
332
  const htmlPretty = prettify(html)
331
333
 
332
- await fs.writeFile(screenshotPath, imageContent, "base64")
333
334
  await fs.writeFile(htmlPath, htmlPretty)
335
+ await fs.writeFile(logsPath, logsText.join("\n"))
336
+ await fs.writeFile(screenshotPath, imageContent, "base64")
334
337
 
338
+ console.log("Logs:", logsPath)
335
339
  console.log("Screenshot:", screenshotPath)
336
340
  console.log("HTML:", htmlPath)
337
341
  }