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
Copy file name to clipboardExpand all lines: docs/development/local-setup.md
+54-8Lines changed: 54 additions & 8 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -89,6 +89,60 @@ Then restart the Docker containers with:
89
89
90
90
You should now be able to access the application at [http://solidtime.test](http://solidtime.test) and the Vite server at [http://vite.solidtime.test](http://vite.solidtime.test).
91
91
92
+
## CLI tools
93
+
94
+
### Code formatting
95
+
96
+
You can format the PHP code with the following command:
97
+
98
+
```bash
99
+
./vendor/bin/sail composer fix
100
+
```
101
+
102
+
The frontend code can be formatted with:
103
+
104
+
```bash
105
+
./vendor/bin/sail npm run lint:fix
106
+
```
107
+
108
+
### Static code analysis
109
+
110
+
You can run the static code analysis for the PHP code with:
111
+
112
+
```bash
113
+
./vendor/bin/sail composer analyse
114
+
```
115
+
116
+
### Unit tests
117
+
118
+
You can run the unit tests with the following command:
119
+
120
+
```bash
121
+
./vendor/bin/sail php artisan test
122
+
```
123
+
124
+
If you want to run only some test you can use the `--filter` option:
125
+
126
+
```bash
127
+
./vendor/bin/sail php artisan test --filter SomeTestName
128
+
```
129
+
130
+
If you want to run all test as fast as possible, for example right before a commit, you can use this command:
131
+
132
+
```bash
133
+
./vendor/bin/sail composer ptest
134
+
```
135
+
136
+
### Generate ZOD Client
137
+
138
+
The Zodius HTTP client is generated using the following command:
139
+
140
+
```bash
141
+
npm run zod:generate
142
+
```
143
+
144
+
## E2E Tests
145
+
92
146
### Running E2E Tests
93
147
94
148
`./vendor/bin/sail up -d ` will automatically start a Playwright UI server that you can access at `https://playwright.solidtime.test`.
If E2E tests are not working at all, make sure you do not have the Vite server running and just run `npm run build` to update the version.
109
163
If the E2E tests are not working consistently and fail with a timeout during the authentication, you might want to delete the `test-results/.auth` directory to force new test accounts to be created.
110
-
111
-
### Generate ZOD Client
112
-
113
-
The Zodius HTTP client is generated using the following command:
0 commit comments