Skip to content

Commit fc88a52

Browse files
committed
Improve E2E Magazine
Had to add dates to posts so e2e test can properly check facet rendering shorten some paragraphs add more coding conventions to agents add assertions about facets page of each collection. make sure unused facets are not rendered anywhere, and used facets and all of their values are rendered exactly once both in collection page and the collection's facet page (/by)
1 parent 0642cc8 commit fc88a52

File tree

29 files changed

+311
-54
lines changed

29 files changed

+311
-54
lines changed

AGENTS.md

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,9 +2,10 @@
22
- Avoid semicolons unless it's absolutely necessary
33
- Always use block statements even if it could be a one-liner
44
- Always use curly braces {} for control structures (if, for, while, etc.), even if the body is a single statement
5-
- Keep lines shorter than 80 columns
5+
- Keep lines shorter than 80 columns (including comments)
66
- For multiple expressions with logical operators (&&, ||), break lines after each operator
77
- No trailing whitespace at the end of lines
8+
- In multiline comments, add blank lines between logical points for readability
89

910
## Test Assertions Formatting
1011
- Assertion function call on one line (e.g., `t.ok(`, `t.equal(`, `t.notOk(`)
@@ -27,4 +28,9 @@
2728
- Focus on meaningful differences: testing the same logic with different data types (strings vs numbers) is redundant; test different behavior patterns instead
2829
- Include edge cases and boundary conditions (empty inputs, zero values, falsy values, etc.)
2930
- Remove tests that are functionally identical to existing ones, even if they test the same function in different scenarios
30-
- Prioritize tests that demonstrate unexpected or complex behaviors over tests that verify basic functionality with different data types
31+
- Prioritize tests that demonstrate unexpected or complex behaviors over tests that verify basic functionality with different data types
32+
33+
## DOM Element Assertions
34+
- Use `.length === 1` to assert an element is rendered exactly once (strict, single element expectation)
35+
- Use `.length !== 0` to assert elements exist but allow multiple (when multiple are expected)
36+
- Never use `.length > 0` as it's ambiguous about whether one or multiple elements are expected

0 commit comments

Comments
 (0)