From de3d69d2b7e34ad25b5b04b5a1d1afe01b9c912d Mon Sep 17 00:00:00 2001 From: Vito Albano Date: Thu, 7 Dec 2023 00:47:27 +0000 Subject: [PATCH] Rebase went little bit wrong -II --- .../search-date-range.component.spec.ts | 8 +++---- .../search-properties.component.ts | 4 ---- .../dropdown/dropdown-cloud.widget.scss | 5 ----- .../dropdown/dropdown-cloud.widget.spec.ts | 22 ++----------------- .../widgets/dropdown/dropdown.widget.scss | 5 ----- .../start-process.component.spec.ts | 9 ++------ 6 files changed, 8 insertions(+), 45 deletions(-) diff --git a/lib/content-services/src/lib/search/components/search-date-range-tabbed/search-date-range/search-date-range.component.spec.ts b/lib/content-services/src/lib/search/components/search-date-range-tabbed/search-date-range/search-date-range.component.spec.ts index a8f178c959c..d56988fac24 100644 --- a/lib/content-services/src/lib/search/components/search-date-range-tabbed/search-date-range/search-date-range.component.spec.ts +++ b/lib/content-services/src/lib/search/components/search-date-range-tabbed/search-date-range/search-date-range.component.spec.ts @@ -225,7 +225,7 @@ describe('SearchDateRangeComponent', () => { betweenStartDate: undefined, betweenEndDate: undefined }; - let dateRangeTypeRadioButton = getElementBySelector('[data-automation-id="date-range-advanced-in-last"] .mdc-radio__native-control'); + let dateRangeTypeRadioButton = getElementBySelector('[data-automation-id="date-range-in-last"] .mdc-radio__native-control'); dateRangeTypeRadioButton.click(); selectDropdownOption('date-range-in-last-option-weeks'); enterValueInInputFieldAndTriggerEvent('date-range-in-last-input', ''); @@ -246,7 +246,7 @@ describe('SearchDateRangeComponent', () => { betweenStartDate: '', betweenEndDate: '' }; - dateRangeTypeRadioButton = getElementBySelector('[data-automation-id="date-range-advanced-between"] .mdc-radio__native-control'); + dateRangeTypeRadioButton = getElementBySelector('[data-automation-id="date-range-between"] .mdc-radio__native-control'); dateRangeTypeRadioButton.click(); fixture.detectChanges(); expect(component.changed.emit).not.toHaveBeenCalledWith(value); @@ -261,7 +261,7 @@ describe('SearchDateRangeComponent', () => { betweenStartDate: null, betweenEndDate: null }; - let dateRangeTypeRadioButton = getElementBySelector('[data-automation-id="date-range-advanced-in-last"] .mdc-radio__native-control'); + let dateRangeTypeRadioButton = getElementBySelector('[data-automation-id="date-range-in-last"] .mdc-radio__native-control'); dateRangeTypeRadioButton.click(); selectDropdownOption('date-range-in-last-option-weeks'); enterValueInInputFieldAndTriggerEvent('date-range-in-last-input', '5'); @@ -283,7 +283,7 @@ describe('SearchDateRangeComponent', () => { betweenStartDate: startDateSampleValue, betweenEndDate: endDateSampleValue }; - dateRangeTypeRadioButton = getElementBySelector('[data-automation-id="date-range-advanced-between"] .mdc-radio__native-control'); + dateRangeTypeRadioButton = getElementBySelector('[data-automation-id="date-range-between"] .mdc-radio__native-control'); dateRangeTypeRadioButton.click(); component.betweenStartDateFormControl.setValue(startDateSampleValue); component.betweenEndDateFormControl.setValue(endDateSampleValue); diff --git a/lib/content-services/src/lib/search/components/search-properties/search-properties.component.ts b/lib/content-services/src/lib/search/components/search-properties/search-properties.component.ts index bb9fe0f98e3..67868e4dc1c 100644 --- a/lib/content-services/src/lib/search/components/search-properties/search-properties.component.ts +++ b/lib/content-services/src/lib/search/components/search-properties/search-properties.component.ts @@ -104,11 +104,7 @@ export class SearchPropertiesComponent implements OnInit, AfterViewChecked, Sear const extraFreeSpace = 20; this._fileSizeOperatorsMaxWidth = Math.max(...this._fileSizeOperators.map((operator) => this.getOperatorNameWidth(operator, this.getCanvasFont(this.fileSizeOperatorSelectElement.nativeElement)))) + -<<<<<<< Updated upstream - this.fileSizeOperatorSelectElement.nativeElement.querySelector('.mat-mdc-select-arrow').clientWidth + -======= this.fileSizeOperatorSelectElement.nativeElement.querySelector('.mat-mdc-select-arrow-wrapper').clientWidth + ->>>>>>> Stashed changes extraFreeSpace; }); } diff --git a/lib/process-services-cloud/src/lib/form/components/widgets/dropdown/dropdown-cloud.widget.scss b/lib/process-services-cloud/src/lib/form/components/widgets/dropdown/dropdown-cloud.widget.scss index e367c5fd6e6..6df938fc4e8 100644 --- a/lib/process-services-cloud/src/lib/form/components/widgets/dropdown/dropdown-cloud.widget.scss +++ b/lib/process-services-cloud/src/lib/form/components/widgets/dropdown/dropdown-cloud.widget.scss @@ -8,12 +8,7 @@ width: 100%; } -<<<<<<< Updated upstream - /* TODO(mdc-migration): The following rule targets internal classes of select that may no longer apply for the MDC version. */ - .mat-select-value-text { -======= .mat-mdc-select-value-text { ->>>>>>> Stashed changes font-size: var(--theme-body-1-font-size); } diff --git a/lib/process-services-cloud/src/lib/form/components/widgets/dropdown/dropdown-cloud.widget.spec.ts b/lib/process-services-cloud/src/lib/form/components/widgets/dropdown/dropdown-cloud.widget.spec.ts index 5459e3b834f..19e062bde4c 100644 --- a/lib/process-services-cloud/src/lib/form/components/widgets/dropdown/dropdown-cloud.widget.spec.ts +++ b/lib/process-services-cloud/src/lib/form/components/widgets/dropdown/dropdown-cloud.widget.spec.ts @@ -203,13 +203,8 @@ describe('DropdownCloudWidgetComponent', () => { await openSelect(); -<<<<<<< Updated upstream - const options = fixture.debugElement.queryAll(By.css('.mat-mdc-option')); - expect(options[0].nativeElement.innerText).toBe('default1_value'); -======= const option = fixture.debugElement.query(By.css('.mdc-list-item__primary-text')); expect(option.nativeElement.innerText).toBe('default1_value'); ->>>>>>> Stashed changes }); it('should preselect dropdown widget value when String (defined value) passed ', async () => { @@ -232,11 +227,7 @@ describe('DropdownCloudWidgetComponent', () => { fixture.detectChanges(); await openSelect(); -<<<<<<< Updated upstream - const options = fixture.debugElement.queryAll(By.css('.mat-mdc-option')); -======= const options = fixture.debugElement.queryAll(By.css('.mdc-list-item__primary-text')); ->>>>>>> Stashed changes expect(options[0].nativeElement.innerText).toBe('default1_value'); expect(widget.field.form.values['dropdown-id']).toEqual({ id: 'opt1', name: 'default1_value' }); }); @@ -460,12 +451,7 @@ describe('DropdownCloudWidgetComponent', () => { expect(selectedPlaceHolder.nativeElement.getInnerHTML()).toEqual('option_1, option_2'); await openSelect('#dropdown-id'); - -<<<<<<< Updated upstream - const options = fixture.debugElement.queryAll(By.css('mat-option.mdc-list-item--selected span')); -======= - const options = fixture.debugElement.queryAll(By.css('.mat-mdc-selected span')); ->>>>>>> Stashed changes + const options = fixture.debugElement.queryAll(By.css('.mdc-list-item--selected span')); expect(Array.from(options).map(({ nativeElement }) => nativeElement.getInnerHTML().trim())) .toEqual(['option_1', 'option_2']); }); @@ -533,12 +519,8 @@ describe('DropdownCloudWidgetComponent', () => { expect(selectedPlaceHolder.nativeElement.getInnerHTML()).toEqual('option_3, option_4'); await openSelect('#dropdown-id'); + const options = fixture.debugElement.queryAll(By.css('.mdc-list-item--selected span')); -<<<<<<< Updated upstream - const options = fixture.debugElement.queryAll(By.css('mat-option.mdc-list-item--selected span')); -======= - const options = fixture.debugElement.queryAll(By.css('.mat-mdc-selected span')); ->>>>>>> Stashed changes expect(Array.from(options).map(({ nativeElement }) => nativeElement.getInnerHTML().trim())) .toEqual(['option_3', 'option_4']); }); diff --git a/lib/process-services/src/lib/form/widgets/dropdown/dropdown.widget.scss b/lib/process-services/src/lib/form/widgets/dropdown/dropdown.widget.scss index 05c2243465e..87ad3c0c192 100644 --- a/lib/process-services/src/lib/form/widgets/dropdown/dropdown.widget.scss +++ b/lib/process-services/src/lib/form/widgets/dropdown/dropdown.widget.scss @@ -6,13 +6,8 @@ padding-top: 0 !important; width: 100%; } -<<<<<<< Updated upstream - /* TODO(mdc-migration): The following rule targets internal classes of select that may no longer apply for the MDC version. */ - .mat-select-value-text { -======= .mat-mdc-select-value-text { ->>>>>>> Stashed changes font-size: var(--theme-body-1-font-size); } diff --git a/lib/process-services/src/lib/process-list/components/start-process.component.spec.ts b/lib/process-services/src/lib/process-list/components/start-process.component.spec.ts index e0861f248d0..dfd057287c5 100644 --- a/lib/process-services/src/lib/process-list/components/start-process.component.spec.ts +++ b/lib/process-services/src/lib/process-list/components/start-process.component.spec.ts @@ -339,16 +339,11 @@ describe('StartProcessComponent', () => { selectElement.click(); fixture.detectChanges(); -<<<<<<< Updated upstream - fixture.componentInstance.inputAutocomplete.openPanel(); fixture.detectChanges(); - // await fixture.whenStable(); - const options: any = fixture.debugElement.queryAll(By.css('.mdc-list-item__primary-textk')); -======= await fixture.whenStable(); - const options: any = fixture.debugElement.queryAll(By.css('.mdc-list-item__primary-text')); ->>>>>>> Stashed changes + const options: any = fixture.debugElement.queryAll(By.css('.mdc-list-item__primary-textk')); + expect(options.length).toBe(2); expect(options[0].nativeElement.innerText).toBe('My Process 1');