From 02ec714e7ac44204a972b55a872e0445eab66e72 Mon Sep 17 00:00:00 2001 From: Dennis Labordus Date: Thu, 13 Oct 2022 17:30:25 +0200 Subject: [PATCH] feat(editor/subscriber): Show counter for Subscriber Plugins (Logical Nodes / Later) (GOOSE/SMV) (#1040) * Added plugin and show FCDA Elements including edit button * Added plugin and show FCDA Elements including edit button * Added plugin and show FCDA Elements including edit button + renaming other subscriber plugins * Fixed plugin test * Show connected and available LN + small fixes * First version of subscribe and unsubscribe * Added test for subscribing and unsubscribing logica node binding * First step for the counter, refactoring list methods to re-use logic. Also removed sorting. * Added counter logic to both subscriber plugins * Processed review comments. * Changed query to retrieve available LN Classes to match only data binding ExtRefs * Fix performance issue. * Fixed snapshot. * Review comments processed * Fixed tests. * Fixed test. --- src/editors/GooseSubscriberDataBinding.ts | 3 +- src/editors/GooseSubscriberLaterBinding.ts | 5 +- src/editors/SMVSubscriberDataBinding.ts | 3 +- src/editors/SMVSubscriberLaterBinding.ts | 5 +- src/editors/subscription/fcda-binding-list.ts | 71 +++++- src/editors/subscription/foundation.ts | 25 +- .../ext-ref-later-binding-list.ts | 91 +++---- .../later-binding/ext-ref-ln-binding-list.ts | 67 +++-- .../subscription/later-binding/foundation.ts | 66 ++++- .../GooseSubscriberDataBinding.test.ts | 9 +- .../GooseSubscriberLaterBinding.test.ts | 5 + .../editors/SMVSubscriberDataBinding.test.ts | 5 + .../editors/SMVSubscriberLaterBinding.test.ts | 5 + test/integration/editors/test-support.ts | 8 + .../fcda-binding-list.test.snap.js | 230 +++++++++--------- .../subscription/fcda-binding-list.test.ts | 4 +- .../ext-ref-later-binding-list.test.snap.js | 204 ++++++++-------- .../ext-ref-ln-binding-list.test.snap.js | 220 +++++++++++------ .../ext-ref-ln-binding-list.test.ts | 4 +- .../later-binding/foundation.test.ts | 37 ++- 20 files changed, 634 insertions(+), 433 deletions(-) diff --git a/src/editors/GooseSubscriberDataBinding.ts b/src/editors/GooseSubscriberDataBinding.ts index e36afc196..4f42f386f 100644 --- a/src/editors/GooseSubscriberDataBinding.ts +++ b/src/editors/GooseSubscriberDataBinding.ts @@ -18,7 +18,8 @@ export default class GooseSubscribeDataBindingPlugin extends LitElement { diff --git a/src/editors/SMVSubscriberDataBinding.ts b/src/editors/SMVSubscriberDataBinding.ts index 6903bfc93..93f10ff1c 100644 --- a/src/editors/SMVSubscriberDataBinding.ts +++ b/src/editors/SMVSubscriberDataBinding.ts @@ -18,7 +18,8 @@ export default class SMVSubscribeDataBindingPlugin extends LitElement { diff --git a/src/editors/subscription/fcda-binding-list.ts b/src/editors/subscription/fcda-binding-list.ts index 3f2167561..71021ace4 100644 --- a/src/editors/subscription/fcda-binding-list.ts +++ b/src/editors/subscription/fcda-binding-list.ts @@ -16,7 +16,6 @@ import '@material/mwc-list'; import '@material/mwc-list/mwc-list-item'; import { - compareNames, getDescriptionAttribute, getNameAttribute, identity, @@ -25,7 +24,13 @@ import { import { gooseIcon, smvIcon } from '../../icons/icons.js'; import { wizards } from '../../wizards/wizard-library.js'; -import { getFcdaTitleValue, newFcdaSelectEvent, styles } from './foundation.js'; +import { + getFcdaTitleValue, + newFcdaSelectEvent, + styles, + SubscriptionChangedEvent, +} from './foundation.js'; +import { getSubscribedExtRefElements } from './later-binding/foundation.js'; type controlTag = 'SampledValueControl' | 'GSEControl'; @@ -42,14 +47,18 @@ export class FcdaBindingList extends LitElement { doc!: XMLDocument; @property() controlTag!: controlTag; + @property() + includeLaterBinding!: boolean; // The selected Elements when a FCDA Line is clicked. @state() - selectedControlElement: Element | undefined; + private selectedControlElement: Element | undefined; @state() - selectedFcdaElement: Element | undefined; + private selectedFcdaElement: Element | undefined; + @state() + private extRefCounters = new Map(); - iconControlLookup: iconLookup = { + private iconControlLookup: iconLookup = { SampledValueControl: smvIcon, GSEControl: gooseIcon, }; @@ -59,13 +68,17 @@ export class FcdaBindingList extends LitElement { this.resetSelection = this.resetSelection.bind(this); parent.addEventListener('open-doc', this.resetSelection); + + const parentDiv = this.closest('.container'); + if (parentDiv) { + this.resetExtRefCount = this.resetExtRefCount.bind(this); + parentDiv.addEventListener('subscription-changed', this.resetExtRefCount); + } } private getControlElements(): Element[] { if (this.doc) { - return Array.from( - this.doc.querySelectorAll(`LN0 > ${this.controlTag}`) - ).sort((a, b) => compareNames(`${identity(a)}`, `${identity(b)}`)); + return Array.from(this.doc.querySelectorAll(`LN0 > ${this.controlTag}`)); } return []; } @@ -79,11 +92,40 @@ export class FcdaBindingList extends LitElement { 'datSet' )}] > FCDA` ) - ).sort((a, b) => compareNames(`${identity(a)}`, `${identity(b)}`)); + ); } return []; } + private resetExtRefCount(event: SubscriptionChangedEvent): void { + if (event.detail.control && event.detail.fcda) { + const controlBlockFcdaId = `${identity(event.detail.control)} ${identity( + event.detail.fcda + )}`; + this.extRefCounters.delete(controlBlockFcdaId); + } + } + + private getExtRefCount( + fcdaElement: Element, + controlElement: Element + ): number { + const controlBlockFcdaId = `${identity(controlElement)} ${identity( + fcdaElement + )}`; + if (!this.extRefCounters.has(controlBlockFcdaId)) { + const extRefCount = getSubscribedExtRefElements( + this.doc.getRootNode(), + this.controlTag, + fcdaElement, + controlElement!, + this.includeLaterBinding + ).length; + this.extRefCounters.set(controlBlockFcdaId, extRefCount); + } + return this.extRefCounters.get(controlBlockFcdaId); + } + private openEditWizard(controlElement: Element): void { const wizard = wizards[this.controlTag].edit(controlElement); if (wizard) this.dispatchEvent(newWizardEvent(wizard)); @@ -104,7 +146,8 @@ export class FcdaBindingList extends LitElement { protected updated(_changedProperties: PropertyValues): void { super.updated(_changedProperties); - // When the document is updated, we will fire the event again. + // When a new document is loaded or the selection is changed + // we will fire the FCDA Select Event. if ( _changedProperties.has('doc') || _changedProperties.has('selectedControlElement') || @@ -117,11 +160,18 @@ export class FcdaBindingList extends LitElement { ) ); } + + // When a new document is loaded we will reset the Map to clear old entries. + if (_changedProperties.has('doc')) { + this.extRefCounters = new Map(); + } } renderFCDA(controlElement: Element, fcdaElement: Element): TemplateResult { + const fcdaCount = this.getExtRefCount(fcdaElement, controlElement); return html` this.onFcdaSelect(controlElement, fcdaElement)} @@ -138,6 +188,7 @@ export class FcdaBindingList extends LitElement { ${fcdaElement.getAttribute('lnInst')} subdirectory_arrow_right + ${fcdaCount !== 0 ? html`${fcdaCount}` : nothing} `; } diff --git a/src/editors/subscription/foundation.ts b/src/editors/subscription/foundation.ts index 0ed920613..fbac82c5f 100644 --- a/src/editors/subscription/foundation.ts +++ b/src/editors/subscription/foundation.ts @@ -54,12 +54,12 @@ export function newIEDSelectEvent( } export interface FcdaSelectDetail { - controlElement: Element | undefined; + control: Element | undefined; fcda: Element | undefined; } export type FcdaSelectEvent = CustomEvent; export function newFcdaSelectEvent( - controlElement: Element | undefined, + control: Element | undefined, fcda: Element | undefined, eventInitDict?: CustomEventInit ): FcdaSelectEvent { @@ -67,7 +67,25 @@ export function newFcdaSelectEvent( bubbles: true, composed: true, ...eventInitDict, - detail: { controlElement, fcda, ...eventInitDict?.detail }, + detail: { control, fcda, ...eventInitDict?.detail }, + }); +} + +export interface SubscriptionChangedDetail { + control: Element | undefined; + fcda: Element | undefined; +} +export type SubscriptionChangedEvent = CustomEvent; +export function newSubscriptionChangedEvent( + control: Element | undefined, + fcda: Element | undefined, + eventInitDict?: CustomEventInit +): SubscriptionChangedEvent { + return new CustomEvent('subscription-changed', { + bubbles: true, + composed: true, + ...eventInitDict, + detail: { control, fcda, ...eventInitDict?.detail }, }); } @@ -408,5 +426,6 @@ declare global { ['view']: ViewEvent; ['ied-select']: IEDSelectEvent; ['fcda-select']: FcdaSelectEvent; + ['subscription-changed']: SubscriptionChangedEvent; } } diff --git a/src/editors/subscription/later-binding/ext-ref-later-binding-list.ts b/src/editors/subscription/later-binding/ext-ref-later-binding-list.ts index 7d5c3ee30..059982fc0 100644 --- a/src/editors/subscription/later-binding/ext-ref-later-binding-list.ts +++ b/src/editors/subscription/later-binding/ext-ref-later-binding-list.ts @@ -12,7 +12,6 @@ import { translate } from 'lit-translate'; import { cloneElement, - compareNames, getDescriptionAttribute, identity, newActionEvent, @@ -21,11 +20,15 @@ import { import { FcdaSelectEvent, - serviceTypes, + newSubscriptionChangedEvent, styles, updateExtRefElement, } from '../foundation.js'; -import { isSubscribedTo } from './foundation.js'; +import { + getExtRefElements, + getSubscribedExtRefElements, + isSubscribed, +} from './foundation.js'; /** * A sub element for showing all Ext Refs from a FCDA Element. @@ -55,41 +58,8 @@ export class ExtRefLaterBindingList extends LitElement { } } - private getExtRefElements(): Element[] { - if (this.doc) { - return Array.from(this.doc.querySelectorAll('ExtRef')) - .filter(element => element.hasAttribute('intAddr')) - .filter(element => element.closest('IED') !== this.currentIedElement) - .sort((a, b) => - compareNames( - `${a.getAttribute('intAddr')}`, - `${b.getAttribute('intAddr')}` - ) - ); - } - return []; - } - - private getSubscribedExtRefElements(): Element[] { - return this.getExtRefElements().filter(extRefElement => - isSubscribedTo( - serviceTypes[this.controlTag], - this.currentIedElement, - this.currentSelectedControlElement, - this.currentSelectedFcdaElement, - extRefElement - ) - ); - } - - private getAvailableExtRefElements(): Element[] { - return this.getExtRefElements().filter( - element => !this.isSubscribed(element) - ); - } - private async onFcdaSelectEvent(event: FcdaSelectEvent) { - this.currentSelectedControlElement = event.detail.controlElement; + this.currentSelectedControlElement = event.detail.control; this.currentSelectedFcdaElement = event.detail.fcda; // Retrieve the IED Element to which the FCDA belongs. @@ -99,23 +69,6 @@ export class ExtRefLaterBindingList extends LitElement { : undefined; } - /** - * Check if the ExtRef is already subscribed to a FCDA Element. - * - * @param extRefElement - The Ext Ref Element to check. - */ - private isSubscribed(extRefElement: Element): boolean { - return ( - extRefElement.hasAttribute('iedName') && - extRefElement.hasAttribute('ldInst') && - extRefElement.hasAttribute('prefix') && - extRefElement.hasAttribute('lnClass') && - extRefElement.hasAttribute('lnInst') && - extRefElement.hasAttribute('doName') && - extRefElement.hasAttribute('daName') - ); - } - /** * The data attribute check using attributes pLN, pDO, pDA and pServT is not supported yet by this plugin. * To make sure the user does not do anything prohibited, this type of ExtRef cannot be manipulated for the time being. @@ -194,6 +147,24 @@ export class ExtRefLaterBindingList extends LitElement { }; } + private getSubscribedExtRefElements(): Element[] { + return getSubscribedExtRefElements( + this.doc.getRootNode(), + this.controlTag, + this.currentSelectedFcdaElement, + this.currentSelectedControlElement, + true + ); + } + + private getAvailableExtRefElements(): Element[] { + return getExtRefElements( + this.doc.getRootNode(), + this.currentSelectedFcdaElement, + true + ).filter(extRefElement => !isSubscribed(extRefElement)); + } + private renderTitle(): TemplateResult { return html`

${translate(`subscription.laterBinding.extRefList.title`)} @@ -226,6 +197,12 @@ export class ExtRefLaterBindingList extends LitElement { const replaceAction = this.unsubscribe(extRefElement); if (replaceAction) { this.dispatchEvent(newActionEvent(replaceAction)); + this.dispatchEvent( + newSubscriptionChangedEvent( + this.currentSelectedControlElement, + this.currentSelectedFcdaElement + ) + ); } }} value="${identity(extRefElement)}" @@ -277,6 +254,12 @@ export class ExtRefLaterBindingList extends LitElement { const replaceAction = this.subscribe(extRefElement); if (replaceAction) { this.dispatchEvent(newActionEvent(replaceAction)); + this.dispatchEvent( + newSubscriptionChangedEvent( + this.currentSelectedControlElement, + this.currentSelectedFcdaElement + ) + ); } }} value="${identity(extRefElement)}" diff --git a/src/editors/subscription/later-binding/ext-ref-ln-binding-list.ts b/src/editors/subscription/later-binding/ext-ref-ln-binding-list.ts index 232ee22fe..6df8b1f0a 100644 --- a/src/editors/subscription/later-binding/ext-ref-ln-binding-list.ts +++ b/src/editors/subscription/later-binding/ext-ref-ln-binding-list.ts @@ -24,10 +24,10 @@ import { createExtRefElement, existExtRef, FcdaSelectEvent, - serviceTypes, + newSubscriptionChangedEvent, styles, } from '../foundation.js'; -import { isSubscribedTo } from './foundation.js'; +import { getSubscribedExtRefElements } from './foundation.js'; import { emptyInputsDeleteActions, getFcdaReferences, @@ -67,54 +67,39 @@ export class ExtRefLnBindingList extends LitElement { if (this.doc) { return Array.from( this.doc.querySelectorAll('LDevice > LN0, LDevice > LN') - ) - .filter(element => element.closest('IED') !== this.currentIedElement) - .sort((a, b) => - ( - identity(a.closest('LDevice')) + - ' ' + - this.buildLNTitle(a) - ).localeCompare( - identity(b.closest('LDevice')) + ' ' + this.buildLNTitle(b) - ) - ); + ).filter(element => element.closest('IED') !== this.currentIedElement); } return []; } private getSubscribedLNElements(): Element[] { - return this.getLNElements().filter(element => - Array.from(element.querySelectorAll('ExtRef')) - .filter(extRefElement => extRefElement.getAttribute('intAddr') === null) - .some(extRefElement => - isSubscribedTo( - serviceTypes[this.controlTag], - this.currentIedElement, - this.currentSelectedControlElement, - this.currentSelectedFcdaElement, - extRefElement - ) - ) + return this.getLNElements().filter( + element => + getSubscribedExtRefElements( + element, + this.controlTag, + this.currentSelectedFcdaElement, + this.currentSelectedControlElement, + false + ).length > 0 ); } private getAvailableLNElements(): Element[] { return this.getLNElements().filter( element => - !Array.from(element.querySelectorAll('ExtRef')).some(extRefElement => - isSubscribedTo( - serviceTypes[this.controlTag], - this.currentIedElement, - this.currentSelectedControlElement, - this.currentSelectedFcdaElement, - extRefElement - ) - ) + getSubscribedExtRefElements( + element, + this.controlTag, + this.currentSelectedFcdaElement, + this.currentSelectedControlElement, + false + ).length == 0 ); } private async onFcdaSelectEvent(event: FcdaSelectEvent) { - this.currentSelectedControlElement = event.detail.controlElement; + this.currentSelectedControlElement = event.detail.control; this.currentSelectedFcdaElement = event.detail.fcda; // Retrieve the IED Element to which the FCDA belongs. @@ -240,6 +225,12 @@ export class ExtRefLnBindingList extends LitElement { const replaceAction = this.unsubscribe(lnElement); if (replaceAction) { this.dispatchEvent(newActionEvent(replaceAction)); + this.dispatchEvent( + newSubscriptionChangedEvent( + this.currentSelectedControlElement, + this.currentSelectedFcdaElement + ) + ); } }} > @@ -286,6 +277,12 @@ export class ExtRefLnBindingList extends LitElement { const replaceAction = this.subscribe(lnElement); if (replaceAction) { this.dispatchEvent(newActionEvent(replaceAction)); + this.dispatchEvent( + newSubscriptionChangedEvent( + this.currentSelectedControlElement, + this.currentSelectedFcdaElement + ) + ); } }} > diff --git a/src/editors/subscription/later-binding/foundation.ts b/src/editors/subscription/later-binding/foundation.ts index bfd9e0854..17cfbe827 100644 --- a/src/editors/subscription/later-binding/foundation.ts +++ b/src/editors/subscription/later-binding/foundation.ts @@ -1,5 +1,7 @@ import { getSclSchemaVersion } from '../../../foundation.js'; +import { serviceTypes } from '../foundation.js'; + /** * Simple function to check if the attribute of the Left Side has the same value as the attribute of the Right Element. * @@ -41,12 +43,12 @@ export function sameAttributeValueDiffName( /** * If needed check version specific attributes against FCDA Element. * - * @param serviceType - Indicates which type of control element. + * @param controlTag - Indicates which type of control element. * @param controlElement - The Control Element to check against. * @param extRefElement - The Ext Ref Element to check. */ function checkEditionSpecificRequirements( - serviceType: string | undefined, + controlTag: 'SampledValueControl' | 'GSEControl', controlElement: Element | undefined, extRefElement: Element ): boolean { @@ -60,7 +62,8 @@ function checkEditionSpecificRequirements( // For the 2007B and 2007B4 Edition we need to check some extra attributes. return ( - (extRefElement.getAttribute('serviceType') ?? '') === serviceType && + (extRefElement.getAttribute('serviceType') ?? '') === + serviceTypes[controlTag] && sameAttributeValueDiffName( extRefElement, 'srcLDInst', @@ -94,28 +97,73 @@ function checkEditionSpecificRequirements( * and also if the IED Name is the same. If that is the case this ExtRef subscribes to the selected FCDA * Element. * - * @param serviceType - Indicates which type of control element. - * @param iedElement - The IED Element to check against. + * @param controlTag - Indicates which type of control element. * @param controlElement - The Control Element to check against. * @param fcdaElement - The FCDA Element to check against. * @param extRefElement - The Ext Ref Element to check. */ export function isSubscribedTo( - serviceType: string | undefined, - iedElement: Element | undefined, + controlTag: 'SampledValueControl' | 'GSEControl', controlElement: Element | undefined, fcdaElement: Element | undefined, extRefElement: Element ): boolean { return ( extRefElement.getAttribute('iedName') === - iedElement?.getAttribute('name') && + fcdaElement?.closest('IED')?.getAttribute('name') && sameAttributeValue(fcdaElement, extRefElement, 'ldInst') && sameAttributeValue(fcdaElement, extRefElement, 'prefix') && sameAttributeValue(fcdaElement, extRefElement, 'lnClass') && sameAttributeValue(fcdaElement, extRefElement, 'lnInst') && sameAttributeValue(fcdaElement, extRefElement, 'doName') && sameAttributeValue(fcdaElement, extRefElement, 'daName') && - checkEditionSpecificRequirements(serviceType, controlElement, extRefElement) + checkEditionSpecificRequirements(controlTag, controlElement, extRefElement) + ); +} + +/** + * Check if the ExtRef is already subscribed to a FCDA Element. + * + * @param extRefElement - The Ext Ref Element to check. + */ +export function isSubscribed(extRefElement: Element): boolean { + return ( + extRefElement.hasAttribute('iedName') && + extRefElement.hasAttribute('ldInst') && + extRefElement.hasAttribute('prefix') && + extRefElement.hasAttribute('lnClass') && + extRefElement.hasAttribute('lnInst') && + extRefElement.hasAttribute('doName') && + extRefElement.hasAttribute('daName') + ); +} + +export function getExtRefElements( + rootElement: Element, + fcdaElement: Element | undefined, + includeLaterBinding: boolean +): Element[] { + return Array.from(rootElement.querySelectorAll('ExtRef')) + .filter( + element => + (includeLaterBinding && element.hasAttribute('intAddr')) || + (!includeLaterBinding && !element.hasAttribute('intAddr')) + ) + .filter(element => element.closest('IED') !== fcdaElement?.closest('IED')); +} + +export function getSubscribedExtRefElements( + rootElement: Element, + controlTag: 'SampledValueControl' | 'GSEControl', + fcdaElement: Element | undefined, + controlElement: Element | undefined, + includeLaterBinding: boolean +): Element[] { + return getExtRefElements( + rootElement, + fcdaElement, + includeLaterBinding + ).filter(extRefElement => + isSubscribedTo(controlTag, controlElement, fcdaElement, extRefElement) ); } diff --git a/test/integration/editors/GooseSubscriberDataBinding.test.ts b/test/integration/editors/GooseSubscriberDataBinding.test.ts index 24e193aee..c5119fa80 100644 --- a/test/integration/editors/GooseSubscriberDataBinding.test.ts +++ b/test/integration/editors/GooseSubscriberDataBinding.test.ts @@ -8,6 +8,7 @@ import GooseSubscriberDataBinding from '../../../src/editors/GooseSubscriberData import { getExtrefDataBindingList, getFCDABindingList, + getSelectedSubItemValue, } from './test-support.js'; describe('GOOSE Subscribe Data Binding Plugin', async () => { @@ -48,6 +49,7 @@ describe('GOOSE Subscribe Data Binding Plugin', async () => { expect(extRefListElement['getSubscribedLNElements']().length).to.be.equal( 0 ); + expect(getSelectedSubItemValue(fcdaListElement)).to.be.null; expect(extRefListElement['getAvailableLNElements']().length).to.be.equal(8); expect( element.doc.querySelectorAll( @@ -65,6 +67,7 @@ describe('GOOSE Subscribe Data Binding Plugin', async () => { expect(extRefListElement['getSubscribedLNElements']().length).to.be.equal( 1 ); + expect(getSelectedSubItemValue(fcdaListElement)).to.have.text('1'); expect(extRefListElement['getAvailableLNElements']().length).to.be.equal(7); expect( element.doc.querySelectorAll( @@ -88,7 +91,8 @@ describe('GOOSE Subscribe Data Binding Plugin', async () => { expect(extRefListElement['getSubscribedLNElements']().length).to.be.equal( 1 ); - expect(extRefListElement['getAvailableLNElements']().length).to.be.equal(5); + expect(getSelectedSubItemValue(fcdaListElement)).to.have.text('1'); + expect(extRefListElement['getAvailableLNElements']().length).to.be.equal(7); expect( element.doc.querySelectorAll( @@ -106,7 +110,8 @@ describe('GOOSE Subscribe Data Binding Plugin', async () => { expect(extRefListElement['getSubscribedLNElements']().length).to.be.equal( 0 ); - expect(extRefListElement['getAvailableLNElements']().length).to.be.equal(6); + expect(getSelectedSubItemValue(fcdaListElement)).to.be.null; + expect(extRefListElement['getAvailableLNElements']().length).to.be.equal(8); expect( element.doc.querySelectorAll( diff --git a/test/integration/editors/GooseSubscriberLaterBinding.test.ts b/test/integration/editors/GooseSubscriberLaterBinding.test.ts index cd4fd1d1e..d2e26d9e0 100644 --- a/test/integration/editors/GooseSubscriberLaterBinding.test.ts +++ b/test/integration/editors/GooseSubscriberLaterBinding.test.ts @@ -6,6 +6,7 @@ import GooseSubscriberLaterBinding from '../../../src/editors/GooseSubscriberLat import { getExtrefLaterBindingList, getFCDABindingList, + getSelectedSubItemValue, } from './test-support.js'; describe('GOOSE Subscribe Later Binding Plugin', () => { @@ -43,6 +44,7 @@ describe('GOOSE Subscribe Later Binding Plugin', () => { expect( extRefListElement['getSubscribedExtRefElements']().length ).to.be.equal(0); + expect(getSelectedSubItemValue(fcdaListElement)).to.be.null; expect( extRefListElement['getAvailableExtRefElements']().length ).to.be.equal(4); @@ -57,6 +59,7 @@ describe('GOOSE Subscribe Later Binding Plugin', () => { expect( extRefListElement['getSubscribedExtRefElements']().length ).to.be.equal(1); + expect(getSelectedSubItemValue(fcdaListElement)).to.have.text('1'); expect( extRefListElement['getAvailableExtRefElements']().length ).to.be.equal(3); @@ -77,6 +80,7 @@ describe('GOOSE Subscribe Later Binding Plugin', () => { expect( extRefListElement['getSubscribedExtRefElements']().length ).to.be.equal(2); + expect(getSelectedSubItemValue(fcdaListElement)).to.have.text('2'); expect( extRefListElement['getAvailableExtRefElements']().length ).to.be.equal(4); @@ -91,6 +95,7 @@ describe('GOOSE Subscribe Later Binding Plugin', () => { expect( extRefListElement['getSubscribedExtRefElements']().length ).to.be.equal(1); + expect(getSelectedSubItemValue(fcdaListElement)).to.have.text('1'); expect( extRefListElement['getAvailableExtRefElements']().length ).to.be.equal(5); diff --git a/test/integration/editors/SMVSubscriberDataBinding.test.ts b/test/integration/editors/SMVSubscriberDataBinding.test.ts index 84d899c9b..4668801a2 100644 --- a/test/integration/editors/SMVSubscriberDataBinding.test.ts +++ b/test/integration/editors/SMVSubscriberDataBinding.test.ts @@ -8,6 +8,7 @@ import SMVSubscriberDataBinding from '../../../src/editors/SMVSubscriberDataBind import { getExtrefDataBindingList, getFCDABindingList, + getSelectedSubItemValue, } from './test-support.js'; describe('SMV Subscribe Data Binding Plugin', async () => { @@ -48,6 +49,7 @@ describe('SMV Subscribe Data Binding Plugin', async () => { expect(extRefListElement['getSubscribedLNElements']().length).to.be.equal( 1 ); + expect(getSelectedSubItemValue(fcdaListElement)).to.have.text('1'); expect(extRefListElement['getAvailableLNElements']().length).to.be.equal(7); expect( element.doc.querySelectorAll( @@ -65,6 +67,7 @@ describe('SMV Subscribe Data Binding Plugin', async () => { expect(extRefListElement['getSubscribedLNElements']().length).to.be.equal( 2 ); + expect(getSelectedSubItemValue(fcdaListElement)).to.have.text('2'); expect(extRefListElement['getAvailableLNElements']().length).to.be.equal(6); expect( element.doc.querySelectorAll( @@ -88,6 +91,7 @@ describe('SMV Subscribe Data Binding Plugin', async () => { expect(extRefListElement['getSubscribedLNElements']().length).to.be.equal( 2 ); + expect(getSelectedSubItemValue(fcdaListElement)).to.have.text('2'); expect(extRefListElement['getAvailableLNElements']().length).to.be.equal(6); expect( element.doc.querySelectorAll( @@ -105,6 +109,7 @@ describe('SMV Subscribe Data Binding Plugin', async () => { expect(extRefListElement['getSubscribedLNElements']().length).to.be.equal( 1 ); + expect(getSelectedSubItemValue(fcdaListElement)).to.have.text('1'); expect(extRefListElement['getAvailableLNElements']().length).to.be.equal(7); expect( element.doc.querySelectorAll( diff --git a/test/integration/editors/SMVSubscriberLaterBinding.test.ts b/test/integration/editors/SMVSubscriberLaterBinding.test.ts index ea397187e..3e5405254 100644 --- a/test/integration/editors/SMVSubscriberLaterBinding.test.ts +++ b/test/integration/editors/SMVSubscriberLaterBinding.test.ts @@ -7,6 +7,7 @@ import SMVSubscribeLaterBindingPlugin from '../../../src/editors/SMVSubscriberLa import { getExtrefLaterBindingList, getFCDABindingList, + getSelectedSubItemValue, } from './test-support.js'; describe('SMV Subscribe Later Binding plugin', () => { @@ -44,6 +45,7 @@ describe('SMV Subscribe Later Binding plugin', () => { expect( extRefListElement['getSubscribedExtRefElements']().length ).to.be.equal(0); + expect(getSelectedSubItemValue(fcdaListElement)).to.be.null; expect( extRefListElement['getAvailableExtRefElements']().length ).to.be.equal(8); @@ -58,6 +60,7 @@ describe('SMV Subscribe Later Binding plugin', () => { expect( extRefListElement['getSubscribedExtRefElements']().length ).to.be.equal(1); + expect(getSelectedSubItemValue(fcdaListElement)).to.have.text('1'); expect( extRefListElement['getAvailableExtRefElements']().length ).to.be.equal(7); @@ -77,6 +80,7 @@ describe('SMV Subscribe Later Binding plugin', () => { expect( extRefListElement['getSubscribedExtRefElements']().length ).to.be.equal(3); + expect(getSelectedSubItemValue(fcdaListElement)).to.have.text('3'); expect( extRefListElement['getAvailableExtRefElements']().length ).to.be.equal(8); @@ -91,6 +95,7 @@ describe('SMV Subscribe Later Binding plugin', () => { expect( extRefListElement['getSubscribedExtRefElements']().length ).to.be.equal(2); + expect(getSelectedSubItemValue(fcdaListElement)).to.have.text('2'); expect( extRefListElement['getAvailableExtRefElements']().length ).to.be.equal(9); diff --git a/test/integration/editors/test-support.ts b/test/integration/editors/test-support.ts index cd8f273f8..b9e1c7ac3 100644 --- a/test/integration/editors/test-support.ts +++ b/test/integration/editors/test-support.ts @@ -34,3 +34,11 @@ export function getExtrefLaterBindingList( element.shadowRoot?.querySelector('extref-later-binding-list') ); } + +export function getSelectedSubItemValue( + element: FcdaBindingList +): Element | null { + return element.shadowRoot!.querySelector( + '.subitem[selected] span[slot="meta"]' + ); +} diff --git a/test/unit/editors/subscription/__snapshots__/fcda-binding-list.test.snap.js b/test/unit/editors/subscription/__snapshots__/fcda-binding-list.test.snap.js index 907477a76..213e299b1 100644 --- a/test/unit/editors/subscription/__snapshots__/fcda-binding-list.test.snap.js +++ b/test/unit/editors/subscription/__snapshots__/fcda-binding-list.test.snap.js @@ -23,7 +23,7 @@ snapshots["fcda-binding-list with a SampledValueControl doc loaded looks like th noninteractive="" tabindex="-1" twoline="" - value="SMV_Publisher>>CurrentTransformer>currentOnly SMV_Publisher>>CurrentTransformer>currentOnlysDataSet>CurrentTransformer/L1 TCTR 1.AmpSv instMag.i (MX) SMV_Publisher>>CurrentTransformer>currentOnlysDataSet>CurrentTransformer/L1 TCTR 1.AmpSv q (MX) SMV_Publisher>>CurrentTransformer>currentOnlysDataSet>CurrentTransformer/L2 TCTR 1.AmpSv instMag.i (MX) SMV_Publisher>>CurrentTransformer>currentOnlysDataSet>CurrentTransformer/L2 TCTR 1.AmpSv q (MX) SMV_Publisher>>CurrentTransformer>currentOnlysDataSet>CurrentTransformer/L3 TCTR 1.AmpSv instMag.i (MX) SMV_Publisher>>CurrentTransformer>currentOnlysDataSet>CurrentTransformer/L3 TCTR 1.AmpSv q (MX)" + value="SMV_Publisher>>CurrentTransformer>fullSmv SMV_Publisher>>CurrentTransformer>fullSmvsDataSet>CurrentTransformer/L3 TCTR 1.AmpSv instMag.i (MX) SMV_Publisher>>CurrentTransformer>fullSmvsDataSet>CurrentTransformer/L3 TCTR 1.AmpSv q (MX) SMV_Publisher>>CurrentTransformer>fullSmvsDataSet>CurrentTransformer/L2 TCTR 1.AmpSv instMag.i (MX) SMV_Publisher>>CurrentTransformer>fullSmvsDataSet>CurrentTransformer/L2 TCTR 1.AmpSv q (MX) SMV_Publisher>>CurrentTransformer>fullSmvsDataSet>CurrentTransformer/L1 TCTR 1.AmpSv instMag.i (MX) SMV_Publisher>>CurrentTransformer>fullSmvsDataSet>CurrentTransformer/L1 TCTR 1.AmpSv q (MX) SMV_Publisher>>CurrentTransformer>fullSmvsDataSet>VoltageTransformer/L3 TVTR 1.VolSv instMag.i (MX) SMV_Publisher>>CurrentTransformer>fullSmvsDataSet>VoltageTransformer/L3 TVTR 1.VolSv q (MX) SMV_Publisher>>CurrentTransformer>fullSmvsDataSet>VoltageTransformer/L2 TVTR 1.VolSv instMag.i (MX) SMV_Publisher>>CurrentTransformer>fullSmvsDataSet>VoltageTransformer/L2 TVTR 1.VolSv q (MX) SMV_Publisher>>CurrentTransformer>fullSmvsDataSet>VoltageTransformer/L1 TVTR 1.VolSv instMag.i (MX) SMV_Publisher>>CurrentTransformer>fullSmvsDataSet>VoltageTransformer/L1 TVTR 1.VolSv q (MX)" > - currentOnly + fullSmv - SMV_Publisher>>CurrentTransformer>currentOnly + SMV_Publisher>>CurrentTransformer>fullSmv @@ -52,13 +52,13 @@ snapshots["fcda-binding-list with a SampledValueControl doc loaded looks like th mwc-list-item="" tabindex="0" twoline="" - value="SMV_Publisher>>CurrentTransformer>currentOnly SMV_Publisher>>CurrentTransformer>currentOnlysDataSet>CurrentTransformer/L1 TCTR 1.AmpSv instMag.i (MX)" + value="SMV_Publisher>>CurrentTransformer>fullSmv SMV_Publisher>>CurrentTransformer>fullSmvsDataSet>CurrentTransformer/L3 TCTR 1.AmpSv instMag.i (MX)" > AmpSv.instMag.i - CurrentTransformer/L1 + CurrentTransformer/L3 TCTR 1 @@ -73,13 +73,13 @@ snapshots["fcda-binding-list with a SampledValueControl doc loaded looks like th mwc-list-item="" tabindex="-1" twoline="" - value="SMV_Publisher>>CurrentTransformer>currentOnly SMV_Publisher>>CurrentTransformer>currentOnlysDataSet>CurrentTransformer/L1 TCTR 1.AmpSv q (MX)" + value="SMV_Publisher>>CurrentTransformer>fullSmv SMV_Publisher>>CurrentTransformer>fullSmvsDataSet>CurrentTransformer/L3 TCTR 1.AmpSv q (MX)" > AmpSv.q - CurrentTransformer/L1 + CurrentTransformer/L3 TCTR 1 @@ -94,7 +94,7 @@ snapshots["fcda-binding-list with a SampledValueControl doc loaded looks like th mwc-list-item="" tabindex="-1" twoline="" - value="SMV_Publisher>>CurrentTransformer>currentOnly SMV_Publisher>>CurrentTransformer>currentOnlysDataSet>CurrentTransformer/L2 TCTR 1.AmpSv instMag.i (MX)" + value="SMV_Publisher>>CurrentTransformer>fullSmv SMV_Publisher>>CurrentTransformer>fullSmvsDataSet>CurrentTransformer/L2 TCTR 1.AmpSv instMag.i (MX)" > AmpSv.instMag.i @@ -115,7 +115,7 @@ snapshots["fcda-binding-list with a SampledValueControl doc loaded looks like th mwc-list-item="" tabindex="-1" twoline="" - value="SMV_Publisher>>CurrentTransformer>currentOnly SMV_Publisher>>CurrentTransformer>currentOnlysDataSet>CurrentTransformer/L2 TCTR 1.AmpSv q (MX)" + value="SMV_Publisher>>CurrentTransformer>fullSmv SMV_Publisher>>CurrentTransformer>fullSmvsDataSet>CurrentTransformer/L2 TCTR 1.AmpSv q (MX)" > AmpSv.q @@ -136,13 +136,13 @@ snapshots["fcda-binding-list with a SampledValueControl doc loaded looks like th mwc-list-item="" tabindex="-1" twoline="" - value="SMV_Publisher>>CurrentTransformer>currentOnly SMV_Publisher>>CurrentTransformer>currentOnlysDataSet>CurrentTransformer/L3 TCTR 1.AmpSv instMag.i (MX)" + value="SMV_Publisher>>CurrentTransformer>fullSmv SMV_Publisher>>CurrentTransformer>fullSmvsDataSet>CurrentTransformer/L1 TCTR 1.AmpSv instMag.i (MX)" > AmpSv.instMag.i - CurrentTransformer/L3 + CurrentTransformer/L1 TCTR 1 @@ -157,13 +157,13 @@ snapshots["fcda-binding-list with a SampledValueControl doc loaded looks like th mwc-list-item="" tabindex="-1" twoline="" - value="SMV_Publisher>>CurrentTransformer>currentOnly SMV_Publisher>>CurrentTransformer>currentOnlysDataSet>CurrentTransformer/L3 TCTR 1.AmpSv q (MX)" + value="SMV_Publisher>>CurrentTransformer>fullSmv SMV_Publisher>>CurrentTransformer>fullSmvsDataSet>CurrentTransformer/L1 TCTR 1.AmpSv q (MX)" > AmpSv.q - CurrentTransformer/L3 + CurrentTransformer/L1 TCTR 1 @@ -173,33 +173,25 @@ snapshots["fcda-binding-list with a SampledValueControl doc loaded looks like th - - - fullSmv + VolSv.instMag.i - SMV_Publisher>>CurrentTransformer>fullSmv + VoltageTransformer/L3 + TVTR + 1 + subdirectory_arrow_right -
  • -
  • - AmpSv.instMag.i + VolSv.q - CurrentTransformer/L1 - TCTR + VoltageTransformer/L3 + TVTR 1 @@ -228,14 +220,14 @@ snapshots["fcda-binding-list with a SampledValueControl doc loaded looks like th mwc-list-item="" tabindex="-1" twoline="" - value="SMV_Publisher>>CurrentTransformer>fullSmv SMV_Publisher>>CurrentTransformer>fullSmvsDataSet>CurrentTransformer/L1 TCTR 1.AmpSv q (MX)" + value="SMV_Publisher>>CurrentTransformer>fullSmv SMV_Publisher>>CurrentTransformer>fullSmvsDataSet>VoltageTransformer/L2 TVTR 1.VolSv instMag.i (MX)" > - AmpSv.q + VolSv.instMag.i - CurrentTransformer/L1 - TCTR + VoltageTransformer/L2 + TVTR 1 @@ -249,14 +241,14 @@ snapshots["fcda-binding-list with a SampledValueControl doc loaded looks like th mwc-list-item="" tabindex="-1" twoline="" - value="SMV_Publisher>>CurrentTransformer>fullSmv SMV_Publisher>>CurrentTransformer>fullSmvsDataSet>CurrentTransformer/L2 TCTR 1.AmpSv instMag.i (MX)" + value="SMV_Publisher>>CurrentTransformer>fullSmv SMV_Publisher>>CurrentTransformer>fullSmvsDataSet>VoltageTransformer/L2 TVTR 1.VolSv q (MX)" > - AmpSv.instMag.i + VolSv.q - CurrentTransformer/L2 - TCTR + VoltageTransformer/L2 + TVTR 1 @@ -270,14 +262,14 @@ snapshots["fcda-binding-list with a SampledValueControl doc loaded looks like th mwc-list-item="" tabindex="-1" twoline="" - value="SMV_Publisher>>CurrentTransformer>fullSmv SMV_Publisher>>CurrentTransformer>fullSmvsDataSet>CurrentTransformer/L2 TCTR 1.AmpSv q (MX)" + value="SMV_Publisher>>CurrentTransformer>fullSmv SMV_Publisher>>CurrentTransformer>fullSmvsDataSet>VoltageTransformer/L1 TVTR 1.VolSv instMag.i (MX)" > - AmpSv.q + VolSv.instMag.i - CurrentTransformer/L2 - TCTR + VoltageTransformer/L1 + TVTR 1 @@ -291,14 +283,14 @@ snapshots["fcda-binding-list with a SampledValueControl doc loaded looks like th mwc-list-item="" tabindex="-1" twoline="" - value="SMV_Publisher>>CurrentTransformer>fullSmv SMV_Publisher>>CurrentTransformer>fullSmvsDataSet>CurrentTransformer/L3 TCTR 1.AmpSv instMag.i (MX)" + value="SMV_Publisher>>CurrentTransformer>fullSmv SMV_Publisher>>CurrentTransformer>fullSmvsDataSet>VoltageTransformer/L1 TVTR 1.VolSv q (MX)" > - AmpSv.instMag.i + VolSv.q - CurrentTransformer/L3 - TCTR + VoltageTransformer/L1 + TVTR 1 @@ -307,25 +299,33 @@ snapshots["fcda-binding-list with a SampledValueControl doc loaded looks like th + + - AmpSv.q + voltageOnly - CurrentTransformer/L3 - TCTR - 1 + SMV_Publisher>>CurrentTransformer>voltageOnly - subdirectory_arrow_right +
  • +
  • VolSv.instMag.i @@ -354,7 +354,7 @@ snapshots["fcda-binding-list with a SampledValueControl doc loaded looks like th mwc-list-item="" tabindex="-1" twoline="" - value="SMV_Publisher>>CurrentTransformer>fullSmv SMV_Publisher>>CurrentTransformer>fullSmvsDataSet>VoltageTransformer/L1 TVTR 1.VolSv q (MX)" + value="SMV_Publisher>>CurrentTransformer>voltageOnly SMV_Publisher>>CurrentTransformer>voltageOnlysDataSet>VoltageTransformer/L1 TVTR 1.VolSv q (MX)" > VolSv.q @@ -375,7 +375,7 @@ snapshots["fcda-binding-list with a SampledValueControl doc loaded looks like th mwc-list-item="" tabindex="-1" twoline="" - value="SMV_Publisher>>CurrentTransformer>fullSmv SMV_Publisher>>CurrentTransformer>fullSmvsDataSet>VoltageTransformer/L2 TVTR 1.VolSv instMag.i (MX)" + value="SMV_Publisher>>CurrentTransformer>voltageOnly SMV_Publisher>>CurrentTransformer>voltageOnlysDataSet>VoltageTransformer/L2 TVTR 1.VolSv instMag.i (MX)" > VolSv.instMag.i @@ -396,7 +396,7 @@ snapshots["fcda-binding-list with a SampledValueControl doc loaded looks like th mwc-list-item="" tabindex="-1" twoline="" - value="SMV_Publisher>>CurrentTransformer>fullSmv SMV_Publisher>>CurrentTransformer>fullSmvsDataSet>VoltageTransformer/L2 TVTR 1.VolSv q (MX)" + value="SMV_Publisher>>CurrentTransformer>voltageOnly SMV_Publisher>>CurrentTransformer>voltageOnlysDataSet>VoltageTransformer/L2 TVTR 1.VolSv q (MX)" > VolSv.q @@ -417,7 +417,7 @@ snapshots["fcda-binding-list with a SampledValueControl doc loaded looks like th mwc-list-item="" tabindex="-1" twoline="" - value="SMV_Publisher>>CurrentTransformer>fullSmv SMV_Publisher>>CurrentTransformer>fullSmvsDataSet>VoltageTransformer/L3 TVTR 1.VolSv instMag.i (MX)" + value="SMV_Publisher>>CurrentTransformer>voltageOnly SMV_Publisher>>CurrentTransformer>voltageOnlysDataSet>VoltageTransformer/L3 TVTR 1.VolSv instMag.i (MX)" > VolSv.instMag.i @@ -438,7 +438,7 @@ snapshots["fcda-binding-list with a SampledValueControl doc loaded looks like th mwc-list-item="" tabindex="-1" twoline="" - value="SMV_Publisher>>CurrentTransformer>fullSmv SMV_Publisher>>CurrentTransformer>fullSmvsDataSet>VoltageTransformer/L3 TVTR 1.VolSv q (MX)" + value="SMV_Publisher>>CurrentTransformer>voltageOnly SMV_Publisher>>CurrentTransformer>voltageOnlysDataSet>VoltageTransformer/L3 TVTR 1.VolSv q (MX)" > VolSv.q @@ -459,7 +459,7 @@ snapshots["fcda-binding-list with a SampledValueControl doc loaded looks like th noninteractive="" tabindex="-1" twoline="" - value="SMV_Publisher>>CurrentTransformer>voltageOnly SMV_Publisher>>CurrentTransformer>voltageOnlysDataSet>VoltageTransformer/L1 TVTR 1.VolSv instMag.i (MX) SMV_Publisher>>CurrentTransformer>voltageOnlysDataSet>VoltageTransformer/L1 TVTR 1.VolSv q (MX) SMV_Publisher>>CurrentTransformer>voltageOnlysDataSet>VoltageTransformer/L2 TVTR 1.VolSv instMag.i (MX) SMV_Publisher>>CurrentTransformer>voltageOnlysDataSet>VoltageTransformer/L2 TVTR 1.VolSv q (MX) SMV_Publisher>>CurrentTransformer>voltageOnlysDataSet>VoltageTransformer/L3 TVTR 1.VolSv instMag.i (MX) SMV_Publisher>>CurrentTransformer>voltageOnlysDataSet>VoltageTransformer/L3 TVTR 1.VolSv q (MX)" + value="SMV_Publisher>>CurrentTransformer>currentOnly SMV_Publisher>>CurrentTransformer>currentOnlysDataSet>CurrentTransformer/L1 TCTR 1.AmpSv instMag.i (MX) SMV_Publisher>>CurrentTransformer>currentOnlysDataSet>CurrentTransformer/L1 TCTR 1.AmpSv q (MX) SMV_Publisher>>CurrentTransformer>currentOnlysDataSet>CurrentTransformer/L2 TCTR 1.AmpSv instMag.i (MX) SMV_Publisher>>CurrentTransformer>currentOnlysDataSet>CurrentTransformer/L2 TCTR 1.AmpSv q (MX) SMV_Publisher>>CurrentTransformer>currentOnlysDataSet>CurrentTransformer/L3 TCTR 1.AmpSv instMag.i (MX) SMV_Publisher>>CurrentTransformer>currentOnlysDataSet>CurrentTransformer/L3 TCTR 1.AmpSv q (MX)" > - voltageOnly + currentOnly - SMV_Publisher>>CurrentTransformer>voltageOnly + SMV_Publisher>>CurrentTransformer>currentOnly @@ -488,14 +488,14 @@ snapshots["fcda-binding-list with a SampledValueControl doc loaded looks like th mwc-list-item="" tabindex="-1" twoline="" - value="SMV_Publisher>>CurrentTransformer>voltageOnly SMV_Publisher>>CurrentTransformer>voltageOnlysDataSet>VoltageTransformer/L1 TVTR 1.VolSv instMag.i (MX)" + value="SMV_Publisher>>CurrentTransformer>currentOnly SMV_Publisher>>CurrentTransformer>currentOnlysDataSet>CurrentTransformer/L1 TCTR 1.AmpSv instMag.i (MX)" > - VolSv.instMag.i + AmpSv.instMag.i - VoltageTransformer/L1 - TVTR + CurrentTransformer/L1 + TCTR 1 @@ -509,14 +509,14 @@ snapshots["fcda-binding-list with a SampledValueControl doc loaded looks like th mwc-list-item="" tabindex="-1" twoline="" - value="SMV_Publisher>>CurrentTransformer>voltageOnly SMV_Publisher>>CurrentTransformer>voltageOnlysDataSet>VoltageTransformer/L1 TVTR 1.VolSv q (MX)" + value="SMV_Publisher>>CurrentTransformer>currentOnly SMV_Publisher>>CurrentTransformer>currentOnlysDataSet>CurrentTransformer/L1 TCTR 1.AmpSv q (MX)" > - VolSv.q + AmpSv.q - VoltageTransformer/L1 - TVTR + CurrentTransformer/L1 + TCTR 1 @@ -530,14 +530,14 @@ snapshots["fcda-binding-list with a SampledValueControl doc loaded looks like th mwc-list-item="" tabindex="-1" twoline="" - value="SMV_Publisher>>CurrentTransformer>voltageOnly SMV_Publisher>>CurrentTransformer>voltageOnlysDataSet>VoltageTransformer/L2 TVTR 1.VolSv instMag.i (MX)" + value="SMV_Publisher>>CurrentTransformer>currentOnly SMV_Publisher>>CurrentTransformer>currentOnlysDataSet>CurrentTransformer/L2 TCTR 1.AmpSv instMag.i (MX)" > - VolSv.instMag.i + AmpSv.instMag.i - VoltageTransformer/L2 - TVTR + CurrentTransformer/L2 + TCTR 1 @@ -551,14 +551,14 @@ snapshots["fcda-binding-list with a SampledValueControl doc loaded looks like th mwc-list-item="" tabindex="-1" twoline="" - value="SMV_Publisher>>CurrentTransformer>voltageOnly SMV_Publisher>>CurrentTransformer>voltageOnlysDataSet>VoltageTransformer/L2 TVTR 1.VolSv q (MX)" + value="SMV_Publisher>>CurrentTransformer>currentOnly SMV_Publisher>>CurrentTransformer>currentOnlysDataSet>CurrentTransformer/L2 TCTR 1.AmpSv q (MX)" > - VolSv.q + AmpSv.q - VoltageTransformer/L2 - TVTR + CurrentTransformer/L2 + TCTR 1 @@ -572,14 +572,14 @@ snapshots["fcda-binding-list with a SampledValueControl doc loaded looks like th mwc-list-item="" tabindex="-1" twoline="" - value="SMV_Publisher>>CurrentTransformer>voltageOnly SMV_Publisher>>CurrentTransformer>voltageOnlysDataSet>VoltageTransformer/L3 TVTR 1.VolSv instMag.i (MX)" + value="SMV_Publisher>>CurrentTransformer>currentOnly SMV_Publisher>>CurrentTransformer>currentOnlysDataSet>CurrentTransformer/L3 TCTR 1.AmpSv instMag.i (MX)" > - VolSv.instMag.i + AmpSv.instMag.i - VoltageTransformer/L3 - TVTR + CurrentTransformer/L3 + TCTR 1 @@ -593,14 +593,14 @@ snapshots["fcda-binding-list with a SampledValueControl doc loaded looks like th mwc-list-item="" tabindex="-1" twoline="" - value="SMV_Publisher>>CurrentTransformer>voltageOnly SMV_Publisher>>CurrentTransformer>voltageOnlysDataSet>VoltageTransformer/L3 TVTR 1.VolSv q (MX)" + value="SMV_Publisher>>CurrentTransformer>currentOnly SMV_Publisher>>CurrentTransformer>currentOnlysDataSet>CurrentTransformer/L3 TCTR 1.AmpSv q (MX)" > - VolSv.q + AmpSv.q - VoltageTransformer/L3 - TVTR + CurrentTransformer/L3 + TCTR 1 @@ -625,7 +625,7 @@ snapshots["fcda-binding-list with a GSEControl doc loaded looks like the latest noninteractive="" tabindex="-1" twoline="" - value="IED1>>CircuitBreaker_CB1>GCB IED1>>CircuitBreaker_CB1>GooseDataSet1>CircuitBreaker_CB1/ CSWI 1.Pos stVal (ST) IED1>>CircuitBreaker_CB1>GooseDataSet1>CircuitBreaker_CB1/ XCBR 1.Pos q (ST) IED1>>CircuitBreaker_CB1>GooseDataSet1>CircuitBreaker_CB1/ XCBR 1.Pos stVal (ST) IED1>>CircuitBreaker_CB1>GooseDataSet1>Disconnectors/DC XSWI 1.Pos q (ST) IED1>>CircuitBreaker_CB1>GooseDataSet1>Disconnectors/DC XSWI 1.Pos stVal (ST)" + value="IED1>>CircuitBreaker_CB1>GCB IED1>>CircuitBreaker_CB1>GooseDataSet1>CircuitBreaker_CB1/ XCBR 1.Pos stVal (ST) IED1>>CircuitBreaker_CB1>GooseDataSet1>CircuitBreaker_CB1/ XCBR 1.Pos q (ST) IED1>>CircuitBreaker_CB1>GooseDataSet1>CircuitBreaker_CB1/ CSWI 1.Pos stVal (ST) IED1>>CircuitBreaker_CB1>GooseDataSet1>Disconnectors/DC XSWI 1.Pos stVal (ST) IED1>>CircuitBreaker_CB1>GooseDataSet1>Disconnectors/DC XSWI 1.Pos q (ST)" > Pos.stVal CircuitBreaker_CB1/ - CSWI + XCBR 1 @@ -696,14 +696,14 @@ snapshots["fcda-binding-list with a GSEControl doc loaded looks like the latest mwc-list-item="" tabindex="-1" twoline="" - value="IED1>>CircuitBreaker_CB1>GCB IED1>>CircuitBreaker_CB1>GooseDataSet1>CircuitBreaker_CB1/ XCBR 1.Pos stVal (ST)" + value="IED1>>CircuitBreaker_CB1>GCB IED1>>CircuitBreaker_CB1>GooseDataSet1>CircuitBreaker_CB1/ CSWI 1.Pos stVal (ST)" > Pos.stVal CircuitBreaker_CB1/ - XCBR + CSWI 1 @@ -717,10 +717,10 @@ snapshots["fcda-binding-list with a GSEControl doc loaded looks like the latest mwc-list-item="" tabindex="-1" twoline="" - value="IED1>>CircuitBreaker_CB1>GCB IED1>>CircuitBreaker_CB1>GooseDataSet1>Disconnectors/DC XSWI 1.Pos q (ST)" + value="IED1>>CircuitBreaker_CB1>GCB IED1>>CircuitBreaker_CB1>GooseDataSet1>Disconnectors/DC XSWI 1.Pos stVal (ST)" > - Pos.q + Pos.stVal Disconnectors/DC @@ -738,10 +738,10 @@ snapshots["fcda-binding-list with a GSEControl doc loaded looks like the latest mwc-list-item="" tabindex="-1" twoline="" - value="IED1>>CircuitBreaker_CB1>GCB IED1>>CircuitBreaker_CB1>GooseDataSet1>Disconnectors/DC XSWI 1.Pos stVal (ST)" + value="IED1>>CircuitBreaker_CB1>GCB IED1>>CircuitBreaker_CB1>GooseDataSet1>Disconnectors/DC XSWI 1.Pos q (ST)" > - Pos.stVal + Pos.q Disconnectors/DC @@ -788,7 +788,7 @@ snapshots["fcda-binding-list with a GSEControl doc loaded looks like the latest noninteractive="" tabindex="-1" twoline="" - value="IED2>>CBSW>GCB IED2>>CBSW>GooseDataSet1>CBSW/ XSWI 2.Pos q (ST) IED2>>CBSW>GooseDataSet1>CBSW/ XSWI 2.Pos stVal (ST) IED2>>CBSW>GooseDataSet1>CBSW/ XSWI 3.Pos q (ST)" + value="IED2>>CBSW>GCB IED2>>CBSW>GooseDataSet1>CBSW/ XSWI 2.Pos stVal (ST) IED2>>CBSW>GooseDataSet1>CBSW/ XSWI 2.Pos q (ST) IED2>>CBSW>GooseDataSet1>CBSW/ XSWI 3.Pos q (ST)" > - Pos.q + Pos.stVal CBSW/ @@ -838,10 +838,10 @@ snapshots["fcda-binding-list with a GSEControl doc loaded looks like the latest mwc-list-item="" tabindex="-1" twoline="" - value="IED2>>CBSW>GCB IED2>>CBSW>GooseDataSet1>CBSW/ XSWI 2.Pos stVal (ST)" + value="IED2>>CBSW>GCB IED2>>CBSW>GooseDataSet1>CBSW/ XSWI 2.Pos q (ST)" > - Pos.stVal + Pos.q CBSW/ @@ -880,7 +880,7 @@ snapshots["fcda-binding-list with a GSEControl doc loaded looks like the latest noninteractive="" tabindex="-1" twoline="" - value="IED4>>CircuitBreaker_CB1>GCB IED4>>CircuitBreaker_CB1>GooseDataSet1>CircuitBreaker_CB1/ CSWI 1.Pos stVal (ST) IED4>>CircuitBreaker_CB1>GooseDataSet1>CircuitBreaker_CB1/ XCBR 1.Pos q (ST) IED4>>CircuitBreaker_CB1>GooseDataSet1>CircuitBreaker_CB1/ XCBR 1.Pos stVal (ST) IED4>>CircuitBreaker_CB1>GooseDataSet1>Disconnectors/DC XSWI 1.Pos q (ST) IED4>>CircuitBreaker_CB1>GooseDataSet1>Disconnectors/DC XSWI 1.Pos stVal (ST)" + value="IED4>>CircuitBreaker_CB1>GCB IED4>>CircuitBreaker_CB1>GooseDataSet1>CircuitBreaker_CB1/ XCBR 1.Pos stVal (ST) IED4>>CircuitBreaker_CB1>GooseDataSet1>CircuitBreaker_CB1/ XCBR 1.Pos q (ST) IED4>>CircuitBreaker_CB1>GooseDataSet1>CircuitBreaker_CB1/ CSWI 1.Pos stVal (ST) IED4>>CircuitBreaker_CB1>GooseDataSet1>Disconnectors/DC XSWI 1.Pos stVal (ST) IED4>>CircuitBreaker_CB1>GooseDataSet1>Disconnectors/DC XSWI 1.Pos q (ST)" > Pos.stVal CircuitBreaker_CB1/ - CSWI + XCBR 1 @@ -951,14 +951,14 @@ snapshots["fcda-binding-list with a GSEControl doc loaded looks like the latest mwc-list-item="" tabindex="-1" twoline="" - value="IED4>>CircuitBreaker_CB1>GCB IED4>>CircuitBreaker_CB1>GooseDataSet1>CircuitBreaker_CB1/ XCBR 1.Pos stVal (ST)" + value="IED4>>CircuitBreaker_CB1>GCB IED4>>CircuitBreaker_CB1>GooseDataSet1>CircuitBreaker_CB1/ CSWI 1.Pos stVal (ST)" > Pos.stVal CircuitBreaker_CB1/ - XCBR + CSWI 1 @@ -972,10 +972,10 @@ snapshots["fcda-binding-list with a GSEControl doc loaded looks like the latest mwc-list-item="" tabindex="-1" twoline="" - value="IED4>>CircuitBreaker_CB1>GCB IED4>>CircuitBreaker_CB1>GooseDataSet1>Disconnectors/DC XSWI 1.Pos q (ST)" + value="IED4>>CircuitBreaker_CB1>GCB IED4>>CircuitBreaker_CB1>GooseDataSet1>Disconnectors/DC XSWI 1.Pos stVal (ST)" > - Pos.q + Pos.stVal Disconnectors/DC @@ -993,10 +993,10 @@ snapshots["fcda-binding-list with a GSEControl doc loaded looks like the latest mwc-list-item="" tabindex="-1" twoline="" - value="IED4>>CircuitBreaker_CB1>GCB IED4>>CircuitBreaker_CB1>GooseDataSet1>Disconnectors/DC XSWI 1.Pos stVal (ST)" + value="IED4>>CircuitBreaker_CB1>GCB IED4>>CircuitBreaker_CB1>GooseDataSet1>Disconnectors/DC XSWI 1.Pos q (ST)" > - Pos.stVal + Pos.q Disconnectors/DC diff --git a/test/unit/editors/subscription/fcda-binding-list.test.ts b/test/unit/editors/subscription/fcda-binding-list.test.ts index 69b34b14f..83af160f1 100644 --- a/test/unit/editors/subscription/fcda-binding-list.test.ts +++ b/test/unit/editors/subscription/fcda-binding-list.test.ts @@ -75,7 +75,7 @@ describe('fcda-binding-list', () => { const nameField = ( parent.wizardUI.dialog?.querySelector('wizard-textfield[label="name"]') ); - expect(nameField.value).to.be.equal('currentOnly'); + expect(nameField.value).to.be.equal('fullSmv'); }); it('event is fired, but properties are undefined', () => { @@ -101,7 +101,7 @@ describe('fcda-binding-list', () => { await element.updateComplete; expect(selectEvent).to.have.been.called; - expect(selectEvent.args[0][0].detail.controlElement).to.equal( + expect(selectEvent.args[0][0].detail.control).to.equal( doc.querySelector( 'IED[name="SMV_Publisher"] LN0 > SampledValueControl[name="currentOnly"]' ) diff --git a/test/unit/editors/subscription/later-binding/__snapshots__/ext-ref-later-binding-list.test.snap.js b/test/unit/editors/subscription/later-binding/__snapshots__/ext-ref-later-binding-list.test.snap.js index b42059243..6d43df73d 100644 --- a/test/unit/editors/subscription/later-binding/__snapshots__/ext-ref-later-binding-list.test.snap.js +++ b/test/unit/editors/subscription/later-binding/__snapshots__/ext-ref-later-binding-list.test.snap.js @@ -52,7 +52,7 @@ snapshots["extref-later-binding-list for Sampled Value Control when SVC has no s aria-disabled="false" noninteractive="" tabindex="-1" - value="MeasPoint.CT2 SMV_Subscriber>>Overvoltage> PTRC 1>AmpSv;TCTR2/AmpSv/instMag.i[0] MeasPoint.CT3 SMV_Subscriber>>Overvoltage> PTRC 1>AmpSv;TCTR3/AmpSv/instMag.i[0] Restricted To AmpSV SMV_Subscriber>>Overcurrent> PTRC 1>someRestrictedExtRef[0] MeasPoint.VT1 SMV_Subscriber>>Overcurrent> PTRC 1>VolSv;TVTR1/VolSv/q[0] MeasPoint.VT2 SMV_Subscriber>>Overcurrent> PTRC 1>VolSv;TVTR2/VolSv/instMag.i[0] MeasPoint.VT1 SMV_Subscriber>>Overcurrent> PTRC 1>VolSv;TVTR2/VolSv/q[0] MeasPoint.VT3 SMV_Subscriber>>Overcurrent> PTRC 1>VolSv;TVTR3/VolSv/instMag.i[0] MeasPoint.VT1 SMV_Subscriber>>Overcurrent> PTRC 1>VolSv;TVTR3/VolSv/q[0]" + value="MeasPoint.CT2 SMV_Subscriber>>Overvoltage> PTRC 1>AmpSv;TCTR2/AmpSv/instMag.i[0] MeasPoint.CT3 SMV_Subscriber>>Overvoltage> PTRC 1>AmpSv;TCTR3/AmpSv/instMag.i[0] MeasPoint.VT1 SMV_Subscriber>>Overcurrent> PTRC 1>VolSv;TVTR1/VolSv/q[0] MeasPoint.VT2 SMV_Subscriber>>Overcurrent> PTRC 1>VolSv;TVTR2/VolSv/instMag.i[0] MeasPoint.VT1 SMV_Subscriber>>Overcurrent> PTRC 1>VolSv;TVTR2/VolSv/q[0] MeasPoint.VT3 SMV_Subscriber>>Overcurrent> PTRC 1>VolSv;TVTR3/VolSv/instMag.i[0] MeasPoint.VT1 SMV_Subscriber>>Overcurrent> PTRC 1>VolSv;TVTR3/VolSv/q[0] Restricted To AmpSV SMV_Subscriber>>Overcurrent> PTRC 1>someRestrictedExtRef[0]" > [subscription.subscriber.availableToSubscribe] @@ -101,26 +101,6 @@ snapshots["extref-later-binding-list for Sampled Value Control when SVC has no s arrow_back - - - someRestrictedExtRef - (Restricted To AmpSV) - - - SMV_Subscriber>>Overcurrent> PTRC 1>someRestrictedExtRef[0] - - - arrow_back - - + + + someRestrictedExtRef + (Restricted To AmpSV) + + + SMV_Subscriber>>Overcurrent> PTRC 1>someRestrictedExtRef[0] + + + arrow_back + + `; @@ -265,7 +265,7 @@ snapshots["extref-later-binding-list for Sampled Value Control when SVC has a si aria-disabled="false" noninteractive="" tabindex="-1" - value="MeasPoint.CT2 SMV_Subscriber>>Overvoltage> PTRC 1>AmpSv;TCTR2/AmpSv/instMag.i[0] MeasPoint.CT3 SMV_Subscriber>>Overvoltage> PTRC 1>AmpSv;TCTR3/AmpSv/instMag.i[0] Restricted To AmpSV SMV_Subscriber>>Overcurrent> PTRC 1>someRestrictedExtRef[0] MeasPoint.VT1 SMV_Subscriber>>Overcurrent> PTRC 1>VolSv;TVTR1/VolSv/q[0] MeasPoint.VT2 SMV_Subscriber>>Overcurrent> PTRC 1>VolSv;TVTR2/VolSv/instMag.i[0] MeasPoint.VT1 SMV_Subscriber>>Overcurrent> PTRC 1>VolSv;TVTR2/VolSv/q[0] MeasPoint.VT3 SMV_Subscriber>>Overcurrent> PTRC 1>VolSv;TVTR3/VolSv/instMag.i[0] MeasPoint.VT1 SMV_Subscriber>>Overcurrent> PTRC 1>VolSv;TVTR3/VolSv/q[0]" + value="MeasPoint.CT2 SMV_Subscriber>>Overvoltage> PTRC 1>AmpSv;TCTR2/AmpSv/instMag.i[0] MeasPoint.CT3 SMV_Subscriber>>Overvoltage> PTRC 1>AmpSv;TCTR3/AmpSv/instMag.i[0] MeasPoint.VT1 SMV_Subscriber>>Overcurrent> PTRC 1>VolSv;TVTR1/VolSv/q[0] MeasPoint.VT2 SMV_Subscriber>>Overcurrent> PTRC 1>VolSv;TVTR2/VolSv/instMag.i[0] MeasPoint.VT1 SMV_Subscriber>>Overcurrent> PTRC 1>VolSv;TVTR2/VolSv/q[0] MeasPoint.VT3 SMV_Subscriber>>Overcurrent> PTRC 1>VolSv;TVTR3/VolSv/instMag.i[0] MeasPoint.VT1 SMV_Subscriber>>Overcurrent> PTRC 1>VolSv;TVTR3/VolSv/q[0] Restricted To AmpSV SMV_Subscriber>>Overcurrent> PTRC 1>someRestrictedExtRef[0]" > [subscription.subscriber.availableToSubscribe] @@ -314,26 +314,6 @@ snapshots["extref-later-binding-list for Sampled Value Control when SVC has a si arrow_back - - - someRestrictedExtRef - (Restricted To AmpSV) - - - SMV_Subscriber>>Overcurrent> PTRC 1>someRestrictedExtRef[0] - - - arrow_back - - + + + someRestrictedExtRef + (Restricted To AmpSV) + + + SMV_Subscriber>>Overcurrent> PTRC 1>someRestrictedExtRef[0] + + + arrow_back + + `; @@ -510,7 +510,7 @@ snapshots["extref-later-binding-list when SVC has a multiple subscriptions looks aria-disabled="false" noninteractive="" tabindex="-1" - value="MeasPoint.CT2 SMV_Subscriber>>Overvoltage> PTRC 1>AmpSv;TCTR2/AmpSv/instMag.i[0] MeasPoint.CT3 SMV_Subscriber>>Overvoltage> PTRC 1>AmpSv;TCTR3/AmpSv/instMag.i[0] Restricted To AmpSV SMV_Subscriber>>Overcurrent> PTRC 1>someRestrictedExtRef[0] MeasPoint.VT1 SMV_Subscriber>>Overcurrent> PTRC 1>VolSv;TVTR1/VolSv/q[0] MeasPoint.VT2 SMV_Subscriber>>Overcurrent> PTRC 1>VolSv;TVTR2/VolSv/instMag.i[0] MeasPoint.VT1 SMV_Subscriber>>Overcurrent> PTRC 1>VolSv;TVTR2/VolSv/q[0] MeasPoint.VT3 SMV_Subscriber>>Overcurrent> PTRC 1>VolSv;TVTR3/VolSv/instMag.i[0] MeasPoint.VT1 SMV_Subscriber>>Overcurrent> PTRC 1>VolSv;TVTR3/VolSv/q[0]" + value="MeasPoint.CT2 SMV_Subscriber>>Overvoltage> PTRC 1>AmpSv;TCTR2/AmpSv/instMag.i[0] MeasPoint.CT3 SMV_Subscriber>>Overvoltage> PTRC 1>AmpSv;TCTR3/AmpSv/instMag.i[0] MeasPoint.VT1 SMV_Subscriber>>Overcurrent> PTRC 1>VolSv;TVTR1/VolSv/q[0] MeasPoint.VT2 SMV_Subscriber>>Overcurrent> PTRC 1>VolSv;TVTR2/VolSv/instMag.i[0] MeasPoint.VT1 SMV_Subscriber>>Overcurrent> PTRC 1>VolSv;TVTR2/VolSv/q[0] MeasPoint.VT3 SMV_Subscriber>>Overcurrent> PTRC 1>VolSv;TVTR3/VolSv/instMag.i[0] MeasPoint.VT1 SMV_Subscriber>>Overcurrent> PTRC 1>VolSv;TVTR3/VolSv/q[0] Restricted To AmpSV SMV_Subscriber>>Overcurrent> PTRC 1>someRestrictedExtRef[0]" > [subscription.subscriber.availableToSubscribe] @@ -559,26 +559,6 @@ snapshots["extref-later-binding-list when SVC has a multiple subscriptions looks arrow_back - - - someRestrictedExtRef - (Restricted To AmpSV) - - - SMV_Subscriber>>Overcurrent> PTRC 1>someRestrictedExtRef[0] - - - arrow_back - - + + + someRestrictedExtRef + (Restricted To AmpSV) + + + SMV_Subscriber>>Overcurrent> PTRC 1>someRestrictedExtRef[0] + + + arrow_back + + `; @@ -721,7 +721,7 @@ snapshots["extref-later-binding-list for GOOSE Control when GSEControl has no su aria-disabled="false" noninteractive="" tabindex="-1" - value="Interlocking.Input3 GOOSE_Subscriber>>Earth_Switch> CILO 1>GOOSE:GOOSE2 QB2_Disconnector/ LLN0 GOOSE_Publisher QB1_Disconnector/ CILO 1 EnaCls stVal@Pos;CILO/EnaCls/stVal Interlocking.Input4 GOOSE_Subscriber>>Earth_Switch> CILO 1>GOOSE:GOOSE2 QB2_Disconnector/ LLN0 GOOSE_Publisher QB2_Disconnector/ CILO 1 EnaOpn stVal@Pos;CILO/EnaOpn2/stVal Interlocking.Input GOOSE_Subscriber>>Earth_Switch> CILO 1>Pos;CSWI1/Pos/stVal[0] Restricted To Pos GOOSE_Subscriber>>Earth_Switch> CSWI 1>someRestrictedExtRef[0]" + value="Interlocking.Input GOOSE_Subscriber>>Earth_Switch> CILO 1>Pos;CSWI1/Pos/stVal[0] Interlocking.Input3 GOOSE_Subscriber>>Earth_Switch> CILO 1>GOOSE:GOOSE2 QB2_Disconnector/ LLN0 GOOSE_Publisher QB1_Disconnector/ CILO 1 EnaCls stVal@Pos;CILO/EnaCls/stVal Interlocking.Input4 GOOSE_Subscriber>>Earth_Switch> CILO 1>GOOSE:GOOSE2 QB2_Disconnector/ LLN0 GOOSE_Publisher QB2_Disconnector/ CILO 1 EnaOpn stVal@Pos;CILO/EnaOpn2/stVal Restricted To Pos GOOSE_Subscriber>>Earth_Switch> CSWI 1>someRestrictedExtRef[0]" > [subscription.subscriber.availableToSubscribe] @@ -738,14 +738,14 @@ snapshots["extref-later-binding-list for GOOSE Control when GSEControl has no su mwc-list-item="" tabindex="-1" twoline="" - value="GOOSE_Subscriber>>Earth_Switch> CILO 1>GOOSE:GOOSE2 QB2_Disconnector/ LLN0 GOOSE_Publisher QB1_Disconnector/ CILO 1 EnaCls stVal@Pos;CILO/EnaCls/stVal" + value="GOOSE_Subscriber>>Earth_Switch> CILO 1>Pos;CSWI1/Pos/stVal[0]" > - Pos;CILO/EnaCls/stVal - (Interlocking.Input3) + Pos;CSWI1/Pos/stVal + (Interlocking.Input) - GOOSE_Subscriber>>Earth_Switch> CILO 1>GOOSE:GOOSE2 QB2_Disconnector/ LLN0 GOOSE_Publisher QB1_Disconnector/ CILO 1 EnaCls stVal@Pos;CILO/EnaCls/stVal + GOOSE_Subscriber>>Earth_Switch> CILO 1>Pos;CSWI1/Pos/stVal[0] arrow_back @@ -757,14 +757,14 @@ snapshots["extref-later-binding-list for GOOSE Control when GSEControl has no su mwc-list-item="" tabindex="-1" twoline="" - value="GOOSE_Subscriber>>Earth_Switch> CILO 1>GOOSE:GOOSE2 QB2_Disconnector/ LLN0 GOOSE_Publisher QB2_Disconnector/ CILO 1 EnaOpn stVal@Pos;CILO/EnaOpn2/stVal" + value="GOOSE_Subscriber>>Earth_Switch> CILO 1>GOOSE:GOOSE2 QB2_Disconnector/ LLN0 GOOSE_Publisher QB1_Disconnector/ CILO 1 EnaCls stVal@Pos;CILO/EnaCls/stVal" > - Pos;CILO/EnaOpn2/stVal - (Interlocking.Input4) + Pos;CILO/EnaCls/stVal + (Interlocking.Input3) - GOOSE_Subscriber>>Earth_Switch> CILO 1>GOOSE:GOOSE2 QB2_Disconnector/ LLN0 GOOSE_Publisher QB2_Disconnector/ CILO 1 EnaOpn stVal@Pos;CILO/EnaOpn2/stVal + GOOSE_Subscriber>>Earth_Switch> CILO 1>GOOSE:GOOSE2 QB2_Disconnector/ LLN0 GOOSE_Publisher QB1_Disconnector/ CILO 1 EnaCls stVal@Pos;CILO/EnaCls/stVal arrow_back @@ -776,14 +776,14 @@ snapshots["extref-later-binding-list for GOOSE Control when GSEControl has no su mwc-list-item="" tabindex="-1" twoline="" - value="GOOSE_Subscriber>>Earth_Switch> CILO 1>Pos;CSWI1/Pos/stVal[0]" + value="GOOSE_Subscriber>>Earth_Switch> CILO 1>GOOSE:GOOSE2 QB2_Disconnector/ LLN0 GOOSE_Publisher QB2_Disconnector/ CILO 1 EnaOpn stVal@Pos;CILO/EnaOpn2/stVal" > - Pos;CSWI1/Pos/stVal - (Interlocking.Input) + Pos;CILO/EnaOpn2/stVal + (Interlocking.Input4) - GOOSE_Subscriber>>Earth_Switch> CILO 1>Pos;CSWI1/Pos/stVal[0] + GOOSE_Subscriber>>Earth_Switch> CILO 1>GOOSE:GOOSE2 QB2_Disconnector/ LLN0 GOOSE_Publisher QB2_Disconnector/ CILO 1 EnaOpn stVal@Pos;CILO/EnaOpn2/stVal arrow_back @@ -858,7 +858,7 @@ snapshots["extref-later-binding-list for GOOSE Control when GSEControl has a sin aria-disabled="false" noninteractive="" tabindex="-1" - value="Interlocking.Input3 GOOSE_Subscriber>>Earth_Switch> CILO 1>GOOSE:GOOSE2 QB2_Disconnector/ LLN0 GOOSE_Publisher QB1_Disconnector/ CILO 1 EnaCls stVal@Pos;CILO/EnaCls/stVal Interlocking.Input4 GOOSE_Subscriber>>Earth_Switch> CILO 1>GOOSE:GOOSE2 QB2_Disconnector/ LLN0 GOOSE_Publisher QB2_Disconnector/ CILO 1 EnaOpn stVal@Pos;CILO/EnaOpn2/stVal Interlocking.Input GOOSE_Subscriber>>Earth_Switch> CILO 1>Pos;CSWI1/Pos/stVal[0] Restricted To Pos GOOSE_Subscriber>>Earth_Switch> CSWI 1>someRestrictedExtRef[0]" + value="Interlocking.Input GOOSE_Subscriber>>Earth_Switch> CILO 1>Pos;CSWI1/Pos/stVal[0] Interlocking.Input3 GOOSE_Subscriber>>Earth_Switch> CILO 1>GOOSE:GOOSE2 QB2_Disconnector/ LLN0 GOOSE_Publisher QB1_Disconnector/ CILO 1 EnaCls stVal@Pos;CILO/EnaCls/stVal Interlocking.Input4 GOOSE_Subscriber>>Earth_Switch> CILO 1>GOOSE:GOOSE2 QB2_Disconnector/ LLN0 GOOSE_Publisher QB2_Disconnector/ CILO 1 EnaOpn stVal@Pos;CILO/EnaOpn2/stVal Restricted To Pos GOOSE_Subscriber>>Earth_Switch> CSWI 1>someRestrictedExtRef[0]" > [subscription.subscriber.availableToSubscribe] @@ -875,14 +875,14 @@ snapshots["extref-later-binding-list for GOOSE Control when GSEControl has a sin mwc-list-item="" tabindex="-1" twoline="" - value="GOOSE_Subscriber>>Earth_Switch> CILO 1>GOOSE:GOOSE2 QB2_Disconnector/ LLN0 GOOSE_Publisher QB1_Disconnector/ CILO 1 EnaCls stVal@Pos;CILO/EnaCls/stVal" + value="GOOSE_Subscriber>>Earth_Switch> CILO 1>Pos;CSWI1/Pos/stVal[0]" > - Pos;CILO/EnaCls/stVal - (Interlocking.Input3) + Pos;CSWI1/Pos/stVal + (Interlocking.Input) - GOOSE_Subscriber>>Earth_Switch> CILO 1>GOOSE:GOOSE2 QB2_Disconnector/ LLN0 GOOSE_Publisher QB1_Disconnector/ CILO 1 EnaCls stVal@Pos;CILO/EnaCls/stVal + GOOSE_Subscriber>>Earth_Switch> CILO 1>Pos;CSWI1/Pos/stVal[0] arrow_back @@ -894,14 +894,14 @@ snapshots["extref-later-binding-list for GOOSE Control when GSEControl has a sin mwc-list-item="" tabindex="-1" twoline="" - value="GOOSE_Subscriber>>Earth_Switch> CILO 1>GOOSE:GOOSE2 QB2_Disconnector/ LLN0 GOOSE_Publisher QB2_Disconnector/ CILO 1 EnaOpn stVal@Pos;CILO/EnaOpn2/stVal" + value="GOOSE_Subscriber>>Earth_Switch> CILO 1>GOOSE:GOOSE2 QB2_Disconnector/ LLN0 GOOSE_Publisher QB1_Disconnector/ CILO 1 EnaCls stVal@Pos;CILO/EnaCls/stVal" > - Pos;CILO/EnaOpn2/stVal - (Interlocking.Input4) + Pos;CILO/EnaCls/stVal + (Interlocking.Input3) - GOOSE_Subscriber>>Earth_Switch> CILO 1>GOOSE:GOOSE2 QB2_Disconnector/ LLN0 GOOSE_Publisher QB2_Disconnector/ CILO 1 EnaOpn stVal@Pos;CILO/EnaOpn2/stVal + GOOSE_Subscriber>>Earth_Switch> CILO 1>GOOSE:GOOSE2 QB2_Disconnector/ LLN0 GOOSE_Publisher QB1_Disconnector/ CILO 1 EnaCls stVal@Pos;CILO/EnaCls/stVal arrow_back @@ -913,14 +913,14 @@ snapshots["extref-later-binding-list for GOOSE Control when GSEControl has a sin mwc-list-item="" tabindex="-1" twoline="" - value="GOOSE_Subscriber>>Earth_Switch> CILO 1>Pos;CSWI1/Pos/stVal[0]" + value="GOOSE_Subscriber>>Earth_Switch> CILO 1>GOOSE:GOOSE2 QB2_Disconnector/ LLN0 GOOSE_Publisher QB2_Disconnector/ CILO 1 EnaOpn stVal@Pos;CILO/EnaOpn2/stVal" > - Pos;CSWI1/Pos/stVal - (Interlocking.Input) + Pos;CILO/EnaOpn2/stVal + (Interlocking.Input4) - GOOSE_Subscriber>>Earth_Switch> CILO 1>Pos;CSWI1/Pos/stVal[0] + GOOSE_Subscriber>>Earth_Switch> CILO 1>GOOSE:GOOSE2 QB2_Disconnector/ LLN0 GOOSE_Publisher QB2_Disconnector/ CILO 1 EnaOpn stVal@Pos;CILO/EnaOpn2/stVal arrow_back @@ -1011,7 +1011,7 @@ snapshots["extref-later-binding-list when GSEControl has a multiple subscription aria-disabled="false" noninteractive="" tabindex="-1" - value="Interlocking.Input3 GOOSE_Subscriber>>Earth_Switch> CILO 1>GOOSE:GOOSE2 QB2_Disconnector/ LLN0 GOOSE_Publisher QB1_Disconnector/ CILO 1 EnaCls stVal@Pos;CILO/EnaCls/stVal Interlocking.Input4 GOOSE_Subscriber>>Earth_Switch> CILO 1>GOOSE:GOOSE2 QB2_Disconnector/ LLN0 GOOSE_Publisher QB2_Disconnector/ CILO 1 EnaOpn stVal@Pos;CILO/EnaOpn2/stVal Interlocking.Input GOOSE_Subscriber>>Earth_Switch> CILO 1>Pos;CSWI1/Pos/stVal[0] Restricted To Pos GOOSE_Subscriber>>Earth_Switch> CSWI 1>someRestrictedExtRef[0]" + value="Interlocking.Input GOOSE_Subscriber>>Earth_Switch> CILO 1>Pos;CSWI1/Pos/stVal[0] Interlocking.Input3 GOOSE_Subscriber>>Earth_Switch> CILO 1>GOOSE:GOOSE2 QB2_Disconnector/ LLN0 GOOSE_Publisher QB1_Disconnector/ CILO 1 EnaCls stVal@Pos;CILO/EnaCls/stVal Interlocking.Input4 GOOSE_Subscriber>>Earth_Switch> CILO 1>GOOSE:GOOSE2 QB2_Disconnector/ LLN0 GOOSE_Publisher QB2_Disconnector/ CILO 1 EnaOpn stVal@Pos;CILO/EnaOpn2/stVal Restricted To Pos GOOSE_Subscriber>>Earth_Switch> CSWI 1>someRestrictedExtRef[0]" > [subscription.subscriber.availableToSubscribe] @@ -1028,14 +1028,14 @@ snapshots["extref-later-binding-list when GSEControl has a multiple subscription mwc-list-item="" tabindex="-1" twoline="" - value="GOOSE_Subscriber>>Earth_Switch> CILO 1>GOOSE:GOOSE2 QB2_Disconnector/ LLN0 GOOSE_Publisher QB1_Disconnector/ CILO 1 EnaCls stVal@Pos;CILO/EnaCls/stVal" + value="GOOSE_Subscriber>>Earth_Switch> CILO 1>Pos;CSWI1/Pos/stVal[0]" > - Pos;CILO/EnaCls/stVal - (Interlocking.Input3) + Pos;CSWI1/Pos/stVal + (Interlocking.Input) - GOOSE_Subscriber>>Earth_Switch> CILO 1>GOOSE:GOOSE2 QB2_Disconnector/ LLN0 GOOSE_Publisher QB1_Disconnector/ CILO 1 EnaCls stVal@Pos;CILO/EnaCls/stVal + GOOSE_Subscriber>>Earth_Switch> CILO 1>Pos;CSWI1/Pos/stVal[0] arrow_back @@ -1047,14 +1047,14 @@ snapshots["extref-later-binding-list when GSEControl has a multiple subscription mwc-list-item="" tabindex="-1" twoline="" - value="GOOSE_Subscriber>>Earth_Switch> CILO 1>GOOSE:GOOSE2 QB2_Disconnector/ LLN0 GOOSE_Publisher QB2_Disconnector/ CILO 1 EnaOpn stVal@Pos;CILO/EnaOpn2/stVal" + value="GOOSE_Subscriber>>Earth_Switch> CILO 1>GOOSE:GOOSE2 QB2_Disconnector/ LLN0 GOOSE_Publisher QB1_Disconnector/ CILO 1 EnaCls stVal@Pos;CILO/EnaCls/stVal" > - Pos;CILO/EnaOpn2/stVal - (Interlocking.Input4) + Pos;CILO/EnaCls/stVal + (Interlocking.Input3) - GOOSE_Subscriber>>Earth_Switch> CILO 1>GOOSE:GOOSE2 QB2_Disconnector/ LLN0 GOOSE_Publisher QB2_Disconnector/ CILO 1 EnaOpn stVal@Pos;CILO/EnaOpn2/stVal + GOOSE_Subscriber>>Earth_Switch> CILO 1>GOOSE:GOOSE2 QB2_Disconnector/ LLN0 GOOSE_Publisher QB1_Disconnector/ CILO 1 EnaCls stVal@Pos;CILO/EnaCls/stVal arrow_back @@ -1066,14 +1066,14 @@ snapshots["extref-later-binding-list when GSEControl has a multiple subscription mwc-list-item="" tabindex="-1" twoline="" - value="GOOSE_Subscriber>>Earth_Switch> CILO 1>Pos;CSWI1/Pos/stVal[0]" + value="GOOSE_Subscriber>>Earth_Switch> CILO 1>GOOSE:GOOSE2 QB2_Disconnector/ LLN0 GOOSE_Publisher QB2_Disconnector/ CILO 1 EnaOpn stVal@Pos;CILO/EnaOpn2/stVal" > - Pos;CSWI1/Pos/stVal - (Interlocking.Input) + Pos;CILO/EnaOpn2/stVal + (Interlocking.Input4) - GOOSE_Subscriber>>Earth_Switch> CILO 1>Pos;CSWI1/Pos/stVal[0] + GOOSE_Subscriber>>Earth_Switch> CILO 1>GOOSE:GOOSE2 QB2_Disconnector/ LLN0 GOOSE_Publisher QB2_Disconnector/ CILO 1 EnaOpn stVal@Pos;CILO/EnaOpn2/stVal arrow_back diff --git a/test/unit/editors/subscription/later-binding/__snapshots__/ext-ref-ln-binding-list.test.snap.js b/test/unit/editors/subscription/later-binding/__snapshots__/ext-ref-ln-binding-list.test.snap.js index 61b949424..5afa44ad2 100644 --- a/test/unit/editors/subscription/later-binding/__snapshots__/ext-ref-ln-binding-list.test.snap.js +++ b/test/unit/editors/subscription/later-binding/__snapshots__/ext-ref-ln-binding-list.test.snap.js @@ -52,7 +52,7 @@ snapshots["for Sampled Value Control when SVC has no subscriptions looks like th aria-disabled="false" noninteractive="" tabindex="-1" - value="PTRC - 1 SMV_Subscriber1>>Overcurrent Some LN title (LLN0) SMV_Subscriber1>>Overcurrent PTRC - 1 SMV_Subscriber1>>Overvoltage Some LN title (LLN0) SMV_Subscriber1>>Overvoltage PTRC - 1 SMV_Subscriber2>>Overcurrent Some LN title (LLN0) SMV_Subscriber2>>Overcurrent PTRC - 1 SMV_Subscriber2>>Overvoltage Some LN title (LLN0) SMV_Subscriber2>>Overvoltage" + value="Some LN title (LLN0) SMV_Subscriber1>>Overvoltage PTRC - 1 SMV_Subscriber1>>Overvoltage Some LN title (LLN0) SMV_Subscriber1>>Overcurrent PTRC - 1 SMV_Subscriber1>>Overcurrent Some LN title (LLN0) SMV_Subscriber2>>Overvoltage PTRC - 1 SMV_Subscriber2>>Overvoltage Some LN title (LLN0) SMV_Subscriber2>>Overcurrent PTRC - 1 SMV_Subscriber2>>Overcurrent" > [subscription.subscriber.availableToSubscribe] @@ -69,13 +69,13 @@ snapshots["for Sampled Value Control when SVC has no subscriptions looks like th mwc-list-item="" tabindex="-1" twoline="" - value="SMV_Subscriber1>>Overcurrent> PTRC 1" + value="SMV_Subscriber1>>Overvoltage" > - PTRC - 1 + Some LN title (LLN0) - SMV_Subscriber1>>Overcurrent + SMV_Subscriber1>>Overvoltage add @@ -87,13 +87,13 @@ snapshots["for Sampled Value Control when SVC has no subscriptions looks like th mwc-list-item="" tabindex="-1" twoline="" - value="SMV_Subscriber1>>Overcurrent" + value="SMV_Subscriber1>>Overvoltage> PTRC 1" > - Some LN title (LLN0) + PTRC - 1 - SMV_Subscriber1>>Overcurrent + SMV_Subscriber1>>Overvoltage add @@ -105,13 +105,13 @@ snapshots["for Sampled Value Control when SVC has no subscriptions looks like th mwc-list-item="" tabindex="-1" twoline="" - value="SMV_Subscriber1>>Overvoltage> PTRC 1" + value="SMV_Subscriber1>>Overcurrent" > - PTRC - 1 + Some LN title (LLN0) - SMV_Subscriber1>>Overvoltage + SMV_Subscriber1>>Overcurrent add @@ -123,13 +123,13 @@ snapshots["for Sampled Value Control when SVC has no subscriptions looks like th mwc-list-item="" tabindex="-1" twoline="" - value="SMV_Subscriber1>>Overvoltage" + value="SMV_Subscriber1>>Overcurrent> PTRC 1" > - Some LN title (LLN0) + PTRC - 1 - SMV_Subscriber1>>Overvoltage + SMV_Subscriber1>>Overcurrent add @@ -142,13 +142,13 @@ snapshots["for Sampled Value Control when SVC has no subscriptions looks like th mwc-list-item="" tabindex="-1" twoline="" - value="SMV_Subscriber2>>Overcurrent> PTRC 1" + value="SMV_Subscriber2>>Overvoltage" > - PTRC - 1 + Some LN title (LLN0) - SMV_Subscriber2>>Overcurrent + SMV_Subscriber2>>Overvoltage add @@ -161,13 +161,13 @@ snapshots["for Sampled Value Control when SVC has no subscriptions looks like th mwc-list-item="" tabindex="-1" twoline="" - value="SMV_Subscriber2>>Overcurrent" + value="SMV_Subscriber2>>Overvoltage> PTRC 1" > - Some LN title (LLN0) + PTRC - 1 - SMV_Subscriber2>>Overcurrent + SMV_Subscriber2>>Overvoltage add @@ -180,13 +180,13 @@ snapshots["for Sampled Value Control when SVC has no subscriptions looks like th mwc-list-item="" tabindex="-1" twoline="" - value="SMV_Subscriber2>>Overvoltage> PTRC 1" + value="SMV_Subscriber2>>Overcurrent" > - PTRC - 1 + Some LN title (LLN0) - SMV_Subscriber2>>Overvoltage + SMV_Subscriber2>>Overcurrent add @@ -199,13 +199,13 @@ snapshots["for Sampled Value Control when SVC has no subscriptions looks like th mwc-list-item="" tabindex="-1" twoline="" - value="SMV_Subscriber2>>Overvoltage" + value="SMV_Subscriber2>>Overcurrent> PTRC 1" > - Some LN title (LLN0) + PTRC - 1 - SMV_Subscriber2>>Overvoltage + SMV_Subscriber2>>Overcurrent add @@ -259,7 +259,7 @@ snapshots["for Sampled Value Control when SVC has a single subscriptions looks l aria-disabled="false" noninteractive="" tabindex="-1" - value="PTRC - 1 SMV_Subscriber1>>Overcurrent Some LN title (LLN0) SMV_Subscriber1>>Overcurrent PTRC - 1 SMV_Subscriber1>>Overvoltage PTRC - 1 SMV_Subscriber2>>Overcurrent Some LN title (LLN0) SMV_Subscriber2>>Overcurrent PTRC - 1 SMV_Subscriber2>>Overvoltage Some LN title (LLN0) SMV_Subscriber2>>Overvoltage" + value="PTRC - 1 SMV_Subscriber1>>Overvoltage Some LN title (LLN0) SMV_Subscriber1>>Overcurrent PTRC - 1 SMV_Subscriber1>>Overcurrent Some LN title (LLN0) SMV_Subscriber2>>Overvoltage PTRC - 1 SMV_Subscriber2>>Overvoltage Some LN title (LLN0) SMV_Subscriber2>>Overcurrent PTRC - 1 SMV_Subscriber2>>Overcurrent" > [subscription.subscriber.availableToSubscribe] @@ -276,13 +276,13 @@ snapshots["for Sampled Value Control when SVC has a single subscriptions looks l mwc-list-item="" tabindex="-1" twoline="" - value="SMV_Subscriber1>>Overcurrent> PTRC 1" + value="SMV_Subscriber1>>Overvoltage> PTRC 1" > PTRC - 1 - SMV_Subscriber1>>Overcurrent + SMV_Subscriber1>>Overvoltage add @@ -312,13 +312,13 @@ snapshots["for Sampled Value Control when SVC has a single subscriptions looks l mwc-list-item="" tabindex="-1" twoline="" - value="SMV_Subscriber1>>Overvoltage> PTRC 1" + value="SMV_Subscriber1>>Overcurrent> PTRC 1" > PTRC - 1 - SMV_Subscriber1>>Overvoltage + SMV_Subscriber1>>Overcurrent add @@ -331,13 +331,13 @@ snapshots["for Sampled Value Control when SVC has a single subscriptions looks l mwc-list-item="" tabindex="-1" twoline="" - value="SMV_Subscriber2>>Overcurrent> PTRC 1" + value="SMV_Subscriber2>>Overvoltage" > - PTRC - 1 + Some LN title (LLN0) - SMV_Subscriber2>>Overcurrent + SMV_Subscriber2>>Overvoltage add @@ -350,13 +350,13 @@ snapshots["for Sampled Value Control when SVC has a single subscriptions looks l mwc-list-item="" tabindex="-1" twoline="" - value="SMV_Subscriber2>>Overcurrent" + value="SMV_Subscriber2>>Overvoltage> PTRC 1" > - Some LN title (LLN0) + PTRC - 1 - SMV_Subscriber2>>Overcurrent + SMV_Subscriber2>>Overvoltage add @@ -369,13 +369,13 @@ snapshots["for Sampled Value Control when SVC has a single subscriptions looks l mwc-list-item="" tabindex="-1" twoline="" - value="SMV_Subscriber2>>Overvoltage> PTRC 1" + value="SMV_Subscriber2>>Overcurrent" > - PTRC - 1 + Some LN title (LLN0) - SMV_Subscriber2>>Overvoltage + SMV_Subscriber2>>Overcurrent add @@ -388,13 +388,13 @@ snapshots["for Sampled Value Control when SVC has a single subscriptions looks l mwc-list-item="" tabindex="-1" twoline="" - value="SMV_Subscriber2>>Overvoltage" + value="SMV_Subscriber2>>Overcurrent> PTRC 1" > - Some LN title (LLN0) + PTRC - 1 - SMV_Subscriber2>>Overvoltage + SMV_Subscriber2>>Overcurrent add @@ -464,7 +464,7 @@ snapshots["when SVC has a multiple subscriptions looks like the latest snapshot, aria-disabled="false" noninteractive="" tabindex="-1" - value="PTRC - 1 SMV_Subscriber1>>Overcurrent Some LN title (LLN0) SMV_Subscriber1>>Overcurrent PTRC - 1 SMV_Subscriber1>>Overvoltage PTRC - 1 SMV_Subscriber2>>Overcurrent Some LN title (LLN0) SMV_Subscriber2>>Overcurrent PTRC - 1 SMV_Subscriber2>>Overvoltage" + value="PTRC - 1 SMV_Subscriber1>>Overvoltage Some LN title (LLN0) SMV_Subscriber1>>Overcurrent PTRC - 1 SMV_Subscriber1>>Overcurrent PTRC - 1 SMV_Subscriber2>>Overvoltage Some LN title (LLN0) SMV_Subscriber2>>Overcurrent PTRC - 1 SMV_Subscriber2>>Overcurrent" > [subscription.subscriber.availableToSubscribe] @@ -481,13 +481,13 @@ snapshots["when SVC has a multiple subscriptions looks like the latest snapshot, mwc-list-item="" tabindex="-1" twoline="" - value="SMV_Subscriber1>>Overcurrent> PTRC 1" + value="SMV_Subscriber1>>Overvoltage> PTRC 1" > PTRC - 1 - SMV_Subscriber1>>Overcurrent + SMV_Subscriber1>>Overvoltage add @@ -517,13 +517,13 @@ snapshots["when SVC has a multiple subscriptions looks like the latest snapshot, mwc-list-item="" tabindex="-1" twoline="" - value="SMV_Subscriber1>>Overvoltage> PTRC 1" + value="SMV_Subscriber1>>Overcurrent> PTRC 1" > PTRC - 1 - SMV_Subscriber1>>Overvoltage + SMV_Subscriber1>>Overcurrent add @@ -536,13 +536,13 @@ snapshots["when SVC has a multiple subscriptions looks like the latest snapshot, mwc-list-item="" tabindex="-1" twoline="" - value="SMV_Subscriber2>>Overcurrent> PTRC 1" + value="SMV_Subscriber2>>Overvoltage> PTRC 1" > PTRC - 1 - SMV_Subscriber2>>Overcurrent + SMV_Subscriber2>>Overvoltage add @@ -574,13 +574,13 @@ snapshots["when SVC has a multiple subscriptions looks like the latest snapshot, mwc-list-item="" tabindex="-1" twoline="" - value="SMV_Subscriber2>>Overvoltage> PTRC 1" + value="SMV_Subscriber2>>Overcurrent> PTRC 1" > PTRC - 1 - SMV_Subscriber2>>Overvoltage + SMV_Subscriber2>>Overcurrent add @@ -633,7 +633,7 @@ snapshots["for GOOSE Control when GSEControl has no subscriptions looks like the aria-disabled="false" noninteractive="" tabindex="-1" - value="CILO - 1 GOOSE_Subscriber1>>Earth_Switch CSWI - 1 GOOSE_Subscriber1>>Earth_Switch Some LN title (LLN0) GOOSE_Subscriber1>>Earth_Switch XSWI - 1 GOOSE_Subscriber1>>Earth_Switch CILO - 1 GOOSE_Subscriber2>>Earth_Switch CSWI - 1 GOOSE_Subscriber2>>Earth_Switch Some LN title (LLN0) GOOSE_Subscriber2>>Earth_Switch XSWI - 1 GOOSE_Subscriber2>>Earth_Switch" + value="Some LN title (LLN0) GOOSE_Subscriber1>>Earth_Switch CILO - 1 GOOSE_Subscriber1>>Earth_Switch CSWI - 1 GOOSE_Subscriber1>>Earth_Switch XSWI - 1 GOOSE_Subscriber1>>Earth_Switch Some LN title (LLN0) GOOSE_Subscriber2>>Earth_Switch CILO - 1 GOOSE_Subscriber2>>Earth_Switch CSWI - 1 GOOSE_Subscriber2>>Earth_Switch XSWI - 1 GOOSE_Subscriber2>>Earth_Switch" > [subscription.subscriber.availableToSubscribe] @@ -651,10 +651,10 @@ snapshots["for GOOSE Control when GSEControl has no subscriptions looks like the mwc-list-item="" tabindex="-1" twoline="" - value="GOOSE_Subscriber1>>Earth_Switch> CILO 1" + value="GOOSE_Subscriber1>>Earth_Switch" > - CILO - 1 + Some LN title (LLN0) GOOSE_Subscriber1>>Earth_Switch @@ -670,10 +670,10 @@ snapshots["for GOOSE Control when GSEControl has no subscriptions looks like the mwc-list-item="" tabindex="-1" twoline="" - value="GOOSE_Subscriber1>>Earth_Switch> CSWI 1" + value="GOOSE_Subscriber1>>Earth_Switch> CILO 1" > - CSWI - 1 + CILO - 1 GOOSE_Subscriber1>>Earth_Switch @@ -689,10 +689,10 @@ snapshots["for GOOSE Control when GSEControl has no subscriptions looks like the mwc-list-item="" tabindex="-1" twoline="" - value="GOOSE_Subscriber1>>Earth_Switch" + value="GOOSE_Subscriber1>>Earth_Switch> CSWI 1" > - Some LN title (LLN0) + CSWI - 1 GOOSE_Subscriber1>>Earth_Switch @@ -726,10 +726,10 @@ snapshots["for GOOSE Control when GSEControl has no subscriptions looks like the mwc-list-item="" tabindex="-1" twoline="" - value="GOOSE_Subscriber2>>Earth_Switch> CILO 1" + value="GOOSE_Subscriber2>>Earth_Switch" > - CILO - 1 + Some LN title (LLN0) GOOSE_Subscriber2>>Earth_Switch @@ -744,10 +744,10 @@ snapshots["for GOOSE Control when GSEControl has no subscriptions looks like the mwc-list-item="" tabindex="-1" twoline="" - value="GOOSE_Subscriber2>>Earth_Switch> CSWI 1" + value="GOOSE_Subscriber2>>Earth_Switch> CILO 1" > - CSWI - 1 + CILO - 1 GOOSE_Subscriber2>>Earth_Switch @@ -762,10 +762,10 @@ snapshots["for GOOSE Control when GSEControl has no subscriptions looks like the mwc-list-item="" tabindex="-1" twoline="" - value="GOOSE_Subscriber2>>Earth_Switch" + value="GOOSE_Subscriber2>>Earth_Switch> CSWI 1" > - Some LN title (LLN0) + CSWI - 1 GOOSE_Subscriber2>>Earth_Switch @@ -840,7 +840,7 @@ snapshots["for GOOSE Control when GSEControl has a single subscription looks lik aria-disabled="false" noninteractive="" tabindex="-1" - value="CILO - 1 GOOSE_Subscriber1>>Earth_Switch Some LN title (LLN0) GOOSE_Subscriber1>>Earth_Switch XSWI - 1 GOOSE_Subscriber1>>Earth_Switch CILO - 1 GOOSE_Subscriber2>>Earth_Switch XSWI - 1 GOOSE_Subscriber2>>Earth_Switch" + value="Some LN title (LLN0) GOOSE_Subscriber1>>Earth_Switch CILO - 1 GOOSE_Subscriber1>>Earth_Switch CSWI - 1 GOOSE_Subscriber1>>Earth_Switch XSWI - 1 GOOSE_Subscriber1>>Earth_Switch CILO - 1 GOOSE_Subscriber2>>Earth_Switch CSWI - 1 GOOSE_Subscriber2>>Earth_Switch XSWI - 1 GOOSE_Subscriber2>>Earth_Switch" > [subscription.subscriber.availableToSubscribe] @@ -851,6 +851,25 @@ snapshots["for GOOSE Control when GSEControl has a single subscription looks lik role="separator" > + + + Some LN title (LLN0) + + + GOOSE_Subscriber1>>Earth_Switch + + + add + + - Some LN title (LLN0) + CSWI - 1 GOOSE_Subscriber1>>Earth_Switch @@ -926,6 +945,24 @@ snapshots["for GOOSE Control when GSEControl has a single subscription looks lik add + + + CSWI - 1 + + + GOOSE_Subscriber2>>Earth_Switch + + + add + + [subscription.subscriber.subscribed] @@ -992,10 +1029,10 @@ snapshots["when GSEControl has a multiple subscriptions looks like the latest sn - CILO - 1 + Some LN title (LLN0) GOOSE_Subscriber2>>Earth_Switch @@ -1007,10 +1044,10 @@ snapshots["when GSEControl has a multiple subscriptions looks like the latest sn - Some LN title (LLN0) + CILO - 1 GOOSE_Subscriber2>>Earth_Switch @@ -1023,7 +1060,7 @@ snapshots["when GSEControl has a multiple subscriptions looks like the latest sn aria-disabled="false" noninteractive="" tabindex="-1" - value="CILO - 1 GOOSE_Subscriber1>>Earth_Switch XSWI - 1 GOOSE_Subscriber1>>Earth_Switch XSWI - 1 GOOSE_Subscriber2>>Earth_Switch" + value="CILO - 1 GOOSE_Subscriber1>>Earth_Switch CSWI - 1 GOOSE_Subscriber1>>Earth_Switch XSWI - 1 GOOSE_Subscriber1>>Earth_Switch CSWI - 1 GOOSE_Subscriber2>>Earth_Switch XSWI - 1 GOOSE_Subscriber2>>Earth_Switch" > [subscription.subscriber.availableToSubscribe] @@ -1053,6 +1090,25 @@ snapshots["when GSEControl has a multiple subscriptions looks like the latest sn add + + + CSWI - 1 + + + GOOSE_Subscriber1>>Earth_Switch + + + add + + + + + CSWI - 1 + + + GOOSE_Subscriber2>>Earth_Switch + + + add + + { }); it('expect the correct number of available elements', () => { - expect(element['getAvailableLNElements']().length).to.be.equal(5); + expect(element['getAvailableLNElements']().length).to.be.equal(7); }); it('looks like the latest snapshot, ', async () => { @@ -265,7 +265,7 @@ describe('extref-ln-binding-list', async () => { }); it('expect the correct number of available elements', () => { - expect(element['getAvailableLNElements']().length).to.be.equal(3); + expect(element['getAvailableLNElements']().length).to.be.equal(5); }); it('looks like the latest snapshot, ', async () => { diff --git a/test/unit/editors/subscription/later-binding/foundation.test.ts b/test/unit/editors/subscription/later-binding/foundation.test.ts index 152c3117a..2a32bcadc 100644 --- a/test/unit/editors/subscription/later-binding/foundation.test.ts +++ b/test/unit/editors/subscription/later-binding/foundation.test.ts @@ -134,8 +134,7 @@ describe('smv-list', () => { }); describe('isSubscribedTo', () => { - const type = 'SMV'; - let ied: Element; + const type = 'SampledValueControl'; let control: Element; let fcda: Element; let extRef: Element; @@ -148,79 +147,78 @@ describe('smv-list', () => { control = doc.querySelector( 'IED[name="SMV_Publisher"] SampledValueControl[name="currentOnly"]' )!; - ied = fcda.closest('IED')!; extRef = doc.querySelector( 'IED[name="SMV_Subscriber"] LDevice[inst="Overvoltage"] ExtRef[doName="AmpSv"][daName="instMag.i"][srcCBName="currentOnly"]' )!; }); it('when ExtRef and FDCA have same values then ExtRef is subscribed', () => { - expect(isSubscribedTo(type, ied, control, fcda, extRef)).to.be.true; + expect(isSubscribedTo(type, control, fcda, extRef)).to.be.true; }); it('when ExtRef and FDCA have different IED then ExtRef is not subscribed', () => { - ied.setAttribute('name', 'OtherName'); - expect(isSubscribedTo(type, ied, control, fcda, extRef)).to.be.false; + fcda.closest('IED')!.setAttribute('name', 'OtherName'); + expect(isSubscribedTo(type, control, fcda, extRef)).to.be.false; }); it('when ExtRef and FDCA have different ldInst Value then ExtRef is not subscribed', () => { extRef.setAttribute('ldInst', 'OtherValue'); - expect(isSubscribedTo(type, ied, control, fcda, extRef)).to.be.false; + expect(isSubscribedTo(type, control, fcda, extRef)).to.be.false; }); it('when ExtRef and FDCA have different prefix Value then ExtRef is not subscribed', () => { extRef.setAttribute('prefix', 'OtherValue'); - expect(isSubscribedTo(type, ied, control, fcda, extRef)).to.be.false; + expect(isSubscribedTo(type, control, fcda, extRef)).to.be.false; }); it('when ExtRef and FDCA have different lnClass Value then ExtRef is not subscribed', () => { extRef.setAttribute('lnClass', 'OtherValue'); - expect(isSubscribedTo(type, ied, control, fcda, extRef)).to.be.false; + expect(isSubscribedTo(type, control, fcda, extRef)).to.be.false; }); it('when ExtRef and FDCA have different lnInst Value then ExtRef is not subscribed', () => { extRef.setAttribute('lnInst', 'OtherValue'); - expect(isSubscribedTo(type, ied, control, fcda, extRef)).to.be.false; + expect(isSubscribedTo(type, control, fcda, extRef)).to.be.false; }); it('when ExtRef and FDCA have different doName Value then ExtRef is not subscribed', () => { extRef.setAttribute('doName', 'OtherValue'); - expect(isSubscribedTo(type, ied, control, fcda, extRef)).to.be.false; + expect(isSubscribedTo(type, control, fcda, extRef)).to.be.false; }); it('when ExtRef and FDCA have different daName Value then ExtRef is not subscribed', () => { extRef.setAttribute('daName', 'OtherValue'); - expect(isSubscribedTo(type, ied, control, fcda, extRef)).to.be.false; + expect(isSubscribedTo(type, control, fcda, extRef)).to.be.false; }); it('when ExtRef has a different ServiceType Value then ExtRef is not subscribed', () => { extRef.setAttribute('serviceType', 'OtherValue'); - expect(isSubscribedTo(type, ied, control, fcda, extRef)).to.be.false; + expect(isSubscribedTo(type, control, fcda, extRef)).to.be.false; }); it('when ExtRef and FDCA have different srcLDInst Value then ExtRef is not subscribed', () => { extRef.setAttribute('srcLDInst', 'OtherValue'); - expect(isSubscribedTo(type, ied, control, fcda, extRef)).to.be.false; + expect(isSubscribedTo(type, control, fcda, extRef)).to.be.false; }); it('when ExtRef and FDCA have different scrPrefix Value then ExtRef is not subscribed', () => { extRef.setAttribute('scrPrefix', 'OtherValue'); - expect(isSubscribedTo(type, ied, control, fcda, extRef)).to.be.false; + expect(isSubscribedTo(type, control, fcda, extRef)).to.be.false; }); it('when ExtRef and FDCA have different srcLNClass Value then ExtRef is not subscribed', () => { extRef.setAttribute('srcLNClass', 'OtherValue'); - expect(isSubscribedTo(type, ied, control, fcda, extRef)).to.be.false; + expect(isSubscribedTo(type, control, fcda, extRef)).to.be.false; }); it('when ExtRef and FDCA have different srcLNInst Value then ExtRef is not subscribed', () => { extRef.setAttribute('srcLNInst', 'OtherValue'); - expect(isSubscribedTo(type, ied, control, fcda, extRef)).to.be.false; + expect(isSubscribedTo(type, control, fcda, extRef)).to.be.false; }); it('when ExtRef and FDCA have different srcCBName Value then ExtRef is not subscribed', () => { extRef.setAttribute('srcCBName', 'OtherValue'); - expect(isSubscribedTo(type, ied, control, fcda, extRef)).to.be.false; + expect(isSubscribedTo(type, control, fcda, extRef)).to.be.false; }); }); @@ -236,14 +234,13 @@ describe('smv-list', () => { control = doc.querySelector( 'IED[name="SMV_Publisher"] SampledValueControl[name="currentOnly"]' )!; - ied = fcda.closest('IED')!; extRef = doc.querySelector( 'IED[name="SMV_Subscriber"] LDevice[inst="Overvoltage"] ExtRef[ldInst="CurrentTransformer"][doName="AmpSv"][daName="instMag.i"]' )!; }); it('when ExtRef and FDCA have same values then ExtRef is subscribed', () => { - expect(isSubscribedTo(type, ied, control, fcda, extRef)).to.be.true; + expect(isSubscribedTo(type, control, fcda, extRef)).to.be.true; }); }); });