Primeng: Protractor support for Spinner

Created on 1 Jul 2019  路  2Comments  路  Source: primefaces/primeng

Hello,

We are implementing the primeng elements. When creating automated tests with protractor, we are experimenting problems on the spinners. The same problems we've noticed on the examples from: https://www.primefaces.org/primeng/#/spinner

To provide more details:

  • we are able to click on the up/down spinner buttons but only once
    -afterwards, protractor just waits for angular indefinitely and no other action is possible

Here is the project: https://codesandbox.io/s/primengprotractor-cmq6s

In this example after the first click the search no longer works. Code blocked after line 23.

Can you help with this? We also noticed that after clciking the up button this element remains somehow "focused" so probably there is a miswsing mouseMove which then does not trigger mouseOut.

Thank you!

enhancement

Most helpful comment

That's exactly what we experienced as well. We have to xit() all our e2e tests that involve a spinner.
AFAIK, the reason the spinner is not e2e testable using Protractor is the usage of setTimeout() within the spinner component.
The same problem occured with the growl component and it seems it got fixed by wrapping the setTimeout() into runOutsideAngular(). See https://github.com/primefaces/primeng/issues/4681

All 2 comments

That's exactly what we experienced as well. We have to xit() all our e2e tests that involve a spinner.
AFAIK, the reason the spinner is not e2e testable using Protractor is the usage of setTimeout() within the spinner component.
The same problem occured with the growl component and it seems it got fixed by wrapping the setTimeout() into runOutsideAngular(). See https://github.com/primefaces/primeng/issues/4681

Any update on this?

Was this page helpful?
0 / 5 - 0 ratings

Related issues

markgoho picture markgoho  路  3Comments

jisqaqov picture jisqaqov  路  3Comments

mitosandov picture mitosandov  路  3Comments

pchristou picture pchristou  路  3Comments

papiroca-tm picture papiroca-tm  路  3Comments