Issue Task Under Review

#111459Workspace publish tests expect hidden live content in frontend

Sebastian Mendel 11/14/26, 22:01 updated 11/14/26, 22:26

Description

Four functional tests expect a hidden, published content element to be rendered in the frontend for a backend user:

  • Regular/WorkspacesPublish/ActionTest::hideContent
  • Regular/WorkspacesPublish/ActionTest::hideContentAndMoveToDifferentPage
  • Regular/WorkspacesPublishAll/ActionTest::hideContent
  • Regular/WorkspacesPublishAll/ActionTest::hideContentAndMoveToDifferentPage

After publishing, “Regular Element #2” is hidden=1 in live (see the DataSet CSV of each test). The frontend requests pass no workspace id in the InternalRequestContext. The testing-framework BackendUserHandler then leaves BackendUserAuthentication::$workspace at its default -99, which is not live, and the frontend renders the hidden element.

The sibling tests in Regular/WorkspacesModify assert the opposite for the same situation in a workspace (DoesNotHaveRecordConstraint).

This blocks a testing-framework fix that initializes the backend user properly and defaults to the live workspace:
https://github.com/TYPO3/testing-framework/issues/535
https://github.com/TYPO3/testing-framework/pull/536

With that fix applied, the four tests fail, as reported in https://github.com/TYPO3/testing-framework/pull/536#issuecomment-1956430328

Proposed change: request the live workspace explicitly with withWorkspaceId(0) and assert that the hidden element is not rendered. The adjusted tests pass with testing-framework main and with testing-framework PR 536.

Reviews 1

History 03