Skip to content

feat(PLAT-553): Support for alphanumeric CNPJ with normalization to uppercase#600

Merged
MarcosViniciusPC merged 6 commits into
masterfrom
PLAT-553
May 26, 2026
Merged

feat(PLAT-553): Support for alphanumeric CNPJ with normalization to uppercase#600
MarcosViniciusPC merged 6 commits into
masterfrom
PLAT-553

Conversation

@MarcosViniciusPC

@MarcosViniciusPC MarcosViniciusPC commented May 21, 2026

Copy link
Copy Markdown
Contributor

Task

https://jirasoftware.catho.com.br/browse/PLAT-553

This pull request updates the CNPJ input component to support alphanumeric values (for the first 12 digits), ensures the last two digits are numeric, and automatically transforms input to uppercase. It also adds comprehensive tests for these changes and updates the CNPJ mask logic to enforce the new rules.

This pull request updates the GitHub Actions workflows to use a newer Ubuntu version and removes regression test steps from the CI pipeline. It also modifies the .gitignore file in the .loki directory.

CI/CD Workflow Updates:

  • Updated the runner environment from ubuntu-20.04 to ubuntu-22.04 in both .github/workflows/actions-development.yml and .github/workflows/actions-publish.yml for improved compatibility and security. [1] [2] [3]

  • Removed the regression test steps (yarn build:regression) from both workflow files, streamlining the CI process to only run unit tests. [1] [2]

Repository Maintenance:

  • Removed current and difference from .loki/.gitignore, which may affect how visual regression artifacts are tracked in version control.# Task

CNPJ Input Improvements:

  • Updated the masks.cnpj mask in masks.js to allow alphanumeric characters for the first 12 positions and restrict the last two positions to numeric digits only.
  • Added a cnpjPipe function in InputTypes.jsx to automatically transform CNPJ input to uppercase while typing, and applied it to the Input.CNPJ component.

Testing Enhancements:

  • Added and updated unit tests in Input.unit.test.jsx to verify that the CNPJ input allows alphanumeric characters, ignores symbols, keeps the last two digits numeric, and transforms input to uppercase.
  • Added new tests in masks.unit.test.js to ensure the CNPJ mask correctly enforces alphanumeric and numeric-only rules for the appropriate positions.

Other:

  • Minor update to the test:regression:storybook script in package.json to remove the fuser command.

@sonarqubecloud

Copy link
Copy Markdown

@MarcosViniciusPC MarcosViniciusPC merged commit 0570987 into master May 26, 2026
4 checks passed
@MarcosViniciusPC MarcosViniciusPC deleted the PLAT-553 branch May 26, 2026 12:29
@github-actions

Copy link
Copy Markdown

🎉 This PR is included in version 9.34.0 🎉

The release is available on:

Your semantic-release bot 📦🚀

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

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants