Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 5 additions & 9 deletions tests/legacy-cli/e2e/tests/build/material.ts
Original file line number Diff line number Diff line change
Expand Up @@ -55,9 +55,9 @@ export default async function () {
// Issue: https://github.com/angular/angular-cli/issues/17320
await replaceInFile(
'src/app/app.config.ts',
`import { ApplicationConfig } from '@angular/core';`,
`from '@angular/core';`,
`
import { ApplicationConfig } from '@angular/core';
from '@angular/core';
import {
MomentDateAdapter,
MAT_MOMENT_DATE_FORMATS
Expand All @@ -72,10 +72,8 @@ export default async function () {

await replaceInFile(
'src/app/app.config.ts',
`providers: [provideRouter(routes) ]`,
`
providers: [
provideRouter(routes),
`provideRouter(routes)`,
`provideRouter(routes),
{
provide: DateAdapter,
useClass: MomentDateAdapter,
Expand All @@ -84,9 +82,7 @@ export default async function () {
{
provide: MAT_DATE_FORMATS,
useValue: MAT_MOMENT_DATE_FORMATS
}
]
`,
}`,
);

await ng('e2e', '--configuration=production');
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ export default async function () {
await writeMultipleFiles({
// Add http client and route
'src/app/app.config.ts': `
import { ApplicationConfig } from '@angular/core';
import { ApplicationConfig, provideZoneChangeDetection } from '@angular/core';
import { provideRouter } from '@angular/router';

import {Home} from './home/home';
Expand All @@ -35,6 +35,7 @@ export default async function () {
}]),
provideClientHydration(),
provideHttpClient(withFetch()),
provideZoneChangeDetection({ eventCoalescing: true }),
],
};
`,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ export default async function () {
`,
// Add http client and route
'src/app/app.config.ts': `
import { ApplicationConfig } from '@angular/core';
import { ApplicationConfig, provideZoneChangeDetection } from '@angular/core';
import { provideRouter } from '@angular/router';

import { Home } from './home/home';
Expand All @@ -71,6 +71,7 @@ export default async function () {
}]),
provideClientHydration(),
provideHttpClient(withFetch()),
provideZoneChangeDetection({ eventCoalescing: true }),
],
};
`,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ export default async function () {
await writeMultipleFiles({
// Add http client and route
'src/app/app.config.ts': `
import { ApplicationConfig } from '@angular/core';
import { ApplicationConfig, provideZoneChangeDetection } from '@angular/core';
import { provideRouter } from '@angular/router';

import { Home } from './home/home';
Expand All @@ -39,6 +39,7 @@ export default async function () {
}]),
provideClientHydration(),
provideHttpClient(withFetch()),
provideZoneChangeDetection({ eventCoalescing: true }),
],
};
`,
Expand Down