Skip to content

Comments

[DPEDE-4229] Add sonarqube coverage to Chi repo#1918

Open
josecarlosgonzalezv wants to merge 5 commits intoCenturyLink:masterfrom
josecarlosgonzalezv:feat/DPEDE-4229-add-sonarqube-coverage-to-chi-repo
Open

[DPEDE-4229] Add sonarqube coverage to Chi repo#1918
josecarlosgonzalezv wants to merge 5 commits intoCenturyLink:masterfrom
josecarlosgonzalezv:feat/DPEDE-4229-add-sonarqube-coverage-to-chi-repo

Conversation

@josecarlosgonzalezv
Copy link
Contributor

https://lumen.atlassian.net/browse/DPEDE-4229

This pull request introduces significant improvements to the CI/CD pipeline, code coverage reporting, and end-to-end (E2E) testing for the Chi project. It adds and configures code coverage tooling, tightens quality gate thresholds, enhances SonarQube integration, and updates or adds E2E Cypress tests. Additionally, it removes obsolete or redundant test files and improves code formatting for better readability.

CI/CD Pipeline and Code Coverage Enhancements:

  • Added a .nycrc configuration file to enable and configure NYC code coverage for JavaScript files in src/chi, with support for lcov and text-summary reports.
  • Updated the Jenkins pipeline (Jenkinsfile) to include a new "Build Chi - Testing" stage, stash/unstash build and coverage artifacts, and archive NYC/coverage outputs for further analysis. [1] [2]
  • Improved SonarQube integration by un-stashing coverage artifacts before analysis and specifying the correct lcov report path in sonar-project.properties. [1] [2]
  • Tightened quality gate thresholds in qgate1-sonar.json, reducing allowed code smells, bugs, and vulnerabilities, and raising minimum code coverage to 80%.
  • Updated SonarQube project properties to include only relevant source files, set encoding, and configure coverage reporting. [1] [2]

E2E and Coverage-Related Test Updates:

  • Added new Cypress E2E tests for the date picker component, covering popover behavior, date limits, toggling, setting dates, navigation, and edge cases.
  • Set Cypress environment variable to enable coverage collection in cypress.config.cjs.
  • Removed the outdated or redundant chi-tabs.cy.js Cypress E2E test file.
  • Improved code formatting and readability in the drawer.cy.js Cypress test file. [1] [2] [3] [4]

Pipeline and Test Reporting Improvements:

  • Enhanced test reporting and artifact handling in Jenkins, including conditional stashing/archiving of Cypress reports, coverage, and NYC outputs, and updated adoption/quality gate logic. [1] [2] [3] [4] [5]

Summary of Most Important Changes:

CI/CD and Code Coverage:

  • Added .nycrc to enable JavaScript code coverage reporting with NYC, including lcov and text-summary reporters.
  • Introduced a new "Build Chi - Testing" stage and improved artifact stashing/archiving for build, coverage, and NYC outputs in Jenkinsfile. [1] [2]
  • Updated SonarQube integration to use the correct lcov report and improved artifact handling for coverage analysis. [1] [2]

Quality Gates and SonarQube:

  • Tightened SonarQube quality gate thresholds, reducing allowed code smells/bugs and increasing minimum code coverage to 80%.
  • Refined SonarQube project properties to include only relevant files and set proper encoding.

E2E Tests and Coverage:

  • Added comprehensive new Cypress E2E tests for the date picker component, improving coverage and reliability of UI testing.
  • Enabled coverage collection in Cypress by adding the coverage: true environment variable.
  • Removed the obsolete chi-tabs.cy.js test file.

Test Code Formatting:

  • Improved formatting and readability of assertions in drawer.cy.js Cypress test file. [1] [2] [3] [4]

@josecarlosgonzalezv josecarlosgonzalezv requested a review from a team as a code owner January 16, 2026 15:37
@lumen-jenkins-prod
Copy link

The CI pipeline did not run successfully in https://jenkinsprod.corp.intranet:8443/job/UX-CHI/job/Productive/job/Chi/job/PR-1918/1/. ❌

@lumen-jenkins-prod
Copy link

The CI pipeline did not run successfully in https://jenkinsprod.corp.intranet:8443/job/UX-CHI/job/Productive/job/Chi/job/PR-1918/2/. ❌

@lumen-jenkins-prod
Copy link

The CI pipeline did not run successfully in https://jenkinsprod.corp.intranet:8443/job/UX-CHI/job/Productive/job/Chi/job/PR-1918/3/. ❌

@lumen-jenkins-prod
Copy link

The CI pipeline did not run successfully in https://jenkinsprod.corp.intranet:8443/job/UX-CHI/job/Productive/job/Chi/job/PR-1918/4/. ❌

@lumen-jenkins-prod
Copy link

The CI pipeline did not run successfully in https://jenkinsprod.corp.intranet:8443/job/UX-CHI/job/Productive/job/Chi/job/PR-1918/5/. ❌

@lumen-jenkins-prod
Copy link

The CI pipeline did not run successfully in https://jenkinsprod.corp.intranet:8443/job/UX-CHI/job/Productive/job/Chi/job/PR-1918/6/. ❌

@lumen-jenkins-prod
Copy link

The CI pipeline did not run successfully in https://jenkinsprod.corp.intranet:8443/job/UX-CHI/job/Productive/job/Chi/job/PR-1918/7/. ❌

@lumen-jenkins-prod
Copy link

The CI pipeline did not run successfully in https://jenkinsprod.corp.intranet:8443/job/UX-CHI/job/Productive/job/Chi/job/PR-1918/8/. ❌

@lumen-jenkins-prod
Copy link

The CI pipeline did not run successfully in https://jenkinsprod.corp.intranet:8443/job/UX-CHI/job/Productive/job/Chi/job/PR-1918/9/. ❌

@lumen-jenkins-prod
Copy link

The CI pipeline did not run successfully in https://jenkinsprod.corp.intranet:8443/job/UX-CHI/job/Productive/job/Chi/job/PR-1918/10/. ❌

@lumen-jenkins-prod
Copy link

The CI pipeline did not run successfully in https://jenkinsprod.corp.intranet:8443/job/UX-CHI/job/Productive/job/Chi/job/PR-1918/11/. ❌

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants