How to test ion-side-menu opening & closing

I’ve been trying to write end-to-end tests for my Ionic app. I’m having trouble detecting when the side menu is opened or closed. I’m using Protractor for tests.

Here’s what I have:

    expect(element(by.tagName('ion-side-menu')).isDisplayed()).toBe(true);
    // close menu
    groupsPage.toggleGroups();
    expect(element(by.tagName('ion-side-menu')).isDisplayed()).toBe(false);    

The side menu clearly closes. However the value of isDisplayed() always returns true. I have even tried delaying the second test inside a then() callback to make sure there were no timing issues

Has anyone successfully queried the state of a side menu for this kind of test?

Hi @blakflag,

Are you able to do this now with Ionic 3.

I am also trying to do the same i.e. to test

Open ion menu using menu toggle button.
Click on back drop to close it.

Please help me.