#2560 Tetsing that the added css have balanced brackets

This commit is contained in:
Knut Sveidqvist
2021-12-14 23:54:31 +01:00
parent 38496c004b
commit 9c12502a36
4 changed files with 74 additions and 1 deletions

View File

@@ -1,5 +1,30 @@
import { imgSnapshotTest } from '../../helpers/util.js';
describe('themeCSS balancing, it', () => {
it('should not allow unbalanced CSS definitions', () => {
imgSnapshotTest(
`
%%{init: { 'themeCSS': '} * { background: red }' } }%%
flowchart TD
a --> b
`,
{}
);
cy.get('svg');
});
it('should not allow unbalanced CSS definitions 2', () => {
imgSnapshotTest(
`
%%{init: { 'themeCSS': '\u007D * { background: red }' } }%%
flowchart TD
a2 --> b2
`,
{}
);
cy.get('svg');
});
});
describe('Pie Chart', () => {
// beforeEach(()=>{
// cy.clock((new Date('2014-06-09')).getTime());