mirror of https://github.com/keeweb/keeweb.git
Merge pull request #2143 from Aetherinox/dev
fix: specify puppeteer argument to fix test builds for ci
This commit is contained in:
commit
a33f1e0ba1
|
@ -3,21 +3,19 @@ module.exports = function (grunt) {
|
||||||
const done = this.async();
|
const done = this.async();
|
||||||
const opt = this.options();
|
const opt = this.options();
|
||||||
const file = this.files[0].src[0];
|
const file = this.files[0].src[0];
|
||||||
|
|
||||||
const path = require('path');
|
const path = require('path');
|
||||||
const puppeteer = require('puppeteer');
|
const puppeteer = require('puppeteer');
|
||||||
|
|
||||||
(async function () {
|
(async function () {
|
||||||
grunt.log.writeln('Running tests...');
|
grunt.log.writeln('Running tests...');
|
||||||
|
|
||||||
const fullPath = 'file://' + path.resolve(file);
|
const fullPath = 'file://' + path.resolve(file);
|
||||||
|
|
||||||
const browser = await puppeteer.launch({
|
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();
|
const page = await browser.newPage();
|
||||||
await page.goto(fullPath);
|
await page.goto(fullPath);
|
||||||
|
|
||||||
async function check() {
|
async function check() {
|
||||||
const result = await page.evaluate(() => {
|
const result = await page.evaluate(() => {
|
||||||
const { output, done } = window;
|
const { output, done } = window;
|
||||||
|
|
File diff suppressed because it is too large
Load Diff
|
@ -110,6 +110,7 @@
|
||||||
},
|
},
|
||||||
"scripts": {
|
"scripts": {
|
||||||
"start": "grunt",
|
"start": "grunt",
|
||||||
|
"lint": "grunt eslint",
|
||||||
"test": "grunt test",
|
"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",
|
"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",
|
"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",
|
||||||
|
|
Loading…
Reference in New Issue