Skip to content

Commit 7f53067

Browse files
author
Dennis Labordus
committed
Merge branch 'main' into merge-v080
1 parent 246d6b6 commit 7f53067

File tree

9 files changed

+308
-2
lines changed

9 files changed

+308
-2
lines changed

src/compas/CompasAutoAlignment.ts

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,9 @@
11
import {css, customElement, html, LitElement, property, TemplateResult} from "lit-element";
22
import {get, translate} from "lit-translate";
33

4+
import '@material/mwc-list';
5+
import '@material/mwc-list/mwc-check-list-item';
6+
47
import {newLogEvent, newOpenDocEvent, newWizardEvent} from "../foundation.js";
58
import {getOpenScdElement} from "./foundation.js";
69

test/integration/compas-editors/__snapshots__/CompasVersions.test.snap.js

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -107,3 +107,28 @@ snapshots["compas-versions-plugin items-in-list looks like the latest snapshot"]
107107
`;
108108
/* end snapshot compas-versions-plugin items-in-list looks like the latest snapshot */
109109

110+
snapshots["compas-versions-plugin show-loading looks like the latest snapshot"] =
111+
`<compas-loading>
112+
</compas-loading>
113+
<wizard-dialog>
114+
</wizard-dialog>
115+
`;
116+
/* end snapshot compas-versions-plugin show-loading looks like the latest snapshot */
117+
118+
snapshots["compas-versions-plugin no-items-in-list looks like the latest snapshot"] =
119+
`<mwc-list>
120+
<mwc-list-item
121+
aria-disabled="false"
122+
mwc-list-item=""
123+
tabindex="0"
124+
>
125+
<span style="color: var(--base1)">
126+
[compas.noSclVersions]
127+
</span>
128+
</mwc-list-item>
129+
</mwc-list>
130+
<wizard-dialog>
131+
</wizard-dialog>
132+
`;
133+
/* end snapshot compas-versions-plugin no-items-in-list looks like the latest snapshot */
134+

test/unit/compas/CompasAutoAlignment.test.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ describe('compas-auto-alignment', () => {
1111

1212
describe('document with substations', () => {
1313
beforeEach(async () => {
14-
const doc = await fetch('/base/test/testfiles/compas/minigrid-3.0.0.cid')
14+
const doc = await fetch('/test/testfiles/compas/minigrid-3.0.0.cid')
1515
.then(response => response.text())
1616
.then(str => new DOMParser().parseFromString(str, 'application/xml'));
1717

@@ -55,7 +55,7 @@ describe('compas-auto-alignment', () => {
5555

5656
describe('document without substations', () => {
5757
beforeEach(async () => {
58-
const doc = await fetch('/base/test/testfiles/compas/test-scd.cid')
58+
const doc = await fetch('/test/testfiles/compas/test-scd.cid')
5959
.then(response => response.text())
6060
.then(str => new DOMParser().parseFromString(str, 'application/xml'));
6161

test/unit/compas/__snapshots__/CompasOpen.test.snap.js

Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -39,3 +39,35 @@ snapshots["compas-open when-project-needs-to-be-selected looks like the latest s
3939
`;
4040
/* end snapshot compas-open when-project-needs-to-be-selected looks like the latest snapshot */
4141

42+
snapshots["compas-open when-type-needs-to-be-selected looks like the latest snapshot"] =
43+
`<compas-divider>
44+
</compas-divider>
45+
<section>
46+
<h3>
47+
[compas.open.localTitle]
48+
</h3>
49+
<input
50+
accept=".sed,.scd,.ssd,.isd,.iid,.cid,.icd"
51+
hidden=""
52+
id="scl-file"
53+
required=""
54+
type="file"
55+
>
56+
<mwc-button label="[compas.open.selectFileButton]">
57+
</mwc-button>
58+
</section>
59+
<compas-divider>
60+
</compas-divider>
61+
<section>
62+
<h3>
63+
[compas.open.compasTitle]
64+
</h3>
65+
<p>
66+
[compas.open.listSclTypes]
67+
</p>
68+
<compas-scltype-list>
69+
</compas-scltype-list>
70+
</section>
71+
`;
72+
/* end snapshot compas-open when-type-needs-to-be-selected looks like the latest snapshot */
73+

test/unit/compas/__snapshots__/CompasScl.test.snap.js

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,3 +27,18 @@ snapshots["compas-scl-list after-list-loaded looks like the latest snapshot"] =
2727
`;
2828
/* end snapshot compas-scl-list after-list-loaded looks like the latest snapshot */
2929

30+
snapshots["compas-scl-list no-items-in-list looks like the latest snapshot"] =
31+
`<mwc-list>
32+
<mwc-list-item
33+
aria-disabled="false"
34+
mwc-list-item=""
35+
tabindex="0"
36+
>
37+
<i>
38+
[compas.noScls]
39+
</i>
40+
</mwc-list-item>
41+
</mwc-list>
42+
`;
43+
/* end snapshot compas-scl-list no-items-in-list looks like the latest snapshot */
44+

test/unit/compas/__snapshots__/CompasScltypeList.test.snap.js

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -40,3 +40,9 @@ snapshots["compas-scltype-list no-items-in-list looks like the latest snapshot"]
4040
`;
4141
/* end snapshot compas-scltype-list no-items-in-list looks like the latest snapshot */
4242

43+
snapshots["compas-scltype-list show-loading looks like the latest snapshot"] =
44+
`<compas-loading>
45+
</compas-loading>
46+
`;
47+
/* end snapshot compas-scltype-list show-loading looks like the latest snapshot */
48+

test/unit/compas/__snapshots__/CompasSession.test.snap.js

Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,3 +19,37 @@ snapshots["compas-session Dialog when expired with document looks like the lates
1919
`;
2020
/* end snapshot compas-session Dialog when expired with document looks like the latest snapshot */
2121

22+
snapshots["compas-session Dialog when almost expired looks like the latest snapshot"] =
23+
`<mwc-dialog
24+
heading="[compas.session.headingExpiring]"
25+
id="compasSessionExpiringDialog"
26+
scrimclickaction=""
27+
>
28+
<div>
29+
[compas.session.explainExpiring]
30+
</div>
31+
<mwc-button
32+
dialogaction="close"
33+
slot="primaryAction"
34+
>
35+
[compas.session.continue]
36+
</mwc-button>
37+
</mwc-dialog>
38+
`;
39+
/* end snapshot compas-session Dialog when almost expired looks like the latest snapshot */
40+
41+
snapshots["compas-session Dialog when expired without document looks like the latest snapshot"] =
42+
`<mwc-dialog
43+
"=""
44+
escapekeyaction=""
45+
heading="[compas.session.headingExpired]"
46+
id="compasSessionExpiredDialog"
47+
scrimclickaction=""
48+
>
49+
<div>
50+
[compas.session.explainExpiredWithoutProject]
51+
</div>
52+
</mwc-dialog>
53+
`;
54+
/* end snapshot compas-session Dialog when expired without document looks like the latest snapshot */
55+

test/unit/compas/__snapshots__/CompasUploadVersion.test.snap.js

Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -37,3 +37,38 @@ snapshots["compas-upload-version existing document in compas looks like the late
3737
`;
3838
/* end snapshot compas-upload-version existing document in compas looks like the latest snapshot */
3939

40+
snapshots["compas-upload-version still determining if document exists in CoMPAS looks like the latest snapshot"] =
41+
`<compas-loading>
42+
</compas-loading>
43+
`;
44+
/* end snapshot compas-upload-version still determining if document exists in CoMPAS looks like the latest snapshot */
45+
46+
snapshots["compas-upload-version existing document in compas through wizard looks like the latest snapshot"] =
47+
`<mwc-dialog
48+
defaultaction="close"
49+
heading="[compas.uploadVersion.title]"
50+
open=""
51+
>
52+
<div id="wizard-content">
53+
<compas-upload-version>
54+
</compas-upload-version>
55+
</div>
56+
<mwc-button
57+
dialogaction="close"
58+
label="[cancel]"
59+
slot="secondaryAction"
60+
style="--mdc-theme-primary: var(--mdc-theme-error)"
61+
>
62+
</mwc-button>
63+
<mwc-button
64+
dialoginitialfocus=""
65+
icon="save"
66+
label="[save]"
67+
slot="primaryAction"
68+
trailingicon=""
69+
>
70+
</mwc-button>
71+
</mwc-dialog>
72+
`;
73+
/* end snapshot compas-upload-version existing document in compas through wizard looks like the latest snapshot */
74+

test/unit/editors/singlelinediagram/__snapshots__/sld-drawing.test.snap.js

Lines changed: 156 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -52,3 +52,159 @@ snapshots["Single Line Diagram drawing creates a group element for every given T
5252
`;
5353
/* end snapshot Single Line Diagram drawing creates a group element for every given Terminal element that looks like its latest snapshot */
5454

55+
snapshots["Single Line Diagram drawing creates a group element for every given VoltageLevel element that looks like its latest snapshot"] =
56+
`<g
57+
desc="Voltage Level"
58+
id="AA1>J1"
59+
sxy:x="2"
60+
sxy:y="6"
61+
type="VoltageLevel"
62+
>
63+
</g>
64+
`;
65+
/* end snapshot Single Line Diagram drawing creates a group element for every given VoltageLevel element that looks like its latest snapshot */
66+
67+
snapshots["Single Line Diagram drawing creates a group element for every given ConductingEquipment element that looks like its latest snapshot"] =
68+
`<g
69+
id="AA1>J1>Bay A>QB1"
70+
sxy:x="2"
71+
sxy:y="2"
72+
type="ConductingEquipment"
73+
>
74+
<path
75+
d="M 12.5 2 L 12.5 8"
76+
fill="transparent"
77+
stroke="currentColor"
78+
stroke-linecap="round"
79+
stroke-width="1.5"
80+
transform="translate(391,1287) scale(2)"
81+
>
82+
</path>
83+
<path
84+
d=" M 12.5 23 L 12.5 18"
85+
fill="transparent"
86+
stroke="currentColor"
87+
stroke-linecap="round"
88+
stroke-width="1.5"
89+
transform="translate(391,1287) scale(2)"
90+
>
91+
</path>
92+
<path
93+
d="M 12.5 18 L 8 9"
94+
fill="transparent"
95+
stroke="currentColor"
96+
stroke-linecap="round"
97+
stroke-width="1.5"
98+
transform="translate(391,1287) scale(2)"
99+
>
100+
</path>
101+
<path
102+
d="M 11.5 8 L 13.5 8"
103+
fill="transparent"
104+
stroke="currentColor"
105+
stroke-linecap="round"
106+
stroke-width="1.5"
107+
transform="translate(391,1287) scale(2)"
108+
>
109+
</path>
110+
<text
111+
style="font-family: Roboto, sans-serif; font-weight: 300; font-size: x-small"
112+
x="376"
113+
y="1317"
114+
>
115+
QB1
116+
</text>
117+
</g>
118+
`;
119+
/* end snapshot Single Line Diagram drawing creates a group element for every given ConductingEquipment element that looks like its latest snapshot */
120+
121+
snapshots["Single Line Diagram drawing creates a group element for every given Bus Bar element that looks like its latest snapshot"] =
122+
`<g
123+
id="AA1>J1>BusBar A"
124+
sxy:x="2"
125+
sxy:y="2"
126+
type="Bay"
127+
>
128+
<line
129+
name="BusBar A"
130+
stroke="currentColor"
131+
stroke-width="4"
132+
x1="256"
133+
x2="200"
134+
y1="512"
135+
y2="512"
136+
>
137+
</line>
138+
<text
139+
style="font-family: Roboto, sans-serif; font-weight: 300; font-size: small"
140+
x="256"
141+
y="502"
142+
>
143+
BusBar A
144+
</text>
145+
</g>
146+
`;
147+
/* end snapshot Single Line Diagram drawing creates a group element for every given Bus Bar element that looks like its latest snapshot */
148+
149+
snapshots["Single Line Diagram drawing creates a group element for every given PowerTransformer element that looks like its latest snapshot"] =
150+
`<g
151+
id="AA1>TA1"
152+
sxy:x="2"
153+
sxy:y="18"
154+
type="PowerTransformer"
155+
>
156+
<line
157+
stroke="currentColor"
158+
stroke-linecap="round"
159+
stroke-width="1.5"
160+
transform="translate(135,1159) scale(2)"
161+
x1="12.5"
162+
x2="12.5"
163+
y1="2"
164+
y2="5"
165+
>
166+
</line>
167+
<circle
168+
cx="12.5"
169+
cy="10"
170+
fill="transparent"
171+
r="5"
172+
stroke="currentColor"
173+
stroke-linecap="round"
174+
stroke-width="1.5"
175+
transform="translate(135,1159) scale(2)"
176+
>
177+
</circle>
178+
<circle
179+
cx="12.5"
180+
cy="15"
181+
fill="transparent"
182+
r="5"
183+
stroke="currentColor"
184+
stroke-linecap="round"
185+
stroke-width="1.5"
186+
transform="translate(135,1159) scale(2)"
187+
>
188+
</circle>
189+
<line
190+
stroke="currentColor"
191+
stroke-linecap="round"
192+
stroke-width="1.5"
193+
transform="translate(135,1159) scale(2)"
194+
x1="12.5"
195+
x2="12.5"
196+
y1="20"
197+
y2="23"
198+
>
199+
</line>
200+
<text
201+
style="font-family: Roboto, sans-serif; font-weight: 300; font-size: x-small"
202+
x="120"
203+
y="1189"
204+
>
205+
TA1
206+
</text>
207+
</g>
208+
`;
209+
/* end snapshot Single Line Diagram drawing creates a group element for every given PowerTransformer element that looks like its latest snapshot */
210+

0 commit comments

Comments
 (0)