Skip to content

Commit 4440bff

Browse files
authored
fix: goose subscription reflects state incorrectly (openscd#1261)
Signed-off-by: Stef3st <[email protected]>
1 parent de2dd0d commit 4440bff

File tree

2 files changed

+22
-11
lines changed

2 files changed

+22
-11
lines changed

src/editors/subscription/goose/subscriber-list.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -114,7 +114,7 @@ export class SubscriberList extends SubscriberListContainer {
114114

115115
dataSet!.querySelectorAll('FCDA').forEach(fcda => {
116116
subscribedInputs.forEach(inputs => {
117-
if (getExtRef(inputs, fcda, this.currentSelectedGseControl)) {
117+
if (getExtRef(inputs, fcda, control)) {
118118
numberOfLinkedExtRefs++;
119119
}
120120
});

test/integration/editors/__snapshots__/GooseSubscriberMessageBinding.test.snap.js

Lines changed: 21 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -856,7 +856,7 @@ snapshots["GOOSE subscriber plugin in Subscriber view with a selected IED the le
856856
aria-disabled="false"
857857
noninteractive=""
858858
tabindex="-1"
859-
value="IED1>>CircuitBreaker_CB1>GCB"
859+
value=""
860860
>
861861
<span>
862862
[subscription.subscriber.partiallySubscribed]
@@ -870,21 +870,18 @@ snapshots["GOOSE subscriber plugin in Subscriber view with a selected IED the le
870870
<mwc-list-item
871871
aria-disabled="false"
872872
graphic="avatar"
873-
mwc-list-item=""
874-
tabindex="0"
873+
noninteractive=""
874+
tabindex="-1"
875875
>
876876
<span>
877-
GCB (IED1)
877+
[subscription.none]
878878
</span>
879-
<mwc-icon slot="graphic">
880-
add
881-
</mwc-icon>
882879
</mwc-list-item>
883880
<mwc-list-item
884881
aria-disabled="false"
885882
noninteractive=""
886883
tabindex="-1"
887-
value="IED4>>CircuitBreaker_CB1>GCB"
884+
value="IED1>>CircuitBreaker_CB1>GCB IED4>>CircuitBreaker_CB1>GCB"
888885
>
889886
<span>
890887
[subscription.subscriber.availableToSubscribe]
@@ -895,6 +892,19 @@ snapshots["GOOSE subscriber plugin in Subscriber view with a selected IED the le
895892
role="separator"
896893
>
897894
</li>
895+
<mwc-list-item
896+
aria-disabled="false"
897+
graphic="avatar"
898+
mwc-list-item=""
899+
tabindex="0"
900+
>
901+
<span>
902+
GCB (IED1)
903+
</span>
904+
<mwc-icon slot="graphic">
905+
add
906+
</mwc-icon>
907+
</mwc-list-item>
898908
<mwc-list-item
899909
aria-disabled="false"
900910
graphic="avatar"
@@ -991,10 +1001,9 @@ snapshots["GOOSE subscriber plugin in Subscriber view with a selected IED for un
9911001
</li>
9921002
<mwc-list-item
9931003
aria-disabled="false"
994-
aria-selected="true"
1004+
aria-selected="false"
9951005
graphic="avatar"
9961006
mwc-list-item=""
997-
selected=""
9981007
tabindex="-1"
9991008
>
10001009
<span>
@@ -1193,8 +1202,10 @@ snapshots["GOOSE subscriber plugin in Subscriber view with a selected IED for pa
11931202
</li>
11941203
<mwc-list-item
11951204
aria-disabled="false"
1205+
aria-selected="true"
11961206
graphic="avatar"
11971207
mwc-list-item=""
1208+
selected=""
11981209
tabindex="-1"
11991210
>
12001211
<span>

0 commit comments

Comments
 (0)