mirror of
https://github.com/discourse/discourse.git
synced 2025-03-09 14:34:35 +00:00
Re-introduce ability to handle basic authentication in smoke tests.
This commit is contained in:
parent
73912ebc12
commit
af1e2865f7
@ -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);
|
||||
});
|
||||
|
Loading…
x
Reference in New Issue
Block a user