-
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
TASK: Add tests for content_blocks in backend layout
- Loading branch information
1 parent
57307e1
commit bf463ca
Showing
18 changed files
with
390 additions
and
0 deletions.
There are no files selected for viewing
22 changes: 22 additions & 0 deletions
22
Tests/Fixtures/content_blocks_example/Configuration/TSconfig/Page/Backend_Layouts.tsconfig
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
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 | ||
} | ||
} | ||
} | ||
} | ||
} | ||
} | ||
} | ||
} |
26 changes: 26 additions & 0 deletions
26
...content_blocks_example/Configuration/TypoScript/ContentElements/codappix_image.typoscript
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
tt_content.codappix_image { | ||
dataProcessing { | ||
100 = Codappix\ResponsiveImages\DataProcessing\ResponsiveImagesProcessor | ||
100 { | ||
fieldName = image | ||
} | ||
} | ||
} | ||
|
||
plugin.tx_responsiveimages { | ||
settings { | ||
contentelements { | ||
codappix_image { | ||
image { | ||
multiplier { | ||
xs = 1 | ||
sm = 1 | ||
md = 1 | ||
lg = 1 | ||
xl = 0.5 | ||
} | ||
} | ||
} | ||
} | ||
} | ||
} |
26 changes: 26 additions & 0 deletions
26
...ocks_example/Configuration/TypoScript/ContentElements/codappix_imagefixedwidth.typoscript
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
tt_content.codappix_imagefixedwidth { | ||
dataProcessing { | ||
100 = Codappix\ResponsiveImages\DataProcessing\ResponsiveImagesProcessor | ||
100 { | ||
fieldName = image | ||
} | ||
} | ||
} | ||
|
||
plugin.tx_responsiveimages { | ||
settings { | ||
contentelements { | ||
codappix_imagefixedwidth { | ||
image { | ||
sizes { | ||
xs = 600 | ||
sm = 900 | ||
md = 1200 | ||
lg = 1600 | ||
xl = 1600 | ||
} | ||
} | ||
} | ||
} | ||
} | ||
} |
49 changes: 49 additions & 0 deletions
49
...ent_blocks_example/Configuration/TypoScript/Extensions/responsive_images/Setup.typoscript
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,49 @@ | ||
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 | ||
} | ||
} | ||
} | ||
} | ||
} | ||
} | ||
} |
9 changes: 9 additions & 0 deletions
9
Tests/Fixtures/content_blocks_example/Configuration/TypoScript/Rendering.typoscript
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
page = PAGE | ||
page { | ||
10 < styles.content.get | ||
|
||
config { | ||
disableAllHeaderCode = 1 | ||
admPanel = 0 | ||
} | ||
} |
2 changes: 2 additions & 0 deletions
2
Tests/Fixtures/content_blocks_example/Configuration/TypoScript/Setup.typoscript
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
<INCLUDE_TYPOSCRIPT: source="DIR:EXT:content_blocks_example/Configuration/TypoScript/ContentElements/"> | ||
<INCLUDE_TYPOSCRIPT: source="DIR:EXT:content_blocks_example/Configuration/TypoScript/Extensions/"> |
1 change: 1 addition & 0 deletions
1
..._blocks_example/ContentBlocks/ContentElements/image-fixed-width/Assets/Icon.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
12 changes: 12 additions & 0 deletions
12
...ntent_blocks_example/ContentBlocks/ContentElements/image-fixed-width/EditorInterface.yaml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
name: codappix/image-fixed-width | ||
title: codappix/image-fixed-width | ||
description: 'Description for Content Element codappix/image-fixed-width' | ||
group: common | ||
prefixFields: true | ||
prefixType: full | ||
fields: | ||
- | ||
identifier: image | ||
useExistingField: true | ||
type: File | ||
allowed: common-image-types |
7 changes: 7 additions & 0 deletions
7
...ntent_blocks_example/ContentBlocks/ContentElements/image-fixed-width/Source/Frontend.html
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
<html xmlns:f="http://typo3.org/ns/TYPO3/CMS/Fluid/ViewHelpers" data-namespace-typo3-fluid="true"> | ||
<f:spaceless> | ||
<f:for each="{responsiveImages}" as="image"> | ||
<f:if condition="{image}"><f:for each="{image.sizes}" as="size" iteration="sizeIterator">{size.breakpoint.cropVariant} {size.size} {size.breakpoint.mediaQuery}</f:for></f:if> | ||
</f:for> | ||
</f:spaceless> | ||
</html> |
17 changes: 17 additions & 0 deletions
17
...blocks_example/ContentBlocks/ContentElements/image-fixed-width/Source/Language/Labels.xlf
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
<?xml version="1.0"?> | ||
<xliff version="1.2" xmlns="urn:oasis:names:tc:xliff:document:1.2"> | ||
<file datatype="plaintext" original="Labels.xlf" source-language="en" date="2024-04-16T13:20:57+00:00" product-name="codappix/image-fixed-width"> | ||
<header/> | ||
<body> | ||
<trans-unit id="title" resname="title"> | ||
<source>codappix/image-fixed-width</source> | ||
</trans-unit> | ||
<trans-unit id="description" resname="description"> | ||
<source>Description for Content Element codappix/image-fixed-width</source> | ||
</trans-unit> | ||
<trans-unit id="image.label" resname="image.label"> | ||
<source>Custom image label</source> | ||
</trans-unit> | ||
</body> | ||
</file> | ||
</xliff> |
1 change: 1 addition & 0 deletions
1
...ures/content_blocks_example/ContentBlocks/ContentElements/image/Assets/Icon.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
12 changes: 12 additions & 0 deletions
12
.../Fixtures/content_blocks_example/ContentBlocks/ContentElements/image/EditorInterface.yaml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
name: codappix/image | ||
title: codappix/image | ||
description: 'Description for Content Element codappix/image' | ||
group: common | ||
prefixFields: true | ||
prefixType: full | ||
fields: | ||
- | ||
identifier: image | ||
useExistingField: true | ||
type: File | ||
allowed: common-image-types |
7 changes: 7 additions & 0 deletions
7
.../Fixtures/content_blocks_example/ContentBlocks/ContentElements/image/Source/Frontend.html
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
<html xmlns:f="http://typo3.org/ns/TYPO3/CMS/Fluid/ViewHelpers" data-namespace-typo3-fluid="true"> | ||
<f:spaceless> | ||
<f:for each="{responsiveImages}" as="image"> | ||
<f:if condition="{image}"><f:for each="{image.sizes}" as="size" iteration="sizeIterator">{size.breakpoint.cropVariant} {size.size} {size.breakpoint.mediaQuery}</f:for></f:if> | ||
</f:for> | ||
</f:spaceless> | ||
</html> |
17 changes: 17 additions & 0 deletions
17
...res/content_blocks_example/ContentBlocks/ContentElements/image/Source/Language/Labels.xlf
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
<?xml version="1.0"?> | ||
<xliff version="1.2" xmlns="urn:oasis:names:tc:xliff:document:1.2"> | ||
<file datatype="plaintext" original="Labels.xlf" source-language="en" date="2024-04-16T13:20:57+00:00" product-name="codappix/image"> | ||
<header/> | ||
<body> | ||
<trans-unit id="title" resname="title"> | ||
<source>codappix/image</source> | ||
</trans-unit> | ||
<trans-unit id="description" resname="description"> | ||
<source>Description for Content Element codappix/image</source> | ||
</trans-unit> | ||
<trans-unit id="image.label" resname="image.label"> | ||
<source>Custom image label</source> | ||
</trans-unit> | ||
</body> | ||
</file> | ||
</xliff> |
32 changes: 32 additions & 0 deletions
32
Tests/Fixtures/content_blocks_example/Test/Fixtures/0colDatabase.php
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
<?php | ||
|
||
declare(strict_types=1); | ||
|
||
return [ | ||
'tt_content' => [ | ||
1 => [ | ||
'uid' => '1', | ||
'pid' => '2', | ||
'hidden' => '0', | ||
'sorting' => '1', | ||
'CType' => 'codappix_image', | ||
'header' => 'codappix_image', | ||
'deleted' => '0', | ||
'starttime' => '0', | ||
'endtime' => '0', | ||
'colPos' => '0', | ||
'sys_language_uid' => '0', | ||
'image' => '1', | ||
], | ||
], | ||
'sys_file_reference' => [ | ||
0 => [ | ||
'uid' => '1', | ||
'pid' => '2', | ||
'uid_local' => '1', | ||
'uid_foreign' => '1', | ||
'tablenames' => 'tt_content', | ||
'fieldname' => 'image', | ||
], | ||
], | ||
]; |
32 changes: 32 additions & 0 deletions
32
Tests/Fixtures/content_blocks_example/Test/Fixtures/0colImageFixWidthDatabase.php
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
<?php | ||
|
||
declare(strict_types=1); | ||
|
||
return [ | ||
'tt_content' => [ | ||
1 => [ | ||
'uid' => '1', | ||
'pid' => '2', | ||
'hidden' => '0', | ||
'sorting' => '1', | ||
'CType' => 'codappix_imagefixedwidth', | ||
'header' => 'codappix_imagefixedwidth', | ||
'deleted' => '0', | ||
'starttime' => '0', | ||
'endtime' => '0', | ||
'colPos' => '0', | ||
'sys_language_uid' => '0', | ||
'image' => '1', | ||
], | ||
], | ||
'sys_file_reference' => [ | ||
0 => [ | ||
'uid' => '1', | ||
'pid' => '2', | ||
'uid_local' => '1', | ||
'uid_foreign' => '1', | ||
'tablenames' => 'tt_content', | ||
'fieldname' => 'image', | ||
], | ||
], | ||
]; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
{ | ||
"name": "codappix/content_blocks_example", | ||
"description": "Add a content blocks example for frontend tests", | ||
"type": "typo3-cms-extension", | ||
"license": "GPL-2.0-or-later", | ||
"require": { | ||
"typo3/cms-core": "*", | ||
"codappix/typo3-responsive-images": "*" | ||
}, | ||
"extra": { | ||
"typo3/cms": { | ||
"extension-key": "content_blocks_example" | ||
} | ||
} | ||
} |
Oops, something went wrong.