mirror of
https://github.com/Alfresco/alfresco-ng2-components.git
synced 2026-09-09 18:03:21 +00:00
[ACS-11406] Refactored UnitTestingUtils to use inner scoped utility classes (#12052)
* [ACS-11406] Refactored UnitTestingUtils * [ACS-11406] update affected unit tests * empty [ci:force] * [ACS-11406] fix process-services-cloud tests [ci:force] * [ACS-11406] cr fixes [ci:force]
This commit is contained in:
+6
-6
@@ -470,7 +470,7 @@ describe('DateCloudWidgetComponent', () => {
|
||||
|
||||
it('should be able to display label with asterisk', async () => {
|
||||
fixture.detectChanges();
|
||||
const formField = await testingUtils.getMatFormField();
|
||||
const formField = await testingUtils.formField.get();
|
||||
const formControl = await formField.getControl();
|
||||
|
||||
expect(formControl.isRequired).toBeTruthy();
|
||||
@@ -557,7 +557,7 @@ describe('DateCloudWidgetComponent', () => {
|
||||
fixture.detectChanges();
|
||||
await fixture.whenStable();
|
||||
|
||||
await testingUtils.fillMatInput('25-03-2025');
|
||||
await testingUtils.input.fill('25-03-2025');
|
||||
|
||||
expect(field.value).toEqual(jasmine.any(Date));
|
||||
expect(field.value.getFullYear()).toBe(2025);
|
||||
@@ -578,7 +578,7 @@ describe('DateCloudWidgetComponent', () => {
|
||||
fixture.detectChanges();
|
||||
await fixture.whenStable();
|
||||
|
||||
await testingUtils.fillMatInput('03-25-2025');
|
||||
await testingUtils.input.fill('03-25-2025');
|
||||
|
||||
expect(field.value).toEqual(jasmine.any(Date));
|
||||
expect(field.value.getFullYear()).toBe(2025);
|
||||
@@ -599,7 +599,7 @@ describe('DateCloudWidgetComponent', () => {
|
||||
fixture.detectChanges();
|
||||
await fixture.whenStable();
|
||||
|
||||
await testingUtils.fillMatInput('03/25/2025');
|
||||
await testingUtils.input.fill('03/25/2025');
|
||||
|
||||
expect(widget.dateInputControl.invalid).toBeTrue();
|
||||
expect(field.isValid).toBeFalse();
|
||||
@@ -620,12 +620,12 @@ describe('DateCloudWidgetComponent', () => {
|
||||
fixture.detectChanges();
|
||||
await fixture.whenStable();
|
||||
|
||||
await testingUtils.fillMatInput('invalid-text');
|
||||
await testingUtils.input.fill('invalid-text');
|
||||
|
||||
expect(widget.dateInputControl.invalid).toBeTrue();
|
||||
expect(field.isValid).toBeFalse();
|
||||
|
||||
await testingUtils.fillMatInput('');
|
||||
await testingUtils.input.fill('');
|
||||
|
||||
expect(widget.dateInputControl.valid).toBeTrue();
|
||||
expect(field.isValid).toBeTrue();
|
||||
|
||||
+1
-1
@@ -148,7 +148,7 @@ describe('DisplayExternalPropertyWidgetComponent', () => {
|
||||
});
|
||||
|
||||
it('should be able to display label with asterisk', async () => {
|
||||
const formField = await testingUtils.getMatFormField();
|
||||
const formField = await testingUtils.formField.get();
|
||||
const formControl = await formField.getControl();
|
||||
|
||||
expect(formControl.isRequired).toBeTruthy();
|
||||
|
||||
Reference in New Issue
Block a user