From febaf6601a3b7075346ca22df12746160e440086 Mon Sep 17 00:00:00 2001 From: Adina Parpalita Date: Tue, 27 Apr 2021 17:55:34 +0300 Subject: [PATCH] [ACA-3908] use different selectors that are valid for ADW as well (#2091) * use different selectors in order to be valid for ADW as well * trigger travis --- e2e/suites/actions/library/library-actions.test.ts | 3 +-- .../src/components/dialog/create-edit-folder-dialog.ts | 5 +++-- .../src/components/dialog/create-from-template-dialog.ts | 6 +++--- .../src/components/dialog/create-library-dialog.ts | 6 +++--- .../src/components/search/filters/facet-filter.ts | 2 +- protractor.conf.js | 4 ++-- 6 files changed, 13 insertions(+), 13 deletions(-) diff --git a/e2e/suites/actions/library/library-actions.test.ts b/e2e/suites/actions/library/library-actions.test.ts index 1e97d0679..665190e0d 100755 --- a/e2e/suites/actions/library/library-actions.test.ts +++ b/e2e/suites/actions/library/library-actions.test.ts @@ -96,11 +96,10 @@ describe('Library actions', () => { await Utils.pressEscape(); }); - afterEach(async (done) => { + afterEach(async () => { await Utils.pressEscape(); await page.header.expandSideNav(); await page.clickPersonalFiles(); - done(); }); afterAll(async () => { diff --git a/projects/aca-testing-shared/src/components/dialog/create-edit-folder-dialog.ts b/projects/aca-testing-shared/src/components/dialog/create-edit-folder-dialog.ts index 816f71f39..f5e5df34f 100755 --- a/projects/aca-testing-shared/src/components/dialog/create-edit-folder-dialog.ts +++ b/projects/aca-testing-shared/src/components/dialog/create-edit-folder-dialog.ts @@ -33,8 +33,9 @@ export class CreateOrEditFolderDialog extends GenericDialog { cancelButton = this.childElement(by.id('adf-folder-cancel-button')); updateButton = this.childElement(by.cssContainingText('.mat-dialog-actions button', 'Update')); - nameInput = this.rootElem.element(by.css('input[data-placeholder="Name" i]')); - descriptionTextArea = this.rootElem.element(by.css('textarea[data-placeholder="Description" i]')); + nameInput = this.rootElem.element(by.id('adf-folder-name-input')); + titleInput = this.rootElem.element(by.id('adf-folder-title-input')); + descriptionTextArea = this.rootElem.element(by.id('adf-folder-description-input')); validationMessage = this.rootElem.element(by.css('.mat-hint span')); constructor() { diff --git a/projects/aca-testing-shared/src/components/dialog/create-from-template-dialog.ts b/projects/aca-testing-shared/src/components/dialog/create-from-template-dialog.ts index 43f2a788d..d1ea36675 100755 --- a/projects/aca-testing-shared/src/components/dialog/create-from-template-dialog.ts +++ b/projects/aca-testing-shared/src/components/dialog/create-from-template-dialog.ts @@ -32,9 +32,9 @@ export class CreateFromTemplateDialog extends GenericDialog { createButton = this.childElement(by.cssContainingText('.mat-dialog-actions button', 'Create')); cancelButton = this.childElement(by.cssContainingText('.mat-dialog-actions button', 'CANCEL')); - nameInput = this.childElement(by.css('input[data-placeholder="Name" i]')); - titleInput = this.childElement(by.css('input[data-placeholder="Title" i]')); - descriptionTextArea = this.childElement(by.css('textarea[data-placeholder="Description" i]')); + nameInput = this.childElement(by.css('input[formcontrolname="name"]')); + titleInput = this.childElement(by.css('input[formcontrolname="title"]')); + descriptionTextArea = this.childElement(by.css('textarea[formcontrolname="description"]')); validationMessage = this.childElement(by.css('.mat-error')); constructor() { diff --git a/projects/aca-testing-shared/src/components/dialog/create-library-dialog.ts b/projects/aca-testing-shared/src/components/dialog/create-library-dialog.ts index 9cab2531d..f97b4ff15 100755 --- a/projects/aca-testing-shared/src/components/dialog/create-library-dialog.ts +++ b/projects/aca-testing-shared/src/components/dialog/create-library-dialog.ts @@ -32,9 +32,9 @@ export class CreateLibraryDialog extends GenericDialog { createButton = this.childElement(by.cssContainingText('.mat-dialog-actions button', 'Create')); cancelButton = this.childElement(by.cssContainingText('.mat-dialog-actions button', 'Cancel')); - nameInput = this.rootElem.element(by.css('input[data-placeholder="Name" i]')); - libraryIdInput = this.rootElem.element(by.css('input[data-placeholder="Library ID" i]')); - descriptionTextArea = this.rootElem.element(by.css('textarea[data-placeholder="Description" i]')); + nameInput = this.rootElem.element(by.css('input[formcontrolname="title"]')); + libraryIdInput = this.rootElem.element(by.css('input[formcontrolname="id"]')); + descriptionTextArea = this.rootElem.element(by.css('textarea[formcontrolname="description"]')); visibilityPublic = this.rootElem.element(by.cssContainingText('.mat-radio-label', 'Public')); visibilityModerated = this.rootElem.element(by.cssContainingText('.mat-radio-label', 'Moderated')); visibilityPrivate = this.rootElem.element(by.cssContainingText('.mat-radio-label', 'Private')); diff --git a/projects/aca-testing-shared/src/components/search/filters/facet-filter.ts b/projects/aca-testing-shared/src/components/search/filters/facet-filter.ts index f605d2786..070fe9718 100755 --- a/projects/aca-testing-shared/src/components/search/filters/facet-filter.ts +++ b/projects/aca-testing-shared/src/components/search/filters/facet-filter.ts @@ -32,7 +32,7 @@ export class FacetFilter extends GenericFilterPanel { checkbox: '.mat-checkbox', checkboxChecked: '.mat-checkbox.mat-checkbox-checked', button: '.adf-facet-buttons button', - categoryInput: 'input[data-placeholder="Filter category"', + categoryInput: 'input[data-automation-id^="facet-result-filter"]', facetsFilter: '.adf-facet-result-filter' }; diff --git a/protractor.conf.js b/protractor.conf.js index 202056815..df4c1f6b9 100755 --- a/protractor.conf.js +++ b/protractor.conf.js @@ -24,7 +24,7 @@ const SAVE_SCREENSHOT = process.env.SAVE_SCREENSHOT === 'true'; const API_CONTENT_HOST = process.env.API_CONTENT_HOST || 'http://localhost:8080'; const MAXINSTANCES = process.env.MAXINSTANCES || 1; const MAX_RETRIES = process.env.MAX_RETRIES || 1; -const LOG_LEVEL = process.env.LOG_LEVEL || 'ERROR'; +const E2E_LOG_LEVEL = process.env.E2E_LOG_LEVEL || 'ERROR'; const appConfig = { hostEcm: API_CONTENT_HOST, @@ -44,7 +44,7 @@ exports.config = { e2eRootPath: e2eFolder, testConfig: { appConfig: { - log: LOG_LEVEL + log: E2E_LOG_LEVEL } } },