mirror of
https://github.com/Alfresco/alfresco-ng2-components.git
synced 2026-09-09 18:03:21 +00:00
[ACS-11153] remove the usage of ng reflect from the unit tests (#11666)
* [ACS-11153] Removed usages of ng reflect from card view dateitem and diagram activities * [ACS-11153] Removed usages of ng-reflect * [ACS-11153] Added eslint rule
This commit is contained in:
+1
-1
@@ -34,7 +34,7 @@
|
||||
}
|
||||
|
||||
@for(opt of (list$ | async); track opt.id) {
|
||||
<mat-option [value]="opt" [id]="opt.id">
|
||||
<mat-option [value]="opt" [id]="opt.id" [attr.data-automation-id]="'adf-dropdown-widget-option-' + opt.id">
|
||||
{{opt.name}}
|
||||
</mat-option>
|
||||
}
|
||||
|
||||
+3
-1
@@ -1417,6 +1417,7 @@ describe('DropdownCloudWidgetComponent instantiated by FormFieldComponent wrappe
|
||||
let formFieldComponent: FormFieldComponent;
|
||||
let loader: HarnessLoader;
|
||||
let formRenderingService: FormRenderingService;
|
||||
let unitTestingUtils: UnitTestingUtils;
|
||||
|
||||
beforeEach(() => {
|
||||
TestBed.configureTestingModule({
|
||||
@@ -1425,6 +1426,7 @@ describe('DropdownCloudWidgetComponent instantiated by FormFieldComponent wrappe
|
||||
|
||||
formFieldFixture = TestBed.createComponent(FormFieldComponent);
|
||||
formFieldComponent = formFieldFixture.componentInstance;
|
||||
unitTestingUtils = new UnitTestingUtils(formFieldFixture.debugElement);
|
||||
|
||||
loader = TestbedHarnessEnvironment.loader(formFieldFixture);
|
||||
|
||||
@@ -1464,7 +1466,7 @@ describe('DropdownCloudWidgetComponent instantiated by FormFieldComponent wrappe
|
||||
|
||||
// Not using dropdown.clickOptions from harness since it need ot be awaited
|
||||
// I want to simulate other events at the same time
|
||||
const option1 = formFieldFixture.debugElement.query(By.css('[ng-reflect-id="option1"]'));
|
||||
const option1 = unitTestingUtils.getByDataAutomationId('adf-dropdown-widget-option-option1');
|
||||
option1.triggerEventHandler('click');
|
||||
dropdownCloudWidgetInstanceComponent.event(new Event('focusout'));
|
||||
|
||||
|
||||
Reference in New Issue
Block a user