-
Notifications
You must be signed in to change notification settings - Fork 235
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Large img preview in self-contained mode #573
base: master
Are you sure you want to change the base?
Conversation
"ful-screen" preview of extra images attached to results for self-contained mode. Unlike image preview in normal mode implemented as part of page with little bit of js+css (likely also possible to implement via <a>, however adress line populated by base64 of the image would be really ugly in such case).
Thanks for the PR! Since we're about to release the first RC of v4 (aka next-gen) which is a complete rewrite of the plugin, let's put this on hold. One of the things we've implemented in v4 is an image gallery, and I think this has been solved there. |
Can you try |
Could be a breaking change there? I get:
|
Can you try ”from pytest_html import extras” instead? |
Right, I found the problem (I used pluginmanager to get pytest-html). This doesn't seem to be only breaking change, At least screenshots in self-contained mode don't seem to work at all (same code used with old and new version, got these results):
Footnote: Personally I don't appreciate new data-jsonblob. pytest-html is amazing also because of the speed. This won't improve the speed (not to mention that such result is unprocessable). |
This is awesome feedback, thank you! 🙏
Correct. I'm exploring ways of keeping the "pluginmanager" functionality. But I'd like to at least warn when it's used. That type of usage makes future changes difficult. The proper way is to use what I recommended, a regular import. As for "report.extra", that should be backwards compatible, but throws a
I'm having trouble reproducing at least 1. In my testing I get previews in both regular and self-contained mode. Would you mind sharing some reproducible example code/test?
Would you mind elaborating on this a little bit? How many tests does your report contain? Do all of them have extras in the form of images? In what way is the report slow? Rendering? Scrolling? etc. Also, as for the unprocessable bit, what are you doing today that isn't possible with the new report? My intent with v4 is that it should strive to be 1-to-1 with the old report as mush as possible. I'm trying my best to make as much as possible backwards compat. For things I want to change/remove I'm doing DeprecationWarnings so that I in v5 can remove them. If you check the docs, all deprecations should be listed and have suggested mitigations. Again, thank you for input - it's super valuable! 🙏 |
Proper v4 is released now if you're interested in revisiting this @mganisin ? |
"ful-screen" preview of extra images attached to results for self-contained mode. Unlike image preview in normal mode implemented as part of page with little bit of js+css (likely also possible to implement via , however adress line populated by base64 of the image would be really ugly in such case).