From 07a53328412335eb44499a6ce5482d3b0b37101a Mon Sep 17 00:00:00 2001 From: Daniel Gohlke Date: Tue, 19 Mar 2024 12:07:48 +0100 Subject: [PATCH] CLEANUP: Remove duplication in base_example and container_example --- .../TSconfig/Page/Backend_Layouts.tsconfig | 22 --------- .../TypoScript/Container/1col.typoscript | 5 ++ .../Container/2col-33-66.typoscript | 5 ++ .../Container/2col-50-50.typoscript | 5 ++ .../Container/2col-66-33.typoscript | 5 ++ .../TypoScript/Container/3col.typoscript | 5 ++ .../ContentElements/image.typoscript | 35 ------------- .../responsive_images/Setup.typoscript | 49 ------------------- .../TypoScript/Rendering.typoscript | 2 - .../Configuration/TypoScript/Setup.typoscript | 29 +---------- .../FluidStyledContent/Media/Image.html | 9 ---- .../Templates/FluidStyledContent/Image.html | 7 --- Tests/Functional/ContainerTest.php | 4 +- 13 files changed, 29 insertions(+), 153 deletions(-) delete mode 100644 Tests/Fixtures/container_example/Configuration/TSconfig/Page/Backend_Layouts.tsconfig delete mode 100644 Tests/Fixtures/container_example/Configuration/TypoScript/ContentElements/image.typoscript delete mode 100644 Tests/Fixtures/container_example/Configuration/TypoScript/Extensions/responsive_images/Setup.typoscript delete mode 100644 Tests/Fixtures/container_example/Configuration/TypoScript/Rendering.typoscript delete mode 100644 Tests/Fixtures/container_example/Resources/Private/Partials/FluidStyledContent/Media/Image.html delete mode 100644 Tests/Fixtures/container_example/Resources/Private/Templates/FluidStyledContent/Image.html diff --git a/Tests/Fixtures/container_example/Configuration/TSconfig/Page/Backend_Layouts.tsconfig b/Tests/Fixtures/container_example/Configuration/TSconfig/Page/Backend_Layouts.tsconfig deleted file mode 100644 index 2a2ce24..0000000 --- a/Tests/Fixtures/container_example/Configuration/TSconfig/Page/Backend_Layouts.tsconfig +++ /dev/null @@ -1,22 +0,0 @@ -mod.web_layout.BackendLayouts { - MainTemplate { - title = MainTemplate - name = MainTemplate - config { - backend_layout { - colCount = 1 - rowCount = 1 - rows { - 1 { - columns { - 1 { - name = Main Content - colPos = 0 - } - } - } - } - } - } - } -} diff --git a/Tests/Fixtures/container_example/Configuration/TypoScript/Container/1col.typoscript b/Tests/Fixtures/container_example/Configuration/TypoScript/Container/1col.typoscript index 14af340..e77c473 100644 --- a/Tests/Fixtures/container_example/Configuration/TypoScript/Container/1col.typoscript +++ b/Tests/Fixtures/container_example/Configuration/TypoScript/Container/1col.typoscript @@ -15,3 +15,8 @@ plugin.tx_responsiveimages { } } } + +tt_content.example_container-1col < lib.containerElement +tt_content.example_container-1col { + templateName = 1col +} diff --git a/Tests/Fixtures/container_example/Configuration/TypoScript/Container/2col-33-66.typoscript b/Tests/Fixtures/container_example/Configuration/TypoScript/Container/2col-33-66.typoscript index c85850e..233ecad 100644 --- a/Tests/Fixtures/container_example/Configuration/TypoScript/Container/2col-33-66.typoscript +++ b/Tests/Fixtures/container_example/Configuration/TypoScript/Container/2col-33-66.typoscript @@ -25,3 +25,8 @@ plugin.tx_responsiveimages { } } } + +tt_content.example_container-2col-33-66 < lib.containerElement +tt_content.example_container-2col-33-66 { + templateName = 2col-33-66 +} diff --git a/Tests/Fixtures/container_example/Configuration/TypoScript/Container/2col-50-50.typoscript b/Tests/Fixtures/container_example/Configuration/TypoScript/Container/2col-50-50.typoscript index 94fe8a6..451eb67 100644 --- a/Tests/Fixtures/container_example/Configuration/TypoScript/Container/2col-50-50.typoscript +++ b/Tests/Fixtures/container_example/Configuration/TypoScript/Container/2col-50-50.typoscript @@ -25,3 +25,8 @@ plugin.tx_responsiveimages { } } } + +tt_content.example_container-2col-50-50 < lib.containerElement +tt_content.example_container-2col-50-50 { + templateName = 2col-50-50 +} diff --git a/Tests/Fixtures/container_example/Configuration/TypoScript/Container/2col-66-33.typoscript b/Tests/Fixtures/container_example/Configuration/TypoScript/Container/2col-66-33.typoscript index be60576..68375a5 100644 --- a/Tests/Fixtures/container_example/Configuration/TypoScript/Container/2col-66-33.typoscript +++ b/Tests/Fixtures/container_example/Configuration/TypoScript/Container/2col-66-33.typoscript @@ -25,3 +25,8 @@ plugin.tx_responsiveimages { } } } + +tt_content.example_container-2col-66-33 < lib.containerElement +tt_content.example_container-2col-66-33 { + templateName = 2col-66-33 +} diff --git a/Tests/Fixtures/container_example/Configuration/TypoScript/Container/3col.typoscript b/Tests/Fixtures/container_example/Configuration/TypoScript/Container/3col.typoscript index d2a0956..9cf6190 100644 --- a/Tests/Fixtures/container_example/Configuration/TypoScript/Container/3col.typoscript +++ b/Tests/Fixtures/container_example/Configuration/TypoScript/Container/3col.typoscript @@ -35,3 +35,8 @@ plugin.tx_responsiveimages { } } } + +tt_content.example_container-3col < lib.containerElement +tt_content.example_container-3col { + templateName = 3col +} diff --git a/Tests/Fixtures/container_example/Configuration/TypoScript/ContentElements/image.typoscript b/Tests/Fixtures/container_example/Configuration/TypoScript/ContentElements/image.typoscript deleted file mode 100644 index a2bdf61..0000000 --- a/Tests/Fixtures/container_example/Configuration/TypoScript/ContentElements/image.typoscript +++ /dev/null @@ -1,35 +0,0 @@ -tt_content.image { - templateRootPaths { - 110 = EXT:container_example/Resources/Private/Templates/FluidStyledContent - } - partialRootPaths { - 110 = EXT:container_example/Resources/Private/Partials/FluidStyledContent - } - - dataProcessing { - 20 > - 20 = Codappix\ResponsiveImages\DataProcessing\ResponsiveImagesProcessor - 20 { - fieldName = image - filesDataKey = files - } - } -} - -plugin.tx_responsiveimages { - settings { - contentelements { - image { - image { - multiplier { - xs = 1 - sm = 1 - md = 1 - lg = 1 - xl = 1 - } - } - } - } - } -} diff --git a/Tests/Fixtures/container_example/Configuration/TypoScript/Extensions/responsive_images/Setup.typoscript b/Tests/Fixtures/container_example/Configuration/TypoScript/Extensions/responsive_images/Setup.typoscript deleted file mode 100644 index 0db48c6..0000000 --- a/Tests/Fixtures/container_example/Configuration/TypoScript/Extensions/responsive_images/Setup.typoscript +++ /dev/null @@ -1,49 +0,0 @@ -plugin.tx_responsiveimages { - settings { - breakpoints { - xs { - cropVariant = mobile - max = 480 - } - sm { - cropVariant = mobile - max = 767 - } - md { - cropVariant = tablet - max = 991 - } - lg { - cropVariant = default - max = 1479 - } - xl { - cropVariant = large - min = 1480 - } - } - - backendlayouts { - pagets__MainTemplate { - sizes { - xs = 734 - sm = 704 - md = 924 - lg = 1124 - xl = 1124 - } - columns { - 0 { - multiplier { - xs = 1 - sm = 1 - md = 1 - lg = 1 - xl = 1 - } - } - } - } - } - } -} diff --git a/Tests/Fixtures/container_example/Configuration/TypoScript/Rendering.typoscript b/Tests/Fixtures/container_example/Configuration/TypoScript/Rendering.typoscript deleted file mode 100644 index 57404ed..0000000 --- a/Tests/Fixtures/container_example/Configuration/TypoScript/Rendering.typoscript +++ /dev/null @@ -1,2 +0,0 @@ -page = PAGE -page.10 < styles.content.get \ No newline at end of file diff --git a/Tests/Fixtures/container_example/Configuration/TypoScript/Setup.typoscript b/Tests/Fixtures/container_example/Configuration/TypoScript/Setup.typoscript index b6a3f3c..b5e0a79 100644 --- a/Tests/Fixtures/container_example/Configuration/TypoScript/Setup.typoscript +++ b/Tests/Fixtures/container_example/Configuration/TypoScript/Setup.typoscript @@ -1,7 +1,3 @@ - - - - lib.containerElement =< lib.contentElement lib.containerElement { layoutRootPaths { @@ -22,27 +18,4 @@ lib.containerElement { } } -tt_content.example_container-1col < lib.containerElement -tt_content.example_container-1col { - templateName = 1col -} - -tt_content.example_container-2col-33-66 < lib.containerElement -tt_content.example_container-2col-33-66 { - templateName = 2col-33-66 -} - -tt_content.example_container-2col-50-50 < lib.containerElement -tt_content.example_container-2col-50-50 { - templateName = 2col-50-50 -} - -tt_content.example_container-2col-66-33 < lib.containerElement -tt_content.example_container-2col-66-33 { - templateName = 2col-66-33 -} - -tt_content.example_container-3col < lib.containerElement -tt_content.example_container-3col { - templateName = 3col -} + diff --git a/Tests/Fixtures/container_example/Resources/Private/Partials/FluidStyledContent/Media/Image.html b/Tests/Fixtures/container_example/Resources/Private/Partials/FluidStyledContent/Media/Image.html deleted file mode 100644 index 5958224..0000000 --- a/Tests/Fixtures/container_example/Resources/Private/Partials/FluidStyledContent/Media/Image.html +++ /dev/null @@ -1,9 +0,0 @@ - - - - - {size.breakpoint.cropVariant} {size.size} {size.breakpoint.mediaQuery} - - - - diff --git a/Tests/Fixtures/container_example/Resources/Private/Templates/FluidStyledContent/Image.html b/Tests/Fixtures/container_example/Resources/Private/Templates/FluidStyledContent/Image.html deleted file mode 100644 index 23439a4..0000000 --- a/Tests/Fixtures/container_example/Resources/Private/Templates/FluidStyledContent/Image.html +++ /dev/null @@ -1,7 +0,0 @@ - - - - - - - diff --git a/Tests/Functional/ContainerTest.php b/Tests/Functional/ContainerTest.php index 4fe918a..741371a 100644 --- a/Tests/Functional/ContainerTest.php +++ b/Tests/Functional/ContainerTest.php @@ -42,6 +42,7 @@ protected function setUp(): void $this->testExtensionsToLoad = [ 'b13/container', 'codappix/responsive-images', + 'typo3conf/ext/responsive_images/Tests/Fixtures/base_example', 'typo3conf/ext/responsive_images/Tests/Fixtures/container_example', ]; @@ -56,8 +57,9 @@ protected function setUp(): void $this->setUpFrontendRootPage(1, [ 'EXT:fluid_styled_content/Configuration/TypoScript/setup.typoscript', 'EXT:responsive_images/Configuration/TypoScript/Setup.typoscript', + 'EXT:base_example/Configuration/TypoScript/Setup.typoscript', + 'EXT:base_example/Configuration/TypoScript/Rendering.typoscript', 'EXT:container_example/Configuration/TypoScript/Setup.typoscript', - 'EXT:container_example/Configuration/TypoScript/Rendering.typoscript', ]); }