Skip to content

Commit

Permalink
WEBUI-1507: update group test case
Browse files Browse the repository at this point in the history
  • Loading branch information
alokhyland committed May 8, 2024
1 parent c8c5a00 commit d4d2a33
Showing 1 changed file with 12 additions and 5 deletions.
17 changes: 12 additions & 5 deletions packages/nuxeo-web-ui-ftest/pages/ui/group.js
Original file line number Diff line number Diff line change
Expand Up @@ -77,10 +77,17 @@ export default class Group extends BasePage {
}

async searchResult(searchTerm) {
const ele = await this.el;
await driver.pause(1000);
const results = await ele.elements('nuxeo-card[name="groups"] .table [name="id"]');
const match = await results.find(async (e) => (await e.getText()) === searchTerm);
return match;
let matchedElements;
const match = async (e) => {
const currentText = await e.getText();
return currentText === searchTerm;
};
await driver.waitUntil(async () => {
matchedElements = await this.el.elements('nuxeo-card[name="groups"] .table [name="id"]');
const results = await matchedElements.some(match);
return results;
});

return matchedElements.find(match);
}
}

0 comments on commit d4d2a33

Please sign in to comment.