2021-12-02 01:41:56 +01:00
|
|
|
context('Playground', () => {
|
|
|
|
it('the playground layout page should match its snapshot', () => {
|
|
|
|
// TODO: check why this error is happening, and remove this handling
|
|
|
|
cy.on('uncaught:exception', (err) => {
|
|
|
|
expect(err.message).to.include('Prediction is incorrectly positioned');
|
|
|
|
return false;
|
|
|
|
});
|
2021-12-17 03:13:54 +01:00
|
|
|
cy.visit('/layout.html');
|
2021-12-02 01:41:56 +01:00
|
|
|
cy.matchImageSnapshot('layout');
|
|
|
|
});
|
|
|
|
it('the playground viewmode.html page should match its snapshot', () => {
|
2021-12-17 03:13:54 +01:00
|
|
|
cy.visit('/viewmode.html');
|
2021-12-02 01:41:56 +01:00
|
|
|
cy.matchImageSnapshot('viewmode');
|
|
|
|
});
|
2021-12-05 18:25:16 +01:00
|
|
|
it('the playground container.html page should match its snapshot', () => {
|
2021-12-17 03:13:54 +01:00
|
|
|
cy.visit('/container.html');
|
|
|
|
// TODO: wait for mind map to load instead of an arbitrary number of ms
|
|
|
|
cy.wait(5000);
|
2021-12-05 18:25:16 +01:00
|
|
|
cy.matchImageSnapshot('container');
|
|
|
|
});
|
|
|
|
it('the playground editor.html page should match its snapshot', () => {
|
2021-12-17 03:13:54 +01:00
|
|
|
cy.visit('/editor.html');
|
|
|
|
// TODO: wait for mind map to load instead of an arbitrary number of ms
|
2021-12-05 18:25:16 +01:00
|
|
|
cy.wait(5000);
|
|
|
|
// TODO: why is the editor appearing twice in the snapshot?
|
|
|
|
cy.matchImageSnapshot('editor');
|
|
|
|
});
|
2021-12-02 01:41:56 +01:00
|
|
|
});
|