Skip to content

Commit

Permalink
improve parsing
Browse files Browse the repository at this point in the history
  • Loading branch information
dmlemeshko committed Jun 26, 2020
1 parent 2c4059e commit 9a0915f
Showing 1 changed file with 5 additions and 9 deletions.
14 changes: 5 additions & 9 deletions test/functional/page_objects/management/saved_objects_page.ts
Original file line number Diff line number Diff line change
Expand Up @@ -128,14 +128,10 @@ export function SavedObjectsPageProvider({ getService, getPageObjects }: FtrProv

async getRowTitles() {
const table = await testSubjects.find('savedObjectsTable');
const cells = await table.findAllByTestSubject('savedObjectsTableRowTitle');

const objects = [];
for (const cell of cells) {
objects.push(await cell.getVisibleText());
}

return objects;
const $ = await table.parseDomContent();
return $.findTestSubjects('savedObjectsTableRowTitle')
.toArray()
.map((cell) => $(cell).find('.euiTableCellContent').text());
}

async getRelationshipFlyout() {
Expand All @@ -162,7 +158,7 @@ export function SavedObjectsPageProvider({ getService, getPageObjects }: FtrProv
.toArray()
.map((row) => {
return {
title: $(row).find('td:nth-child(3)').text().replace('Title', '').trim(),
title: $(row).find('td:nth-child(3) .euiTableCellContent').text(),
canViewInApp: Boolean($(row).find('td:nth-child(3) a').length),
};
});
Expand Down

0 comments on commit 9a0915f

Please sign in to comment.