Fixing e2e - part III

This commit is contained in:
Vito Albano
2023-12-06 23:56:41 +00:00
parent c35f350550
commit 10d6a7a4b5
24 changed files with 89 additions and 21 deletions

View File

@@ -8,8 +8,12 @@
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);
}

View File

@@ -203,8 +203,13 @@ 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 () => {
@@ -227,7 +232,11 @@ 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' });
});
@@ -452,7 +461,11 @@ describe('DropdownCloudWidgetComponent', () => {
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
expect(Array.from(options).map(({ nativeElement }) => nativeElement.getInnerHTML().trim()))
.toEqual(['option_1', 'option_2']);
});
@@ -521,7 +534,11 @@ describe('DropdownCloudWidgetComponent', () => {
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
expect(Array.from(options).map(({ nativeElement }) => nativeElement.getInnerHTML().trim()))
.toEqual(['option_3', 'option_4']);
});