mirror of
https://github.com/alexadam/save-as-ebook.git
synced 2025-09-11 01:44:44 +00:00
update tests
This commit is contained in:
parent
8abb752520
commit
c39c62b8ec
3 changed files with 3 additions and 1 deletions
|
@ -26,7 +26,7 @@ puppeteer.launch({
|
||||||
|
|
||||||
async function runLocalFullPageTests(browser) {
|
async function runLocalFullPageTests(browser) {
|
||||||
|
|
||||||
const testedFileName = 'canvas' //'svg' //'special-chars' // 'p2' //'p1'
|
const testedFileName = 'mathjax' //'canvas' //'svg' //'special-chars' // 'p2' //'p1'
|
||||||
|
|
||||||
const testUrl = 'file://'+__dirname+'/pages/'+testedFileName+'/page/index.html'
|
const testUrl = 'file://'+__dirname+'/pages/'+testedFileName+'/page/index.html'
|
||||||
const resultDownloadPath = './pages/'+testedFileName+'/' + TEST_RESULT_EBOOK_PATH
|
const resultDownloadPath = './pages/'+testedFileName+'/' + TEST_RESULT_EBOOK_PATH
|
||||||
|
|
BIN
tests/pages.zip
BIN
tests/pages.zip
Binary file not shown.
|
@ -71,6 +71,7 @@ function formatPreCodeElements($jQueryElement) {
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// tested
|
||||||
function extractMathMl($htmlObject) {
|
function extractMathMl($htmlObject) {
|
||||||
$htmlObject.find('span[id^="MathJax-Element-"]').each(function (i, el) {
|
$htmlObject.find('span[id^="MathJax-Element-"]').each(function (i, el) {
|
||||||
$(el).replaceWith('<span>' + el.getAttribute('data-mathml') + '</span>');
|
$(el).replaceWith('<span>' + el.getAttribute('data-mathml') + '</span>');
|
||||||
|
@ -78,6 +79,7 @@ function extractMathMl($htmlObject) {
|
||||||
}
|
}
|
||||||
|
|
||||||
// tested
|
// tested
|
||||||
|
// TODO
|
||||||
function extractCanvasToImg($htmlObject) {
|
function extractCanvasToImg($htmlObject) {
|
||||||
$htmlObject.find('canvas').each(function (index, elem) {
|
$htmlObject.find('canvas').each(function (index, elem) {
|
||||||
var tmpXP = getXPath(elem);
|
var tmpXP = getXPath(elem);
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue