Coneto is a shared component library used across all applications at Systatum — including Workaty, Dashtomer, and others, designed with modernity, simplicity, and usability in mind.
To start the storybook locally:
pnpm install
pnpm storybookEach main component consists of two parts:
[component].tsx– the React component[component].stories.tsx– the Storybook file to display the component
- Install dependencies:
pnpm install - Start Storybook locally:
pnpm storybook
- Make any necessary changes to your component.
- Commit and push your changes.
- Create a pull request to the
mainbranch. - View your updates on GitHub through the automatically generated deploy preview link.
- Create your component test inside the
test/e2eortest/componentdirectory. Tests can be written for E2E scenarios or component behavior. Each component should have its own test file. - Write your test logic to cover expected behaviors, interactions, and visual, name the file using the format
[component].cy.tsfor test e2e and[component].cy.tsxfor test component then save it. - Commit and push your changes to the repository.
- To run tests locally:
-
Ensure that you have
cypressinstalled:pnpm add --save-dev cypress # you may need to do this ./node_modules/.bin/cypress install # install the cypress app locally
You will know that you need to install
cypressif you see this kind of error:Please reinstall Cypress by running: cypress install ---------- Cypress executable not found at: /Users/adam.h/Library/Caches/Cypress/14.5.3/Cypress.app/Contents/MacOS/Cypress
-
Run the storybook server, used for E2E testing:
pnpm run storybook -
Execute either use one of the following commands:
pnpm test-open– opens the Cypress Test Runner with an interactive UI.pnpm test-runorpnpm test-run-component– runs all tests in headless mode via the CLI. Ensure that you seeAll specs passed!eventually.
-
This repository uses:
@storybook/react-vite– the core framework that runs Storybook using Vite for faster builds and hot reloads@storybook/addon-essentials– a set of essential addons like docs, controls, actions, and viewport to enhance Storybook functionality
- Run unit tests:
pnpm test-openorpnpm test-runorpnpm test-run-component - Run the linter to check for unused code and issues:
pnpm lint
- Constants should always be in SNAKE_CASE_CAPITALS
- Helper functions, when they're not likely to be re-usable, should be put in the same file of the component, but located after the component's function declaration.
- Constants, when they're not likely to be re-usable, should be put in the same file of the compoennt.
- Build Storybook:
pnpm build-storybook - Push the build output
- Deploy it using your preferred platform (e.g., Vercel, Netlify, etc.)