pytest-dev / pytest-dev/pytest-html

Support FORMAT_TEXT on recent chrome with self contained html

Open
#273 2 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

bug
Dominant language
Python
Stars
779
Forks
260
PR merge metrics
No merged PRs in 30d

Description

Right now doing something like this:

import pytest

from pytest_html import extras

def test_ex(extra):
    print ("hey")
    extra.append(extras.text("Hello World!\n", "Hello Text"))

leads to something like this:

image

The problem is if you click the "Hello Text" link, chrome will close it immediately. This is a standard behavior as of recent chrome (https://stackoverflow.com/questions/46818033/opening-datatext-plain-window-in-chrome-showing-up-blank).

Can we come up with a different way to make the text openable/viewable in self contained html?

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by reproducing the extras.text example in a recent Chrome version and inspect how the pytest-html report creates the “Hello Text” link. Done means the text is viewable from the generated self-contained HTML instead of closing immediately.

Written by the indexing model from the issue text.

Assessment

Tech stack
python
Domain
testing-qa
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.