Skip to content

Commit

Permalink
SUPINT-2431: Analyse and find the way to fix table elements issue in …
Browse files Browse the repository at this point in the history
…ftest
  • Loading branch information
rahuljain-dev committed Jan 8, 2025
1 parent 933f0d5 commit 5624387
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 5 deletions.
12 changes: 8 additions & 4 deletions packages/nuxeo-web-ui-ftest/pages/ui/browser/document_comment.js
Original file line number Diff line number Diff line change
@@ -1,20 +1,23 @@
import DocumentCommentThread from './document_comment_thread'; /* eslint import/no-cycle: 0 */

export default class DocumentComment {
constructor(element) {
constructor(element, index) {
this._el = element;
this._index = index;
}

get author() {
return (async () => {
const author = await this._el.element('.author');
const ele = await this._el.elements('.author');
const author = await ele[this._index];
return author;
})();
}

get dialog() {
return (async () => {
const dialog = this._el.element('#dialog');
const ele = this._el.elements('#dialog');
const dialog = await ele[this._index];
return dialog;
})();
}
Expand Down Expand Up @@ -42,7 +45,8 @@ export default class DocumentComment {

get text() {
return (async () => {
const text = await this._el.element('.text span');
const ele = await this._el.elements('.text span');
const text = await ele[this._index];
return text;
})();
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ export default class DocumentCommentThread extends BasePage {
let trueIndex;
for (let i = 0; i < comments.length; i++) {
const item = await comments[i];
const comment = new DocumentComment(item);
const comment = new DocumentComment(item, i);
const authorName = await comment.author;
const authorText = await authorName.getText();
const commentText = await comment.text;
Expand Down

0 comments on commit 5624387

Please sign in to comment.