Commit 188c01a7 authored by Oliver Hader's avatar Oliver Hader Committed by Oliver Hader
Browse files

[TASK] Add additional workspaces tests covering enable fields

Resolves: #89623
Releases: master, 9.5
Change-Id: Ibb2738c792173e8f40f0c98350629754379b74cb
Reviewed-on: https://review.typo3.org/c/Packages/TYPO3.CMS/+/62255

Tested-by: default avatarTYPO3com <noreply@typo3.com>
Tested-by: Benni Mack's avatarBenni Mack <benni@typo3.org>
Tested-by: Oliver Hader's avatarOliver Hader <oliver.hader@typo3.org>
Reviewed-by: Benni Mack's avatarBenni Mack <benni@typo3.org>
Reviewed-by: Oliver Hader's avatarOliver Hader <oliver.hader@typo3.org>
parent f610f55b
......@@ -171,6 +171,16 @@ abstract class AbstractActionTestCase extends \TYPO3\CMS\Core\Tests\Functional\D
$this->recordIds['localizedContentId'] = $localizedTableIds[self::TABLE_Content][self::VALUE_ContentIdSecond];
}
/**
* See DataSet/localizeContentWHideAtCopy.csv
*/
public function localizeContentWithHideAtCopy()
{
$GLOBALS['TCA'][self::TABLE_Content]['ctrl']['hideAtCopy'] = true;
self::localizeContent();
$this->actionService->modifyRecord(self::TABLE_Content, $this->recordIds['localizedContentId'], ['hidden' => 0]);
}
/**
* See DataSet/localizeContentRecord.csv
* @see \TYPO3\CMS\Core\Migrations\TcaMigration::sanitizeControlSectionIntegrity()
......
......@@ -10,17 +10,17 @@
,1,0,0,"Dansk","dk",,,,,,,,,,,,,
,2,0,0,"Deutsch","de",,,,,,,,,,,,,
"sys_category",,,,,,,,,,,,,,,,,,
,"uid","pid","sorting","deleted","sys_language_uid","l10n_parent","t3_origuid","t3ver_wsid","t3ver_state","t3ver_stage","t3ver_oid","t3ver_move_id","title","parent","items","l10n_diffsource","description",
,28,0,256,0,0,0,0,0,0,0,0,0,"Category A",0,0,,,
,29,0,512,0,0,0,0,0,0,0,0,0,"Category B",0,0,,,
,30,0,768,0,0,0,0,0,0,0,0,0,"Category C",0,0,,,
,31,0,1024,0,0,0,0,0,0,0,0,0,"Category A.A",28,0,,,
,"uid","pid","sorting","hidden","deleted","sys_language_uid","l10n_parent","t3_origuid","t3ver_wsid","t3ver_state","t3ver_stage","t3ver_oid","t3ver_move_id","title","parent","items","l10n_diffsource","description"
,28,0,256,0,0,0,0,0,0,0,0,0,0,"Category A",0,0,,
,29,0,512,0,0,0,0,0,0,0,0,0,0,"Category B",0,0,,
,30,0,768,0,0,0,0,0,0,0,0,0,0,"Category C",0,0,,
,31,0,1024,0,0,0,0,0,0,0,0,0,0,"Category A.A",28,0,,
"tt_content",,,,,,,,,,,,,,,,,,
,"uid","pid","sorting","deleted","sys_language_uid","l18n_parent","l10n_source","t3_origuid","t3ver_wsid","t3ver_state","t3ver_stage","t3ver_oid","t3ver_move_id","header","bodytext",,,
,296,88,256,0,0,0,0,0,0,0,0,0,0,"Regular Element #0",,,,
,297,89,256,0,0,0,0,0,0,0,0,0,0,"Regular Element #1",,,,
,298,89,512,0,0,0,0,0,0,0,0,0,0,"Regular Element #2",,,,
,299,89,768,0,0,0,0,0,0,0,0,0,0,"Regular Element #3",,,,
,300,89,1024,0,1,299,299,299,0,0,0,0,0,"[Translate to Dansk:] Regular Element #3",,,,
,301,89,384,0,1,297,297,297,0,0,0,0,0,"[Translate to Dansk:] Regular Element #1",,,,
,302,89,448,0,2,297,301,301,0,0,0,0,0,"[Translate to Deutsch:] [Translate to Dansk:] Regular Element #1",,,,
,"uid","pid","sorting","hidden","deleted","sys_language_uid","l18n_parent","l10n_source","t3_origuid","t3ver_wsid","t3ver_state","t3ver_stage","t3ver_oid","t3ver_move_id","header","bodytext",,
,296,88,256,0,0,0,0,0,0,0,0,0,0,0,"Regular Element #0",,,
,297,89,256,0,0,0,0,0,0,0,0,0,0,0,"Regular Element #1",,,
,298,89,512,0,0,0,0,0,0,0,0,0,0,0,"Regular Element #2",,,
,299,89,768,0,0,0,0,0,0,0,0,0,0,0,"Regular Element #3",,,
,300,89,1024,0,0,1,299,299,299,0,0,0,0,0,"[Translate to Dansk:] Regular Element #3",,,
,301,89,384,0,0,1,297,297,297,0,0,0,0,0,"[Translate to Dansk:] Regular Element #1",,,
,302,89,448,0,0,2,297,301,301,0,0,0,0,0,"[Translate to Deutsch:] [Translate to Dansk:] Regular Element #1",,,
"pages",,,,,,,,,,,,
,"uid","pid","sorting","deleted","t3_origuid","t3ver_wsid","t3ver_state","t3ver_stage","t3ver_oid","t3ver_move_id","title","slug"
,1,0,256,0,0,0,0,0,0,0,"FunctionalTest","/"
,88,1,256,0,0,0,0,0,0,0,"DataHandlerTest","/data-handler"
,89,88,256,0,0,0,0,0,0,0,"Relations","/data-handler/relations"
,90,88,512,0,0,0,0,0,0,0,"Target","/data-handler/target"
"pages",,,,,,,,,,,,,
,"uid","pid","sorting","hidden","deleted","t3_origuid","t3ver_wsid","t3ver_state","t3ver_stage","t3ver_oid","t3ver_move_id","title","slug"
,1,0,256,0,0,0,0,0,0,0,0,"FunctionalTest","/"
,88,1,256,0,0,0,0,0,0,0,0,"DataHandlerTest","/data-handler"
,89,88,256,0,0,0,0,0,0,0,0,"Relations","/data-handler/relations"
,90,88,512,0,0,0,0,0,0,0,0,"Target","/data-handler/target"
......@@ -190,6 +190,23 @@ class ActionTest extends \TYPO3\CMS\Workspaces\Tests\Functional\DataHandling\Reg
->setTable(self::TABLE_Content)->setField('header')->setValues('[Translate to Dansk:] Regular Element #1', '[Translate to Dansk:] Regular Element #2'));
}
/**
* @test
* See DataSet/localizeContentRecord.csv
*/
public function localizeContentWithHideAtCopy()
{
// Create translated page first
$this->actionService->copyRecordToLanguage(self::TABLE_Page, self::VALUE_PageId, self::VALUE_LanguageId);
parent::localizeContentWithHideAtCopy();
$this->assertAssertionDataSet('localizeContentWHideAtCopy');
$responseSections = $this->getFrontendResponse(self::VALUE_PageId, self::VALUE_LanguageId, self::VALUE_BackendUserId, self::VALUE_WorkspaceId)->getResponseSections();
// @todo Localized element should be retrieved
self::assertThat($responseSections, $this->getRequestSectionHasRecordConstraint()
->setTable(self::TABLE_Content)->setField('header')->setValues('[Translate to Dansk:] Regular Element #1' /* , '[Translate to Dansk:] Regular Element #2'*/));
}
/**
* @test
* See DataSet/localizeContentFromNonDefaultLanguage.csv
......
"tt_content",,,,,,,,,,,,,,
,"uid","pid","sorting","deleted","sys_language_uid","l18n_parent","l10n_source","t3_origuid","t3ver_wsid","t3ver_state","t3ver_stage","t3ver_oid","t3ver_move_id","header"
,296,88,256,0,0,0,0,0,0,0,0,0,0,"Regular Element #0"
,297,89,256,0,0,0,0,0,0,0,0,0,0,"Regular Element #1"
,298,89,512,0,0,0,0,0,0,0,0,0,0,"Regular Element #2"
,299,89,768,0,0,0,0,0,0,0,0,0,0,"Regular Element #3"
,300,89,1024,0,1,299,299,299,0,0,0,0,0,"[Translate to Dansk:] Regular Element #3"
,301,89,384,0,1,297,297,297,0,0,0,0,0,"[Translate to Dansk:] Regular Element #1"
,302,89,448,0,2,297,301,301,0,0,0,0,0,"[Translate to Deutsch:] [Translate to Dansk:] Regular Element #1"
,310,90,256,0,0,0,0,0,0,0,0,0,0,"Regular Element #10"
,311,90,512,0,1,0,310,310,0,0,0,0,0,"[Translate to Dansk:] Regular Element #10"
,312,90,768,0,2,0,311,311,0,0,0,0,0,"[Translate to Deutsch:] [Translate to Dansk:] Regular Element #10"
,320,-1,512,0,0,0,0,298,2,2,0,298,0,"Regular Element #2"
,321,89,416,0,1,298,298,298,1,1,0,0,0,"[Translate to Dansk:] Regular Element #2"
,322,-1,416,0,1,298,298,298,1,-1,0,321,0,"[Translate to Dansk:] Regular Element #2"
"tt_content",,,,,,,,,,,,,,,
,"uid","pid","sorting","hidden","deleted","sys_language_uid","l18n_parent","l10n_source","t3_origuid","t3ver_wsid","t3ver_state","t3ver_stage","t3ver_oid","t3ver_move_id","header"
,296,88,256,0,0,0,0,0,0,0,0,0,0,0,"Regular Element #0"
,297,89,256,0,0,0,0,0,0,0,0,0,0,0,"Regular Element #1"
,298,89,512,0,0,0,0,0,0,0,0,0,0,0,"Regular Element #2"
,299,89,768,0,0,0,0,0,0,0,0,0,0,0,"Regular Element #3"
,300,89,1024,0,0,1,299,299,299,0,0,0,0,0,"[Translate to Dansk:] Regular Element #3"
,301,89,384,0,0,1,297,297,297,0,0,0,0,0,"[Translate to Dansk:] Regular Element #1"
,302,89,448,0,0,2,297,301,301,0,0,0,0,0,"[Translate to Deutsch:] [Translate to Dansk:] Regular Element #1"
,310,90,256,0,0,0,0,0,0,0,0,0,0,0,"Regular Element #10"
,311,90,512,0,0,1,0,310,310,0,0,0,0,0,"[Translate to Dansk:] Regular Element #10"
,312,90,768,0,0,2,0,311,311,0,0,0,0,0,"[Translate to Deutsch:] [Translate to Dansk:] Regular Element #10"
,320,-1,512,0,0,0,0,0,298,2,2,0,298,0,"Regular Element #2"
,321,89,416,0,0,1,298,298,298,1,1,0,0,0,"[Translate to Dansk:] Regular Element #2"
,322,-1,416,0,0,1,298,298,298,1,-1,0,321,0,"[Translate to Dansk:] Regular Element #2"
"tt_content",,,,,,,,,,,,,,,
,"uid","pid","sorting","hidden","deleted","sys_language_uid","l18n_parent","l10n_source","t3_origuid","t3ver_wsid","t3ver_state","t3ver_stage","t3ver_oid","t3ver_move_id","header"
,296,88,256,0,0,0,0,0,0,0,0,0,0,0,"Regular Element #0"
,297,89,256,0,0,0,0,0,0,0,0,0,0,0,"Regular Element #1"
,298,89,512,0,0,0,0,0,0,0,0,0,0,0,"Regular Element #2"
,299,89,768,0,0,0,0,0,0,0,0,0,0,0,"Regular Element #3"
,300,89,1024,0,0,1,299,299,299,0,0,0,0,0,"[Translate to Dansk:] Regular Element #3"
,301,89,384,0,0,1,297,297,297,0,0,0,0,0,"[Translate to Dansk:] Regular Element #1"
,302,89,448,0,0,2,297,301,301,0,0,0,0,0,"[Translate to Deutsch:] [Translate to Dansk:] Regular Element #1"
,310,90,256,0,0,0,0,0,0,0,0,0,0,0,"Regular Element #10"
,311,90,512,0,0,1,0,310,310,0,0,0,0,0,"[Translate to Dansk:] Regular Element #10"
,312,90,768,0,0,2,0,311,311,0,0,0,0,0,"[Translate to Deutsch:] [Translate to Dansk:] Regular Element #10"
,320,-1,512,0,0,0,0,0,298,2,2,0,298,0,"Regular Element #2"
,321,89,416,1,0,1,298,298,298,1,1,0,0,0,"[Translate to Dansk:] Regular Element #2"
,322,-1,416,0,0,1,298,298,298,1,-1,0,321,0,"[Translate to Dansk:] Regular Element #2"
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment