Skip to content

refactor: remove cypress and fix storybook#1040

Merged
lucasoares merged 25 commits into
masterfrom
refactor/remove-cypres-fix-story
Jun 11, 2025
Merged

refactor: remove cypress and fix storybook#1040
lucasoares merged 25 commits into
masterfrom
refactor/remove-cypres-fix-story

Conversation

@lucasoares

@lucasoares lucasoares commented Jun 11, 2025

Copy link
Copy Markdown
Member

This pull request introduces several important changes across multiple themes, including workflow enhancements, updates to project configuration, improvements to Storybook integration, and removal of Cypress testing files. Below is a summary of the most significant changes:

AFTER THIS PR, ANYONE CAN JUST CLONE THE PROJECT, RUN npm i AND THEN RUN npm run dev AND IT WILL JUST WORK!

Workflow Enhancements

  • Added new workflows for testing (.github/workflows/test.yml) and Storybook preview (.github/workflows/pr-storybook.yml) to automate testing and preview generation for pull requests. [1] [2]

Project Configuration Updates

  • Added ci as a new commit type in .cz-config.js for conventional commits.
  • Updated .eslintrc.js to automatically detect the React version for linting.

Storybook Integration Improvements

  • Fixed many issues with storybook build, deploy and stories visualization

Removal of Cypress Testing Files

  • Deleted Cypress configuration (cypress.config.ts) and component tests (cypress/component/Input.cy.tsx, cypress/component/InputChips.cy.tsx) as part of a cleanup effort. [1] [2] [3]
  • Migrated all Cypress tests to use stencil e2e tests

Husky Integration for Commit Validation

  • Added Husky hooks for pre-commit (.husky/pre-commit), pre-push (.husky/pre-push), and commit message validation (.husky/commit-msg) to enforce code quality and conventional commit standards. [1] [2] [3]
  • Remove ghooks since it is a outdated project and it is no longer updated

@lucasoares lucasoares requested a review from Copilot June 11, 2025 03:36

This comment was marked as outdated.

@cyber-sast

cyber-sast commented Jun 11, 2025

Copy link
Copy Markdown

Logo
Checkmarx One – Scan Summary & Detailsa5da012d-fed4-4b54-890c-b76e41f160fa

New Issues (13)

Checkmarx found the following issues in this Pull Request

Severity Issue Source File / Package Checkmarx Insight
HIGH CVE-2020-15138 Npm-prismjs-1.17.1
detailsRecommended version: 1.30.0
Description: Prism from 1.1.0 to 1.21.0 is vulnerable to Cross-Site Scripting. The easing preview of the Previewers plugin has an XSS vulnerability that allows ...
Attack Vector: NETWORK
Attack Complexity: HIGH

ID: pGZqk3Wdes7QUgcmhjE2qOr0UWWrpnmKJlzYC%2Fh%2BavU%3D
Vulnerable Package
HIGH CVE-2020-26237 Npm-highlight.js-9.13.1
detailsRecommended version: 10.4.1
Description: Highlight.js is a syntax highlighter written in JavaScript. Highlight.js versions before 9.18.2 and 10.1.2 are vulnerable to Prototype Pollution. A...
Attack Vector: NETWORK
Attack Complexity: LOW

ID: %2BFWJiy2%2BXkksK4atLfCyZExUjuXHeTBXoRc40syAJ6k%3D
Vulnerable Package
HIGH CVE-2021-23341 Npm-prismjs-1.17.1
detailsRecommended version: 1.30.0
Description: The package prismjs before 1.23.0 are vulnerable to Regular Expression Denial of Service (ReDoS) via the prism-asciidoc, prism-rest, prism-tap and ...
Attack Vector: NETWORK
Attack Complexity: LOW

ID: RQjNkbvRQZtDJFSK3vHKsJJwJuJ0QtI2KY7%2FhWHP4zE%3D
Vulnerable Package
HIGH Cx1f5f7dfa-e547 Npm-highlight.js-9.13.1
detailsRecommended version: 10.4.1
Description: Highlight.js is a syntax highlighting package written in Javascript. Versions 9.0.0 through 10.4.0 are vulnerable to exponential and polynomial ReD...
Attack Vector: NETWORK
Attack Complexity: LOW

ID: DMICAIkD9WdTucotc3m3Enpu9kJQGW3vI5LC5%2FGk06U%3D
Vulnerable Package
HIGH Cx1f5f7dfa-e547 Npm-highlight.js-9.18.5
detailsRecommended version: 10.4.1
Description: Highlight.js is a syntax highlighting package written in Javascript. Versions 9.0.0 through 10.4.0 are vulnerable to exponential and polynomial ReD...
Attack Vector: NETWORK
Attack Complexity: LOW

ID: mNBfIrpBD3VGL%2FF05p2GzWbcXrac1boUDXRXARR5Wsc%3D
Vulnerable Package
MEDIUM CVE-2021-32723 Npm-prismjs-1.17.1
detailsRecommended version: 1.30.0
Description: Prism is a syntax highlighting library. Some languages prior to 1.24.0 are vulnerable to Regular Expression Denial of Service (ReDoS). When Prism i...
Attack Vector: NETWORK
Attack Complexity: LOW

ID: k0%2B5weETAE2OCvVOqkrqCf%2F8JS415wG0ROysq8P%2BGyY%3D
Vulnerable Package
MEDIUM CVE-2021-3801 Npm-prismjs-1.17.1
detailsRecommended version: 1.30.0
Description: The prismjs package is vulnerable to ReDoS (regular expression denial of service). An attacker that is able to provide a crafted HTML comment as in...
Attack Vector: NETWORK
Attack Complexity: LOW

ID: 6xK0MuFJyiqftvnJ4WBJhyOERvw5OHxkNTF%2Fkr%2F1Fbo%3D
Vulnerable Package
MEDIUM CVE-2022-23647 Npm-prismjs-1.17.1
detailsRecommended version: 1.30.0
Description: Prism is a syntax highlighting library. Starting with version 1.14.0 and prior to version 1.27.0, Prism's command line plugin can be used by attack...
Attack Vector: NETWORK
Attack Complexity: LOW

ID: Zcc8ZIQUrOt8Z6Ic6AAzUiYLk8A%2BbuIOtGki8gGaUTY%3D
Vulnerable Package
MEDIUM CVE-2024-21535 Npm-markdown-to-jsx-6.11.4
detailsRecommended version: 7.4.0
Description: The package markdown-to-jsx versions prior to 7.4.0 are vulnerable to Cross-site Scripting (XSS) via the "src" property due to improper input sanit...
Attack Vector: NETWORK
Attack Complexity: LOW

ID: plxetRwBHcoPMiYH6eF8OOiBoaA47dKcbM5%2FFGbOlzo%3D
Vulnerable Package
MEDIUM CVE-2024-53382 Npm-prismjs-1.17.1
detailsRecommended version: 1.30.0
Description: Prism (aka PrismJS) allows DOM Clobbering (with resultant XSS for untrusted input that contains HTML but does not directly contain JavaScript), bec...
Attack Vector: NETWORK
Attack Complexity: HIGH

ID: uNcfST5BD0n%2FeDgoZM4jUa%2BJi%2BByemscBehLcBRMcbE%3D
Vulnerable Package
LOW Unpinned Actions Full Length Commit SHA /publish.yml: 52
detailsPinning an action to a full length commit SHA is currently the only way to use an action as an immutable release. Pinning to a particular SHA help...
ID: XtAeRnP7WhV6sbvQvTONteWPQHs%3D
LOW Unpinned Actions Full Length Commit SHA /publish.yml: 42
detailsPinning an action to a full length commit SHA is currently the only way to use an action as an immutable release. Pinning to a particular SHA help...
ID: vZSWXUY5fPgxN4%2BlvExSVenx1TY%3D
LOW Unpinned Actions Full Length Commit SHA /pr-storybook.yml: 50
detailsPinning an action to a full length commit SHA is currently the only way to use an action as an immutable release. Pinning to a particular SHA help...
ID: CH%2FyTwyQhMsd%2F2RCf1GpaHnm9gA%3D
Fixed Issues (3)

Great job! The following issues were fixed in this Pull Request

Severity Issue Source File / Package
MEDIUM Cx435a6fda-ca38 Npm-commander-2.9.0
MEDIUM Cx435a6fda-ca38 Npm-commander-2.1.0
LOW Unpinned Actions Full Length Commit SHA /nodejs.yml: 41

@lucasoares lucasoares marked this pull request as draft June 11, 2025 03:41

@lucasoares lucasoares left a comment

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

WIP: must test storybook github page creation, since I changed few things on storybook!

@lucasoares lucasoares temporarily deployed to storybook-preview June 11, 2025 17:14 — with GitHub Actions Inactive
@takenet takenet deleted a comment from github-actions Bot Jun 11, 2025
@github-actions

github-actions Bot commented Jun 11, 2025

Copy link
Copy Markdown
PR Preview Action v1.6.1
Preview removed because the pull request was closed.
2025-06-11 18:55 UTC

@lucasoares lucasoares requested a review from Copilot June 11, 2025 17:44
@lucasoares lucasoares marked this pull request as ready for review June 11, 2025 17:44

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

This PR refactors the project by removing Cypress testing files and updating Storybook configurations and workflows to improve the development experience.

  • Removed all Cypress test files and the Cypress configuration.
  • Updated Storybook preview, manager, and main configurations for improved integration and deployment.
  • Added new Husky hooks and GitHub workflows for linting, testing, and deployment.

Reviewed Changes

Copilot reviewed 79 out of 79 changed files in this pull request and generated no comments.

Show a summary per file
File Description
cypress/component/*.cy.tsx Removed Cypress component tests
cypress.config.ts Removed Cypress configuration file
.storybook/preview.js Updated custom elements initialization with window parameter
.storybook/preview-head.html Updated script paths for Storybook integration
.storybook/manager.js Adjusted Storybook manager settings with added layout options
.storybook/main.js Updated configuration for Storybook, including staticDirs and managerWebpack
.husky/* Added Husky hooks for linting, testing, and commit message validation
.github/workflows/* Added new workflows for testing, publishing, and PR Storybook previews
.github/copilot-instructions.md Updated project instructions for contributors
.eslintrc.js and .eslintignore Updated ESLint configuration to reflect current project structure
.cz-config.js Added a new commit type 'ci' for conventional commits
Comments suppressed due to low confidence (2)

.storybook/manager.js:10

  • The use of 'undefined' as a string for selectedPanel may be confusing. Consider using null or omitting the property if no default panel should be selected.
selectedPanel: 'undefined',

.storybook/preview-head.html:2

  • Ensure that the updated script paths for Storybook are correct and resolve as expected in the new project structure.
<script type="module" src="./blip-ds/blip-ds.esm.js"></script>

@lucasoares lucasoares temporarily deployed to storybook-preview June 11, 2025 17:56 — with GitHub Actions Inactive
@lucasoares lucasoares temporarily deployed to storybook-preview June 11, 2025 18:40 — with GitHub Actions Inactive
@lucasoares lucasoares merged commit 719f852 into master Jun 11, 2025
6 checks passed
@lucasoares lucasoares temporarily deployed to storybook-preview June 11, 2025 18:55 — with GitHub Actions Inactive
Copilot AI pushed a commit that referenced this pull request Jun 11, 2025
@lucasoares lucasoares deleted the refactor/remove-cypres-fix-story branch June 11, 2025 20:28
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.

5 participants