mirror of
https://github.com/Alfresco/alfresco-content-app.git
synced 2025-10-08 14:51:14 +00:00
[ACA-1928] e2e improvements - part2 (#884)
* refactor Mark as favourite tests rename method to be more clear create separate methods for some checks and actions * forgot some changes * refactor delete-undo tests * some more refactoring * fix * small improvements / refactoring
This commit is contained in:
committed by
Cilibiu Bogdan
parent
b8ce533759
commit
24f5f01900
@@ -94,7 +94,7 @@ export class DataTable extends Component {
|
||||
return this.head.all(locator);
|
||||
}
|
||||
|
||||
async getHeaderText() {
|
||||
async getColumnHeadersText() {
|
||||
const el = this.getColumnHeaders();
|
||||
return await el.getText();
|
||||
}
|
||||
@@ -319,4 +319,27 @@ export class DataTable extends Component {
|
||||
async isItemPresent(name: string) {
|
||||
return await this.getRowByName(name).isPresent();
|
||||
}
|
||||
|
||||
async getEntireDataTableText() {
|
||||
return this.getRows().map((row) => {
|
||||
return row.all(this.cell).map(async cell => await cell.getText());
|
||||
});
|
||||
}
|
||||
|
||||
async getSitesNameAndVisibility() {
|
||||
const data = await this.getEntireDataTableText();
|
||||
return data.reduce((acc, cell) => {
|
||||
acc[cell[1]] = cell[3].toUpperCase();
|
||||
return acc;
|
||||
}, {});
|
||||
}
|
||||
|
||||
async getSitesNameAndRole() {
|
||||
const data = await this.getEntireDataTableText();
|
||||
return data.reduce((acc, cell) => {
|
||||
acc[cell[1]] = cell[2];
|
||||
return acc;
|
||||
}, {});
|
||||
}
|
||||
|
||||
}
|
||||
|
Reference in New Issue
Block a user