Quantcast
Channel: Ionic Forum - Latest topics
Viewing all articles
Browse latest Browse all 71531

Simulate a Tap Event for Functional Tests

$
0
0

@JoeOSMG wrote:

We’d like to simulate a button tap event in order to run functional tests in an Ionic/Cordova app. It appears click events work on the buttons, but when the event is triggered by a tap (which we consider better UX), we’re unable to simulate the event with our test code.

Here’s our Ionic button:

<button id="loginBtn" ion-button block (tap)="login()">LOGIN</button>

Here’s how we trigger click events:

document.getElementById('loginBtn').click();

How can we do this for Ionic tap events?

Posts: 1

Participants: 1

Read full topic


Viewing all articles
Browse latest Browse all 71531

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>