[e2e] fix selectors (#116)

* fix selectors
start chrome headless

* use case insensitive
This commit is contained in:
Adina Parpalita 2017-12-06 14:32:30 +02:00 committed by Cilibiu Bogdan
parent 860b637c9c
commit 9681b459f7
6 changed files with 10 additions and 9 deletions

View File

@ -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();
}

View File

@ -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'
};

View File

@ -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();
}
}

View File

@ -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'),

View File

@ -63,7 +63,7 @@ describe('Recent Files', () => {
.then(() => dataTable.isEmptyList())
.then(empty => {
if (empty) {
browser.sleep(3000);
browser.sleep(5000);
recentFilesPage.refresh();
}
})

View File

@ -27,7 +27,8 @@ exports.config = {
chromeOptions: {
prefs: {
'credentials_enable_service': false
}
},
args: [ '--incognito', '--headless' ]
}
},