Skip to content

Commit

Permalink
test fix for new top nav
Browse files Browse the repository at this point in the history
  • Loading branch information
Michail Yasonik committed Sep 10, 2020
1 parent 302eb79 commit e367824
Showing 1 changed file with 4 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -164,7 +164,10 @@ describe('TopNavMenu', () => {

// menu is rendered outside of the component
expect(component.find(TOP_NAV_ITEM_SELECTOR).length).toBe(0);
expect(portalTarget.getElementsByTagName('BUTTON').length).toBe(menuItems.length);

const buttons = portalTarget.querySelectorAll('button');
expect(buttons.length).toBe(menuItems.length + 1); // should be n+1 buttons in mobile for popover button
expect(buttons[buttons.length - 1].getAttribute('aria-label')).toBe('Open navigation menu'); // last button should be mobile button
});
});
});

0 comments on commit e367824

Please sign in to comment.