37 lines
1.2 KiB
TypeScript
Executable File
37 lines
1.2 KiB
TypeScript
Executable File
describe('Editor docs tests', () => {
|
|
beforeEach(() => {
|
|
cy.on('uncaught:exception', () => {
|
|
return false;
|
|
});
|
|
cy.clearLocalStorage();
|
|
cy.visit('/edit');
|
|
cy.contains('Sample Diagrams').click();
|
|
});
|
|
|
|
it('Test default loading', () => {
|
|
cy.get(`[data-cy=docs][href^="https://mermaid-js.github.io/mermaid"]`).should('exist');
|
|
});
|
|
|
|
it('Test to see if the correct URL loads when changing from one diagram to other', () => {
|
|
cy.contains('Flow Chart').click();
|
|
cy.get(`[data-cy=docs][href$="/#/flowchart"]`).should('exist');
|
|
|
|
cy.contains('Config').click();
|
|
cy.get(`[data-cy=docs][href$="/#/flowchart?id=configuration"]`).should('exist');
|
|
|
|
cy.contains('Sequence Diagram').click();
|
|
cy.get(`[data-cy=docs][href$="/#/sequenceDiagram?id=configuration"]`).should('exist');
|
|
|
|
cy.contains('Code').click();
|
|
cy.get(`[data-cy=docs][href$="/#/sequenceDiagram"]`).should('exist');
|
|
});
|
|
|
|
it("Test to check URLs for a case where config URL doesn't exist", () => {
|
|
cy.contains('State Diagram').click();
|
|
cy.get(`[data-cy=docs][href$="/#/stateDiagram"]`).should('exist');
|
|
|
|
cy.contains('Config').click();
|
|
cy.get(`[data-cy=docs][href$="/#/stateDiagram"]`).should('exist');
|
|
});
|
|
});
|