Compare commits
2
Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
ff88a247f2 | ||
|
|
269c4e4deb |
@@ -14,23 +14,23 @@ describe('Editor docs tests', () => {
|
|||||||
|
|
||||||
it('Test to see if the correct URL loads when changing from one diagram to other', () => {
|
it('Test to see if the correct URL loads when changing from one diagram to other', () => {
|
||||||
cy.contains('Flow').click();
|
cy.contains('Flow').click();
|
||||||
cy.get(`[data-cy=docs][href$="/#/flowchart"]`).should('exist');
|
cy.get(`[data-cy=docs][href$="/syntax/flowchart"]`).should('exist');
|
||||||
|
|
||||||
cy.contains('Config').click();
|
cy.contains('Config').click();
|
||||||
cy.get(`[data-cy=docs][href$="/#/flowchart?id=configuration"]`).should('exist');
|
cy.get(`[data-cy=docs][href$="/syntax/flowchart?id=configuration"]`).should('exist');
|
||||||
|
|
||||||
cy.contains('Sequence').click();
|
cy.contains('Sequence').click();
|
||||||
cy.get(`[data-cy=docs][href$="/#/sequenceDiagram?id=configuration"]`).should('exist');
|
cy.get(`[data-cy=docs][href$="/syntax/sequenceDiagram?id=configuration"]`).should('exist');
|
||||||
|
|
||||||
cy.contains('Code').click();
|
cy.contains('Code').click();
|
||||||
cy.get(`[data-cy=docs][href$="/#/sequenceDiagram"]`).should('exist');
|
cy.get(`[data-cy=docs][href$="/syntax/sequenceDiagram"]`).should('exist');
|
||||||
});
|
});
|
||||||
|
|
||||||
it("Test to check URLs for a case where config URL doesn't exist", () => {
|
it("Test to check URLs for a case where config URL doesn't exist", () => {
|
||||||
cy.contains('State').click();
|
cy.contains('State').click();
|
||||||
cy.get(`[data-cy=docs][href$="/#/stateDiagram"]`).should('exist');
|
cy.get(`[data-cy=docs][href$="/syntax/stateDiagram"]`).should('exist');
|
||||||
|
|
||||||
cy.contains('Config').click();
|
cy.contains('Config').click();
|
||||||
cy.get(`[data-cy=docs][href$="/#/stateDiagram"]`).should('exist');
|
cy.get(`[data-cy=docs][href$="/syntax/stateDiagram"]`).should('exist');
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|||||||
@@ -16,42 +16,49 @@
|
|||||||
const MCBaseURL = dev ? 'http://localhost:5174' : 'https://mermaidchart.com';
|
const MCBaseURL = dev ? 'http://localhost:5174' : 'https://mermaidchart.com';
|
||||||
const docURLBase = 'https://mermaid-js.github.io/mermaid';
|
const docURLBase = 'https://mermaid-js.github.io/mermaid';
|
||||||
const docMap: DocumentationConfig = {
|
const docMap: DocumentationConfig = {
|
||||||
graph: {
|
|
||||||
code: '/#/flowchart',
|
|
||||||
config: '/#/flowchart?id=configuration'
|
|
||||||
},
|
|
||||||
flowchart: {
|
|
||||||
code: '/#/flowchart',
|
|
||||||
config: '/#/flowchart?id=configuration'
|
|
||||||
},
|
|
||||||
sequenceDiagram: {
|
|
||||||
code: '/#/sequenceDiagram',
|
|
||||||
config: '/#/sequenceDiagram?id=configuration'
|
|
||||||
},
|
|
||||||
classDiagram: {
|
classDiagram: {
|
||||||
code: '/#/classDiagram',
|
code: '/syntax/classDiagram',
|
||||||
config: '/#/classDiagram?id=configuration'
|
config: '/syntax/classDiagram#configuration'
|
||||||
},
|
|
||||||
'stateDiagram-v2': {
|
|
||||||
code: '/#/stateDiagram'
|
|
||||||
},
|
|
||||||
gantt: {
|
|
||||||
code: '/#/gantt',
|
|
||||||
config: '/#/gantt?id=configuration'
|
|
||||||
},
|
|
||||||
pie: {
|
|
||||||
code: '/#/pie'
|
|
||||||
},
|
},
|
||||||
erDiagram: {
|
erDiagram: {
|
||||||
code: '/#/entityRelationshipDiagram',
|
code: '/syntax/entityRelationshipDiagram'
|
||||||
config: '/#/entityRelationshipDiagram?id=styling'
|
|
||||||
},
|
},
|
||||||
journey: {
|
flowchart: {
|
||||||
code: '/#/user-journey'
|
code: '/syntax/flowchart',
|
||||||
|
config: '/syntax/flowchart#configuration'
|
||||||
|
},
|
||||||
|
gantt: {
|
||||||
|
code: '/syntax/gantt',
|
||||||
|
config: '/syntax/gantt#configuration'
|
||||||
},
|
},
|
||||||
gitGraph: {
|
gitGraph: {
|
||||||
code: '/#/gitgraph',
|
code: '/syntax/gitgraph',
|
||||||
config: '/#/gitgraph?id=gitgraph-specific-configuration-options'
|
config: '/syntax/gitgraph#gitgraph-specific-configuration-options'
|
||||||
|
},
|
||||||
|
graph: {
|
||||||
|
code: '/syntax/flowchart',
|
||||||
|
config: '/syntax/flowchart#configuration'
|
||||||
|
},
|
||||||
|
journey: {
|
||||||
|
code: '/syntax/userJourney'
|
||||||
|
},
|
||||||
|
mindmap: {
|
||||||
|
code: '/syntax/mindmap'
|
||||||
|
},
|
||||||
|
pie: {
|
||||||
|
code: '/syntax/pie',
|
||||||
|
config: '/syntax/pie#configuration'
|
||||||
|
},
|
||||||
|
quadrantChart: {
|
||||||
|
code: '/syntax/quadrantChart',
|
||||||
|
config: '/syntax/quadrantChart#chart-configurations'
|
||||||
|
},
|
||||||
|
sequenceDiagram: {
|
||||||
|
code: '/syntax/sequenceDiagram',
|
||||||
|
config: '/syntax/sequenceDiagram#configuration'
|
||||||
|
},
|
||||||
|
'stateDiagram-v2': {
|
||||||
|
code: '/syntax/stateDiagram'
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
let docURL = docURLBase;
|
let docURL = docURLBase;
|
||||||
|
|||||||
Reference in New Issue
Block a user