update master to V7

This commit is contained in:
JFH
2021-05-09 19:29:45 +02:00
parent 41fc05672d
commit 593c415664
1000 changed files with 47537 additions and 54304 deletions

View File

@@ -1,20 +1,20 @@
import '../../../instrumented/editor/jquery.min.js';
import {NS} from '../../../instrumented/common/namespaces.js';
import * as transformlist from '../../../instrumented/common/svgtransformlist.js';
import * as utilities from '../../../instrumented/common/utilities.js';
import * as transformlist from '../../../instrumented/svgcanvas/svgtransformlist.js';
import * as utilities from '../../../instrumented/svgcanvas/utilities.js';
import * as hstory from '../../../instrumented/svgcanvas/history.js';
describe('history', function () {
// TODO(codedread): Write tests for handling history events.
// Mocked out methods.
transformlist.changeRemoveElementFromListMap((elem) => { /* empty fn */ });
transformlist.changeRemoveElementFromListMap(() => { /* empty fn */ });
utilities.mock({
getHref (elem) { return '#foo'; },
setHref (elem, val) { /* empty fn */ },
getRotationAngle (elem) { return 0; }
getHref () { return '#foo'; },
setHref () { /* empty fn */ },
getRotationAngle () { return 0; }
});
// const svg = document.createElementNS(NS.SVG, 'svg');
@@ -452,7 +452,7 @@ describe('history', function () {
assert.equal(val, sethrefvalue);
justCalled = 'setHref';
},
getRotationAngle (elem) { return 0; }
getRotationAngle () { return 0; }
});
gethrefvalue = '#newhref';
@@ -488,7 +488,7 @@ describe('history', function () {
it('Test BatchCommand', function () {
let concatResult = '';
MockCommand.prototype.apply = function (handler) { concatResult += this.text; };
MockCommand.prototype.apply = function () { concatResult += this.text; };
const batch = new hstory.BatchCommand();
assert.ok(batch.unapply);