[TASK] Functional tests for free mode translation 50/51150/3
authorTymoteusz Motylewski <t.motylewski@gmail.com>
Thu, 5 Jan 2017 16:25:37 +0000 (17:25 +0100)
committerWouter Wolters <typo3@wouterwolters.nl>
Sat, 7 Jan 2017 17:16:32 +0000 (18:16 +0100)
Functional tests for following scenarios:
- free-mode translation of a record in non-default language
(live and in workspaces)
- copy page translated in free mode (workspaces, live is already covered)

Resolves: #79170
Releases: master, 7.6
Change-Id: Iff69e2b4333dfff7511871573352b270add4de01
Reviewed-on: https://review.typo3.org/51150
Tested-by: TYPO3com <no-reply@typo3.com>
Reviewed-by: Andreas Fernandez <typo3@scripting-base.de>
Tested-by: Andreas Fernandez <typo3@scripting-base.de>
Reviewed-by: Wouter Wolters <typo3@wouterwolters.nl>
Tested-by: Wouter Wolters <typo3@wouterwolters.nl>
14 files changed:
typo3/sysext/core/Tests/Functional/DataHandling/Regular/AbstractActionTestCase.php
typo3/sysext/core/Tests/Functional/DataHandling/Regular/Modify/ActionTest.php
typo3/sysext/core/Tests/Functional/DataHandling/Regular/Modify/DataSet/copyContentToLanguageFromNonDefaultLanguage.csv [new file with mode: 0644]
typo3/sysext/workspaces/Tests/Functional/DataHandling/Regular/AbstractActionTestCase.php
typo3/sysext/workspaces/Tests/Functional/DataHandling/Regular/DataSet/LivePageFreeModeElements.csv [new file with mode: 0644]
typo3/sysext/workspaces/Tests/Functional/DataHandling/Regular/Modify/ActionTest.php
typo3/sysext/workspaces/Tests/Functional/DataHandling/Regular/Modify/DataSet/copyContentToLanguageFromNonDefaultLanguage.csv [new file with mode: 0644]
typo3/sysext/workspaces/Tests/Functional/DataHandling/Regular/Modify/DataSet/copyPageFreeMode.csv [new file with mode: 0644]
typo3/sysext/workspaces/Tests/Functional/DataHandling/Regular/Publish/ActionTest.php
typo3/sysext/workspaces/Tests/Functional/DataHandling/Regular/Publish/DataSet/copyContentToLanguageFromNonDefaultLanguage.csv [new file with mode: 0644]
typo3/sysext/workspaces/Tests/Functional/DataHandling/Regular/Publish/DataSet/copyPageFreeMode.csv [new file with mode: 0644]
typo3/sysext/workspaces/Tests/Functional/DataHandling/Regular/PublishAll/ActionTest.php
typo3/sysext/workspaces/Tests/Functional/DataHandling/Regular/PublishAll/DataSet/copyContentToLanguageFromNonDefaultLanguage.csv [new file with mode: 0644]
typo3/sysext/workspaces/Tests/Functional/DataHandling/Regular/PublishAll/DataSet/copyPageFreeMode.csv [new file with mode: 0644]

index 1e8aae1..51837c5 100644 (file)
@@ -109,6 +109,17 @@ abstract class AbstractActionTestCase extends \TYPO3\CMS\Core\Tests\Functional\D
     }
 
     /**
+     * Free mode "translation" of a record in non default language
+     *
+     * @test
+     * @see DataSet/copyContentToLanguageFromNonDefaultLanguage.csv
+     */
+    public function copyContentToLanguageFromNonDefaultLanguage()
+    {
+        $this->actionService->copyRecordToLanguage(self::TABLE_Content, self::VALUE_ContentIdThirdLocalized, self::VALUE_LanguageIdSecond);
+    }
+
+    /**
      * @test
      * @see DataSet/copyPasteContent.csv
      */
index d2ec7ff..4687459 100644 (file)
@@ -120,6 +120,24 @@ class ActionTest extends \TYPO3\CMS\Core\Tests\Functional\DataHandling\Regular\A
 
     /**
      * @test
+     * @see DataSet/copyContentToLanguageFromNonDefaultLanguage.csv
+     */
+    public function copyContentToLanguageFromNonDefaultLanguage()
+    {
+        parent::copyContentToLanguageFromNonDefaultLanguage();
+        $this->assertAssertionDataSet('copyContentToLanguageFromNonDefaultLanguage');
+
+        $this->setUpFrontendRootPage(1, [
+            'typo3/sysext/core/Tests/Functional/Fixtures/Frontend/JsonRenderer.ts',
+            'typo3/sysext/core/Tests/Functional/Fixtures/Frontend/JsonRendererNoOverlay.ts'
+        ]);
+        $responseSections = $this->getFrontendResponse(self::VALUE_PageId, self::VALUE_LanguageIdSecond)->getResponseSections();
+        $this->assertThat($responseSections, $this->getRequestSectionHasRecordConstraint()
+            ->setTable(self::TABLE_Content)->setField('header')->setValues('[Translate to Deutsch:] [Translate to Dansk:] Regular Element #3'));
+    }
+
+    /**
+     * @test
      * @see DataSet/copyContentRecord.csv
      */
     public function copyPasteContent()
diff --git a/typo3/sysext/core/Tests/Functional/DataHandling/Regular/Modify/DataSet/copyContentToLanguageFromNonDefaultLanguage.csv b/typo3/sysext/core/Tests/Functional/DataHandling/Regular/Modify/DataSet/copyContentToLanguageFromNonDefaultLanguage.csv
new file mode 100644 (file)
index 0000000..41464a3
--- /dev/null
@@ -0,0 +1,7 @@
+tt_content,,,,,,,,,,,,,
+,uid,pid,sorting,deleted,sys_language_uid,l18n_parent,t3_origuid,t3ver_wsid,t3ver_state,t3ver_stage,t3ver_oid,t3ver_move_id,header
+,297,89,256,0,0,0,0,0,0,0,0,0,Regular Element #1
+,298,89,512,0,0,0,0,0,0,0,0,0,Regular Element #2
+,299,89,768,0,0,0,0,0,0,0,0,0,Regular Element #3
+,300,89,1024,0,1,299,299,0,0,0,0,0,[Translate to Dansk:] Regular Element #3
+,301,89,1280,0,2,0,300,0,0,0,0,0,[Translate to Deutsch:] [Translate to Dansk:] Regular Element #3
index 370a2fa..7a7e45a 100644 (file)
@@ -28,6 +28,11 @@ abstract class AbstractActionTestCase extends \TYPO3\CMS\Core\Tests\Functional\D
     const VALUE_ContentIdSecond = 298;
     const VALUE_ContentIdThird = 299;
     const VALUE_ContentIdThirdLocalized = 300;
+
+    const VALUE_ContentIdTenth = 310;
+    const VALUE_ContentIdTenthLocalized = 311;
+    const VALUE_ContentIdTenthLocalized2 = 312;
+
     const VALUE_LanguageId = 1;
     const VALUE_LanguageIdSecond = 2;
     const VALUE_WorkspaceId = 1;
@@ -146,6 +151,18 @@ abstract class AbstractActionTestCase extends \TYPO3\CMS\Core\Tests\Functional\D
     }
 
     /**
+     * Free mode "translation" of a record in non default language
+     *
+     * @test
+     * @see DataSet/copyContentToLanguageFromNonDefaultLanguage.csv
+     */
+    public function copyContentToLanguageFromNonDefaultLanguage()
+    {
+        $copiedTableIds = $this->actionService->copyRecordToLanguage(self::TABLE_Content, self::VALUE_ContentIdThirdLocalized, self::VALUE_LanguageIdSecond);
+        $this->recordIds['localizedContentId'] = $copiedTableIds[self::TABLE_Content][self::VALUE_ContentIdThirdLocalized];
+    }
+
+    /**
      * @see DataSet/localizeContentRecord.csv
      */
     public function localizeContent()
@@ -260,6 +277,19 @@ abstract class AbstractActionTestCase extends \TYPO3\CMS\Core\Tests\Functional\D
     }
 
     /**
+     * @test
+     * @see DataSet/copyPageFreeMode.csv
+     */
+    public function copyPageFreeMode()
+    {
+        $newTableIds = $this->actionService->copyRecord(self::TABLE_Page, self::VALUE_PageIdTarget, self::VALUE_PageIdTarget);
+        $this->recordIds['newPageId'] = $newTableIds[self::TABLE_Page][self::VALUE_PageIdTarget];
+        $this->recordIds['newContentIdTenth'] = $newTableIds[self::TABLE_Content][self::VALUE_ContentIdTenth];
+        $this->recordIds['newContentIdTenthLocalized'] = $newTableIds[self::TABLE_Content][self::VALUE_ContentIdTenthLocalized];
+        $this->recordIds['newContentIdTenthLocalized2'] = $newTableIds[self::TABLE_Content][self::VALUE_ContentIdTenthLocalized2];
+    }
+
+    /**
      * @see DataSet/localizePageRecord.csv
      */
     public function localizePage()
diff --git a/typo3/sysext/workspaces/Tests/Functional/DataHandling/Regular/DataSet/LivePageFreeModeElements.csv b/typo3/sysext/workspaces/Tests/Functional/DataHandling/Regular/DataSet/LivePageFreeModeElements.csv
new file mode 100644 (file)
index 0000000..34549d3
--- /dev/null
@@ -0,0 +1,5 @@
+tt_content,,,,,,,,,,,,,
+,uid,pid,sorting,deleted,sys_language_uid,l18n_parent,t3_origuid,t3ver_wsid,t3ver_state,t3ver_stage,t3ver_oid,t3ver_move_id,header
+,310,90,256,0,0,0,0,0,0,0,0,0,Regular Element #10
+,311,90,512,0,1,0,310,0,0,0,0,0,[Translate to Dansk:] Regular Element #10
+,312,90,768,0,2,0,311,0,0,0,0,0,[Translate to Deutsch:] [Translate to Dansk:] Regular Element #10
index a271ada..9e29c62 100644 (file)
@@ -150,6 +150,24 @@ class ActionTest extends \TYPO3\CMS\Workspaces\Tests\Functional\DataHandling\Reg
 
     /**
      * @test
+     * @see DataSet/copyContentToLanguageFromNonDefaultLanguage.csv
+     */
+    public function copyContentToLanguageFromNonDefaultLanguage()
+    {
+        parent::copyContentToLanguageFromNonDefaultLanguage();
+        $this->assertAssertionDataSet('copyContentToLanguageFromNonDefaultLanguage');
+
+        $this->setUpFrontendRootPage(1, [
+            'typo3/sysext/core/Tests/Functional/Fixtures/Frontend/JsonRenderer.ts',
+            'typo3/sysext/core/Tests/Functional/Fixtures/Frontend/JsonRendererNoOverlay.ts'
+        ]);
+        $responseSections = $this->getFrontendResponse(self::VALUE_PageId, self::VALUE_LanguageIdSecond, self::VALUE_BackendUserId, self::VALUE_WorkspaceId)->getResponseSections();
+        $this->assertThat($responseSections, $this->getRequestSectionHasRecordConstraint()
+            ->setTable(self::TABLE_Content)->setField('header')->setValues('[Translate to Deutsch:] [Translate to Dansk:] Regular Element #3'));
+    }
+
+    /**
+     * @test
      * @see DataSet/localizeContentRecord.csv
      */
     public function localizeContent()
@@ -326,6 +344,23 @@ class ActionTest extends \TYPO3\CMS\Workspaces\Tests\Functional\DataHandling\Reg
 
     /**
      * @test
+     * @see DataSet/copyPageFreeMode.csv
+     */
+    public function copyPageFreeMode()
+    {
+        $this->importScenarioDataSet('LivePageFreeModeElements');
+        parent::copyPageFreeMode();
+        $this->assertAssertionDataSet('copyPageFreeMode');
+
+        $responseSections = $this->getFrontendResponse($this->recordIds['newPageId'], 0, self::VALUE_BackendUserId, self::VALUE_WorkspaceId)->getResponseSections();
+        $this->assertThat($responseSections, $this->getRequestSectionHasRecordConstraint()
+            ->setTable(self::TABLE_Page)->setField('title')->setValues('Target'));
+        $this->assertThat($responseSections, $this->getRequestSectionHasRecordConstraint()
+            ->setTable(self::TABLE_Content)->setField('header')->setValues('Regular Element #10'));
+    }
+
+    /**
+     * @test
      * @see DataSet/localizePageRecord.csv
      */
     public function localizePage()
diff --git a/typo3/sysext/workspaces/Tests/Functional/DataHandling/Regular/Modify/DataSet/copyContentToLanguageFromNonDefaultLanguage.csv b/typo3/sysext/workspaces/Tests/Functional/DataHandling/Regular/Modify/DataSet/copyContentToLanguageFromNonDefaultLanguage.csv
new file mode 100644 (file)
index 0000000..32c3aa1
--- /dev/null
@@ -0,0 +1,10 @@
+tt_content,,,,,,,,,,,,,
+,uid,pid,sorting,deleted,sys_language_uid,l18n_parent,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,"Regular Element #0"
+,297,89,256,0,0,0,0,0,0,0,0,0,Regular Element #1
+,298,89,512,0,0,0,0,0,0,0,0,0,Regular Element #2
+,299,89,768,0,0,0,0,0,0,0,0,0,Regular Element #3
+,300,89,1024,0,1,299,299,0,0,0,0,0,[Translate to Dansk:] Regular Element #3
+,301,-1,512,0,0,0,298,2,2,0,298,0,"Regular Element #2"
+,302,89,1280,0,2,0,300,1,1,0,0,0,[Translate to Deutsch:] [Translate to Dansk:] Regular Element #3
+,303,-1,1280,0,2,0,300,1,-1,0,302,0,[Translate to Deutsch:] [Translate to Dansk:] Regular Element #3
diff --git a/typo3/sysext/workspaces/Tests/Functional/DataHandling/Regular/Modify/DataSet/copyPageFreeMode.csv b/typo3/sysext/workspaces/Tests/Functional/DataHandling/Regular/Modify/DataSet/copyPageFreeMode.csv
new file mode 100644 (file)
index 0000000..d4d6658
--- /dev/null
@@ -0,0 +1,25 @@
+pages,,,,,,,,,,,,,
+,uid,pid,sorting,deleted,t3_origuid,t3ver_wsid,t3ver_state,t3ver_stage,t3ver_oid,t3ver_move_id,title,,
+,1,0,256,0,0,0,0,0,0,0,FunctionalTest,,
+,88,1,256,0,0,0,0,0,0,0,DataHandlerTest,,
+,89,88,256,0,0,0,0,0,0,0,Relations,,
+,90,88,512,0,0,0,0,0,0,0,Target,,
+,91,90,256,0,90,1,1,0,0,0,Target,,
+,92,-1,256,0,90,1,-1,0,91,0,Target,,
+tt_content,,,,,,,,,,,,,
+,uid,pid,sorting,deleted,sys_language_uid,l18n_parent,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,Regular Element #0
+,297,89,256,0,0,0,0,0,0,0,0,0,Regular Element #1
+,298,89,512,0,0,0,0,0,0,0,0,0,Regular Element #2
+,299,89,768,0,0,0,0,0,0,0,0,0,Regular Element #3
+,300,89,1024,0,1,299,299,0,0,0,0,0,[Translate to Dansk:] Regular Element #3
+,301,-1,512,0,0,0,298,2,2,0,298,0,Regular Element #2
+,310,90,256,0,0,0,0,0,0,0,0,0,Regular Element #10
+,311,90,512,0,1,0,310,0,0,0,0,0,[Translate to Dansk:] Regular Element #10
+,312,90,768,0,2,0,311,0,0,0,0,0,[Translate to Deutsch:] [Translate to Dansk:] Regular Element #10
+,313,91,256,0,2,0,312,1,1,0,0,0,[Translate to Deutsch:] [Translate to Dansk:] Regular Element #10
+,314,-1,256,0,2,0,312,1,-1,0,313,0,[Translate to Deutsch:] [Translate to Dansk:] Regular Element #10
+,315,91,128,0,1,0,311,1,1,0,0,0,[Translate to Dansk:] Regular Element #10
+,316,-1,128,0,1,0,311,1,-1,0,315,0,[Translate to Dansk:] Regular Element #10
+,317,91,64,0,0,0,310,1,1,0,0,0,Regular Element #10
+,318,-1,64,0,0,0,310,1,-1,0,317,0,Regular Element #10
index 6952127..560b9bc 100644 (file)
@@ -169,6 +169,25 @@ class ActionTest extends \TYPO3\CMS\Workspaces\Tests\Functional\DataHandling\Reg
 
     /**
      * @test
+     * @see DataSet/copyContentToLanguageFromNonDefaultLanguage.csv
+     */
+    public function copyContentToLanguageFromNonDefaultLanguage()
+    {
+        parent::copyContentToLanguageFromNonDefaultLanguage();
+        $this->actionService->publishRecord(self::TABLE_Content, $this->recordIds['localizedContentId']);
+        $this->assertAssertionDataSet('copyContentToLanguageFromNonDefaultLanguage');
+
+        $this->setUpFrontendRootPage(1, [
+            'typo3/sysext/core/Tests/Functional/Fixtures/Frontend/JsonRenderer.ts',
+            'typo3/sysext/core/Tests/Functional/Fixtures/Frontend/JsonRendererNoOverlay.ts'
+        ]);
+        $responseSections = $this->getFrontendResponse(self::VALUE_PageId, self::VALUE_LanguageIdSecond)->getResponseSections();
+        $this->assertThat($responseSections, $this->getRequestSectionHasRecordConstraint()
+            ->setTable(self::TABLE_Content)->setField('header')->setValues('[Translate to Deutsch:] [Translate to Dansk:] Regular Element #3'));
+    }
+
+    /**
+     * @test
      * @see DataSet/localizeContentRecord.csv
      */
     public function localizeContent()
@@ -333,6 +352,29 @@ class ActionTest extends \TYPO3\CMS\Workspaces\Tests\Functional\DataHandling\Reg
 
     /**
      * @test
+     * @see DataSet/copyPageFreeMode.csv
+     */
+    public function copyPageFreeMode()
+    {
+        $this->importScenarioDataSet('LivePageFreeModeElements');
+        parent::copyPageFreeMode();
+        $this->actionService->publishRecords(
+            [
+                self::TABLE_Page => [$this->recordIds['newPageId']],
+                self::TABLE_Content => [$this->recordIds['newContentIdTenth'], $this->recordIds['newContentIdTenthLocalized'],  $this->recordIds['newContentIdTenthLocalized2']],
+            ]
+        );
+        $this->assertAssertionDataSet('copyPageFreeMode');
+
+        $responseSections = $this->getFrontendResponse($this->recordIds['newPageId'], 0)->getResponseSections();
+        $this->assertThat($responseSections, $this->getRequestSectionHasRecordConstraint()
+            ->setTable(self::TABLE_Page)->setField('title')->setValues('Target'));
+        $this->assertThat($responseSections, $this->getRequestSectionHasRecordConstraint()
+            ->setTable(self::TABLE_Content)->setField('header')->setValues('Regular Element #10'));
+    }
+
+    /**
+     * @test
      * @see DataSet/localizePageRecord.csv
      */
     public function localizePage()
diff --git a/typo3/sysext/workspaces/Tests/Functional/DataHandling/Regular/Publish/DataSet/copyContentToLanguageFromNonDefaultLanguage.csv b/typo3/sysext/workspaces/Tests/Functional/DataHandling/Regular/Publish/DataSet/copyContentToLanguageFromNonDefaultLanguage.csv
new file mode 100644 (file)
index 0000000..7040c76
--- /dev/null
@@ -0,0 +1,9 @@
+tt_content,,,,,,,,,,,,,
+,uid,pid,sorting,deleted,sys_language_uid,l18n_parent,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,"Regular Element #0"
+,297,89,256,0,0,0,0,0,0,0,0,0,Regular Element #1
+,298,89,512,0,0,0,0,0,0,0,0,0,Regular Element #2
+,299,89,768,0,0,0,0,0,0,0,0,0,Regular Element #3
+,300,89,1024,0,1,299,299,0,0,0,0,0,[Translate to Dansk:] Regular Element #3
+,301,-1,512,0,0,0,298,2,2,0,298,0,"Regular Element #2"
+,302,89,1280,0,2,0,300,0,0,0,0,0,[Translate to Deutsch:] [Translate to Dansk:] Regular Element #3
\ No newline at end of file
diff --git a/typo3/sysext/workspaces/Tests/Functional/DataHandling/Regular/Publish/DataSet/copyPageFreeMode.csv b/typo3/sysext/workspaces/Tests/Functional/DataHandling/Regular/Publish/DataSet/copyPageFreeMode.csv
new file mode 100644 (file)
index 0000000..4b7da3e
--- /dev/null
@@ -0,0 +1,21 @@
+pages,,,,,,,,,,,,,
+,uid,pid,sorting,deleted,t3_origuid,t3ver_wsid,t3ver_state,t3ver_stage,t3ver_oid,t3ver_move_id,title,,
+,1,0,256,0,0,0,0,0,0,0,FunctionalTest,,
+,88,1,256,0,0,0,0,0,0,0,DataHandlerTest,,
+,89,88,256,0,0,0,0,0,0,0,Relations,,
+,90,88,512,0,0,0,0,0,0,0,Target,,
+,91,90,256,0,90,0,0,0,0,0,Target,,
+tt_content,,,,,,,,,,,,,
+,uid,pid,sorting,deleted,sys_language_uid,l18n_parent,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,Regular Element #0
+,297,89,256,0,0,0,0,0,0,0,0,0,Regular Element #1
+,298,89,512,0,0,0,0,0,0,0,0,0,Regular Element #2
+,299,89,768,0,0,0,0,0,0,0,0,0,Regular Element #3
+,300,89,1024,0,1,299,299,0,0,0,0,0,[Translate to Dansk:] Regular Element #3
+,301,-1,512,0,0,0,298,2,2,0,298,0,Regular Element #2
+,310,90,256,0,0,0,0,0,0,0,0,0,Regular Element #10
+,311,90,512,0,1,0,310,0,0,0,0,0,[Translate to Dansk:] Regular Element #10
+,312,90,768,0,2,0,311,0,0,0,0,0,[Translate to Deutsch:] [Translate to Dansk:] Regular Element #10
+,313,91,256,0,2,0,312,0,0,0,0,0,[Translate to Deutsch:] [Translate to Dansk:] Regular Element #10
+,315,91,128,0,1,0,311,0,0,0,0,0,[Translate to Dansk:] Regular Element #10
+,317,91,64,0,0,0,310,0,0,0,0,0,Regular Element #10
index 065c5ca..a434088 100644 (file)
@@ -158,6 +158,25 @@ class ActionTest extends \TYPO3\CMS\Workspaces\Tests\Functional\DataHandling\Reg
 
     /**
      * @test
+     * @see DataSet/copyContentToLanguageFromNonDefaultLanguage.csv
+     */
+    public function copyContentToLanguageFromNonDefaultLanguage()
+    {
+        parent::copyContentToLanguageFromNonDefaultLanguage();
+        $this->actionService->publishWorkspace(self::VALUE_WorkspaceId);
+        $this->assertAssertionDataSet('copyContentToLanguageFromNonDefaultLanguage');
+
+        $this->setUpFrontendRootPage(1, [
+            'typo3/sysext/core/Tests/Functional/Fixtures/Frontend/JsonRenderer.ts',
+            'typo3/sysext/core/Tests/Functional/Fixtures/Frontend/JsonRendererNoOverlay.ts'
+        ]);
+        $responseSections = $this->getFrontendResponse(self::VALUE_PageId, self::VALUE_LanguageIdSecond)->getResponseSections();
+        $this->assertThat($responseSections, $this->getRequestSectionHasRecordConstraint()
+            ->setTable(self::TABLE_Content)->setField('header')->setValues('[Translate to Deutsch:] [Translate to Dansk:] Regular Element #3'));
+    }
+
+    /**
+     * @test
      * @see DataSet/localizeContentRecord.csv
      */
     public function localizeContent()
@@ -313,6 +332,24 @@ class ActionTest extends \TYPO3\CMS\Workspaces\Tests\Functional\DataHandling\Reg
 
     /**
      * @test
+     * @see DataSet/copyPageFreeMode.csv
+     */
+    public function copyPageFreeMode()
+    {
+        $this->importScenarioDataSet('LivePageFreeModeElements');
+        parent::copyPageFreeMode();
+        $this->actionService->publishWorkspace(self::VALUE_WorkspaceId);
+        $this->assertAssertionDataSet('copyPageFreeMode');
+
+        $responseSections = $this->getFrontendResponse($this->recordIds['newPageId'], 0)->getResponseSections();
+        $this->assertThat($responseSections, $this->getRequestSectionHasRecordConstraint()
+            ->setTable(self::TABLE_Page)->setField('title')->setValues('Target'));
+        $this->assertThat($responseSections, $this->getRequestSectionHasRecordConstraint()
+            ->setTable(self::TABLE_Content)->setField('header')->setValues('Regular Element #10'));
+    }
+
+    /**
+     * @test
      * @see DataSet/localizePageRecord.csv
      */
     public function localizePage()
diff --git a/typo3/sysext/workspaces/Tests/Functional/DataHandling/Regular/PublishAll/DataSet/copyContentToLanguageFromNonDefaultLanguage.csv b/typo3/sysext/workspaces/Tests/Functional/DataHandling/Regular/PublishAll/DataSet/copyContentToLanguageFromNonDefaultLanguage.csv
new file mode 100644 (file)
index 0000000..7040c76
--- /dev/null
@@ -0,0 +1,9 @@
+tt_content,,,,,,,,,,,,,
+,uid,pid,sorting,deleted,sys_language_uid,l18n_parent,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,"Regular Element #0"
+,297,89,256,0,0,0,0,0,0,0,0,0,Regular Element #1
+,298,89,512,0,0,0,0,0,0,0,0,0,Regular Element #2
+,299,89,768,0,0,0,0,0,0,0,0,0,Regular Element #3
+,300,89,1024,0,1,299,299,0,0,0,0,0,[Translate to Dansk:] Regular Element #3
+,301,-1,512,0,0,0,298,2,2,0,298,0,"Regular Element #2"
+,302,89,1280,0,2,0,300,0,0,0,0,0,[Translate to Deutsch:] [Translate to Dansk:] Regular Element #3
\ No newline at end of file
diff --git a/typo3/sysext/workspaces/Tests/Functional/DataHandling/Regular/PublishAll/DataSet/copyPageFreeMode.csv b/typo3/sysext/workspaces/Tests/Functional/DataHandling/Regular/PublishAll/DataSet/copyPageFreeMode.csv
new file mode 100644 (file)
index 0000000..4b7da3e
--- /dev/null
@@ -0,0 +1,21 @@
+pages,,,,,,,,,,,,,
+,uid,pid,sorting,deleted,t3_origuid,t3ver_wsid,t3ver_state,t3ver_stage,t3ver_oid,t3ver_move_id,title,,
+,1,0,256,0,0,0,0,0,0,0,FunctionalTest,,
+,88,1,256,0,0,0,0,0,0,0,DataHandlerTest,,
+,89,88,256,0,0,0,0,0,0,0,Relations,,
+,90,88,512,0,0,0,0,0,0,0,Target,,
+,91,90,256,0,90,0,0,0,0,0,Target,,
+tt_content,,,,,,,,,,,,,
+,uid,pid,sorting,deleted,sys_language_uid,l18n_parent,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,Regular Element #0
+,297,89,256,0,0,0,0,0,0,0,0,0,Regular Element #1
+,298,89,512,0,0,0,0,0,0,0,0,0,Regular Element #2
+,299,89,768,0,0,0,0,0,0,0,0,0,Regular Element #3
+,300,89,1024,0,1,299,299,0,0,0,0,0,[Translate to Dansk:] Regular Element #3
+,301,-1,512,0,0,0,298,2,2,0,298,0,Regular Element #2
+,310,90,256,0,0,0,0,0,0,0,0,0,Regular Element #10
+,311,90,512,0,1,0,310,0,0,0,0,0,[Translate to Dansk:] Regular Element #10
+,312,90,768,0,2,0,311,0,0,0,0,0,[Translate to Deutsch:] [Translate to Dansk:] Regular Element #10
+,313,91,256,0,2,0,312,0,0,0,0,0,[Translate to Deutsch:] [Translate to Dansk:] Regular Element #10
+,315,91,128,0,1,0,311,0,0,0,0,0,[Translate to Dansk:] Regular Element #10
+,317,91,64,0,0,0,310,0,0,0,0,0,Regular Element #10