Skip to content

Commit

Permalink
group testcase
Browse files Browse the repository at this point in the history
  • Loading branch information
alokhyland committed May 2, 2024
1 parent 6ab9059 commit f8ffd50
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@ Then(/^I can search for the following groups$/, async function(table) {
const groups = await this.ui.group;
await groups.searchFor(rowFirstCol);
const resultEle = await groups.searchResult(rowFirstCol);
await driver.pause(3000);
const visible = await resultEle.waitForVisible();
if (!visible) {
throw new Error('Result not found');
Expand Down
5 changes: 4 additions & 1 deletion packages/nuxeo-web-ui-ftest/pages/ui/group.js
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,10 @@ export default class Group extends BasePage {
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);
const match = await results.find(async (e) => {
const elementText = await e.getText();
return elementText === searchTerm;
});
return match;
}
}

0 comments on commit f8ffd50

Please sign in to comment.