[ADF-5463] Rework Protractor tests - changes related to element/element… (#7284)

* ADF-5463 Rework Protractor tests - changes related to element/elements and duplication of locators

* Fix one which I missed

* Remove console.logs

* Remove console.logs

* Reverse the timeouts

* Fixed things TSLint

* Remove unused import

* Fixed broken tests

* Last test fixed
This commit is contained in:
MichalFidor
2021-10-08 17:28:37 +02:00
committed by GitHub
parent db6a638a2d
commit 1e62b46060
156 changed files with 1653 additions and 1647 deletions

View File

@@ -16,19 +16,19 @@
*/
import { BrowserActions, BrowserVisibility, DocumentListPage } from '@alfresco/adf-testing';
import { Locator, element, by, browser } from 'protractor';
import { browser, $$, $ } from 'protractor';
export class TrashcanPage {
contentList = new DocumentListPage(element(by.css('adf-document-list')));
rows: Locator = by.css('adf-document-list div[class*="adf-datatable-body"] adf-datatable-row[class*="adf-datatable-row"]');
tableBody = element.all(by.css('adf-document-list .adf-datatable-body')).first();
pagination = element(by.css('adf-pagination'));
emptyTrashcan = element(by.css('adf-empty-content'));
restoreButton = element(by.css(`button[title='Restore']`));
contentList = new DocumentListPage($('adf-document-list'));
rows = $$('adf-document-list div[class*="adf-datatable-body"] adf-datatable-row[class*="adf-datatable-row"]');
tableBody = $$('adf-document-list .adf-datatable-body').first();
pagination = $('adf-pagination');
emptyTrashcan = $('adf-empty-content');
restoreButton = $(`button[title='Restore']`);
async numberOfResultsDisplayed(): Promise<number> {
return element.all(this.rows).count();
return this.rows.count();
}
async waitForTableBody(): Promise<void> {