Skip to content

Commit 778dcac

Browse files
author
Karpenko, Oleksandr
committed
MAGETWO-69515: Static files are deployed too slow for multiple locales
1 parent 3d20656 commit 778dcac

File tree

1 file changed

+26
-1
lines changed

1 file changed

+26
-1
lines changed

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

Lines changed: 26 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -82,7 +82,7 @@ class DeployTest extends \PHPUnit_Framework_TestCase
8282
Options::EXCLUDE_AREA => ['none'],
8383
Options::THEME => ['Magento/zoom1', 'Magento/zoom2', 'Magento/zoom3'],
8484
Options::EXCLUDE_THEME => ['none'],
85-
Options::LANGUAGE => ['en_US'],
85+
Options::LANGUAGE => ['en_US', 'fr_FR', 'pl_PL'],
8686
Options::EXCLUDE_LANGUAGE => ['none'],
8787
Options::JOBS_AMOUNT => 0,
8888
Options::SYMLINK_LOCALE => false,
@@ -137,6 +137,12 @@ public function testDeploy()
137137
$this->assertFileExists($this->staticDir->getAbsolutePath('frontend/Magento/zoom3/default/css/root.css'));
138138
$this->assertFileExists($this->staticDir->getAbsolutePath('frontend/Magento/zoom3/default/css/local.css'));
139139

140+
$this->assertFileExistsIsGenerated('requirejs-config.js');
141+
$this->assertFileExistsIsGenerated('requirejs-map.js');
142+
$this->assertFileExistsIsGenerated('map.json');
143+
$this->assertFileExistsIsGenerated('js-translation.json');
144+
$this->assertFileExistsIsGenerated('result_map.json');
145+
140146
$actualFileContent = $this->staticDir->readFile('frontend/Magento/zoom3/default/css/root.css');
141147
$this->assertLessPreProcessor($actualFileContent);
142148
$this->assertCssUrlFixerPostProcessor($actualFileContent);
@@ -148,6 +154,25 @@ public function testDeploy()
148154
}
149155
}
150156

157+
/**
158+
* Assert file exists in all themes and locales
159+
*
160+
* @param string $fileName
161+
* @return void
162+
*/
163+
private function assertFileExistsIsGenerated($fileName)
164+
{
165+
foreach (['Magento/zoom1', 'Magento/zoom2', 'Magento/zoom3'] as $theme) {
166+
foreach ($this->options[Options::LANGUAGE] as $locale) {
167+
$this->assertFileExists(
168+
$this->staticDir->getAbsolutePath(
169+
'frontend/' . $theme . '/' . $locale . '/' . $fileName
170+
)
171+
);
172+
}
173+
}
174+
}
175+
151176
/**
152177
* Assert Less pre-processor
153178
*

0 commit comments

Comments
 (0)