testBasicButtonBehavior() {
    const node = dom.getElement('demoMenuButton');
    menuButton.decorate(node);

    assertEquals(
        'Menu button must have aria-haspopup attribute set to true', 'true',
        aria.getState(menuButton.getElement(), State.HASPOPUP));

    testingEvents.fireClickSequence(node);

    assertTrue('Menu must open after click', menuButton.isOpen());

    let menuItemClicked = 0;
    let lastMenuItemClicked = null;
    events.listen(menuButton.getMenu(), Component.EventType.ACTION, (e) => {
      menuItemClicked++;
      lastMenuItemClicked = e.target;
    });

    const menuItem2 = dom.getElement('menuItem2');
    testingEvents.fireClickSequence(menuItem2);
    assertFalse('Menu must close on clicking when open', menuButton.isOpen());
    assertEquals(
        'Number of menu items clicked should be 1', 1, menuItemClicked);
    assertEquals(
        'menuItem2 should be the last menuitem clicked', menuItem2,
        lastMenuItemClicked.getElement());
  }
Open the menu and click on the menu item inside.
Check if the aria-haspopup property is set correctly.