mirror of
https://github.com/Tria-plc/edr-platform.git
synced 2026-08-28 00:50:56 +00:00
Adding all functionalities
This commit is contained in:
@@ -249,30 +249,64 @@ confirmed but the guard should be re-read at test-writing time.
|
||||
|
||||
## 4. `data-testid` prerequisite checklist
|
||||
|
||||
**Current state:** only nav-level testids exist (`nav-item-*`, `nav-group-*` from the redesign).
|
||||
**Zero on any feature page.** This is the blocker that stalled the passenger effort; treat it as a
|
||||
blocker, not a footnote. Note `SpotlightSearchProps` rejects `data-testid` — address the palette
|
||||
input by placeholder.
|
||||
**Landed** (this pass). The inventory below was corrected against the real components while wiring
|
||||
it in — several entries in the original draft named the wrong file or an element that doesn't exist
|
||||
in the shape assumed; those are noted inline. `SpotlightSearchProps` still rejects `data-testid` —
|
||||
the palette input is addressed by placeholder, not a testid.
|
||||
|
||||
**HR (`apps/edr-hr-web/src/features/**`)**
|
||||
- `leave/RequestModal.tsx`: `leave-request-type`, `leave-request-dates`, `leave-request-submit`
|
||||
- `leave/LeaveApprovalsPage.tsx`: `leave-approval-row-<id>`, `leave-approve-btn-<id>`, `leave-reject-btn-<id>`
|
||||
- `attendance/*`: `attendance-clock-in`, `attendance-clock-out`, `attendance-regularization-row-<id>`
|
||||
- `payroll/PayrollRunsPage.tsx`: `payroll-run-row-<id>`, `payroll-calculate-btn`, `payroll-approve-btn`, `payroll-mark-paid-btn`
|
||||
- `appraisal/*`: `appraisal-criterion-<key>`, `appraisal-weight-total`, `appraisal-submit-self`, `appraisal-submit-manager`
|
||||
- `recruitment/ApplicationDrawer.tsx`: `recruitment-stage-select`, `recruitment-hire-btn`
|
||||
- `reports/ReportsPage.tsx`: `report-row-<key>`, `report-export-btn`
|
||||
- `leave/components/RequestLeaveModal.tsx` (not `leave/RequestModal.tsx` — that file doesn't exist):
|
||||
`leave-request-type`, `leave-request-start-date`, `leave-request-end-date` (the pair sits inside a
|
||||
`leave-request-dates` group), `leave-request-submit`. Required a `data-testid` pass-through prop
|
||||
added to the shared `EthiopianDateInput` component, which didn't forward one.
|
||||
- `leave/LeaveApprovalsPage.tsx`: `leave-approval-row-<id>`, `leave-approve-btn-<id>`,
|
||||
`leave-reject-btn-<id>`
|
||||
- `attendance/components/ClockWidget.tsx`: `attendance-clock-in` / `attendance-clock-out` — one
|
||||
button, testid set conditionally on state, not two coexisting elements.
|
||||
- `attendance/AttendanceApprovalsPage.tsx`: `attendance-regularization-row-<id>`,
|
||||
`attendance-regularization-approve-btn-<id>`, `attendance-regularization-reject-btn-<id>` (the
|
||||
shared `Actions` component also renders the overtime tab's rows, so these testids appear there too
|
||||
— harmless, just note it if a spec ever needs to disambiguate).
|
||||
- `attendance/MyAttendancePage.tsx` (a **second**, distinct "regularization" UI — the employee's own
|
||||
history, not the approval queue above): `attendance-record-row-<id>`,
|
||||
`attendance-my-regularization-row-<id>`.
|
||||
- `payroll/PayrollRunsPage.tsx`: `payroll-run-row-<id>`, and — corrected from the original bare
|
||||
names, since these render once per row — `payroll-calculate-btn-<id>`, `payroll-approve-btn-<id>`,
|
||||
`payroll-mark-paid-btn-<id>`.
|
||||
- `appraisal/components/ScoringForm.tsx` (shared by both self- and manager-review — required adding
|
||||
a new `submitTestId?` prop, threaded from each caller): `appraisal-criterion-<code>` (keyed by the
|
||||
criterion's business `code`, not its DB id), `appraisal-weight-total`,
|
||||
`appraisal-submit-self`/`appraisal-submit-manager` (set via the new prop in
|
||||
`MyAppraisalsPage.tsx`/`AppraisalReviewsPage.tsx` respectively).
|
||||
- `recruitment/components/ApplicationDrawer.tsx`: `recruitment-hire-btn`,
|
||||
`recruitment-hire-confirm-btn`. **`recruitment-stage-select` does not exist** — there is no
|
||||
dropdown; stage advance is a row of per-stage buttons in `recruitment/OpeningDetailPage.tsx`,
|
||||
testid `recruitment-stage-advance-btn-<stage>`.
|
||||
- `reports/ReportsPage.tsx`: `report-export-btn-<name>` (the shared `exportButton(name, rows)`
|
||||
helper takes the testid once and every instantiation gets it automatically — 7 reports, not 6),
|
||||
plus a per-report row testid keyed by each table's natural key, e.g.
|
||||
`report-headcount-row-<unitId>`, `report-leave-liability-row-<employeeId>-<leaveTypeCode>`.
|
||||
|
||||
**Finance (`apps/finance-web/src/features/**`)**
|
||||
- `journals/NewJournalPage.tsx`: `journal-line-row-<n>`, `journal-balance-indicator`, `journal-post-btn`
|
||||
- `payables/PayablesPage.tsx`: `bill-row-<id>`, `bill-approve-btn-<id>`, `bill-record-payment-btn-<id>`
|
||||
- `budgeting/BudgetsPage.tsx`: `budget-row-<id>`, `budget-approve-btn`
|
||||
- `assets/AssetsPage.tsx`: `asset-row-<id>`, `run-depreciation-btn`, `dispose-btn-<id>`
|
||||
- `cutover/CutoverPage.tsx`: `cutover-readiness-check-<key>`, `cutover-set-date-btn`, `cutover-import-paste`, `cutover-import-preview`
|
||||
- `reports/ReportsPage.tsx`: `report-trial-balance-row-<code>`, `report-balance-sheet-total`
|
||||
|
||||
A starting inventory from reading route components, not exhaustive — whoever writes each spec adds
|
||||
what their scenario needs in the same pass.
|
||||
- `journals/NewJournalPage.tsx`: `journal-line-row-<key>` (a client-generated draft key, not a DB
|
||||
id — these rows have no id yet), `journal-balance-indicator` (on both the balanced and
|
||||
out-of-balance branches). **`journal-post-btn` is NOT on this page** — this page only ever creates
|
||||
a DRAFT. It's on `journals/JournalDetailPage.tsx` instead (not in the original checklist at all).
|
||||
- `payables/PayablesPage.tsx`: `bill-row-<id>`, `bill-approve-btn` (singular — only one bill is open
|
||||
at a time via the drawer, no `-<id>` needed), `bill-record-payment-btn`,
|
||||
`bill-record-payment-confirm-btn` (on the payment modal's actual submit button).
|
||||
- `budgeting/BudgetsPage.tsx`: **`budget-row-<id>` does not apply** — budgets are chosen via a
|
||||
`<Select>`, not table rows. Testid is `budget-select` on that dropdown, plus `budget-approve-btn`,
|
||||
`budget-variance-row-<accountId>-<costCenterId>`, `budget-line-row-<id>`.
|
||||
- `assets/AssetsPage.tsx`: `asset-row-<id>`, `run-depreciation-btn` (+
|
||||
`run-depreciation-confirm-btn` on the modal's Run button), `dispose-btn-<id>`.
|
||||
- `cutover/CutoverPage.tsx`: `cutover-readiness-check-<key>`, `cutover-set-date-btn`,
|
||||
`cutover-import-paste`, `cutover-import-preview` (required converting a conditional `<>...</>`
|
||||
fragment to a `<div>` so the testid has a real node to land on).
|
||||
- `reports/ReportsPage.tsx`: `report-trial-balance-row-<code>`. **`report-balance-sheet-total` was
|
||||
ambiguous** — the summary sentence holds three numbers inline, not one. Split into
|
||||
`report-bs-total-assets`, `report-bs-total-liabilities`, `report-bs-total-equity`, each wrapping
|
||||
just its number within the original sentence.
|
||||
|
||||
---
|
||||
|
||||
|
||||
Reference in New Issue
Block a user