Skip to content

Commit 12cc440

Browse files
committed
TASK: Adjust CI
1 parent c83dd21 commit 12cc440

File tree

5 files changed

+32
-49
lines changed

5 files changed

+32
-49
lines changed

.github/workflows/tests.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -69,7 +69,7 @@ jobs:
6969
- "3306:3306"
7070
options: --health-cmd="mysqladmin ping" --health-interval=10s --health-timeout=5s --health-retries=3
7171

72-
name: 'Terminal with Neos ${{ matrix.neosVersion }} test'
72+
name: 'Shel.CriticalCSS with Neos ${{ matrix.neosVersion }} test'
7373

7474
env:
7575
NEOS_TARGET_VERSION: ${{matrix.neosVersion}}
@@ -103,7 +103,7 @@ jobs:
103103
104104
git -C ../${{ env.PACKAGE_FOLDER }} checkout -b build
105105
composer config repositories.package '{ "type": "path", "url": "../${{ env.PACKAGE_FOLDER }}", "options": { "symlink": false } }'
106-
composer require --no-update --no-interaction shel/neos-terminal:"dev-build as dev-${PACKAGE_TARGET_VERSION}"
106+
composer require --no-update --no-interaction shel/critical-css:"dev-build as dev-${PACKAGE_TARGET_VERSION}"
107107
composer require --no-update --no-interaction neos/contentgraph-doctrinedbaladapter:"~9.0.0"
108108
109109
- name: Composer Install

Tests/Functional/StyleCollectorTest.php

Lines changed: 4 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -8,23 +8,12 @@
88
*/
99

1010
use Neos\Fusion\Tests\Functional\FusionObjects\AbstractFusionObjectTest;
11-
use Neos\Fusion\View\FusionView;
1211

1312
/**
1413
* Testcase for the style collector object
1514
*/
1615
class StyleCollectorTest extends AbstractFusionObjectTest
1716
{
18-
/**
19-
* @inheritDoc
20-
*/
21-
protected function buildView(): FusionView
22-
{
23-
$view = parent::buildView();
24-
$view->setPackageKey('Shel.CriticalCSS');
25-
$view->setFusionPathPattern(__DIR__ . '/Fixtures/Fusion');
26-
return $view;
27-
}
2817

2918
/**
3019
* @test
@@ -41,9 +30,9 @@ public function collectMultipleStylesWorks()
4130
<title>Test</title>
4231
<style>.foo{color:blue}.bar{color:green}</style></head>
4332
<body>
44-
33+
4534
<div class="foo">foo</div>
46-
35+
4736
<div class="bar">bar</div>
4837
</body>
4938
</html>', $view->render());
@@ -64,9 +53,9 @@ public function removeDuplicatesStylesWorks()
6453
<title>Test</title>
6554
<style>.foo{color:blue}</style></head>
6655
<body>
67-
56+
6857
<div class="foo">foo</div>
69-
58+
7059
<div class="foo">foo</div>
7160
</body>
7261
</html>', $view->render());

Tests/Functional/StyleLoaderTest.php

Lines changed: 0 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -8,23 +8,12 @@
88
*/
99

1010
use Neos\Fusion\Tests\Functional\FusionObjects\AbstractFusionObjectTest;
11-
use Neos\Fusion\View\FusionView;
1211

1312
/**
1413
* Testcase for the style loader object
1514
*/
1615
class StyleLoaderTest extends AbstractFusionObjectTest
1716
{
18-
/**
19-
* @inheritDoc
20-
*/
21-
protected function buildView(): FusionView
22-
{
23-
$view = parent::buildView();
24-
$view->setPackageKey('Shel.CriticalCSS');
25-
$view->setFusionPathPattern(__DIR__ . '/Fixtures/Fusion');
26-
return $view;
27-
}
2817

2918
/**
3019
* @test

Tests/Functional/StylesTest.php

Lines changed: 21 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
<?php
2+
23
declare(strict_types=1);
34

45
namespace Shel\CriticalCSS\Tests\Functional;
@@ -8,23 +9,12 @@
89
*/
910

1011
use Neos\Fusion\Tests\Functional\FusionObjects\AbstractFusionObjectTest;
11-
use Neos\Fusion\View\FusionView;
1212

1313
/**
1414
* Testcase for the styles object
1515
*/
1616
class StylesTest extends AbstractFusionObjectTest
1717
{
18-
/**
19-
* @inheritDoc
20-
*/
21-
protected function buildView(): FusionView
22-
{
23-
$view = parent::buildView();
24-
$view->setPackageKey('Shel.CriticalCSS');
25-
$view->setFusionPathPattern(__DIR__ . '/Fixtures/Fusion');
26-
return $view;
27-
}
2818

2919
/**
3020
* @test
@@ -38,7 +28,8 @@ public function basicRenderingWorks()
3828
'<style data-inline>' .
3929
'.style--1d5b3fc659{color:green;font-size:12px}' .
4030
'</style>' .
41-
'<div class="style--1d5b3fc659">foo</div>', $view->render()
31+
'<div class="style--1d5b3fc659">foo</div>',
32+
$view->render()
4233
);
4334
}
4435

@@ -70,7 +61,8 @@ public function eelExpressionRenderingWorks()
7061
'<style data-inline>' .
7162
'.style--a01f4ebd21{font-size:7px}' .
7263
'</style>' .
73-
'<div class="style--a01f4ebd21">foo</div>', $view->render()
64+
'<div class="style--a01f4ebd21">foo</div>',
65+
$view->render()
7466
);
7567
}
7668

@@ -87,7 +79,8 @@ public function nestedRenderingWorks()
8779
'.style--0e1e7d5620{color:blue}' .
8880
'.style--0e1e7d5620 strong{font-weight:bold}' .
8981
'</style>' .
90-
'<div class="style--0e1e7d5620">foo <strong>bar</strong></div>', $view->render()
82+
'<div class="style--0e1e7d5620">foo <strong>bar</strong></div>',
83+
$view->render()
9184
);
9285
}
9386

@@ -105,7 +98,8 @@ public function nestedRenderingWithoutDataStructuresWorks()
10598
'.style--e2384db9d9 strong{font-weight:bold}' .
10699
'.style--e2384db9d9 strong em{color:pink}' .
107100
'</style>' .
108-
'<div class="style--e2384db9d9">foo <strong>bar <em>pony</em></strong></div>', $view->render()
101+
'<div class="style--e2384db9d9">foo <strong>bar <em>pony</em></strong></div>',
102+
$view->render()
109103
);
110104
}
111105

@@ -123,7 +117,8 @@ public function nestedEvaluationRenderingWorks()
123117
'.style--385286f4a7 strong{font-weight:bold}' .
124118
'.style--385286f4a7 strong em{margin-top:50px}' .
125119
'</style>' .
126-
'<div class="style--385286f4a7">foo <strong>bar <em>pony</em></strong></div>', $view->render()
120+
'<div class="style--385286f4a7">foo <strong>bar <em>pony</em></strong></div>',
121+
$view->render()
127122
);
128123
}
129124

@@ -139,7 +134,8 @@ public function selectorRenderingWorks()
139134
'<style data-inline>' .
140135
'body{font-family:Comic Sans}' .
141136
'</style>' .
142-
'<html><body>foo</body></html>', $view->render()
137+
'<html><body>foo</body></html>',
138+
$view->render()
143139
);
144140
}
145141

@@ -156,7 +152,8 @@ public function mediaQueryRenderingWorks()
156152
'.style--3e741db00a{color:blue}' .
157153
'@media all{.style--3e741db00a{color:green}}' .
158154
'</style>' .
159-
'<div class="style--3e741db00a">foo</div>', $view->render()
155+
'<div class="style--3e741db00a">foo</div>',
156+
$view->render()
160157
);
161158
}
162159

@@ -174,7 +171,8 @@ public function mediaQueryWithNestingRenderingWorks()
174171
'@media all{.style--751ebabd93{color:green}}' .
175172
'@media all{.style--751ebabd93 strong{color:yellow}}' .
176173
'</style>' .
177-
'<div class="style--751ebabd93">foo <strong>bar</strong></div>', $view->render()
174+
'<div class="style--751ebabd93">foo <strong>bar</strong></div>',
175+
$view->render()
178176
);
179177
}
180178

@@ -195,7 +193,8 @@ public function nestedMediaQueriesRenderingWorks()
195193
'.style--2d1e5ab0be strong{display:block}' .
196194
'}}' .
197195
'</style>' .
198-
'<div class="style--2d1e5ab0be">foo <strong>bar</strong></div>', $view->render()
196+
'<div class="style--2d1e5ab0be">foo <strong>bar</strong></div>',
197+
$view->render()
199198
);
200199
}
201200

@@ -217,7 +216,8 @@ public function supportsQueryRenderingWorks()
217216
'display:flex' .
218217
'}}' .
219218
'</style>' .
220-
'<div class="style--c07e794268">foo</div>', $view->render()
219+
'<div class="style--c07e794268">foo</div>',
220+
$view->render()
221221
);
222222
}
223223
}

composer.json

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -43,5 +43,10 @@
4343
"neos": {
4444
"package-key": "Shel.CriticalCSS"
4545
}
46+
},
47+
"config": {
48+
"allow-plugins": {
49+
"neos/composer-plugin": true
50+
}
4651
}
4752
}

0 commit comments

Comments
 (0)