You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
- Once you made some changes in either package (`headless` or `styled`) or the documentation website (`apps/website`), you will see them immediately reflected on the page.
67
67
68
+
Alternatively, if your only goal is to add a new component, or add new tests to an already existing component, you can run the component test server for significant speed improvements:
69
+
70
+
```shell
71
+
pnpm dev.ct
72
+
```
73
+
74
+
This mode is a lot more bare bones and requires more background knowledge to use effectively, so keep the following things in mind:
75
+
76
+
- Familiarize yourself with the following directory structure:
- 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:
- Remember 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:
89
+
90
+
```shell
91
+
http://localhost:5173/[KIT]/[COMPONENT]/[FILE]
92
+
```
93
+
94
+
- So if you wanted to see the hero example for the headless select you would go here:
95
+
96
+
```shell
97
+
http://localhost:5173/headless/select/hero
98
+
```
99
+
100
+
- TLDR: any file in 'apps/website/src/routes/docs/[KIT]/[COMPONENT]/examples/[FILE]' is served on '/[KIT]/[COMPONENT]/[FILE]'
101
+
68
102
Below is a list of other commands that you might find useful:
69
103
70
104
- Build the qwik-ui documentation:
@@ -93,13 +127,21 @@ pnpm preview.cloudflare
93
127
94
128
### 5. Make sure you add / modify tests
95
129
96
-
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 Playwright tests, but the second one will open Playwright in [UI mode](https://playwright.dev/docs/test-ui-mode)
97
131
98
132
```shell
99
-
pnpm test.headless --skip-nx-cache
133
+
pnpm test.pw.headless --skip-nx-cache
100
134
```
101
135
102
-
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
+
```
139
+
140
+
Keep in mind that currently all tests use Playwright and use the following naming convention:
141
+
142
+
```shell
143
+
component.test.ts
144
+
```
103
145
104
146
### 6. Added a "changeset"
105
147
@@ -128,7 +170,7 @@ pnpm change
128
170
**6.5.** Modify the created MD file
129
171
130
172
After the `change` command runs, a new MD file will be created under the `.changeset` folder.
131
-
ד
173
+
132
174
Please modify this file to include a descriptive message of the changes you made.
133
175
134
176
You can even add code examples if you need do, to describe a new feature for example. (pun intended 😉)
@@ -166,7 +208,7 @@ Make sure you check the following checkbox "Allow edits from maintainers" -
166
208
- Re-run the tests to ensure tests are still passing:
167
209
168
210
```shell
169
-
pnpm test.headless --skip-nx-cache
211
+
pnpm test.pw.headless --skip-nx-cache
170
212
```
171
213
172
214
- Merge the `main` branch if your branch is out of date
0 commit comments