From 2cc7fe7efe40003b0e449b30af72a8df93c4b074 Mon Sep 17 00:00:00 2001 From: Alexandra Abrudan <55090252+AleAb25@users.noreply.github.com> Date: Tue, 17 Dec 2019 09:32:50 +0000 Subject: [PATCH] [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() --- e2e/pages/adf/cardViewComponentPage.ts | 2 -- .../process-services/peopleGroupCloudComponentPage.ts | 6 ------ .../demo-shell/process-services/processListDemoPage.ts | 3 --- .../adf/demo-shell/process-services/taskListDemoPage.ts | 9 --------- e2e/pages/adf/dialog/folderDialog.ts | 2 -- e2e/pages/adf/dialog/shareDialog.ts | 3 --- e2e/pages/adf/dialog/uploadToggles.ts | 1 - e2e/pages/adf/metadataViewPage.ts | 4 ---- e2e/pages/adf/notificationPage.ts | 3 --- e2e/pages/adf/process-services/analyticsPage.ts | 1 - e2e/pages/adf/process-services/attachFormPage.ts | 1 - .../adf/process-services/dialog/createChecklistDialog.ts | 1 - e2e/pages/adf/process-services/startProcessPage.ts | 4 ---- e2e/pages/adf/tagPage.ts | 1 - .../pages/search/date-range-filter.page.ts | 1 - .../src/lib/core/pages/form/widgets/dropdownWidget.ts | 1 - lib/testing/src/lib/core/pages/settings.page.ts | 4 ---- lib/testing/src/lib/core/pages/viewerPage.ts | 4 +--- .../pages/group-cloud-component.page.ts | 1 - .../pages/people-cloud-component.page.ts | 2 -- .../pages/start-tasks-cloud-component.page.ts | 2 -- 21 files changed, 1 insertion(+), 55 deletions(-) diff --git a/e2e/pages/adf/cardViewComponentPage.ts b/e2e/pages/adf/cardViewComponentPage.ts index 1d5835f598..b8d4ac60ac 100644 --- a/e2e/pages/adf/cardViewComponentPage.ts +++ b/e2e/pages/adf/cardViewComponentPage.ts @@ -67,7 +67,6 @@ export class CardViewComponentPage { } async enterTextField(text: string): Promise { - await BrowserVisibility.waitUntilElementIsVisible(this.textField); await BrowserActions.clearSendKeys(this.textField, text); } @@ -88,7 +87,6 @@ export class CardViewComponentPage { } async enterIntField(text): Promise { - await BrowserVisibility.waitUntilElementIsVisible(this.intField); await BrowserActions.clearSendKeys(this.intField, text); } diff --git a/e2e/pages/adf/demo-shell/process-services/peopleGroupCloudComponentPage.ts b/e2e/pages/adf/demo-shell/process-services/peopleGroupCloudComponentPage.ts index 40dc1b397e..5939206df1 100644 --- a/e2e/pages/adf/demo-shell/process-services/peopleGroupCloudComponentPage.ts +++ b/e2e/pages/adf/demo-shell/process-services/peopleGroupCloudComponentPage.ts @@ -77,17 +77,14 @@ export class PeopleGroupCloudComponentPage { } async enterPeopleRoles(roles): Promise { - await BrowserVisibility.waitUntilElementIsVisible(this.peopleRoleInput); await BrowserActions.clearSendKeys(this.peopleRoleInput, roles); } async enterPeoplePreselect(preselect): Promise { - await BrowserVisibility.waitUntilElementIsVisible(this.peoplePreselect); await BrowserActions.clearSendKeys(this.peoplePreselect, preselect); } async clearField(locator): Promise { - await BrowserVisibility.waitUntilElementIsVisible(locator); await BrowserActions.clearSendKeys(locator, ''); } @@ -100,7 +97,6 @@ export class PeopleGroupCloudComponentPage { } async enterGroupRoles(roles): Promise { - await BrowserVisibility.waitUntilElementIsVisible(this.groupRoleInput); await BrowserActions.clearSendKeys(this.groupRoleInput, roles); } @@ -122,12 +118,10 @@ export class PeopleGroupCloudComponentPage { } async enterPeopleAppName(appName): Promise { - await BrowserVisibility.waitUntilElementIsVisible(this.peopleAppInput); await BrowserActions.clearSendKeys(this.peopleAppInput, appName); } async enterGroupAppName(appName): Promise { - await BrowserVisibility.waitUntilElementIsVisible(this.groupAppInput); await BrowserActions.clearSendKeys(this.groupAppInput, appName); } diff --git a/e2e/pages/adf/demo-shell/process-services/processListDemoPage.ts b/e2e/pages/adf/demo-shell/process-services/processListDemoPage.ts index 5451b05905..94b0e44267 100644 --- a/e2e/pages/adf/demo-shell/process-services/processListDemoPage.ts +++ b/e2e/pages/adf/demo-shell/process-services/processListDemoPage.ts @@ -55,7 +55,6 @@ export class ProcessListDemoPage { async clickResetButton(): Promise { await BrowserActions.click(this.resetButton); - } async checkErrorMessageIsDisplayed(error): Promise { @@ -92,12 +91,10 @@ export class ProcessListDemoPage { } async addProcessDefinitionId(procDefinitionId): Promise { - await BrowserActions.click(this.processDefinitionInput); await BrowserActions.clearSendKeys(this.processDefinitionInput, procDefinitionId); } async addProcessInstanceId(procInstanceId): Promise { - await BrowserActions.click(this.processInstanceInput); await BrowserActions.clearSendKeys(this.processInstanceInput, procInstanceId); } } diff --git a/e2e/pages/adf/demo-shell/process-services/taskListDemoPage.ts b/e2e/pages/adf/demo-shell/process-services/taskListDemoPage.ts index f88ac3a098..38eeb726ed 100644 --- a/e2e/pages/adf/demo-shell/process-services/taskListDemoPage.ts +++ b/e2e/pages/adf/demo-shell/process-services/taskListDemoPage.ts @@ -46,7 +46,6 @@ export class TaskListDemoPage { } async typeAppId(input): Promise { - await BrowserVisibility.waitUntilElementIsVisible(this.appId); await BrowserActions.clearSendKeys(this.appId, input); } @@ -60,7 +59,6 @@ export class TaskListDemoPage { } async typeTaskId(input): Promise { - await BrowserVisibility.waitUntilElementIsVisible(this.taskId); await BrowserActions.clearSendKeys(this.taskId, input); } @@ -70,7 +68,6 @@ export class TaskListDemoPage { } async typeTaskName(input): Promise { - await BrowserVisibility.waitUntilElementIsVisible(this.taskName); await BrowserActions.clearSendKeys(this.taskName, input); } @@ -80,12 +77,10 @@ export class TaskListDemoPage { } async typeItemsPerPage(input): Promise { - await BrowserVisibility.waitUntilElementIsVisible(this.itemsPerPage); await BrowserActions.clearSendKeys(this.itemsPerPage, input); } async typeProcessDefinitionId(input): Promise { - await BrowserVisibility.waitUntilElementIsVisible(this.processDefinitionId); await BrowserActions.clearSendKeys(this.processDefinitionId, input); } @@ -95,7 +90,6 @@ export class TaskListDemoPage { } async typeProcessInstanceId(input): Promise { - await BrowserVisibility.waitUntilElementIsVisible(this.processInstanceId); await BrowserActions.clearSendKeys(this.processInstanceId, input); } @@ -111,7 +105,6 @@ export class TaskListDemoPage { } async typePage(input): Promise { - await BrowserVisibility.waitUntilElementIsVisible(this.page); await BrowserActions.clearSendKeys(this.page, input); } @@ -127,12 +120,10 @@ export class TaskListDemoPage { } async typeDueAfter(input): Promise { - await BrowserVisibility.waitUntilElementIsVisible(this.dueAfter); await BrowserActions.clearSendKeys(this.dueAfter, input); } async typeDueBefore(input): Promise { - await BrowserVisibility.waitUntilElementIsVisible(this.dueBefore); await BrowserActions.clearSendKeys(this.dueBefore, input); } diff --git a/e2e/pages/adf/dialog/folderDialog.ts b/e2e/pages/adf/dialog/folderDialog.ts index 99173dd60b..22d05915f4 100644 --- a/e2e/pages/adf/dialog/folderDialog.ts +++ b/e2e/pages/adf/dialog/folderDialog.ts @@ -52,12 +52,10 @@ export class FolderDialog { } async addFolderName(folderName): Promise { - await BrowserVisibility.waitUntilElementIsVisible(this.folderNameField); await BrowserActions.clearSendKeys(this.folderNameField, folderName); } async addFolderDescription(folderDescription): Promise { - await BrowserVisibility.waitUntilElementIsVisible(this.folderDescriptionField); await BrowserActions.clearSendKeys(this.folderDescriptionField, folderDescription); } diff --git a/e2e/pages/adf/dialog/shareDialog.ts b/e2e/pages/adf/dialog/shareDialog.ts index 13e7aed2db..c3ca548af8 100644 --- a/e2e/pages/adf/dialog/shareDialog.ts +++ b/e2e/pages/adf/dialog/shareDialog.ts @@ -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 { 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()); } diff --git a/e2e/pages/adf/dialog/uploadToggles.ts b/e2e/pages/adf/dialog/uploadToggles.ts index 060eb09feb..d5b420cdfc 100644 --- a/e2e/pages/adf/dialog/uploadToggles.ts +++ b/e2e/pages/adf/dialog/uploadToggles.ts @@ -104,7 +104,6 @@ export class UploadToggles { } async clearText(): Promise { - await BrowserVisibility.waitUntilElementIsVisible(this.maxSizeField); await BrowserActions.clearSendKeys(this.maxSizeField, ''); } diff --git a/e2e/pages/adf/metadataViewPage.ts b/e2e/pages/adf/metadataViewPage.ts index d4919abcc6..0d6514c0b9 100644 --- a/e2e/pages/adf/metadataViewPage.ts +++ b/e2e/pages/adf/metadataViewPage.ts @@ -157,13 +157,11 @@ export class MetadataViewPage { async enterPropertyText(propertyName: string, text: string | number): Promise { 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 { 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 { 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 { - await BrowserVisibility.waitUntilElementIsVisible(this.displayAspect); await BrowserActions.clearSendKeys(this.displayAspect, aspectName); } diff --git a/e2e/pages/adf/notificationPage.ts b/e2e/pages/adf/notificationPage.ts index 191c7c4e98..750f70ec7e 100644 --- a/e2e/pages/adf/notificationPage.ts +++ b/e2e/pages/adf/notificationPage.ts @@ -58,12 +58,10 @@ export class NotificationPage { } async enterMessageField(text): Promise { - await BrowserVisibility.waitUntilElementIsVisible(this.messageField); await BrowserActions.clearSendKeys(this.messageField, text); } async enterDurationField(time): Promise { - await BrowserVisibility.waitUntilElementIsVisible(this.durationField); await BrowserActions.clearSendKeys(this.durationField, time); } @@ -106,7 +104,6 @@ export class NotificationPage { } async clearMessage(): Promise { - await BrowserVisibility.waitUntilElementIsVisible(this.messageField); await BrowserActions.clearSendKeys(this.messageField, ''); } } diff --git a/e2e/pages/adf/process-services/analyticsPage.ts b/e2e/pages/adf/process-services/analyticsPage.ts index 560f3c1266..b270908686 100644 --- a/e2e/pages/adf/process-services/analyticsPage.ts +++ b/e2e/pages/adf/process-services/analyticsPage.ts @@ -39,7 +39,6 @@ export class AnalyticsPage { } async clearReportTitle(): Promise { - await BrowserVisibility.waitUntilElementIsVisible(this.toolbarTitleInput); await BrowserActions.clearSendKeys(this.toolbarTitleInput, ''); await BrowserVisibility.waitUntilElementIsVisible(this.toolbarTitleInput); } diff --git a/e2e/pages/adf/process-services/attachFormPage.ts b/e2e/pages/adf/process-services/attachFormPage.ts index 66ba62fcba..9bbdeafb43 100644 --- a/e2e/pages/adf/process-services/attachFormPage.ts +++ b/e2e/pages/adf/process-services/attachFormPage.ts @@ -62,7 +62,6 @@ export class AttachFormPage { } async selectAttachFormOption(option): Promise { - await BrowserVisibility.waitUntilElementIsClickable(element(by.cssContainingText("mat-option[role='option']", option))); await BrowserActions.click(element(by.cssContainingText("mat-option[role='option']", option))); } diff --git a/e2e/pages/adf/process-services/dialog/createChecklistDialog.ts b/e2e/pages/adf/process-services/dialog/createChecklistDialog.ts index e387549f05..596edd14fa 100644 --- a/e2e/pages/adf/process-services/dialog/createChecklistDialog.ts +++ b/e2e/pages/adf/process-services/dialog/createChecklistDialog.ts @@ -26,7 +26,6 @@ export class ChecklistDialog { dialogTitle: ElementFinder = element(by.id('add-checklist-title')); async addName(name): Promise { - await BrowserVisibility.waitUntilElementIsClickable(this.nameField); await BrowserActions.clearSendKeys(this.nameField, name); } diff --git a/e2e/pages/adf/process-services/startProcessPage.ts b/e2e/pages/adf/process-services/startProcessPage.ts index f5c1f46070..072bf2b035 100644 --- a/e2e/pages/adf/process-services/startProcessPage.ts +++ b/e2e/pages/adf/process-services/startProcessPage.ts @@ -54,7 +54,6 @@ export class StartProcessPage { } async enterProcessName(name): Promise { - await BrowserVisibility.waitUntilElementIsVisible(this.processNameInput); await BrowserActions.clearSendKeys(this.processNameInput, name); } @@ -84,8 +83,6 @@ export class StartProcessPage { } async typeProcessDefinition(name): Promise { - 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 { - await BrowserVisibility.waitUntilElementIsClickable(this.formStartProcessButton); await BrowserActions.click(this.formStartProcessButton); } diff --git a/e2e/pages/adf/tagPage.ts b/e2e/pages/adf/tagPage.ts index 318af34263..ed26846b27 100644 --- a/e2e/pages/adf/tagPage.ts +++ b/e2e/pages/adf/tagPage.ts @@ -51,7 +51,6 @@ export class TagPage { } async addNewTagInput(tag) { - await BrowserVisibility.waitUntilElementIsVisible(this.newTagInput); await BrowserActions.clearSendKeys(this.newTagInput, tag); } diff --git a/lib/testing/src/lib/content-services/pages/search/date-range-filter.page.ts b/lib/testing/src/lib/content-services/pages/search/date-range-filter.page.ts index b7475bd754..67926f2d2c 100644 --- a/lib/testing/src/lib/content-services/pages/search/date-range-filter.page.ts +++ b/lib/testing/src/lib/content-services/pages/search/date-range-filter.page.ts @@ -101,7 +101,6 @@ export class DateRangeFilterPage { } async clickToField(): Promise { - await BrowserVisibility.waitUntilElementIsClickable(this.filter.element(this.toField)); await BrowserActions.click(this.filter.element(this.toField)); } diff --git a/lib/testing/src/lib/core/pages/form/widgets/dropdownWidget.ts b/lib/testing/src/lib/core/pages/form/widgets/dropdownWidget.ts index e68a830f44..ff073a508f 100644 --- a/lib/testing/src/lib/core/pages/form/widgets/dropdownWidget.ts +++ b/lib/testing/src/lib/core/pages/form/widgets/dropdownWidget.ts @@ -36,7 +36,6 @@ export class DropdownWidget { async openDropdown(locator: string = '#dropdown'): Promise { await this.checkDropdownIsDisplayed(locator); const dropdown = locator ? element(by.css(`${locator}`)) : element(by.css(`#dropdown`)); - await BrowserVisibility.waitUntilElementIsClickable(dropdown); await BrowserActions.click(dropdown); } diff --git a/lib/testing/src/lib/core/pages/settings.page.ts b/lib/testing/src/lib/core/pages/settings.page.ts index 5c50cf3394..e255ec9337 100644 --- a/lib/testing/src/lib/core/pages/settings.page.ts +++ b/lib/testing/src/lib/core/pages/settings.page.ts @@ -175,7 +175,6 @@ export class SettingsPage { } async setProcessServicesURL(processServiceURL) { - await BrowserVisibility.waitUntilElementIsVisible(this.bpmText); await BrowserActions.clearSendKeys(this.bpmText, processServiceURL); } @@ -192,17 +191,14 @@ export class SettingsPage { } async clearProcessServicesURL() { - await BrowserVisibility.waitUntilElementIsVisible(this.bpmText); await BrowserActions.clearWithBackSpace(this.bpmText); } async setAuthHost(authHostURL) { - await BrowserVisibility.waitUntilElementIsVisible(this.authHostText); await BrowserActions.clearSendKeys(this.authHostText, authHostURL); } async setIdentityHost(identityHost) { - await BrowserVisibility.waitUntilElementIsVisible(this.identityHostText); await BrowserActions.clearSendKeys(this.identityHostText, identityHost); } diff --git a/lib/testing/src/lib/core/pages/viewerPage.ts b/lib/testing/src/lib/core/pages/viewerPage.ts index 1a92a14403..dd393b8088 100644 --- a/lib/testing/src/lib/core/pages/viewerPage.ts +++ b/lib/testing/src/lib/core/pages/viewerPage.ts @@ -113,7 +113,6 @@ export class ViewerPage { } async clearPageNumber(): Promise { - await BrowserVisibility.waitUntilElementIsVisible(this.pageSelectorInput); await BrowserActions.clearSendKeys(this.pageSelectorInput, protractor.Key.ENTER); } @@ -140,7 +139,6 @@ export class ViewerPage { } async enterPassword(password): Promise { - await BrowserVisibility.waitUntilElementIsVisible(this.passwordInput); await BrowserActions.clearSendKeys(this.passwordInput, password); } @@ -590,7 +588,7 @@ export class ViewerPage { async enterCustomName(text: string): Promise { const textField: ElementFinder = element(by.css('input[data-automation-id="adf-text-custom-name"]')); - await BrowserVisibility.waitUntilElementIsVisible(textField); + // await BrowserVisibility.waitUntilElementIsVisible(textField); await BrowserActions.clearSendKeys(textField, text); } diff --git a/lib/testing/src/lib/process-services-cloud/pages/group-cloud-component.page.ts b/lib/testing/src/lib/process-services-cloud/pages/group-cloud-component.page.ts index 96e48dabd6..96c7c7af4e 100644 --- a/lib/testing/src/lib/process-services-cloud/pages/group-cloud-component.page.ts +++ b/lib/testing/src/lib/process-services-cloud/pages/group-cloud-component.page.ts @@ -30,7 +30,6 @@ export class GroupCloudComponentPage { } async searchGroupsToExisting(name) { - await BrowserVisibility.waitUntilElementIsVisible(this.groupCloudSearch); await BrowserActions.clearSendKeys(this.groupCloudSearch, name); } diff --git a/lib/testing/src/lib/process-services-cloud/pages/people-cloud-component.page.ts b/lib/testing/src/lib/process-services-cloud/pages/people-cloud-component.page.ts index 3fd07aeda8..718abb924d 100644 --- a/lib/testing/src/lib/process-services-cloud/pages/people-cloud-component.page.ts +++ b/lib/testing/src/lib/process-services-cloud/pages/people-cloud-component.page.ts @@ -30,7 +30,6 @@ export class PeopleCloudComponentPage { } async searchAssigneeAndSelect(name: string): Promise { - await BrowserVisibility.waitUntilElementIsVisible(this.peopleCloudSearch); await BrowserActions.clearSendKeys(this.peopleCloudSearch, name); await this.selectAssigneeFromList(name); } @@ -43,7 +42,6 @@ export class PeopleCloudComponentPage { } async searchAssigneeToExisting(name: string): Promise { - await BrowserVisibility.waitUntilElementIsVisible(this.peopleCloudSearch); await BrowserActions.clearSendKeys(this.peopleCloudSearch, name); } diff --git a/lib/testing/src/lib/process-services-cloud/pages/start-tasks-cloud-component.page.ts b/lib/testing/src/lib/process-services-cloud/pages/start-tasks-cloud-component.page.ts index ffbadbc3a6..853455c0ce 100644 --- a/lib/testing/src/lib/process-services-cloud/pages/start-tasks-cloud-component.page.ts +++ b/lib/testing/src/lib/process-services-cloud/pages/start-tasks-cloud-component.page.ts @@ -69,8 +69,6 @@ export class StartTasksCloudPage { } async blur(locator: ElementFinder): Promise { - await BrowserVisibility.waitUntilElementIsVisible(locator); - await BrowserVisibility.waitUntilElementIsClickable(locator); await BrowserActions.click(locator); await locator.sendKeys(Key.TAB); }