Skip to content

Commit d9f9982

Browse files
committed
docs: update visual testing documentation and set default browser viewport size to 1280x768 in angular.json
1 parent 19dd88d commit d9f9982

2 files changed

Lines changed: 4 additions & 2 deletions

File tree

animated-transformer/.agents/skills/animated_transformer_style_principles/SKILL.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -129,7 +129,8 @@ Maintain close proximity between code and unit tests by placing TypeScript spec
129129
- **For exact equivalence**: `tf.test_util.expectArraysEqual(actual, expected)`
130130
- **For approximate floating-point matches**: `tf.test_util.expectArraysClose(actual, expected)`
131131
- **Async Tests**: Always mark spec callbacks that invoke asynchronous operations (like `data()` or `dataSync()`) as `async` and correctly `await` resolutions.
132-
- **Failure Screenshots & Temporary Files**: Browser failure screenshots or temporary test assets are ignored globally under `__screenshots__`. Clean them up proactively after fixing tests by running `pnpm clean-screenshots` or before finalizing tasks.
132+
- **Failure Screenshots & Temporary Files**: Visual testing baselines are stored in `__screenshots__` directories next to the `.spec.ts` files, while runtime test attachments and failure screenshots are saved in the `.vitest-attachments` directory in the project root. Both are ignored by git (via `.gitignore`). Clean them up proactively when needed.
133+
- **Inspecting UI state via test screenshots**: Instead of launching a browser subagent to check visual state or rendering (which is slow and resource-heavy), run the test suite and then view the generated PNG files inside the `.vitest-attachments` folder (for test run outputs/failures) or the `__screenshots__` directories (for baseline views) using the `view_file` tool.
133134

134135
---
135136

animated-transformer/angular.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -98,7 +98,8 @@
9898
"options": {
9999
"tsConfig": "tsconfig.spec.json",
100100
"browsers": ["chromium"],
101-
"headless": true
101+
"headless": true,
102+
"browserViewport": "1280x768"
102103
}
103104
}
104105
}

0 commit comments

Comments
 (0)