Skip to content

test(e2e): people journeys (users and companies) - #1156

Merged
mortondev merged 5 commits into
mainfrom
test/product-e2e-people
Nov 20, 2026
Merged

mortondev merged 5 commits into
mainfrom
test/product-e2e-people

Conversation

@mortondev

@mortondev mortondev commented Nov 20, 2026 •

Copy link
Copy Markdown
Member

End-to-end journeys for People: users and companies (PPL-U, PPL-C), part 1 of 3. Segments (PPL-G) and team access / portal account (PPL-T, PPL-ACC) are separate PRs on the same base.

Helpers: apps/web/e2e/product/people.ts (portal users with real sessions, boards, posts/votes/comments through the portal server functions, leads, attribute definitions, REST keys, a GET-aware server-function caller).

Covered

  • people/users.spec.ts (21 tests): PPL-U-42 (@smoke); @core: U-01, U-02, U-11, U-14, U-19, U-20, U-21, U-23, U-24, U-26, U-29, U-31 (quarantined), U-32, U-36, U-41, U-43 (quarantined), U-75
  • people/users-api.spec.ts (20 tests): @core: U-39, U-45, U-46, U-47, U-57, U-59 (+ quarantined copy), U-60 (+ quarantined attribute write), U-61 (+ quarantined), U-64 (+ quarantined copy), U-65, U-66 (+ quarantined), U-70, U-72; @nightly: U-69 (two tests)
  • people/user-attributes.spec.ts (3 tests, @core): U-50, U-55, U-56
  • people/companies.spec.ts (16 tests, @core): C-01, C-02, C-03 (quarantined), C-04, C-07, C-08, C-10, C-12 + C-14, C-15, C-23 + C-25, C-26, C-29 + C-30, C-31 (quarantined), C-36, C-37

Every passing test was broken once (wrong role, wrong expected value, mutated precondition) and went red.

Quarantined (product bugs, entries in e2e/QUARANTINE.md)

  • PPL-U-43: removing a voter leaves posts.vote_count one too high (user.service.ts:514 lets post_votes cascade).
  • PPL-U-31: merging a lead whose vote collides with the user's leaves the count one too high (principal-repoint.ts:220 drops the vote, no decrement).
  • PPL-U-59: GET /api/v1/users/:id for a non-portal id says "Portal user not found not found" ($principalId.ts:46).
  • PPL-U-64: DELETE /api/v1/users/:id for an unknown id says "Member not found" (responses.ts:182).
  • New: PPL-U-60 / U-61 / U-66: every attribute or externalId write on an EXISTING user over REST (PATCH and identify) is a 500. user.identify.ts:81 and :257 interpolate a JS array into ${metadataRemovals}::text[], which drizzle expands to () (syntax error) or ($4) (malformed array literal). Fix: bind the array as one parameter.
  • PPL-C-03: admin-created companies get source='api' (company.service.ts:94 default; createCompanyFn passes none).
  • PPL-C-31: duplicate attribute key refusal is silent in the dialog (scalar-attribute-list.tsx:299 has no catch).

Not covered here (handed back)

  • Owner questions skipped: U-40 (block semantics), U-48 and C-38 (legacy admin gating vs *.manage), U-68 (identify on teammates).
  • U-21: the single-sign-on-managed-domain and EMAIL_CHANGED race branches (need an identity provider / are a race).
  • U-74 (lower, @core): DB-backed export test for the users/leads boundary not written yet.
  • All remaining @nightly rows of PPL-U and PPL-C.

Local runs

Fresh database, --workers=2 --retries=0, whole tests/people/ folder: 3 of 3 runs green (47 tests, quarantined ones excluded). Each quarantined test confirmed red on its bug assertion.

@mortondev mortondev added the run-product-e2e Run the product e2e core suite on this PR label Nov 20, 2026
@mortondev

Copy link
Copy Markdown
Member Author

Once #1193 (metadata writes on an existing user) is on main, lift the quarantine for PPL-U-60, PPL-U-61, PPL-U-66:

  • apps/web/e2e/QUARANTINE.md: the people/users-api.spec.ts › REST /api/v1/users bullet.
  • apps/web/e2e/tests/people/users-api.spec.ts: delete the QUARANTINE_ATTR_WRITE const and use { tag: '@core' } at its three uses (PPL-U-60, PPL-U-61, PPL-U-66).
    Run the whole file before lifting: these tests also check attribute value coercion.

@mortondev
mortondev force-pushed the test/product-e2e-people branch from 5300f19 to 7d4425e Compare November 20, 2026 10:59
@mortondev
mortondev merged commit fc25b66 into main Nov 20, 2026
31 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

run-product-e2e Run the product e2e core suite on this PR

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant