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:
@@ -113,7 +113,7 @@ export class ContentMetadataComponent implements OnChanges, OnInit, OnDestroy {
|
||||
ngOnInit() {
|
||||
this.cardViewUpdateService.itemUpdated$
|
||||
.pipe(
|
||||
debounceTime(200),
|
||||
debounceTime(500),
|
||||
takeUntil(this.onDestroy$))
|
||||
.subscribe(
|
||||
(updatedNode: UpdateNotification) => {
|
||||
@@ -124,7 +124,7 @@ export class ContentMetadataComponent implements OnChanges, OnInit, OnDestroy {
|
||||
);
|
||||
|
||||
this.cardViewUpdateService.updatedAspect$.pipe(
|
||||
debounceTime(200),
|
||||
debounceTime(500),
|
||||
takeUntil(this.onDestroy$))
|
||||
.subscribe((node) => this.loadProperties(node));
|
||||
|
||||
|
@@ -360,7 +360,7 @@ export class ContentNodeSelectorPanelComponent implements OnInit, OnDestroy {
|
||||
private onFileUploadEvent() {
|
||||
this.uploadService.fileUploadComplete
|
||||
.pipe(
|
||||
debounceTime(300),
|
||||
debounceTime(500),
|
||||
scan((files, currentFile) => [...files, currentFile], []),
|
||||
takeUntil(this.onDestroy$)
|
||||
)
|
||||
|
@@ -103,7 +103,7 @@ export class LibraryDialogComponent implements OnInit, OnDestroy {
|
||||
|
||||
this.form.controls['title'].valueChanges
|
||||
.pipe(
|
||||
debounceTime(300),
|
||||
debounceTime(500),
|
||||
mergeMap(
|
||||
(title) => this.checkLibraryNameExists(title),
|
||||
(title) => title
|
||||
|
@@ -34,7 +34,7 @@ export class AlfrescoApiServiceMock extends AlfrescoApiService {
|
||||
|
||||
initialize(): Promise<any> {
|
||||
return new Promise((resolve) => {
|
||||
this.alfrescoApiInitializedSubject.next(true);
|
||||
this.alfrescoApiInitialized.next(true);
|
||||
resolve();
|
||||
});
|
||||
}
|
||||
|
@@ -26,7 +26,7 @@ import {
|
||||
AlfrescoApiCompatibility, AlfrescoApiConfig, AspectsApi, TypesApi
|
||||
} from '@alfresco/js-api';
|
||||
import { AppConfigService, AppConfigValues } from '../app-config/app-config.service';
|
||||
import { Subject, Observable, BehaviorSubject } from 'rxjs';
|
||||
import { Subject, ReplaySubject } from 'rxjs';
|
||||
import { OauthConfigModel } from '../models/oauth-config.model';
|
||||
import { StorageService } from './storage.service';
|
||||
|
||||
@@ -41,8 +41,7 @@ export class AlfrescoApiService {
|
||||
*/
|
||||
nodeUpdated = new Subject<Node>();
|
||||
|
||||
protected alfrescoApiInitializedSubject: BehaviorSubject<any>;
|
||||
alfrescoApiInitialized: Observable<any>;
|
||||
alfrescoApiInitialized: ReplaySubject<boolean> = new ReplaySubject(1);
|
||||
|
||||
protected alfrescoApi: AlfrescoApiCompatibility;
|
||||
|
||||
@@ -113,15 +112,13 @@ export class AlfrescoApiService {
|
||||
constructor(
|
||||
protected appConfig: AppConfigService,
|
||||
protected storageService: StorageService) {
|
||||
this.alfrescoApiInitializedSubject = new BehaviorSubject(null);
|
||||
this.alfrescoApiInitialized = this.alfrescoApiInitializedSubject.asObservable();
|
||||
}
|
||||
|
||||
async load() {
|
||||
await this.appConfig.load().then(() => {
|
||||
this.storageService.prefix = this.appConfig.get<string>(AppConfigValues.STORAGE_PREFIX, '');
|
||||
this.initAlfrescoApi();
|
||||
this.alfrescoApiInitializedSubject.next(true);
|
||||
this.alfrescoApiInitialized.next(true);
|
||||
});
|
||||
}
|
||||
|
||||
|
@@ -16,7 +16,7 @@
|
||||
*/
|
||||
|
||||
import { Injectable } from '@angular/core';
|
||||
import { Observable, Subject, from, throwError, Observer } from 'rxjs';
|
||||
import { Observable, from, throwError, Observer, ReplaySubject } from 'rxjs';
|
||||
import { AlfrescoApiService } from './alfresco-api.service';
|
||||
import { CookieService } from './cookie.service';
|
||||
import { LogService } from './log.service';
|
||||
@@ -39,8 +39,8 @@ export class AuthenticationService {
|
||||
|
||||
private bearerExcludedUrls: string[] = ['auth/realms', 'resources/', 'assets/'];
|
||||
|
||||
onLogin: Subject<any> = new Subject<any>();
|
||||
onLogout: Subject<any> = new Subject<any>();
|
||||
onLogin: ReplaySubject<any> = new ReplaySubject<any>(1);
|
||||
onLogout: ReplaySubject<any> = new ReplaySubject<any>(1);
|
||||
|
||||
constructor(
|
||||
private appConfig: AppConfigService,
|
||||
|
@@ -253,7 +253,7 @@ describe('EditProcessFilterCloudComponent', () => {
|
||||
fixture.detectChanges();
|
||||
|
||||
component.editProcessFilterForm.valueChanges
|
||||
.pipe(debounceTime(300))
|
||||
.pipe(debounceTime(500))
|
||||
.subscribe(() => {
|
||||
const saveButton = fixture.debugElement.nativeElement.querySelector('[data-automation-id="adf-filter-action-saveAs"]');
|
||||
fixture.detectChanges();
|
||||
@@ -277,7 +277,7 @@ describe('EditProcessFilterCloudComponent', () => {
|
||||
fixture.detectChanges();
|
||||
|
||||
component.editProcessFilterForm.valueChanges
|
||||
.pipe(debounceTime(300))
|
||||
.pipe(debounceTime(500))
|
||||
.subscribe(() => {
|
||||
const saveButton = fixture.debugElement.nativeElement.querySelector('[data-automation-id="adf-filter-action-saveAs"]');
|
||||
fixture.detectChanges();
|
||||
|
@@ -131,7 +131,7 @@ describe('StartProcessCloudComponent', () => {
|
||||
const change = new SimpleChange(null, 'MyApp', true);
|
||||
component.ngOnChanges({ 'appName': change });
|
||||
fixture.detectChanges();
|
||||
tick(450);
|
||||
tick(550);
|
||||
|
||||
fixture.whenStable().then(() => {
|
||||
fixture.detectChanges();
|
||||
@@ -167,7 +167,7 @@ describe('StartProcessCloudComponent', () => {
|
||||
typeValueInto('#processName', 'OLE');
|
||||
typeValueInto('#processDefinitionName', 'processwithoutform2');
|
||||
fixture.detectChanges();
|
||||
tick(450);
|
||||
tick(550);
|
||||
|
||||
fixture.whenStable().then(() => {
|
||||
fixture.detectChanges();
|
||||
@@ -244,7 +244,7 @@ describe('StartProcessCloudComponent', () => {
|
||||
typeValueInto('#processName', 'My new process with form');
|
||||
typeValueInto('#processDefinitionName', 'processwithform');
|
||||
fixture.detectChanges();
|
||||
tick(450);
|
||||
tick(550);
|
||||
|
||||
fixture.whenStable().then(() => {
|
||||
fixture.detectChanges();
|
||||
@@ -271,7 +271,7 @@ describe('StartProcessCloudComponent', () => {
|
||||
typeValueInto('#processName', 'My new process with form');
|
||||
typeValueInto('#processDefinitionName', 'processwithform');
|
||||
fixture.detectChanges();
|
||||
tick(450);
|
||||
tick(550);
|
||||
|
||||
fixture.whenStable().then(() => {
|
||||
fixture.detectChanges();
|
||||
@@ -299,7 +299,7 @@ describe('StartProcessCloudComponent', () => {
|
||||
typeValueInto('#processName', 'My new process with form');
|
||||
typeValueInto('#processDefinitionName', 'processwithform');
|
||||
fixture.detectChanges();
|
||||
tick(450);
|
||||
tick(550);
|
||||
|
||||
fixture.whenStable().then(() => {
|
||||
fixture.detectChanges();
|
||||
@@ -356,7 +356,7 @@ describe('StartProcessCloudComponent', () => {
|
||||
const change = new SimpleChange(null, 'MyApp', true);
|
||||
component.ngOnChanges({ 'appName': change });
|
||||
fixture.detectChanges();
|
||||
tick(450);
|
||||
tick(550);
|
||||
|
||||
fixture.whenStable().then(() => {
|
||||
fixture.detectChanges();
|
||||
@@ -383,7 +383,7 @@ describe('StartProcessCloudComponent', () => {
|
||||
const change = new SimpleChange(null, 'MyApp', true);
|
||||
component.ngOnChanges({ 'appName': change });
|
||||
fixture.detectChanges();
|
||||
tick(450);
|
||||
tick(550);
|
||||
|
||||
fixture.whenStable().then(() => {
|
||||
fixture.detectChanges();
|
||||
|
@@ -118,7 +118,7 @@ export class StartProcessCloudComponent implements OnChanges, OnInit, OnDestroy
|
||||
});
|
||||
|
||||
this.processDefinition.valueChanges
|
||||
.pipe(debounceTime(300))
|
||||
.pipe(debounceTime(500))
|
||||
.pipe(takeUntil(this.onDestroy$))
|
||||
.subscribe((processDefinitionName) => {
|
||||
this.selectProcessDefinitionByProcesDefinitionName(processDefinitionName);
|
||||
|
@@ -379,7 +379,7 @@ export abstract class BaseEditTaskFilterCloudComponent<T> implements OnInit, OnC
|
||||
onFilterChange() {
|
||||
this.editTaskFilterForm.valueChanges
|
||||
.pipe(
|
||||
debounceTime(200),
|
||||
debounceTime(500),
|
||||
filter(() => this.isFormValid()),
|
||||
takeUntil(this.onDestroy$)
|
||||
)
|
||||
|
@@ -242,7 +242,7 @@ describe('EditServiceTaskFilterCloudComponent', () => {
|
||||
fixture.detectChanges();
|
||||
|
||||
component.editTaskFilterForm.valueChanges
|
||||
.pipe(debounceTime(300))
|
||||
.pipe(debounceTime(500))
|
||||
.subscribe(() => {
|
||||
const saveButton = fixture.debugElement.nativeElement.querySelector('[data-automation-id="adf-filter-action-save"]');
|
||||
fixture.detectChanges();
|
||||
@@ -328,7 +328,7 @@ describe('EditServiceTaskFilterCloudComponent', () => {
|
||||
fixture.detectChanges();
|
||||
|
||||
component.editTaskFilterForm.valueChanges
|
||||
.pipe(debounceTime(300))
|
||||
.pipe(debounceTime(500))
|
||||
.subscribe(() => {
|
||||
const saveButton = fixture.debugElement.nativeElement.querySelector('[data-automation-id="adf-filter-action-saveAs"]');
|
||||
fixture.detectChanges();
|
||||
@@ -352,7 +352,7 @@ describe('EditServiceTaskFilterCloudComponent', () => {
|
||||
fixture.detectChanges();
|
||||
|
||||
component.editTaskFilterForm.valueChanges
|
||||
.pipe(debounceTime(300))
|
||||
.pipe(debounceTime(500))
|
||||
.subscribe(() => {
|
||||
const saveButton = fixture.debugElement.nativeElement.querySelector('[data-automation-id="adf-filter-action-saveAs"]');
|
||||
fixture.detectChanges();
|
||||
|
@@ -257,7 +257,7 @@ describe('EditTaskFilterCloudComponent', () => {
|
||||
fixture.detectChanges();
|
||||
|
||||
component.editTaskFilterForm.valueChanges
|
||||
.pipe(debounceTime(300))
|
||||
.pipe(debounceTime(500))
|
||||
.subscribe(() => {
|
||||
const saveButton = fixture.debugElement.nativeElement.querySelector('[data-automation-id="adf-filter-action-save"]');
|
||||
fixture.detectChanges();
|
||||
@@ -343,7 +343,7 @@ describe('EditTaskFilterCloudComponent', () => {
|
||||
fixture.detectChanges();
|
||||
|
||||
component.editTaskFilterForm.valueChanges
|
||||
.pipe(debounceTime(300))
|
||||
.pipe(debounceTime(500))
|
||||
.subscribe(() => {
|
||||
const saveButton = fixture.debugElement.nativeElement.querySelector('[data-automation-id="adf-filter-action-saveAs"]');
|
||||
fixture.detectChanges();
|
||||
@@ -367,7 +367,7 @@ describe('EditTaskFilterCloudComponent', () => {
|
||||
fixture.detectChanges();
|
||||
|
||||
component.editTaskFilterForm.valueChanges
|
||||
.pipe(debounceTime(300))
|
||||
.pipe(debounceTime(500))
|
||||
.subscribe(() => {
|
||||
const saveButton = fixture.debugElement.nativeElement.querySelector('[data-automation-id="adf-filter-action-saveAs"]');
|
||||
fixture.detectChanges();
|
||||
|
@@ -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