Merge pull request #2143 from Aetherinox/dev

fix: specify puppeteer argument to fix test builds for ci
This commit is contained in:
Aetherinox 2024-04-04 13:47:35 -07:00 committed by GitHub
commit a33f1e0ba1
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
3 changed files with 438 additions and 210 deletions

View File

@ -3,21 +3,19 @@ module.exports = function (grunt) {
const done = this.async();
const opt = this.options();
const file = this.files[0].src[0];
const path = require('path');
const puppeteer = require('puppeteer');
(async function () {
grunt.log.writeln('Running tests...');
const fullPath = 'file://' + path.resolve(file);
const browser = await puppeteer.launch({
headless: opt.headless
headless: opt.headless,
executablePath: process.env.CHROME_BIN || null,
args: ['--disable-dev-shm-usage']
});
grunt.log.writeln('puppeteer launched...');
const page = await browser.newPage();
await page.goto(fullPath);
async function check() {
const result = await page.evaluate(() => {
const { output, done } = window;

637
package-lock.json generated

File diff suppressed because it is too large Load Diff

View File

@ -110,6 +110,7 @@
},
"scripts": {
"start": "grunt",
"lint": "grunt eslint",
"test": "grunt test",
"build-beta": "grunt --beta && cp dist/index.html ../keeweb-beta/index.html && cd ../keeweb-beta && git add index.html && git commit -a -m 'beta' && git push origin master",
"electron": "cross-env KEEWEB_IS_PORTABLE=0 ELECTRON_DISABLE_SECURITY_WARNINGS=1 KEEWEB_EMULATE_HARDWARE_ENCRYPTION=persistent KEEWEB_HTML_PATH=http://localhost:8085 electron desktop --no-sandbox",