properties
13 requirements and 72 scenarios in openspec/specs/properties/spec.md. A scenario’s test is test('<scenario>') inside describe('<requirement>'), in Vitest or Playwright.
Adding a flat
Section titled “Adding a flat”Playwright: e2e/properties.spec.ts
| Scenario | Tests |
|---|---|
| Adding a flat shows it in the list | Playwright e2e/properties.spec.ts |
| The user who adds a flat gets access as an owner | Vitest src/features/properties/properties.server.test.ts |
| An invalid postcode is not saved | Playwright e2e/properties.spec.ts |
| An invalid floor area is not saved | Playwright e2e/properties.spec.ts |
Editing a flat
Section titled “Editing a flat”Playwright: e2e/properties.spec.ts
| Scenario | Tests |
|---|---|
| Editing a flat’s floor area | Playwright e2e/properties.spec.ts |
| The edit form shows the current details | Playwright e2e/properties.spec.ts |
Listing flats
Section titled “Listing flats”Playwright: e2e/archive-flat.spec.ts, e2e/ownership.spec.ts, e2e/properties.spec.ts, e2e/sharing.spec.ts, e2e/tenancies.spec.ts
| Scenario | Tests |
|---|---|
| Flats are listed by street address | Playwright e2e/properties.spec.ts |
| The card shows the owners and their shares | Vitest src/features/properties/PropertyList.test.tsxPlaywright e2e/ownership.spec.ts |
| A member’s card says the flat is shared with them | Playwright e2e/sharing.spec.ts |
| The card shows the tenancy status | Playwright e2e/tenancies.spec.ts |
| An archived flat is left out of the list | Playwright e2e/archive-flat.spec.ts |
First run without flats
Section titled “First run without flats”Playwright: e2e/archive-flat.spec.ts, e2e/properties.spec.ts, e2e/sharing.spec.ts
| Scenario | Tests |
|---|---|
| A new user sees how to add the first flat | Playwright e2e/properties.spec.ts |
| A new user sees a pending invitation | Playwright e2e/sharing.spec.ts |
| A user whose flats are all archived | Vitest src/features/properties/PropertyList.test.tsxPlaywright e2e/archive-flat.spec.ts |
Flats are shown only to users with access
Section titled “Flats are shown only to users with access”Playwright: e2e/properties.spec.ts, e2e/sharing.spec.ts
| Scenario | Tests |
|---|---|
| Another user’s flat is not listed | Vitest src/features/properties/properties.server.test.tsPlaywright e2e/properties.spec.ts |
| Another user’s flat cannot be opened | Vitest src/features/properties/properties.server.test.tsPlaywright e2e/properties.spec.ts |
| Another user’s flat cannot be changed | Vitest src/features/properties/properties.server.test.ts |
| A pending invitation does not give access | Vitest src/features/sharing/sharing.server.test.tsPlaywright e2e/sharing.spec.ts |
| A member can edit a shared flat | Vitest src/features/sharing/sharing.server.test.tsPlaywright e2e/sharing.spec.ts |
Limiting the number of flats
Section titled “Limiting the number of flats”No Playwright test: reaching the limit needs 100 flats, too slow to create through the browser; Workers tests cover it with the repository.
| Scenario | Tests |
|---|---|
| The 101st flat is refused | Vitest src/features/properties/properties.server.test.ts |
The flat details page
Section titled “The flat details page”Playwright: e2e/flat-details.spec.ts, e2e/properties.spec.ts
| Scenario | Tests |
|---|---|
| Selecting a flat opens its details page | Playwright e2e/properties.spec.ts |
| The rent card shows this month’s status | Playwright e2e/flat-details.spec.ts |
| A paid month has no record button | Playwright e2e/flat-details.spec.ts |
| A member sees the status but can’t record a payment | Playwright e2e/flat-details.spec.ts |
| Earlier months not fully paid are warned about | Playwright e2e/flat-details.spec.ts |
| A vacant flat | Playwright e2e/flat-details.spec.ts |
| A tenancy that starts later | Playwright e2e/flat-details.spec.ts |
| The tenancy card shows the rent and its upcoming change | Vitest src/features/properties/FlatDetailsPage.test.tsx |
| The charges with the capitalised total | Playwright e2e/flat-details.spec.ts |
| Each financing charge in effect today | Vitest src/features/properties/FlatDetailsPage.test.tsxPlaywright e2e/flat-details.spec.ts |
| This year’s charges open the charges page | Playwright e2e/flat-details.spec.ts |
| The latest entries | Playwright e2e/flat-details.spec.ts |
| Another user can’t open the details page | Vitest src/features/properties/details.server.test.tsPlaywright e2e/flat-details.spec.ts |
| The rent card includes the tenant fees | Vitest src/features/properties/FlatDetailsPage.test.tsxPlaywright e2e/flat-details.spec.ts |
| The usage charges apart from the charges | Vitest src/features/properties/FlatDetailsPage.test.tsxPlaywright e2e/flat-details.spec.ts |
| A flat without usage charges on the details page | Vitest src/features/properties/FlatDetailsPage.test.tsxPlaywright e2e/flat-details.spec.ts |
| The latest documents | Playwright e2e/flat-details.spec.ts |
| A flat without documents on the details page | Playwright e2e/flat-details.spec.ts |
Archiving a flat
Section titled “Archiving a flat”Playwright: e2e/archive-flat.spec.ts
| Scenario | Tests |
|---|---|
| Archiving hides the flat from the user’s list | Playwright e2e/archive-flat.spec.ts |
| Cancelling keeps the flat on the list | Playwright e2e/archive-flat.spec.ts |
| Archiving doesn’t change a co-owner’s list | Vitest src/features/properties/properties.server.test.tsPlaywright e2e/archive-flat.spec.ts |
| A member can archive | Vitest src/features/properties/properties.server.test.tsPlaywright e2e/archive-flat.spec.ts |
| An archived flat’s own new entry form keeps the flat | Vitest src/features/transactions/transactions.server.test.tsPlaywright e2e/archive-flat.spec.ts |
| An archived flat still counts towards the limit | Vitest src/features/properties/properties.server.test.ts |
| Another user can’t archive a flat | Vitest src/features/properties/properties.server.test.ts |
Archived flats on the flats list
Section titled “Archived flats on the flats list”Playwright: e2e/archive-flat.spec.ts
| Scenario | Tests |
|---|---|
| The archived section opens to show the flat | Vitest src/features/properties/PropertyList.test.tsxPlaywright e2e/archive-flat.spec.ts |
| An archived card opens the details page | Playwright e2e/archive-flat.spec.ts |
| No section without archived flats | Vitest src/features/properties/PropertyList.test.tsxPlaywright e2e/archive-flat.spec.ts |
Restoring an archived flat
Section titled “Restoring an archived flat”Playwright: e2e/archive-flat.spec.ts
| Scenario | Tests |
|---|---|
| Restoring brings the flat back to the list | Playwright e2e/archive-flat.spec.ts |
| Restoring from the menu | Playwright e2e/archive-flat.spec.ts |
Deleting a flat
Section titled “Deleting a flat”Playwright: e2e/delete-flat.spec.ts
Confirming the deletion of a flat
Section titled “Confirming the deletion of a flat”Playwright: e2e/delete-flat.spec.ts
| Scenario | Tests |
|---|---|
| An empty flat is deleted with a plain confirmation | Vitest src/features/properties/DeleteFlatDialog.test.tsxPlaywright e2e/delete-flat.spec.ts |
| The confirmation lists what is removed | Vitest src/features/properties/DeleteFlatDialog.test.tsxVitest src/features/properties/properties.server.test.tsPlaywright e2e/delete-flat.spec.ts |
| Deleting waits for the street address | Vitest src/features/properties/DeleteFlatDialog.test.tsxPlaywright e2e/delete-flat.spec.ts |
| Cancelling keeps the flat | Vitest src/features/properties/DeleteFlatDialog.test.tsxPlaywright e2e/delete-flat.spec.ts |
| A flat with only documents asks for the address | Vitest src/features/properties/properties.server.test.ts |
Housing company details of a flat
Section titled “Housing company details of a flat”Playwright: e2e/housing-company.spec.ts