Skip to content

Commit 1cfc9e7

Browse files
committed
FIX(CONTRIBUTING.MD): better tutorial on component test server
1 parent c52bec4 commit 1cfc9e7

File tree

1 file changed

+11
-7
lines changed

1 file changed

+11
-7
lines changed

CONTRIBUTING.md

Lines changed: 11 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -79,24 +79,26 @@ pnpm dev.ct
7979
apps/website/src/routes/docs/[KIT]/[COMPONENT]/examples/
8080
```
8181

82-
- This is the _only place_ where you can add files. So if you wanted to add a select component to the headless kit, you would add all your files to this directory:
82+
- This is the _only place_ where you can add files. So if you wanted to add an example called 'hero' to the headless select component, that file needs to have the following structure:
8383

8484
```shell
8585
apps/website/src/routes/docs/headless/select/examples/hero.tsx
8686
```
8787

88-
- Remenber to follow the component test server's URL structure. The default message on the "home page" of the dev server is a reminder of how to use the address bar to actually view the file you want. By default it would have this structure:
88+
- Remenber to follow the component test server's URL structure. The default message on the "home page" of the dev server is a reminder of how to use the address bar to view the file you want. By default it would have this structure:
8989

9090
```shell
91-
http://localhost:5173/[KIT]/[COMPONENT]/[EXAMPLE]
91+
http://localhost:5173/[KIT]/[COMPONENT]/[FILE]
9292
```
9393

9494
- So if you wanted to see the hero example for the headless select you would go here:
9595

9696
```shell
97-
http://localhost:5173/headless/select/hero/
97+
http://localhost:5173/headless/select/hero
9898
```
9999

100+
- TLDR: any file in 'apps/website/src/routes/docs/[KIT]/[COMPONENT]/examples/[FILE]' is served on '/[KIT]/[COMPONENT]/[FILE]'
101+
100102
Below is a list of other commands that you might find useful:
101103

102104
- Build the qwik-ui documentation:
@@ -125,13 +127,15 @@ pnpm preview.cloudflare
125127

126128
### 5. Make sure you add / modify tests
127129

128-
Run either command to make sure there aren't any errors.
130+
Run either command to make sure there aren't any errors. Both commands run the Playwrigth tests, but the second one will open Playwrigth in [UI mode](https://playwright.dev/docs/test-ui-mode)
129131

130132
```shell
131-
pnpm test.headless --skip-nx-cache
133+
pnpm test.pw.headless --skip-nx-cache
132134
```
133135

134-
This will set up the Cypress component testing GUI. Please refer to official Cypress [documentation](https://docs.cypress.io/guides/overview/why-cypress) for further assistance.
136+
```shell
137+
pnpm test.pw.headless --skip-nx-cache --ui
138+
```
135139

136140
### 6. Added a "changeset"
137141

0 commit comments

Comments
 (0)