V7 preview 2 (#463)

* commit toward svgcanvas/svgedit isolation

* jquery removal, isolate svgcavas from svgedit, tests

* refactor(panels)

* fix update of colorpickers

* update cypress

* #tool_imagelib image library menu missing in main menu

* #tool_imagelib lint issue fixed

* #seConfirmDialog confirm change to elix alertdialog

* #seConfirmDialog alert change to elix alert dialog

* #seConfirmDialog remove super.attributeChangedCallback

* #process_cancel prompt changes to alertDialog and seConfirmDialog

* refactor to class step 1

* make load faster

* #storageDialog dialog separate moved dialog

* #process_cancel alert and process_cancel changes

* #process_cancel lint issue fixed

* add seList component

* merge

* fixes

* storagedialog

* move all storage related code to ext-storage

* fix ruler

* Update ConfigObj.js

* fix resize

* Update ext-storage.js

* picker starts withthe right color

* fix prefs

* fix initial content load

* npm update and fix some tests

* npm run build
This commit is contained in:
JFH
2021-01-02 00:15:23 +01:00
committed by GitHub
parent 797e021dba
commit 53b22a46d6
223 changed files with 5359 additions and 14849 deletions

View File

@@ -0,0 +1,5 @@
{
"name": "Using fixtures to represent data",
"email": "hello@cypress.io",
"body": "Fixtures are a great way to mock data for responses to routes"
}

View File

@@ -97,7 +97,7 @@ exports[`use various parts of svg-edit > check tool_text #0`] = `
fill-opacity="1"
stroke-opacity="1"
>
B
AB
</text>
</g>
</svg>
@@ -143,7 +143,7 @@ exports[`use various parts of svg-edit > check tool_clone #0`] = `
fill-opacity="1"
stroke-opacity="1"
>
B
AB
</text>
<text
fill="#000000"
@@ -159,7 +159,7 @@ exports[`use various parts of svg-edit > check tool_clone #0`] = `
stroke-opacity="1"
id="svg_2"
>
B
AB
</text>
</g>
</svg>
@@ -206,7 +206,7 @@ exports[`use various parts of svg-edit > check tool_italic #0`] = `
stroke-opacity="1"
font-=""
>
B
AB
</text>
<text
fill="#000000"
@@ -223,7 +223,7 @@ exports[`use various parts of svg-edit > check tool_italic #0`] = `
id="svg_2"
transform="matrix(1 0 0 1 0 0)"
>
B
AB
</text>
</g>
</svg>
@@ -271,7 +271,7 @@ exports[`use various parts of svg-edit > check tool_bold #0`] = `
font-=""
font-weight="bold"
>
B
AB
</text>
<text
fill="#000000"
@@ -288,7 +288,7 @@ exports[`use various parts of svg-edit > check tool_bold #0`] = `
id="svg_2"
transform="matrix(1 0 0 1 0 0)"
>
B
AB
</text>
</g>
</svg>
@@ -336,7 +336,7 @@ exports[`use various parts of svg-edit > check change color #0`] = `
font-=""
font-weight="bold"
>
B
AB
</text>
<text
fill="#000000"
@@ -353,7 +353,7 @@ exports[`use various parts of svg-edit > check change color #0`] = `
id="svg_2"
transform="matrix(1 0 0 1 0 0)"
>
B
AB
</text>
</g>
</svg>
@@ -493,7 +493,7 @@ exports[`use various parts of svg-edit > check tool_star #0`] = `
font-style="italic"
font-weight="bold"
>
B
AB
</text>
<text
fill="#000000"
@@ -510,7 +510,7 @@ exports[`use various parts of svg-edit > check tool_star #0`] = `
id="svg_2"
transform="matrix(1 0 0 1 0 0)"
>
B
AB
</text>
<polygon
cx="407"
@@ -584,7 +584,7 @@ exports[`use various parts of svg-edit > check tool_polygon #0`] = `
font-style="italic"
font-weight="bold"
>
B
AB
</text>
<text
fill="#000000"
@@ -601,7 +601,7 @@ exports[`use various parts of svg-edit > check tool_polygon #0`] = `
id="svg_2"
transform="matrix(1 0 0 1 0 0)"
>
B
AB
</text>
<polygon
cx="407"
@@ -692,7 +692,7 @@ exports[`use various parts of svg-edit > check tool_text_anchor_start #0`] = `
font-=""
font-weight="bold"
>
B
AB
</text>
<text
fill="#000000"
@@ -709,7 +709,7 @@ exports[`use various parts of svg-edit > check tool_text_anchor_start #0`] = `
id="svg_2"
transform="matrix(1 0 0 1 0 0)"
>
B
AB
</text>
<polygon
cx="407"
@@ -813,7 +813,7 @@ exports[`use various parts of svg-edit > check tool_text_anchor_middle #0`] = `
font-=""
font-weight="bold"
>
B
AB
</text>
<text
fill="#000000"
@@ -830,7 +830,7 @@ exports[`use various parts of svg-edit > check tool_text_anchor_middle #0`] = `
id="svg_2"
transform="matrix(1 0 0 1 0 0)"
>
B
AB
</text>
<polygon
cx="407"
@@ -880,8 +880,8 @@ exports[`use various parts of svg-edit > check tool_text_anchor_middle #0`] = `
strokecolor="#000000"
strokewidth="5"
fill-opacity="1"
stroke="none"
stroke-opacity="1"
stroke="none"
></polygon>
<polygon
cx="115"
@@ -949,7 +949,7 @@ exports[`use various parts of svg-edit > check tool_text_anchor_end #0`] = `
font-=""
font-weight="bold"
>
B
AB
</text>
<text
fill="#000000"
@@ -966,7 +966,7 @@ exports[`use various parts of svg-edit > check tool_text_anchor_end #0`] = `
id="svg_2"
transform="matrix(1 0 0 1 0 0)"
>
B
AB
</text>
<polygon
cx="407"
@@ -1016,8 +1016,8 @@ exports[`use various parts of svg-edit > check tool_text_anchor_end #0`] = `
strokecolor="#000000"
strokewidth="5"
fill-opacity="1"
stroke="none"
stroke-opacity="1"
stroke="none"
></polygon>
<polygon
cx="115"
@@ -1031,8 +1031,8 @@ exports[`use various parts of svg-edit > check tool_text_anchor_end #0`] = `
strokecolor="none"
strokewidth="5"
fill-opacity="1"
stroke="none"
stroke-opacity="1"
stroke="none"
></polygon>
<polygon
cx="115"

View File

@@ -1,21 +0,0 @@
import {
visitAndApproveStorage
} from '../../../support/ui-test-helper.js';
// See https://github.com/SVG-Edit/svgedit/issues/364
describe('Issue 364; IE errorwith rectangle selection by click', function () {
beforeEach(() => {
visitAndApproveStorage();
});
it('should set rectangle selection after click', function () {
// eslint-disable-next-line cypress/no-unnecessary-waiting
cy.get('#tools_rect_show')
.trigger('mousedown', {force: true})
.wait(100) // this delay seems necessary
.trigger('mouseup', {force: true})
.should((button) => {
expect(button).to.have.class('tool_button_current');
});
});
});

View File

@@ -20,7 +20,7 @@ describe('Fix issue 407', function () {
<text fill="#000000" id="a_text" text-anchor="middle" x="260.5" xml:space="preserve" y="192.5">hello</text>
</g>
</g>
</svg>`, {parseSpecialCharSequences: false});
</svg>`, {force: true, parseSpecialCharSequences: false});
cy.get('#tool_source_save').click();
cy.get('#svg_1').click().dblclick();
cy.get('#a_text').should('exist');
@@ -30,6 +30,6 @@ describe('Fix issue 407', function () {
.dblclick({force: true});
// svgedit use the #text text field to capture the text
cy.get('#text').type('1234', {force: true});
cy.get('#a_text').should('have.text', 'he1234llo');
cy.get('#a_text').should('have.text', 'hell1234o');
});
});

View File

@@ -20,7 +20,7 @@ describe('Fix issue 408', function () {
<circle cx="117.5" cy="87.5" fill="#ffff00" r="19.84943" stroke="#000000" />
</g>
</g>
</svg>`, {parseSpecialCharSequences: false});
</svg>`, {force: true, parseSpecialCharSequences: false});
cy.get('#tool_source_save').click();
cy.get('#svg_6').click().dblclick(); // change context
cy.get('#tool_source').click(); // reopen tool_source

View File

@@ -41,8 +41,7 @@ describe('use various parts of svg-edit', function () {
.trigger('mousedown', 'center', {force: true})
.trigger('mouseup', {force: true});
// svgedit use the #text text field to capture the text
// cy.get('#text').type('1234', {force: true});
cy.get('#text').type('B', {force: true});
cy.get('#text').type('AB', {force: true});
testSnapshot();
});

View File

@@ -8,13 +8,10 @@ describe('UI - Tool selection', function () {
});
it('should set rectangle selection by click', function () {
// eslint-disable-next-line cypress/no-unnecessary-waiting
cy.get('#tools_rect_show')
.trigger('mousedown', {force: true})
.wait(100) // this delay seems necessary
.trigger('mouseup', {force: true})
.should((button) => {
expect(button).to.have.class('tool_button_current');
});
cy.get('#tools_rect')
.should('not.have.attr', 'pressed');
cy.get('#tools_rect')
.trigger('click', {force: true})
.should('have.attr', 'pressed');
});
});

View File

@@ -1,7 +1,7 @@
import '../../../instrumented/editor/jquery.min.js';
import {NS} from '../../../instrumented/common/namespaces.js';
import * as utilities from '../../../instrumented/common/utilities.js';
import * as utilities from '../../../instrumented/svgcanvas/utilities.js';
import * as coords from '../../../instrumented/svgcanvas/coords.js';
describe('coords', function () {

View File

@@ -1,8 +1,8 @@
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 () {

View File

@@ -1,7 +1,7 @@
import '../../../instrumented/editor/jquery.min.js';
import {NS} from '../../../instrumented/common/namespaces.js';
import * as math from '../../../instrumented/common/math.js';
import * as math from '../../../instrumented/svgcanvas/math.js';
describe('math', function () {
const svg = document.createElementNS(NS.SVG, 'svg');

View File

@@ -4,7 +4,7 @@ import 'pathseg';
import '../../../instrumented/editor/jquery.min.js';
import {NS} from '../../../instrumented/common/namespaces.js';
import * as utilities from '../../../instrumented/common/utilities.js';
import * as utilities from '../../../instrumented/svgcanvas/utilities.js';
import * as pathModule from '../../../instrumented/svgcanvas/path.js';
import {Path, Segment} from '../../../instrumented/svgcanvas/path-method.js';
import {init as unitsInit} from '../../../instrumented/common/units.js';

View File

@@ -1,7 +1,7 @@
import '../../../instrumented/editor/jquery.min.js';
import {NS} from '../../../instrumented/common/namespaces.js';
import * as utilities from '../../../instrumented/common/utilities.js';
import * as utilities from '../../../instrumented/svgcanvas/utilities.js';
import * as coords from '../../../instrumented/svgcanvas/coords.js';
import * as recalculate from '../../../instrumented/svgcanvas/recalculate.js';

View File

@@ -1,7 +1,7 @@
import '../../../instrumented/editor/jquery.min.js';
import {NS} from '../../../instrumented/common/namespaces.js';
import * as transformlist from '../../../instrumented/common/svgtransformlist.js';
import * as transformlist from '../../../instrumented/svgcanvas/svgtransformlist.js';
import {disableSupportsNativeTransformLists} from '../../../instrumented/common/browser.js';
import almostEqualsPlugin from '../../support/assert-almostEquals.js';

View File

@@ -4,9 +4,9 @@ import 'pathseg';
import '../../../instrumented/editor/jquery.min.js';
import {NS} from '../../../instrumented/common/namespaces.js';
import * as utilities from '../../../instrumented/common/utilities.js';
import * as transformlist from '../../../instrumented/common/svgtransformlist.js';
import * as math from '../../../instrumented/common/math.js';
import * as utilities from '../../../instrumented/svgcanvas/utilities.js';
import * as transformlist from '../../../instrumented/svgcanvas/svgtransformlist.js';
import * as math from '../../../instrumented/svgcanvas/math.js';
import * as path from '../../../instrumented/svgcanvas/path.js';
import setAssertionMethods from '../../support/assert-close.js';

View File

@@ -3,9 +3,9 @@ import 'pathseg';
import '../../../instrumented/editor/jquery.min.js';
import {NS} from '../../../instrumented/common/namespaces.js';
import * as utilities from '../../../instrumented/common/utilities.js';
import * as transformlist from '../../../instrumented/common/svgtransformlist.js';
import * as math from '../../../instrumented/common/math.js';
import * as utilities from '../../../instrumented/svgcanvas/utilities.js';
import * as transformlist from '../../../instrumented/svgcanvas/svgtransformlist.js';
import * as math from '../../../instrumented/svgcanvas/math.js';
describe('utilities performance', function () {
let currentLayer, groupWithMatrixTransform, textWithMatrixTransform;

View File

@@ -2,7 +2,7 @@
import '../../../instrumented/editor/jquery.min.js';
import * as browser from '../../../instrumented/common/browser.js';
import * as utilities from '../../../instrumented/common/utilities.js';
import * as utilities from '../../../instrumented/svgcanvas/utilities.js';
import {NS} from '../../../instrumented/common/namespaces.js';
describe('utilities', function () {

View File

@@ -1,6 +1,6 @@
export const approveStorage = () => {
return cy.get('#dialog_buttons > input[type=button][data-ok]')
.click();
// JFH will need to be chnaged when dialog is changed...
cy.get('#storage_ok').click();
};
export const visitAndApproveStorage = () => {
@@ -9,7 +9,7 @@ export const visitAndApproveStorage = () => {
};
export const openMainMenu = () => {
return cy.get('#main_icon').click();
return cy.get('#main_button').click();
};
export const openEditorPreferences = () => {