Dealing with Timing Issues in Ionic E2E Tests

Dealing with Timing Issues in Ionic E2E Tests

Follow Josh Morony on

Learn Ionic with Josh ☕

Hey, I hope you enjoy the article.

If you want a weekly update with my newest content, access to the blog's bonus content, or you want to sign up for one of my free beginner or advanced email courses just enter your details here or in the form below.

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:

If you enjoyed this article, feel free to share it with your friends ☝

Check out my latest videos: