-
Notifications
You must be signed in to change notification settings - Fork 40
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
SPIKE: Integrate Cypress with PixiJS #1637
Conversation
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## main #1637 +/- ##
===========================================
+ Coverage 67.88% 85.66% +17.78%
===========================================
Files 600 600
Lines 30405 30414 +9
Branches 8351 8355 +4
===========================================
+ Hits 20639 26053 +5414
+ Misses 9611 4043 -5568
- Partials 155 318 +163
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. 🚨 Try these New Features:
|
codap-v3 Run #5314
Run Properties:
|
Project |
codap-v3
|
Branch Review |
main
|
Run status |
Passed #5314
|
Run duration | 24m 50s |
Commit |
433efc72cf: Merge pull request #1637 from concord-consortium/188565339-pixiJS-automation-spi...
|
Committer | Natalya St. Clair |
View all properties for this run ↗︎ |
Test results | |
---|---|
Failures |
0
|
Flaky |
0
|
Pending |
20
|
Skipped |
0
|
Passing |
236
|
View all changes introduced in this branch ↗︎ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
👍 Enabling the skipped tests is fine. Adding tests that validate dots in graphs will require canvas techniques that can be determined later (if appropriate).
// cy.get('[data-testid="graph"] canvas') | ||
// .should('be.visible') // Ensure the canvas is rendered | ||
// cy.get('[data-testid="graph"]') | ||
// .find('svg .below-points-group circle') // Intended to locate graph points |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This won't work because there are no DOM elements that correspond to the points, SVG or otherwise.
Since I was tagged. I'd say the PR is good and the description is correct. 👍 |
PT-#188565339
Summary
This PR documents findings from a SPIKE aimed at improving Cypress tests for verifying graph point interaction on a PIXIJS-rendered canvas in CODAP. While partial success was achieved in triggering interactions with the canvas, there remain challenges in validating the visual state of PIXIJS-rendered elements.
Unskipped Tests
In graph.spec.ts, the following comment explained why certain tests were previously skipped:
Since the referenced Cypress issue cypress-io/cypress#28289 has been resolved, the tests were unskipped and revalidated for performance in both local and CI environments.
Functional Test Code
Below is an updated test example, unskipped and modified during this SPIKE:
Skipped Test Example
The following test remains skipped as it relies on PIXIJS exposing DOM elements or API hooks for verifying interactions, such as graph point highlighting:
Custom Cypress Commands
We propose adding the following command (or something similar) to
commands.ts
for verifying the color of graph points:Adding Custom Commands in
cypress.d.ts
To ensure TypeScript support for the new command, include the following declaration in
cypress.d.ts
:Goals for Future Enhancements
Next Steps
Additional documentation: