test(e2e): migrate legacy Playwright tests to dotcms-ui-e2e (#32525)#35882
test(e2e): migrate legacy Playwright tests to dotcms-ui-e2e (#32525)#35882nicobytes wants to merge 6 commits into
Conversation
Port active tests from e2e/dotcms-e2e-node to core-web/apps/dotcms-ui-e2e, replacing UI-driven setup with API-first preconditions and removing manual login (session injected via auth.setup.ts storageState). - pages: create, unpublish, archive specs using createPage + actionsPageWorkflow - edit-content/fields/text-field: content type created via createFakeContentType API - content-search: focused Dojo helper (ContentListingHelper) + portlet integrity tests (views, add-content, bulk workflow actions, query modal, advanced filter); search-filter seeds a contentlet via createContentlet API Co-authored-by: Cursor <cursoragent@cursor.com>
|
Claude finished @nicobytes's task in 2m 14s —— View job Code Review
Findings1. Null-safety gap across three spec files (medium)
The 2. // afterEach (line 28)
await actionsPageWorkflow(request, pageContentlet.inode, ['Destroy']);
3.
4. expect(newTab.url()).toBeTruthy();Passes for 5. Module-level
6. listing.frame.locator('.hydrated > dot-contentlet-thumbnail > .hydrated')
Overall: The API-first setup approach and |
…s-to-dotcms-ui-e2e-nx-project
…s-to-dotcms-ui-e2e-nx-project
…s-to-dotcms-ui-e2e-nx-project
…s-to-dotcms-ui-e2e-nx-project
…s-to-dotcms-ui-e2e-nx-project
Proposed Changes
e2e/dotcms-e2e-node/frontend/src/testsintocore-web/apps/dotcms-ui-e2e, the Nx-managed Playwright projectLoginPage.login()from everybeforeEach— session is now injected viaauth.setup.tsstorageStateTests migrated (active tests only;
test.skipentries excluded):pages/create-page.spec.tssrc/tests/pages/create-page.spec.tspages/unpublish-page.spec.tssrc/tests/pages/unpublish-page.spec.tspages/archive-page.spec.tssrc/tests/pages/archive-page.spec.tsnewEditContent/fields/textField.spec.tssrc/tests/edit-content/fields/text-field/text-field.spec.tsListingContentTypesPage) to API (createFakeContentType)contentSearch/portletIntegrity.spec.tssrc/tests/content-search/portlet-integrity.spec.tscreateContentlet); new focusedContentListingHelperreplaces the 422-line legacyContentPageNew file added:
src/tests/content-search/helpers/content-listing.ts— focused Dojo portlet helper usinggetLegacyFrame; covers only the selectors needed for the 8 active portlet integrity tests; replaces fragile Dojo widget IDs with role/class selectors per project conventionsChecklist
Additional Info
loginandtranslationstests were already migrated and are not included heredestroy-page,siteOrFolderField, and allcontentEditingtests remain skipped in the legacy project and are out of scopee2e/dotcms-e2e-nodetree is left intact (no deletions)Screenshots
No UI changes — test infrastructure only.
Made with Cursor