mirror of
				https://github.com/mermaid-js/mermaid.git
				synced 2025-11-03 20:34:20 +01:00 
			
		
		
		
	Merge pull request #3459 from aloisklink/chore/update-cypress
Update Cypress to v10 and fix E2E errors
This commit is contained in:
		@@ -472,7 +472,8 @@ export const insertEdge = function (elem, e, edge, clusterDb, diagramType, graph
 | 
			
		||||
  // });
 | 
			
		||||
 | 
			
		||||
  let url = '';
 | 
			
		||||
  if (getConfig().state.arrowMarkerAbsolute) {
 | 
			
		||||
  // // TODO: Can we load this config only from the rendered graph type?
 | 
			
		||||
  if (getConfig().flowchart.arrowMarkerAbsolute || getConfig().state.arrowMarkerAbsolute) {
 | 
			
		||||
    url =
 | 
			
		||||
      window.location.protocol +
 | 
			
		||||
      '//' +
 | 
			
		||||
 
 | 
			
		||||
@@ -96,6 +96,7 @@ import { journeyDetector } from '../diagrams/user-journey/journeyDetector';
 | 
			
		||||
import journeyDb from '../diagrams/user-journey/journeyDb';
 | 
			
		||||
import journeyRenderer from '../diagrams/user-journey/journeyRenderer';
 | 
			
		||||
import journeyStyles from '../diagrams/user-journey/styles';
 | 
			
		||||
import { getConfig, setConfig } from '../config';
 | 
			
		||||
 | 
			
		||||
import errorRenderer from '../diagrams/error/errorRenderer';
 | 
			
		||||
import errorStyles from '../diagrams/error/styles';
 | 
			
		||||
@@ -301,11 +302,12 @@ export const addDiagrams = () => {
 | 
			
		||||
      renderer: flowRendererV2,
 | 
			
		||||
      styles: flowStyles,
 | 
			
		||||
      init: (cnf) => {
 | 
			
		||||
        flowRenderer.setConf(cnf.flowchart);
 | 
			
		||||
        if (!cnf.flowchart) {
 | 
			
		||||
          cnf.flowchart = {};
 | 
			
		||||
        }
 | 
			
		||||
        // TODO, broken as of 2022-09-14 (13809b50251845475e6dca65cc395761be38fbd2)
 | 
			
		||||
        cnf.flowchart.arrowMarkerAbsolute = cnf.arrowMarkerAbsolute;
 | 
			
		||||
        flowRenderer.setConf(cnf.flowchart);
 | 
			
		||||
        flowDb.clear();
 | 
			
		||||
        flowDb.setGen('gen-1');
 | 
			
		||||
      },
 | 
			
		||||
@@ -320,11 +322,13 @@ export const addDiagrams = () => {
 | 
			
		||||
      renderer: flowRendererV2,
 | 
			
		||||
      styles: flowStyles,
 | 
			
		||||
      init: (cnf) => {
 | 
			
		||||
        flowRendererV2.setConf(cnf.flowchart);
 | 
			
		||||
        if (!cnf.flowchart) {
 | 
			
		||||
          cnf.flowchart = {};
 | 
			
		||||
        }
 | 
			
		||||
        cnf.flowchart.arrowMarkerAbsolute = cnf.arrowMarkerAbsolute;
 | 
			
		||||
        // flowchart-v2 uses dagre-wrapper, which doesn't have access to flowchart cnf
 | 
			
		||||
        setConfig({ flowchart: { arrowMarkerAbsolute: cnf.arrowMarkerAbsolute } });
 | 
			
		||||
        flowRendererV2.setConf(cnf.flowchart);
 | 
			
		||||
        flowDb.clear();
 | 
			
		||||
        flowDb.setGen('gen-2');
 | 
			
		||||
      },
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user