1
- import { expect , fixture , html } from '@open-wc/testing' ;
2
- import { SinonSpy , spy } from 'sinon' ;
1
+ import { expect , fixture , html } from '@open-wc/testing' ;
2
+ import { SinonSpy , spy } from 'sinon' ;
3
3
4
4
import '../../../src/open-scd.js' ;
5
- import { OpenSCD } from '../../../src/open-scd.js' ;
6
- import { ComplexAction , isSimple , isUpdate } from '../../../src/foundation.js' ;
5
+ import { OpenSCD } from '../../../src/open-scd.js' ;
6
+
7
+ import { ComplexAction , isSimple , isUpdate } from '../../../src/foundation.js' ;
7
8
import UpdateDescriptionSel from '../../../src/menu/UpdateDescriptionSEL.js' ;
8
9
9
10
describe ( 'Update method for desc attributes in SEL IEDs' , ( ) => {
@@ -48,10 +49,9 @@ describe('Update method for desc attributes in SEL IEDs', () => {
48
49
49
50
describe ( 'working on SCL files without manufacturer SEL' , ( ) => {
50
51
beforeEach ( async ( ) => {
51
- const doc = await fetch ( 'test/testfiles/validators/zeroissues.scd' )
52
+ element . doc = await fetch ( 'test/testfiles/validators/zeroissues.scd' )
52
53
. then ( response => response . text ( ) )
53
54
. then ( str => new DOMParser ( ) . parseFromString ( str , 'application/xml' ) ) ;
54
- element . doc = doc ;
55
55
56
56
signalList = await fetch (
57
57
'test/testfiles/updatedesc/testSignalListSemicolon.csv'
@@ -71,11 +71,9 @@ describe('Update method for desc attributes in SEL IEDs', () => {
71
71
72
72
describe ( 'working on SCL files containing manufacturer SEL' , ( ) => {
73
73
beforeEach ( async ( ) => {
74
- const doc = await fetch ( 'test/testfiles/updatedesc/updatedescSEL.scd' )
74
+ element . doc = await fetch ( 'test/testfiles/updatedesc/updatedescSEL.scd' )
75
75
. then ( response => response . text ( ) )
76
76
. then ( str => new DOMParser ( ) . parseFromString ( str , 'application/xml' ) ) ;
77
-
78
- element . doc = doc ;
79
77
} ) ;
80
78
81
79
describe ( 'using a semicolon separated file' , ( ) => {
@@ -98,6 +96,7 @@ describe('Update method for desc attributes in SEL IEDs', () => {
98
96
?. querySelector < HTMLElement > ( 'mwc-button[slot="primaryAction"]' ) !
99
97
. click ( ) ;
100
98
99
+ await parent . requestUpdate ( ) ;
101
100
await parent . updateComplete ;
102
101
expect ( editorAction ) . to . have . been . calledOnce ;
103
102
expect ( editorAction . args [ 0 ] [ 0 ] . detail . action ) . to . not . satisfy ( isSimple ) ;
0 commit comments