[TASK] Add additional workspaces tests covering enable fields 55/62255/8
authorOliver Hader <oliver@typo3.org>
Fri, 8 Nov 2019 16:32:02 +0000 (17:32 +0100)
committerOliver Hader <oliver.hader@typo3.org>
Sat, 9 Nov 2019 09:03:57 +0000 (10:03 +0100)
Resolves: #89623
Releases: master, 9.5
Change-Id: Ibb2738c792173e8f40f0c98350629754379b74cb
Reviewed-on: https://review.typo3.org/c/Packages/TYPO3.CMS/+/62255
Tested-by: TYPO3com <noreply@typo3.com>
Tested-by: Benni Mack <benni@typo3.org>
Tested-by: Oliver Hader <oliver.hader@typo3.org>
Reviewed-by: Benni Mack <benni@typo3.org>
Reviewed-by: Oliver Hader <oliver.hader@typo3.org>
typo3/sysext/core/Tests/Functional/DataHandling/Regular/AbstractActionTestCase.php
typo3/sysext/workspaces/Tests/Functional/DataHandling/Regular/DataSet/LiveDefaultElements.csv
typo3/sysext/workspaces/Tests/Functional/DataHandling/Regular/DataSet/LiveDefaultPages.csv
typo3/sysext/workspaces/Tests/Functional/DataHandling/Regular/Modify/ActionTest.php
typo3/sysext/workspaces/Tests/Functional/DataHandling/Regular/Modify/DataSet/localizeContent.csv
typo3/sysext/workspaces/Tests/Functional/DataHandling/Regular/Modify/DataSet/localizeContentWHideAtCopy.csv [new file with mode: 0644]

index 07f21fd..8898854 100644 (file)
@@ -172,6 +172,16 @@ abstract class AbstractActionTestCase extends \TYPO3\CMS\Core\Tests\Functional\D
     }
 
     /**
+     * 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()
      */
index 22129af..5a84892 100644 (file)
 ,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",,,
index 25c25b0..7e5013e 100644 (file)
@@ -1,6 +1,6 @@
-"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"
index 4520062..2a9b0c6 100644 (file)
@@ -192,6 +192,23 @@ class ActionTest extends \TYPO3\CMS\Workspaces\Tests\Functional\DataHandling\Reg
 
     /**
      * @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
      */
     public function localizeContentFromNonDefaultLanguage()
index 200ac7c..7409213 100644 (file)
@@ -1,15 +1,15 @@
-"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"
diff --git a/typo3/sysext/workspaces/Tests/Functional/DataHandling/Regular/Modify/DataSet/localizeContentWHideAtCopy.csv b/typo3/sysext/workspaces/Tests/Functional/DataHandling/Regular/Modify/DataSet/localizeContentWHideAtCopy.csv
new file mode 100644 (file)
index 0000000..2b39d4b
--- /dev/null
@@ -0,0 +1,15 @@
+"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"