Is the element(by.css()).click() method returning a promise, or is there a way to catch and assert against any errors that may occur? In my scenario, I have a component that is not clickable, and I want to handle the error when this happens. I also want to assert that the button is unclickable due to lack of permissions.
Thank you in advance for your help.
I can only provide the following code snippet as it's all I've written:
element(by.id('main_navbar')).$("li[name=sb]").$("a").click()
Below is the error message:
UnknownError: unknown error: Element is not clickable at point (276, 70). Other element would receive the click: <li name="sb" ui-route="/sb" ng-class="{active:$uiRoute}" class="ng-isolate-scope">...</li>
This error provides a good opportunity for assertion testing.