-
Notifications
You must be signed in to change notification settings - Fork 341
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[JENKINS-69658] - CSP compatibility for failed-test.jelly #451
Conversation
testShowlinks.forEach((element) => { | ||
element.onclick = (_) => { | ||
const testId = element.id.replace('-showlink', ''); | ||
showFailureSummary(testId, document.URL + "/summary"); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ok, can you please complete the Reproduction steps section of the Jira ticket (JENKINS-69658) description ?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ping @yaroslavafenkin
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@Artmorse commented in the ticket
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Perfect! I was able to do my tests! 😄
@yaroslavafenkin |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Still does not work as expected.
Request URL still looks wrong:
Providing steps I used:
- Create a freestyle project
- Select Git as SCM, as repository URL specify
https://github.com/yaroslavafenkin/security-notifier.git
. As branch specifier put*/fail
. - Add 'Invoke top-level Maven targets' build step. As goal set
test
. - Add 'Publish JUnit test result report' post-build action. As fileset includes put
**/*.xml
. - Save it and trigger a build.
- When it fails go to the build and then to 'Test Result' action.
- Open browser developer tools and go under 'All Failed Tests' hit the plus icon to obtain details about the failed test. You'll see failed request in the console, and should see an error as on the screenshot above.
Hey @Artmorse, I tried reviewing this PR and followed Yaroslav's steps. I'm not encountering any errors, it's working as expected. However, I noticed that we missed to report an occurrence of inline JS (summary.jelly#L34-L35) |
hey @Kevin-CB, yes I'll make the changes and I'll ping you when it's done! |
The issue
You can find all the issue details here.
My updates
I've moved the
onclick
calls from thefailed-test.jelly
file to thefailureSummary.js
one.