sharing
8 requirements and 21 scenarios in openspec/specs/sharing/spec.md. A scenario’s test is test('<scenario>') inside describe('<requirement>'), in Vitest or Playwright.
Inviting a user to a flat
Section titled “Inviting a user to a flat”Playwright: e2e/sharing.spec.ts
| Scenario | Tests |
|---|---|
| Inviting an address sends an invitation | Vitest src/features/sharing/sharing.server.test.tsPlaywright e2e/sharing.spec.ts |
| The invitation email is in the recipient’s language | Vitest src/features/sharing/sharing.server.test.ts |
| A user who already has access is not invited again | Vitest src/features/sharing/sharing.server.test.ts |
| An address with a pending invitation is not invited twice | Vitest src/features/sharing/sharing.server.test.tsPlaywright e2e/sharing.spec.ts |
| A member can’t invite | Vitest src/features/sharing/sharing.server.test.ts |
Accepting a flat invitation
Section titled “Accepting a flat invitation”Playwright: e2e/sharing.spec.ts
| Scenario | Tests |
|---|---|
| Accepting an invitation shows the flat in the list | Vitest src/features/sharing/sharing.server.test.tsPlaywright e2e/sharing.spec.ts |
| An invitation is only for the invited address | Vitest src/features/sharing/sharing.server.test.ts |
| An expired invitation can’t be accepted | Vitest src/features/sharing/sharing.server.test.ts |
| Accepting is refused at the flat limit | Vitest src/features/sharing/sharing.server.test.ts |
Declining a flat invitation
Section titled “Declining a flat invitation”Playwright: e2e/sharing.spec.ts
| Scenario | Tests |
|---|---|
| Declining removes the invitation | Vitest src/features/sharing/sharing.server.test.tsPlaywright e2e/sharing.spec.ts |
Cancelling a flat invitation
Section titled “Cancelling a flat invitation”Playwright: e2e/sharing.spec.ts
| Scenario | Tests |
|---|---|
| A cancelled invitation can’t be accepted | Vitest src/features/sharing/sharing.server.test.ts |
Listing who has access to a flat
Section titled “Listing who has access to a flat”Playwright: e2e/sharing.spec.ts
| Scenario | Tests |
|---|---|
| The Sharing page lists people and invitations | Vitest src/features/sharing/sharing.server.test.tsPlaywright e2e/sharing.spec.ts |
| Another user can’t open the Sharing page | Vitest src/features/sharing/sharing.server.test.tsPlaywright e2e/sharing.spec.ts |
Removing access to a flat
Section titled “Removing access to a flat”Playwright: e2e/sharing.spec.ts
| Scenario | Tests |
|---|---|
| The owner removes a member | Vitest src/features/sharing/sharing.server.test.tsPlaywright e2e/sharing.spec.ts |
| A member can’t remove access | Vitest src/features/sharing/sharing.server.test.ts |
| The owner can’t remove their own access | Vitest src/features/sharing/sharing.server.test.ts |
| An owner can’t remove another owner | Vitest src/features/ownership/ownership.server.test.ts |
Leaving a shared flat
Section titled “Leaving a shared flat”Playwright: e2e/sharing.spec.ts
| Scenario | Tests |
|---|---|
| A member leaves a flat | Vitest src/features/sharing/sharing.server.test.tsPlaywright e2e/sharing.spec.ts |
| The owner can’t leave | Vitest src/features/sharing/sharing.server.test.ts |
Limiting invitations
Section titled “Limiting invitations”No Playwright test: reaching the limits needs 11 or 21 invitations, each sending an email; Workers tests cover both limits with the server functions.
| Scenario | Tests |
|---|---|
| The 11th pending invitation is refused | Vitest src/features/sharing/sharing.server.test.ts |
| The 21st invitation in a day is refused | Vitest src/features/sharing/sharing.server.test.ts |