cypress-plugins
cypress-plugins copied to clipboard
report-dir appending to custom-url
Currently if I pass--report-dir
it appends the path/filename to the --custom-url
option. The problem I have is the report- dir folders are deployed to the root, so the folder structure doesn't exist on the environment and therefore the resulting link is broken.
If I don't pass report-dir
then the reports aren't found.
Is there a workaround for this?
Hey dude could you possibly provide some more context about your situation
here is some info on the custom url property, it’s meant to be a url and not a full path to the file location.
https://github.com/YOU54F/cypress-slack-reporter/issues/497#issuecomment-630514390
man these comments are old best tagging me for a quicker reply :) @simondib
hey @YOU54F just jumped in here from the other open issue. i'm using the file location since i'm running the scripts locally too
npx cypress-slack-reporter --report-dir=cypress/reports/mochareports --ci-provider=custom --custom-url=cypress/reports/mochareports/report.html

is there a workaround as mentioned by @simondib to handle this?
Sorry @YOU54F it's been a few months and I can't quite remember why this was an issue for me. Happy to close this or if @luisaangelicag considers it an issue still keep it open.
feel free to close this one, i think mine's a separate issue :)
@YOU54F this function:
const buildHTMLReportURL = async ({ reportDir, artefactUrl, }) => { const reportHTMLFilename = await getHTMLReportFilename(reportDir); return buildUrl(artefactUrl, reportDir, reportHTMLFilename); };
add reportDir name with --custom-url. It makes my report link broken because I am using PublishHTML report plugin and it keeps reports somewhere else not in Artefacts. So any way to fix it?