update tests

This commit is contained in:
Alex Adam 2020-02-20 15:12:45 +02:00
parent 278f42d4c7
commit 8abb752520
6 changed files with 4 additions and 2 deletions

BIN
.DS_Store vendored

Binary file not shown.

BIN
tests/.DS_Store vendored

Binary file not shown.

View file

@ -1,7 +1,7 @@
const puppeteer = require('puppeteer');
const fs = require('fs')
const CRX_PATH = '../../web-extension';
const CRX_PATH = '../web-extension';
const REFERENCE_EBOOK_PATH = 'reference-ebook'
const TEST_RESULT_EBOOK_PATH = 'test-result-ebook'
const TEST_EBOOK_FILE_NAME = 'test.epub'
@ -26,7 +26,7 @@ puppeteer.launch({
async function runLocalFullPageTests(browser) {
const testedFileName = 'svg' //'special-chars' // 'p2' //'p1'
const testedFileName = 'canvas' //'svg' //'special-chars' // 'p2' //'p1'
const testUrl = 'file://'+__dirname+'/pages/'+testedFileName+'/page/index.html'
const resultDownloadPath = './pages/'+testedFileName+'/' + TEST_RESULT_EBOOK_PATH

Binary file not shown.

Binary file not shown.

View file

@ -77,6 +77,7 @@ function extractMathMl($htmlObject) {
});
}
// tested
function extractCanvasToImg($htmlObject) {
$htmlObject.find('canvas').each(function (index, elem) {
var tmpXP = getXPath(elem);
@ -87,6 +88,7 @@ function extractCanvasToImg($htmlObject) {
});
}
// tested
function extractSvgToImg($htmlObject) {
var serializer = new XMLSerializer();
$htmlObject.find('svg').each(function (index, elem) {