mirror of
https://github.com/Alfresco/alfresco-content-app.git
synced 2025-05-19 17:14:45 +00:00
[e2e] fix selectors (#116)
* fix selectors start chrome headless * use case insensitive
This commit is contained in:
parent
860b637c9c
commit
9681b459f7
@ -106,7 +106,7 @@ export class DataTable extends Component {
|
||||
}
|
||||
|
||||
getRowByName(name: string): ElementFinder {
|
||||
return this.body.element(by.css(`adf-datatable-cell [title="${name}"]`));
|
||||
return this.body.element(by.cssContainingText(`.adf-data-table-cell`, name));
|
||||
}
|
||||
|
||||
countRows(): promise.Promise<number> {
|
||||
@ -114,7 +114,7 @@ export class DataTable extends Component {
|
||||
}
|
||||
|
||||
// Navigation/selection methods
|
||||
doubleClickOnItemName(name: string): promise.Promise<void> {
|
||||
doubleClickOnItemName(name: string): promise.Promise<any> {
|
||||
const dblClick = browser.actions()
|
||||
.mouseMove(this.getRowByName(name))
|
||||
.click()
|
||||
@ -123,7 +123,7 @@ export class DataTable extends Component {
|
||||
return dblClick.perform();
|
||||
}
|
||||
|
||||
clickOnItemName(name: string): promise.Promise<void> {
|
||||
clickOnItemName(name: string): promise.Promise<any> {
|
||||
return this.getRowByName(name).click();
|
||||
}
|
||||
|
||||
|
@ -24,8 +24,8 @@ export class CreateOrEditFolderDialog extends Component {
|
||||
root: 'adf-folder-dialog',
|
||||
|
||||
title: '.mat-dialog-title',
|
||||
nameInput: 'input',
|
||||
descriptionTextArea: 'textarea',
|
||||
nameInput: '.mat-input-element[placeholder="Name" i]',
|
||||
descriptionTextArea: '.mat-input-element[placeholder="Description" i]',
|
||||
button: '.mat-dialog-actions button',
|
||||
validationMessage: '.mat-hint span'
|
||||
};
|
||||
|
@ -54,7 +54,7 @@ export class Sidenav extends Component {
|
||||
return this.component.element(by.cssContainingText(Sidenav.selectors.link, label));
|
||||
}
|
||||
|
||||
navigateToLinkByLabel(label: string): promise.Promise<void> {
|
||||
navigateToLinkByLabel(label: string): promise.Promise<any> {
|
||||
return this.getLinkByLabel(label).click();
|
||||
}
|
||||
}
|
||||
|
@ -19,7 +19,7 @@ import { browser, element, by, ElementFinder, promise, ExpectedConditions as EC
|
||||
import { BROWSER_WAIT_TIMEOUT } from './../configs';
|
||||
|
||||
export abstract class Page {
|
||||
private static USE_HASH_STRATEGY = true;
|
||||
private static USE_HASH_STRATEGY = false;
|
||||
|
||||
private locators = {
|
||||
app: by.css('app-root'),
|
||||
|
@ -63,7 +63,7 @@ describe('Recent Files', () => {
|
||||
.then(() => dataTable.isEmptyList())
|
||||
.then(empty => {
|
||||
if (empty) {
|
||||
browser.sleep(3000);
|
||||
browser.sleep(5000);
|
||||
recentFilesPage.refresh();
|
||||
}
|
||||
})
|
||||
|
@ -27,7 +27,8 @@ exports.config = {
|
||||
chromeOptions: {
|
||||
prefs: {
|
||||
'credentials_enable_service': false
|
||||
}
|
||||
},
|
||||
args: [ '--incognito', '--headless' ]
|
||||
}
|
||||
},
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user