You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Issue #2653. Add console logs to details section, and update tests
This changes the way we build details, and updates tests accordingly.
In build_details, we first attempt to parse the details argument as JSON.
If successful, we pull out the `consoleLog` key and store it to be used
to build the console logs section. If JSON parsing failed, we assume we
received a (legacy) string, and pass that into get_details.
Inside of get_details, if we're able to access the items() member of the
details dict, we return the formatted string as a group of <li>s, otherwise
if we get an AttributeError (which happens for a string, or other non-dict
type), we just return the string as-is.
When building the console section of details, if there are not any logs,
it will just render as an empty string. But if there are logs, we return a
new section with the content inside a <pre> tag. This is handled by the new
get_console_section method.
0 commit comments