question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Open Modal or Page with Ionic 3

See original GitHub issue
  • Operating System: Mac OS 10.13.3
  • Cypress Version: 2.0.0
  • Browser Version: Chrome 64.0.3282.186

Is this a Feature or Bug?

Bug

Current behavior:

When I tap on a button to open an Ionic 3 page or Modal, nothing append and my test fail. Cypress success to click on the button but the page doesn’t appear.

Desired behavior:

Open Ionic Modale or Page on button click with Cypress

How to reproduce:

Create an Ionic 3 empty project with a button who open a new page.

Test code:

it('should open page', () => {
        // Button to open my page : OK
        cy.get(my_button).click();

        // Check if a label exists in the opened page : FAIL
        cy.get(a_label_in_my_page).contains("All is ok !");
    });

Question : Is it possible to well test Ionic 3 with Cypress ?

Issue Analytics

  • State:closed
  • Created 6 years ago
  • Comments:7 (3 by maintainers)

github_iconTop GitHub Comments

1reaction
amiral-jioncommented, Jun 18, 2019

I have the same problem, I need to use tap instead of click but I can’t find how to simulate this event with cypress. any one succeed on simulating the tap event guys?

1reaction
jennifer-shehanecommented, Mar 1, 2018

Is there any error that displays within your Test Runner on click? Could you share the error that is displayed?

Also, you may find success with .click({force: true}) option.

Read more comments on GitHub >

github_iconTop Results From Across the Web

ion-modal: Ionic Mobile App Custom Modal API Component
A Modal is a dialog that appears on top of the app's content, and must be dismissed by the app before interaction can...
Read more >
Ionic 3 Show Modals Example and Pass Data - Freaky Jolly
In the above tutorial we got to know, How to open modal in Ionic 3 application and also pass data on Modal open...
Read more >
Ionic 3 - Modal Implementation - YouTube
My Learn Ionic 3 From Scratch Course - https://www.udemy.com/learn- ionic - 3 -from-scratch/?couponCode=IONIC3MAYSupport the content: ...
Read more >
How to open a modal in ionic 5? - Stack Overflow
and open you modal from corresponding page. async presentModal() { const modal = await this.modalController.create({ component: ModelComponent, ...
Read more >
Adding modals to an Ionic app - Daily Dev Tips
We will be adding a modal to our first tab page. Open up the tab1.page.ts file. · We do have to register the...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found