[affected:*][ci:force] Fixing e2e - the eternal fail

This commit is contained in:
Vito Albano
2024-03-15 09:41:43 +00:00
parent 21b39c9710
commit 8e30dc9804
2 changed files with 2 additions and 2 deletions

View File

@@ -116,7 +116,7 @@ describe('Form Field Component - Dropdown Widget', () => {
await taskFormCloudComponent.formFields().checkFormIsDisplayed();
await taskFormCloudComponent.formFields().checkWidgetIsVisible('DropdownMultiselect');
await expect(optionsSelected.toString().replace(/\s+/g, '')).toEqual([optionsToSelect, optionsToSelect].toString());
await expect(optionsSelected.toString().replace(/\s+/g, '')).toEqual([optionsToSelect].toString());
});
it('[C309878] Should be able to select a dropdown option, save and complete the task form', async () => {

View File

@@ -27,7 +27,7 @@ export class DropdownWidgetPage {
readonly searchElementLocator = TestElement.byCss('[aria-label="Search options"]');
async getSelectedOptionText(fieldId: string = 'dropdown'): Promise<string> {
return this.formFields.getFieldText(fieldId, by.css(`${materialLocators.Select.root}[id="${fieldId}"] ${materialLocators.Select.minLine}`));
return this.formFields.getFieldText(fieldId, by.css(`${materialLocators.Select.root}[id="${fieldId}"] ${materialLocators.Select.value.text} span`));
}
async selectOption(option: string, locator: string = '#dropdown'): Promise<void> {