mirror of
https://github.com/Alfresco/alfresco-content-app.git
synced 2025-07-24 17:31:52 +00:00
fix e2e tests
This commit is contained in:
@@ -68,7 +68,7 @@ export class DataTable extends Component {
|
||||
return this.head.element(locator);
|
||||
}
|
||||
|
||||
sortByColumn(columnName: string): Promise<void> {
|
||||
sortByColumn(columnName: string): promise.Promise<void> {
|
||||
const column = this.getColumnHeaderByLabel(columnName);
|
||||
const click = browser.actions().mouseMove(column).click();
|
||||
|
||||
|
@@ -15,7 +15,7 @@
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
import { ElementFinder, by, browser, protractor, ExpectedConditions as EC } from 'protractor';
|
||||
import { ElementFinder, by, browser, protractor, ExpectedConditions as EC, promise } from 'protractor';
|
||||
import { BROWSER_WAIT_TIMEOUT } from '../../configs';
|
||||
import { Component } from '../component';
|
||||
|
||||
@@ -50,15 +50,15 @@ export class CreateOrEditFolderDialog extends Component {
|
||||
return browser.wait(EC.stalenessOf(this.title), BROWSER_WAIT_TIMEOUT);
|
||||
}
|
||||
|
||||
getTitle(): Promise<string> {
|
||||
getTitle(): promise.Promise<string> {
|
||||
return this.title.getText();
|
||||
}
|
||||
|
||||
isValidationMessageDisplayed(): Promise<boolean> {
|
||||
isValidationMessageDisplayed(): promise.Promise<boolean> {
|
||||
return this.validationMessage.isDisplayed();
|
||||
}
|
||||
|
||||
getValidationMessage(): Promise<string> {
|
||||
getValidationMessage(): promise.Promise<string> {
|
||||
return this.isValidationMessageDisplayed()
|
||||
.then(() => this.validationMessage.getText())
|
||||
.catch(() => '');
|
||||
@@ -73,7 +73,7 @@ export class CreateOrEditFolderDialog extends Component {
|
||||
return this;
|
||||
}
|
||||
|
||||
deleteNameWithBackspace(): Promise<void> {
|
||||
deleteNameWithBackspace(): promise.Promise<void> {
|
||||
const { nameInput } = this;
|
||||
|
||||
return nameInput.clear()
|
||||
|
@@ -43,11 +43,11 @@ export class UserInfo extends Component {
|
||||
.then(() => menu);
|
||||
}
|
||||
|
||||
get name(): Promise<string> {
|
||||
get name(): promise.Promise<string> {
|
||||
return this.fullName.getText();
|
||||
}
|
||||
|
||||
signOut(): Promise<void> {
|
||||
signOut(): promise.Promise<void> {
|
||||
return this.openMenu()
|
||||
.then(menu => {
|
||||
menu.clickMenuItem('Sign out');
|
||||
|
@@ -15,7 +15,7 @@
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
import { by, ElementFinder } from 'protractor';
|
||||
import { by, ElementFinder, promise } from 'protractor';
|
||||
import { Component } from '../component';
|
||||
|
||||
export class LoginComponent extends Component {
|
||||
@@ -61,7 +61,7 @@ export class LoginComponent extends Component {
|
||||
return this;
|
||||
}
|
||||
|
||||
submit(): Promise<void> {
|
||||
submit(): promise.Promise<void> {
|
||||
return this.submitButton.click();
|
||||
}
|
||||
}
|
||||
|
@@ -15,7 +15,7 @@
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
import { ElementFinder, ElementArrayFinder, by, browser, ExpectedConditions as EC } from 'protractor';
|
||||
import { ElementFinder, ElementArrayFinder, by, browser, ExpectedConditions as EC, promise } from 'protractor';
|
||||
import { BROWSER_WAIT_TIMEOUT } from '../../configs';
|
||||
import { Component } from '../component';
|
||||
|
||||
@@ -43,15 +43,15 @@ export class Menu extends Component {
|
||||
return this.component.element(by.cssContainingText(Menu.selectors.item, label));
|
||||
}
|
||||
|
||||
getItemTooltip(label: string): Promise<string> {
|
||||
getItemTooltip(label: string): promise.Promise<string> {
|
||||
return this.getItemByLabel(label).getAttribute('title');
|
||||
}
|
||||
|
||||
clicktNthItem(nth: number): Promise<void> {
|
||||
clicktNthItem(nth: number): promise.Promise<void> {
|
||||
return this.getNthItem(nth).click();
|
||||
}
|
||||
|
||||
clickMenuItem(label: string): Promise<void> {
|
||||
clickMenuItem(label: string): promise.Promise<void> {
|
||||
return this.getItemByLabel(label).click();
|
||||
}
|
||||
}
|
||||
|
@@ -49,7 +49,7 @@ export class Pagination extends Component {
|
||||
super(Pagination.selectors.root, ancestor);
|
||||
}
|
||||
|
||||
openMaxItemsMenu(): Promise<Menu> {
|
||||
openMaxItemsMenu(): promise.Promise<Menu> {
|
||||
const { menu, maxItemsButton } = this;
|
||||
|
||||
return maxItemsButton.click()
|
||||
@@ -57,7 +57,7 @@ export class Pagination extends Component {
|
||||
.then(() => menu);
|
||||
}
|
||||
|
||||
openCurrentPageMenu(): Promise<Menu> {
|
||||
openCurrentPageMenu(): promise.Promise<Menu> {
|
||||
const { menu, pagesButton } = this;
|
||||
|
||||
return this.pagesButton.click()
|
||||
|
@@ -32,7 +32,7 @@ export class ToolbarActions extends Component {
|
||||
super(ToolbarActions.selectors.root, ancestor);
|
||||
}
|
||||
|
||||
isEmpty(): Promise<boolean> {
|
||||
isEmpty(): promise.Promise<boolean> {
|
||||
return this.buttons.count().then(count => (count === 0));
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user