Skip to content

A platform for community discussion. Free, open, simple.

DEV: add more information about failed smoke test

Sam441a52ad17f9
diff --git a/test/smoke_test.js b/test/smoke_test.js
index f166bca4084..391a3242e96 100644
--- a/test/smoke_test.js
+++ b/test/smoke_test.js
@@ -14,8 +14,8 @@ const path = require('path');
(async () => {
const browser = await puppeteer.launch({
- // headless: false,
- // slowMo: 10,
+ // when debugging localy setting headless to "false" can be very helpful
+ headless: true,
args: ["--disable-local-storage"]
});
const page = await browser.newPage();
@@ -53,6 +53,16 @@ const path = require('path');
page.on('console', msg => console.log(`PAGE LOG: ${msg.text}`));
+ page.setRequestInterception(true);
+
+ page.on('request', req => { return req.continue(); });
+ page.on('response', resp => {
+ if (resp.status !== 200) {
+ console.log("FAILED HTTP REQUEST TO " + resp.url + " Status is: " + resp.status);
+ }
+ return resp;
+ });
+
if (process.env.AUTH_USER && process.env.AUTH_PASSWORD) {
await exec("basic authentication", () => {
return page.setExtraHTTPHeaders({