Skip to content

Commit 2277201

Browse files
committed
ACP2E-517: update integration tests
1 parent 763f405 commit 2277201

File tree

2 files changed

+26
-4
lines changed

2 files changed

+26
-4
lines changed

dev/tests/integration/testsuite/Magento/Deploy/DeployTest.php

Lines changed: 18 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -79,7 +79,7 @@ class DeployTest extends \PHPUnit\Framework\TestCase
7979
Options::NO_HTML_MINIFY => false,
8080
Options::AREA => ['frontend'],
8181
Options::EXCLUDE_AREA => ['none'],
82-
Options::THEME => ['Magento/zoom1', 'Magento/zoom2', 'Magento/zoom3'],
82+
Options::THEME => ['Magento/zoom1', 'Magento/zoom2', 'Magento/zoom3', 'Vendor/parent', 'Vendor/child'],
8383
Options::EXCLUDE_THEME => ['none'],
8484
Options::LANGUAGE => ['en_US', 'fr_FR', 'pl_PL'],
8585
Options::EXCLUDE_LANGUAGE => ['none'],
@@ -148,8 +148,7 @@ public function testDeploy()
148148
$this->assertCssUrlFixerPostProcessor($actualFileContent);
149149

150150
$actualFileContent = $this->staticDir->readFile('frontend/Vendor/child/default/css/styles-m.css');
151-
$this->assertLessPreProcessor($actualFileContent);
152-
$this->assertCssUrlFixerPostProcessor($actualFileContent);
151+
$this->assertCssFromChildTheme($actualFileContent);
153152

154153
foreach (['Magento/zoom1', 'Magento/zoom2', 'Magento/zoom3', 'Vendor/parent', 'Vendor/child'] as $theme) {
155154
$this->assertBundleSize($theme);
@@ -166,7 +165,7 @@ public function testDeploy()
166165
*/
167166
private function assertFileExistsIsGenerated($fileName)
168167
{
169-
foreach (['Magento/zoom1', 'Magento/zoom2', 'Magento/zoom3'] as $theme) {
168+
foreach (['Magento/zoom1', 'Magento/zoom2', 'Magento/zoom3', 'Vendor/parent', 'Vendor/child'] as $theme) {
170169
foreach ($this->options[Options::LANGUAGE] as $locale) {
171170
$this->assertFileExists(
172171
$this->staticDir->getAbsolutePath(
@@ -217,6 +216,21 @@ private function assertCssUrlFixerPostProcessor($actualRootCssContent)
217216
$this->assertStringContainsString('color:#111', $actualRootCssContent);
218217
}
219218

219+
/**
220+
* Assert CSS from child post-processor
221+
*
222+
* @param $actualRootCssContent
223+
* @return void
224+
*/
225+
private function assertCssFromChildTheme($actualRootCssContent)
226+
{
227+
//assert CssUrlFixer fix urls
228+
$this->assertStringContainsString(
229+
'super-test-class-for-easy-find',
230+
$actualRootCssContent
231+
);
232+
}
233+
220234
/**
221235
* Assert correct bundle size according to configuration set in view.xml
222236
*

dev/tests/integration/testsuite/Magento/Deploy/_files/theme_rollback.php

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,3 +17,11 @@
1717
$theme = $objectManager->create(\Magento\Theme\Model\Theme::class);
1818
$theme->load('Magento/zoom3', 'theme_path');
1919
$theme->delete();
20+
21+
$theme = $objectManager->create(\Magento\Theme\Model\Theme::class);
22+
$theme->load('Vendor/child', 'theme_path');
23+
$theme->delete();
24+
25+
$theme = $objectManager->create(\Magento\Theme\Model\Theme::class);
26+
$theme->load('Vendor/parent', 'theme_path');
27+
$theme->delete();

0 commit comments

Comments
 (0)