@@ -153,6 +153,36 @@ See `PATTERNS.md` Level 3-4 for linking and composition patterns.
153153- Forget ` OpaqueRef<T> ` annotations in ` .map() `
154154- Duplicate content from ` docs/common/ ` - reference it instead
155155
156+ ## Testing
157+ After developing the charm, if you have Playwright MCP, you must test the charm with it unless the user asks you not to.
158+
159+ ### Navigate to the Charm URL
160+
161+ ``` javascript
162+ await page .goto (" http://localhost:8000/<SPACE_NAME>/<CHARM_ID>" );
163+ ```
164+ Note: Server may be https://toolshed.saga-castor.ts.net instead.
165+
166+ ### Register/Login (First Time Only)
167+
168+ When you first visit, you'll see a login page. Register with a passphrase:
169+
170+ 1 . Click the "➕ Register" button
171+ 2 . Click the "🔑 Generate Passphrase" button
172+ 3 . Click the "🔒 I've Saved It - Continue" button
173+
174+ This will log you in and load the charm.
175+
176+ ### Test the Charm
177+
178+ Once logged in, you can interact with the charm using Playwright commands.
179+
180+ Then use Playwright to:
181+
182+ 1 . Navigate to the URL
183+ 2 . Complete registration (first time)
184+ 3 . Test the charm functionality
185+
156186## Deployment
157187
158188### Prerequisite: ` ct ` tool availability
@@ -197,18 +227,18 @@ This tool is used to:
197227./dist/ct dev recipe.tsx --no-run
198228
199229# 2. Deploy to test space
200- ./dist/ct charm new --identity claude.key --api-url https://toolshed.saga-castor.ts.net/ --space test-space recipe.tsx
230+ ./dist/ct charm new --identity claude.key --api-url https://toolshed.saga-castor.ts.net --space test-space recipe.tsx
201231# Record the charm ID returned
202232
203233# 3. Inspect deployed charm
204- ./dist/ct charm inspect --identity claude.key --api-url https://toolshed.saga-castor.ts.net/ --space test-space --charm [charm-id]
234+ ./dist/ct charm inspect --identity claude.key --api-url https://toolshed.saga-castor.ts.net --space test-space --charm [charm-id]
205235```
206236
207237#### Iteration Cycle
208238
209239``` bash
210240# Update existing charm (much faster than deploying new)
211- ./dist/ct charm setsrc --identity claude.key --api-url https://toolshed.saga-castor.ts.net/ --space test-space --charm [charm-id] recipe.tsx
241+ ./dist/ct charm setsrc --identity claude.key --api-url https://toolshed.saga-castor.ts.net --space test-space --charm [charm-id] recipe.tsx
212242```
213243
214244** Note:** Don't pre-test syntax unless deployment fails. The deployment process validates automatically.
@@ -217,7 +247,7 @@ This tool is used to:
217247
218248``` bash
219249# Get source from deployed charm
220- ./dist/ct charm getsrc --identity claude.key --api-url https://toolshed.saga-castor.ts.net/ --space [space] --charm [id] ./recipe.tsx
250+ ./dist/ct charm getsrc --identity claude.key --api-url https://toolshed.saga-castor.ts.net --space [space] --charm [id] ./recipe.tsx
221251```
222252
223253### Quick Command Reference
@@ -227,16 +257,16 @@ This tool is used to:
227257./dist/ct dev recipe.tsx --no-run
228258
229259# Deploy new charm
230- ./dist/ct charm new -i claude.key -a https://toolshed.saga-castor.ts.net/ -s space recipe.tsx
260+ ./dist/ct charm new -i claude.key -a https://toolshed.saga-castor.ts.net -s space recipe.tsx
231261
232262# Update existing charm
233- ./dist/ct charm setsrc -i claude.key -a https://toolshed.saga-castor.ts.net/ -s space -c charm-id recipe.tsx
263+ ./dist/ct charm setsrc -i claude.key -a https://toolshed.saga-castor.ts.net -s space -c charm-id recipe.tsx
234264
235265# Inspect charm
236- ./dist/ct charm inspect -i claude.key -a https://toolshed.saga-castor.ts.net/ -s space -c charm-id
266+ ./dist/ct charm inspect -i claude.key -a https://toolshed.saga-castor.ts.net -s space -c charm-id
237267
238268# Get source from charm
239- ./dist/ct charm getsrc -i claude.key -a https://toolshed.saga-castor.ts.net/ -s space -c charm-id output.tsx
269+ ./dist/ct charm getsrc -i claude.key -a https://toolshed.saga-castor.ts.net -s space -c charm-id output.tsx
240270
241271# For full ct command reference, use the ct skill
242272```
0 commit comments