You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The existing tests don't seem to work. It looks like the selectors are outdated and it looks like the wrong tool is being used for E2E tests. I'm willing to make them work piece for piece and I would like to sync this topic with the deciding party.
Proposition
To use jest for non-ui-tests aka unit tests only
To make E2E tests directly in the showcase with e.g. Cypress Playwright, see also this example
Make unit tests large in number, E2E tests fewer in number and manual tests even less in number
Beyond the scope: it might be reasonable to use this concept in the long term to gain more performance
Why?
Unit-Tests are performant in my experience when they are used for non-UI stuff only. It's relatively cheap to cover a whole non-ui method with unit-tests
I can't debug the E2E tests quickly (I estimate I need 5 hours for a test suite instead of 1): dynamicdialog.spec.ts is an example, I assume it's applicable to all the existing tests in this branch:
I've tried to make it work since generally the test makes sense for me at least. Theoretically updating the selectors e.g. by using such abstraction like the data-testid attribute in the template should fix it. But it doesn't, so I end up needing to see the component in the browser to debug the test.
I think simulating the end user at the showcases page make E2E tests much more genuine. But there is no possibility (not known for me at least) to do this with such unit test tool like jasmine or jest. Such tools like Playwright and Cypress are rather made for this in my opinion.
Unit Tests are cheap, E2E tests are costly and manual tests are even more costly in my experience
So for me personally it looks like Cypress is rather appropriate for an enterprise proprietary project than for an open source one.
I speculate that during a year or two Playwright has those Cypress paid features for free.
Describe the bug
The Problem and the general solution
The existing tests don't seem to work. It looks like the selectors are outdated and it looks like the wrong tool is being used for E2E tests. I'm willing to make them work piece for piece and I would like to sync this topic with the deciding party.
Proposition
CypressPlaywright, see also this exampleWhy?
Unit-Tests are performant in my experience when they are used for non-UI stuff only. It's relatively cheap to cover a whole non-ui method with unit-tests
I can't debug the E2E tests quickly (I estimate I need 5 hours for a test suite instead of 1):
dynamicdialog.spec.ts is an example, I assume it's applicable to all the existing tests in this branch:
I've tried to make it work since generally the test makes sense for me at least. Theoretically updating the selectors e.g. by using such abstraction like the
data-testid
attribute in the template should fix it. But it doesn't, so I end up needing to see the component in the browser to debug the test.I think simulating the end user at the showcases page make E2E tests much more genuine. But there is no possibility (not known for me at least) to do this with such unit test tool like jasmine or jest. Such tools like Playwright and Cypress are rather made for this in my opinion.
Unit Tests are cheap, E2E tests are costly and manual tests are even more costly in my experience
Already mentioned above
Environment
Reproducible on the local PC
Reproducer
No response
Angular version
18
PrimeNG version
18
Build / Runtime
Angular CLI App
Language
TypeScript
Node version (for AoT issues node --version)
20.18.1
Browser(s)
No response
Steps to reproduce the behavior
npx jest packages/primeng/src/dynamicdialog/dynamicdialog.spec.ts --watch
Expected behavior
CypressPlaywrightThe text was updated successfully, but these errors were encountered: