-
Notifications
You must be signed in to change notification settings - Fork 244
Customizable html output structure #311
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
Customizable html output structure #311
Conversation
content will be created with the following document structure: body .content .content-header h1 .content-environment .content-summary .content-results #results-container Javascript for dealing with table interactivity has been updated to use container id instead of relying on appending as final element of body.
b71bbf9
to
8c97045
Compare
I might need some help with the npm/grunt tests. Also, I'm seeing 45 tests failing on Comments? |
89849ab
to
1473ea8
Compare
25b83e2
to
efa8c40
Compare
This is really nice work @memetb ! 💪 I would really like @ssbarnea input on this as well. 😊
Yes, I agree 100% and it's been on my ToDo for a long time - I just have not had the time. :( Are there core python libraries that support HTML natively? |
Thanks. Much appreciated. With regards to html libraries: I really like the whole So very high up on my list of requirements for that To that effect, the xml module that comes stock with python is pretty powerful. I can take that
To output from an element tree, one would have to do an
The weakness of |
Interesting! 🤔 |
@BeyondEvil: I've been dogfooding this addition, and I think the hook for the dom finalizer should include a session parameter to avoid ugly globals. I will add a final commit to this affect. |
@BeyondEvil , @ssbarnea: any notes or comments on this PR? |
@memetb Please resolve conflicts. |
@ssbarnea: Merge is done, however I'll have to check what has changed since I wrote this. evidently something no longer passes the node test. |
Fellas, (@ssbarnea, @BeyondEvil) I'm at a loss for what's going wrong here. The Likewise, the A second pair of eyes would be appreciated here. |
As the plugin has seen major rework in v4, I'm not sure how relevant this is anymore. If you the reader want to contribute with something here, please feel free to reopen. |
Following up on #310, I've made a basic modification to the html structure and how it is generated.
I also added a new hook called
pytest_html_report_final_dom
, the semantics of which are fairly straightforward.Commit e8bd795 in itself would be sufficient for addressesing issue #310. Commit 8c97045 is an added bonus to make life easier.
I would also recommend that perhaps in the future, a migration away from
py.xml.html
might be beneficial (in favor of core python libraries that support native tree walking etc). The py package is noted as being in maintenance mode and new projects are recommended not to be started using that library.Given that the changes required to upgrade
pytest-html
are actually somewhat limited, it might be a good migration target for the future.Please let me know if or how I should amend this PR to meet project guidelines.