Skip to content

Commit

Permalink
[AAE-22098] Update AlfrescoApiService imports (#4015)
Browse files Browse the repository at this point in the history
* [AAE-22098] Update AlfrescoApiService imports

* [link-adf:dev-eromano-AAE-12502] Link ADF

* [link-adf:dev-eromano-AAE-12502] Link ADF

* [AAE-22098] Use proper ADF version

* fix tests

* fix tests v2

* fix yet another BC

* Use latest ADF

* use published ADF

---------

Co-authored-by: Bartosz Sekula <Bartosz.Sekula@hyland.com>
  • Loading branch information
MichalKinas and BSekula authored Sep 6, 2024
1 parent 3a2d870 commit 796a3c7
Show file tree
Hide file tree
Showing 50 changed files with 254 additions and 111 deletions.
2 changes: 1 addition & 1 deletion docs/tutorials/file-lists.md
Original file line number Diff line number Diff line change
Expand Up @@ -106,7 +106,7 @@ As first step we can create our custom component in our extension:
```typescript
import { NameColumnComponent } from '@alfresco/adf-content-services';
import { Component, ChangeDetectionStrategy, ViewEncapsulation, ElementRef, OnInit, OnDestroy } from '@angular/core';
import { AlfrescoApiService } from '@alfresco/adf-core';
import { AlfrescoApiService } from '@alfresco/adf-content-services';

@Component({
selector: 'custom-template-column',
Expand Down
11 changes: 11 additions & 0 deletions migrations.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
{
"migrations": [
{
"description": "Update alfresco-api imports",
"version": "6.10.0-10366268804",
"factory": "./7_0_0/index#updateAlfrescoApiImports",
"package": "@alfresco/adf-core",
"name": "move-out-alfresco-api"
}
]
}
152 changes: 121 additions & 31 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

12 changes: 6 additions & 6 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -30,11 +30,11 @@
},
"private": true,
"dependencies": {
"@alfresco/adf-content-services": "7.0.0-alpha.2-10705302287",
"@alfresco/adf-core": "7.0.0-alpha.2-10705302287",
"@alfresco/adf-extensions": "7.0.0-alpha.2-10705302287",
"@alfresco/eslint-plugin-eslint-angular": "7.0.0-alpha.2-10705302287",
"@alfresco/js-api": "8.0.0-alpha.2-10705302287",
"@alfresco/adf-content-services": "7.0.0-alpha.2-10742047850",
"@alfresco/adf-core": "7.0.0-alpha.2-10742047850",
"@alfresco/adf-extensions": "7.0.0-alpha.2-10742047850",
"@alfresco/eslint-plugin-eslint-angular": "7.0.0-alpha.2-10742047850",
"@alfresco/js-api": "8.0.0-alpha.2-10742047850",
"@angular/animations": "15.2.10",
"@angular/cdk": "15.2.9",
"@angular/common": "15.2.10",
Expand Down Expand Up @@ -62,7 +62,7 @@
"zone.js": "0.11.8"
},
"devDependencies": {
"@alfresco/adf-cli": "7.0.0-alpha.2-10705302287",
"@alfresco/adf-cli": "7.0.0-alpha.2-10742047850",
"@angular-devkit/build-angular": "15.2.10",
"@angular-devkit/core": "15.2.10",
"@angular-devkit/schematics": "15.2.10",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,7 @@ import { HarnessLoader } from '@angular/cdk/testing';
import { TestbedHarnessEnvironment } from '@angular/cdk/testing/testbed';
import { MatProgressBarHarness } from '@angular/material/progress-bar/testing';
import { MatSlideToggleHarness } from '@angular/material/slide-toggle/testing';
import { AlfrescoApiService, AlfrescoApiServiceMock } from '@alfresco/adf-content-services';

describe('ManageRulesSmartComponent', () => {
let fixture: ComponentFixture<ManageRulesSmartComponent>;
Expand All @@ -71,6 +72,7 @@ describe('ManageRulesSmartComponent', () => {
toggleAppNavBar$: new Subject()
}
},
{ provide: AlfrescoApiService, useClass: AlfrescoApiServiceMock },
{ provide: Store, useValue: { dispatch: () => {} } },
{ provide: ActivatedRoute, useValue: { params: of({ nodeId: owningFolderIdMock }) } }
]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@ import { RuleActionListUiComponent } from './rule-action-list.ui-component';
import { By } from '@angular/platform-browser';
import { DebugElement } from '@angular/core';
import { RuleActionUiComponent } from './rule-action.ui-component';
import { AlfrescoApiService, AlfrescoApiServiceMock } from '@alfresco/adf-content-services';

describe('RuleActionListUiComponent', () => {
let fixture: ComponentFixture<RuleActionListUiComponent>;
Expand All @@ -38,7 +39,8 @@ describe('RuleActionListUiComponent', () => {

beforeEach(() => {
TestBed.configureTestingModule({
imports: [CoreTestingModule]
imports: [CoreTestingModule],
providers: [{ provide: AlfrescoApiService, useClass: AlfrescoApiServiceMock }]
});

fixture = TestBed.createComponent(RuleActionListUiComponent);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ import {
import { By } from '@angular/platform-browser';
import { dummyCategoriesConstraints, dummyConstraints, dummyTagsConstraints } from '../../mock/action-parameter-constraints.mock';
import { securityMarksResponseMock, updateNotificationMock } from '../../mock/security-marks.mock';
import { CategoryService, NodeAction, TagService } from '@alfresco/adf-content-services';
import { AlfrescoApiService, AlfrescoApiServiceMock, CategoryService, NodeAction, TagService } from '@alfresco/adf-content-services';
import { MatDialog, MatDialogRef } from '@angular/material/dialog';
import { HarnessLoader } from '@angular/cdk/testing';
import { TestbedHarnessEnvironment } from '@angular/cdk/testing/testbed';
Expand Down Expand Up @@ -63,7 +63,8 @@ describe('RuleActionUiComponent', () => {

beforeEach(() => {
TestBed.configureTestingModule({
imports: [CoreTestingModule, RuleActionUiComponent]
imports: [CoreTestingModule, RuleActionUiComponent],
providers: [{ provide: AlfrescoApiService, useClass: AlfrescoApiServiceMock }]
});

fixture = TestBed.createComponent(RuleActionUiComponent);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -33,13 +33,15 @@ import {
compositeConditionWithThreeConditionMock
} from '../../mock/conditions.mock';
import { RuleSimpleConditionUiComponent } from './rule-simple-condition.ui-component';
import { AlfrescoApiService, AlfrescoApiServiceMock } from '@alfresco/adf-content-services';

describe('RuleCompositeConditionUiComponent', () => {
let fixture: ComponentFixture<RuleCompositeConditionUiComponent>;

beforeEach(() => {
TestBed.configureTestingModule({
imports: [CoreTestingModule, RuleCompositeConditionUiComponent, RuleSimpleConditionUiComponent]
imports: [CoreTestingModule, RuleCompositeConditionUiComponent, RuleSimpleConditionUiComponent],
providers: [{ provide: AlfrescoApiService, useClass: AlfrescoApiServiceMock }]
});

fixture = TestBed.createComponent(RuleCompositeConditionUiComponent);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ import { CoreTestingModule } from '@alfresco/adf-core';
import { By } from '@angular/platform-browser';
import { DebugElement } from '@angular/core';
import { tagMock, mimeTypeMock, simpleConditionUnknownFieldMock, categoriesListMock } from '../../mock/conditions.mock';
import { CategoryService, TagService } from '@alfresco/adf-content-services';
import { AlfrescoApiService, AlfrescoApiServiceMock, CategoryService, TagService } from '@alfresco/adf-content-services';
import { of } from 'rxjs';
import { RuleSimpleCondition } from '../../model/rule-simple-condition.model';
import { delay } from 'rxjs/operators';
Expand Down Expand Up @@ -83,7 +83,8 @@ describe('RuleSimpleConditionUiComponent', () => {

beforeEach(() => {
TestBed.configureTestingModule({
imports: [CoreTestingModule, RuleSimpleConditionUiComponent]
imports: [CoreTestingModule, RuleSimpleConditionUiComponent],
providers: [{ provide: AlfrescoApiService, useClass: AlfrescoApiServiceMock }]
});

fixture = TestBed.createComponent(RuleSimpleConditionUiComponent);
Expand Down
Loading

0 comments on commit 796a3c7

Please sign in to comment.