Skip to content

Commit 763f405

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

File tree

9 files changed

+48
-1
lines changed

9 files changed

+48
-1
lines changed

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

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -147,7 +147,11 @@ public function testDeploy()
147147
$this->assertLessPreProcessor($actualFileContent);
148148
$this->assertCssUrlFixerPostProcessor($actualFileContent);
149149

150-
foreach (['Magento/zoom1', 'Magento/zoom2', 'Magento/zoom3'] as $theme) {
150+
$actualFileContent = $this->staticDir->readFile('frontend/Vendor/child/default/css/styles-m.css');
151+
$this->assertLessPreProcessor($actualFileContent);
152+
$this->assertCssUrlFixerPostProcessor($actualFileContent);
153+
154+
foreach (['Magento/zoom1', 'Magento/zoom2', 'Magento/zoom3', 'Vendor/parent', 'Vendor/child'] as $theme) {
151155
$this->assertBundleSize($theme);
152156
$this->assertExcluded($theme, $this->config->getExcludedFiles());
153157
$this->assertExcluded($theme, $this->config->getExcludedDir());
Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
<?php
2+
use Magento\Framework\Component\ComponentRegistrar;
3+
4+
ComponentRegistrar::register(ComponentRegistrar::THEME, 'frontend/Vendor/child', __DIR__);
Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
2+
<theme xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:framework:Config/etc/theme.xsd">
3+
<title>Vendor Child</title>
4+
<parent>Vendor/parent</parent>
5+
</theme>
Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
& when (@media-common = true) {
2+
.super-test-class-for-easy-find {
3+
text-align: right;
4+
}
5+
}
Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
<?php
2+
use Magento\Framework\Component\ComponentRegistrar;
3+
4+
ComponentRegistrar::register(ComponentRegistrar::THEME, 'frontend/Vendor/parent', __DIR__);
Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
2+
<theme xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:framework:Config/etc/theme.xsd">
3+
<title>Vendor Parent</title>
4+
<parent>Magento/blank</parent>
5+
</theme>
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
// This is overridden in B2B theme
2+
// https://devdocs.magento.com/guides/v2.4/frontend-dev-guide/css-guide/css_quick_guide_approach.html
Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
@import '_extend-child.less';
2+

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

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -84,6 +84,22 @@ function rcopy($src, $destination)
8484
);
8585
}
8686

87+
if (!$registrar->getPath(ComponentRegistrar::THEME, 'frontend/Vendor/parent')) {
88+
ComponentRegistrar::register(
89+
ComponentRegistrar::THEME,
90+
'frontend/Vendor/parent',
91+
__DIR__ . '/Vendor/parent'
92+
);
93+
}
94+
95+
if (!$registrar->getPath(ComponentRegistrar::THEME, 'frontend/Vendor/child')) {
96+
ComponentRegistrar::register(
97+
ComponentRegistrar::THEME,
98+
'frontend/Vendor/child',
99+
__DIR__ . '/Vendor/child'
100+
);
101+
}
102+
87103
/** @var \Magento\Theme\Model\Theme\Registration $themeRegistration */
88104
$themeRegistration = $objectManager->get(\Magento\Theme\Model\Theme\Registration::class);
89105
$themeRegistration->register();

0 commit comments

Comments
 (0)