68 test locator violations resolved in NDV page object
NDV test locators have been properly scoped to their container, reducing janitor violations by 68 and improving test isolation across 60+ method calls in the NodeDetailsViewPage page object.
Test locators in the NodeDetailsViewPage page object have been tightened to prevent interaction with elements outside their intended scope. Sixty-eight calls to this.page.getByTestId() were changed to this.getContainer().getByTestId(), enforcing the janitor's scope-lockdown rule across the file.
The scope-lockdown rule exists to keep tests isolated — locators should find elements within their page object container, not traverse the entire page. This prevents tests from accidentally interacting with elements from other components that happen to share the same test ID.
Portal elements like expression modals, resource locator dropdowns, credential dropdowns, and the fullscreen code editor remain page-scoped because they render outside the NodeDetailsViewPage DOM tree.
The janitor baseline was updated to reflect the resolved violations, dropping from 496 to 440 violations across the codebase. This change lives in the Playwright testing package and improves the reliability of end-to-end tests that interact with node configuration.
View Original GitHub DescriptionFact Check
Summary
- Scoped 68 NDV-internal locators from
this.page.getByTestId()tothis.getContainer().getByTestId()inNodeDetailsViewPage, enforcing the janitor's scope-lockdown rule - Portal elements (expression modals, RLC dropdowns, credential dropdowns, fullscreen code editor) remain page-scoped since they render outside the NDV DOM
- Updated janitor baseline: 496 → 428 violations
Test plan
- Janitor passes against new baseline (
pnpm janitorshows "All clean!") - Typecheck passes (no new errors introduced)
- E2E tests using NDV interactions pass (node configuration, expressions, credentials, run data)
🤖 Generated with Claude Code