Testing Ionic

Dealing with Timing Issues in Ionic E2E Tests



·

When creating End-to-End (E2E) tests, we are basically programming the browser to behave like a human. We tell the browser what pages to go to, what input to send, what buttons to click, and so on.

In a typical E2E test, we will send multiple commands to the browser. We might tell it to click on one button, and then add some input somewhere, click on another button, and any number of other actions. As a human, we know when we can click a button – we would wait until the page has changed or until a loading overlay disappears – but when we are programming the browser to perform actions for us, sometimes it will perform the actions too quickly.

In this video tutorial, we walk through how to use Protractor’s ExpectedConditions to tell the browser to wait until something specific has happened before performing the next step in the test.

Here’s the video:

What to watch next...