Skip to content

Commit

Permalink
update and adapt code to latest dependencies
Browse files Browse the repository at this point in the history
-> need testIsolation to False with the latest Cypress
  • Loading branch information
jfhenon committed Aug 15, 2024
1 parent e81a4f8 commit 3fd1136
Show file tree
Hide file tree
Showing 14 changed files with 5,965 additions and 6,871 deletions.
2 changes: 1 addition & 1 deletion cypress/e2e/ui/scenario.cy.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import {
visitAndApproveStorage
} from '../../support/ui-test-helper.js'

describe('use text tools of svg-edit', function () {
describe('use text tools of svg-edit', { testIsolation: false }, function () {
before(() => {
visitAndApproveStorage()
})
Expand Down
2 changes: 1 addition & 1 deletion cypress/e2e/ui/scenario1.cy.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import {
visitAndApproveStorage
} from '../../support/ui-test-helper.js'

describe('check tool shape and image of svg-edit', function () {
describe('check tool shape and image of svg-edit', { testIsolation: false }, function () {
before(() => {
visitAndApproveStorage()
})
Expand Down
2 changes: 1 addition & 1 deletion cypress/e2e/ui/scenario2.cy.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import {
visitAndApproveStorage
} from '../../support/ui-test-helper.js'

describe('use ellipse and circle of svg-edit', function () {
describe('use ellipse and circle of svg-edit', { testIsolation: false }, function () {
before(() => {
visitAndApproveStorage()
})
Expand Down
2 changes: 1 addition & 1 deletion cypress/e2e/ui/scenario3.cy.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import {
visitAndApproveStorage
} from '../../support/ui-test-helper.js'

describe('use path tools of svg-edit', function () {
describe('use path tools of svg-edit', { testIsolation: false }, function () {
before(() => {
visitAndApproveStorage()
})
Expand Down
2 changes: 1 addition & 1 deletion cypress/e2e/ui/scenario4.cy.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import {
visitAndApproveStorage
} from '../../support/ui-test-helper.js'

describe('use rect/square tools of svg-edit', function () {
describe('use rect/square tools of svg-edit', { testIsolation: false }, function () {
before(() => {
visitAndApproveStorage()
})
Expand Down
2 changes: 1 addition & 1 deletion cypress/e2e/ui/scenario5.cy.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import {
visitAndApproveStorage
} from '../../support/ui-test-helper.js'

describe('use line tools of svg-edit', function () {
describe('use line tools of svg-edit', { testIsolation: false }, function () {
before(() => {
visitAndApproveStorage()
})
Expand Down
2 changes: 1 addition & 1 deletion cypress/e2e/ui/scenario6.cy.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import {
visitAndApproveStorage
} from '../../support/ui-test-helper.js'

describe('use polygon tools of svg-edit', function () {
describe('use polygon tools of svg-edit', { testIsolation: false }, function () {
before(() => {
visitAndApproveStorage()
})
Expand Down
2 changes: 1 addition & 1 deletion cypress/e2e/ui/scenario7.cy.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import {
visitAndApproveStorage
} from '../../support/ui-test-helper.js'

describe('use star tools of svg-edit', function () {
describe('use star tools of svg-edit', { testIsolation: false }, function () {
before(() => {
visitAndApproveStorage()
})
Expand Down
5 changes: 5 additions & 0 deletions cypress/replace-in-file.config.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
{
"files": "instrumented/**",
"from": "import SvgCanvas from '@svgedit/svgcanvas';",
"to": "import SvgCanvas from '/instrumented/svgcanvas/svgcanvas.js'"
}
3 changes: 2 additions & 1 deletion cypress/support/ui-test-helper.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
export const visitAndApproveStorage = () => {
cy.clearLocalStorage()
cy.visit('/src/editor/index.html')
cy.clearCookies()
cy.visit('/instrumented/editor/index.html')
cy.get('#storage_ok').click({ force: true })
// move to English and snap mode (to correct potential differences between CI and local tests )
selectEnglishAndSnap()
Expand Down
Loading

0 comments on commit 3fd1136

Please sign in to comment.