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
Clear few warning from component tests of Grid UI due to:
Missing mock
console.warn
No more mocked responses for the query: query GetSessions
Missing prop
console.error
Warning: Each child in a list should have a unique "key" prop.
Check the render method of `Overview`. See https://reactjs.org/link/warning-keys for more information.
While the PR adds mocks for GRID_SESSIONS_QUERY to prevent warnings, verify that the test coverage is comprehensive for all possible states and edge cases in the Overview component.
The VNC URL transformation test has been updated with more specific assertions. Verify that this correctly reflects the actual behavior of the application when handling VNC URLs.
The test is making an assumption about the exact URL format, but it should verify the URL transformation logic instead. This makes the test more resilient to changes in the VNC URL structure while still validating the protocol conversion.
Why: The suggestion makes the test more robust by dynamically constructing the expected URL, reducing brittleness to changes in the VNC URL structure. However, the current explicit check is also valid if the URL format is stable, so this is a minor maintainability improvement rather than a critical fix.
Low
Remove duplicate mock definitions
There are duplicate identical mock definitions for the GRID_SESSIONS_QUERY. This redundancy can cause confusion and maintenance issues. Remove one of the duplicate mocks to keep the test setup clean.
Why: Removing duplicate mocks improves test clarity and maintainability, but it is a minor cleanup that does not affect test correctness or functionality.
Low
Learned best practice
Add unique key to list items
When rendering lists of elements in React, each element should have a unique "key" prop to help React identify which items have changed. Adding the key prop improves rendering performance and prevents warnings.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
User description
🔗 Related Issues
💥 What does this PR do?
Clear few warning from component tests of Grid UI due to:
https://github.com/SeleniumHQ/selenium/actions/runs/15211726088/job/42787262347
🔧 Implementation Notes
💡 Additional Considerations
🔄 Types of changes
PR Type
Bug fix, Tests
Description
Fix missing "key" prop warning in Overview's sort menu.
Add missing GraphQL session mocks to Overview tests.
Update VNC session test data and assertions for accuracy.
Enhance test coverage for error and empty states in Overview.
Changes walkthrough 📝
Overview.tsx
Add missing "key" prop and minor cleanup in Overviewjavascript/grid-ui/src/screens/Overview/Overview.tsx
Node.test.tsx
Update Node VNC session tests and assertionsjavascript/grid-ui/src/tests/components/Node.test.tsx
Overview.test.tsx
Add missing session mocks and enhance Overview testsjavascript/grid-ui/src/tests/components/Overview.test.tsx