fixed unit test problem and some other e2e

This commit is contained in:
Vito Albano
2023-12-20 12:12:39 +00:00
parent 55c3f106ef
commit 2eb17d521b
7 changed files with 14 additions and 8 deletions

View File

@@ -22,7 +22,7 @@ import { $$, $ } from 'protractor';
export class CheckboxWidgetPage {
formFields = new FormFields();
checkboxLabel = $('span[class*="mat-checkbox-label"]');
checkboxLabel = $('mat-checkbox label');
checkboxLocator = ('mat-checkbox');
getCheckboxLabel(): Promise<string> {
@@ -30,7 +30,7 @@ export class CheckboxWidgetPage {
}
async clickCheckboxInput(fieldId: string): Promise<void> {
const checkboxInput = $$(`mat-checkbox[id="${fieldId}"] span`).first();
const checkboxInput = $$(`mat-checkbox[id="${fieldId}"] input`).first();
await BrowserActions.click(checkboxInput);
}
@@ -45,6 +45,6 @@ export class CheckboxWidgetPage {
async isCheckboxChecked(fieldId: string): Promise<boolean> {
const checkboxWidget = await (await this.formFields.getWidget(fieldId)).$(this.checkboxLocator);
const attributeValue = await BrowserActions.getAttribute(checkboxWidget, 'class');
return attributeValue.includes('mat-checkbox-checked');
return attributeValue.includes('mat-mdc-checkbox-checked');
}
}

View File

@@ -25,7 +25,7 @@ export class DynamicTableWidgetPage {
labelLocator: Locator = by.css('dynamic-table-widget div div');
columnNameLocator: Locator = by.css('table[id*="dynamic-table"] th');
cancelButton = element(by.cssContainingText('button span', 'Cancel'));
editButton = element(by.cssContainingText('button span', 'edit'));
editButton = element(by.css('[data-automation-id="dynamic-table-button-edit"]'));
columnDateTime = $('#columnDateTime');
columnDate = $('#columnDate');
calendarHeader = $('.mat-datetimepicker-calendar-header-date-time');

View File

@@ -24,7 +24,7 @@ export class GroupWidgetPage {
groupField = $('input[data-automation-id="adf-group-search-input"]');
firstResult = $('#adf-group-widget-user-0');
formFields = new FormFields();
groupDropDownList: Locator = by.css('.mat-autocomplete-panel');
groupDropDownList: Locator = by.css('.mat-mdc-autocomplete-panel');
getFieldLabel(fieldId: string): Promise<string> {
return this.formFields.getFieldLabel(fieldId);

View File

@@ -23,7 +23,7 @@ export class TypeaheadWidgetPage {
field = $('input[data-automation-id="adf-typeahed-search-input"]');
firstResult = $('#adf-typeahed-widget-user-0');
groupDropDownList = $('.mat-autocomplete-panel');
groupDropDownList = $('.mat-mdc-autocomplete-panel');
formFields = new FormFields();
getFieldLabel(fieldId: string): Promise<string> {