[AAE-1178] ADF - deleted un-necessary steps (#5335)

* [AAE-1178] e2e/pages/adf - deleted un-necessary steps waitUntilElementIsVisble & waitUntilElementIsClickable before click() action & clearSendKeys()

* [AAE-1178] lib & cloud - deleted un-necessary steps waitUntilElementIsVisble & waitUntilElementIsClickable before click() action & clearSendKeys()
This commit is contained in:
Alexandra Abrudan
2019-12-17 09:32:50 +00:00
committed by Eugenio Romano
parent 5c7cd57368
commit 2cc7fe7efe
21 changed files with 1 additions and 55 deletions

View File

@@ -67,7 +67,6 @@ export class CardViewComponentPage {
}
async enterTextField(text: string): Promise<void> {
await BrowserVisibility.waitUntilElementIsVisible(this.textField);
await BrowserActions.clearSendKeys(this.textField, text);
}
@@ -88,7 +87,6 @@ export class CardViewComponentPage {
}
async enterIntField(text): Promise<void> {
await BrowserVisibility.waitUntilElementIsVisible(this.intField);
await BrowserActions.clearSendKeys(this.intField, text);
}

View File

@@ -77,17 +77,14 @@ export class PeopleGroupCloudComponentPage {
}
async enterPeopleRoles(roles): Promise<void> {
await BrowserVisibility.waitUntilElementIsVisible(this.peopleRoleInput);
await BrowserActions.clearSendKeys(this.peopleRoleInput, roles);
}
async enterPeoplePreselect(preselect): Promise<void> {
await BrowserVisibility.waitUntilElementIsVisible(this.peoplePreselect);
await BrowserActions.clearSendKeys(this.peoplePreselect, preselect);
}
async clearField(locator): Promise<void> {
await BrowserVisibility.waitUntilElementIsVisible(locator);
await BrowserActions.clearSendKeys(locator, '');
}
@@ -100,7 +97,6 @@ export class PeopleGroupCloudComponentPage {
}
async enterGroupRoles(roles): Promise<void> {
await BrowserVisibility.waitUntilElementIsVisible(this.groupRoleInput);
await BrowserActions.clearSendKeys(this.groupRoleInput, roles);
}
@@ -122,12 +118,10 @@ export class PeopleGroupCloudComponentPage {
}
async enterPeopleAppName(appName): Promise<void> {
await BrowserVisibility.waitUntilElementIsVisible(this.peopleAppInput);
await BrowserActions.clearSendKeys(this.peopleAppInput, appName);
}
async enterGroupAppName(appName): Promise<void> {
await BrowserVisibility.waitUntilElementIsVisible(this.groupAppInput);
await BrowserActions.clearSendKeys(this.groupAppInput, appName);
}

View File

@@ -55,7 +55,6 @@ export class ProcessListDemoPage {
async clickResetButton(): Promise<void> {
await BrowserActions.click(this.resetButton);
}
async checkErrorMessageIsDisplayed(error): Promise<void> {
@@ -92,12 +91,10 @@ export class ProcessListDemoPage {
}
async addProcessDefinitionId(procDefinitionId): Promise<void> {
await BrowserActions.click(this.processDefinitionInput);
await BrowserActions.clearSendKeys(this.processDefinitionInput, procDefinitionId);
}
async addProcessInstanceId(procInstanceId): Promise<void> {
await BrowserActions.click(this.processInstanceInput);
await BrowserActions.clearSendKeys(this.processInstanceInput, procInstanceId);
}
}

View File

@@ -46,7 +46,6 @@ export class TaskListDemoPage {
}
async typeAppId(input): Promise<void> {
await BrowserVisibility.waitUntilElementIsVisible(this.appId);
await BrowserActions.clearSendKeys(this.appId, input);
}
@@ -60,7 +59,6 @@ export class TaskListDemoPage {
}
async typeTaskId(input): Promise<void> {
await BrowserVisibility.waitUntilElementIsVisible(this.taskId);
await BrowserActions.clearSendKeys(this.taskId, input);
}
@@ -70,7 +68,6 @@ export class TaskListDemoPage {
}
async typeTaskName(input): Promise<void> {
await BrowserVisibility.waitUntilElementIsVisible(this.taskName);
await BrowserActions.clearSendKeys(this.taskName, input);
}
@@ -80,12 +77,10 @@ export class TaskListDemoPage {
}
async typeItemsPerPage(input): Promise<void> {
await BrowserVisibility.waitUntilElementIsVisible(this.itemsPerPage);
await BrowserActions.clearSendKeys(this.itemsPerPage, input);
}
async typeProcessDefinitionId(input): Promise<void> {
await BrowserVisibility.waitUntilElementIsVisible(this.processDefinitionId);
await BrowserActions.clearSendKeys(this.processDefinitionId, input);
}
@@ -95,7 +90,6 @@ export class TaskListDemoPage {
}
async typeProcessInstanceId(input): Promise<void> {
await BrowserVisibility.waitUntilElementIsVisible(this.processInstanceId);
await BrowserActions.clearSendKeys(this.processInstanceId, input);
}
@@ -111,7 +105,6 @@ export class TaskListDemoPage {
}
async typePage(input): Promise<void> {
await BrowserVisibility.waitUntilElementIsVisible(this.page);
await BrowserActions.clearSendKeys(this.page, input);
}
@@ -127,12 +120,10 @@ export class TaskListDemoPage {
}
async typeDueAfter(input): Promise<void> {
await BrowserVisibility.waitUntilElementIsVisible(this.dueAfter);
await BrowserActions.clearSendKeys(this.dueAfter, input);
}
async typeDueBefore(input): Promise<void> {
await BrowserVisibility.waitUntilElementIsVisible(this.dueBefore);
await BrowserActions.clearSendKeys(this.dueBefore, input);
}

View File

@@ -52,12 +52,10 @@ export class FolderDialog {
}
async addFolderName(folderName): Promise<void> {
await BrowserVisibility.waitUntilElementIsVisible(this.folderNameField);
await BrowserActions.clearSendKeys(this.folderNameField, folderName);
}
async addFolderDescription(folderDescription): Promise<void> {
await BrowserVisibility.waitUntilElementIsVisible(this.folderDescriptionField);
await BrowserActions.clearSendKeys(this.folderDescriptionField, folderDescription);
}

View File

@@ -97,7 +97,6 @@ export class ShareDialog {
await BrowserVisibility.waitUntilElementIsVisible(this.dayPicker);
const tomorrow = moment().add(1, 'days').format('LL');
await BrowserVisibility.waitUntilElementIsClickable(this.dayPicker.element(by.css(`td[aria-label="${tomorrow}"]`)));
await BrowserActions.click(this.dayPicker.element(by.css(`td[aria-label="${tomorrow}"]`)));
}
@@ -105,13 +104,11 @@ export class ShareDialog {
async setDefaultHour(): Promise<void> {
const selector = '.mat-datetimepicker-clock-cell:not(.mat-datetimepicker-clock-cell-disabled)';
await BrowserVisibility.waitUntilElementIsVisible(this.clockPicker);
await BrowserVisibility.waitUntilElementIsVisible(this.hoursPicker);
await BrowserActions.click(this.hoursPicker.all(by.css(selector)).first());
}
async setDefaultMinutes() {
const selector = '.mat-datetimepicker-clock-cell:not(.mat-datetimepicker-clock-cell-disabled)';
await BrowserVisibility.waitUntilElementIsVisible(this.minutePicker);
await BrowserActions.click(this.minutePicker.all(by.css(selector)).first());
}

View File

@@ -104,7 +104,6 @@ export class UploadToggles {
}
async clearText(): Promise<void> {
await BrowserVisibility.waitUntilElementIsVisible(this.maxSizeField);
await BrowserActions.clearSendKeys(this.maxSizeField, '');
}

View File

@@ -157,13 +157,11 @@ export class MetadataViewPage {
async enterPropertyText(propertyName: string, text: string | number): Promise<void> {
const textField: ElementFinder = element(by.css('input[data-automation-id="card-textitem-editinput-' + propertyName + '"]'));
await BrowserVisibility.waitUntilElementIsClickable(textField);
await BrowserActions.clearSendKeys(textField, text.toString());
}
async enterPresetText(text: string): Promise<void> {
const presetField: ElementFinder = element(by.css('input[data-automation-id="adf-text-custom-preset"]'));
await BrowserVisibility.waitUntilElementIsVisible(presetField);
await BrowserActions.clearSendKeys(presetField, text);
const applyButton: ElementFinder = element(by.css('button[id="adf-metadata-aplly"]'));
await BrowserActions.click(applyButton);
@@ -171,7 +169,6 @@ export class MetadataViewPage {
async enterDescriptionText(text: string): Promise<void> {
const textField: ElementFinder = element(by.css('textarea[data-automation-id="card-textitem-edittextarea-properties.cm:description"]'));
await BrowserVisibility.waitUntilElementIsVisible(textField);
await BrowserActions.clearSendKeys(textField, text);
}
@@ -244,7 +241,6 @@ export class MetadataViewPage {
}
async typeAspectName(aspectName): Promise<void> {
await BrowserVisibility.waitUntilElementIsVisible(this.displayAspect);
await BrowserActions.clearSendKeys(this.displayAspect, aspectName);
}

View File

@@ -58,12 +58,10 @@ export class NotificationPage {
}
async enterMessageField(text): Promise<void> {
await BrowserVisibility.waitUntilElementIsVisible(this.messageField);
await BrowserActions.clearSendKeys(this.messageField, text);
}
async enterDurationField(time): Promise<void> {
await BrowserVisibility.waitUntilElementIsVisible(this.durationField);
await BrowserActions.clearSendKeys(this.durationField, time);
}
@@ -106,7 +104,6 @@ export class NotificationPage {
}
async clearMessage(): Promise<void> {
await BrowserVisibility.waitUntilElementIsVisible(this.messageField);
await BrowserActions.clearSendKeys(this.messageField, '');
}
}

View File

@@ -39,7 +39,6 @@ export class AnalyticsPage {
}
async clearReportTitle(): Promise<void> {
await BrowserVisibility.waitUntilElementIsVisible(this.toolbarTitleInput);
await BrowserActions.clearSendKeys(this.toolbarTitleInput, '');
await BrowserVisibility.waitUntilElementIsVisible(this.toolbarTitleInput);
}

View File

@@ -62,7 +62,6 @@ export class AttachFormPage {
}
async selectAttachFormOption(option): Promise<void> {
await BrowserVisibility.waitUntilElementIsClickable(element(by.cssContainingText("mat-option[role='option']", option)));
await BrowserActions.click(element(by.cssContainingText("mat-option[role='option']", option)));
}

View File

@@ -26,7 +26,6 @@ export class ChecklistDialog {
dialogTitle: ElementFinder = element(by.id('add-checklist-title'));
async addName(name): Promise<void> {
await BrowserVisibility.waitUntilElementIsClickable(this.nameField);
await BrowserActions.clearSendKeys(this.nameField, name);
}

View File

@@ -54,7 +54,6 @@ export class StartProcessPage {
}
async enterProcessName(name): Promise<void> {
await BrowserVisibility.waitUntilElementIsVisible(this.processNameInput);
await BrowserActions.clearSendKeys(this.processNameInput, name);
}
@@ -84,8 +83,6 @@ export class StartProcessPage {
}
async typeProcessDefinition(name): Promise<void> {
await BrowserVisibility.waitUntilElementIsVisible(this.processDefinition);
await BrowserVisibility.waitUntilElementIsClickable(this.processDefinition);
await BrowserActions.clearSendKeys(this.processDefinition, name);
}
@@ -99,7 +96,6 @@ export class StartProcessPage {
}
async clickFormStartProcessButton(): Promise<void> {
await BrowserVisibility.waitUntilElementIsClickable(this.formStartProcessButton);
await BrowserActions.click(this.formStartProcessButton);
}

View File

@@ -51,7 +51,6 @@ export class TagPage {
}
async addNewTagInput(tag) {
await BrowserVisibility.waitUntilElementIsVisible(this.newTagInput);
await BrowserActions.clearSendKeys(this.newTagInput, tag);
}