[ADF-5235] Facet fix and improve search test (#6122)

* improve search test

* fix

* fix

* fix

* changes

* modify

* logout public URL

* improve stability some e2e

* fx lint

* fix

* fix

* improve

* fix

* improve

* fix

* fix

* fix

* fix [skip ci]

* fix

* some fix [skip ci]

* fix

* fix lint

* fix

* fix

* fix

* fix

* fix

* fix

* fix

* fix

* fix

* convert C291893 in manual test case in testrail

* fix

* fix
This commit is contained in:
Eugenio Romano
2020-09-21 09:35:01 +01:00
committed by GitHub
parent 9c427b3142
commit 46ccda68b3
111 changed files with 987 additions and 604 deletions
+9 -5
View File
@@ -275,22 +275,26 @@ export class ContentServicesPage {
return BrowserActions.getText(this.recentFileIcon);
}
// @deprecated prefer waitTillContentLoaded
async checkDocumentListElementsAreDisplayed(): Promise<void> {
await this.checkAcsContainer();
await this.waitForTableBody();
}
// @deprecated prefer waitTillContentLoaded
async checkAcsContainer(): Promise<void> {
await BrowserVisibility.waitUntilElementIsVisible(this.uploadBorder);
}
// @deprecated prefer waitTillContentLoaded
async waitForTableBody(): Promise<void> {
await this.contentList.waitForTableBody();
await this.contentList.dataTablePage().waitTillContentLoaded();
}
async goToDocumentList(): Promise<void> {
const navigationBarPage = new NavigationBarPage();
await navigationBarPage.clickContentServicesButton();
await this.contentList.dataTablePage().waitTillContentLoaded();
}
async clickOnContentServices(): Promise<void> {
@@ -352,10 +356,9 @@ export class ContentServicesPage {
return this.checkListIsSortedByCreatedColumn(sortOrder);
}
async doubleClickRow(nodeName): Promise<void> {
Logger.log(`Open Folder ${nodeName}`);
async doubleClickRow(nodeName: string): Promise<void> {
Logger.log(`Open Folder/File ${nodeName}`);
await this.contentList.doubleClickRow(nodeName);
await this.contentList.dataTablePage().waitTillContentLoaded();
}
async selectRow(nodeName): Promise<void> {
@@ -405,6 +408,7 @@ export class ContentServicesPage {
async openFolder(folderName: string): Promise<void> {
await this.doubleClickRow(folderName);
await this.contentList.dataTablePage().waitTillContentLoaded();
}
async checkContentIsDisplayed(content): Promise<void> {
@@ -695,7 +699,7 @@ export class ContentServicesPage {
async selectItemWithCheckbox(itemName: string): Promise<void> {
const item = element(by.css(`adf-datatable-row[aria-label="${itemName}"] mat-checkbox .mat-checkbox-input`));
await BrowserVisibility.waitUntilElementIsVisible(item);
await BrowserActions.clickScript(item);
await BrowserActions.click(item);
}
async unSelectItemWithCheckbox(itemName: string): Promise<void> {
@@ -15,7 +15,7 @@
* limitations under the License.
*/
import { by, element, browser, protractor } from 'protractor';
import { by, element, protractor } from 'protractor';
import { BrowserVisibility, BrowserActions } from '@alfresco/adf-testing';
export class CreateLibraryDialogPage {
@@ -47,7 +47,7 @@ export class CreateLibraryDialogPage {
}
async isDialogOpen(): Promise<any> {
return browser.isElementPresent(this.libraryDialog);
return BrowserVisibility.waitUntilElementIsVisible(this.libraryDialog);
}
async getTitle(): Promise<string> {
+4 -3
View File
@@ -15,7 +15,8 @@
* limitations under the License.
*/
import { browser, by, element, ElementFinder } from 'protractor';
import { by, element, ElementFinder } from 'protractor';
import { BrowserVisibility } from '@alfresco/adf-testing';
export class IconsPage {
@@ -28,7 +29,7 @@ export class IconsPage {
}
async isCustomIconDisplayed(name: string) {
const present = await browser.isElementPresent(this.locateCustomIcon(name));
const present = await BrowserVisibility.waitUntilElementIsVisible(this.locateCustomIcon(name));
if (present) {
return this.locateCustomIcon(name).isDisplayed();
} else {
@@ -37,7 +38,7 @@ export class IconsPage {
}
async isLigatureIconDisplayed(name: string) {
const present = await browser.isElementPresent(this.locateLigatureIcon(name));
const present = await BrowserVisibility.waitUntilElementIsVisible(this.locateLigatureIcon(name));
if (present) {
return this.locateLigatureIcon(name).isDisplayed();
} else {
+18 -5
View File
@@ -15,7 +15,7 @@
* limitations under the License.
*/
import { AppListCloudPage, BrowserActions, BrowserVisibility } from '@alfresco/adf-testing';
import { AppListCloudPage, BrowserActions, BrowserVisibility, Logger } from '@alfresco/adf-testing';
import { browser, by, element, ElementFinder } from 'protractor';
import { ProcessServicesPage } from '../../process-services/pages/process-services.page';
@@ -35,8 +35,11 @@ export class NavigationBarPage {
menuButton = element(by.css('button[data-automation-id="adf-menu-icon"]'));
formButton = this.linkMenuChildrenContainer.element(by.css('.app-sidenav-link[data-automation-id="Form"]'));
peopleGroupCloudButton = this.linkMenuChildrenContainer.element(by.css('.app-sidenav-link[data-automation-id="People/Group Cloud"]'));
logoutSection: ElementFinder = element(by.css('div[data-automation-id="adf-logout-section"]'));
async clickNavigationBarItem(title: string): Promise<void> {
Logger.log(`clickNavigationBarItem ${title}`);
const menu = element(by.css(`.app-sidenav-link[data-automation-id="${title}"]`));
await BrowserActions.closeMenuAndDialogs();
await BrowserActions.click(menu);
@@ -63,8 +66,8 @@ export class NavigationBarPage {
}
async clickProcessCloudButton() {
await this.clickNavigationBarItem('Process Cloud');
await BrowserVisibility.waitUntilElementIsVisible(this.linkMenuChildrenContainer);
await BrowserActions.closeMenuAndDialogs();
await BrowserActions.clickUntilIsNotVisible(this.getMenuItem('Process Cloud'), this.linkMenuChildrenContainer);
}
async navigateToProcessServicesCloudPage(): Promise<AppListCloudPage> {
@@ -87,8 +90,12 @@ export class NavigationBarPage {
}
async clickProcessServicesButton() {
await this.clickNavigationBarItem('Process Services');
await BrowserVisibility.waitUntilElementIsVisible(this.linkMenuChildrenContainer);
await BrowserActions.closeMenuAndDialogs();
await BrowserActions.clickUntilIsNotVisible(this.getMenuItem('Process Services'), this.linkMenuChildrenContainer);
}
private getMenuItem(title: string) {
return element(by.css(`.app-sidenav-link[data-automation-id="${title}"]`));
}
async navigateToProcessServicesPage(): Promise<ProcessServicesPage> {
@@ -172,8 +179,14 @@ export class NavigationBarPage {
}
async clickLogoutButton(): Promise<void> {
Logger.log('Logout');
await BrowserActions.closeMenuAndDialogs();
await BrowserActions.clickExecuteScript('.app-sidenav-link[adf-logout]');
try {
await BrowserVisibility.waitUntilElementIsVisible(this.logoutSection);
} catch (error) {
}
}
async clickThemeButton(): Promise<void> {