-
-
Notifications
You must be signed in to change notification settings - Fork 291
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
summaryReporter
doesn't print main testSuite when there are nested testSuites
#2810
Comments
If you're testing in a single browser at a time or focusing on one at a time, it's best to include the browser name only at the root level. If you're running cross-browser tests or multiple suites for different browsers, including the browser name at each suite level may be beneficial for clarity. |
Good point. However, I did further testing and this are my findings: {
...
browsers: [
playwrightLauncher({ product: 'chromium' }),
playwrightLauncher({ product: 'firefox' }),
playwrightLauncher({ product: 'webkit' })
],
...
} Report is independent of testing behavior. Results are always organized in this hierarchy:
Similar findings with PS: regardless of the browser comment, the main suite on each testFile report still needs to be fixed on the report. Unless someone wants to do it earlier, I'll try to post a PR covering all my findings in the next weeks. |
ok |
I manged to implement all changes. It works fine in regular and flatten mode. However, there seems to be a Mocha specific behavior where all definitions are always wrapped in an "invisible suite". As stated in Mocha docs:
This explains why summary report was implemented that way. However, is this behavior also expected from other runners (e.g. Jasmine)? In case not, this seems to be the location where Mocha results could be unwrapped. A simple validation on root suite should be enough (no tests and only one suite child). web/packages/test-runner-mocha/src/collectTestResults.ts Lines 57 to 69 in aadcbea
Results when no root suite is defined:Results when root suite is defined:PS: extra indentation on failed test is associated to the usage of "aegean check mark (U+10102)". Not sure if working as expected or bug specific to PowerShell, or the usage of that character. |
Given:
src/index.spec.ts
Expected:
Actual:
Quick Analysis:
Seems to work by calling
logSuite
instead oflogResults
, in line 97web/packages/test-runner/src/reporter/summaryReporter.ts
Lines 94 to 101 in d5ae228
However, not sure if it's expected to have the browser name on all testSuite lines, or only the root one.
The text was updated successfully, but these errors were encountered: