mirror of
https://github.com/Alfresco/alfresco-ng2-components.git
synced 2025-07-24 17:32:15 +00:00
Increase timeout and modify login async (#4795)
* increase timeout and modify login async * run e2e if testing is changed * improve cdk fix * fix travis update projects * disable ghostMode lite server * lint fix * fix timeout * multiple try * Update content-services-e2e.sh * Update search-e2e.sh * Update process-services-e2e.sh * Update core-e2e.sh * Update protractor.conf.ts * fix unit * remove async * increqase notification time * 3 parallel * dix path issue in save * small refactor protractor ts * fix save * create license check first script adf cli * modify regex check * refactor notification history component * decrease notification * fix notification message problem * fix test * update packages wit high risk * revert cahnge login sso e2e * fix dep * fix documentation duplication and issue * fix after review * fix after review * try 6 parallel test * back to 3 parallel test no real time improve with 6
This commit is contained in:
@@ -339,13 +339,7 @@ export class DataTableComponentPage {
|
||||
}
|
||||
|
||||
clickColumn(columnName, columnValue) {
|
||||
const column = this.getCellElementByValue(columnName, columnValue);
|
||||
this.clickElement(column);
|
||||
return this;
|
||||
}
|
||||
|
||||
clickElement(elem) {
|
||||
BrowserActions.click(elem);
|
||||
BrowserActions.clickExecuteScript(`div[title="${columnName}"] div[data-automation-id="text_${columnValue}"] span`);
|
||||
return this;
|
||||
}
|
||||
}
|
||||
|
@@ -75,17 +75,15 @@ export class LoginPage {
|
||||
)
|
||||
);
|
||||
|
||||
async goToLoginPage() {
|
||||
goToLoginPage() {
|
||||
browser.waitForAngularEnabled(true);
|
||||
browser.driver.get(this.loginURL);
|
||||
this.waitForElements();
|
||||
return this;
|
||||
return this.waitForElements();
|
||||
}
|
||||
|
||||
waitForElements() {
|
||||
BrowserVisibility.waitUntilElementIsVisible(this.txtUsername);
|
||||
BrowserVisibility.waitUntilElementIsVisible(this.txtPassword);
|
||||
return this;
|
||||
return BrowserVisibility.waitUntilElementIsVisible(this.txtPassword);
|
||||
}
|
||||
|
||||
enterUsername(username) {
|
||||
@@ -165,7 +163,7 @@ export class LoginPage {
|
||||
}
|
||||
|
||||
async loginToAllUsingUserModel(userModel) {
|
||||
this.goToLoginPage();
|
||||
await this.goToLoginPage();
|
||||
await LocalStorageUtil.clearStorage();
|
||||
await LocalStorageUtil.setStorageItem('providers', 'ALL');
|
||||
await LocalStorageUtil.apiReset();
|
||||
@@ -173,7 +171,7 @@ export class LoginPage {
|
||||
}
|
||||
|
||||
async loginToProcessServicesUsingUserModel(userModel) {
|
||||
this.goToLoginPage();
|
||||
await this.goToLoginPage();
|
||||
await LocalStorageUtil.clearStorage();
|
||||
await LocalStorageUtil.setStorageItem('providers', 'BPM');
|
||||
await LocalStorageUtil.apiReset();
|
||||
|
52
lib/testing/src/lib/core/pages/notification-history.page.ts
Normal file
52
lib/testing/src/lib/core/pages/notification-history.page.ts
Normal file
@@ -0,0 +1,52 @@
|
||||
/*!
|
||||
* @license
|
||||
* Copyright 2019 Alfresco Software, Ltd.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
import { by, element } from 'protractor';
|
||||
import { BrowserActions } from '../utils/browser-actions';
|
||||
|
||||
export class NotificationHistoryPage {
|
||||
|
||||
notificationList = element(by.css('#adf-notification-history-list'));
|
||||
|
||||
clickNotificationButton() {
|
||||
BrowserActions.clickExecuteScript('#adf-notification-history-open-button');
|
||||
}
|
||||
|
||||
clickMarkAsRead() {
|
||||
BrowserActions.click(element(by.css('#adf-notification-history-mark-as-read')));
|
||||
}
|
||||
|
||||
checkNotificationIsPresent(text: string) {
|
||||
expect(BrowserActions.getText(this.notificationList)).toContain(text);
|
||||
}
|
||||
|
||||
checkNotificationIsNotPresent(text: string) {
|
||||
expect(BrowserActions.getText(this.notificationList)).not.toContain(text);
|
||||
}
|
||||
|
||||
checkNotifyContains(text: string) {
|
||||
this.clickNotificationButton();
|
||||
this.checkNotificationIsPresent(text);
|
||||
this.clickMarkAsRead();
|
||||
}
|
||||
|
||||
checkNotifyNotContains(text: string) {
|
||||
this.clickNotificationButton();
|
||||
this.checkNotificationIsNotPresent(text);
|
||||
BrowserActions.closeMenuAndDialogs();
|
||||
}
|
||||
}
|
@@ -25,5 +25,5 @@ export * from './data-table-component.page';
|
||||
export * from './pagination.page';
|
||||
export * from './error.page';
|
||||
export * from './login.page';
|
||||
|
||||
export * from './notification-history.page';
|
||||
export * from './form/public-api';
|
||||
|
Reference in New Issue
Block a user