-
Notifications
You must be signed in to change notification settings - Fork 241
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
fix: Missing logging in report #603
fix: Missing logging in report #603
Conversation
@@ -66,11 +66,19 @@ def __init__(self, title, config): | |||
"collectedItems": 0, | |||
"runningState": "not_started", | |||
"environment": {}, | |||
"tests": [], | |||
"tests": defaultdict(list), |
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.
Made a small performance improvement to avoid having to iterate through all tests, we key them with the original nodeid
.
self._report.add_test(data) | ||
self._generate_report() | ||
if self._report.add_test(data, report): | ||
self._generate_report() |
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.
Only generate the report if we actually made a change (added a test in this case).
@@ -3,7 +3,7 @@ const { getCollapsedCategory } = require('./storage.js') | |||
class DataManager { | |||
setManager(data) { | |||
const collapsedCategories = [...getCollapsedCategory(), 'passed'] | |||
const dataBlob = { ...data, tests: data.tests.map((test, index) => ({ | |||
const dataBlob = { ...data, tests: Object.values(data.tests).flat().map((test, index) => ({ |
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.
This flattens (removes the nodeid key) from the JSON data.
@@ -84,6 +84,7 @@ const dom = { | |||
formattedDuration = formatDuration < 1 ? formattedDuration.ms : formattedDuration.formatted | |||
const resultBody = templateResult.content.cloneNode(true) | |||
resultBody.querySelector('tbody').classList.add(resultLower) | |||
resultBody.querySelector('tbody').id = testId |
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.
Added this to be able to differentiate between logs using the testId
.
9e4108e
to
6f5c4e0
Compare
6f5c4e0
to
63890ea
Compare
The logging output/capture was broken in the legacy report, where "teardown" logs wasn't visible in the tests log output.