Skip to content

Commit

Permalink
Merge branch 'develop' into bug/5928_architecture-diagram-allow-all-c…
Browse files Browse the repository at this point in the history
…haracter-for-title
  • Loading branch information
wizbit authored Oct 4, 2024
2 parents c6341c5 + 6e0fe03 commit 66f4f73
Show file tree
Hide file tree
Showing 120 changed files with 7,488 additions and 638 deletions.
5 changes: 0 additions & 5 deletions .changeset/dry-plums-glow.md

This file was deleted.

5 changes: 0 additions & 5 deletions .changeset/witty-rabbits-hunt.md

This file was deleted.

1 change: 1 addition & 0 deletions .cspell/code-terms.txt
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@ concat
controlx
controly
CSSCLASS
curv
CYLINDEREND
CYLINDERSTART
DAGA
Expand Down
3 changes: 3 additions & 0 deletions .cspell/cspell.config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,9 @@ dictionaryDefinitions:
- name: suggestions
words:
- none
- disp
- subproc
- tria
suggestWords:
- seperator:separator
- vertice:vertex
Expand Down
2 changes: 2 additions & 0 deletions .cspell/mermaid-terms.txt
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ bmatrix
braintree
catmull
compositTitleSize
curv
doublecircle
elems
gantt
Expand All @@ -24,6 +25,7 @@ multigraph
nodesep
NOTEGROUP
Pinterest
procs
rankdir
ranksep
rect
Expand Down
5 changes: 4 additions & 1 deletion .github/lychee.toml
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,10 @@ exclude = [
"https://chromewebstore.google.com",

# Drupal 403
"https://(www.)?drupal.org"
"https://(www.)?drupal.org",

# Swimm returns 404, eventhough the link is valid
"https://docs.swimm.io"
]

# Exclude all private IPs from checking.
Expand Down
1 change: 1 addition & 0 deletions cypress/helpers/util.ts
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@ export const mermaidUrl = (
options: CypressMermaidConfig,
api: boolean
): string => {
options.handDrawnSeed = 1;
const codeObject: CodeObject = {
code: graphStr,
mermaid: options,
Expand Down
59 changes: 59 additions & 0 deletions cypress/integration/rendering/classDiagram-v2.spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -581,4 +581,63 @@ class C13["With Città foreign language"]
{ logLevel: 1, flowchart: { htmlLabels: false } }
);
});

it('renders a class diagram with a generic class in a namespace', () => {
const diagramDefinition = `
classDiagram-v2
namespace Company.Project.Module {
class GenericClass~T~ {
+addItem(item: T)
+getItem() T
}
}
`;

imgSnapshotTest(diagramDefinition);
});

it('renders a class diagram with nested namespaces and relationships', () => {
const diagramDefinition = `
classDiagram-v2
namespace Company.Project.Module.SubModule {
class Report {
+generatePDF(data: List)
+generateCSV(data: List)
}
}
namespace Company.Project.Module {
class Admin {
+generateReport()
}
}
Admin --> Report : generates
`;

imgSnapshotTest(diagramDefinition);
});

it('renders a class diagram with multiple classes and relationships in a namespace', () => {
const diagramDefinition = `
classDiagram-v2
namespace Company.Project.Module {
class User {
+login(username: String, password: String)
+logout()
}
class Admin {
+addUser(user: User)
+removeUser(user: User)
+generateReport()
}
class Report {
+generatePDF(reportData: List)
+generateCSV(reportData: List)
}
}
Admin --> User : manages
Admin --> Report : generates
`;

imgSnapshotTest(diagramDefinition);
});
});
Loading

0 comments on commit 66f4f73

Please sign in to comment.