Update packages and remove the instrument step (#854)
* several updates * avoid the instrumented step in tests
This commit is contained in:
@@ -1,4 +1,4 @@
|
||||
import * as contextmenu from '../../../instrumented/editor/contextmenu.js'
|
||||
import * as contextmenu from '../../../src/editor/contextmenu.js'
|
||||
|
||||
describe('contextmenu', function () {
|
||||
/**
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
import { NS } from '../../../instrumented/svgcanvas/namespaces.js'
|
||||
import * as utilities from '../../../instrumented/svgcanvas/utilities.js'
|
||||
import * as coords from '../../../instrumented/svgcanvas/coords.js'
|
||||
import { NS } from '../../../packages/svgcanvas/core/namespaces.js'
|
||||
import * as utilities from '../../../packages/svgcanvas/core/utilities.js'
|
||||
import * as coords from '../../../packages/svgcanvas/core/coords.js'
|
||||
|
||||
describe('coords', function () {
|
||||
let elemId = 1
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
import 'pathseg'
|
||||
import { NS } from '../../../instrumented/svgcanvas/namespaces.js'
|
||||
import * as draw from '../../../instrumented/svgcanvas/draw.js'
|
||||
import * as units from '../../../instrumented/svgcanvas/units.js'
|
||||
import { NS } from '../../../packages/svgcanvas/core/namespaces.js'
|
||||
import * as draw from '../../../packages/svgcanvas/core/draw.js'
|
||||
import * as units from '../../../packages/svgcanvas/core/units.js'
|
||||
|
||||
describe('draw.Drawing', function () {
|
||||
const addOwnSpies = (obj) => {
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
import { NS } from '../../../instrumented/svgcanvas/namespaces.js'
|
||||
import * as utilities from '../../../instrumented/svgcanvas/utilities.js'
|
||||
import * as history from '../../../instrumented/svgcanvas/history.js'
|
||||
import { NS } from '../../../packages/svgcanvas/core/namespaces.js'
|
||||
import * as utilities from '../../../packages/svgcanvas/core/utilities.js'
|
||||
import * as history from '../../../packages/svgcanvas/core/history.js'
|
||||
|
||||
describe('history', function () {
|
||||
// TODO(codedread): Write tests for handling history events.
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
import { NS } from '../../../instrumented/svgcanvas/namespaces.js'
|
||||
import * as math from '../../../instrumented/svgcanvas/math.js'
|
||||
import { NS } from '../../../packages/svgcanvas/core/namespaces.js'
|
||||
import * as math from '../../../packages/svgcanvas/core/math.js'
|
||||
|
||||
describe('math', function () {
|
||||
const svg = document.createElementNS(NS.SVG, 'svg')
|
||||
|
||||
@@ -1,10 +1,10 @@
|
||||
/* globals SVGPathSeg */
|
||||
import 'pathseg'
|
||||
import { NS } from '../../../instrumented/svgcanvas/namespaces.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/svgcanvas/units.js'
|
||||
import { NS } from '../../../packages/svgcanvas/core/namespaces.js'
|
||||
import * as utilities from '../../../packages/svgcanvas/core/utilities.js'
|
||||
import * as pathModule from '../../../packages/svgcanvas/core/path.js'
|
||||
import { Path, Segment } from '../../../packages/svgcanvas/core/path-method.js'
|
||||
import { init as unitsInit } from '../../../packages/svgcanvas/core/units.js'
|
||||
|
||||
describe('path', function () {
|
||||
/**
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
import { NS } from '../../../instrumented/svgcanvas/namespaces.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'
|
||||
import { NS } from '../../../packages/svgcanvas/core/namespaces.js'
|
||||
import * as utilities from '../../../packages/svgcanvas/core/utilities.js'
|
||||
import * as coords from '../../../packages/svgcanvas/core/coords.js'
|
||||
import * as recalculate from '../../../packages/svgcanvas/core/recalculate.js'
|
||||
|
||||
describe('recalculate', function () {
|
||||
const root = document.createElement('div')
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
import { NS } from '../../../instrumented/svgcanvas/namespaces.js'
|
||||
import * as sanitize from '../../../instrumented/svgcanvas/sanitize.js'
|
||||
import { NS } from '../../../packages/svgcanvas/core/namespaces.js'
|
||||
import * as sanitize from '../../../packages/svgcanvas/core/sanitize.js'
|
||||
|
||||
describe('sanitize', function () {
|
||||
const svg = document.createElementNS(NS.SVG, 'svg')
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
import * as select from '../../../instrumented/svgcanvas/select.js'
|
||||
import { NS } from '../../../instrumented/svgcanvas/namespaces.js'
|
||||
import * as select from '../../../packages/svgcanvas/core/select.js'
|
||||
import { NS } from '../../../packages/svgcanvas/core/namespaces.js'
|
||||
|
||||
describe('select', function () {
|
||||
const sandbox = document.createElement('div')
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/* eslint-disable max-len, no-console */
|
||||
import SvgCanvas from '../../../instrumented/svgcanvas/svgcanvas.js'
|
||||
import SvgCanvas from '../../../packages/svgcanvas/svgcanvas.js'
|
||||
|
||||
describe('Basic Module', function () {
|
||||
// helper functions
|
||||
@@ -148,7 +148,7 @@ describe('Basic Module', function () {
|
||||
it('Test importing/exporting namespaced attributes', function () {
|
||||
/* const setStr = */ svgCanvas.setSvgString(
|
||||
'<svg width="640" height="480" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" xmlns:se="http://svg-edit.googlecode.com" xmlns:foo="http://example.com">' +
|
||||
'<image xlink:href="../editor/images/logo.png"/>' +
|
||||
'<image xlink:href="/src/editor/images/logo.svg"/>' +
|
||||
'<polyline id="se_test_elem" se:foo="bar" foo:bar="baz"/>' +
|
||||
'</svg>'
|
||||
)
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
import * as units from '../../../instrumented/svgcanvas/units.js'
|
||||
import * as units from '.../../../packages/svgcanvas/core/units.js'
|
||||
|
||||
describe('units', function () {
|
||||
/**
|
||||
|
||||
@@ -1,9 +1,9 @@
|
||||
import 'pathseg'
|
||||
|
||||
import { NS } from '../../../instrumented/svgcanvas/namespaces.js'
|
||||
import * as utilities from '../../../instrumented/svgcanvas/utilities.js'
|
||||
import * as math from '../../../instrumented/svgcanvas/math.js'
|
||||
import * as path from '../../../instrumented/svgcanvas/path.js'
|
||||
import { NS } from '../../../packages/svgcanvas/core/namespaces.js'
|
||||
import * as utilities from '../../../packages/svgcanvas/core/utilities.js'
|
||||
import * as math from '../../../packages/svgcanvas/core/math.js'
|
||||
import * as path from '../../../packages/svgcanvas/core/path.js'
|
||||
import setAssertionMethods from '../../support/assert-close.js'
|
||||
|
||||
// eslint-disable-next-line
|
||||
|
||||
@@ -1,9 +1,9 @@
|
||||
/* eslint-disable max-len, no-console */
|
||||
import 'pathseg'
|
||||
|
||||
import { NS } from '../../../instrumented/svgcanvas/namespaces.js'
|
||||
import * as utilities from '../../../instrumented/svgcanvas/utilities.js'
|
||||
import * as math from '../../../instrumented/svgcanvas/math.js'
|
||||
import { NS } from '../../../packages/svgcanvas/core/namespaces.js'
|
||||
import * as utilities from '../../../packages/svgcanvas/core/utilities.js'
|
||||
import * as math from '../../../packages/svgcanvas/core/math.js'
|
||||
|
||||
describe('utilities performance', function () {
|
||||
let currentLayer; let groupWithMatrixTransform; let textWithMatrixTransform
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
import * as utilities from '../../../instrumented/svgcanvas/utilities.js'
|
||||
import { NS } from '../../../instrumented/svgcanvas/namespaces.js'
|
||||
import * as utilities from '../../../packages/svgcanvas/core/utilities.js'
|
||||
import { NS } from '../../../packages/svgcanvas/core/namespaces.js'
|
||||
|
||||
describe('utilities', function () {
|
||||
/**
|
||||
|
||||
@@ -10,7 +10,4 @@
|
||||
// https://on.cypress.io/plugins-guide
|
||||
// ***********************************************************
|
||||
|
||||
require('@babel/register')({
|
||||
plugins: ['@babel/plugin-transform-modules-commonjs']
|
||||
})
|
||||
module.exports = require('./main.js').default
|
||||
|
||||
@@ -1,7 +0,0 @@
|
||||
const options = {
|
||||
files: 'instrumented/**',
|
||||
from: "import SvgCanvas from '@svgedit/svgcanvas';",
|
||||
to: "import SvgCanvas from '/instrumented/svgcanvas/svgcanvas.js'"
|
||||
}
|
||||
|
||||
module.exports = options
|
||||
@@ -1,5 +1,5 @@
|
||||
export const visitAndApproveStorage = () => {
|
||||
cy.visit('/instrumented/editor/index.html')
|
||||
cy.visit('/src/editor/index.html')
|
||||
cy.get('#storage_ok').click()
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user