From 314fbee352061ffd8feaa97e9a015de8f277bd84 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Alexander=20R=C3=B6sel?= <320272+Traxmaxx@users.noreply.github.com> Date: Mon, 16 Oct 2023 15:03:04 +0200 Subject: [PATCH] fix: fix code blocks --- dashboard/README.md | 23 +++++++++++------------ 1 file changed, 11 insertions(+), 12 deletions(-) diff --git a/dashboard/README.md b/dashboard/README.md index ec0690013..9bd70ba70 100644 --- a/dashboard/README.md +++ b/dashboard/README.md @@ -38,20 +38,20 @@ Open [http://localhost:3002/](http://localhost:3002). If you see the dashboard, ❗ If you get an error page such as this, please refer to the logs and our [docs](https://docs.komiser.io/docs/introduction/getting-started). ![Error Image](https://user-images.githubusercontent.com/13384559/224320642-0bf6814b-d97a-4ad9-95a0-ca82e353c5d0.png) - ## 🧩 Components Komiser components are documented under `/components` > 💡 **Hint:** > We have the following import aliases defined in `tsconfig.json` +> > ```json > { -> "@components/": "/dashboard/components/", -> "@services/": "/dashboard/services/", -> "@environments/": "/dashboard/environments/", -> "@utils/": "/dashboard/utils/", -> "@styles/": "/dashboard/styles/" +> "@components/": "/dashboard/components/", +> "@services/": "/dashboard/services/", +> "@environments/": "/dashboard/environments/", +> "@utils/": "/dashboard/utils/", +> "@styles/": "/dashboard/styles/" > } > ``` @@ -86,7 +86,6 @@ We use Jest & React Testing Library for our unit tests. - To run the unit tests, run: `npm run test:watch`, hit `p`, then `card` image - **Testing convention:** - ✅ All new Utils need to be tested. Existing ones when being changed @@ -146,14 +145,15 @@ describe('Card', () => { ``` If you're looking for an example with event firing and state updates, have a look at `components/select-checkbox/SelectCheckbox.test.tsx`: + ```typescript it('opens the dropdown when clicked', () => { const { getByRole, getByText } = render( {}} + label="Test Label" + query="provider" + exclude={[]} + setExclude={() => {}} /> ); @@ -248,7 +248,6 @@ export default { > Remember: Storybook is not just a tool but also a way to document components. Ensure you provide meaningful names, descriptions, and use cases to help other developers understand the use and purpose of each component. - ## 🤝 Contributing We welcome all contributors to join us on the mission of improving Komiser, especially when it comes to writing tests and adding documentation.