mirror of
https://github.com/Alfresco/alfresco-ng2-components.git
synced 2025-07-31 17:38:48 +00:00
AAE-19551 e2e material locators refactor (#9403)
* AAE-19551 e2e-material-locators-refactor * testing lib * e2e lib * playwright refactor * fix lint issues * bring back excluded process e2e * fix spinner * locator fixes
This commit is contained in:
@@ -15,7 +15,7 @@
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
import { BrowserActions, BrowserVisibility, DropdownPage, PaginationPage } from '@alfresco/adf-testing';
|
||||
import { BrowserActions, BrowserVisibility, DropdownPage, PaginationPage, materialLocators } from '@alfresco/adf-testing';
|
||||
import { $ } from 'protractor';
|
||||
import { TasksListPage } from './tasks-list.page';
|
||||
|
||||
@@ -24,18 +24,18 @@ export class TaskListDemoPage {
|
||||
taskListPage = new TasksListPage();
|
||||
appId = $('input[data-automation-id=\'appId input\']');
|
||||
itemsPerPage = $('input[data-automation-id=\'items per page\']');
|
||||
itemsPerPageForm = $('mat-form-field[data-automation-id=\'items per page\']');
|
||||
itemsPerPageForm = $(`${materialLocators.Form.field.root}[data-automation-id=\'items per page\']`);
|
||||
processDefinitionId = $('input[data-automation-id=\'process definition id\']');
|
||||
processInstanceId = $('input[data-automation-id=\'process instance id\']');
|
||||
page = $('input[data-automation-id=\'page\']');
|
||||
pageForm = $('mat-form-field[data-automation-id=\'page\']');
|
||||
pageForm = $(`${materialLocators.Form.field.root}[data-automation-id=\'page\']`);
|
||||
taskName = $('input[data-automation-id=\'task name\']');
|
||||
resetButton = $('.app-reset-button button');
|
||||
dueBefore = $('input[data-automation-id=\'due before\']');
|
||||
dueAfter = $('input[data-automation-id=\'due after\']');
|
||||
taskId = $('input[data-automation-id=\'task id\']');
|
||||
|
||||
stateDropDownArrow = $('mat-form-field[data-automation-id=\'state\']');
|
||||
stateDropDownArrow = $(`${materialLocators.Form.field.root}[data-automation-id=\'state\']`);
|
||||
stateDropdown = new DropdownPage(this.stateDropDownArrow);
|
||||
|
||||
taskList(): TasksListPage {
|
||||
@@ -93,7 +93,7 @@ export class TaskListDemoPage {
|
||||
|
||||
async getItemsPerPageFieldErrorMessage(): Promise<string> {
|
||||
await BrowserVisibility.waitUntilElementIsVisible(this.itemsPerPageForm);
|
||||
const errorMessage = this.itemsPerPageForm.$('mat-error');
|
||||
const errorMessage = this.itemsPerPageForm.$(materialLocators.Error.root);
|
||||
return BrowserActions.getText(errorMessage);
|
||||
}
|
||||
|
||||
@@ -103,7 +103,7 @@ export class TaskListDemoPage {
|
||||
|
||||
async getPageFieldErrorMessage(): Promise<string> {
|
||||
await BrowserVisibility.waitUntilElementIsVisible(this.pageForm);
|
||||
const errorMessage = this.pageForm.$('mat-error');
|
||||
const errorMessage = this.pageForm.$(materialLocators.Error.root);
|
||||
return BrowserActions.getText(errorMessage);
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user