mirror of
https://github.com/Alfresco/alfresco-content-app.git
synced 2026-09-16 18:12:50 +00:00
[ACS-12441] fix unit test with provideZoneChangeDetection()
This commit is contained in:
+2
-2
@@ -27,7 +27,7 @@
|
|||||||
import 'zone.js';
|
import 'zone.js';
|
||||||
import 'zone.js/testing';
|
import 'zone.js/testing';
|
||||||
import { getTestBed } from '@angular/core/testing';
|
import { getTestBed } from '@angular/core/testing';
|
||||||
import { BrowserDynamicTestingModule, platformBrowserDynamicTesting } from '@angular/platform-browser-dynamic/testing';
|
import { BrowserTestingModule, platformBrowserTesting } from '@angular/platform-browser/testing';
|
||||||
|
|
||||||
// First, initialize the Angular testing environment.
|
// First, initialize the Angular testing environment.
|
||||||
getTestBed().initTestEnvironment(BrowserDynamicTestingModule, platformBrowserDynamicTesting());
|
getTestBed().initTestEnvironment(BrowserTestingModule, platformBrowserTesting());
|
||||||
|
|||||||
@@ -1,8 +1,7 @@
|
|||||||
{
|
{
|
||||||
"extends": "../tsconfig.adf.json",
|
"extends": "../tsconfig.adf.json",
|
||||||
"compilerOptions": {
|
"compilerOptions": {
|
||||||
"outDir": "../out-tsc/spec",
|
"outDir": "../out-tsc/spec"
|
||||||
"module": "commonjs"
|
|
||||||
},
|
},
|
||||||
"files": [
|
"files": [
|
||||||
"src/test.ts",
|
"src/test.ts",
|
||||||
|
|||||||
@@ -22,7 +22,7 @@
|
|||||||
* from Hyland Software. If not, see <http://www.gnu.org/licenses/>.
|
* from Hyland Software. If not, see <http://www.gnu.org/licenses/>.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
import { NgModule } from '@angular/core';
|
import { NgModule, provideZoneChangeDetection } from '@angular/core';
|
||||||
import { provideNoopAnimations } from '@angular/platform-browser/animations';
|
import { provideNoopAnimations } from '@angular/platform-browser/animations';
|
||||||
import { NoopTranslateModule, PageTitleService, provideCoreAuthTesting } from '@alfresco/adf-core';
|
import { NoopTranslateModule, PageTitleService, provideCoreAuthTesting } from '@alfresco/adf-core';
|
||||||
import { AlfrescoApiService, AlfrescoApiServiceMock, DiscoveryApiService, SearchQueryBuilderService } from '@alfresco/adf-content-services';
|
import { AlfrescoApiService, AlfrescoApiServiceMock, DiscoveryApiService, SearchQueryBuilderService } from '@alfresco/adf-content-services';
|
||||||
@@ -42,6 +42,7 @@ import { provideRouter } from '@angular/router';
|
|||||||
imports: [NoopTranslateModule, MatSnackBarModule, MatDialogModule, MatIconTestingModule],
|
imports: [NoopTranslateModule, MatSnackBarModule, MatDialogModule, MatIconTestingModule],
|
||||||
providers: [
|
providers: [
|
||||||
provideNoopAnimations(),
|
provideNoopAnimations(),
|
||||||
|
provideZoneChangeDetection(),
|
||||||
provideRouter([]),
|
provideRouter([]),
|
||||||
provideStore(
|
provideStore(
|
||||||
{ app: appReducer },
|
{ app: appReducer },
|
||||||
|
|||||||
@@ -26,10 +26,15 @@
|
|||||||
|
|
||||||
import 'zone.js';
|
import 'zone.js';
|
||||||
import 'zone.js/testing';
|
import 'zone.js/testing';
|
||||||
import { getTestBed } from '@angular/core/testing';
|
import { getTestBed, TestBed } from '@angular/core/testing';
|
||||||
import { BrowserDynamicTestingModule, platformBrowserDynamicTesting } from '@angular/platform-browser-dynamic/testing';
|
import { BrowserTestingModule, platformBrowserTesting } from '@angular/platform-browser/testing';
|
||||||
|
import { provideZoneChangeDetection } from '@angular/core';
|
||||||
|
|
||||||
// First, initialize the Angular testing environment.
|
// First, initialize the Angular testing environment.
|
||||||
getTestBed().initTestEnvironment(BrowserDynamicTestingModule, platformBrowserDynamicTesting(), {
|
getTestBed().initTestEnvironment(BrowserTestingModule, platformBrowserTesting(), {
|
||||||
teardown: { destroyAfterEach: false }
|
teardown: { destroyAfterEach: false }
|
||||||
});
|
});
|
||||||
|
|
||||||
|
beforeEach(() => {
|
||||||
|
TestBed.configureTestingModule({ providers: [provideZoneChangeDetection()] });
|
||||||
|
});
|
||||||
|
|||||||
@@ -27,7 +27,7 @@
|
|||||||
import 'zone.js';
|
import 'zone.js';
|
||||||
import 'zone.js/testing';
|
import 'zone.js/testing';
|
||||||
import { getTestBed } from '@angular/core/testing';
|
import { getTestBed } from '@angular/core/testing';
|
||||||
import { BrowserDynamicTestingModule, platformBrowserDynamicTesting } from '@angular/platform-browser-dynamic/testing';
|
import { BrowserTestingModule, platformBrowserTesting } from '@angular/platform-browser/testing';
|
||||||
|
|
||||||
// First, initialize the Angular testing environment.
|
// First, initialize the Angular testing environment.
|
||||||
getTestBed().initTestEnvironment(BrowserDynamicTestingModule, platformBrowserDynamicTesting());
|
getTestBed().initTestEnvironment(BrowserTestingModule, platformBrowserTesting());
|
||||||
|
|||||||
@@ -27,9 +27,9 @@
|
|||||||
import 'zone.js';
|
import 'zone.js';
|
||||||
import 'zone.js/testing';
|
import 'zone.js/testing';
|
||||||
import { getTestBed } from '@angular/core/testing';
|
import { getTestBed } from '@angular/core/testing';
|
||||||
import { BrowserDynamicTestingModule, platformBrowserDynamicTesting } from '@angular/platform-browser-dynamic/testing';
|
import { BrowserTestingModule, platformBrowserTesting } from '@angular/platform-browser/testing';
|
||||||
|
|
||||||
// First, initialize the Angular testing environment.
|
// First, initialize the Angular testing environment.
|
||||||
getTestBed().initTestEnvironment(BrowserDynamicTestingModule, platformBrowserDynamicTesting(), {
|
getTestBed().initTestEnvironment(BrowserTestingModule, platformBrowserTesting(), {
|
||||||
teardown: { destroyAfterEach: false }
|
teardown: { destroyAfterEach: false }
|
||||||
});
|
});
|
||||||
|
|||||||
Reference in New Issue
Block a user