pytest-html icon indicating copy to clipboard operation
pytest-html copied to clipboard

Only clicking the Results row show the log information

Open snackattas opened this issue 1 year ago • 8 comments

This is more of an enhancement, but, it would be a huge improvement to the UI

Right now, the only thing you can click to show/expand the logs is the Results row. However, the Results row is kind of small. This report would be much easier to use if any of the rows, when clicked, showed/expanded the logs.

How can I make this happen?

snackattas avatar Apr 13 '23 13:04 snackattas

I'm not sure I follow.

When you say "any of the rows" do you mean "any of the cells" for a particular row?

One row == one test (not entirely true as setup/teardown can get their own rows).

Regardless, please try 4.0.0rc4.

We've changed so that instead of only the "show/hide" text being clickable, the entire Results cell is now clickable.

BeyondEvil avatar Apr 14 '23 08:04 BeyondEvil

When you say "any of the rows" do you mean "any of the cells" for a particular row?

Exactly. Right now only clicking the Results cell expands the logs...but my opinion is, it would be better UI if ANY of the cells (except the links) expanded the logs, even clicking the test name or the duration

snackattas avatar Apr 14 '23 14:04 snackattas

When you say "any of the rows" do you mean "any of the cells" for a particular row?

Exactly. Right now only clicking the Results cell expands the logs...but my opinion is, it would be better UI if ANY of the cells (except the links) expanded the logs, even clicking the test name or the duration

Cool, I'll see if it's an easy add. If it is - I'll add it to RC5.

BeyondEvil avatar Apr 14 '23 14:04 BeyondEvil

I think this is what you're after: https://github.com/pytest-dev/pytest-html/pull/656

Now all cells (incl. user added, excl. Links) will be clickable to expand/collapse the row.

BeyondEvil avatar Apr 14 '23 16:04 BeyondEvil

Thanks @BeyondEvil ! How would I pull in that PR to my test suite with pytest-html, is it on pypi?

snackattas avatar Apr 18 '23 16:04 snackattas

You can pip install master branch (it’s been merged). https://stackoverflow.com/questions/56161092/how-to-install-a-pip-module-from-its-master-branch-on-github#56161126

@snackattas

BeyondEvil avatar Apr 18 '23 16:04 BeyondEvil

I use pipenv so github installs aren't supported, need to grab it from a release unfortunately

snackattas avatar Apr 26 '23 23:04 snackattas

I use pipenv so github installs aren't supported, need to grab it from a release unfortunately

You should be able to do: pipenv install -e git+<your/target/git/repository/url.git>@branch#egg=package_name

If not, you can do pipenv run pip install ....

or

pipenv shell and then pip install ...

BeyondEvil avatar Apr 27 '23 15:04 BeyondEvil