Skip to content

Commit 2f20cda

Browse files
author
Dennis Labordus
committed
Fixed (snapshot) tests.
Signed-off-by: Dennis Labordus <[email protected]>
1 parent 0be2d8d commit 2f20cda

File tree

6 files changed

+11
-38
lines changed

6 files changed

+11
-38
lines changed

test/integration/Setting.test.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ import '../../src/open-scd.js';
44

55
import { OpenSCD } from '../../src/open-scd.js';
66
import { newLoadNsdocEvent } from "../../src/Setting.js";
7-
import { cleanLocalStorageForNsdocFiles } from "../unit/foundation/nsdoc.test.js";
7+
import { cleanLocalStorageForNsdocFiles } from "./foundation.js";
88

99
describe('Setting', () => {
1010
let element: OpenSCD;

test/integration/__snapshots__/Setting.test.snap.js

Lines changed: 1 addition & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
/* @web/test-runner snapshot v1 */
22
export const snapshots = {};
33

4-
snapshots["Setting upload .nsdoc file using event and looks like latest snapshot"] =
4+
snapshots["Setting upload .nsdoc file using event and looks like latest snapshot"] =
55
`<mwc-drawer
66
class="mdc-theme--surface"
77
hasheader=""
@@ -1138,19 +1138,6 @@ snapshots["Setting upload .nsdoc file using event and looks like latest snapshot
11381138
<h3>
11391139
Uploaded NSDoc files
11401140
</h3>
1141-
<input
1142-
accept=".nsdoc"
1143-
hidden=""
1144-
id="nsdoc-file"
1145-
multiple=""
1146-
required=""
1147-
type="file"
1148-
>
1149-
<mwc-button
1150-
id="selectFileButton"
1151-
label="Select file"
1152-
>
1153-
</mwc-button>
11541141
</section>
11551142
<mwc-list id="nsdocList">
11561143
<mwc-list-item

test/integration/__snapshots__/open-scd.test.snap.js

Lines changed: 1 addition & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
/* @web/test-runner snapshot v1 */
22
export const snapshots = {};
33

4-
snapshots["open-scd looks like its snapshot"] =
4+
snapshots["open-scd looks like its snapshot"] =
55
`<mwc-drawer
66
class="mdc-theme--surface"
77
hasheader=""
@@ -1312,19 +1312,6 @@ snapshots["open-scd looks like its snapshot"] =
13121312
<h3>
13131313
Uploaded NSDoc files
13141314
</h3>
1315-
<input
1316-
accept=".nsdoc"
1317-
hidden=""
1318-
id="nsdoc-file"
1319-
multiple=""
1320-
required=""
1321-
type="file"
1322-
>
1323-
<mwc-button
1324-
id="selectFileButton"
1325-
label="Select file"
1326-
>
1327-
</mwc-button>
13281315
</section>
13291316
<mwc-list id="nsdocList">
13301317
<mwc-list-item

test/integration/foundation.ts

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
export function cleanLocalStorageForNsdocFiles(): void {
2+
// Cleanup NSDoc Files from LocalStorage
3+
localStorage.removeItem('IEC 61850-7-2');
4+
localStorage.removeItem('IEC 61850-7-3');
5+
localStorage.removeItem('IEC 61850-7-4');
6+
localStorage.removeItem('IEC 61850-8-1');
7+
}

test/integration/open-scd.test.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ import { html, fixture, expect } from '@open-wc/testing';
33
import '../../src/open-scd.js';
44
import { newEmptySCD } from '../../src/schemas.js';
55
import { OpenSCD } from '../../src/open-scd.js';
6-
import { cleanLocalStorageForNsdocFiles } from "../unit/foundation/nsdoc.test.js";
6+
import { cleanLocalStorageForNsdocFiles } from "./foundation.js";
77

88
describe('open-scd', () => {
99
let element: OpenSCD;

test/unit/foundation/nsdoc.test.ts

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -146,11 +146,3 @@ describe('nsdoc', () => {
146146
});
147147
});
148148
});
149-
150-
export function cleanLocalStorageForNsdocFiles() {
151-
// Cleanup NSDoc Files from LocalStorage
152-
localStorage.removeItem('IEC 61850-7-2');
153-
localStorage.removeItem('IEC 61850-7-3');
154-
localStorage.removeItem('IEC 61850-7-4');
155-
localStorage.removeItem('IEC 61850-8-1');
156-
}

0 commit comments

Comments
 (0)