Skip to content

Commit 436c764

Browse files
authored
fix: enable IED editor plugin by default (openscd#1253)
* fix: enable IED editor plugin by default * chore: put ied plugin on top
1 parent 9017128 commit 436c764

File tree

3 files changed

+19
-18
lines changed

3 files changed

+19
-18
lines changed

public/js/plugins.js

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,16 @@
11
export const officialPlugins = [
22
{
3-
name: 'Substation',
4-
src: '/src/editors/Substation.js',
5-
icon: 'margin',
3+
name: 'IED',
4+
src: '/src/editors/IED.js',
5+
icon: 'developer_board',
66
default: true,
77
kind: 'editor',
88
},
99
{
10-
name: 'IED',
11-
src: '/src/editors/IED.js',
12-
icon: 'developer_board',
13-
default: false,
10+
name: 'Substation',
11+
src: '/src/editors/Substation.js',
12+
icon: 'margin',
13+
default: true,
1414
kind: 'editor',
1515
},
1616
{

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

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -583,12 +583,12 @@ snapshots["open-scd looks like its snapshot"] =
583583
mwc-list-item=""
584584
selected=""
585585
tabindex="0"
586-
value="/src/editors/Substation.js"
586+
value="/src/editors/IED.js"
587587
>
588588
<mwc-icon slot="meta">
589-
margin
589+
developer_board
590590
</mwc-icon>
591-
Substation
591+
IED
592592
</mwc-check-list-item>
593593
<mwc-check-list-item
594594
aria-disabled="false"
@@ -597,13 +597,14 @@ snapshots["open-scd looks like its snapshot"] =
597597
hasmeta=""
598598
left=""
599599
mwc-list-item=""
600+
selected=""
600601
tabindex="-1"
601-
value="/src/editors/IED.js"
602+
value="/src/editors/Substation.js"
602603
>
603604
<mwc-icon slot="meta">
604-
developer_board
605+
margin
605606
</mwc-icon>
606-
IED
607+
Substation
607608
</mwc-check-list-item>
608609
<mwc-check-list-item
609610
aria-disabled="false"

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(9));
26+
expect(element).property('editors').to.have.lengthOf(10));
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(8);
53+
expect(element).property('editors').to.have.lengthOf(9);
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(9);
61+
expect(element).property('editors').to.have.lengthOf(10);
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(9);
69+
expect(element).property('editors').to.have.lengthOf(10);
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(10);
143+
expect(element.editors).to.have.lengthOf(11);
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)