File tree Expand file tree Collapse file tree 2 files changed +16
-1
lines changed
tests/integration/components Expand file tree Collapse file tree 2 files changed +16
-1
lines changed Original file line number Diff line number Diff line change 11{{! template-lint-disable no-down-event-binding }}
2- {{ #if @isOpen }}
2+ {{ #if ( or @isOpen @ static ) }}
33 <div
44 id ={{ @itemsGuid }}
55 aria-labelledby ={{ @buttonGuid }}
Original file line number Diff line number Diff line change @@ -219,6 +219,21 @@ module('Integration | Component | <Menu>', (hooks) => {
219219 assert . dom ( '[data-test-item-a]' ) . hasTagName ( 'a' ) ;
220220 assert . dom ( '[data-test-item-a]' ) . hasAttribute ( 'href' , '/menu' ) ;
221221 } ) ;
222+
223+ test ( 'should be possible to always render the Menu.Items if we provide it a `static` prop' , async function ( assert ) {
224+ await render ( hbs `
225+ <Menu as |menu|>
226+ <menu.Button>Trigger</menu.Button>
227+ <menu.Items data-test-menu-items @static={{true}} as |items|>
228+ <items.Item>Item A</items.Item>
229+ <items.Item>Item B</items.Item>
230+ <items.Item>Item C</items.Item>
231+ </menu.Items>
232+ </Menu>
233+ ` ) ;
234+
235+ assert . dom ( '[data-test-menu-items]' ) . isVisible ( ) ;
236+ } ) ;
222237 } ) ;
223238
224239 module ( 'Keyboard interactions' , function ( ) {
You can’t perform that action at this time.
0 commit comments