Use addFileAttribute in jest-junit config
What does this MR do?
In #119032 (closed), we added a column to the Unit Test Report to display the test file name (/spec/frontend/something/something_spec.js
) for each test case. But our jest tests don't pass the file name into the XML artifact they generate, so the new column is blank
This MR adds the addFileAttribute option to our jest-junit config, which sets the JEST_JUNIT_ADD_FILE_ATTRIBUTE
environment variable when the tests run, which outputs the file name for each test case into the properties for its <testcase>
tag in the junit_jest.xml
artifact. This MR enables the new column added in #119032 (closed) to display the file name associated with each of our jest test cases
This change does not need a changelog entry:
Any developer-facing change (e.g., refactoring, technical debt remediation, test suite changes) should not have a changelog entry.
Screenshots
Does this MR meet the acceptance criteria?
Conformity
- [-] Changelog entry
-
Documentation (if required) -
Code review guidelines -
Merge request performance guidelines -
Style guides -
Database guides -
Separation of EE specific content
Availability and Testing
-
Review and add/update tests for this feature/bug. Consider all test levels. See the Test Planning Process. -
Tested in all supported browsers -
Informed Infrastructure department of a default or new setting change, if applicable per definition of done
Security
If this MR contains changes to processing or storing of credentials or tokens, authorization and authentication methods and other items described in the security review guidelines:
-
Label as security and @ mention @gitlab-com/gl-security/appsec
-
The MR includes necessary changes to maintain consistency between UI, API, email, or other methods -
Security reports checked/validated by a reviewer from the AppSec team