Skip to content

test(e2e): add visitor invite coverage for workplace - #492

Draft
sharmilaseenivasan17 wants to merge 1 commit into
developfrom
automated-testing
Draft

sharmilaseenivasan17 wants to merge 1 commit into
developfrom
automated-testing

Conversation

@sharmilaseenivasan17

@sharmilaseenivasan17 sharmilaseenivasan17 commented Sep 15, 2026

Copy link
Copy Markdown

Visitor-invite coverage for the workplace app, alongside the existing desk
specs. Today's work (rooms, Your Bookings, the desk gaps and parking) is a
separate PR, #494, stacked on this branch.

23 tests. 22 passing, 1 blocked on an app defect, 0 failing.

Area Tests Passing Blocked
Visitor invites 23 22 1

Coverage rows are in E2E_USER_STORIES.md §1a (VIS-01 … VIS-23); the working
handover is e2e/VISITOR_E2E_HANDOVER.md.

What is covered

Invite one visitor · invite several · cancel from the app · decline the cancel ·
another user cannot see or delete yours, with a control · a bad email address is
refused before anything is sent · a visitor removed before sending is not
invited · all-day invites · a required reason · pass number and the
international flag · company and the guest record · the chosen start time and
length · limits on what the form offers · booking for a colleague, as host and
as booker · the Associate badge on both schedules · check in and back out · too
early refused by both the app and the API · editing a future-dated delegated
invite · removing one person from a group.

Findings — seven, none filed

ID What happens
VIS-B8 In single-visitor mode, saving an edit throws _.toJSON is not a function and sends nothing — the user sees only that raw string. Multi-visitor mode, the shipped default, is fine. This is the one blocked test.
VIS-B9 A host cannot make two overlapping group invites, whoever the visitors are: the group container is named ${host}[${date created}], so every group invite that host makes that day shares one asset id and the backend rightly refuses the overlap.
VIS-B1 The same visitor can be booked twice into one slot; the backend returns 201 both times. Desks refuse this, and product says visitors should too.
Host flags visitors.can_book_for_anyone renders the host picker, but the choice is only kept if visitors.can_book_for_others is also set. One without the other silently discards the host — no error, no clue.
Listing limit GET /bookings defaults to limit=100 and the schedule sends include_deleted=true, so past 100 soft-deleted bookings a user stops seeing new ones.
Deep link ?booking=<id> never opens the details modal: booking-card.component.ts checks params.has('booking') then compares the id against params.get('event'), a parameter that is not there.
Dead config bookings.allowed_daily_visitor_count is never read anywhere in this repo.

Reproducers for the first three live in e2e/support/repro/.

Structure

Visitor support code is in e2e/support/visitor/, deliberately separate from
e2e/support/{env,api,flows}.ts so nothing visitor-shaped can break the desk
specs — git diff on those three files is empty. e2e/tsconfig.json and a
bun run e2e:typecheck script are new; nothing type-checked the specs before.

Running it

e2e/stack/up.sh
export E2E_BACKEND_URL=https://localhost:9443
bun run e2e:typecheck
bunx playwright test --config apps/workplace/playwright.config.ts \
  --project=local apps/workplace/e2e/local/visitor-*.spec.ts

Before this is merged, please read this

Stale bookings. Each run leaves soft-deleted rows behind, and past 100 per
user the card-dependent specs break in a way that looks nothing like the cause.
It needs either a backend change or a purge step before this suite goes near CI,
and it is an environment decision rather than a spec change.

🤖 Generated with Claude Code

23 tests across 11 spec files, mirroring the existing desk coverage:
invite (single and group), cancel from the app, form validation, settings,
visitor details, times, booking for a colleague, check-in/check-out,
editing, and visibility between users.

22 pass; 1 is fixme, blocked on an app bug where saving an edit in
single-visitor mode throws and sends nothing.

Visitor support code lives in e2e/support/visitor/ so the desk specs cannot
be affected - no shared support file is changed. Also adds e2e/tsconfig.json
and a bun run e2e:typecheck script; nothing type-checked the specs before.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
@vercel

vercel Bot commented Sep 15, 2026

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

1 Skipped Deployment
Project Deployment Actions Updated
frontend-templates Ignored Ignored Preview Sep 16, 2026 8:31am UTC

@greptile-apps greptile-apps Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Your trial has ended. Reactivate Greptile to resume code reviews.

@sharmilaseenivasan17
sharmilaseenivasan17 marked this pull request as draft September 15, 2026 06:36
@sharmilaseenivasan17 sharmilaseenivasan17 changed the title test(e2e): add visitor invite coverage for workplace test(e2e): workplace coverage for visitors, rooms, Your Bookings, desks and parking Sep 16, 2026
@sharmilaseenivasan17 sharmilaseenivasan17 changed the title test(e2e): workplace coverage for visitors, rooms, Your Bookings, desks and parking test(e2e): add visitor invite coverage for workplace Sep 16, 2026

This branch has not been deployed

No deployments
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