File tree Expand file tree Collapse file tree 3 files changed +4
-77
lines changed Expand file tree Collapse file tree 3 files changed +4
-77
lines changed Original file line number Diff line number Diff line change @@ -237,6 +237,7 @@ export function Hosting<
237
237
renderMenuItem ( me : MenuItem | 'divider' ) : TemplateResult {
238
238
if ( me === 'divider' )
239
239
return html `< li divider padded role ="separator "> </ li > ` ;
240
+ if ( me . actionItem ) return html `` ;
240
241
return html `
241
242
< mwc-list-item
242
243
class ="${ me . kind } "
@@ -288,7 +289,9 @@ export function Hosting<
288
289
// if clause not neccassary when oscd... compenents in open-scd not list
289
290
if ( ae . target instanceof List )
290
291
( < MenuItem > (
291
- this . menu . filter ( item => item !== 'divider' ) [ ae . detail . index ]
292
+ this . menu . filter (
293
+ item => item !== 'divider' && ! item . actionItem
294
+ ) [ ae . detail . index ]
292
295
) ) ?. action ?.( ae ) ;
293
296
} }
294
297
>
Original file line number Diff line number Diff line change @@ -76,38 +76,6 @@ snapshots["open-scd looks like its snapshot"] =
76
76
role="separator"
77
77
>
78
78
</li>
79
- <mwc-list-item
80
- aria-disabled="true"
81
- class="static"
82
- disabled=""
83
- graphic="icon"
84
- iconid="undo"
85
- mwc-list-item=""
86
- tabindex="-1"
87
- >
88
- <mwc-icon slot="graphic">
89
- undo
90
- </mwc-icon>
91
- <span>
92
- Undo
93
- </span>
94
- </mwc-list-item>
95
- <mwc-list-item
96
- aria-disabled="true"
97
- class="static"
98
- disabled=""
99
- graphic="icon"
100
- iconid="redo"
101
- mwc-list-item=""
102
- tabindex="-1"
103
- >
104
- <mwc-icon slot="graphic">
105
- redo
106
- </mwc-icon>
107
- <span>
108
- Redo
109
- </span>
110
- </mwc-list-item>
111
79
<mwc-list-item
112
80
aria-disabled="true"
113
81
class="validator"
@@ -144,36 +112,6 @@ snapshots["open-scd looks like its snapshot"] =
144
112
</mwc-list-item>
145
113
<oscd-plugin186320cdd626e422 class="plugin validator">
146
114
</oscd-plugin186320cdd626e422>
147
- <mwc-list-item
148
- aria-disabled="false"
149
- class="static"
150
- graphic="icon"
151
- iconid="history"
152
- mwc-list-item=""
153
- tabindex="-1"
154
- >
155
- <mwc-icon slot="graphic">
156
- history
157
- </mwc-icon>
158
- <span>
159
- View log
160
- </span>
161
- </mwc-list-item>
162
- <mwc-list-item
163
- aria-disabled="false"
164
- class="static"
165
- graphic="icon"
166
- iconid="rule"
167
- mwc-list-item=""
168
- tabindex="-1"
169
- >
170
- <mwc-icon slot="graphic">
171
- rule
172
- </mwc-icon>
173
- <span>
174
- View diagnostics
175
- </span>
176
- </mwc-list-item>
177
115
<li
178
116
divider=""
179
117
padded=""
Original file line number Diff line number Diff line change @@ -47,26 +47,12 @@ describe('open-scd', () => {
47
47
expect ( element . logUI ) . to . have . property ( 'open' , true ) ;
48
48
} ) ;
49
49
50
- it ( 'opens the log on log menu entry click' , async ( ) => {
51
- await ( < HTMLElement > (
52
- element . shadowRoot ! . querySelector ( 'mwc-list-item[iconid="history"]' ) !
53
- ) ) . click ( ) ;
54
- expect ( element . logUI ) . to . have . property ( 'open' , true ) ;
55
- } ) ;
56
-
57
50
it ( 'opens the log on snackbar button click' , async ( ) => {
58
51
expect ( element . logUI ) . to . have . property ( 'open' , false ) ;
59
52
await element . errorUI . querySelector ( 'mwc-button' ) ! . click ( ) ;
60
53
expect ( element . logUI ) . to . have . property ( 'open' , true ) ;
61
54
} ) ;
62
55
63
- it ( 'opens the diagnostics on diagnostics menu entry click' , async ( ) => {
64
- await ( < HTMLElement > (
65
- element . shadowRoot ! . querySelector ( 'mwc-list-item[iconid="rule"]' ) !
66
- ) ) . click ( ) ;
67
- expect ( element . diagnosticUI ) . to . have . property ( 'open' , true ) ;
68
- } ) ;
69
-
70
56
it ( 'opens the diagnostics on snackbar button click' , async ( ) => {
71
57
expect ( element . diagnosticUI ) . to . have . property ( 'open' , false ) ;
72
58
await element . issueUI . querySelector ( 'mwc-button' ) ! . click ( ) ;
You can’t perform that action at this time.
0 commit comments