Skip to content

E2E: QA Added acceptance tests for published element extensions#23030

Open
nhudinh0309 wants to merge 7 commits into
mainfrom
v18/QA/published-element-extensions-tests
Open

E2E: QA Added acceptance tests for published element extensions#23030
nhudinh0309 wants to merge 7 commits into
mainfrom
v18/QA/published-element-extensions-tests

Conversation

@nhudinh0309
Copy link
Copy Markdown
Contributor

This PR adds acceptance tests for published element extensions feature implemented in this PR: #22585

@claude
Copy link
Copy Markdown

claude Bot commented Jun 1, 2026

Claude finished @nhudinh0309's task in 2m 50s —— View job


PR Review

Target: origin/main · Based on commit: 0cc8874b7a728b67e3f0d76e1684350698a78177 · Classified as: Test-only

Adds 8 E2E acceptance tests covering published element extension methods: invariant/variant rendering, explicit culture arguments, composition (IsDocumentType recursive + IsComposedOf), equality (IsEqual/IsNotEqual), and language fallback. Two new DocumentTypeApiHelper factory methods and four new TemplateApiHelper template builders support the tests.


Suggestions

  • tests/Umbraco.Tests.AcceptanceTest/lib/helpers/DocumentTypeApiHelper.ts:626: The new createElementTypeWithComposition is nearly identical to the existing createElementTypeWithAComposition (line 596). Key differences: new one adds .withAllowedInLibrary(true) but omits .withIcon("icon-plugin"); old one has the icon but not allowedInLibrary. Every other element-type helper in this file that sets withIsElement(true) either adds an icon, allowedInLibrary, or both — omitting the icon here is inconsistent. Consider adding .withIcon("icon-plugin") to the new method, or consolidating the two helpers by adding withAllowedInLibrary(true) to the existing one. Fix this →

  • tests/Umbraco.Tests.AcceptanceTest/tests/DefaultConfig/RenderingContent/PublishedElementExtensions.spec.ts:73: Test 1 (can render published element extension methods on an invariant element) asserts HasCultureEn: False but doesn't assert HasCultureDa: False, even though the template emits both lines. On an invariant element with no Danish language configured, both should be False — asserting both would complete the invariant-element contract. Fix this →


Approved with Suggestions for improvement

Good to go, but please carefully consider the importance of the suggestions.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant