-
Notifications
You must be signed in to change notification settings - Fork 210
e2e: Test suits for WDS TreeView Canvas #2239
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
base: dev
Are you sure you want to change the base?
e2e: Test suits for WDS TreeView Canvas #2239
Conversation
Signed-off-by: arpit529srivastava <[email protected]>
Signed-off-by: arpit529srivastava <[email protected]>
|
[APPROVALNOTIFIER] This PR is NOT APPROVED This pull-request has been approved by: The full list of commands accepted by this bot can be found here.
Needs approval from an approver in each of these files:
Approvers can indicate their approval by writing |
|
Time Taken: |
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.
Pull Request Overview
This PR introduces comprehensive end-to-end tests for the TreeViewCanvas component, implementing 16 test cases that cover rendering, view switching, zoom controls, canvas interactions, and empty states. The implementation includes a new ReactFlowHelper utility class with WebSocket mocking capabilities and browser-specific optimizations for Chromium, Webkit, and Firefox.
Key Changes:
- Added
ReactFlowHelperutility class for React Flow testing with WebSocket mocking - Created empty state mock handlers (
workloadsEmpty,workloadsEmptyRel) andwdsEmptyscenario - Implemented 16 test cases covering TreeViewCanvas functionality
- Added browser-specific handling for different rendering behaviors
Reviewed Changes
Copilot reviewed 6 out of 6 changed files in this pull request and generated 8 comments.
Show a summary per file
| File | Description |
|---|---|
| frontend/src/mocks/handlers.ts | Adds empty workloads mock handlers for testing empty state scenarios |
| frontend/src/mocks/browser.ts | Adds wdsEmpty scenario and reorders handlers in wdsSuccess scenario |
| frontend/e2e/pages/utils/ReactFlowHelper.ts | New utility class providing React Flow testing helpers, WebSocket mocking, and browser-specific wait methods |
| frontend/e2e/pages/index.ts | Exports the new ReactFlowHelper utility and its types |
| frontend/e2e/pages/WDSPage.ts | Reduces timeout values for tiles view waiting (20s→15s, 2s→1s, 1s→500ms) |
| frontend/e2e/TreeViewCanvas.spec.ts | New comprehensive test suite with 16 test cases covering all TreeViewCanvas functionality |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Signed-off-by: arpit529srivastava <[email protected]>
|
/cc @btwshivam |
…utility Signed-off-by: arpit529srivastava <[email protected]>
Signed-off-by: arpit529srivastava <[email protected]>
|
@Arpit529Srivastava Its common for Wds and Wecs?? |
|
will take a look into this. |
|
fix it.. reduce flasky test.. keep important one only! |
|
@Arpit529Srivastava: The following tests failed, say
Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes-sigs/prow repository. I understand the commands that are listed here. |
Description
This PR adds comprehensive end-to-end tests for the
TreeViewCanvascomponent using Playwright. The tests cover all major functionality including view switching, zoom controls, node interactions, empty states, and canvas interactions (zoom, pan). The implementation includes browser-specific optimizations for Chromium, Webkit, and Firefox to handle different rendering behaviors and event handling quirks.Related Issue
Under #2159
Changes Made
The test suite includes 16 test cases covering:
Basic Rendering
View Management
Zoom Controls
Canvas Interactions
UI Controls
Checklist
Please ensure the following before submitting your PR:
Screenshots or Logs (if applicable)
Additional Notes
This PR depends on PR #2198 for the
ReactFlowHelperutility