mirror of
https://github.com/Alfresco/alfresco-ng2-components.git
synced 2025-07-24 17:32:15 +00:00
Remove demo shell test and make cloud a bit more stable (#6781)
* remove demo shell test and make cloud a bit more stable * fix lint * Update restore-content-directive.e2e.ts * Update restore-content-directive.e2e.ts * Update restore-content-directive.e2e.ts * try fix attach * Update .travis.yml * sleep... * remove about e2e demo shell.... * fix * lint fix * configure * refactor buuild * names and remove demo shell build from libs * fix new build approach * fix * fix * . * uncomment * . * . * fix * fix * . * fix * lock update * fix demo shell errors * use replay subject * fix some console log error * suffix problem * split process e2e * not need to check everywhere the pagination e2e * split content * fix * fix * fix * fix * reorg # Conflicts: # .travis.yml
This commit is contained in:
@@ -15,7 +15,7 @@
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
import { element, by, ElementFinder } from 'protractor';
|
||||
import { element, by, ElementFinder, browser } from 'protractor';
|
||||
import { BrowserVisibility } from '../../utils/browser-visibility';
|
||||
import { BrowserActions } from '../../utils/browser-actions';
|
||||
import { Logger } from '../../utils/logger';
|
||||
@@ -35,9 +35,9 @@ export class DropdownPage {
|
||||
|
||||
async selectOption(option: string): Promise<void> {
|
||||
Logger.log(`Select dropdown option ${option}`);
|
||||
await BrowserVisibility.waitUntilElementIsVisible(element.all(by.cssContainingText('mat-option span.mat-option-text', option)).first());
|
||||
const optionElement = element.all(by.cssContainingText('mat-option span.mat-option-text', option)).first();
|
||||
await BrowserActions.click(optionElement);
|
||||
await browser.waitForAngular();
|
||||
}
|
||||
|
||||
async getValue(): Promise<string> {
|
||||
@@ -76,11 +76,11 @@ export class DropdownPage {
|
||||
return BrowserActions.getText(selectedOption);
|
||||
}
|
||||
|
||||
async checkOptionIsDisplayed(option: string): Promise <void> {
|
||||
async checkOptionIsDisplayed(option: string): Promise<void> {
|
||||
await BrowserVisibility.waitUntilElementIsVisible(element.all(by.cssContainingText('mat-option span.mat-option-text', option)).first());
|
||||
}
|
||||
|
||||
async checkOptionIsNotDisplayed(option: string): Promise <void> {
|
||||
async checkOptionIsNotDisplayed(option: string): Promise<void> {
|
||||
await BrowserVisibility.waitUntilElementIsNotVisible(element.all(by.cssContainingText('mat-option span.mat-option-text', option)).first());
|
||||
}
|
||||
|
||||
|
@@ -64,7 +64,7 @@ export class EditProcessFilterCloudComponentPage {
|
||||
async openFilter(): Promise<void> {
|
||||
await this.isFilterDisplayed();
|
||||
await BrowserActions.click(this.customiseFilter);
|
||||
await browser.driver.sleep(1000);
|
||||
await browser.driver.sleep(5000);
|
||||
}
|
||||
|
||||
async checkCustomiseFilterHeaderIsExpanded(): Promise<void> {
|
||||
|
@@ -15,8 +15,9 @@
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
import { Locator, element, by, ElementFinder } from 'protractor';
|
||||
import { Locator, element, by, ElementFinder, browser } from 'protractor';
|
||||
import { BrowserActions } from '../../../../core/utils/browser-actions';
|
||||
import { Logger } from '../../../../core/utils/logger';
|
||||
import { BrowserVisibility } from '../../../../core/utils/browser-visibility';
|
||||
|
||||
export class AttachFileWidgetCloudPage {
|
||||
@@ -29,7 +30,7 @@ export class AttachFileWidgetCloudPage {
|
||||
}
|
||||
|
||||
assignWidget(fieldId: string): void {
|
||||
this.widget = element(by.css(`adf-form-field div[id='field-${fieldId}-container']`));
|
||||
this.widget = element(by.css(`adf-form-field div[id='field-${fieldId}-container']`));
|
||||
}
|
||||
|
||||
async clickAttachContentFile(fileId: string): Promise<void> {
|
||||
@@ -70,13 +71,18 @@ export class AttachFileWidgetCloudPage {
|
||||
}
|
||||
|
||||
async clickActionMenu(fileName: string, actionName: string): Promise<void> {
|
||||
Logger.info('Click action menu');
|
||||
await BrowserActions.closeMenuAndDialogs();
|
||||
const fileId = await this.getFileId(fileName);
|
||||
Logger.info(`FileId ${fileId}`);
|
||||
const optionMenu = this.widget.element(by.css(`button[id='${fileId}-option-menu']`));
|
||||
await BrowserActions.click(optionMenu);
|
||||
await BrowserActions.waitUntilActionMenuIsVisible();
|
||||
await browser.waitForAngular();
|
||||
const actionButton = element(by.css(`button#${fileId}-${actionName}`));
|
||||
await BrowserActions.click(actionButton);
|
||||
await BrowserVisibility.waitUntilElementIsNotVisible(actionButton);
|
||||
await browser.waitForAngular();
|
||||
}
|
||||
|
||||
async removeFile(fileName: string): Promise<void> {
|
||||
|
@@ -42,7 +42,7 @@ export class PeopleCloudComponentPage {
|
||||
}
|
||||
|
||||
async searchAssigneeAndSelect(name: string): Promise<void> {
|
||||
await BrowserActions.clearSendKeys(this.peopleCloudSearch, name);
|
||||
await BrowserActions.clearSendKeys(this.peopleCloudSearch, name, 100);
|
||||
await this.selectAssigneeFromList(name);
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user