OBPIH-7884 Test downloaded documents' content#90
Conversation
…d row value capture
…add writeBufferToFile function
…dler in PutawayDetailsPage
| const recipientName = rowValues.recipient?.name; | ||
| if (!_.isNil(recipientName)) { | ||
| await this.recipientSelect.findAndSelectOption(recipientName); | ||
| } |
There was a problem hiding this comment.
There was a typescript error introduced a long time ago, so here's the fix
| "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", |
There was a problem hiding this comment.
Is this https://github.com/mozilla/pdfjs-dist ? It looks like it is no longer supported as of 2024
There was a problem hiding this comment.
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.
There was a problem hiding this comment.
You're right... I had a brain fart and thought the two were different for some reason.
| return content.items | ||
| .map((item) => ('str' in item ? (item as TextItem).str : '')) | ||
| .join(' '); | ||
| }) |
There was a problem hiding this comment.
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?
There was a problem hiding this comment.
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.
No description provided.