Skip to content

Commit 04d351f

Browse files
authored
fix: only later binding subscribers by default (openscd#1254)
* fix: only later binding subscribers by default * chore: re added test
1 parent ed41def commit 04d351f

File tree

3 files changed

+9
-13
lines changed

3 files changed

+9
-13
lines changed

public/js/plugins.js

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -24,14 +24,14 @@ export const officialPlugins = [
2424
name: 'Subscriber Message Binding (GOOSE)',
2525
src: '/src/editors/GooseSubscriberMessageBinding.js',
2626
icon: 'link',
27-
default: true,
27+
default: false,
2828
kind: 'editor',
2929
},
3030
{
3131
name: 'Subscriber Data Binding (GOOSE)',
3232
src: '/src/editors/GooseSubscriberDataBinding.js',
3333
icon: 'link',
34-
default: true,
34+
default: false,
3535
kind: 'editor',
3636
},
3737
{
@@ -45,14 +45,14 @@ export const officialPlugins = [
4545
name: 'Subscriber Message Binding (SMV)',
4646
src: '/src/editors/SMVSubscriberMessageBinding.js',
4747
icon: 'link',
48-
default: true,
48+
default: false,
4949
kind: 'editor',
5050
},
5151
{
5252
name: 'Subscriber Data Binding (SMV)',
5353
src: '/src/editors/SMVSubscriberDataBinding.js',
5454
icon: 'link',
55-
default: true,
55+
default: false,
5656
kind: 'editor',
5757
},
5858
{

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

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -584,7 +584,6 @@ snapshots["open-scd looks like its snapshot"] =
584584
hasmeta=""
585585
left=""
586586
mwc-list-item=""
587-
selected=""
588587
tabindex="-1"
589588
value="/src/editors/GooseSubscriberMessageBinding.js"
590589
>
@@ -600,7 +599,6 @@ snapshots["open-scd looks like its snapshot"] =
600599
hasmeta=""
601600
left=""
602601
mwc-list-item=""
603-
selected=""
604602
tabindex="-1"
605603
value="/src/editors/GooseSubscriberDataBinding.js"
606604
>
@@ -632,7 +630,6 @@ snapshots["open-scd looks like its snapshot"] =
632630
hasmeta=""
633631
left=""
634632
mwc-list-item=""
635-
selected=""
636633
tabindex="-1"
637634
value="/src/editors/SMVSubscriberMessageBinding.js"
638635
>
@@ -648,7 +645,6 @@ snapshots["open-scd looks like its snapshot"] =
648645
hasmeta=""
649646
left=""
650647
mwc-list-item=""
651-
selected=""
652648
tabindex="-1"
653649
value="/src/editors/SMVSubscriberDataBinding.js"
654650
>

test/unit/Plugging.test.ts

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ describe('PluggingElement', () => {
2323
});
2424

2525
it('stores default plugins on load', () =>
26-
expect(element).property('editors').to.have.lengthOf(10));
26+
expect(element).property('editors').to.have.lengthOf(6));
2727

2828
describe('plugin manager dialog', () => {
2929
let firstEditorPlugin: HTMLElement;
@@ -50,23 +50,23 @@ describe('PluggingElement', () => {
5050
it('disables deselected plugins', async () => {
5151
firstEditorPlugin.click();
5252
await element.updateComplete;
53-
expect(element).property('editors').to.have.lengthOf(9);
53+
expect(element).property('editors').to.have.lengthOf(5);
5454
});
5555

5656
it('enables selected plugins', async () => {
5757
(<HTMLElement>element.pluginList.firstElementChild).click();
5858
await element.updateComplete;
5959
(<HTMLElement>element.pluginList.firstElementChild).click();
6060
await element.updateComplete;
61-
expect(element).property('editors').to.have.lengthOf(10);
61+
expect(element).property('editors').to.have.lengthOf(6);
6262
});
6363

6464
it('resets plugins to default on reset button click', async () => {
6565
(<HTMLElement>element.pluginList.firstElementChild).click();
6666
await element.updateComplete;
6767
resetAction.click();
6868
await element.updateComplete;
69-
expect(element).property('editors').to.have.lengthOf(10);
69+
expect(element).property('editors').to.have.lengthOf(6);
7070
});
7171

7272
it('opens the custom plugin dialog on add button click', async () => {
@@ -140,7 +140,7 @@ describe('PluggingElement', () => {
140140
await name.updateComplete;
141141
primaryAction.click();
142142
await element.updateComplete;
143-
expect(element.editors).to.have.lengthOf(11);
143+
expect(element.editors).to.have.lengthOf(7);
144144
});
145145
it('adds a new menu kind plugin on add button click', async () => {
146146
const lengthMenuKindPlugins = element.menuEntries.length;

0 commit comments

Comments
 (0)