Skip to content

Conversation

@0xc7c5
Copy link
Collaborator

@0xc7c5 0xc7c5 commented Jan 30, 2026

Summary by CodeRabbit

  • Tests
    • Expanded end-to-end coverage for node deployment: protocol/configuration wizard, creation, status polling, listing, search, deletion, and overview tab checks.
    • Added navigation and validation tests ensuring wizard back-navigation and button enablement behavior.
    • Increased wait timeout for node status transitions to improve stability of status-related checks.

✏️ Tip: You can customize this high-level summary in your review settings.

@coderabbitai
Copy link

coderabbitai bot commented Jan 30, 2026

Walkthrough

Adds NodeProtocol and NodeConfig to control_panel/node.py and exposes them via the Node constructor; and introduces a full UI test suite for node deployment: new test constants, locators, a NodeDeploymentPage page object, and multiple end-to-end tests for wizard flows, creation, verification, listing, and deletion.

Changes

Cohort / File(s) Summary
Node Configuration Model
control_panel/node.py
Add NodeProtocol and NodeConfig string-constant holders and extend Node.__init__ to accept/store protocol and config. No other behavior changes.
UI Test Constants
tests/ui/constants/ui_constants.py
Add NODE_STATUS_MAX_WAIT = 120000 for node status polling.
UI Locators
tests/ui/locators/node_deployment_locators.py
Add NodeDeploymentLocators with selectors for protocol/config selection, summary, node details, list rows, wizard steps, and helper static selector builders (tab_by_name, wizard_step_by_name, protocol_card_by_name, config_card_by_name, node_by_name, node_row_by_name, dropdown_option_by_name).
Page Object
tests/ui/pages/node_deployment_page.py
Add NodeDeploymentPage with methods for wizard navigation, selection/search, summary, create/delete flows, node status polling/verification, list operations, UI→API cross-check helpers, and utility getters (node id/name extraction).
E2E Tests
tests/ui/test_node_deployment_e2e.py
Add test classes covering full deployment flow, wizard back-navigation, validation of button states, and node overview tab behavior; tests use LoginPage, NodesListPage, NodeDeploymentPage and optional API client verification.

Sequence Diagram

sequenceDiagram
    participant User
    participant UI as Node Deployment UI
    participant Page as NodeDeploymentPage
    participant API as ApiClient

    User->>UI: Open Nodes list
    User->>UI: Click "Add node"
    UI->>Page: Load protocol selection
    User->>Page: Search/select protocol
    Page->>Page: Enable configuration selection
    User->>Page: Select configuration
    User->>Page: Click "Show summary"
    Page->>Page: Verify summary and click "Create node"
    Page->>API: POST create node (capture node id)
    API-->>Page: Return node id/info
    Page->>Page: Poll status (Bootstrapping → Running)
    API-->>Page: Provide status updates
    Page->>Page: Fetch node details for UI/API cross-check
    User->>UI: Search/list nodes
    User->>Page: Delete node (confirm)
    Page->>API: DELETE node
    API-->>Page: Acknowledge deletion
Loading

Estimated code review effort

🎯 4 (Complex) | ⏱️ ~50 minutes

Possibly related PRs

Poem

🐰 In my burrow I test with delight,
Protocols picked, configs set right.
A wizard of pages, clicks that sing,
Nodes rise, then run—what joy they bring!
🥕✨

🚥 Pre-merge checks | ✅ 2 | ❌ 1
❌ Failed checks (1 inconclusive)
Check name Status Explanation Resolution
Title check ❓ Inconclusive The title 'Feature/UI nodes UI tests' is vague and uses non-descriptive terminology that doesn't clearly convey what the changeset introduces. Use a more specific, descriptive title that clarifies the main change, such as 'Add comprehensive UI E2E tests for node deployment flow' or 'Implement NodeDeploymentPage and related test fixtures'.
✅ Passed checks (2 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Docstring Coverage ✅ Passed Docstring coverage is 94.74% which is sufficient. The required threshold is 80.00%.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing touches
  • 📝 Generate docstrings
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch feature/ui-nodes-ui-tests

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

Copy link

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 2

🤖 Fix all issues with AI agents
In `@tests/ui/pages/node_deployment_page.py`:
- Around line 39-45: The method verify_protocol_selected currently creates
card_selector via self.locators.protocol_card_by_name(protocol_name) but never
uses it, causing a lint error and not validating the UI; update
verify_protocol_selected to use the card_selector locator to assert the protocol
card is visible/selected (for example, call
expect(self.page.locator(card_selector)).to_be_visible() or check a selected
state like to_have_attribute("aria-selected", "true") /
to_have_class("selected") as appropriate) and keep the existing check for
SELECT_CONFIG_BUTTON to_be_enabled(); use the symbols verify_protocol_selected,
card_selector, locators.protocol_card_by_name, and SELECT_CONFIG_BUTTON to
locate the code to change.
- Around line 316-384: The get_node_list_info method calls
text_content().strip() on several locators which can return None; update each
extraction in get_node_list_info to guard against None by using
(row.locator(...).text_content() or "").strip() for "name", "network",
"created_at", "updated_at", and "status" so .strip() never runs on None; no
changes needed in verify_node_list_info other than relying on the updated
get_node_list_info output.
🧹 Nitpick comments (2)
tests/ui/pages/node_deployment_page.py (1)

213-223: Prefer NODE_STATUS_MAX_WAIT for the default timeout.

Avoid the magic number to keep wait settings centralized in ui_constants.

♻️ Suggested update
-from tests.ui.constants.ui_constants import TIMEOUT_MAX
+from tests.ui.constants.ui_constants import TIMEOUT_MAX, NODE_STATUS_MAX_WAIT
-def wait_for_particular_status(self, expected_status: str, timeout: int = 120000):
+def wait_for_particular_status(self, expected_status: str, timeout: int = NODE_STATUS_MAX_WAIT):
tests/ui/test_node_deployment_e2e.py (1)

134-252: Use NodeProtocol / NodeConfig constants for test inputs.

This keeps UI labels centralized and reduces drift across tests.

♻️ Suggested update
- protocol_name = "Ethereum Sepolia Reth Prysm"
+ protocol_name = NodeProtocol.ETH_SEPOLIA
...
- config_name = "Ethereum Sepolia Reth Prysm Nano"
+ config_name = NodeConfig.ETH_SEPOLIA_NANO
...
- deployment_page.select_protocol("Ethereum Sepolia Reth Prysm")
+ deployment_page.select_protocol(NodeProtocol.ETH_SEPOLIA)
...
- deployment_page.select_configuration("Ethereum Sepolia Reth Prysm Nano")
+ deployment_page.select_configuration(NodeConfig.ETH_SEPOLIA_NANO)

@0xc7c5 0xc7c5 merged commit d374dbb into master Feb 3, 2026
3 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

2 participants