/* eslint-env jest */
import { imgSnapshotTest } from '../../helpers/util';

describe('Class diagram', () => {
  it('should render a simple class diagram', () => {
    imgSnapshotTest(
      `
    classDiagram
      Class01 <|-- AveryLongClass : Cool
      &lt;&lt;interface&gt;&gt; Class01
      Class03 *-- Class04
      Class05 o-- Class06
      Class07 .. Class08
      Class09 --> C2 : Where am i?
      Class09 --* C3
      Class09 --|> Class07
      Class07 : equals()
      Class07 : Object[] elementData
      Class01 : size()
      Class01 : int chimp
      Class01 : int gorilla
      Class08 <--> C2: Cool label
      class Class10 {
        &lt;&lt;service&gt;&gt;
        int id
        test()
      }
      `,
      {}
    );
    cy.get('svg');
  });
  it('should render a simple class diagrams with cardinality', () => {
    imgSnapshotTest(
      `
    classDiagram
      Class01 "1" <|--|> "*" AveryLongClass : Cool
      &lt;&lt;interface&gt;&gt; Class01
      Class03 "1" *-- "*" Class04
      Class05 "1" o-- "many" Class06
      Class07 "1" .. "*" Class08
      Class09 "1" --> "*" C2 : Where am i?
      Class09 "*" --* "*" C3
      Class09 "1" --|> "1" Class07
      Class07  : equals()
      Class07  : Object[] elementData
      Class01  : size()
      Class01  : int chimp
      Class01  : int gorilla
      Class08 "1" <--> "*" C2: Cool label
      class Class10 {
        &lt;&lt;service&gt;&gt;
        int id
        test()
      }
      `,
      {}
    );
    cy.get('svg');
  });
});

@@ -1506,12 +1506,1373 @@
 ;%0A  %7D);%0A
+  it('should render multiple class diagrams', () =%3E %7B%0A    imgSnapshotTest(%0A      %5B%0A      %60%0A    classDiagram%0A      Class01 %221%22 %3C%7C--%7C%3E %22*%22 AveryLongClass : Cool%0A      &lt;&lt;interface&gt;&gt; Class01%0A      Class03 %221%22 *-- %22*%22 Class04%0A      Class05 %221%22 o-- %22many%22 Class06%0A      Class07 %221%22 .. %22*%22 Class08%0A      Class09 %221%22 --%3E %22*%22 C2 : Where am i?%0A      Class09 %22*%22 --* %22*%22 C3%0A      Class09 %221%22 --%7C%3E %221%22 Class07%0A      Class07  : equals()%0A      Class07  : Object%5B%5D elementData%0A      Class01  : size()%0A      Class01  : int chimp%0A      Class01  : int gorilla%0A      Class08 %221%22 %3C--%3E %22*%22 C2: Cool label%0A      class Class10 %7B%0A        &lt;&lt;service&gt;&gt;%0A        int id%0A        test()%0A      %7D%0A      %60,%0A      %60%0A    classDiagram%0A      Class01 %221%22 %3C%7C--%7C%3E %22*%22 AveryLongClass : Cool%0A      &lt;&lt;interface&gt;&gt; Class01%0A      Class03 %221%22 *-- %22*%22 Class04%0A      Class05 %221%22 o-- %22many%22 Class06%0A      Class07 %221%22 .. %22*%22 Class08%0A      Class09 %221%22 --%3E %22*%22 C2 : Where am i?%0A      Class09 %22*%22 --* %22*%22 C3%0A      Class09 %221%22 --%7C%3E %221%22 Class07%0A      Class07  : equals()%0A      Class07  : Object%5B%5D elementData%0A      Class01  : size()%0A      Class01  : int chimp%0A      Class01  : int gorilla%0A      Class08 %221%22 %3C--%3E %22*%22 C2: Cool label%0A      class Class10 %7B%0A        &lt;&lt;service&gt;&gt;%0A        int id%0A        test()%0A      %7D%0A      %60,%0A      %5D,%0A      %7B%7D%0A    );%0A    cy.get('svg');%0A  %7D);%0A
 %7D);%0A

add test for multiple class diagram