Skip to content

Fix view subtemplate dedup and generated test fixtures - #6

Merged
MrTango merged 3 commits into
mainfrom
fix-view-duplicate-name-for
May 24, 2026
Merged

Fix view subtemplate dedup and generated test fixtures#6
MrTango merged 3 commits into
mainfrom
fix-view-duplicate-name-for

Conversation

@MrTango

@MrTango MrTango commented May 24, 2026

Copy link
Copy Markdown
Contributor

Summary

  • Fix the view subtemplate's duplicate detection: a browser:page is now identified by both its name and for interface, so distinct views for different contexts are no longer wrongly treated as duplicates (xml_updater.py, view/copier_hooks.py).
  • Make generated test/dev dependencies resolvable for uv (zope-setup pyproject/tasks/CI).
  • Fix generated tests across subtemplates: use the integration fixture and IDexterityFTI consistently.

Test plan

  • Covered by tests/test_view.py and tests/test_zope_setup.py (run in CI).

MrTango added 3 commits May 24, 2026 05:31
A second view sharing a URL name but registered for a different interface
was skipped as a duplicate. has_element/extend_configure_zcml now accept
extra identifying attributes; the view hook uses name + for.
invoke/watchdog move to a PEP 735 [dependency-groups] dev (auto-installed
by uv run), the test task requests the test extra, and CI installs
.[test]. Without this 'plonecli test' could not spawn invoke or pytest.
The conftest defines the 'integration' fixture, but subtemplate tests
referenced 'integration_testing', so every test errored at setup.
Content-type tests also queried the FTI by the DexterityFTI class
instead of the IDexterityFTI interface, always getting None.
@MrTango
MrTango merged commit 8f5fabb into main May 24, 2026
5 checks passed
@MrTango
MrTango deleted the fix-view-duplicate-name-for branch May 24, 2026 13:40
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant