pytest-dev / pytest-html

Plugin for generating HTML reports for pytest results
Other
707 stars 236 forks source link

Fix for #806 (if results table order changed, hide/show details hover over broken) #807

Closed volkan-aslan closed 7 months ago

volkan-aslan commented 7 months ago

If you move 'col-result' to right hand side in results-table, it always shows 'hide details' even details are already collapsed.

the reason is, col-result is not the first td element of the results-table anymore and therefore it adds collapsible class to first td element.

because of this reason, below function does not work:

.col-result:hover::after {
  content: " (hide details)";
}

.col-result.collapsed:hover::after {
  content: " (show details)";
}

changing '.collapsible > td' to '.collapsible > col-result' fix this problem.

BeyondEvil commented 7 months ago

Thank you for your contribution!

Please see my comments.

volkan-aslan commented 7 months ago

I have added a test to verify if it adds the 'collapsed' class to col-result even if the table order changed.