[TASK] Cover rendering of hidden tt_content with functional tests 03/53703/2
authorTymoteusz Motylewski <t.motylewski@gmail.com>
Mon, 31 Jul 2017 15:16:14 +0000 (17:16 +0200)
committerBenni Mack <benni@typo3.org>
Tue, 15 Aug 2017 10:46:57 +0000 (12:46 +0200)
Two new cases are covered in LocalizedContentRenderingTest:
- when record is hidden in default language but its translation
  is not hidden
- when visible default language record has hidden translation

Resolves: #82012
Releases: master, 8.7, 7.6
Change-Id: I924c0082f010bf9d9de642111cc3d65844f00f1f
Reviewed-on: https://review.typo3.org/53703
Tested-by: TYPO3com <no-reply@typo3.com>
Reviewed-by: Benni Mack <benni@typo3.org>
Tested-by: Benni Mack <benni@typo3.org>
typo3/sysext/frontend/Tests/Functional/Rendering/DataSet/LiveDefaultElements.csv
typo3/sysext/frontend/Tests/Functional/Rendering/LocalizedContentRenderingTest.php

index 61e7c11..7cc4b90 100644 (file)
@@ -4,14 +4,17 @@ sys_language,,,,,,,,,,,,,
 ,2,0,0,Deutsch,de,,,,,,,,
 ,3,0,0,Polski,pl,,,,,,,,
 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,384,0,1,297,297,0,0,0,0,0,[Translate to Dansk:] Regular Element #1
-,302,89,448,0,2,297,301,0,0,0,0,0,[Translate to Deutsch:] [Translate to Dansk:] Regular Element #1
-,303,89,1250,0,1,0,0,0,0,0,0,0,[DK] Without default language
-,304,89,1250,0,2,0,0,0,0,0,0,0,[DE] Without default language
-,305,89,512,0,3,297,297,0,0,0,0,0,[Translate to Polski:] Regular Element #1
-,306,89,1024,0,3,0,0,0,0,0,0,0,[PL] Without default language
+,uid,pid,sorting,deleted,hidden,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,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,0,1,299,299,0,0,0,0,0,[Translate to Dansk:] Regular Element #3
+,301,89,384,0,0,1,297,297,0,0,0,0,0,[Translate to Dansk:] Regular Element #1
+,302,89,448,0,0,2,297,301,0,0,0,0,0,[Translate to Deutsch:] [Translate to Dansk:] Regular Element #1
+,303,89,1250,0,0,1,0,0,0,0,0,0,0,[DK] Without default language
+,304,89,1250,0,0,2,0,0,0,0,0,0,0,[DE] Without default language
+,305,89,512,0,0,3,297,297,0,0,0,0,0,[Translate to Polski:] Regular Element #1
+,306,89,1024,0,0,3,0,0,0,0,0,0,0,[PL] Without default language
+,307,89,128,0,1,0,0,0,0,0,0,0,0,Hidden Element #4
+,308,89,128,0,0,1,307,307,0,0,0,0,0,[DK] UnHidden Element #4
+,309,89,512,0,1,3,298,298,0,0,0,0,0,[PL] Hidden Regular Element #2
index 52e9dc4..590524c 100644 (file)
@@ -254,35 +254,35 @@ class LocalizedContentRenderingTest extends \TYPO3\CMS\Core\Tests\Functional\Dat
             [
                 'typoScript' => 'config.sys_language_overlay = 0
                                 config.sys_language_mode =',
-                'visibleRecordHeaders' => ['[Translate to Dansk:] Regular Element #1', '[Translate to Dansk:] Regular Element #3', '[DK] Without default language'],
+                'visibleRecordHeaders' => ['[Translate to Dansk:] Regular Element #1', '[Translate to Dansk:] Regular Element #3', '[DK] Without default language', '[DK] UnHidden Element #4'],
                 'sys_language_mode' => '',
                 'sys_language_contentOL' => 0
             ],
             [
                 'typoScript' => 'config.sys_language_overlay = 0
                                 config.sys_language_mode = content_fallback',
-                'visibleRecordHeaders' => ['[Translate to Dansk:] Regular Element #1', '[Translate to Dansk:] Regular Element #3', '[DK] Without default language'],
+                'visibleRecordHeaders' => ['[Translate to Dansk:] Regular Element #1', '[Translate to Dansk:] Regular Element #3', '[DK] Without default language', '[DK] UnHidden Element #4'],
                 'sys_language_mode' => 'content_fallback',
                 'sys_language_contentOL' => 0
             ],
             [
                 'typoScript' => 'config.sys_language_overlay = 0
                                 config.sys_language_mode = content_fallback;1,0',
-                'visibleRecordHeaders' => ['[Translate to Dansk:] Regular Element #1', '[Translate to Dansk:] Regular Element #3', '[DK] Without default language'],
+                'visibleRecordHeaders' => ['[Translate to Dansk:] Regular Element #1', '[Translate to Dansk:] Regular Element #3', '[DK] Without default language', '[DK] UnHidden Element #4'],
                 'sys_language_mode' => 'content_fallback',
                 'sys_language_contentOL' => 0
             ],
             [
                 'typoScript' => 'config.sys_language_overlay = 0
                                 config.sys_language_mode = strict',
-                'visibleRecordHeaders' => ['[Translate to Dansk:] Regular Element #1', '[Translate to Dansk:] Regular Element #3', '[DK] Without default language'],
+                'visibleRecordHeaders' => ['[Translate to Dansk:] Regular Element #1', '[Translate to Dansk:] Regular Element #3', '[DK] Without default language', '[DK] UnHidden Element #4'],
                 'sys_language_mode' => 'strict',
                 'sys_language_contentOL' => 0
             ],
             [
                 'typoScript' => 'config.sys_language_overlay = 0
                                 config.sys_language_mode = ignore',
-                'visibleRecordHeaders' => ['[Translate to Dansk:] Regular Element #1', '[Translate to Dansk:] Regular Element #3', '[DK] Without default language'],
+                'visibleRecordHeaders' => ['[Translate to Dansk:] Regular Element #1', '[Translate to Dansk:] Regular Element #3', '[DK] Without default language', '[DK] UnHidden Element #4'],
                 'sys_language_mode' => 'ignore',
                 'sys_language_contentOL' => 0
             ],
@@ -435,7 +435,7 @@ class LocalizedContentRenderingTest extends \TYPO3\CMS\Core\Tests\Functional\Dat
             [
                 'typoScript' => 'config.sys_language_overlay = 0
                                 config.sys_language_mode = content_fallback;1,0',
-                'visibleRecordHeaders' => ['[Translate to Dansk:] Regular Element #1', '[Translate to Dansk:] Regular Element #3', '[DK] Without default language'],
+                'visibleRecordHeaders' => ['[Translate to Dansk:] Regular Element #1', '[Translate to Dansk:] Regular Element #3', '[DK] Without default language', '[DK] UnHidden Element #4'],
                 'pageTitle' => 'Default language Page', //TODO: change it to "[DK]Page" once #81657 is fixed
                 'sys_language_uid' => 2,
                 'sys_language_content' => 1,
@@ -795,13 +795,16 @@ class LocalizedContentRenderingTest extends \TYPO3\CMS\Core\Tests\Functional\Dat
             'Regular Element #1',
             'Regular Element #2',
             'Regular Element #3',
+            'Hidden Element #4',
             '[Translate to Dansk:] Regular Element #1',
             '[Translate to Dansk:] Regular Element #3',
             '[DK] Without default language',
+            '[DK] UnHidden Element #4',
             '[DE] Without default language',
             '[Translate to Deutsch:] [Translate to Dansk:] Regular Element #1',
             '[Translate to Polski:] Regular Element #1',
-            '[PL] Without default language'
+            '[PL] Without default language',
+            '[PL] Hidden Regular Element #2'
         ];
         return array_diff($allElements, $visibleHeaders);
     }