Join GitHub today
GitHub is home to over 28 million developers working together to host and review code, manage projects, and build software together.Sign up
HTML result writer images/source have incorrect img src/href src #3857
What are you trying to achieve?
using the default --html result printer this is currently expecting the supporting files to be located in a folder called _output/_output
my output folder is configured in my codeception.yml file as such
actor: Tester paths: tests: tests log: tests/_output data: tests support: tests/_support
I expect the html reports to put the supporting files in tests/_output and the html report to reference these locations from tests/output
What do you get instead?
The HTML report is referencing tests/_output/_output as the location of the supporting files
Setting this to tests/_output/_output will actually make the report use /_output/_output/_output/_output as the location this appears to be a bug where the key is used but doubled. No matter what I set this to the supporting files are always just put in tests/output as expected but the html report is looking for them in output/output erroneously.
The failure image here is prepending _output to the img src despite not putting the files here. IF you create a folder called _output the result printer isn't writing the files here and putting them in the root of the folder specified in log: config key.
Oh, I see the bug was at this line:
$localPath = PathResolver::getRelativeDir($reports['png'], codecept_data_dir());
Somehow I've mistaken and used data dir as current directory. In case of data dir was configured to be