Skip to content

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

Re-introduce ability to handle basic authentication in smoke tests.

Guo Xiang Tanaf1e2865f725
diff --git a/test/smoke_test.js b/test/smoke_test.js
index 58ced5bb5fe..282a3e9c250 100644
--- a/test/smoke_test.js
+++ b/test/smoke_test.js
@@ -53,6 +53,15 @@ const path = require('path');
page.on('console', msg => console.log(`PAGE LOG: ${msg.text}`));
+ if (process.env.AUTH_USER && process.env.AUTH_PASSWORD) {
+ await exec("basic authentication", () => {
+ return page.authenticate({
+ username: process.env.AUTH_USER,
+ password: process.env.AUTH_PASSWORD
+ });
+ });
+ }
+
await exec("go to site", () => {
return page.goto(url);
});