fix #1103
This commit is contained in:
@@ -69,6 +69,14 @@ describe('Auto sync tests', () => {
|
||||
)
|
||||
.should('exist');
|
||||
});
|
||||
|
||||
it.only('should update diagram after entire text is removed', () => {
|
||||
// https://github.com/mermaid-js/mermaid-live-editor/issues/1102
|
||||
getEditor().type(`${cmd} a {backspace}`);
|
||||
getEditor().type('graph LR');
|
||||
getEditor().type(' {enter} A-->Car');
|
||||
cy.get('#view').contains('Car').should('exist');
|
||||
});
|
||||
});
|
||||
|
||||
describe('Pan and Zoom', () => {
|
||||
|
||||
@@ -16,7 +16,7 @@ module.exports = {
|
||||
"1": "{\"code\":\"graph TD\\n A[Party] -->|Get money| B(Go shopping!!)\\n \",\"mermaid\":\"{\\n \\\"theme\\\": \\\"forest\\\",\\n \\\"test\\\": \\\"hello world\\\"\\n}\",\"autoSync\":true,\"updateDiagram\":true,\"loader\":{\"type\":\"files\",\"config\":{\"codeURL\":\"https://gist.githubusercontent.com/sidharthv96/6268a23e673a533dcb198f241fd7012a/raw/4eb03887e6a41397e80bdcdbf94017c498f8f1e2/code.mmd\",\"configURL\":\"https://gist.githubusercontent.com/sidharthv96/6268a23e673a533dcb198f241fd7012a/raw/4eb03887e6a41397e80bdcdbf94017c498f8f1e2/config.json\"}}}"
|
||||
}
|
||||
},
|
||||
"__version": "10.10.0",
|
||||
"__version": "11.2.0",
|
||||
"Auto sync tests": {
|
||||
"should dim diagram when code is edited": {
|
||||
"1": "{\"code\":\"graph TD\\n A[Christmas] -->|Get money| B(Go shopping)\\n B --> C{Let me think}\\n C -->|One| D[Laptop]\\n C -->|Two| E[iPhone]\\n C -->|Three| F[fa:fa-car Car]\\n C --> Test\",\"mermaid\":\"{\\n \\\"theme\\\": \\\"default\\\"\\n}\",\"autoSync\":false,\"updateDiagram\":false}"
|
||||
|
||||
@@ -70,11 +70,11 @@ const processState = async (state: State) => {
|
||||
errorDebug();
|
||||
console.error(e);
|
||||
if ('hash' in e) {
|
||||
const {
|
||||
loc: { first_line, last_line, first_column, last_column }
|
||||
// eslint-disable-next-line @typescript-eslint/no-unsafe-member-access
|
||||
} = e.hash as ErrorHash;
|
||||
try {
|
||||
const {
|
||||
loc: { first_line, last_line, first_column, last_column }
|
||||
// eslint-disable-next-line @typescript-eslint/no-unsafe-member-access
|
||||
} = e.hash as ErrorHash;
|
||||
const marker: MarkerData = {
|
||||
severity: 8, // Error
|
||||
startLineNumber: first_line,
|
||||
|
||||
Reference in New Issue
Block a user