[ACA-1683] add tests for viewer - general (#570)

* rename method to be more clear

* change some files to async / await as they were very difficult to follow

* add uploadApi and a few resource files needed by Viewer tests

* add Viewer e2e component and viewer general tests

* add tests for the other list views as well

* add “docx” to dictionary
This commit is contained in:
Adina Parpalita
2018-08-17 14:27:22 +03:00
committed by Denys Vuika
parent 5e4e8ed28c
commit c0321fe449
20 changed files with 747 additions and 449 deletions

View File

@@ -172,7 +172,7 @@ export class DataTable extends Component {
.then(() => browser.actions().mouseMove(item).click().click().perform());
}
clickOnRowByName(name: string): promise.Promise<any> {
selectItem(name: string): promise.Promise<any> {
const item = this.getRowFirstCell(name);
return Utils.waitUntilElementClickable(item)
.then(() => item.click());
@@ -183,7 +183,7 @@ export class DataTable extends Component {
.then(() => browser.actions().sendKeys(protractor.Key.COMMAND).perform())
.then(() => {
names.forEach(name => {
this.clickOnRowByName(name);
this.selectItem(name);
});
})
.then(() => browser.actions().sendKeys(protractor.Key.NULL).perform());