Skip to content

HTML logger use <summary> tag instead of JavaScript in template #4365

Closed

Description

Description

Currently in the HTML logger template there is a JavaScript which helps to expand and collapse the test result.

<script language="javascript">
function ToggleClass(id) {
var elem = document.getElementById(id);
if (elem.style.display == "none") {
elem.style.display = "block";
}
else {
elem.style.display = "none";
}
}
</script>

Steps to reproduce

dotnet test --logger html

Expected behavior

Test result page does not use additional JavaScript to enable interactions so that it can be used as a test summary page in GitHub actions.

Actual behavior

The script tag and its contents are rendered as text in the GitHub actions summary.

Diagnostic logs

None

Environment

Build version: current version (code is in main branch)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions