diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2023-05-30 18:09:38 +0300 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2023-05-30 18:09:38 +0300 |
commit | aad78b57896307fff73539719d510a8c82be77f9 (patch) | |
tree | 22cf373de6921743c23dd694945f0a349880b4a2 /spec/frontend/drawio | |
parent | 96e4317f73c749841cc1d808b788d43aa3407a4a (diff) |
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'spec/frontend/drawio')
-rw-r--r-- | spec/frontend/drawio/drawio_editor_spec.js | 12 |
1 files changed, 10 insertions, 2 deletions
diff --git a/spec/frontend/drawio/drawio_editor_spec.js b/spec/frontend/drawio/drawio_editor_spec.js index d7d75922e1e..4d93908b757 100644 --- a/spec/frontend/drawio/drawio_editor_spec.js +++ b/spec/frontend/drawio/drawio_editor_spec.js @@ -1,6 +1,5 @@ import { launchDrawioEditor } from '~/drawio/drawio_editor'; import { - DRAWIO_EDITOR_URL, DRAWIO_FRAME_ID, DIAGRAM_BACKGROUND_COLOR, DRAWIO_IFRAME_TIMEOUT, @@ -8,6 +7,10 @@ import { } from '~/drawio/constants'; import { createAlert, VARIANT_SUCCESS } from '~/alert'; +const DRAWIO_EDITOR_URL = + 'https://embed.diagrams.net/?ui=sketch&noSaveBtn=1&saveAndExit=1&keepmodified=1&spin=1&embed=1&libraries=1&configure=1&proto=json&toSvg=1'; +const DRAWIO_EDITOR_ORIGIN = new URL(DRAWIO_EDITOR_URL).origin; + jest.mock('~/alert'); jest.useFakeTimers(); @@ -59,6 +62,7 @@ describe('drawio/drawio_editor', () => { updateDiagram: jest.fn(), }; drawioIFrameReceivedMessages = []; + gon.diagramsnet_url = DRAWIO_EDITOR_ORIGIN; }); afterEach(() => { @@ -356,7 +360,11 @@ describe('drawio/drawio_editor', () => { const TEST_FILENAME = 'diagram.drawio.svg'; beforeEach(() => { - launchDrawioEditor({ editorFacade, filename: TEST_FILENAME }); + launchDrawioEditor({ + editorFacade, + filename: TEST_FILENAME, + drawioUrl: DRAWIO_EDITOR_ORIGIN, + }); }); it('displays loading spinner in the draw.io editor', async () => { |