mirror of
https://bitbucket.org/wisemapping/wisemapping-frontend.git
synced 2024-11-22 06:37:56 +01:00
Merged in integration-test-fix (pull request #58)
Integration test fix * cypress find elements in shadow doms * fix playground tests Approved-by: Paulo Veiga Approved-by: Paulo Veiga
This commit is contained in:
parent
2370faea62
commit
5e76bf99d9
@ -1,6 +1,7 @@
|
|||||||
{
|
{
|
||||||
"video": false,
|
"video": false,
|
||||||
"videoUploadOnPasses": false,
|
"videoUploadOnPasses": false,
|
||||||
"baseUrl": "http://localhost:8081"
|
"baseUrl": "http://localhost:8081",
|
||||||
|
"includeShadowDom": true
|
||||||
}
|
}
|
||||||
|
|
@ -13,18 +13,18 @@ context('Playground', () => {
|
|||||||
'icon-sample',
|
'icon-sample',
|
||||||
].forEach((mapId) => {
|
].forEach((mapId) => {
|
||||||
cy.visit(`/viewmode.html?id=${mapId}`);
|
cy.visit(`/viewmode.html?id=${mapId}`);
|
||||||
cy.get('#mindplot.ready').should('exist');
|
cy.get('#mindmap-comp.ready').should('exist');
|
||||||
cy.matchImageSnapshot(`viewmode-${mapId}`);
|
cy.matchImageSnapshot(`viewmode-${mapId}`);
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
it('the playground container.html page should match its snapshot', () => {
|
it('the playground showcase.html page should match its snapshot', () => {
|
||||||
cy.visit('/container.html');
|
cy.visit('/showcase.html');
|
||||||
cy.getIframeBody().find('#mindplot.ready').should('exist');
|
cy.getIframeBody().find('#mindmap-comp.ready').should('exist');
|
||||||
cy.matchImageSnapshot('container');
|
cy.matchImageSnapshot('container');
|
||||||
});
|
});
|
||||||
it('the playground editor.html page should match its snapshot', () => {
|
it('the playground editor.html page should match its snapshot', () => {
|
||||||
cy.visit('/editor.html');
|
cy.visit('/editor.html');
|
||||||
cy.get('#mindplot.ready').should('exist');
|
cy.get('#mindmap-comp.ready').should('exist');
|
||||||
// TODO: why is the editor appearing twice in the snapshot?
|
// TODO: why is the editor appearing twice in the snapshot?
|
||||||
cy.matchImageSnapshot('editor');
|
cy.matchImageSnapshot('editor');
|
||||||
});
|
});
|
||||||
|
@ -22,7 +22,7 @@ import { LocalStorageManager, Designer } from '@wisemapping/mindplot';
|
|||||||
|
|
||||||
const initialization = (designer: Designer) => {
|
const initialization = (designer: Designer) => {
|
||||||
designer.addEvent('loadSuccess', () => {
|
designer.addEvent('loadSuccess', () => {
|
||||||
const elem = document.getElementById('mindplot');
|
const elem = document.getElementById('mindmap-comp');
|
||||||
if (elem) {
|
if (elem) {
|
||||||
elem.classList.add('ready');
|
elem.classList.add('ready');
|
||||||
}
|
}
|
||||||
|
@ -6,7 +6,7 @@ import { LocalStorageManager, Designer } from '@wisemapping/mindplot';
|
|||||||
|
|
||||||
const initialization = (designer: Designer) => {
|
const initialization = (designer: Designer) => {
|
||||||
designer.addEvent('loadSuccess', () => {
|
designer.addEvent('loadSuccess', () => {
|
||||||
const elem = document.getElementById('mindplot');
|
const elem = document.getElementById('mindmap-comp');
|
||||||
if (elem) {
|
if (elem) {
|
||||||
elem.classList.add('ready');
|
elem.classList.add('ready');
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user