Skip to content

test: smoke-test a card with a photo and custom relation labels - #9

Merged
dominik1001 merged 1 commit into
mainfrom
test/smoke-unusual-card
Nov 18, 2026
Merged

dominik1001 merged 1 commit into
mainfrom
test/smoke-unusual-card

Conversation

@dominik1001

Copy link
Copy Markdown
Owner

Adds a case to npm run smoke. The current smoke only covers cards built by create-contact, so it never sees an inline photo, Apple's grouped relation labels or long folded lines.

The new case:

  • seeds a card over plain HTTP, as another client would. The card has a ~40 KB folded PHOTO;ENCODING=b, item1.X-ABLABEL:constructor with its X-ABRELATEDNAMES, and an Apple _$!<Spouse>!$_ pair
  • asserts that get-contact returns the card's fields
  • calls update-contact to change NOTE, then asserts that every other unfolded line of the stored card is unchanged, PHOTO and the relation lines included
  • deletes the card in a finally, so no test data is left behind

The comparison uses the card as the server stored it, because Radicale reorders properties on PUT. Radicale also rejects ENCODING=BASE64 values with a 400, so the photo uses the vCard 3.0 ENCODING=b form.

Verified locally against Radicale, set up as in CI

  • passes on main
  • fails on feat: return contact relations and omit binary vCard payloads #4's head (f363240) with people.includes is not a function, because a free-text relation label of constructor crashes get-contact
  • fails when the built update-contact is patched to drop PHOTO, reporting update-contact lost or changed properties: PHOTO;…
  • npm run validate passes

🤖 Generated with Claude Code

Real address books hold cards with inline photos, Apple's grouped
X-ABLABEL/X-ABRELATEDNAMES pairs and long folded lines. Relation labels
are free text, so a label such as `constructor` is valid. Seed such a card
over plain HTTP and check that get-contact reads it and that
update-contact keeps every property it does not change.

The comparison uses the card as the server stored it, because Radicale
reorders properties on PUT. Radicale also rejects ENCODING=BASE64 values,
so the photo uses the vCard 3.0 ENCODING=b form.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@dominik1001
dominik1001 merged commit 028b19a into main Nov 18, 2026
10 checks passed
@dominik1001
dominik1001 deleted the test/smoke-unusual-card branch November 18, 2026 09:57
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant