fix tests

master
JFH 2021-03-09 22:54:05 +01:00
parent 24041ab073
commit 811dc5ae5b
6 changed files with 24284 additions and 2666 deletions

19
.github/worflows/onpush.yml vendored Normal file
View File

@ -0,0 +1,19 @@
name: Node CI
on: [push]
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Use Node.js
uses: actions/setup-node@v2
with:
node-version: 14.x
- name: npm install, test and lint
run: |
npm ci
npm run lint

View File

@ -1 +1 @@
<svg xmlns="http://www.w3.org/2000/svg" width="410" height="20"><defs><style>text{font-size:11px;font-family:Verdana,DejaVu Sans,Geneva,sans-serif}text.shadow{fill:#010101;fill-opacity:.3}text.high{fill:#fff}</style><linearGradient id="smooth" x2="0" y2="100%"><stop offset="0" stop-color="#aaa" stop-opacity=".1"/><stop offset="1" stop-opacity=".1"/></linearGradient><mask id="round"><rect width="100%" height="100%" rx="3" fill="#fff"/></mask></defs><g id="bg" mask="url(#round)"><path fill="green" stroke="#000" d="M0 0h120v20H0zM120 0h109v20H120zM229 0h87v20h-87zM316 0h94v20h-94z"/><path fill="url(#smooth)" d="M0 0h410v20H0z"/></g><g id="fg"><text class="shadow" x="5.5" y="15">Statements 47.25%</text><text class="high" x="5" y="14">Statements 47.25%</text><text class="shadow" x="125.5" y="15">Branches 34.84%</text><text class="high" x="125" y="14">Branches 34.84%</text><text class="shadow" x="234.5" y="15">Lines 48.23%</text><text class="high" x="234" y="14">Lines 48.23%</text><text class="shadow" x="321.5" y="15">Functions 54%</text><text class="high" x="321" y="14">Functions 54%</text></g></svg>
<svg xmlns="http://www.w3.org/2000/svg" width="428" height="20"><defs><style>text{font-size:11px;font-family:Verdana,DejaVu Sans,Geneva,sans-serif}text.shadow{fill:#010101;fill-opacity:.3}text.high{fill:#fff}</style><linearGradient id="smooth" x2="0" y2="100%"><stop offset="0" stop-color="#aaa" stop-opacity=".1"/><stop offset="1" stop-opacity=".1"/></linearGradient><mask id="round"><rect width="100%" height="100%" rx="3" fill="#fff"/></mask></defs><g id="bg" mask="url(#round)"><path fill="green" stroke="#000" d="M0 0h120v20H0zM120 0h109v20H120zM229 0h87v20h-87zM316 0h112v20H316z"/><path fill="url(#smooth)" d="M0 0h428v20H0z"/></g><g id="fg"><text class="shadow" x="5.5" y="15">Statements 46.79%</text><text class="high" x="5" y="14">Statements 46.79%</text><text class="shadow" x="125.5" y="15">Branches 35.04%</text><text class="high" x="125" y="14">Branches 35.04%</text><text class="shadow" x="234.5" y="15">Lines 47.66%</text><text class="high" x="234" y="14">Lines 47.66%</text><text class="shadow" x="321.5" y="15">Functions 54.01%</text><text class="high" x="321" y="14">Functions 54.01%</text></g></svg>

Before

Width:  |  Height:  |  Size: 1.1 KiB

After

Width:  |  Height:  |  Size: 1.1 KiB

View File

@ -514,7 +514,7 @@ exports[`use various parts of svg-edit > check tool_star #0`] = `
</text>
<polygon
cx="407"
cy="60"
cy="45"
id="svg_3"
shape="star"
point="5"
@ -525,7 +525,7 @@ exports[`use various parts of svg-edit > check tool_star #0`] = `
fill="#000000"
strokecolor="#000000"
strokeWidth="0"
points="407,46.666666666666664 410.1348546788932,55.68524269666695 419.68075355060205,55.87977340833403 412.0723014202408,61.64809063666639 414.83713669723295,70.78689325833264 407,65.33333333333333 399.16286330276705,70.78689325833264 401.9276985797592,61.64809063666639 394.31924644939795,55.87977340833404 403.8651453211068,55.68524269666695 407,46.666666666666664 410.1348546788932,55.68524269666695 "
points="407,31.666666666666664 410.1348546788932,40.68524269666695 419.68075355060205,40.87977340833403 412.0723014202408,46.64809063666639 414.83713669723295,55.78689325833263 407,50.333333333333336 399.16286330276705,55.78689325833263 401.9276985797592,46.64809063666639 394.31924644939795,40.87977340833404 403.8651453211068,40.68524269666695 407,31.666666666666664 410.1348546788932,40.68524269666695 "
stroke="#000000"
stroke-width="0"
>
@ -605,7 +605,7 @@ exports[`use various parts of svg-edit > check tool_polygon #0`] = `
</text>
<polygon
cx="407"
cy="60"
cy="45"
id="svg_3"
shape="star"
point="5"
@ -616,7 +616,7 @@ exports[`use various parts of svg-edit > check tool_polygon #0`] = `
fill="#000000"
strokecolor="#000000"
strokeWidth="0"
points="407,46.666666666666664 410.1348546788932,55.68524269666695 419.68075355060205,55.87977340833403 412.0723014202408,61.64809063666639 414.83713669723295,70.78689325833264 407,65.33333333333333 399.16286330276705,70.78689325833264 401.9276985797592,61.64809063666639 394.31924644939795,55.87977340833404 403.8651453211068,55.68524269666695 407,46.666666666666664 410.1348546788932,55.68524269666695 "
points="407,31.666666666666664 410.1348546788932,40.68524269666695 419.68075355060205,40.87977340833403 412.0723014202408,46.64809063666639 414.83713669723295,55.78689325833263 407,50.333333333333336 399.16286330276705,55.78689325833263 401.9276985797592,46.64809063666639 394.31924644939795,40.87977340833404 403.8651453211068,40.68524269666695 407,31.666666666666664 410.1348546788932,40.68524269666695 "
stroke="#000000"
stroke-width="0"
style="pointer-events:inherit"
@ -625,7 +625,7 @@ exports[`use various parts of svg-edit > check tool_polygon #0`] = `
></polygon>
<polygon
cx="457"
cy="110"
cy="95"
id="svg_4"
shape="regularPoly"
sides="5"
@ -634,7 +634,7 @@ exports[`use various parts of svg-edit > check tool_polygon #0`] = `
fill="#000000"
strokecolor="#000000"
strokeWidth="5"
points="462.6710053890136,110 458.7524370403971,115.39344662916632 452.4120602650961,113.33333333333333 452.4120602650961,106.66666666666667 458.7524370403971,104.60655337083368 462.6710053890136,110 "
points="462.6710053890136,95 458.7524370403971,100.39344662916632 452.4120602650961,98.33333333333333 452.4120602650961,91.66666666666667 458.7524370403971,89.60655337083368 462.6710053890136,95 "
stroke="#000000"
stroke-width="5"
>
@ -713,7 +713,7 @@ exports[`use various parts of svg-edit > check tool_text_anchor_start #0`] = `
</text>
<polygon
cx="407"
cy="60"
cy="45"
id="svg_3"
shape="star"
point="5"
@ -724,7 +724,7 @@ exports[`use various parts of svg-edit > check tool_text_anchor_start #0`] = `
fill="#000000"
strokecolor="#000000"
strokewidth="0"
points="407,46.666666666666664 410.1348546788932,55.68524269666695 419.68075355060205,55.87977340833403 412.0723014202408,61.64809063666639 414.83713669723295,70.78689325833264 407,65.33333333333333 399.16286330276705,70.78689325833264 401.9276985797592,61.64809063666639 394.31924644939795,55.87977340833404 403.8651453211068,55.68524269666695 407,46.666666666666664 410.1348546788932,55.68524269666695 "
points="407,31.666666666666664 410.1348546788932,40.68524269666695 419.68075355060205,40.87977340833403 412.0723014202408,46.64809063666639 414.83713669723295,55.78689325833263 407,50.333333333333336 399.16286330276705,55.78689325833263 401.9276985797592,46.64809063666639 394.31924644939795,40.87977340833404 403.8651453211068,40.68524269666695 407,31.666666666666664 410.1348546788932,40.68524269666695 "
stroke="#000000"
stroke-width="0"
fill-opacity="1"
@ -732,7 +732,7 @@ exports[`use various parts of svg-edit > check tool_text_anchor_start #0`] = `
></polygon>
<polygon
cx="457"
cy="110"
cy="95"
id="svg_4"
shape="regularPoly"
sides="5"
@ -741,7 +741,7 @@ exports[`use various parts of svg-edit > check tool_text_anchor_start #0`] = `
fill="#000000"
strokecolor="#000000"
strokewidth="5"
points="462.6710053890136,110 458.7524370403971,115.39344662916632 452.4120602650961,113.33333333333333 452.4120602650961,106.66666666666667 458.7524370403971,104.60655337083368 462.6710053890136,110 "
points="462.6710053890136,95 458.7524370403971,100.39344662916632 452.4120602650961,98.33333333333333 452.4120602650961,91.66666666666667 458.7524370403971,89.60655337083368 462.6710053890136,95 "
stroke="#000000"
stroke-width="5"
fill-opacity="1"
@ -834,7 +834,7 @@ exports[`use various parts of svg-edit > check tool_text_anchor_middle #0`] = `
</text>
<polygon
cx="407"
cy="60"
cy="45"
id="svg_3"
shape="star"
point="5"
@ -845,7 +845,7 @@ exports[`use various parts of svg-edit > check tool_text_anchor_middle #0`] = `
fill="#000000"
strokecolor="#000000"
strokewidth="0"
points="407,46.666666666666664 410.1348546788932,55.68524269666695 419.68075355060205,55.87977340833403 412.0723014202408,61.64809063666639 414.83713669723295,70.78689325833264 407,65.33333333333333 399.16286330276705,70.78689325833264 401.9276985797592,61.64809063666639 394.31924644939795,55.87977340833404 403.8651453211068,55.68524269666695 407,46.666666666666664 410.1348546788932,55.68524269666695 "
points="407,31.666666666666664 410.1348546788932,40.68524269666695 419.68075355060205,40.87977340833403 412.0723014202408,46.64809063666639 414.83713669723295,55.78689325833263 407,50.333333333333336 399.16286330276705,55.78689325833263 401.9276985797592,46.64809063666639 394.31924644939795,40.87977340833404 403.8651453211068,40.68524269666695 407,31.666666666666664 410.1348546788932,40.68524269666695 "
stroke="#000000"
stroke-width="0"
fill-opacity="1"
@ -853,7 +853,7 @@ exports[`use various parts of svg-edit > check tool_text_anchor_middle #0`] = `
></polygon>
<polygon
cx="457"
cy="110"
cy="95"
id="svg_4"
shape="regularPoly"
sides="5"
@ -862,7 +862,7 @@ exports[`use various parts of svg-edit > check tool_text_anchor_middle #0`] = `
fill="#000000"
strokecolor="#000000"
strokewidth="5"
points="462.6710053890136,110 458.7524370403971,115.39344662916632 452.4120602650961,113.33333333333333 452.4120602650961,106.66666666666667 458.7524370403971,104.60655337083368 462.6710053890136,110 "
points="462.6710053890136,95 458.7524370403971,100.39344662916632 452.4120602650961,98.33333333333333 452.4120602650961,91.66666666666667 458.7524370403971,89.60655337083368 462.6710053890136,95 "
stroke="#000000"
stroke-width="5"
fill-opacity="1"
@ -970,7 +970,7 @@ exports[`use various parts of svg-edit > check tool_text_anchor_end #0`] = `
</text>
<polygon
cx="407"
cy="60"
cy="45"
id="svg_3"
shape="star"
point="5"
@ -981,7 +981,7 @@ exports[`use various parts of svg-edit > check tool_text_anchor_end #0`] = `
fill="#000000"
strokecolor="#000000"
strokewidth="0"
points="407,46.666666666666664 410.1348546788932,55.68524269666695 419.68075355060205,55.87977340833403 412.0723014202408,61.64809063666639 414.83713669723295,70.78689325833264 407,65.33333333333333 399.16286330276705,70.78689325833264 401.9276985797592,61.64809063666639 394.31924644939795,55.87977340833404 403.8651453211068,55.68524269666695 407,46.666666666666664 410.1348546788932,55.68524269666695 "
points="407,31.666666666666664 410.1348546788932,40.68524269666695 419.68075355060205,40.87977340833403 412.0723014202408,46.64809063666639 414.83713669723295,55.78689325833263 407,50.333333333333336 399.16286330276705,55.78689325833263 401.9276985797592,46.64809063666639 394.31924644939795,40.87977340833404 403.8651453211068,40.68524269666695 407,31.666666666666664 410.1348546788932,40.68524269666695 "
stroke="#000000"
stroke-width="0"
fill-opacity="1"
@ -989,7 +989,7 @@ exports[`use various parts of svg-edit > check tool_text_anchor_end #0`] = `
></polygon>
<polygon
cx="457"
cy="110"
cy="95"
id="svg_4"
shape="regularPoly"
sides="5"
@ -998,7 +998,7 @@ exports[`use various parts of svg-edit > check tool_text_anchor_end #0`] = `
fill="#000000"
strokecolor="#000000"
strokewidth="5"
points="462.6710053890136,110 458.7524370403971,115.39344662916632 452.4120602650961,113.33333333333333 452.4120602650961,106.66666666666667 458.7524370403971,104.60655337083368 462.6710053890136,110 "
points="462.6710053890136,95 458.7524370403971,100.39344662916632 452.4120602650961,98.33333333333333 452.4120602650961,91.66666666666667 458.7524370403971,89.60655337083368 462.6710053890136,95 "
stroke="#000000"
stroke-width="5"
fill-opacity="1"

View File

@ -1,6 +1,5 @@
/* eslint-disable max-len */
import '../../../instrumented/editor/jquery.min.js';
import '../../../instrumented/editor/jquery-ui/jquery-ui-1.8.17.custom.min.js';
import SvgCanvas from '../../../instrumented/svgcanvas/svgcanvas.js';

26827
package-lock.json generated

File diff suppressed because it is too large Load Diff

View File

@ -14,7 +14,6 @@
},
"scripts": {
"lint": "eslint --ext js,html,md .",
"lint-arg": "eslint --ext js,html,md",
"test": "run-s cypress:instrument test-only",
"build": "rollup -c",
"build:watch": "rollup -c --watch",
@ -50,9 +49,6 @@
"open-cov": "run-p start open-cov-no-start",
"report": "run-s report-no-mochawesome mochawesome-cli",
"report-summary": "run-s report-text-summary mochawesome-cli-dot",
"license-badge": "license-badger --corrections --uncategorizedLicenseTemplate \"\\${license} (\\${name} (\\${version}))\" --filteredTypes=nonempty --textTemplate \"License types\n(project, deps, and bundled devDeps)\" --packageJson --production badges/licenses-badge.svg",
"license-badge-dev": "license-badger --corrections --filteredTypes=nonempty --textTemplate \"License types\n(all devDeps)\" --allDevelopment badges/licenses-badge-dev.svg",
"license-badges": "run-s license-badge license-badge-dev",
"coverage-badge": "coveradge badges/coverage-badge",
"imageoptim": "imageoptim",
"compress-images": "imageoptim \"src/editor/extensions/*.png\" \"src/editor/spinbtn/*.png\" \"src/editor/jgraduate/images/*.{png,gif}\" \"src/editor/images/*.png\"",
@ -75,31 +71,6 @@
"test-no-cov": "run-s prep test-only",
"test-no-core-rollup": "run-s eslint cypress:instrument test-no-cov-no-core-rollup"
},
"lint-staged": {
".eslintignore": "npm run lint",
".eslintrc.js": "npm run lint",
"src/**/*.{js,md,html}": "npm run lint-arg --",
"src/editor/images/*.png": "npm run imageoptim --"
},
"run-if-changed": {
"src": "npm run prep-no-eslint",
".babelrc.json": "npm run prep-no-eslint",
"rollup.config.js": "npm run prep-no-eslint",
"rollup-config.config.js": "npm run prep-no-eslint",
"build": "npm run build-html",
"docs": "npm run build-docs",
"licenseInfo.json": "npm run license-badges",
"package-lock.json": "run-s install-offline license-badges copy prep-no-eslint build-docs"
},
"husky": {
"hooks": {
"post-commit": "run-if-changed",
"post-checkout": "run-if-changed",
"post-merge": "run-if-changed",
"post-rewrite": "run-if-changed",
"pre-commit": "lint-staged"
}
},
"repository": {
"type": "git",
"url": "git+https://github.com/SVG-Edit/svgedit.git"
@ -138,19 +109,19 @@
"@babel/polyfill": "7.12.1",
"@web/dev-server-rollup": "0.3.2",
"canvg": "3.0.7",
"core-js": "3.9.0",
"core-js": "3.9.1",
"elix": "^15.0.0",
"jspdf": "2.3.0",
"jspdf": "2.3.1",
"pathseg": "1.2.0",
"regenerator-runtime": "0.13.7",
"rollup-plugin-polyfill-node": "^0.5.0",
"rollup-plugin-polyfill-node": "^0.6.1",
"svg2pdf.js": "2.1.0"
},
"devDependencies": {
"@babel/core": "7.13.1",
"@babel/preset-env": "7.13.5",
"@babel/register": "7.13.0",
"@babel/runtime-corejs3": "7.13.6",
"@babel/core": "7.13.10",
"@babel/preset-env": "7.13.10",
"@babel/register": "7.13.8",
"@babel/runtime-corejs3": "7.13.10",
"@cypress/code-coverage": "3.9.2",
"@cypress/fiddle": "1.19.2",
"@fintechstudios/eslint-plugin-chai-as-promised": "3.0.2",
@ -163,19 +134,19 @@
"@rollup/plugin-replace": "2.4.1",
"@rollup/plugin-url": "6.0.0",
"@web/dev-server": "^0.1.8",
"axe-core": "4.1.2",
"axe-core": "4.1.3",
"babel-plugin-transform-object-rest-spread": "7.0.0-beta.3",
"copyfiles": "2.4.1",
"core-js-bundle": "3.9.0",
"core-js-bundle": "3.9.1",
"coveradge": "0.6.0",
"cp-cli": "2.0.0",
"cross-var": "1.1.0",
"cypress": "6.5.0",
"cypress": "6.6.0",
"cypress-axe": "0.12.2",
"cypress-multi-reporters": "1.4.0",
"cypress-plugin-snapshots": "1.4.4",
"deparam": "git+https://github.com/brettz9/deparam.git#updates",
"eslint": "^7.20.0",
"eslint": "^7.21.0",
"eslint-config-standard": "16.0.2",
"eslint-plugin-array-func": "3.1.7",
"eslint-plugin-chai-expect": "2.2.0",
@ -184,11 +155,11 @@
"eslint-plugin-compat": "^3.9.0",
"eslint-plugin-cypress": "2.11.2",
"eslint-plugin-eslint-comments": "3.2.0",
"eslint-plugin-html": "^6.1.1",
"eslint-plugin-html": "^6.1.2",
"eslint-plugin-import": "^2.22.1",
"eslint-plugin-jsdoc": "^32.2.0",
"eslint-plugin-markdown": "^2.0.0",
"eslint-plugin-mocha": "8.0.0",
"eslint-plugin-mocha": "8.1.0",
"eslint-plugin-mocha-cleanup": "1.9.1",
"eslint-plugin-no-unsanitized": "^3.1.4",
"eslint-plugin-no-use-extend-native": "0.5.0",
@ -197,12 +168,10 @@
"eslint-plugin-sonarjs": "^0.6.0",
"eslint-plugin-standard": "4.1.0",
"eslint-plugin-unicorn": "28.0.2",
"husky": "5.1.1",
"imageoptim-cli": "3.0.2",
"jamilih": "0.54.0",
"jsdoc": "3.6.6",
"lint-staged": "10.5.4",
"mocha": "8.3.0",
"mocha": "8.3.1",
"mocha-badge-generator": "0.9.0",
"mochawesome": "6.2.2",
"mochawesome-merge": "4.2.0",
@ -218,16 +187,16 @@
"remark-lint-ordered-list-marker-value": "2.0.1",
"requirejs": "2.3.6",
"rimraf": "3.0.2",
"rollup": "2.39.1",
"rollup": "2.41.0",
"rollup-plugin-copy": "3.4.0",
"rollup-plugin-filesize": "9.1.0",
"rollup-plugin-filesize": "9.1.1",
"rollup-plugin-node-polyfills": "0.2.1",
"rollup-plugin-progress": "1.1.2",
"rollup-plugin-re": "1.0.7",
"rollup-plugin-terser": "7.0.2",
"stackblur-canvas": "2.5.0",
"systemjs": "6.8.3",
"typescript": "4.2.2",
"typescript": "4.2.3",
"underscore": "1.12.0"
}
}