@@ -14,27 +14,21 @@ export default async function() {
14
14
config . angularCompilerOptions . disableTypeScriptVersionCheck = true ;
15
15
} ) ;
16
16
17
- // TODO: re-enable all locales once localeData support is added.
18
- const tempLangTranslations = langTranslations . filter ( l => l . lang == 'fr' ) ;
19
-
20
17
// Build each locale and verify the output.
21
- // NOTE: this should not fail in general, but multi-locale translation is currently disabled.
22
- // TODO: remove expectToFail once localeData support is added.
23
- await expectToFail ( ( ) => ng ( 'build' , '--localize' , 'true' ) ) ;
24
18
await ng ( 'build' ) ;
25
- for ( const { lang, outputPath, translation } of tempLangTranslations ) {
19
+ for ( const { lang, outputPath, translation } of langTranslations ) {
26
20
await expectFileToMatch ( `${ outputPath } /main-es5.js` , translation . helloPartial ) ;
27
21
await expectFileToMatch ( `${ outputPath } /main-es2015.js` , translation . helloPartial ) ;
28
22
await expectToFail ( ( ) => expectFileToMatch ( `${ outputPath } /main-es5.js` , '$localize`' ) ) ;
29
23
await expectToFail ( ( ) => expectFileToMatch ( `${ outputPath } /main-es2015.js` , '$localize`' ) ) ;
30
24
31
25
// Verify the locale ID is present
32
- await expectFileToMatch ( `${ outputPath } /main -es5.js` , lang ) ;
33
- await expectFileToMatch ( `${ outputPath } /main -es2015.js` , lang ) ;
26
+ await expectFileToMatch ( `${ outputPath } /vendor -es5.js` , lang ) ;
27
+ await expectFileToMatch ( `${ outputPath } /vendor -es2015.js` , lang ) ;
34
28
35
29
// Verify the locale data is registered using the global files
36
- await expectFileToMatch ( `${ outputPath } /main -es5.js` , '.ng.common.locales' ) ;
37
- await expectFileToMatch ( `${ outputPath } /main -es2015.js` , '.ng.common.locales' ) ;
30
+ await expectFileToMatch ( `${ outputPath } /vendor -es5.js` , '.ng.common.locales' ) ;
31
+ await expectFileToMatch ( `${ outputPath } /vendor -es2015.js` , '.ng.common.locales' ) ;
38
32
39
33
// Execute Application E2E tests with dev server
40
34
await ng ( 'e2e' , `--configuration=${ lang } ` , '--port=0' ) ;
@@ -60,7 +54,11 @@ export default async function() {
60
54
await expectFileToMatch ( `${ baseDir } /fr/main-es2015.js` , / O t h e r c o n t e n t / ) ;
61
55
await expectToFail ( ( ) => ng ( 'build' ) ) ;
62
56
try {
63
- await execAndWaitForOutputToMatch ( 'ng' , [ 'serve' , '--port=0' ] , / N o t r a n s l a t i o n f o u n d f o r / ) ;
57
+ await execAndWaitForOutputToMatch (
58
+ 'ng' ,
59
+ [ 'serve' , '--configuration=fr' , '--port=0' ] ,
60
+ / N o t r a n s l a t i o n f o u n d f o r / ,
61
+ ) ;
64
62
} finally {
65
63
killAllProcesses ( ) ;
66
64
}
0 commit comments