2022-01-24 21:22:39 +01:00
|
|
|
context('Playground', () => {
|
|
|
|
it('viewmode page should match its snapshot', () => {
|
2022-07-13 03:58:11 +02:00
|
|
|
[
|
|
|
|
'welcome',
|
|
|
|
'sample1',
|
|
|
|
'sample2',
|
|
|
|
'sample3',
|
|
|
|
'sample4',
|
|
|
|
'sample5',
|
|
|
|
'sample6',
|
|
|
|
'complex',
|
|
|
|
'img-support',
|
|
|
|
'icon-sample',
|
|
|
|
].forEach((mapId) => {
|
2022-01-24 21:22:39 +01:00
|
|
|
cy.visit(`/viewmode.html?id=${mapId}`);
|
2022-09-06 21:02:47 +02:00
|
|
|
cy.get('#mindmap-comp.ready').should('exist');
|
2022-01-24 21:22:39 +01:00
|
|
|
cy.matchImageSnapshot(`viewmode-${mapId}`);
|
|
|
|
});
|
|
|
|
});
|
2022-09-06 21:02:47 +02:00
|
|
|
it('the playground showcase.html page should match its snapshot', () => {
|
|
|
|
cy.visit('/showcase.html');
|
|
|
|
cy.getIframeBody().find('#mindmap-comp.ready').should('exist');
|
2022-01-24 21:22:39 +01:00
|
|
|
cy.matchImageSnapshot('container');
|
|
|
|
});
|
|
|
|
it('the playground editor.html page should match its snapshot', () => {
|
|
|
|
cy.visit('/editor.html');
|
2022-09-06 21:02:47 +02:00
|
|
|
cy.get('#mindmap-comp.ready').should('exist');
|
2022-01-24 21:22:39 +01:00
|
|
|
// TODO: why is the editor appearing twice in the snapshot?
|
|
|
|
cy.matchImageSnapshot('editor');
|
|
|
|
});
|
|
|
|
});
|