Skip to content

OBPIH-7884 Test downloaded documents' content#90

Merged
alannadolny merged 11 commits into
mainfrom
OBPIH-7884
Jun 1, 2026
Merged

OBPIH-7884 Test downloaded documents' content#90
alannadolny merged 11 commits into
mainfrom
OBPIH-7884

Conversation

@alannadolny
Copy link
Copy Markdown
Collaborator

No description provided.

@alannadolny alannadolny self-assigned this May 29, 2026
Comment on lines +75 to 78
const recipientName = rowValues.recipient?.name;
if (!_.isNil(recipientName)) {
await this.recipientSelect.findAndSelectOption(recipientName);
}
Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

There was a typescript error introduced a long time ago, so here's the fix

Comment thread package.json
"eslint-plugin-playwright": "~1.0.1",
"eslint-plugin-promise": "~6.0.0",
"eslint-plugin-simple-import-sort": "~10.0.0",
"pdfjs-dist": "~3.11.174",
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is this https://github.com/mozilla/pdfjs-dist ? It looks like it is no longer supported as of 2024

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

To use PDF.js in a web application you can choose to use a pre-built version of the library or to build it from source. We supply pre-built versions for usage with NPM under the pdfjs-dist name. For more information and examples please refer to the wiki page on this subject.

pdfjs-dist repository was archived, but the PDF.js project itself is still actively maintained in https://github.com/mozilla/pdf.js. The archived repo was only the distribution mirror/package repository.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You're right... I had a brain fart and thought the two were different for some reason.

Comment thread src/utils/pdfUtils.ts
return content.items
.map((item) => ('str' in item ? (item as TextItem).str : ''))
.join(' ');
})
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

So if I'm understanding, this is pulling everything out of the PDF as a String, then we do a String search in pdfContainsValues to see if the PDF contains some text?

Copy link
Copy Markdown
Member

@ewaterman ewaterman left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The tests themselves look good from what I can tell. The only thing is that the new dependency is deprecated. I don't know if there's a similar alternative with proper support.

EDIT: Ignore me, I'm wrong. You're right it is still actively maintained in https://github.com/mozilla/pdf.js.

@alannadolny alannadolny merged commit e0ac496 into main Jun 1, 2026
1 check passed
@alannadolny alannadolny deleted the OBPIH-7884 branch June 1, 2026 14:27
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants