Merged
Size
M
Change Breakdown
Maintenance80%
Testing20%
#28161test: Resolve 45 janitor violations and update baseline (no-changelog)

Janitor violations cleaned up in Playwright page objects

Test code enforcement tightens as 32 lint violations are resolved across NodeDetailsView and Project composables, with locators now properly scoped to containers rather than the global page object.

The Playwright test suite is getting cleaner as 32 janitor violations are resolved across three files. The janitor tool enforces rules that keep test locators properly scoped and discourage direct page access in composables.

In NodeDetailsViewPage, locators were updated from this.page to this.getContainer() so elements are found within the NDV container rather than globally on the page. In NodeDetailsViewComposer and ProjectComposer, direct calls to this.n8n.page.getByTestId() were replaced with calls to page object methods like ndv.getResourceLocatorItems() and sideBar.universalAdd().

These changes ensure tests interact with the correct elements in isolation, reducing flakiness when multiple components share similar test IDs. The baseline was updated to reflect 408 remaining violations across the codebase.

In the testing package's Playwright infrastructure.

View Original GitHub DescriptionFact Check

Summary

  • Fix 27 scope-lockdown violations in NodeDetailsViewPage by replacing unscoped this.page with this.getContainer() for locators inside the NDV container
  • Fix 7 selector-purity violations in NodeDetailsViewComposer by using page object methods instead of direct page.getByTestId() calls
  • Fix 11 selector-purity + no-page-in-flow violations in ProjectComposer by using sidebar page object methods
  • Update janitor baseline from 440 → 395 violations

Test plan

  • pnpm typecheck passes
  • pnpm lint passes
  • pnpm janitor reports zero new violations against updated baseline

🤖 Generated with Claude Code

© 2026 · via Gitpulse