[ADF-4701] Upgrade angular libs (#4877)

* [ADF-4701] Upgrade angular material to 7.3.7 version

* [ADF-4701] upgrade angular libs

* [ADF-4701] upgrade angular libs

* [ADF-4530] temporary disable test

- will be fixed in a separate PR for https://issues.alfresco.com/jira/browse/ADF-4704
- the 'expected behavior' of the ADF-4530 corresponding bug is that should display 'all the available Process Definitions defined in the app'

* e2e test does not need bpm user

* e2e FIX waitUntilElementIsClickable

* Revert "e2e test does not need bpm user"

This reverts commit 9a5c4d4 - Travis seems to need initial code

* e2e fix button selector

- caused TimeoutError: Element is not Clickable

* e2e scroll into view fix

* e2e fixes scroll into view & selectors

* e2e fixed close action menu

- close menu with all disabled items fix - opened related issue https://issues.alfresco.com/jira/browse/ADF-4712
- checkContextActionIsVisible should check only visibility - all items might be disabled, so un-clickable
- close menu changed bcs. overlay backdrop caused TimeoutError: Element is not Clickable

* e2e disabled button is not supposed to be clickable

- fixed TimeoutError: Element is not Clickable

* e2e update messages

* e2e check invisibilityOf item

* e2e extra filter

* e2e wait waitTillContentLoaded

- created related issue https://issues.alfresco.com/jira/browse/ADF-4715

* [ADF-4715] a process never has CREATED status

* [ADF-4717] wait for filtered content to be loaded

- initiator filter must have 'username' value
This commit is contained in:
Suzana Dirla
2019-07-02 14:07:15 +03:00
committed by Eugenio Romano
parent 028916e386
commit 87b80235a7
15 changed files with 305 additions and 219 deletions

View File

@@ -15,7 +15,7 @@
* limitations under the License.
*/
import { element, by, protractor } from 'protractor';
import { element, by, protractor, browser } from 'protractor';
import { BrowserVisibility } from '../utils/browser-visibility';
import { BrowserActions } from '../utils/browser-actions';
@@ -114,12 +114,11 @@ export class HeaderPage {
sideBarPositionStart() {
return BrowserActions.click(this.positionStart);
}
sideBarPositionEnd() {
browser.executeScript('arguments[0].scrollIntoView()', this.positionEnd);
return BrowserActions.click(this.positionEnd);
}
checkSidebarPositionStart() {

View File

@@ -58,6 +58,11 @@ export class BrowserActions {
return browser.actions().sendKeys(protractor.Key.ESCAPE).perform();
}
static async closeDisabledMenu() {
// if the opened menu has only disabled items, pressing escape to close it won't work
return browser.actions().sendKeys(protractor.Key.ENTER).perform();
}
static clickOnDropdownOption(option: string, dropDownElement: ElementFinder) {
this.click(dropDownElement);
BrowserVisibility.waitUntilElementIsVisible(element('div[class*="mat-menu-content"] button'));

View File

@@ -15,7 +15,7 @@
* limitations under the License.
*/
import { browser, by, element, ElementFinder, protractor } from 'protractor';
import { browser, by, element, ExpectedConditions as EC, ElementFinder, protractor } from 'protractor';
const until = protractor.ExpectedConditions;
const DEFAULT_TIMEOUT = global['TestConfig'] ? global['TestConfig'].main.timeout : 40000;
@@ -46,25 +46,13 @@ export class BrowserVisibility {
* Wait for element to be clickable
*/
static waitUntilElementIsClickable(elementToCheck: ElementFinder, waitTimeout: number = DEFAULT_TIMEOUT) {
let isDisplayed = false;
return browser.wait(() => {
browser.waitForAngularEnabled();
elementToCheck.isDisplayed().then(
() => {
isDisplayed = true;
},
() => {
isDisplayed = false;
}
);
return isDisplayed;
}, waitTimeout, 'Element is not Clickable ' + elementToCheck.locator());
return browser.wait(EC.elementToBeClickable(elementToCheck),
waitTimeout, 'Element is not Clickable ' + elementToCheck.locator());
}
/*
* Wait for element to not be visible
*/
* Wait for element to not be present on the page
*/
static waitUntilElementIsStale(elementToCheck: ElementFinder, waitTimeout: number = DEFAULT_TIMEOUT) {
return browser.wait(until.stalenessOf(elementToCheck), waitTimeout, 'Element is not in stale ' + elementToCheck.locator());
}
@@ -103,7 +91,7 @@ export class BrowserVisibility {
* Wait for element to not be visible
*/
static waitUntilElementIsNotOnPage(elementToCheck: ElementFinder, waitTimeout: number = DEFAULT_TIMEOUT) {
return browser.wait(until.not(until.visibilityOf(elementToCheck)), waitTimeout, 'Element is not in the page ' + elementToCheck.locator());
return browser.wait(until.invisibilityOf(elementToCheck), waitTimeout, 'Element is visible on the page ' + elementToCheck.locator());
}
static waitUntilElementIsPresent(elementToCheck: ElementFinder, waitTimeout: number = DEFAULT_TIMEOUT) {
@@ -113,7 +101,7 @@ export class BrowserVisibility {
}
static waitUntilElementIsNotPresent(elementToCheck: ElementFinder, waitTimeout: number = DEFAULT_TIMEOUT) {
return browser.wait(until.not(until.presenceOf(elementToCheck)), waitTimeout, 'Element is not in the page ' + elementToCheck.locator());
return browser.wait(until.stalenessOf(elementToCheck), waitTimeout, 'Element is present ' + elementToCheck.locator());
}
static waitUntilDialogIsClose() {

View File

@@ -83,7 +83,6 @@ export class StartProcessCloudPage {
}
checkStartProcessButtonIsEnabled() {
BrowserVisibility.waitUntilElementIsClickable(this.startProcessButton);
return this.startProcessButton.isEnabled();
}