Gennadii Nikitin
EN RU

Resume / Demo project / Test cases

Test-case catalogue

Every case in the HECHO Qase suite, exported on 18 November 2026 and published here as static HTML. 17 top-level suites, nested up to 3 levels.

295 test cases — 194 unit, 33 API, 65 e2e and 3 setup cases; all automated, 190 high priority, 67 of type security. Expand a case to see its description, steps, expected results and tags.

Live results on the Qase dashboard ↗ · Raw JSON export

All cases

API 13
Error responses 5
#1 adds a stable code and preserves validation messages unit high

Every error the API returns carries a machine-readable code next to the HTTP status, so clients branch on the code instead of parsing prose. Validation failures must additionally keep the per-field message array the DTO produced: the web form renders those messages, and collapsing them into a single string loses which field failed. _Automated by src/common/api-exception.filter.spec.ts._

  1. Pass a BadRequestException carrying the validation messages ["title must be longer"] through createApiErrorResponse. Expected: The response is 400 with code: "BAD_REQUEST", the original message array untouched and error: "Bad Request".
  • order-desk:api.error-responses.validation-code
  • unit
  • api
  • error-responses
#1
#2 distinguishes forbidden operations from missing records unit high

The web client reacts differently to 403 and 404: it hides the screen on a missing record and shows a permission notice otherwise. Mapping both onto one status - or one code - would either leak the existence of another customer's order or hide a real permission problem. _Automated by src/common/api-exception.filter.spec.ts._

  1. Build an error response from a ForbiddenException. Expected: The response carries code: "FORBIDDEN".
  2. Build an error response from a NotFoundException. Expected: The response carries code: "NOT_FOUND", distinct from the forbidden code.
  • order-desk:api.error-responses.forbidden-vs-not-found
  • unit
  • api
  • error-responses
#2
#3 does not expose unexpected server error details unit high critical

Unexpected exceptions reach the filter with whatever text the failing layer produced, including connection strings or SQL fragments. The client must receive a generic 500 body, and the details must stay in the server log only - this is the last line of defence against leaking infrastructure internals to an authenticated user. _Automated by src/common/api-exception.filter.spec.ts._

  1. Build an error response from a plain Error("database credentials leaked"). Expected: The response is 500 with code: "INTERNAL_SERVER_ERROR" and the fixed message An unexpected error occurred.; the original text appears nowhere in the body.
  • order-desk:api.error-responses.hides-server-details
  • unit
  • api
  • error-responses
#3
#4 converts oversized uploads into a client error unit medium

Multer reports a rejected file with LIMIT_FILE_SIZE, which is not an HTTP exception. Without an explicit mapping the upload failure surfaces as a 500 and looks like a server outage, while the user only has to pick a smaller file. _Automated by src/common/api-exception.filter.spec.ts._

  1. Build an error response from a MulterError with code: "LIMIT_FILE_SIZE". Expected: The response is 413 with code: "PAYLOAD_TOO_LARGE".
  • order-desk:api.error-responses.oversized-upload
  • unit
  • api
  • error-responses
#4
#5 maps database uniqueness violations to a conflict response unit medium

Unique constraints are the only race-free way to enforce things like a single active category name, so the losing request fails with Prisma P2002. It is a conflict the caller can resolve, not an internal error, and the client relies on 409 to show a duplicate-name hint. _Automated by src/common/api-exception.filter.spec.ts._

  1. Build an error response from a PrismaClientKnownRequestError with code: "P2002". Expected: The response is 409 with code: "CONFLICT".
  • order-desk:api.error-responses.unique-violation
  • unit
  • api
  • error-responses
#5
Documentation 2
#6 removes devtools routes and schemas from the document while the feature flag is off unit medium

The generated OpenAPI document is published at /api/docs. Devtools expose seeding, resetting and impersonation, so while the flag is off the document must not advertise them even though the controllers still exist in the bundle - a visible route invites probing. _Automated by src/common/swagger-document.spec.ts._

  1. Build a document containing /api/orders, /api/devtools/users, /api/devtools/reset and the matching devtools schemas, then call hideDisabledDevTools(document, false). Expected: Only /api/orders and CreateOrderDto remain; every devtools path and schema is gone.
  • order-desk:api.documentation.hides-devtools
  • unit
  • api
  • documentation
#6
#7 keeps the devtools routes and schemas once the feature flag is on unit low

The same filter must be a no-op for local and staging environments, where the devtools routes are documented on purpose. This case is the counterpart of the hiding one: it proves the filter reads the flag instead of stripping devtools unconditionally. _Automated by src/common/swagger-document.spec.ts._

  1. Call hideDisabledDevTools(document, true) on the same fixture. Expected: All three paths and all three schemas are still present, in their original order.
  • order-desk:api.documentation.keeps-devtools
  • unit
  • api
  • documentation
#7
Access control 6
#69 refuses a request without a session unit high critical

Every protected route resolves its session through this guard, so an anonymous request that got past it would expose the whole API. 401 is also what tells the web client to send the visitor to the sign-in page instead of showing an empty list. _Automated by src/auth/session.guard.spec.ts._

  1. Call canActivate while the session lookup resolves null. Expected: The guard throws UnauthorizedException and the request handler never runs.
  • order-desk:auth.session-guard.rejects-anonymous
  • unit
  • api
  • access-control
#69
#70 refuses a session whose account was deactivated unit high critical

Disabling a user is the product's way of revoking access, and better-auth keeps the existing sessions alive. Without this check a deactivated executor would keep working until the cookie expired, so the guard refuses the session even though it is technically valid. The message names the reason so support can explain the refused login. _Automated by src/auth/session.guard.spec.ts._

  1. Call canActivate with that session. Expected: The guard throws UnauthorizedException("This account is deactivated").
  • order-desk:auth.session-guard.rejects-deactivated-account
  • unit
  • api
  • access-control
#70
#71 resolves the session from the incoming request headers unit medium

The session lives in a cookie, so the guard has to hand the raw request headers to better-auth. If the conversion dropped or rewrote them every browser request would look anonymous and the API would answer 401 to signed-in users. _Automated by src/auth/session.guard.spec.ts._

  1. Call canActivate for a request carrying authorization: Bearer <token>. Expected: The session lookup receives a Headers instance that still carries the original authorization value.
  • order-desk:auth.session-guard.forwards-request-headers
  • unit
  • api
  • access-control
#71
#72 refuses a role outside the decorator's list unit high critical

@Roles() marks the endpoints only some roles may call, and a customer reaching the executor board or an executor reaching the user list would break both the workflow and the data boundaries. The check also has to hold for a session without any role, which the schema allows. _Automated by src/auth/session.guard.spec.ts._

  1. Call canActivate with an active executor session. Expected: The guard throws ForbiddenException, distinct from the 401 of a missing session.
  2. Call canActivate with an active session that carries no role at all. Expected: The guard throws the same ForbiddenException.
  • order-desk:auth.session-guard.enforces-required-role
  • unit
  • api
  • access-control
#72
#73 admits a role from the decorator's list unit high

The role check must not be so strict that it locks out the role it names. The guard also stores the resolved session on the request, which is how the controllers learn who is acting without resolving the session a second time. _Automated by src/auth/session.guard.spec.ts._

  1. Call canActivate. Expected: The guard returns true and exposes the session as request.authSession.
  • order-desk:auth.session-guard.admits-required-role
  • unit
  • api
  • access-control
#73
#74 admits any active user when no role is required unit medium

Routes without @Roles() - the own-profile endpoints, for instance - are open to every signed-in user regardless of role. Reading the decorator metadata is what makes the guard usable on both kinds of route, so an empty requirement must mean "authenticated is enough" rather than "nobody". _Automated by src/auth/session.guard.spec.ts._

  1. Call canActivate on an undecorated handler with an active customer session. Expected: The guard returns true.
  • order-desk:auth.session-guard.allows-any-active-user
  • unit
  • api
  • access-control
#74
Orders 39
Request validation 2
#8 rejects required strings that contain only whitespace unit high

The DTO trims every string before @IsNotEmpty runs, so " " counts as a missing value rather than a three-character title. Without that ordering the order list fills up with blank cards, and the trimmed value is what the API stores anyway - validation has to agree with the stored form. _Automated by src/orders/orders.dto.spec.ts._

  1. Validate a CreateOrderDto with title: " ", a valid description and a category ID using class-validator. Expected: The result contains an error for title and no error for description.
  • order-desk:orders.validation.whitespace-title
  • unit
  • orders
  • request-validation
#8
#89 keeps the cancellation reason optional but bounded unit medium

Cancelling from the board must work in one click, so the reason cannot be required, but whatever the customer writes ends up in the status history and in the notification email. The limit keeps the stored reason renderable, and the string check rejects a number that the JSON body would otherwise slip through. _Automated by src/orders/orders.dto.spec.ts._

  1. Validate a body without reason, then a 2000-character reason and a 2001-character one. Expected: The empty body and the 2000-character reason pass; the longer one reports an error.
  2. Validate reason: 42. Expected: The result reports an error for reason.
  • order-desk:orders.validation.cancel-reason
  • unit
  • orders
  • request-validation
#89
Lifecycle 7
#9 shows every role only the orders it may see unit high critical

The order board is one endpoint for three audiences, so the scope has to come from the role: an administrator sees everything, a customer sees only their own orders, and an executor sees the work assigned to them plus the unassigned pool they may claim. A missing condition would hand one customer another's order. The executor list also skips payment report joins, because receipts belong to the customer and the administrator. _Automated by src/orders/orders.service.spec.ts._

  1. Call list as the executor, as the customer who owns two of the orders, and as an administrator. Expected: The executor receives the pool order and their own assignment, newest first; the customer receives only their own orders; the administrator receives all four.
  2. Inspect the invoices attached to the pool order in the executor's response. Expected: The invoice is present, but its paymentReports are not part of the payload.
  • order-desk:orders.lifecycle.executor-list-scope
  • unit
  • orders
  • lifecycle
#9
#10 rejects customers who try to access another customer's order unit high critical

Order detail is reachable by ID, so ownership is re-checked on read instead of trusting the caller. A customer asking for someone else's order gets 403 - not a 404 with data attached and not a silent success - which keeps one customer's address and photos out of another's session. _Automated by src/orders/orders.service.spec.ts._

  1. Call get("order-1") as customer-1 with the CUSTOMER role. Expected: The call rejects with ForbiddenException and returns no order payload.
  • order-desk:orders.lifecycle.foreign-order-access
  • unit
  • orders
  • lifecycle
#10
#11 submits unassigned drafts to the distribution pool and records the transition unit high critical

Submitting publishes a draft to the executors, which is the moment the customer loses control of the order. The status change is a conditional updateMany on status: NEW, so a second click or a parallel submit cannot publish twice, and the history row is written in the same transaction as the transition. _Automated by src/orders/orders.service.spec.ts._

  1. Call submit("order-1") as its customer. Expected: The returned order is WAITING_DISTRIBUTION, and the stored row carries that status plus a submittedAt date.
  2. Inspect the history written by the same call. Expected: One OrderStatusHistory row records changedById: customer-1, fromStatus: NEW and toStatus: WAITING_DISTRIBUTION.
  • order-desk:orders.lifecycle.submit-to-pool
  • unit
  • orders
  • lifecycle
#11
#12 requires a comment when a customer rejects an estimate unit high

A rejection without a reason leaves the executor guessing why the price was refused, so the API refuses the request before it opens a transaction. Validating first keeps the failure cheap and guarantees that no estimate or order row is touched by a request that cannot succeed. _Automated by src/orders/orders.service.spec.ts._

  1. Call respondToEstimate with { accepted: false } and no comment. Expected: The call rejects with BadRequestException and no transaction is started.
  • order-desk:orders.lifecycle.reject-estimate-comment
  • unit
  • orders
  • lifecycle
#12
#13 does not allow cancelling an invoiced order unit medium

Once an invoice exists, cancelling the order would leave a document the customer already sees without a matching job, and a paid invoice would become unrefundable bookkeeping noise. The case runs for both blocked statuses - INVOICE_ISSUED and INVOICE_PAID - because the guard must cover the whole invoiced tail of the lifecycle, not a single value. _Automated by src/orders/orders.service.spec.ts._

  1. Call cancel with the reason "No longer needed" as an administrator. Expected: The call rejects with ConflictException; the order keeps its status and its cancellation reason, and no history row is written.
  • order-desk:orders.lifecycle.cancel-after-invoice
  • unit
  • orders
  • lifecycle
#13
#14 does not complete an order before payment is confirmed unit high critical

Completion closes the work and is the point where the executor's money becomes owed, so it must require a fully paid invoice - not merely accepted work. The status guard rejects an order that has not even reached invoicing before the invoice lookup runs, which keeps the failure cheap and the message accurate. _Automated by src/orders/orders.service.spec.ts._

  1. Call complete as an administrator for both orders. Expected: Both calls reject with ConflictException; each order keeps its status and no history row is written.
  • order-desk:orders.lifecycle.complete-requires-payment
  • unit
  • orders
  • lifecycle
#14
#15 completes an order only after a paid invoice exists unit high critical

The happy path of closing an order: INVOICE_PAID plus a paid invoice becomes COMPLETED, the completion timestamp is stamped and the transition is written to the history. Without that history row the customer timeline would jump from paid to closed with no explanation. _Automated by src/orders/orders.service.spec.ts._

  1. Call complete as an administrator. Expected: The order returns as COMPLETED, and the stored row carries status: COMPLETED with a completedAt date.
  2. Inspect the history written by the same call. Expected: One row records fromStatus: INVOICE_PAID and toStatus: COMPLETED.
  • order-desk:orders.lifecycle.complete-after-payment
  • unit
  • orders
  • lifecycle
#15
Files 14
#75 refuses an upload without a file unit high

The upload route runs for any multipart request, including one where the browser posted no file, for example after the user cleared the input. Refusing it with a client error keeps an empty attachment row - and an empty object in the bucket - from appearing in the order. _Automated by src/orders/order-files.service.spec.ts._

  1. Call upload with file: undefined. Expected: The service throws BadRequestException("A file is required") before checking access or touching the storage.
  • order-desk:orders.files.requires-file
  • unit
  • orders
  • files
#75
#76 refuses a file above the 1 MB limit unit high

Attachments are photos of damaged parts, not archives, so the API caps them at 1 MB. The check has to happen before the object is stored: an oversized upload that is written first and rejected later still costs the bucket space and the bandwidth of the transfer. _Automated by src/orders/order-files.service.spec.ts._

  1. Call upload with a file of 1 048 577 bytes. Expected: The service throws BadRequestException("Files may not exceed 1 MB") and the storage receives no put.
  • order-desk:orders.files.rejects-oversized-file
  • unit
  • orders
  • files
#76
#77 accepts a file of exactly the 1 MB limit unit medium

The limit is inclusive, so a file of exactly 1 048 576 bytes must go through. An off-by-one that rejected it would be invisible in manual testing - nobody chooses a file by its byte count - and would surface as a complaint that a photo "sometimes" cannot be attached. _Automated by src/orders/order-files.service.spec.ts._

  1. Call upload with a file of 1 048 576 bytes for an order the actor may upload to. Expected: The object is stored and the attachment row is created.
  • order-desk:orders.files.accepts-limit-size
  • unit
  • orders
  • files
#77
#78 refuses an upload before it reaches the storage unit high critical

Upload permission is narrower than read permission - a customer may attach only to their own order while it is still new - so the access check has to gate the write itself. A guard that ran after the upload would let any signed-in user write objects into the bucket under an order they cannot see, which is both a storage cost and an information leak. _Automated by src/orders/order-files.service.spec.ts._

  1. Call upload with a valid file. Expected: The ForbiddenException from the access check reaches the caller, and neither createObjectKey nor put runs.
  • order-desk:orders.files.checks-upload-access-first
  • unit
  • orders
  • files
#78
#79 removes the stored object when the record cannot be saved unit high

The object is written before the row that points at it, because an object without a row is invisible but a row without an object would break every download. When the insert then fails - a dropped connection, a constraint - the service compensates by deleting the object, so a failed upload leaves no storage behind and the error still reaches the client. _Automated by src/orders/order-files.service.spec.ts._

  1. Call upload with a valid file and a successful storage write. Expected: The object key is deleted from the storage and the original error is rethrown.
  • order-desk:orders.files.removes-orphan-on-failure
  • unit
  • orders
  • files
#79
#80 stores a safe, bounded file name unit high

The name comes from the client, so it can carry a path traversal, control characters or several hundred bytes of noise. The row keeps only the base name with control characters stripped and a 255-byte cap, and a name that normalises to nothing falls back to attachment: the value travels back in the Content-Disposition header of every download. _Automated by src/orders/order-files.service.spec.ts._

  1. Call upload with originalname set to ..\..\etc/passwd\u0000.png. Expected: The row stores filename: "passwd.png".
  2. Call upload with a name of only spaces. Expected: The row stores filename: "attachment".
  3. Call upload with a 300-character name. Expected: The stored name is cut to 255 characters.
  • order-desk:orders.files.sanitizes-uploaded-name
  • unit
  • orders
  • files
#80
#82 answers not found for an attachment of another order unit high critical

An attachment id is a UUID, and guessing one is exactly the kind of thing the read check has to survive: access is proved for the order in the URL, so the lookup must also constrain the order. Looking the row up by id alone would hand the files of any readable order to whoever knows an id, and 404 rather than 403 avoids confirming that the attachment exists. _Automated by src/orders/order-files.service.spec.ts._

  1. Call download with an attachment id of a different order. Expected: The attachment row of the other order stays invisible: the call answers NotFoundException and the storage is never read.
  • order-desk:orders.files.scopes-download-to-order
  • unit
  • orders
  • files
#82
#148 refuses an attachment above the quota of the order unit high

The 1 MB cap bounds a single file, not the account behind it: registration is open, so without a per-order quota one customer can put thousands of files into the volume that holds the database. The count runs before the object is written, so a refused upload costs neither disk nor the bandwidth of the transfer. _Automated by src/orders/order-files.service.spec.ts._

  1. Upload a third attachment to that order. Expected: The call answers ConflictException, the storage receives no put and the order keeps two rows.
  • order-desk:orders.files.rejects-attachment-over-quota
  • unit
  • orders
  • files
#148
#149 refuses an upload above the daily quota of the account unit high

Spreading the uploads over many orders would defeat a per-order quota, so the account itself has a daily budget. It is counted over a rolling day rather than a calendar one, which stops an account from sending two batches back to back around midnight. _Automated by src/orders/order-files.service.spec.ts._

  1. Upload another file to a fresh order. Expected: The call answers ConflictException, the storage receives no put and the two earlier rows stay.
  • order-desk:orders.files.rejects-daily-upload-quota
  • unit
  • orders
  • files
#149
#150 does not count the uploads of earlier days unit medium

A daily quota that never forgets would lock a long-running account out of the product. The window is the last 24 hours, so an account with two uploads from yesterday is free to send the next one today. _Automated by src/orders/order-files.service.spec.ts._

  1. Upload a file today. Expected: The object is stored and the order gains the attachment.
  • order-desk:orders.files.counts-only-the-last-day
  • unit
  • orders
  • files
#150
#154 records the uploader, size, object key and detected type unit medium

The attachment row is the only place that ties an object back to the order and to the person who sent it, which is what the order page and the audit trail render. Its content type no longer comes from the request: an upload that declares nothing - or the wrong thing - is stored with the type its bytes prove, so the row never carries a null or a caller-chosen value. _Automated by src/orders/order-files.service.spec.ts._

  1. Call upload with a PNG of 1 024 bytes and an empty mimetype. Expected: The stored attachment row carries the order id, the actor as uploadedById, the generated object key, sizeBytes: 1024 and contentType: "image/png".
  • order-desk:orders.files.stores-upload-metadata
  • unit
  • orders
  • files
#154
#155 refuses a file that is not an image or a PDF whatever type the request declares unit high critical

The request chooses the multipart Content-Type, so a caller could upload a page or a script and call it image/png. Today every download is an attachment, so the header only picks the program the browser opens - but the same value turns executable as soon as an inline preview exists. The bytes therefore decide: an unaccepted signature is refused with 415 before the object key is even made, so nothing lands in the bucket and nothing is recorded in the order. _Automated by src/orders/order-files.service.spec.ts._

  1. Upload an HTML document named photo.png with the declared type image/png. Expected: The call answers UnsupportedMediaTypeException, the storage receives neither an object key nor a put, and the order keeps no attachment rows.
  • order-desk:orders.files.rejects-executable-type
  • unit
  • orders
  • files
#155
#156 stores the type detected from the bytes instead of the declared one unit high

A file that is acceptable should be stored with the type it actually is, not with the declaration that accompanied it. The row and the bucket metadata both carry the detected type, so neither a later read of the database nor a direct read of the object can report what the caller claimed. _Automated by src/orders/order-files.service.spec.ts._

  1. Upload a PNG that declares text/html. Expected: The attachment row stores contentType: "image/png", and the object is written with the same type.
  • order-desk:orders.files.stores-detected-type
  • unit
  • orders
  • files
#156
#157 serves every download as a neutral binary stream unit high

The stored type describes the object for the product, not for the browser. Serving the download as application/octet-stream - together with the attachment disposition the controller already sets - means a caller cannot make the API answer with a type the browser would render in the application origin, whatever the row or the bucket says. _Automated by src/orders/order-files.service.spec.ts._

  1. Download an attachment whose row and object both report image/png. Expected: The result carries contentType: "application/octet-stream" and the stored file name.
  • order-desk:orders.files.download-serves-neutral-type
  • unit
  • orders
  • files
#157
Quotas 5
#143 keeps the documented quotas when nothing is configured unit high

Registration is open to any visitor by design, so the quotas are the only thing that stops a new account from filling the volume that holds the database or from burying the board in orders. They have to hold without any configuration, because an operator who forgets the variables must still get the protection the documentation promises. _Automated by src/orders/order-quotas.spec.ts._

  1. Resolve the quotas from an empty environment. Expected: 20 attachments per order, 100 attachments per account per day and 20 open orders per customer.
  • order-desk:orders.quotas.defaults
  • unit
  • orders
  • quotas
#143
#144 reads the three quotas from the environment unit medium

The right limits depend on the hosting: a training stand with a small disk can stay strict, while a busy installation needs more room. Every quota is therefore a variable, and a value read here has to reach the service unchanged, otherwise an operator raises a limit and the uploads keep failing. _Automated by src/orders/order-quotas.spec.ts._

  1. Resolve the quotas from ORDER_ATTACHMENT_LIMIT=5, ORDER_ATTACHMENT_DAILY_LIMIT=30 and ORDER_OPEN_LIMIT=3. Expected: The result carries exactly 5, 30 and 3.
  • order-desk:orders.quotas.environment
  • unit
  • orders
  • quotas
#144
#145 refuses a quota it cannot read instead of ignoring the setting unit high

A mistyped quota is worse than a missing one: 0 or -1 would either block every upload or turn the check into a no-op, and many would do the same through NaN comparisons. Failing at startup names the variable, so the operator fixes the typo instead of shipping a stand without the control. _Automated by src/orders/order-quotas.spec.ts._

  1. Resolve the quotas with ORDER_ATTACHMENT_LIMIT=0, then ORDER_ATTACHMENT_DAILY_LIMIT=-1, then ORDER_OPEN_LIMIT=many. Expected: Each call throws an error that names the offending variable.
  • order-desk:orders.quotas.invalid
  • unit
  • orders
  • quotas
#145
#146 refuses a new order when the customer is at the open-order quota unit high

Each open order carries its own attachment budget and a place in the administrators' queue, so an account that posts orders without end spends the shared disk and the operators' attention. The check runs inside the creating transaction, before any row is written, so a refused order leaves nothing behind for the board to show. _Automated by src/orders/orders.service.spec.ts._

  1. Create an order for that customer. Expected: The call answers ConflictException, and the database still holds exactly the two earlier orders.
  • order-desk:orders.create.rejects-open-order-quota
  • unit
  • orders
  • quotas
#146
#147 does not count completed and cancelled orders against the quota unit high

Finished work is history, not load: a customer who has completed hundreds of orders must stay able to open the next one. Only orders that still need attention count, which is why the quota filter excludes COMPLETED and CANCELLED rather than counting every row of the table. _Automated by src/orders/orders.service.spec.ts._

  1. Create an order for that customer. Expected: The order is created and the database holds three orders.
  • order-desk:orders.create.ignores-closed-orders
  • unit
  • orders
  • quotas
#147
Distribution 3
#181 returns work in progress to the assignment stage for the new executor unit high critical

The administrator is the only role that can take work away from an executor after it started. The order cannot jump straight back to work: a new executor has their own rate and their own estimate, so the order returns to ASSIGNED with the approved hours, rate and amount cleared, while the previous assignment and the accepted estimate stay in the history. _Automated by src/orders/orders.service.spec.ts._

  1. Assign the order to executor-2 as the administrator. Expected: The order is ASSIGNED to executor-2 with approvedHours, approvedHourlyRate and approvedAmount set to null.
  2. Read the assignment history. Expected: The first assignment is REASSIGNED with an end date, and a new ACTIVE assignment names executor-2 and the administrator.
  3. Read the status history and the estimate. Expected: One entry records IN_PROGRESS to ASSIGNED by the administrator, and the old estimate is still ACCEPTED, so the new executor must propose a fresh one.
  • order-desk:orders.assign.restarts-started-work
  • unit
  • orders
  • distribution
#181
#182 assigns a pooled order and moves a later reassignment into the history unit high critical

Distribution is auditable: the administrator assigns a pooled order, and a later reassignment does not delete the first executor from the record. The estimate the first executor left behind is withdrawn rather than deleted, and the reassignment is written as its own history entry. _Automated by src/orders/orders.service.spec.ts._

  1. Assign the order to executor-1 as the administrator. Expected: The order is ASSIGNED to executor-1 with one ACTIVE assignment.
  2. Assign the same order to executor-2. Expected: The order is ASSIGNED to executor-2, the first assignment is REASSIGNED with an end date and a second ACTIVE assignment names the new executor.
  3. Read the estimate and the status history. Expected: The pending estimate is WITHDRAWN with the note that the order was reassigned, and the history holds both transitions plus the reassignment note.
  • order-desk:orders.assign.reassigns-with-history
  • unit
  • orders
  • distribution
#182
#183 refuses an inactive executor, the current one and a closed order unit high

Assignment is the administrator's way to build the queue, so a deactivated account must never receive new work and an order that is already closed must not be reopened by pointing it at someone. Naming the current executor again is a conflict rather than a silent no-op. _Automated by src/orders/orders.service.spec.ts._

  1. Assign the waiting order to the inactive executor and to a missing id. Expected: Both calls answer BadRequestException.
  2. Assign it to the active executor, then to the same executor again. Expected: The first call succeeds with one ACTIVE assignment; the second answers ConflictException.
  3. Assign the completed order to the active executor. Expected: The call answers ConflictException and the closed order keeps its status.
  • order-desk:orders.assign.requires-active-executor
  • unit
  • orders
  • distribution
#183
Draft editing 2
#184 stores the edited draft with trimmed values and releases the executor the customer detaches unit high critical

A draft is the only state the customer may still change, and every change has to reach the stored row: padded text is trimmed, an emptied optional field becomes null, and detaching the chosen executor ends that assignment instead of leaving it ACTIVE on an order nobody owns. _Automated by src/orders/orders.service.spec.ts._

  1. Edit the draft with a padded title, an emptied location, the category and executorId: null. Expected: The stored order has the trimmed title, location: null, the category and executorId: null, and is still NEW.
  2. Read the assignment history. Expected: The single assignment is RELEASED with an end date.
  • order-desk:orders.draft.update-fields
  • unit
  • orders
  • draft-editing
#184
#185 refuses to edit a submitted draft, another customer's order and an unavailable category unit high

The draft guard is the boundary between planning and execution: once the order is submitted the main parameters are frozen, and an owner check keeps one customer out of another customer's draft. A retired category is refused with a readable error rather than a foreign-key failure. _Automated by src/orders/orders.service.spec.ts._

  1. Edit the submitted order. Expected: The call answers ConflictException and the order keeps its status.
  2. Edit the order of the other customer. Expected: The call answers ForbiddenException and the owner stays unchanged.
  3. Move a draft to the inactive category. Expected: The call answers BadRequestException and the draft keeps no category change.
  • order-desk:orders.draft.refuses-invalid-edits
  • unit
  • orders
  • draft-editing
#185
Estimates 3
#186 refuses an estimate from an executor without a positive hourly rate unit high

The amount is rate times hours, so a proposal without a rate has no amount at all. Refusing the call keeps a zero-value estimate out of the customer's approval queue. _Automated by src/orders/orders.service.spec.ts._

  1. Propose two hours for the order. Expected: The call answers BadRequestException.
  2. Read the estimate table. Expected: No estimate row exists.
  • order-desk:orders.estimates.requires-rate
  • unit
  • orders
  • estimates
#186
#187 multiplies the stored rate by the proposed hours and keeps the rate of the proposal unit high critical

The amount the customer approves is the one the invoice later snapshots, so the multiplication and its rounding are part of the money contract. The rate is copied into the estimate at proposal time, which is what keeps a later profile change from rewriting an accepted amount. _Automated by src/orders/orders.service.spec.ts._

  1. Propose 2.25 hours for the first order. Expected: The estimate stores 2.25 hours, rate 45.5, amount 102.38 (45.5 x 2.25 rounded half up) and is PENDING.
  2. Raise the executor's rate to 99 and propose one hour for the second order. Expected: The new estimate stores rate 99.
  3. Read the first estimate again. Expected: It still stores rate 45.5, so the accepted amount cannot drift with the profile.
  • order-desk:orders.estimates.amount-from-rate
  • unit
  • orders
  • estimates
#187
#188 answers conflict when a proposal is already waiting for the customer unit high

The customer approves one amount, so a second pending proposal would make the approval ambiguous and leave an orphaned estimate in the history. The database enforces the rule with a unique index, and the service turns that violation into a readable conflict instead of a server error. _Automated by src/orders/orders.service.spec.ts._

  1. Propose two hours while the estimate insert raises the uniqueness violation. Expected: The call answers ConflictException.
  2. Read the estimate table. Expected: Neither proposal was stored.
  • order-desk:orders.estimates.single-pending
  • unit
  • orders
  • estimates
#188
Acceptance and cancellation 2
#189 accepts the work once and refuses a second acceptance unit high critical

Acceptance is the customer's statement that the work is done, and it is what allows an invoice to be issued. A second acceptance would rewrite the moment of agreement and add a second history entry, so the call is refused and the stored acceptance stays untouched. _Automated by src/orders/orders.service.spec.ts._

  1. Accept the work. Expected: The order keeps ON_REVIEW and records an acceptedAt date.
  2. Accept the same work again. Expected: The call answers ConflictException.
  3. Read the status history. Expected: Exactly one entry records the acceptance note.
  • order-desk:orders.lifecycle.accept-once
  • unit
  • orders
  • acceptance-and-cancellation
#189
#190 cancels a started assignment without a reason and withdraws the estimate awaiting the customer unit high critical

Before work starts a customer may walk away without explaining why, but the order must not be left in a half-assigned state: the assignment ends and the estimate that still waits for the customer is withdrawn so nobody can approve a plan for a cancelled order. _Automated by src/orders/orders.service.spec.ts._

  1. Cancel the order without a reason as the customer. Expected: The order is CANCELLED with cancellationReason: null.
  2. Read the assignment and the estimate. Expected: The assignment is RELEASED with an end date and the estimate is WITHDRAWN with the note that the order was cancelled.
  3. Read the status history. Expected: One entry records ASSIGNED to CANCELLED without a note.
  • order-desk:orders.cancel.releases-assignment
  • unit
  • orders
  • acceptance-and-cancellation
#190
Comments 1
#191 records a comment from a participant and refuses an outsider unit medium

The comment thread is the shared record of the job, so it has to accept the customer, the assigned executor and the administrator, and nobody else. Storing the trimmed text keeps an accidental run of spaces out of the timeline. _Automated by src/orders/orders.service.spec.ts._

  1. Add a padded comment as the owning customer. Expected: The stored comment carries the trimmed text and the customer as its author.
  2. Add a comment as the other customer. Expected: The call answers ForbiddenException.
  3. Read the comment table. Expected: Only the first comment exists.
  • order-desk:orders.comments.participants-only
  • unit
  • orders
  • comments
#191
Invoices 18
Payment reports 13
#16 stores a customer receipt without marking the invoice paid or completing the order unit high critical

A receipt is a claim, not a payment: the customer uploads proof of transfer and an administrator decides later. Storing the upload must therefore leave the invoice ISSUED and the order INVOICE_ISSUED, otherwise a customer could close their own order by uploading a file. _Automated by src/invoices/invoices.service.spec.ts._

  1. Call reportPayment with an 8-byte receipt.pdf upload as the owning customer. Expected: The file is written to the generated object key, and the stored InvoicePaymentReport is PENDING with submittedById: customer-1, that object key, contentType: application/pdf and sizeBytes: 8.
  2. Check the state of the invoice and the order after the same call. Expected: The invoice is still ISSUED and the order still INVOICE_ISSUED with no completedAt, so an upload cannot close the job.
  • order-desk:invoices.payment-reports.receipt-stored
  • unit
  • invoices
  • payment-reports
#16
#17 confirms payment and moves the order to INVOICE_PAID without completing it unit high critical

Confirming a report is the administrator's decision that money arrived. It flips the report to CONFIRMED, marks the invoice PAID and moves the order to INVOICE_PAID - deliberately stopping there, because closing the job is a separate administrative step that also pays the executor. _Automated by src/invoices/invoices.service.spec.ts._

  1. Call confirmPaymentReport as an administrator. Expected: The returned invoice is PAID, the stored report is CONFIRMED with reviewedById: admin-1 and a review date, and the invoice row is PAID with a paidAt date.
  2. Inspect the order and the history written by the same call. Expected: The order is stored as INVOICE_PAID with no completedAt, and one history row records INVOICE_ISSUED to INVOICE_PAID with the invoice number in its note.
  • order-desk:invoices.payment-reports.confirm-payment
  • unit
  • invoices
  • payment-reports
#17
#18 does not allow executors to read customer payment receipts unit high

Bank receipts carry the customer's account details, so only the owning customer and administrators may download them. The permission check runs before the storage read: a denied request must not even open the object, which is why the assertion covers the storage stub as well as the exception. _Automated by src/invoices/invoices.service.spec.ts._

  1. Call paymentReportFile as a user with the EXECUTOR role. Expected: The call rejects with ForbiddenException and object storage is never read.
  • order-desk:invoices.payment-reports.executor-denied
  • unit
  • invoices
  • payment-reports
#18
#107 refuses a second receipt while one is awaiting review unit medium

An administrator reviews one receipt per invoice, so a second pending report would make the decision ambiguous and both uploads would race for the same confirmation. The guard runs inside the transaction, after the upload, which is why the refused file has to leave the bucket again instead of lingering as an orphan. _Automated by src/invoices/invoices.service.spec.ts._

  1. Call reportPayment again as the owning customer. Expected: The call rejects with ConflictException.
  2. Inspect the stored reports and the object storage. Expected: Exactly one report row remains, and the newly uploaded object is deleted again.
  • order-desk:invoices.payment-reports.duplicate-guard
  • unit
  • invoices
  • payment-reports
#107
#158 refuses a receipt whose bytes are not an image or a PDF unit high

A receipt lands in the same bucket as an order attachment and used to keep whatever type the upload declared, so the same client-chosen header decided what the API later serves. The receipt is a photo or a scanned PDF, and anything else is refused with 415 before an object key exists - otherwise a customer could park a page or a script in the bucket under the name of a bank receipt. _Automated by src/invoices/invoices.service.spec.ts._

  1. Report payment with an HTML document named receipt.pdf and the declared type application/pdf. Expected: The call answers UnsupportedMediaTypeException, the storage receives neither an object key nor a put, and no payment report row appears.
  • order-desk:invoices.payment-reports.rejects-unsupported-type
  • unit
  • invoices
  • payment-reports
#158
#159 serves a receipt download as a neutral binary stream unit high

A receipt is downloaded, never rendered: answering with application/octet-stream means the browser saves the file whatever the stored row or the bucket says about its type, even if an inline preview for receipts is added later. The stored type stays in the database for the product and the audit. _Automated by src/invoices/invoices.service.spec.ts._

  1. Download the receipt as the owning customer. Expected: The result carries contentType: "application/octet-stream", the stored file name and the bytes.
  • order-desk:invoices.payment-reports.receipt-download-neutral-type
  • unit
  • invoices
  • payment-reports
#159
#164 rejects a receipt with the administrator's reason and leaves the invoice unpaid unit high critical

Rejection is the only way to send a payment back: the customer must see why the proof was refused and upload another one, while the invoice stays payable. Clearing the pending report and recording the trimmed reason in the same transaction is what keeps the history readable and the invoice open. _Automated by src/invoices/invoices.service.spec.ts._

  1. Call rejectPaymentReport with the reason "The receipt does not show the transfer date" padded with spaces. Expected: The stored report is REJECTED with that reason trimmed, reviewedById: admin-1 and a review date.
  2. Inspect the invoice and the order after the same call. Expected: The invoice is still ISSUED without paidAt, and the order is still INVOICE_ISSUED.
  3. Read the status history. Expected: One entry records INVOICE_ISSUED to INVOICE_ISSUED with the rejection reason in its note.
  • order-desk:invoices.payment-reports.reject-records-reason
  • unit
  • invoices
  • payment-reports
#164
#165 refuses a second decision on a receipt that was already reviewed unit high

A reviewed report is a closed decision: confirming it after a rejection, or rejecting it after a confirmation, would rewrite what the customer was told and could pay an invoice twice. Both decisions therefore refuse the report and leave the stored review untouched. _Automated by src/invoices/invoices.service.spec.ts._

  1. Reject the already confirmed report. Expected: The call answers ConflictException.
  2. Confirm the same report. Expected: The call answers ConflictException as well.
  3. Inspect the report, the invoice, the order and the history. Expected: The report keeps CONFIRMED and its original review date, the invoice is still ISSUED, and no history row was written.
  • order-desk:invoices.payment-reports.rejects-reviewed-report
  • unit
  • invoices
  • payment-reports
#165
#166 refuses a payment report without a receipt or with a file above 1 MB unit high critical

A payment notification without proof cannot be verified, and the same 1 MB ceiling protects the volume that the bucket shares with the database. Both refusals happen before an object key is generated, so a refused upload costs neither storage nor a row that an administrator would have to review. _Automated by src/invoices/invoices.service.spec.ts._

  1. Report payment without a file. Expected: The call answers BadRequestException.
  2. Report payment with a file that reports 1 048 577 bytes. Expected: The call answers BadRequestException.
  3. Inspect the storage stub and the payment report table. Expected: No object key was requested, nothing was stored and no report row exists.
  • order-desk:invoices.payment-reports.requires-receipt-file
  • unit
  • invoices
  • payment-reports
#166
#167 accepts a receipt only while the invoice and its order still await payment unit high critical

A voided invoice no longer asks for money and a paid order has already received it, so a receipt sent against either of them would create a report nobody should review. The guard reads both the invoice and its order, because the two can drift apart through a void or a confirmation. _Automated by src/invoices/invoices.service.spec.ts._

  1. Report payment against the voided invoice as its owning customer. Expected: The call answers ConflictException.
  2. Report payment against the invoice of the paid order. Expected: The call answers ConflictException.
  3. Inspect the storage stub and the report table. Expected: No object was stored and neither attempt left a report row.
  • order-desk:invoices.payment-reports.invoice-must-be-active
  • unit
  • invoices
  • payment-reports
#167
#168 lets only the customer who owns the order submit a receipt unit high critical

A receipt proves that this customer paid this invoice. An executor has no business uploading one in the customer's name, and another customer could otherwise attach a document to an order they cannot even read. Both callers are refused before an object key exists. _Automated by src/invoices/invoices.service.spec.ts._

  1. Report payment as an executor. Expected: The call answers ForbiddenException.
  2. Report payment as a different customer. Expected: The call answers ForbiddenException as well.
  3. Inspect the storage stub and the report table. Expected: No object key was requested and no report row was stored.
  • order-desk:invoices.payment-reports.only-owner-customer
  • unit
  • invoices
  • payment-reports
#168
#169 answers not found for an invoice that belongs to another order unit high

The invoice id arrives from the client, so it is looked up together with the order it is supposed to belong to. Without that pairing a customer could point a receipt at an invoice of someone else's order and learn from the answer whether the id exists. _Automated by src/invoices/invoices.service.spec.ts._

  1. Report payment for an invoice id that exists on another order. Expected: The call answers NotFoundException rather than ForbiddenException.
  2. Inspect the storage stub and the report table. Expected: Nothing was stored and no report row exists.
  • order-desk:invoices.payment-reports.scopes-to-order
  • unit
  • invoices
  • payment-reports
#169
#197 accepts a receipt while the order already holds its attachment quota unit high

The product documentation promises that payment receipts do not count towards the attachment quotas, which is what lets a customer pay for an order whose photo budget is already spent. The receipt lives in InvoicePaymentReport, a table the attachment quota never counts, and the case pins that separation: both quotas are exhausted - the order holds its only attachment and the rolling day already stored one - and the receipt still has to be accepted without adding an attachment row. _Automated by src/invoices/invoices.service.spec.ts._

  1. Call reportPayment with a receipt as the owning customer. Expected: The call succeeds and stores a PENDING payment report for the invoice.
  2. Read the attachment table after the call. Expected: It still holds exactly the two seeded rows, so the quota neither blocked the receipt nor paid for it.
  • order-desk:invoices.payment-reports.quota-exempt
  • unit
  • invoices
  • payment-reports
#197
Request validation 2
#92 requires a non-blank reason to void an invoice unit high

Voiding is irreversible from the customer's point of view, and the reason is the only explanation left in the invoice history, so an empty one defeats the audit trail. The 2000-character limit keeps a single reason from filling the column, and the whitespace check stops a reason that renders as an empty line. _Automated by src/invoices/invoices.dto.spec.ts._

  1. Validate a 2000-character reason, a 2001-character reason and " \n ". Expected: The 2000-character reason passes; the longer one and the whitespace-only one report an error for reason.
  • order-desk:invoices.validation.void-reason
  • unit
  • invoices
  • request-validation
#92
#93 requires a non-blank reason to reject a payment report unit high

The rejection reason is shown to the customer so the receipt can be uploaded again; an empty one leaves the customer with a refused payment and no instruction. Rejection lives in its own DTO, so the same rule is asserted separately from voiding. _Automated by src/invoices/invoices.dto.spec.ts._

  1. Validate a readable reason and "" against RejectPaymentReportDto. Expected: The readable reason passes; the empty one reports an error for reason.
  • order-desk:invoices.validation.reject-reason
  • unit
  • invoices
  • request-validation
#93
Voiding 3
#170 voids an unpaid invoice with the administrator's reason and keeps the order open for a new one unit high critical

A wrong invoice has to be replaceable without deleting evidence: voiding keeps the number and the reason, leaves the order in INVOICE_ISSUED so a new invoice can be issued, and records who voided it. The trimmed reason is the only explanation a reader of the invoice gets. _Automated by src/invoices/invoices.service.spec.ts._

  1. Void the invoice as the administrator with the reason " Amount was miscalculated ". Expected: The returned invoice is VOID with the reason trimmed, voidedById: admin-1 and a void date.
  2. Inspect the order after the same call. Expected: The order is still INVOICE_ISSUED, so a replacement invoice can be issued.
  3. Read the status history. Expected: One entry records INVOICE_ISSUED to INVOICE_ISSUED with a note naming the invoice number and the reason.
  • order-desk:invoices.void.records-reason
  • unit
  • invoices
  • voiding
#170
#171 refuses to void an invoice while its payment receipt awaits review unit high critical

Voiding an invoice that already carries a receipt would leave the administrator reviewing proof of a payment against a document that no longer asks for money. The decision therefore waits until the report is confirmed or rejected. _Automated by src/invoices/invoices.service.spec.ts._

  1. Void the invoice as the administrator. Expected: The call answers ConflictException.
  2. Inspect the invoice, the report and the history. Expected: The invoice is still ISSUED without a void date or reason, the report is still PENDING, and no history row was written.
  • order-desk:invoices.void.blocked-by-pending-report
  • unit
  • invoices
  • voiding
#171
#172 refuses to void a paid invoice and reports an unknown invoice as not found unit high critical

Money that has arrived cannot be un-asked for by voiding the document: the paid invoice is immutable and post-payment adjustments are out of scope. An id that does not belong to the order is a missing record rather than a conflict, so the two answers stay distinguishable. _Automated by src/invoices/invoices.service.spec.ts._

  1. Void the paid invoice with a reason. Expected: The call answers ConflictException.
  2. Void an invoice id that the order does not have. Expected: The call answers NotFoundException.
  3. Inspect the stored invoice and the history. Expected: The invoice is still PAID with its original paidAt, and no history row was written.
  • order-desk:invoices.void.refuses-paid-invoice
  • unit
  • invoices
  • voiding
#172
Users 18
Profile 2
#19 stores a trimmed name and marks a changed email unverified unit high

Changing the profile is a credential change, so it is gated by the current password even though the user is already signed in: a hijacked session must not take the account over silently. The stored fields are normalized on the way in - trimmed name, lower-cased email - and the new address has to lose its verification, because the case asserts the saved row rather than the arguments of the write. _Automated by src/users/users.service.spec.ts._

  1. Seed a verified customer and call updateOwnProfile with the current password. Expected: The call succeeds and returns the profile without a password field.
  2. Pass name: " New Name " and email: "NEW@example.test". Expected: The stored user reads back with name: "New Name", email: "new@example.test" and emailVerified: false.
  • order-desk:users.profile.update-normalizes
  • unit
  • users
  • profile
#19
#20 leaves the profile untouched when the current password is wrong unit high critical

The current-password check is the only thing between a stolen session and a full account takeover. A wrong password has to fail with 400 before the user row is touched, and the case asserts the unchanged row as well as the exception, so a check that ran after the write would still fail it. _Automated by src/users/users.service.spec.ts._

  1. Call updateOwnProfile with currentPassword: "wrong-password" and a new name. Expected: The call rejects with BadRequestException.
  2. Read the stored user row. Expected: The name, email and verification flag are exactly what the seed contained.
  • order-desk:users.profile.wrong-password
  • unit
  • users
  • profile
#20
Executor rates 3
#21 stores the hourly rate an executor sets for themselves unit medium

Executors price their own work, and the rate multiplies every invoice line total, so it is stored as a Decimal instead of a float. The write is scoped by id, role and active flag rather than by id alone, so the same endpoint cannot put a rate onto another account; the case reads the saved rate back and checks the returned profile renders it with two decimals. _Automated by src/users/users.service.spec.ts._

  1. Call updateOwnHourlyRate("executor-1", 45.5). Expected: The call succeeds and returns the executor profile.
  2. Read the stored user row. Expected: The rate is a Prisma.Decimal with the value 45.5.
  3. Format the returned rate for an invoice. Expected: The value renders as 45.50.
  • order-desk:users.executor-rates.self-service
  • unit
  • users
  • executor-rates
#21
#22 refuses a rate update for anyone who is not an active executor unit medium

Customers and deactivated executors have no hourly rate, and the scoped update matches no row for them. Reporting that as 404 keeps the response honest - the rate resource does not exist for this caller - instead of a silent 200 that leaves the client believing it saved something. The case covers a customer, a deactivated executor and an unknown id, then checks that no rate was written anywhere. _Automated by src/users/users.service.spec.ts._

  1. Call updateOwnHourlyRate as the customer, the deactivated executor and an unknown id. Expected: Every call rejects with NotFoundException.
  2. Read the stored user rows. Expected: All three rates are still empty.
  • order-desk:users.executor-rates.inactive-rejected
  • unit
  • users
  • executor-rates
#22
#23 offers customers only the active executors, without rates or emails unit medium

The customer picks a preferred executor from this list when creating an order, so it must not contain deactivated accounts or other roles - assigning new work to them would fail later. Only public fields are selected, which keeps emails and rates out of a customer-facing response, and the order is fixed by name so the picker is stable between requests. _Automated by src/users/users.service.spec.ts._

  1. Seed two active executors, a deactivated executor and a customer, then call listAvailableExecutors. Expected: Exactly the two active executors come back, ordered by name and carrying only id and name.
  • order-desk:users.executor-rates.active-only-list
  • unit
  • users
  • executor-rates
#23
Request validation 3
#94 rejects an executor name that is blank or longer than 120 characters unit high

The executor name is what customers see on their order and on the invoice, so an unnamed executor or one with a 20-word name breaks both layouts. Create and update are separate DTOs, and the update must stay optional because the panel sends only the fields that changed. _Automated by src/users/users.dto.spec.ts._

  1. Validate a 120- and a 121-character name on create, then a whitespace name on update. Expected: The 120-character name and the empty update pass; the 121-character and whitespace names report an error for name.
  • order-desk:users.validation.executor-name
  • unit
  • users
  • request-validation
#94
#95 keeps the hourly rate positive with at most four decimals unit high

The rate multiplies invoice line totals, so a zero, a negative or a five-decimal value produces amounts that cannot be rendered with two decimals. The pipe transforms the JSON value before validation, which is why a numeric string has to reach the service as a number and a non-numeric one has to fail instead of becoming NaN inside the amount. _Automated by src/users/users.dto.spec.ts._

  1. Validate 0.0001, 1000000, 0, 0.00001, 45.12345, 1000001, "45.5" and "not-a-rate". Expected: Both boundary values and the numeric string pass; zero, the amount below the minimum, the five decimals inside the range, the amount above the limit and the non-numeric string report an error for hourlyRate.
  • order-desk:users.validation.hourly-rate
  • unit
  • users
  • request-validation
#95
#96 requires the current password and a real change in the profile update unit high

Changing the login email or the display name is confirmed with the current password, so a stolen session alone cannot take over the account. The password field is required even when the payload carries nothing else, and a whitespace name is refused because it would render as an empty header. _Automated by src/users/users.dto.spec.ts._

  1. Validate a name-and-email payload with the current password, then a payload without it. Expected: The complete payload passes; the payload without currentPassword reports an error for it.
  2. Validate a whitespace-only name with a valid currentPassword. Expected: The result reports an error for name.
  • order-desk:users.validation.profile
  • unit
  • users
  • request-validation
#96
Accounts 5
#108 keeps an executor active while unfinished orders remain unit high critical

Deactivating an executor who still works on an order would leave that order assigned to an account that can no longer sign in, so the transition is refused until the work is reassigned. The guard runs inside the transaction that locks the row, which means a refusal has to leave the account, its sessions and the timestamp exactly as they were - a case that only checks the exception would miss a half-applied lock. _Automated by src/users/users.service.spec.ts._

  1. Call setActive("executor-1", false). Expected: The call rejects with ConflictException.
  2. Read the account and its sessions. Expected: The account is still active, its timestamp is untouched and the session survives.
  • order-desk:users.accounts.deactivate-guard
  • unit
  • users
  • accounts
#108
#109 ends every session of a deactivated account unit high critical

A deactivated account has to lose its access at once, which means the stored sessions - not only the flag - are what makes the difference: a client holding a cookie keeps working until the session rows are gone. The case also checks that the sessions of another account survive, and that a customer with unfinished orders is still deactivated, because that guard only concerns executors. _Automated by src/users/users.service.spec.ts._

  1. Call setActive("customer-1", false). Expected: The call returns the account with isActive: false.
  2. Read the sessions table. Expected: Only the executor session remains; both customer sessions are gone.
  3. Read the orders table. Expected: The open order of the customer is untouched.
  • order-desk:users.accounts.deactivate
  • unit
  • users
  • accounts
#109
#110 replaces the stored password hash and ends the sessions of the account unit high critical

An administrator resets a password when an account is compromised, so the previous password has to stop working and every session opened with it has to end; otherwise the attacker keeps both. The case verifies the stored hash with the real crypto of Better Auth instead of comparing strings, because only that proves which password the account now accepts. _Automated by src/users/users.service.spec.ts._

  1. Call resetPassword("executor-1", "new-password"). Expected: The call resolves with { success: true }.
  2. Verify new-password and old-password against the stored hash. Expected: The new password verifies, the old one does not, and the hash itself changed.
  3. Read the sessions table. Expected: Both sessions of the account are gone.
  • order-desk:users.accounts.password-reset
  • unit
  • users
  • accounts
#110
#111 refuses a password reset for an administrator or an account without a password unit high

The reset endpoint belongs to the administrator panel for customer and executor accounts, so it is scoped by role and active flag: an administrator account is not a target, and an account that has no credential provider cannot be given a password through this path. Both branches report a distinct error and write nothing. _Automated by src/users/users.service.spec.ts._

  1. Call resetPassword for the administrator. Expected: The call rejects with NotFoundException.
  2. Call resetPassword for the executor without a password account. Expected: The call rejects with BadRequestException.
  3. Read the accounts table. Expected: No credential account was created or changed.
  • order-desk:users.accounts.reset-scope
  • unit
  • users
  • accounts
#111
#198 refuses to deactivate an administrator account unit high critical

The administrator is the only role that can deactivate anybody, so an administrator account that could be deactivated could lock the console out of its own last user - or, worse, be switched off by a mistaken request that the API then reports as done. The role filter turns both directions into 404, and the case keeps the row and the session so a refusal cannot hide a write. _Automated by src/users/users.service.spec.ts._

  1. Call setActive("admin-1", false) and then setActive("admin-1", true). Expected: Both calls reject with NotFoundException.
  2. Read the user and session tables. Expected: The administrator is still ADMIN and isActive: true, and its session is still stored.
  • order-desk:users.accounts.deactivate-refuses-admin
  • unit
  • users
  • accounts
#198
Executors and customers 5
#112 creates an active executor and drops the session its sign-up opened unit high critical

The administrator creates executors from the panel, and the account is born as a customer of the sign-up endpoint, so the role has to be set afterwards. The session that sign-up opened belongs to the administrator's browser request, not to the new executor, and leaving it would sign the administrator into the account they just created. The case asserts the stored account and the session table, with the sign-up itself replaced as the boundary. _Automated by src/users/users.service.spec.ts._

  1. Call createExecutor with a padded name and an upper-case email. Expected: The returned account is an active executor with trimmed and lower-cased values.
  2. Read the user and session tables. Expected: One executor row exists and no session was left behind.
  3. Inspect the sign-up the service asked Better Auth for. Expected: It received the trimmed name and the lower-cased email.
  • order-desk:users.executors.create
  • unit
  • users
  • executors-and-customers
#112
#113 refuses a second executor for an email that already has an account unit high

One address, one account: the email is the login, so a duplicate would make sign-in ambiguous and split the work history of a person between two rows. The check runs before Better Auth is asked to create anything, which is why the case asserts that no sign-up happened and no row was added - the unique index alone would report the same error, but after a half-finished creation. _Automated by src/users/users.service.spec.ts._

  1. Call createExecutor with the same address in another case. Expected: The call rejects with ConflictException.
  2. Inspect the sign-up and the user table. Expected: Better Auth was never called and the only row is the original customer.
  • order-desk:users.executors.create-duplicate
  • unit
  • users
  • executors-and-customers
#113
#114 removes the half-created account when the executor role cannot be stored unit medium

Creation spans two systems: Better Auth owns the account, the API owns the role. When the second step fails, the first one has to be undone, otherwise the address stays taken by a customer account that nobody can use or recreate. The case makes the role update fail and checks that the account is gone rather than only that the request failed. _Automated by src/users/users.service.spec.ts._

  1. Call createExecutor with a fresh address. Expected: The call fails with the database error.
  2. Read the user table. Expected: No account remains for the address.
  • order-desk:users.executors.create-rollback
  • unit
  • users
  • executors-and-customers
#114
#115 renames an executor and reports anyone else as not found unit medium

The administrator renames an executor, and the same write is scoped by role so it cannot be used to rewrite a customer through the executor endpoint. Prisma answers a scoped update that matches nothing with P2025, which has to reach the client as 404 instead of a server error - the case covers the successful rename and both miss cases, because only the mapping of that error is easy to lose. _Automated by src/users/users.service.spec.ts._

  1. Call updateExecutor for the executor with a padded name. Expected: The stored name is the trimmed one.
  2. Call updateExecutor for the customer and for the unknown id. Expected: Both calls reject with NotFoundException.
  • order-desk:users.executors.update
  • unit
  • users
  • executors-and-customers
#115
#116 lists customers separately from executors unit medium

The panel keeps customers and executors on separate screens, so the customer list must not leak executors and must be able to include deactivated accounts, because the administrator needs them to reactivate someone. Customer rows carry no hourly rate, and the case checks the payload does not grow an executor-only field. _Automated by src/users/users.service.spec.ts._

  1. Call listCustomers(false). Expected: Only the active customer is returned.
  2. Call listCustomers(true). Expected: Both customers are returned, ordered by name, and the executor is not among them.
  3. Inspect a returned row. Expected: The payload has no hourlyRate field.
  • order-desk:users.customers.list
  • unit
  • users
  • executors-and-customers
#116
DevTools 25
Access guard 5
#24 hides devtools endpoints when the feature flag is disabled unit high

With DEVTOOLS_ENABLED=false the devtools controllers still exist in the bundle, so the guard is the only thing keeping reset and seed routes out of reach. It answers 404 rather than 403: outside a development environment the endpoints should not announce their existence at all. _Automated by src/devtools/devtools.guard.spec.ts._

  1. Call canActivate with a valid x-devtools-api-key header. Expected: The guard throws NotFoundException.
  • order-desk:devtools.access-guard.flag-off
  • unit
  • devtools
  • access-guard
#24
#25 fails explicitly when enabled without an API key unit medium

Enabling devtools without DEVTOOLS_API_KEY is a deployment mistake, not a client error. Answering 401 would look like a wrong key and send the operator hunting in the wrong direction, so the guard raises 500 and the misconfiguration shows up immediately. _Automated by src/devtools/devtools.guard.spec.ts._

  1. Call canActivate with an arbitrary key header. Expected: The guard throws InternalServerErrorException.
  • order-desk:devtools.access-guard.missing-key-config
  • unit
  • devtools
  • access-guard
#25
#26 rejects a missing or incorrect API key unit high critical

The header is compared against the configured key and the comparison is constant-time, so a near-miss byte-by-byte guess gains nothing. Both a missing header and a wrong value must end in 401 without revealing which of the two conditions failed. _Automated by src/devtools/devtools.guard.spec.ts._

  1. Call canActivate without the x-devtools-api-key header. Expected: The guard throws UnauthorizedException.
  2. Call canActivate with x-devtools-api-key: wrong-development-key-at-least-32. Expected: The guard throws UnauthorizedException as well.
  • order-desk:devtools.access-guard.rejects-wrong-key
  • unit
  • devtools
  • access-guard
#26
#27 accepts the configured API key unit high critical

The guard has to let the documented key through, otherwise the whole suite of devtools tools is unusable. Together with the rejection case it pins down both sides of the comparison and catches a guard that denies everything. _Automated by src/devtools/devtools.guard.spec.ts._

  1. Call canActivate with the configured key in x-devtools-api-key. Expected: The guard returns true and lets the request continue.
  • order-desk:devtools.access-guard.accepts-key
  • unit
  • devtools
  • access-guard
#27
#28 fails explicitly when configured with a weak API key unit medium

A short key such as too-short is guessable, so the guard refuses to run with it instead of accepting a weak secret. This is a configuration error too, hence 500 - the operator has to fix the environment, and a client cannot influence the outcome. _Automated by src/devtools/devtools.guard.spec.ts._

  1. Call canActivate with the same short key. Expected: The guard throws InternalServerErrorException.
  • order-desk:devtools.access-guard.weak-key
  • unit
  • devtools
  • access-guard
#28
Seed cleanup 2
#29 clears payment reports and invoices before deleting seed orders and users unit high

The seed reset deletes the demo data without touching the schema, so every foreign key has to be respected. Payment reports go before invoices, invoices before orders, and orders before categories, sessions and users. Reports created while testing a seed order are picked up as well - they would otherwise block the invoice delete - while data that merely lives next to the seed has to survive. _Automated by src/devtools/devtools.service.spec.ts._

  1. Call clearSeed on that database. Expected: The three fixture users, both fixture orders, the fixture and testing invoices and their payment reports are gone, and no foreign-key failure interrupts the transaction.
  2. Inspect the rows the cleanup did not own. Expected: The unrelated order, its invoice, its payment report, its category and its session are still there.
  3. Inspect the returned report. Expected: deletedUsers counts the fixture users, deletedOrders counts the fixture order and the retired one, and version comes from the fixture.
  • order-desk:devtools.seed-cleanup.order
  • unit
  • devtools
  • seed-cleanup
#29
#30 reports a conflict when seed records are still referenced elsewhere unit medium

When a foreign key still points at a seed row the transaction fails with P2003, which means the environment holds data the cleanup does not know about. Surfacing it as 409 tells the developer to look at the leftover reference, while a raw Prisma error would read like a broken tool. _Automated by src/devtools/devtools.service.spec.ts._

  1. Call clearSeed. Expected: The call rejects with ConflictException.
  2. Inspect the tables after the failed transaction. Expected: The seed user, order and category are still there, because the transaction rolled back and left the environment untouched.
  • order-desk:devtools.seed-cleanup.conflict
  • unit
  • devtools
  • seed-cleanup
#30
Reset 4
#31 wipes every table in dependency order and recreates the administrator from the environment unit high blocker

The reset returns the demo environment to a known state: every table is emptied in dependency order, stored files are purged when asked, and a fresh administrator is recreated from ADMIN_EMAIL and ADMIN_PASSWORD, otherwise nobody could sign in afterwards. The password is hashed, and the report returns per-table counts so the operator can see what was removed. _Automated by src/devtools/devtools.service.spec.ts._

  1. Call reset({ purgeFiles: true }) on that database. Expected: Every business table - sessions, verifications, categories, orders, invoices, payment reports and invoice sequences - is empty afterwards, and no foreign-key failure interrupts the transaction.
  2. Inspect the recreated administrator. Expected: The email is normalized to admin@example.test, the role is ADMIN, the account is active, the credential accountId matches the user and the stored password verifies against reset-password-123.
  3. Inspect the returned report. Expected: It contains the per-table delete counts of the seeded rows, the new administrator ID and email, and the file purge result { deleted: 5, failed: 1 } from a single purge call.
  • order-desk:devtools.reset.full
  • unit
  • devtools
  • reset
#31
#32 keeps stored files when the purge is not requested unit medium

The file purge is the slow and irreversible half of the reset, so it stays opt-in: with purgeFiles: false the database is cleared but object storage is left alone and the report says so with a null file section. The administrator is still recreated, because a reset without a login is a broken environment. _Automated by src/devtools/devtools.service.spec.ts._

  1. Call reset({ purgeFiles: false }). Expected: Object storage is never asked to delete anything, report.files is null and the administrator is still created.
  • order-desk:devtools.reset.keeps-files
  • unit
  • devtools
  • reset
#32
#33 refuses to reset when the administrator credentials are not configured unit medium

A reset that empties every table and then cannot create an administrator would lock everyone out of the environment. The credentials are therefore checked before the transaction opens, so the database is untouched when the configuration is incomplete. _Automated by src/devtools/devtools.service.spec.ts._

  1. Call reset({ purgeFiles: true }). Expected: The call rejects with BadRequestException and no transaction is opened.
  • order-desk:devtools.reset.requires-admin
  • unit
  • devtools
  • reset
#33
#118 reports a failed file purge without undoing the reset unit medium

The database is the source of truth of a reset, so it is committed before object storage is touched. A bucket that cannot be reached therefore has to surface in the report as an error while the environment stays usable - throwing here would tell the operator the reset failed even though the data is already gone and the administrator already exists. _Automated by src/devtools/devtools.service.spec.ts._

  1. Call reset({ purgeFiles: true }). Expected: The call resolves, report.files is { deleted: 0, failed: 0, error: "Bucket unreachable" } and the administrator is still created.
  • order-desk:devtools.reset.purge-failure
  • unit
  • devtools
  • reset
#118
Request validation 2
#97 accepts a reset only with the confirmation phrase unit high critical

One request empties the whole environment, so the body has to prove the intent: confirm must be exactly reset-all-data, which a Swagger click or a reused curl history cannot supply by accident. purgeFiles stays optional because keeping the files is the safer default when it is omitted. _Automated by src/devtools/devtools.dto.spec.ts._

  1. Validate confirm: "reset-all-data", then confirm: "reset". Expected: The exact phrase passes; any other value reports an error for confirm.
  2. Validate purgeFiles: "yes", then purgeFiles: false and an omitted purgeFiles. Expected: The string reports an error for purgeFiles; the boolean and the omitted field pass.
  • order-desk:devtools.validation.reset-confirmation
  • unit
  • devtools
  • request-validation
#97
#98 validates the role, email and password of a test account unit high

Development accounts are created straight into the database with a chosen role, so the role has to match the enum exactly - customer in lowercase would silently become an account without access. The password boundary matters because the same rule protects every sign-in path. _Automated by src/devtools/devtools.dto.spec.ts._

  1. Validate a customer account with an email and an eight-character password. Expected: The payload passes.
  2. Validate role: "customer", a seven-character password and email: "not-an-email". Expected: Each payload reports an error for role, password and email respectively.
  • order-desk:devtools.validation.create-user
  • unit
  • devtools
  • request-validation
#98
Users 8
#119 creates a test account with a normalized email and revokes its sign-up session unit medium

Test accounts are created through the same sign-up Better Auth uses, so a developer does not end up with a password hash produced by a different code path. The email is trimmed and lowercased before the call - otherwise New@Example.Test and new@example.test would be two logins for one person - and the session the sign-up opens is withdrawn, because the tool must not sign itself in. _Automated by src/devtools/devtools.service.spec.ts._

  1. Call createUser(EXECUTOR, " New.Executor@Example.Test ", "executor-password"). Expected: The returned id belongs to a user stored with new.executor@example.test.
  2. Inspect the stored user. Expected: The email is normalized, the name is the local part of it and the role is EXECUTOR.
  3. Inspect the sessions. Expected: No session is left, because the sign-up session was revoked.
  • order-desk:devtools.users.create-normalizes
  • unit
  • devtools
  • users
#119
#120 refuses a second account for an email that is already in use unit medium

Emails are unique, and a duplicate would either fail deep inside Better Auth or, worse, create a second account that shares a login. The check runs against the normalized email before sign-up is attempted, so a rejected request writes nothing at all. _Automated by src/devtools/devtools.service.spec.ts._

  1. Call createUser(CUSTOMER, " TAKEN@Example.Test ", "customer-password"). Expected: The call rejects with ConflictException before sign-up is attempted.
  2. Inspect the users. Expected: Only the pre-existing account is stored.
  • order-desk:devtools.users.create-duplicate
  • unit
  • devtools
  • users
#120
#121 removes the account again when the role cannot be applied unit high critical

Sign-up and the role assignment are two writes, so the second one can fail after the account exists. Leaving that half-created customer behind would hand out a login with the wrong role - worse than a refused request - so the service deletes the account it just created and lets the error through. _Automated by src/devtools/devtools.service.spec.ts._

  1. Call createUser(EXECUTOR, "new.executor@example.test", "executor-password"). Expected: The call rejects with the database error.
  2. Inspect the users, accounts and sessions. Expected: All three tables are empty, so no half-created login survives.
  • order-desk:devtools.users.create-compensates
  • unit
  • devtools
  • users
#121
#122 lists the accounts of one role in creation order unit low

The list feeds the developer's account picker, so it filters on exactly one role and returns accounts oldest first. Only the identity and state fields are selected: the payload must not carry password hashes or other credential columns to a page that merely lists people. _Automated by src/devtools/devtools.service.spec.ts._

  1. Call listUsers(EXECUTOR). Expected: Only the three executors come back, ordered by creation date, including the inactive one.
  2. Inspect the fields of a returned account. Expected: Exactly id, name, email, role, isActive and createdAt are present.
  • order-desk:devtools.users.list
  • unit
  • devtools
  • users
#122
#123 normalizes a new email, unverifies it and ends the sessions unit high

A changed email is a new, unproven address: it is normalized like every other email in the system, marked unverified, and the sessions opened under the old address are ended so a link sent to the previous owner cannot be used against the account. The credential account itself is untouched. _Automated by src/devtools/devtools.service.spec.ts._

  1. Call updateUser("user-1", { email: " Changed@Example.Test " }). Expected: The stored email becomes changed@example.test and emailVerified turns false.
  2. Inspect the sessions. Expected: The session of user-1 is gone while the session of user-2 survives.
  3. Inspect the returned account. Expected: It reports the new email and the unchanged role.
  • order-desk:devtools.users.update-email
  • unit
  • devtools
  • users
#123
#124 replaces the stored password hash and ends the sessions, keeping the email verified unit high critical

The password change has to write a hash the sign-in path can verify, and it must not leave a session opened with the old password alive - otherwise resetting a leaked password would not lock the thief out. The email, and with it its verified state, is not part of this write. _Automated by src/devtools/devtools.service.spec.ts._

  1. Call updateUser("user-1", { password: "new-password-123" }). Expected: The stored hash verifies against new-password-123 and no longer against old-password.
  2. Inspect the user and the sessions. Expected: The email stays verified and the session is gone.
  • order-desk:devtools.users.update-password
  • unit
  • devtools
  • users
#124
#125 refuses a password change for an account without a credential provider unit medium

An account created through an external identity provider has no password row to replace. Creating one would silently turn a provider-only login into a password login, so the request is refused and the existing account and sessions stay as they are. _Automated by src/devtools/devtools.service.spec.ts._

  1. Call updateUser("user-1", { password: "new-password-123" }). Expected: The call rejects with BadRequestException.
  2. Inspect the account and the sessions. Expected: The provider row has no password and the session is still there.
  • order-desk:devtools.users.update-without-credential
  • unit
  • devtools
  • users
#125
#126 refuses an empty patch, an unknown user and an email that is already taken unit medium

Three requests have to fail without side effects: a patch that names no field would issue an empty update, an unknown id must not read as success, and an email that belongs to somebody else cannot be claimed - the unique constraint inside the transaction has to become a conflict, leaving the account as it was. _Automated by src/devtools/devtools.service.spec.ts._

  1. Call updateUser("user-1", {}). Expected: The call rejects with BadRequestException.
  2. Call updateUser("user-missing", { isActive: false }). Expected: The call rejects with NotFoundException.
  3. Call updateUser("user-1", { email: "SECOND@example.test" }). Expected: The call rejects with ConflictException and both users keep their original emails.
  • order-desk:devtools.users.update-rejects
  • unit
  • devtools
  • users
#126
Seed import 4
#127 imports the fixture with credential accounts, status history and invoices unit high critical

The seed is what a developer demos and a reviewer clicks through, so it has to be a usable environment rather than rows in tables: every fixture user can sign in with the seed password, every order carries the status history it claims, assigned orders carry the assignment behind their status, and the invoiced order carries its invoice. The fixture file is read as it is, which keeps the case honest when the fixture changes. _Automated by src/devtools/devtools.service.spec.ts._

  1. Call seed(). Expected: The report names the fixture version, every fixture user with its email, and the number of imported orders.
  2. Inspect the users and their accounts. Expected: Each user is stored verified with its fixture email and role, the executor with its hourly rate, and each has a credential account whose hash verifies against the seed password.
  3. Inspect the categories and orders. Expected: Both categories were created by the fixture administrator, every order carries its fixture status with a single history row starting from nothing, and the four assigned orders carry an active assignment created by the administrator.
  4. Inspect the comments and the invoice. Expected: All fixture comments are present, and the invoice keeps its number, ISSUED status, decimal hours and amount, and no payment date.
  • order-desk:devtools.seed.imports-fixture
  • unit
  • devtools
  • seed-import
#127
#128 refuses to import when a fixture email belongs to another account unit medium

A seed run replaces its own rows, but it must never overwrite an account somebody created by hand: the same email under a different id means the fixture would collide with real data. The conflict is reported before the transaction opens and names the offending address, so nothing is written. _Automated by src/devtools/devtools.service.spec.ts._

  1. Call seed(). Expected: The call rejects with ConflictException naming that email address.
  2. Inspect the users, orders and categories. Expected: Only the pre-existing account is stored; no fixture row was created.
  • order-desk:devtools.seed.rejects-email-conflict
  • unit
  • devtools
  • seed-import
#128
#129 refuses to seed without a seed password of at least eight characters unit high

The seed password is the only credential a reviewer needs, so a missing or too short value would produce accounts nobody can sign into - or accounts protected by a password that does not meet the rule the sign-up path enforces. The check runs before anything is written. _Automated by src/devtools/devtools.service.spec.ts._

  1. Call seed() with the variable unset. Expected: The call rejects with BadRequestException.
  2. Call seed() with DEVTOOLS_SEED_PASSWORD="short". Expected: The call rejects with BadRequestException and no user is created.
  • order-desk:devtools.seed.requires-password
  • unit
  • devtools
  • seed-import
#129
#130 re-seeds over its own rows instead of failing on them unit medium

A developer runs the seed again after changing the fixture or after breaking the demo data, so a second run has to converge instead of failing on the unique ids it created itself. It removes its own records first, which is why two runs leave exactly one copy of every fixture row. _Automated by src/devtools/devtools.service.spec.ts._

  1. Call seed() twice. Expected: Both calls succeed and report the same number of orders.
  2. Inspect the tables. Expected: Users, accounts, orders, status history rows and invoices each appear exactly as often as in the fixture, with no duplicates.
  • order-desk:devtools.seed.replaces-previous
  • unit
  • devtools
  • seed-import
#130
Orders (integration) 21
Lifecycle 16
#34 creates a draft order for the current customer api high critical

A new order starts as a private draft: NEW, owned by the signed-in customer, without an executor and without a deadline. The first history entry is written by the same transaction with a null fromStatus, which is what the customer timeline renders as the creation event. _Automated by test/integration/orders-lifecycle.spec.ts._

  1. POST /api/orders with a title, a description and the existing category ID as the customer. Expected: 201 and the created order in the response body.
  2. Inspect status, customerId, executorId and categoryId of that order. Expected: NEW, the caller's ID, null and the requested category.
  3. Inspect statusHistory. Expected: Exactly one entry, fromStatus: null and toStatus: NEW.
  • order-desk:integration.lifecycle.create-draft
  • api
  • orders-integration
  • lifecycle
#34
#35 rejects a draft that references an unavailable category api high

A category can be deactivated or deleted between page load and submit, so the reference is checked in the database rather than trusted from the form. The rejection is a 400 with the readable message the web form shows next to the category picker, not a foreign-key 500. _Automated by test/integration/orders-lifecycle.spec.ts._

  1. Prepare a categoryId that matches no category: a random UUID. Expected: The value is syntactically valid, so the request reaches the service instead of the DTO.
  2. POST /api/orders as the customer with that category. Expected: 400 with code: BAD_REQUEST.
  3. Read the error message. Expected: Category is not available, the text the web form shows next to the category picker.
  • order-desk:integration.lifecycle.unknown-category
  • api
  • orders-integration
  • lifecycle
#35
#36 moves a submitted draft into the executor pool api high critical

Submitting is the transition from a private draft to a claimable job. The order keeps no executor while it waits in the pool, gets a submission timestamp, and the history shows both statuses so the customer can see when the job was published. _Automated by test/integration/orders-lifecycle.spec.ts._

  1. POST /api/orders/{id}/submit as the owning customer. Expected: 201 with the updated order.
  2. Inspect status, executorId and submittedAt. Expected: WAITING_DISTRIBUTION, null and a non-null submission timestamp.
  3. Inspect statusHistory. Expected: The entries are NEW and WAITING_DISTRIBUTION, in that order.
  • order-desk:integration.lifecycle.submit-to-pool
  • api
  • orders-integration
  • lifecycle
#36
#37 grants a pooled order to exactly one of two concurrent claims api high blocker

Two executors can tap the same pooled order at the same moment, and the row-level conditional update has to make that race safe: one claim wins, the other is refused with 409, and the database ends with a single assignment and a single ASSIGNED history entry. A double assignment would bill two executors for one job. _Automated by test/integration/orders-lifecycle.spec.ts._

  1. Fire POST /api/orders/{id}/claim as two executors at the same time via Promise.all. Expected: Both requests reach the API with the same order ID before either finishes.
  2. Compare the two responses. Expected: Exactly one is 201 with executorId set to the winner; the other is 409 with code: CONFLICT and the message Order is no longer available in the pool.
  3. Read the order back as the customer. Expected: status: ASSIGNED, exactly one entry in assignments, and exactly one ASSIGNED entry in statusHistory.
  • order-desk:integration.lifecycle.concurrent-claim
  • api
  • orders-integration
  • lifecycle
#37
#38 accepts an estimate and drives the order to customer acceptance api high critical

The core money path: the executor prices the job, the customer accepts, work starts, the executor logs time and submits for review, and the customer accepts the result. Each step must leave the order in the next status and keep the estimate amount derived from hours * hourlyRate. _Automated by test/integration/orders-lifecycle.spec.ts._

  1. POST /api/orders/{id}/estimate as the assigned executor with hours: 2.5. Expected: 201 with a PENDING estimate whose amount equals 2.5 * 60.
  2. POST /api/orders/{id}/estimates/{estimateId}/respond as the customer with accepted: true and a comment. Expected: The estimate becomes ACCEPTED and the order becomes IN_PROGRESS.
  3. Log 150 minutes via POST /api/orders/{id}/time, then submit for review via POST /api/orders/{id}/submit-review as the executor. Expected: The order becomes ON_REVIEW and carries timeEntry.minutes: 150.
  4. POST /api/orders/{id}/accept as the customer. Expected: 201 with status still ON_REVIEW and a non-null acceptedAt, which is what unlocks invoicing.
  • order-desk:integration.lifecycle.accept-estimate
  • api
  • orders-integration
  • lifecycle
#38
#39 returns work for revision and lets the executor resume it api high

Review is not always acceptance. The customer can send the work back with a comment, the order becomes NEEDS_REVISION, and the comment is stored in the order thread so the executor knows what to change. The executor then resumes the same order instead of the customer creating a new one. _Automated by test/integration/orders-lifecycle.spec.ts._

  1. POST /api/orders/{id}/submit-review as the executor. Expected: The order becomes ON_REVIEW.
  2. POST /api/orders/{id}/request-revision as the customer with a comment. Expected: The order becomes NEEDS_REVISION and the comment appears in the order comments.
  3. POST /api/orders/{id}/resume-revisions as the executor. Expected: The order returns to IN_PROGRESS.
  • order-desk:integration.lifecycle.revision
  • api
  • orders-integration
  • lifecycle
#39
#40 rejects an estimate and returns the order to the pool api high

A rejected price must not strand the order with an executor who will not do the job. The estimate becomes REJECTED, the assignment is closed as RELEASED, and the order goes back to the pool so another executor can quote it. _Automated by test/integration/orders-lifecycle.spec.ts._

  1. POST /api/orders/{id}/estimate as the executor with hours: 4. Expected: 201 with a PENDING estimate.
  2. POST /api/orders/{id}/estimates/{estimateId}/respond as the customer with accepted: false and the comment Too expensive. Expected: The estimate becomes REJECTED and the order returns to WAITING_DISTRIBUTION with executorId: null.
  3. Inspect the assignment of the rejected executor. Expected: It records outcome: RELEASED.
  • order-desk:integration.lifecycle.reject-estimate
  • api
  • orders-integration
  • lifecycle
#40
#41 requires a reason when an administrator cancels work in progress api high

After the work has started, cancelling is an administrative action that needs a written reason: the customer can no longer do it themselves, and the executor must be able to see why the job stopped. The reason is stored on the order and shown in the history. _Automated by test/integration/orders-lifecycle.spec.ts._

  1. POST /api/orders/{id}/cancel as the customer with a reason. Expected: 403 with code: FORBIDDEN and the message Customers can cancel only their own orders before work starts.
  2. POST /api/orders/{id}/cancel as the administrator without a body. Expected: 400 with code: BAD_REQUEST and the message A cancellation reason is required after work has started.
  3. Repeat the administrative cancel with {"reason": "The customer changed plans"}. Expected: 201 with status: CANCELLED and cancellationReason equal to the submitted text.
  • order-desk:integration.lifecycle.cancel-reason
  • api
  • orders-integration
  • lifecycle
#41
Access control 5
#42 rejects requests without a session api high critical

Every order route sits behind the session guard, and an anonymous request must be refused before any query runs. The 401 with code: UNAUTHENTICATED is what makes the web client redirect to the sign-in page instead of showing an empty list. _Automated by test/integration/orders-lifecycle.spec.ts._

  1. Use an HTTP client without the session cookie. Expected: The request carries no credentials at all.
  2. GET /api/orders. Expected: The session guard rejects the request before any order query runs.
  3. Inspect the response. Expected: 401 with code: UNAUTHENTICATED and no order data.
  • order-desk:integration.access-control.no-session
  • api
  • orders-integration
  • lifecycle
  • access-control
#42
#43 hides a customer order from another customer api high critical

Order IDs are not secrets, so access is enforced per request: another customer's order answers 403 and never appears in the attacker's list. Both halves matter - a detail endpoint that leaks and a list that still shows the row would be equally fatal. _Automated by test/integration/orders-lifecycle.spec.ts._

  1. GET /api/orders/{id} as the second customer. Expected: 403 with code: FORBIDDEN.
  2. Read the error message. Expected: You cannot access this order - the body reveals neither the title nor the address of the order.
  3. GET /api/orders as the second customer. Expected: The foreign order ID is absent from the returned list.
  • order-desk:integration.access-control.foreign-order
  • api
  • orders-integration
  • lifecycle
  • access-control
#43
#44 shows a pooled order to executors and hides it once it is claimed api high

A pooled order is visible to every executor so they can decide whether to claim it, and invisible as soon as somebody else takes it. Without the second half an executor could keep reading a job - including the customer's address - that is no longer theirs. _Automated by test/integration/orders-lifecycle.spec.ts._

  1. GET /api/orders/{id} as the first executor. Expected: 200 with status: WAITING_DISTRIBUTION.
  2. POST /api/orders/{id}/claim as the second executor. Expected: 201, the order is now assigned to the second executor.
  3. GET /api/orders/{id} as the first executor again. Expected: 403, because the order left the pool.
  • order-desk:integration.access-control.pool-visibility
  • api
  • orders-integration
  • lifecycle
  • access-control
#44
#45 refuses order creation for an executor api high

Executors work on orders, they do not commission them. The role check rejects the request with a 403 before validation runs, so an executor cannot probe the DTO rules or create jobs to bill themselves for. _Automated by test/integration/orders-lifecycle.spec.ts._

  1. Sign in as an executor. Expected: The session carries the EXECUTOR role.
  2. POST /api/orders with a valid-looking body. Expected: The role guard rejects the request before the DTO rules are evaluated.
  3. Inspect the response. Expected: 403 with code: FORBIDDEN and the message This role cannot access the requested resource.
  • order-desk:integration.access-control.executor-create
  • api
  • orders-integration
  • lifecycle
  • access-control
#45
#46 refuses administrative completion for a customer api high

Completing an order releases the executor's payment, so the endpoint is administrator-only even for the customer who owns the order. The refusal happens on the role check, which keeps the payment gate independent from the ownership check. _Automated by test/integration/orders-lifecycle.spec.ts._

  1. Sign in as the customer who owns the order. Expected: Ownership alone does not grant administrative actions.
  2. POST /api/orders/{id}/complete as that customer. Expected: The role check refuses the request before the payment gate runs.
  3. Inspect the response. Expected: 403 with code: FORBIDDEN; the order status is unchanged.
  • order-desk:integration.access-control.customer-complete
  • api
  • orders-integration
  • lifecycle
  • access-control
#46
Request validation 3
#47 rejects unknown fields instead of ignoring them api medium

The global validation pipe forbids unknown properties, so a client that sends priority today gets a 400 instead of a silent 201 whose value was dropped. That turns a renamed or mistyped field into an immediate client error rather than a data inconsistency discovered later. _Automated by test/integration/orders-lifecycle.spec.ts._

  1. POST /api/orders as the customer with the extra field priority: "urgent". Expected: The global validation pipe inspects the payload before the service runs.
  2. Inspect the response status. Expected: 400 with code: BAD_REQUEST, not a 201 that silently dropped the field.
  3. Inspect the message list. Expected: It contains property priority should not exist.
  • order-desk:integration.validation.unknown-fields
  • api
  • orders-integration
  • lifecycle
  • request-validation
#47
#48 rejects a title that contains only whitespace api medium

The unit case checks the DTO in isolation; this one proves the pipe injected by the application actually runs it, trimming and then rejecting the blank title over real HTTP. A misconfigured pipe would only show up here. _Automated by test/integration/orders-lifecycle.spec.ts._

  1. POST /api/orders as the customer with title: " ". Expected: The pipe trims the title to an empty string before the checks run.
  2. Inspect the response status. Expected: 400; no order is created.
  3. Inspect the message list. Expected: At least one message names title.
  • order-desk:integration.validation.whitespace-title
  • api
  • orders-integration
  • lifecycle
  • request-validation
#48
#49 rejects a deadline that is not an ISO-8601 date api medium

dueAt is stored as a timestamp, and a free-form value such as tomorrow would either throw inside Prisma or, worse, be coerced to an arbitrary date. The pipe rejects it up front and names the field so the client can highlight the deadline input. _Automated by test/integration/orders-lifecycle.spec.ts._

  1. POST /api/orders as the customer with dueAt: "tomorrow". Expected: The value cannot be parsed as an ISO-8601 timestamp.
  2. Inspect the response status. Expected: 400; the request never reaches Prisma.
  3. Inspect the message list. Expected: At least one message names dueAt.
  • order-desk:integration.validation.deadline-format
  • api
  • orders-integration
  • lifecycle
  • request-validation
#49
Quotas 1
#151 accepts the attachments up to the order quota and answers the next one with a 409 api high

The quota is the only thing that stands between an open registration and a full volume, so it has to hold end to end: the files that fit are stored, and the one that does not is refused before it lands in SeaweedFS. It also pins the shape of the refusal - 409 rather than 400 or 413 - so the frontend can tell a full order from a malformed request, and the order keeps exactly the attachments the API accepted. _Automated by test/integration/orders-attachment-quota.spec.ts._

  1. Upload three 1-pixel PNG files to the order as that customer. Expected: Every call answers 201 with the stored attachment.
  2. Upload a fourth file. Expected: The call answers 409.
  3. Read the order. Expected: It lists exactly the three accepted file names.
  • order-desk:integration.quota.attachment-limit
  • api
  • orders-integration
  • quotas
#151
Attachments 1
#161 refuses a page uploaded as a photo with a 415 and downloads the stored file as a binary stream api high critical

The type of an upload used to come from the multipart part, and the download handed it back, so a caller could decide what the product says a file is. The running API has to prove both halves of the fix: an unaccepted signature answers 415 and never reaches SeaweedFS, and an accepted file is downloaded as application/octet-stream with an attachment disposition, which is what keeps the browser saving rather than rendering it in the application origin. _Automated by test/integration/orders-attachment-quota.spec.ts._

  1. Upload an HTML document named photo.png to that order as the customer. Expected: The call answers 415.
  2. Upload a real 1-pixel PNG to the same order. Expected: The call answers 201 with the stored attachment.
  3. Download the stored attachment and read its response headers. Expected: 200, content-type: application/octet-stream and a content-disposition that starts with attachment.
  • order-desk:integration.attachment-content-type.enforced
  • api
  • orders-integration
  • attachments
#161
Administration 2
#192 reassigns work in progress and returns the order to the estimate stage api high critical

The administrator can take work away from an executor after it started, but the new executor has a rate and an estimate of their own, so the order goes back to ASSIGNED and the approved amount is cleared. The previous executor loses access, and the recorded time stays on the order where the new executor overwrites it with their own summary entry. _Automated by test/integration/orders-lifecycle.spec.ts._

  1. POST /api/orders/{id}/assign with executorB as the administrator. Expected: 201; the order is ASSIGNED to executorB, approvedHours, approvedHourlyRate and approvedAmount are null, and the assignments list the new ACTIVE one above the REASSIGNED one.
  2. Read the order as the previous executor. Expected: 403, because the order no longer belongs to that account.
  3. Read the time entry of the order. Expected: It still holds 150 minutes recorded by the previous executor.
  4. Propose a three-hour estimate as executorB. Expected: 201, so the new executor can price the work before it starts again.
  • order-desk:integration.orders.reassign-after-start
  • api
  • orders-integration
  • administration
#192
#193 returns a declined assignment to the pool and withdraws its pending estimate api high critical

A decline is the executor's refusal of an assignment they have not started. The order must become claimable again, the declined assignment has to stay in the record, and the estimate that never reached the customer must not survive as a pending proposal. _Automated by test/integration/orders-lifecycle.spec.ts._

  1. POST /api/orders/{id}/decline as executorA with the comment "No availability this week". Expected: 201; the order is WAITING_DISTRIBUTION without an executor.
  2. Read the assignment, the estimate and the status history. Expected: The assignment is DECLINED, the estimate is WITHDRAWN, and the last history entry records ASSIGNED to WAITING_DISTRIBUTION with the comment.
  3. Claim the order as executorB. Expected: 201 with executorB assigned, so the pool works again.
  • order-desk:integration.orders.decline
  • api
  • orders-integration
  • administration
#193
Time tracking 1
#194 keeps one summary time entry that is editable only while the work is in progress api medium

Actual time is one summary entry per order, not a log: the executor corrects it while working and the last value wins. Once the work is submitted the figure is part of what the customer reviews, so a late save is refused and the stored value stays. _Automated by test/integration/orders-lifecycle.spec.ts._

  1. Record 90 minutes, then 120 minutes with a comment. Expected: Both calls answer 201; the second returns 120 minutes with the comment.
  2. Read the order as the customer. Expected: The single timeEntry holds 120 minutes.
  3. Submit the work for review, then record 200 minutes. Expected: The late save answers 409 with code: CONFLICT, and the stored entry still holds 120.
  • order-desk:integration.orders.time-overwrite
  • api
  • orders-integration
  • time-tracking
#194
Tooling 14
Qase manifest 7
#50 keeps every case key unique unit low

Manifest keys are the identity the suites and the sync script agree on: qc() looks a key up, and the generated ID map is keyed by it. A duplicate would silently shadow one of the two cases, so the catalogue refuses to contain one. _Automated by src/test-support/qase-manifest.spec.ts._

  1. Collect the key of every manifest entry. Expected: The number of distinct keys equals the number of entries.
  • order-desk:tooling.qase-manifest.unique-keys
  • unit
  • tooling
  • qase-manifest
#50
#51 gives every case a suite path and an automated layer unit low

The sync creates suites from the suite path, so an empty path would leave a case without a home in the TestOps repository. The layer must be one of the three automated layers, because it drives the layer field the sync writes and the filtering on the TestOps side. _Automated by src/test-support/qase-manifest.spec.ts._

  1. Walk every manifest entry. Expected: Each entry has at least one suite segment, and its layer is one of e2e, api or unit.
  • order-desk:tooling.qase-manifest.suite-paths
  • unit
  • tooling
  • qase-manifest
#51
#52 resolves generated case IDs only through manifest keys unit low

qase-case-ids.ts is generated, so it can keep an ID for a case that no longer exists in the manifest. The parity check turns that stale entry into a failing test instead of a result reported onto an abandoned case, which is what keeps the catalogue honest after a rename. _Automated by src/test-support/qase-manifest.spec.ts._

  1. Compare the keys of the generated ID map with the manifest keys. Expected: Every generated key still exists in the manifest.
  • order-desk:tooling.qase-manifest.generated-ids
  • unit
  • tooling
  • qase-manifest
#52
#60 documents every case with a description, steps and layer-specific detail unit low

A TestOps case is read by people who will never open the spec file, so the manifest carries the full case: a description that explains why the case exists, at least one step, and the preconditions that an api case needs before it can be replayed by hand. The check also guards the API contract with TestOps - titles are limited to 255 characters and a given suite cannot hold two cases with the same title, because the sync resolves cases by that pair. _Automated by src/test-support/qase-manifest.spec.ts._

  1. Walk every manifest entry and inspect its content fields. Expected: description and every step are non-empty, title is at most 255 characters, and no two cases share the same suite path and title.
  2. Check the cases of the api layer. Expected: Each of them has preconditions and at least three steps, so it is replayable by hand.
  • order-desk:tooling.qase-manifest.case-content
  • unit
  • tooling
  • qase-manifest
#60
#61 links every case to exactly one spec through qc() unit low

The manifest describes cases, the specs run them, and both directions have to agree: a manifest entry without a qc() call is documentation for a test that no longer exists, and a qc() call whose key is missing from the manifest fails collection already. This check scans the spec files and reports the orphaned entries, and it also tells the sync which spec file to credit in the case description. _Automated by src/test-support/qase-manifest.spec.ts._

  1. Scan every *.spec.ts file for qc("<key>" calls. Expected: Every manifest key appears in exactly one spec file, and no spec references a key that is absent from the manifest.
  • order-desk:tooling.qase-manifest.spec-coverage
  • unit
  • tooling
  • qase-manifest
#61
#67 links every manifest key to a generated case ID unit high

A result only lands on a TestOps case when qc() can read the numeric ID that the sync generated: without one the helper returns the bare title, the reporter creates nothing, and the result is dropped silently. The offline parity check turns that silence into a failing test as soon as a catalogue entry has no ID, so a case added in a pull request cannot reach main unlinked. _Automated by src/test-support/qase-manifest.spec.ts._

  1. Compare every manifest key with the generated ID map. Expected: Each key resolves to a numeric TestOps case ID.
  • order-desk:tooling.qase-manifest.linked-ids
  • unit
  • tooling
  • qase-manifest
#67
#117 labels every case with a specific type instead of other unit low

Qase Type answers what kind of testing a case performs, so a catalogue that leaves the field on other says nothing a reader can filter or report on. Each entry names its type deliberately: functional for the shape the catalogue has to keep, regression where the case exists to catch the side effect of an edit to the manifest or to a spec, and integration for the sync against the TestOps repository. A new case that cannot answer the question shows up here instead of reaching the project as another other. _Automated by src/test-support/qase-manifest.spec.ts._

  1. Walk every manifest entry and read its type. Expected: Each entry declares a type and none of them is other.
  • order-desk:tooling.qase-manifest.case-type
  • unit
  • tooling
  • qase-manifest
#117
Qase sync 6
#63 adopts an existing case by its order-desk tag so a rename keeps its ID unit medium

TestOps stores results against numeric case IDs, so replacing a case whenever its title or suite changes would detach the whole history of that behaviour from the case that now describes it. The sync therefore treats the order-desk:<key> tag as the identity: a case found by tag is reused, and the rename or move is applied to it as an ordinary update. _Automated by src/test-support/qase/sync-plan.spec.ts._

  1. Plan a sync where the remote case still has the old title and sits in the old suite. Expected: The plan matches the remote case ID to the manifest key instead of asking for a new case.
  2. Inspect the planned archive moves. Expected: The matched case is not archived, because its key is still in the catalogue.
  • order-desk:tooling.qase-sync.adoption
  • unit
  • tooling
  • qase-sync
#63
#64 moves a retired case into the Archive suite instead of deleting it unit medium

Removing a test usually removes the behaviour from the manifest too, but the case still documents what the product used to guarantee and it may be the container of historical results. TestOps has no case archive in its API, so the sync emulates one by moving the case under Archive / <original top level suite>, which keeps it out of the active tree without destroying anything. _Automated by src/test-support/qase/sync-plan.spec.ts._

  1. Plan a sync where a tagged remote case no longer appears in the catalogue. Expected: The plan asks to move that case to Archive / <original top level suite> rather than to delete it.
  2. Plan the same sync again with the case already inside Archive. Expected: No further move is planned, so repeated syncs stay idempotent.
  • order-desk:tooling.qase-sync.archive
  • unit
  • tooling
  • qase-sync
#64
#65 brings an archived case back to its suite when its key returns unit low

A retired behaviour often comes back, and with it comes the case that already documented it. Because archiving only moves the case, the tag survives, so the returning key finds its old case and the sync moves it home: the restored case keeps the ID, and therefore the history, of the archived one. _Automated by src/test-support/qase/sync-plan.spec.ts._

  1. Plan a sync where the remote case sits in Archive / Orders and its key is back in the catalogue. Expected: The plan matches that case to the key instead of creating a second case for the same behaviour.
  2. Compare the planned target suite with the manifest suite. Expected: The matched case is patched back into the manifest suite, not left in Archive.
  • order-desk:tooling.qase-sync.restore
  • unit
  • tooling
  • qase-sync
#65
#66 refuses to guess when two cases carry the same catalogue tag unit medium critical

The tag is the identity, so two cases carrying the same tag make the identity ambiguous: patching one of them would silently leave the other as a stale copy that never receives results. The plan reports the conflict and the sync stops before writing anything, which leaves the decision to a human. _Automated by src/test-support/qase/sync-plan.spec.ts._

  1. Plan a sync in which two remote cases carry the tag of one manifest key. Expected: The plan reports a conflict naming the key and both case IDs.
  2. Run the sync with that plan. Expected: The sync throws before creating, updating or archiving anything.
  • order-desk:tooling.qase-sync.conflicts
  • unit
  • tooling
  • qase-sync
#66
#68 reports a dry run as drift when applying it would write anything unit high

Once runs are reported from the pipeline, the catalogue and TestOps can drift apart unnoticed: a case edited or added in a pull request lives only in the repository until somebody runs the sync. The post-merge check runs the sync in dry-run mode and fails when the plan is not empty, so drift is reported on the pipeline run that introduced it instead of surfacing as results dropped onto stale cases. The check reads the same plan the sync applies, so it cannot disagree with it. _Automated by src/test-support/qase/sync-plan.spec.ts._

  1. Summarize a dry run in which every catalogue entry already matches TestOps. Expected: No drift is reported and the check passes.
  2. Summarize a dry run that would create a suite, create a case, update a case or archive one. Expected: Drift is reported for each of those changes, so the check fails and names what is pending.
  • order-desk:tooling.qase-sync.drift
  • unit
  • tooling
  • qase-sync
#68
#210 writes each case tag once when a layer repeats a suite slug unit medium

TestOps stores tags as a set and drops a repeated title, so a payload that lists the same tag twice can never describe what the project returns. The layer and a suite root share a slug whenever an API / … case is marked layer: "api" (or an E2E / … case layer: "e2e"), and without deduplication every dry run reports such a case as drifted: the sync patches it forever and the post-merge catalogue gate fails on every merge, so no run reaches the project. _Automated by src/test-support/qase/sync-plan.spec.ts._

  1. Compose the tags of a case whose layer and a suite slug are both api. Expected: The payload lists api once and still carries the identity tag and every suite slug.
  2. Sync that case and plan the sync again. Expected: The second plan is empty instead of asking for another update.
  • order-desk:tooling.qase-sync.tags
  • unit
  • tooling
  • qase-sync
#210
Qase enums 1
#134 sends the field codes TestOps actually stores instead of the order of its dropdown unit high

The TestOps API accepts integer field codes but never lists them, and the codes do not follow the order of the dropdown: Functional is stored as 8 while a select renders it second, so a table derived from the dropdown order files every functional case under Other without failing anything. The sync writes the whole case, so this table is the only place a catalogue name becomes something TestOps filters on; pinning it here turns a silent mis-filing into a failing build. _Automated by src/test-support/qase/enums.spec.ts._

  1. Read the codes qase/enums.ts assigns to the Qase types. Expected: They equal the codes a live case card reports, in particular functional 8 and integration 10 rather than their positions in the dropdown.
  2. Check every field table used by the sync - type, severity, priority, layer and behavior. Expected: Each table uses the codes 1 to its option count exactly once, with no gap and no repeat.
  • order-desk:tooling.qase-enums.field-ids
  • unit
  • tooling
  • qase-enums
#134
Archive 3
Tooling 0
Orders 2
#81 records the uploader, size and object key unit medium

The attachment row is the only place that ties an object back to the order and to the person who sent it, which is what the order page and the audit trail render. It also carries the declared content type, and a file with no type must be stored as a null type instead of the string "undefined", which would be served back as a broken Content-Type header. _Automated by src/orders/order-files.service.spec.ts._

  1. Call upload with a file of 1 024 bytes and an empty mimetype. Expected: The stored attachment row carries the order id, the actor as uploadedById, the generated object key, sizeBytes: 1024 and contentType: null.
  • order-desk:orders.files.stores-declared-metadata
  • unit
  • orders
  • files
#81
#83 falls back to the stored content type of the object unit medium

Older rows can carry a null content type, and the browser needs one to render or download the file correctly. The service therefore prefers the stored object type and only then falls back to application/octet-stream, so a photo keeps being served as an image after a schema change. _Automated by src/orders/order-files.service.spec.ts._

  1. Call download for a row without contentType whose object reports image/png. Expected: The result carries contentType: "image/png" and the stored file name.
  2. Call download for a row and an object that both lack a content type. Expected: The result carries contentType: "application/octet-stream".
  • order-desk:orders.files.download-falls-back-to-stored-type
  • unit
  • orders
  • files
#83
Deployment 1
#136 sends the resolved address as both the real-IP and the forwarded header unit high

The API is configured with TRUST_PROXY=true, so Express takes the client address from the forwarded headers, and Better Auth stores the same value on the session. Both headers must carry the address nginx resolved, because a missing one silently falls back to the container network address: a session created through the tunnel used to store 172.27.0.1 - the Docker bridge gateway - for every client in the world. _Automated by src/common/reverse-proxy.spec.ts._

  1. Read the location /api/ block and look at X-Real-IP and X-Forwarded-For. Expected: Both are set to $remote_addr, which is the address after real-IP processing.
  • order-desk:deployment.client-address.forwards-resolved-address
  • unit
  • deployment
  • client-address
#136
Categories 7
Catalogue 5
#84 keeps retired categories out of the default list unit high

Retiring a category must stop it from being offered on a new order without deleting the orders that already reference it, so the flag filters the picker instead of removing the row. The list is ordered by name because the web form renders it as a plain dropdown. _Automated by src/categories/categories.service.spec.ts._

  1. Seed one active Plumbing category and one retired one, then call list(false). Expected: Only the active category is returned.
  • order-desk:categories.list.hides-inactive
  • unit
  • categories
  • catalogue
#84
#85 shows retired categories when asked for the full catalogue unit medium

The administrator screen has to see and reactivate retired categories, which is the only reason the service takes the flag at all. Asking for the full catalogue must drop the filter rather than pass isActive: false, which would show only the retired ones. _Automated by src/categories/categories.service.spec.ts._

  1. Seed Zebra as active and Plumbing as retired, then call list(true). Expected: Both are returned in name order - Plumbing first - with their active flags.
  • order-desk:categories.list.includes-inactive
  • unit
  • categories
  • catalogue
#85
#86 stores a new category with its name trimmed unit medium

Category names are typed by hand and pasted from spreadsheets, so stray leading and trailing spaces are common. Trimming at the service keeps the unique name meaningful and stops "Repair" and "Repair " from becoming two entries, and it records who created the row for the audit trail. _Automated by src/categories/categories.service.spec.ts._

  1. Call create(" Repair ", "user-1"). Expected: The returned and stored category is named Repair, records createdById: "user-1" and starts active.
  • order-desk:categories.create.trims-name
  • unit
  • categories
  • catalogue
#86
#87 renames a category with its name trimmed unit medium

A rename goes through the same hand-typed input as a create, so it needs the same normalisation; otherwise the whitespace comes back on the first edit after a clean insert. _Automated by src/categories/categories.service.spec.ts._

  1. Call rename("category-1", " Painting "). Expected: The stored row category-1 is named Painting and keeps its active flag.
  • order-desk:categories.rename.trims-name
  • unit
  • categories
  • catalogue
#87
#88 retires and restores a category without touching its name unit medium

Retiring and restoring are the same write with a different value, and the update must not carry the name: a stale copy from the admin screen would silently undo a rename made in another tab. _Automated by src/categories/categories.service.spec.ts._

  1. Call setActive("category-1", false) and then setActive("category-1", true). Expected: After each call the stored row is inactive and then active again, and its name stays Plumbing.
  • order-desk:categories.set-active.toggles-flag
  • unit
  • categories
  • catalogue
#88
Request validation 2
#90 rejects a category name that is blank or over the length limit unit high

A category name is the only label a customer sees in the order form, so a blank one produces an unnamed option that cannot be picked deliberately. The 100-character limit keeps the dropdown row readable, and @Matches(/\S/) is what turns a whitespace-only name into a refused request instead of a stored blank. _Automated by src/categories/category.dto.spec.ts._

  1. Validate names of 100 and 101 characters, then " " and "", against CreateCategoryDto. Expected: Only the 100-character name is accepted; the longer, blank and empty names each report an error for name.
  • order-desk:categories.validation.create
  • unit
  • categories
  • request-validation
#90
#91 applies the same rules when a category is renamed unit medium

Rename talks to UpdateCategoryDto, a separate class from create, so the limits have to be restated there. Without this case a rename could accept a 101-character name that creating the same category refuses. _Automated by src/categories/category.dto.spec.ts._

  1. Validate a 101-character name against UpdateCategoryDto. Expected: The result reports an error for name.
  • order-desk:categories.validation.rename
  • unit
  • categories
  • request-validation
#91
Storage 9
Objects 9
#99 namespaces a new object under the order that owns it unit high

Attachment keys are derived from the order so that a bucket listing stays readable and a stored file can be traced back to its order without consulting the database. The random tail keeps two uploads with the same name in one order apart, because the original filename never reaches the key. _Automated by src/storage/object-storage.service.spec.ts._

  1. Call createObjectKey("order-1") twice and createObjectKey("order-2") once. Expected: Both order-1 keys match orders/order-1/<uuid> and differ from each other; the order-2 key starts with orders/order-2/.
  • order-desk:storage.objects.namespace
  • unit
  • storage
  • objects
#99
#100 stores an upload with its length and content type unit high critical

The browser-supplied MIME type is stored with the object, because the download endpoint returns the content type from the bucket instead of guessing it from the extension. ContentLength is passed explicitly so SeaweedFS never has to buffer the stream to learn its size. _Automated by src/storage/object-storage.service.spec.ts._

  1. Call put with a buffer, its size and image/png. Expected: The bucket holds one object under that key whose bytes are the uploaded buffer and whose content type is image/png.
  • order-desk:storage.objects.put
  • unit
  • storage
  • objects
#100
#101 falls back to a binary content type for untyped uploads unit medium

Clients may upload without a MIME type, and an empty ContentType makes the download endpoint answer with a header the browser cannot interpret, which turns a preview into a download. The service therefore never sends an empty type to the bucket. _Automated by src/storage/object-storage.service.spec.ts._

  1. Call put with mimetype: "". Expected: The object is stored with application/octet-stream as its content type.
  • order-desk:storage.objects.put.default-type
  • unit
  • storage
  • objects
#101
#102 returns the stored bytes together with their content type unit high critical

The download endpoint streams exactly what is stored and forwards the stored content type, so a receipt opens as an image or a PDF instead of a generic file. The service reads the object into a buffer, which is acceptable because uploads are capped at 1 MB. _Automated by src/storage/object-storage.service.spec.ts._

  1. Call get for a stored key while the bucket holds three bytes with image/png. Expected: The result holds a buffer with those bytes and contentType: image/png, so a download reproduces what was uploaded.
  • order-desk:storage.objects.get
  • unit
  • storage
  • objects
#102
#103 fails loudly when the bucket answers without a body unit medium

A missing body means the row and the bucket disagree, for example after a manual purge. Returning an empty buffer would hand the customer a zero-byte file, so the service raises an error that names the key and leaves a trace for the operator. _Automated by src/storage/object-storage.service.spec.ts._

  1. Call get while the bucket answers without a body. Expected: The promise rejects with a message that contains the requested key.
  • order-desk:storage.objects.get.empty
  • unit
  • storage
  • objects
#103
#104 deletes one object by key unit high

Removing an attachment has to remove the object as well, otherwise the bucket grows with files that no row points at. The key comes from the attachment row, so exactly that object disappears while its neighbours stay. _Automated by src/storage/object-storage.service.spec.ts._

  1. Call delete for one of two stored keys. Expected: The bucket no longer holds that object and still holds the other one.
  • order-desk:storage.objects.delete
  • unit
  • storage
  • objects
#104
#105 purges the bucket page by page and counts every deletion unit high critical

A reset has to empty the bucket, including files whose rows were already gone, and the S3 listing returns at most 1000 keys per page. Stopping after the first page would leave objects that no later reset can attribute, and a wrong count would hide that from the operator. _Automated by src/storage/object-storage.service.spec.ts._

  1. Call deleteAll while the bucket holds three objects and returns at most two keys per page. Expected: The purge continues past the first page, the report counts all three deletions and the bucket is empty afterwards.
  • order-desk:storage.objects.purge.pages
  • unit
  • storage
  • objects
#105
#106 counts failed deletions instead of aborting the purge unit medium

The database is already empty when the bucket purge runs, so throwing here would stop the reset half-way and lose the report. Per-object errors are counted and returned instead, which lets the caller tell the operator that some files survived. _Automated by src/storage/object-storage.service.spec.ts._

  1. Call deleteAll while the bucket deletes one key and refuses two others. Expected: The promise resolves with { deleted: 1, failed: 2 } and the two refused objects are still in the bucket, so the operator can remove them by hand.
  • order-desk:storage.objects.purge.failures
  • unit
  • storage
  • objects
#106
#132 reads the bucket settings on the first call instead of at construction unit high

Constructing the service used to read S3_* and build the S3 client, so every module that only imported it needed SeaweedFS settings, and the offline unit suite had to invent placeholders for them. Reading the settings on the first call keeps construction free - while a deployment without S3_BUCKET must still fail loudly instead of storing nothing. _Automated by src/storage/object-storage.service.spec.ts._

  1. Create the service without any S3_* setting and call put. Expected: The call rejects with S3_BUCKET is required.
  2. Restore S3_BUCKET and call put again on the same instance. Expected: The object is stored, because the settings are read when they are first needed.
  • order-desk:storage.objects.config-lazy
  • unit
  • storage
  • objects
#132
Auth 18
Configuration 2
#131 loads the auth and database modules without their settings unit medium

The Better Auth instance and the Prisma client used to be built while their modules were imported, so importing anything that reached them required BETTER_AUTH_URL, BETTER_AUTH_SECRET and DATABASE_URL. That made the offline unit suite carry invented placeholders for settings it never uses. Building both on first use removes that requirement without weakening it: a deployment that forgets the settings still fails on the first sign-in attempt instead of accepting requests. _Automated by src/auth/auth.spec.ts._

  1. Import auth.ts and prisma.service.ts with a fresh module registry. Expected: Both imports resolve and neither throws.
  2. Resolve a session through auth.api.getSession. Expected: The call fails with BETTER_AUTH_URL is required, so the missing setting is reported where it is used.
  • order-desk:auth.config.lazy
  • unit
  • auth
  • configuration
#131
#133 answers the handler probe the node adapter mounts it with unit high blocker

toNodeHandler decides how to mount the authentication routes by asking "handler" in auth: the property is used when the probe answers true, and the argument itself is treated as the handler otherwise. A lazily built instance behind a proxy answers false unless the proxy forwards the probe, and every /api/auth/* request then fails with handler is not a function - which is what the integration suite reported the first time the instance became lazy. The case keeps the mount path honest, because no unit case would otherwise notice a sign-in route that cannot be mounted. _Automated by src/auth/auth.spec.ts._

  1. Import auth.ts and ask it whether it carries a handler. Expected: The probe answers true, so the node adapter mounts the property instead of the object.
  2. Read auth.handler. Expected: The property is a function, ready to receive a request.
  • order-desk:auth.config.mounts-handler
  • unit
  • auth
  • configuration
#133
Rate limiting 5
#138 keeps the limiter on with the defaults the application documents unit high blocker

Better Auth enables its own limiter only when NODE_ENV is "production", and the API image ran without NODE_ENV: /api/auth/sign-in/email accepted unlimited password guesses and /api/auth/sign-up/email unlimited registrations, each paying for a password hash and database rows. The settings are now resolved from the environment with the limiter explicitly on, so the control no longer depends on how the container happens to be started. The case pins the documented defaults: 60 requests per minute per client for /api/auth/*, and 5 per minute for the credential endpoints, because guessing a password is the cheapest thing an anonymous caller can do. _Automated by src/auth/rate-limit.spec.ts._

  1. Resolve the settings with an empty environment. Expected: The limiter is enabled with a 60-second window and 60 requests, and /sign-in/* and /sign-up/* carry their own 60-second, 5-request rule.
  • order-desk:auth.rate-limit.defaults
  • unit
  • auth
  • rate-limiting
#138
#139 reads the switch, the window and the limit from the environment unit high

An operator has to be able to raise a limit for a busy office IP or switch the limiter off while debugging, without editing code and rebuilding the image. Every knob therefore comes from the environment, and the credential rule shares one window and one limit so the two sign-in and sign-up paths cannot drift apart. _Automated by src/auth/rate-limit.spec.ts._

  1. Resolve the settings with AUTH_RATE_LIMIT_ENABLED=false, AUTH_RATE_LIMIT_WINDOW=30, AUTH_RATE_LIMIT_MAX=120, AUTH_SIGN_IN_RATE_LIMIT_WINDOW=10 and AUTH_SIGN_IN_RATE_LIMIT_MAX=3. Expected: The switch, the window, the limit and both credential rules carry those values, and setting the switch to false keeps the rules in place for the next run.
  • order-desk:auth.rate-limit.environment
  • unit
  • auth
  • rate-limiting
#139
#140 refuses a value it cannot read instead of silently ignoring the setting unit high

A rate limit that a typo turns into 0, a negative window or a word would either block every sign-in or disable the limit without a trace, and a deployment with a broken limiter looks exactly like a healthy one. The resolver therefore fails with the variable name in the message, so the container stops at startup where the operator can see it. _Automated by src/auth/rate-limit.spec.ts._

  1. Resolve the settings with AUTH_RATE_LIMIT_MAX=0. Expected: The resolver throws and names AUTH_RATE_LIMIT_MAX.
  2. Resolve the settings with AUTH_RATE_LIMIT_WINDOW=-5, AUTH_SIGN_IN_RATE_LIMIT_MAX=soon and AUTH_RATE_LIMIT_ENABLED=maybe. Expected: Each call throws and names the variable that carries the unreadable value.
  • order-desk:auth.rate-limit.invalid
  • unit
  • auth
  • rate-limiting
#140
#141 hands the credential rule to the Better Auth instance unit high blocker

Resolving the settings is worthless if the instance drops them: the option has to reach betterAuth(). The case builds the real instance from the environment and reads the rule back, which is what the sign-in path consults before it verifies a password. _Automated by src/auth/auth.spec.ts._

  1. Import the auth module with a fresh registry and read auth.options.rateLimit. Expected: The limiter is enabled and the /sign-in/* rule carries the configured window and a limit of 7.
  • order-desk:auth.rate-limit.wired-into-instance
  • unit
  • auth
  • rate-limiting
#141
#142 answers the fourth password change within ten seconds with a 429 api high critical

Settings and a running limiter are two different things, and only the real API shows the second: a case that stops at the resolved options would stay green even if the handler never consulted them. The case drives the password endpoint, whose built-in rule of 3 attempts per 10 seconds is stricter than the configured limits, so it stays valid while the suite raises the sign-in limits for its own sign-ups. Three failed attempts prove the request reached the handler; the fourth must be refused by the limiter, not by a missing session. _Automated by test/integration/auth-rate-limit.spec.ts._

  1. Send POST /api/auth/change-password with a wrong currentPassword from a signed-in customer. Expected: The API answers 400, so the request reached the handler and was not refused earlier.
  2. Send the same request twice more within ten seconds. Expected: Both attempts answer 400 as well: three attempts of the ten-second window are spent.
  3. Send the fourth request within the same window. Expected: The API answers 429 with Too many requests in the body, while the same session still reaches other endpoints: the limiter is scoped to the path, not to the account.
  • order-desk:auth.rate-limit.enforced
  • api
  • auth
  • rate-limiting
#142
Registration 2
#195 registers a visitor as an active customer without an administrator api high critical

Open registration is a product decision: a visitor signs up, becomes a customer and starts placing orders without waiting for an administrator to create the account. The case pins the two halves that make it usable - the returned session works immediately, which a deactivated account could not, and the account appears as active in the administrator's customer list. _Automated by test/integration/auth-registration.spec.ts._

  1. Send POST /api/auth/sign-up/email with a name, a fresh email and a password. Expected: 200 and a session cookie.
  2. Read /api/users/me with that cookie. Expected: 200 with the new email and role: CUSTOMER.
  3. List customers with includeInactive=true as the administrator. Expected: The new account is present with isActive: true.
  • order-desk:integration.auth.self-registration
  • api
  • auth
  • registration
#195
#196 keeps a self-registered visitor a customer when the body asks for an administrator api high blocker

The sign-up route belongs to Better Auth, so nothing in the Nest layer sees the body before the account is written. The only protection is input: false on role and isActive in auth.ts, which replaces whatever the caller sends with the defaults. The case sends exactly what an escalation attempt sends and then proves the account cannot reach the administrator API, because a case on the configuration alone would stay green with the route still open. _Automated by test/integration/auth-registration.spec.ts._

  1. Send POST /api/auth/sign-up/email with role: "ADMIN", isActive: false, a name, a fresh email and a password. Expected: 200 and a session cookie; the privileged fields are replaced by the defaults.
  2. Read /api/users/me with that cookie. Expected: 200 with role: CUSTOMER, which also proves the account is active because a deactivated account is refused.
  3. Create a category as the new account and list customers as the administrator. Expected: 403 with code: FORBIDDEN for the category, and the account is listed as isActive: true.
  • order-desk:integration.auth.registration-ignores-privileged-input
  • api
  • auth
  • registration
#196
Administrator provisioning 7
#285 creates the administrator with a credential account when none exists unit high blocker

A fresh database has no account to sign in with, so the first deployment has to create one from the environment. The case pins the shape of that row: the ADMIN role, a verified and active account, and a credential account whose hash really answers to ADMIN_PASSWORD. Without the credential row Better Auth finds the user but has nothing to compare the password against, and sign-in fails while the database looks populated. _Automated by src/auth/admin-account.spec.ts._

  1. Run the provisioning with ADMIN_EMAIL=admin@example.test on an empty database. Expected: One user is created with the ADMIN role, emailVerified and isActive set.
  2. Read the account rows of the new user. Expected: A single credential account holds a hash that verifyPassword accepts for the environment password.
  • order-desk:auth.admin-account.creates-missing-administrator
  • unit
  • auth
  • administrator-provisioning
#285
#286 moves a new ADMIN_EMAIL onto the existing administrator and keeps its id unit high blocker

Rotating ADMIN_EMAIL is the reason the provisioning runs on every deployment, and the cheap way to implement it - delete the old administrator and insert a new one - would fail: categories, status history, invoices and payment reports reference the user with RESTRICT, and the administrator's own history would be lost. The case therefore pins the rename: the row keeps its id, only the email changes, the password follows the environment and the sessions of that user are revoked while every other session survives. _Automated by src/auth/admin-account.spec.ts._

  1. Run the provisioning with ADMIN_EMAIL=moved@example.test and a new password. Expected: The outcome reports an update and names old@example.test as the previous email.
  2. Compare the user rows before and after. Expected: The same user id now holds the new email, and no second administrator appeared.
  3. Read the sessions of that user and of the customer. Expected: The administrator's sessions are gone because its credentials changed, the customer's session is untouched.
  4. Verify the stored hash against the new password. Expected: verifyPassword accepts the new password.
  • order-desk:auth.admin-account.renames-the-single-administrator
  • unit
  • auth
  • administrator-provisioning
#286
#287 writes nothing when the stored password already matches ADMIN_PASSWORD unit high

The provisioning runs on every deployment, including deployments that only ship frontend code. Re-hashing the same password would be invisible in the database but would revoke the sessions of an administrator who did nothing wrong, so an unchanged password must leave both the hash and the sessions as they were. The case compares the stored hash by value instead of only checking that the password still verifies, which would also pass after a rewrite. _Automated by src/auth/admin-account.spec.ts._

  1. Run the provisioning with the same credentials. Expected: The outcome reports that nothing changed.
  2. Read the credential account and the sessions. Expected: The hash string is byte-identical and the sessions still exist.
  • order-desk:auth.admin-account.leaves-a-matching-administrator-alone
  • unit
  • auth
  • administrator-provisioning
#287
#288 rewrites the password of a disabled administrator and revokes its sessions unit high blocker

Changing ADMIN_PASSWORD in the secrets is the recovery path for a lost or leaked administrator password, so the stored hash has to follow the environment. The same case covers the other half of that recovery: an administrator may have been left inactive or unverified by an earlier mistake, and the API answers 401 to every request of such an account, which the sign-in form shows as a wrong password. Sessions are revoked because a password change has to invalidate any token an attacker may hold. _Automated by src/auth/admin-account.spec.ts._

  1. Run the provisioning with a new ADMIN_PASSWORD. Expected: The outcome reports an update with a password change and no email change.
  2. Verify the stored hash against the new password and read the user row. Expected: The new password verifies, and the user is active and verified again.
  3. Read the sessions. Expected: The administrator's sessions are revoked, the customer's session survives.
  • order-desk:auth.admin-account.replaces-a-stale-password
  • unit
  • auth
  • administrator-provisioning
#288
#289 adds the credential account a password-less administrator is missing unit medium

Better Auth keeps the password in the account row, not on the user, so a user with the ADMIN role and no credential account cannot sign in at all and the deployment looks successful while the demo stays locked. The provisioning therefore has to notice the missing row and add it, and it must revoke the sessions of that user because a credential was just introduced. _Automated by src/auth/admin-account.spec.ts._

  1. Run the provisioning. Expected: The outcome reports an update with a password change.
  2. Read the account rows and the sessions of the administrator. Expected: A credential account now holds a hash that answers to ADMIN_PASSWORD, and the sessions are gone.
  • order-desk:auth.admin-account.attaches-a-credential-account
  • unit
  • auth
  • administrator-provisioning
#289
#290 stops instead of promoting an account that already owns ADMIN_EMAIL unit high critical

Registration is open, so a visitor can take any email that is still free - including the one an operator is about to put into ADMIN_EMAIL. Promoting that row would hand an existing account the ADMIN role and the environment password, and reusing the row would leave the person's own history under an administrator. The case pins the refusal: the provisioning stops with a message naming the account, and nothing about it changes. _Automated by src/auth/admin-account.spec.ts._

  1. Run the provisioning with that email. Expected: It throws The account <email> already exists and is not an administrator.
  2. Read the user and account rows. Expected: The account keeps its CUSTOMER role, no second user appears and no credential account was written.
  • order-desk:auth.admin-account.refuses-a-taken-email
  • unit
  • auth
  • administrator-provisioning
#290
#291 names the competing administrators instead of renaming one of them unit medium

The demo is built around a single administrator, but the devtools and the seed fixtures can leave several. Renaming the first one the database happens to return would silently choose an account and hide the inconsistency, so the provisioning refuses and lists the candidates for the operator to resolve. _Automated by src/auth/admin-account.spec.ts._

  1. Run the provisioning with a third email. Expected: It throws a message that lists both existing administrator emails.
  2. Read the user rows. Expected: Both administrators keep their emails; nothing was renamed or created.
  • order-desk:auth.admin-account.refuses-ambiguous-administrators
  • unit
  • auth
  • administrator-provisioning
#291
Administrator credentials 2
#292 lower-cases and trims ADMIN_EMAIL before it reaches the database unit medium

The sign-in form trims the address a person types but does not change its case, while the provisioning and the reset store and compare ADMIN_EMAIL in lower case. A secret written with a capital letter or a trailing space from a copy-paste would therefore create an administrator nobody can sign in as, so the environment value is normalised before any query uses it. _Automated by src/auth/admin-account.spec.ts._

  1. Read the credentials from that environment. Expected: The address comes back trimmed and lower-cased.
  • order-desk:auth.admin-credentials.normalises-the-email
  • unit
  • auth
  • administrator-credentials
#292
#293 rejects ADMIN_PASSWORD below the length Better Auth accepts unit medium

Better Auth refuses passwords shorter than eight characters when it creates a credential. Without an explicit check the provisioning would write the account and the failure would only appear at sign-in, where it reads as a wrong password rather than as a secret that is too short. The case pins the early, explicit refusal. _Automated by src/auth/admin-account.spec.ts._

  1. Read the credentials from that environment. Expected: It throws ADMIN_PASSWORD must be at least 8 characters before any database write.
  • order-desk:auth.admin-credentials.refuses-a-short-password
  • unit
  • auth
  • administrator-credentials
#293
Deployment 5
Client address 2
#135 replaces the forwarded address instead of appending to it unit high critical

X-Forwarded-For is a request header like any other, so a caller can set it. Appending the peer with $proxy_add_x_forwarded_for hands the API a client-supplied value followed by the real one, and Better Auth resolves a multi-value header to no address at all: the session row then keeps ipAddress = null, every caller lands in one rate-limit bucket and the audit trail loses the client. Overwriting with $remote_addr keeps exactly one address, which is the peer nginx resolved, so the header can no longer carry anything the caller chose. _Automated by src/common/reverse-proxy.spec.ts._

  1. Read the location /api/ block and look at its X-Forwarded-For header. Expected: The value is $remote_addr, not $proxy_add_x_forwarded_for.
  2. Search the whole file for $proxy_add_x_forwarded_for. Expected: No occurrence remains, so no other location can append a client-supplied value.
  3. Look at X-Real-IP and X-Forwarded-For in the same block. Expected: Both are set to $remote_addr, which is the address after real-IP processing, so the API never falls back to the container network address of the tunnel.
  • order-desk:deployment.client-address.overwrites-forwarded-for
  • unit
  • deployment
  • client-address
#135
#137 takes CF-Connecting-IP only from the tunnel and the container network unit high critical

Cloudflare terminates TLS and writes the client address into CF-Connecting-IP, but nginx ignores that header unless the real-IP module accepts the peer. Trusting every peer would let any caller spoof the address; trusting only 127.0.0.1 does not work either, because Docker publishes the web port on the loopback interface and re-originates the connection from the bridge gateway - the container sees 172.27.0.1, not 127.0.0.1. The case pins the peer list to the loopback addresses and the private ranges the container network lives in, and it pins real_ip_recursive off so a single header value is taken as is. _Automated by src/common/reverse-proxy.spec.ts._

  1. Read the real_ip_header directive. Expected: It names CF-Connecting-IP, the header Cloudflare sets at the edge.
  2. Read the set_real_ip_from list. Expected: It covers 127.0.0.1, ::1 and 172.16.0.0/12, so both the loopback and the Docker bridge gateway are trusted.
  3. Read the real_ip_recursive directive. Expected: It is off, so the header is not walked as a chain.
  • order-desk:deployment.client-address.trusts-cloudflare
  • unit
  • deployment
  • client-address
#137
Response headers 1
#160 refuses to let the browser re-interpret a declared type unit high

The SPA, the API and every download share one origin, and a download is an attachment only because the response says so. With X-Content-Type-Options: nosniff the browser stops second-guessing a declared type, so a file whose bytes look like a page cannot be rendered from the application origin even in a future inline preview. The guard reads the shipped file because the integration stack never runs nginx, and it expects three occurrences: nginx discards the inherited add_header directives in a location that declares its own, so the two locations that set Cache-Control repeat the header. _Automated by src/common/reverse-proxy.spec.ts._

  1. Count the add_header X-Content-Type-Options "nosniff" always; lines in apps/web/nginx.conf. Expected: There are exactly three: the server block and the two cached locations.
  • order-desk:deployment.headers.nosniff
  • deployment
  • response-headers
  • unit
#160
Container hardening 2
#162 runs the API as the unprivileged user without a writable home unit high

The API container held the database password, the S3 keys and the Better Auth secret while running as root, so a dependency that turns into code execution inherited every file of the image and the ability to modify it. The last USER directive therefore has to be node, and the entrypoint has to work without a writable $HOME: corepack resolves pnpm through a cache under it, which a read-only root filesystem does not provide - the container failed to start with exactly that error before the migration called the local binary. exec keeps the server as PID 1 so a stop signal reaches it instead of the wrapping shell. _Automated by src/common/container-hardening.spec.ts._

  1. Collect every USER directive of apps/api/Dockerfile and take the last one. Expected: It is node, so no later directive brings root back.
  2. Read the CMD line. Expected: It runs prisma migrate deploy and then exec node dist/main.js, and it never calls pnpm.
  • order-desk:deployment.container.non-root
  • unit
  • deployment
  • container-hardening
#162
#163 keeps the root filesystem read-only inside a bounded container unit high

The API writes nothing at run time - uploads stay in memory, the invoice PDF is rendered in memory and Prisma only reads its schema - so the container can run with a read-only root filesystem and a memory-backed /tmp. Dropped capabilities and no-new-privileges remove the privileged and setuid paths an exploited dependency would look for, while the memory, CPU and process limits keep one leaking process from taking the tunnel and the CI runner that share the VM down with it. The limits are read from API_MEM_LIMIT, API_CPUS and API_PIDS_LIMIT with a default, so a smaller VM is tuned in .env instead of the compose file. _Automated by src/common/container-hardening.spec.ts._

  1. Read the api service of docker-compose.yml. Expected: It sets read_only: true and mounts /tmp as rw,noexec,nosuid with a size, drops all capabilities and enables no-new-privileges.
  2. Read the resource limits of that service. Expected: mem_limit, cpus and pids_limit are set and fall back to a default through the API_* variables.
  • order-desk:deployment.container.read-only-filesystem-and-limits
  • unit
  • deployment
  • container-hardening
#163
Files 2
Content type 2
#152 recognises the accepted formats by their signature unit high

The API used to store the Content-Type of the multipart part and hand it back on download, which let a caller choose what the product says a file is. The type now comes from the bytes, so this case pins the allowlist - the photos, drawings and PDF documents the Swagger text offers - and the exact wording the refusal uses. _Automated by src/common/file-signature.spec.ts._

  1. Detect the type of a PNG, a JPEG, a GIF, a WebP and a PDF. Expected: Each call answers with its own media type.
  2. Read the documented allowlist. Expected: It reads PNG, JPEG, GIF, WebP and PDF.
  • order-desk:files.signature.detected-types
  • unit
  • files
  • content-type
#152
#153 refuses a file whose bytes are not an accepted format unit high critical

A file is refused by its content, never by its name: the dangerous payloads are the ones a caller would dress up as a photo, so the case covers a script, a Windows executable, an archive, an empty file, a signature cut in the middle and a RIFF container that is a WAV rather than a WebP. Returning no type is what makes the upload answer 415 instead of storing the file. _Automated by src/common/file-signature.spec.ts._

  1. Detect the type of an HTML document, an MZ executable, a ZIP archive and an empty buffer. Expected: Every call answers undefined.
  2. Detect the type of a PNG signature truncated to four bytes and of a RIFF/WAVE file. Expected: Both answer undefined.
  • order-desk:files.signature.rejects-unknown
  • unit
  • files
  • content-type
#153
Invoices (integration) 9
Issuing 2
#173 numbers issued invoices sequentially and snapshots the accepted work api high critical

The invoice number is the only identifier a customer quotes when paying, so it must be unique, sequential within the year and derived from a counter that survives concurrent issues. The case also pins the snapshot: names, hours, rate and amount come from the accepted estimate and must not follow a later profile change. _Automated by test/integration/invoices-lifecycle.spec.ts._

  1. Issue an invoice for the first order as the administrator. Expected: 201 with a number matching INV-<current year>-NNNNNN, status ISSUED, the customer and executor names, 2.5 hours, rate 60 and amount 150.
  2. Issue an invoice for the second order. Expected: The sequence segment is exactly one greater than the previous invoice.
  3. Read the first order as its customer. Expected: The order is INVOICE_ISSUED, carries exactly one invoice, and its last history entry names that invoice number.
  • order-desk:integration.invoices.numbering
  • api
  • invoices-integration
  • issuing
#173
#174 refuses a second active invoice for the same order api high critical

Two payable documents for one job would double the amount the customer is asked to transfer. The order may carry any number of voided invoices, but only one that still awaits payment, and a second issue is refused instead of overwriting the first. _Automated by test/integration/invoices-lifecycle.spec.ts._

  1. Issue an invoice for the order again as the administrator. Expected: 409 with code: CONFLICT and the message about an already active invoice.
  2. Read the order as its customer. Expected: It still carries exactly one invoice, the original one, and that invoice is ISSUED.
  3. Inspect the invoice array of the order response. Expected: The list has one entry whose id and number match the first issue, with no second document.
  • order-desk:integration.invoices.one-active
  • api
  • invoices-integration
  • issuing
#174
Voiding 2
#175 voids an unpaid invoice with a reason and reissues it under a new number api high critical

A wrong amount has to be correctable without deleting an invoice: voiding preserves the number, the reason and the administrator, keeps the order in INVOICE_ISSUED, and the replacement invoice takes the next number of the same year instead of reusing the voided one. _Automated by test/integration/invoices-lifecycle.spec.ts._

  1. Void the invoice as the administrator with the reason "Amount was miscalculated". Expected: 201 with status VOID, that reason, voidedById of the administrator and a void date.
  2. Issue a replacement invoice for the same order. Expected: 201 with a different invoice id and a greater sequence segment than the voided invoice.
  3. Read the order as its customer. Expected: The order is still INVOICE_ISSUED and lists two invoices in creation order: the voided one with its original number, then the new one ISSUED.
  • order-desk:integration.invoices.void-and-reissue
  • api
  • invoices-integration
  • voiding
#175
#176 refuses to void an invoice after the customer has paid it api high critical

A paid invoice is the record of money that arrived. Allowing a void after confirmation would erase the only document proving the payment and reopen a closed order, so the administrator is refused and the invoice keeps its payment date. _Automated by test/integration/invoices-lifecycle.spec.ts._

  1. Void the paid invoice with a reason as the administrator. Expected: 409 with code: CONFLICT.
  2. Read the invoice in the order as the customer. Expected: It is still PAID with its paidAt date and without a void date or reason.
  3. Read the order status. Expected: The order is still INVOICE_PAID, so the payment cannot be undone by voiding.
  • order-desk:integration.invoices.void-after-payment
  • api
  • invoices-integration
  • voiding
#176
Payment review 3
#177 reviews a receipt, accepts a new upload after a rejection and marks the invoice paid api high critical

The receipt loop is the only payment path in the product: the customer claims a transfer, the administrator either refuses it with a reason or confirms it. A rejection has to leave room for another upload while keeping the refused one in the history, and a confirmation must pay the invoice without completing the order. _Automated by test/integration/invoices-lifecycle.spec.ts._

  1. Upload a PDF receipt named first-receipt.pdf as the customer. Expected: 201 with status PENDING; the invoice stays ISSUED and the order INVOICE_ISSUED.
  2. Reject that receipt as the administrator with the reason "The receipt does not show the transfer date". Expected: 201 with status REJECTED and that reason in reviewComment.
  3. Upload a second receipt and confirm it as the administrator. Expected: The upload is 201 again, the confirmation answers 201 with the invoice PAID and paidAt.
  4. Read the order as the customer. Expected: The order is INVOICE_PAID with no completedAt, and the invoice lists both reports, the confirmed one first and the rejected one second.
  • order-desk:integration.invoices.receipt-cycle
  • api
  • invoices-integration
  • payment-review
#177
#178 keeps the receipt away from the executor and serves it to the administrator as a download api high critical

A bank receipt carries the customer's account details, so the executor who did the work must not read it even though they see the invoice itself. The download is served as application/octet-stream with an attachment disposition, which is what stops the browser from rendering the document in the API origin. _Automated by test/integration/invoices-lifecycle.spec.ts._

  1. Download the receipt as the executor assigned to the order. Expected: 403 with code: FORBIDDEN.
  2. Download the receipt as a different customer. Expected: 403 with code: FORBIDDEN.
  3. Download the receipt as the administrator and as the owning customer. Expected: Both answer 200 with content-type: application/octet-stream, an attachment disposition and the uploaded bytes.
  • order-desk:integration.invoices.receipt-access
  • api
  • invoices-integration
  • payment-review
#178
#199 accepts a receipt while the order already holds its attachment quota api high critical

A customer who uploaded the documented number of photos must still be able to pay. Only the running API shows that the two upload paths really are separate: the case fills the order to ORDER_ATTACHMENT_LIMIT, watches the next attachment refused with 409, and then sends the receipt through the invoice route, which has to accept it and leave the attachment list unchanged. _Automated by test/integration/invoices-lifecycle.spec.ts._

  1. Issue an invoice for the accepted order as the administrator. Expected: 201 with status ISSUED for an order that already holds three attachments.
  2. Upload a receipt to /orders/{id}/invoices/{invoiceId}/payment-reports. Expected: 201 with a PENDING report named receipt.pdf.
  3. Read the order as its customer. Expected: The invoice is still ISSUED and the order lists exactly three attachments: the receipt belongs to the invoice, not to the attachment quota.
  • order-desk:integration.invoices.receipt-quota-exempt
  • api
  • invoices-integration
  • payment-review
#199
Completion 1
#179 completes a paid order once and refuses the second completion api high critical

Completion is a separate administrative action after the money arrived, and it stamps completedAt exactly once. A second call must not move the timestamp or write another history row, because the order's closure is what reports and statistics read. _Automated by test/integration/invoices-lifecycle.spec.ts._

  1. Complete the order as the administrator. Expected: 201 with status COMPLETED and a completedAt timestamp.
  2. Complete the same order again. Expected: 409 with code: CONFLICT.
  3. Read the order as the customer. Expected: The order is COMPLETED and its last history entry records INVOICE_PAID to COMPLETED.
  • order-desk:integration.invoices.complete-after-payment
  • api
  • invoices-integration
  • completion
#179
Documents 1
#180 serves the invoice PDF to the participants and hides it from another customer api medium

The PDF is generated from the stored snapshot, so it has to be reachable for the customer who pays and the executor who reads the amount, and unreachable for a customer who has no relation to the order. The case pins the transport: application/pdf, an attachment disposition and a real PDF header, because the document body is a compressed stream and cannot be read back field by field. _Automated by test/integration/invoices-lifecycle.spec.ts._

  1. Download the invoice PDF as the owning customer. Expected: 200 with content-type: application/pdf, an attachment disposition and a body starting with %PDF- that is larger than a stub.
  2. Download the same PDF as the assigned executor. Expected: 200 as well, because the executor sees the invoice amounts.
  3. Download the same PDF as another customer. Expected: 403, because the order is not visible to that account.
  • order-desk:integration.invoices.pdf-stream
  • api
  • invoices-integration
  • documents
#180
E2E 65
Orders 13
Creating 3
#200 Saves a new order as a draft and leaves it editable e2e high critical

The customer fills the create-order form and saves it as a draft instead of sending it, so the first step of the order lifecycle exists through the panel and the order stays editable after a reload. _Automated by tests/orders/customer-orders.spec.ts._

  1. Open the customer panel. Expected: The panel is empty: the empty state is visible instead of an order list.
  2. Click Create order, fill the title and the description, choose the category and click Save draft. Expected: A row for the new order appears with its title and the status label Draft.
  3. Reload the panel. Expected: The same row is still there with the status label Draft, and Edit is offered for it.
  • order-desk-e2e:orders.draft.create
  • e2e
  • orders
  • creating
#200
#201 Creates and submits an order in one form submission e2e high critical

A customer who is ready to publish presses the create-and-send button on the same form, and the order never sits in an editable draft state: it arrives in the pool immediately, so the one-action path produces the same state as save-then-submit. _Automated by tests/orders/customer-orders.spec.ts._

  1. Click Create order, fill the title and the description, choose the category and click Create and send. Expected: A row for the new order appears with the status label Awaiting distribution.
  2. Look at the row's actions. Expected: The submit action is not offered, because the order is past the draft status.
  3. Reload the panel. Expected: The row still shows Awaiting distribution.
  • order-desk-e2e:orders.draft.create-submit
  • e2e
  • orders
  • creating
#201
#202 Keeps the optional due date and location on a saved draft e2e medium

The customer saves a draft together with the optional due date and location, then reopens the order card and finds both values stored as entered, so the fields a draft exists for are persisted and not merely held in the form. _Automated by tests/orders/customer-orders.spec.ts._

  1. Click Create order, fill title, description and category, set a due date and a work location, then click Save draft. Expected: A row for the new order appears with the status label Draft.
  2. Open the order card. Expected: The card shows the same calendar day and the same location text the form was given; a due date has no time component, so it cannot shift.
  3. Close the card, reload the panel and open the card again. Expected: Both values are unchanged.
  • order-desk-e2e:orders.draft.create-optional
  • e2e
  • orders
  • creating
#202
Submitting 3
#203 Submits a draft without an executor and puts it in the pool e2e high critical

A saved draft is published to the pool by the customer, which leaves the editable draft behind and makes the order visible to executors — the state the executor slice of the suite starts from. _Automated by tests/orders/customer-orders.spec.ts._

  1. Open the customer panel. Expected: The row shows Draft and offers the submit action for that order.
  2. Click the submit action of the row. Expected: The same row shows Awaiting distribution and no longer offers the submit action.
  3. Reload the panel. Expected: The status is still Awaiting distribution.
  • order-desk-e2e:orders.draft.submit-pool
  • e2e
  • orders
  • submitting
#203
#204 Submits a draft with a chosen executor and assigns it e2e high critical

The same submit action lands in a different status when the draft carries an executor, so the order skips the pool and is owned from the start; the assertion is the destination status, not the absence of an error. _Automated by tests/orders/customer-orders.spec.ts._

  1. Open the customer panel. Expected: The row shows Draft and names the executor it carries.
  2. Click the submit action of the row. Expected: The row shows Assigned and not Awaiting distribution.
  3. Reload the panel. Expected: The row still shows Assigned.
  • order-desk-e2e:orders.draft.submit-executor
  • e2e
  • orders
  • submitting
#204
#206 Offers a submitted order to executors in the pool e2e high critical

A submission is only complete when the other side can act on it: the order that left the customer's draft state has to appear in the executor pool with its claim affordance, while a draft must never be offered there. The case follows one submission across the role boundary, so the status change on the customer panel is proved to have a consequence. _Automated by tests/orders/customer-orders.spec.ts._

  1. Ask the API for the orders the executor can see while the order is still a draft. Expected: The draft is not among them, because a draft has not left the customer's own list.
  2. Sign in as the customer, open the panel and click the submit action of the row. Expected: The row shows Awaiting distribution.
  3. Sign the same browser in as the executor and open the executor panel. Expected: The order is listed in the pool and offers its claim action, so the submitted order is visible and claimable for executors.
  • order-desk-e2e:orders.submit.pool-visibility
  • e2e
  • orders
  • submitting
#206
Guards 2
#205 Rejects submitting the same order twice e2e medium

A submitted order is no longer a draft, so a repeated submission must change nothing: no second status change and no second assignment offer, which is the guard that keeps the distribution pool consistent. _Automated by tests/orders/customer-orders.spec.ts._

  1. Open the customer panel. Expected: The row shows Awaiting distribution and the submit action is not offered, because the UI already reflects the guard.
  2. Send POST /api/orders/:id/submit again with the page's own session. Expected: The API answers 409 with a message naming the state conflict.
  3. Reload the panel. Expected: Exactly one row carries that title and its status is still Awaiting distribution.
  • order-desk-e2e:orders.draft.submit-again
  • e2e
  • orders
  • guards
#205
#241 Refuses a claim on an order another executor already took e2e medium

Two executors look at the same pooled order and one claims it first. The second sees no claim action and cannot take the order by calling the endpoint directly, so a claimed order never ends up with two owners and the first assignment stands. _Automated by tests/executor/executor-orders.spec.ts._

  1. Sign in as the second executor and open the executor panel. Expected: The order is not offered for claiming, because the pool no longer holds it.
  2. Send a claim for the order to the API with the second executor's session. Expected: The API answers 409 with a state conflict.
  3. Sign in as the first executor and open the panel. Expected: The order still offers the estimate form and no claim action, so the first owner kept the order.
  • order-desk-e2e:executor.pool.claim-locked
  • e2e
  • orders
  • guards
#241
Claiming 3
#239 Claims an order from the pool and becomes its executor e2e high critical

The first executor to claim a pooled order locks it to themselves: the claim action disappears, the estimate form appears, and the order names the executor. Distribution therefore ends with an owner who can price the work, not with an order that stays in the pool. _Automated by tests/executor/executor-orders.spec.ts._

  1. Sign in as the executor and open the executor panel. Expected: The order is listed in the pool and offers its claim and open actions.
  2. Click the claim action of the order. Expected: The claim action disappears and the estimate form is offered for the same order.
  3. Open the order card. Expected: The card reads as assigned and names this executor.
  4. Refresh the panel. Expected: The estimate form is still offered and no claim action is rendered, so the ownership survived a fresh read.
  • order-desk-e2e:executor.pool.claim
  • e2e
  • orders
  • claiming
#239
#240 Shows an order submitted with the executor chosen as assigned already e2e high

A customer who names an executor skips the pool, so the executor has to find the order already theirs: no claim action, the estimate form present, and the card naming them. It is the second producer of an assignment, and it has to look like the first from the executor's side. _Automated by tests/executor/executor-orders.spec.ts._

  1. Sign in as the executor and open the executor panel. Expected: The order is listed without a claim action.
  2. Look at the row's actions. Expected: The estimate form is offered, so the order needs a price before work can start.
  3. Open the order card. Expected: The card reads as assigned and names this executor.
  • order-desk-e2e:executor.order.preassigned
  • e2e
  • orders
  • claiming
#240
#242 Opens a pooled order and reads the full description e2e medium

An executor reads a pooled order in full before taking it: the card carries the whole brief and the status, and closing it returns to the pool with the claim action still offered. The case keeps the detail a read-only decision screen rather than a place that changes the order. _Automated by tests/executor/executor-orders.spec.ts._

  1. Sign in as the executor, open the panel and open the pooled order. Expected: The card shows the full description and reads as awaiting distribution.
  2. Close the card. Expected: The address is the panel route and the order still offers its claim action.
  • order-desk-e2e:executor.pool.detail
  • e2e
  • orders
  • claiming
#242
Estimating 2
#243 Proposes an estimate and leaves the order assigned e2e high critical

The assigned executor proposes hours from the panel and the order stays assigned: the amount is the executor's own rate multiplied by the hours, and the work only starts when the customer accepts. The case therefore asserts the stored estimate and the unchanged status together. _Automated by tests/executor/executor-orders.spec.ts._

  1. Sign in as the executor and open the executor panel. Expected: The order offers the hours field and its submit control.
  2. Enter three hours and submit the estimate. Expected: The form is replaced by the stored proposal.
  3. Open the order card. Expected: The card still reads as assigned, not as in progress.
  4. Read the order through the API as the executor. Expected: The order carries one pending estimate of three hours worth the rate times three.
  • order-desk-e2e:executor.estimate.propose
  • e2e
  • orders
  • estimating
#243
#244 Offers the proposed estimate to the customer for a decision e2e high critical

A proposal is only worth anything when the customer can act on it: the estimate the executor sent is offered on the customer's order card together with the accept and reject actions, while the order still reads as assigned. Accepting and rejecting are the estimates slice. _Automated by tests/executor/executor-orders.spec.ts._

  1. Sign in as the customer and open the customer panel. Expected: The order's row reads as assigned.
  2. Look at the row's answer block. Expected: The estimate is offered with an accept action and a reject action, so the pending proposal is the customer's to answer.
  3. Open the order card. Expected: The card still reads as assigned, because only the answer moves the order on.
  • order-desk-e2e:executor.estimate.handoff
  • e2e
  • orders
  • estimating
#244
Customer orders 12
Editing 1
#227 Edits a draft order and the change survives a reload e2e high critical

The customer reopens a draft, changes its title and description and saves; the list and the card show the new text after a reload and the order is still a draft, since NEW is the only status whose fields are editable. _Automated by tests/orders/customer-orders-edit.spec.ts._

  1. Sign in as the customer and open the panel. Expected: The draft row offers its draft actions, including the edit action.
  2. Click the edit action of the row. Expected: The edit form opens with the stored title and description prefilled.
  3. Change the title and the description and save the draft. Expected: The form closes and the row shows the new title.
  4. Reload the panel and open the order card. Expected: The card shows the new title and description, and the order is still in the draft status.
  • order-desk-e2e:orders.draft.edit
  • e2e
  • customer-orders
  • editing
#227
Guards 2
#228 Refuses to edit an order that already left the draft e2e medium

Editability ends with the submission: the submitted order offers no draft actions, and an edit sent straight to the API is refused and leaves both the text and the status untouched. The case pairs the screen with the endpoint so neither can regress alone. _Automated by tests/orders/customer-orders-edit.spec.ts._

  1. Sign in as the customer and open the panel. Expected: The submitted row offers no edit action and no draft actions block.
  2. Send an edit of the title to the API with the page's own session. Expected: The API answers 409 with a message naming the draft rule.
  3. Reload the panel. Expected: The row still shows the original title and the order is still awaiting distribution.
  • order-desk-e2e:orders.draft.edit-after-submit
  • e2e
  • customer-orders
  • guards
#228
#231 Refuses a customer cancellation once work has started e2e medium

After work starts only the administrator may cancel: the customer's card offers no cancel form, and a cancellation sent to the API is refused with a forbidden answer and leaves the order where it was. The rule is a product decision, so the case asserts the code and the unchanged status. _Automated by tests/orders/customer-orders-edit.spec.ts._

  1. Sign in as the customer and open the order card. Expected: The card offers no cancel form.
  2. Send a cancellation to the API with the page's own session. Expected: The API answers 403 forbidden, not a state conflict.
  3. Reload the panel. Expected: The order is still in progress, so the refusal changed nothing.
  • order-desk-e2e:orders.cancel.after-work-by-customer
  • e2e
  • customer-orders
  • guards
#231
Cancellation 2
#229 Cancels a submitted order before work starts e2e high critical

The customer cancels an order that nobody has taken from the pool yet, without a reason, and the order leaves the pool for executors. The control is the cancel form inside the order card, and the proof that the cancellation mattered is that no executor can claim the order afterwards. _Automated by tests/orders/customer-orders-edit.spec.ts._

  1. Sign in as the executor and open the executor panel. Expected: The order is listed in the pool and offers its claim action.
  2. Sign in as the customer, open the order card and submit the cancel form without a reason. Expected: The cancel form disappears from the card.
  3. Sign in as the executor again and open the executor panel. Expected: The order offers no claim action, because it left the pool.
  • order-desk-e2e:orders.cancel.before-work
  • e2e
  • customer-orders
  • cancellation
#229
#230 Cancelling an assigned order withdraws the estimate awaiting an answer e2e medium

A cancelled order never carries a half-finished assignment: the customer cancels while the executor's estimate still waits for an answer, and the proposal is withdrawn together with the order instead of staying behind as a question nobody can answer. _Automated by tests/orders/customer-orders-edit.spec.ts._

  1. Sign in as the customer and open the panel. Expected: The row offers the answer block for the pending estimate.
  2. Open the order card and submit the cancel form. Expected: The cancel form disappears.
  3. Close the card and look at the row. Expected: The estimate answer block is gone, and the order reads as cancelled.
  4. Sign in as the executor and open the executor panel. Expected: The order offers neither the estimate form nor a claim action: a cancelled order keeps its executor but no action.
  • order-desk-e2e:orders.cancel.withdraws-estimate
  • e2e
  • customer-orders
  • cancellation
#230
Paging 1
#232 Walks a long list with the next and previous page controls e2e high critical

The panel pages ten rows at a time in the browser, because the API has no paging parameters: an account with eleven orders sees ten, then the eleventh after the next control, then the first ten again after the previous one. The case checks what the controls do, not the slice arithmetic. _Automated by tests/orders/customer-order-lists.spec.ts._

  1. Sign in as the customer and open the panel. Expected: Ten rows are listed and the page summary reports the first page of two for eleven orders.
  2. Click the next page control. Expected: One row is listed and the summary reports the second page of two.
  3. Click the previous page control. Expected: Ten rows are listed again and the summary reports the first page.
  • order-desk-e2e:orders.list.paging
  • e2e
  • customer-orders
  • paging
#232
Empty states 1
#233 Shows the empty board for a customer without orders e2e high

An account that has never created an order sees the empty board, and the list container is not mounted at all. It is a different screen from the state a search leaves behind, which is pinned by the web layer, so this case exists to keep a future regression from merging the two. _Automated by tests/orders/customer-order-lists.spec.ts._

  1. Sign in as the customer and open the panel. Expected: The empty board is visible and the list container is absent.
  2. Look for the filtered-out state. Expected: The no-results screen is not shown, because nothing was filtered.
  • order-desk-e2e:orders.list.empty-board
  • e2e
  • customer-orders
  • empty-states
#233
Card over list 1
#234 Opens the order card over the list from a deep link e2e low

An order address pasted into the address bar opens the card over the list on that panel, and closing it returns to the list. The card loads its own entity, so the assertion is the title inside it rather than the container that appears first. _Automated by tests/orders/customer-order-lists.spec.ts._

  1. Open the order card address directly. Expected: The card is visible and shows the order's title, not the loading placeholder.
  2. Close the card. Expected: The address is the panel route and the row is listed again.
  • order-desk-e2e:orders.list.deep-link
  • e2e
  • customer-orders
  • card-over-list
#234
Visibility 1
#235 Keeps another customer's order out of the list e2e medium

A customer sees only their own orders: another customer's order is not in the list, a search for its title finds nothing, and the API returns the same restricted set the screen renders. The case is a role boundary, so it asserts the absence on both sides. _Automated by tests/orders/customer-order-lists.spec.ts._

  1. Sign in as the first customer and open the panel. Expected: Their own order is listed.
  2. Search for the other customer's title. Expected: The no-results state is shown and the foreign order never appears.
  3. Read the order list through the API with the first customer's account. Expected: The response holds their own order and does not hold the other customer's order.
  • order-desk-e2e:orders.list.foreign-order
  • e2e
  • customer-orders
  • visibility
#235
Comments 1
#236 Leaves a comment the other participant can read e2e high critical

A customer writes a comment on an assigned order and the executor of that order reads it on the same card. The case asserts the stored comment as well as the rendered one, because a thread that is kept in the browser would pass a screen-only check. _Automated by tests/orders/customer-order-files.spec.ts._

  1. Sign in as the customer, open the order card and write a comment. Expected: The comment is listed on the card as the customer wrote it.
  2. Read the order through the API as the customer. Expected: The order carries that comment.
  3. Sign in as the executor and open the same order card. Expected: The comment is listed for the executor, so the other participant reads it.
  • order-desk-e2e:orders.comment.visibility
  • e2e
  • customer-orders
  • comments
#236
Attachments 2
#237 Uploads an attachment the other participant can see e2e medium critical

The customer attaches a picture to the draft, the API stores it with the type read from the bytes, and the executor the order is submitted to finds the file on the card. A file the other side cannot open would not be an attachment, so the case follows it to that panel. _Automated by tests/orders/customer-order-files.spec.ts._

  1. Sign in as the customer and open the draft card. Expected: The card offers the attachment form.
  2. Choose a PNG file and attach it. Expected: The card lists the file under the name it was uploaded with.
  3. Read the order through the API as the customer. Expected: The order carries one attachment with that name and the image type the bytes declare.
  4. Submit the order to the executor and open its card from the executor panel. Expected: The executor finds the same file on the card.
  • order-desk-e2e:orders.attachment.upload
  • e2e
  • customer-orders
  • attachments
#237
#238 Downloads an attachment with its filename e2e medium

An attachment is downloaded from the card and arrives under the name it was uploaded with, which is what makes it recognisable once it leaves the browser. The case reads the download event rather than the bytes, because the bytes are the product's own file. _Automated by tests/orders/customer-order-files.spec.ts._

  1. Sign in as the customer and open the draft card. Expected: The card lists the attachment with its name.
  2. Download the attachment. Expected: The browser receives a file named exactly as the attachment.
  • order-desk-e2e:orders.attachment.download
  • e2e
  • customer-orders
  • attachments
#238
Executor 4
Declining 1
#245 Declines an assigned order and it returns to the pool e2e high critical

An executor who does not want an assigned order hands it back: the decline action disappears, the order is offered in the pool again, and a second executor can take it. The pool is the assertion, because that is what makes a refused assignment harmless. _Automated by tests/executor/executor-orders.spec.ts._

  1. Sign in as the first executor and open the executor panel. Expected: The order offers the decline action and no claim action.
  2. Click the decline action. Expected: The decline action and the estimate form disappear, and the claim action is offered again.
  3. Sign in as the second executor and open the panel. Expected: The order offers its claim action, so it is back in the pool.
  4. Read the order through the API as the customer. Expected: The order is awaiting distribution and carries no executor.
  • order-desk-e2e:executor.order.decline
  • e2e
  • executor
  • declining
#245
Guards 1
#246 Refuses to decline an order that is not an assignment e2e low

Declining answers an assignment: on an order that sits in the pool the executor is offered no decline control, and a decline sent to the API is refused with a state conflict that leaves the order in the pool. The case pairs the screen with the endpoint so neither can drift alone. _Automated by tests/executor/executor-orders.spec.ts._

  1. Sign in as the executor and open the executor panel. Expected: The order offers its claim action and no decline action.
  2. Send a decline for the order to the API with the executor's session. Expected: The API answers 409 with a state conflict.
  3. Read the order through the API as the customer and refresh the panel. Expected: The order is still awaiting distribution without an executor and still offers its claim action.
  • order-desk-e2e:executor.order.decline-pool
  • e2e
  • executor
  • guards
#246
Work log 2
#247 Records work time on an order in progress e2e high critical

While the order is in progress the executor logs minutes and a note; the entry is stored on the order, survives a reload and is rendered on the card. The customer's review and the invoice both lean on that record, which is why it is asserted through the API and the screen. _Automated by tests/executor/executor-orders.spec.ts._

  1. Sign in as the executor and open the executor panel. Expected: The order offers the minutes field, the note field and the save action.
  2. Enter 90 minutes with a note and save. Expected: The order stores that entry with its note.
  3. Refresh the panel and open the order card. Expected: The form shows the stored 90 minutes and the card renders the duration as one hour and thirty minutes.
  • order-desk-e2e:executor.order.time
  • e2e
  • executor
  • work-log
#247
#248 Replaces the recorded time instead of adding a second entry e2e medium

An order holds one time entry, so a second save corrects the first rather than adding a line: the minutes and the note are both replaced, and the form reopens on the corrected value. The case pins a data model the draft assumed to be a log and the schema says is a single record. _Automated by tests/executor/executor-orders.spec.ts._

  1. Sign in as the executor and open the executor panel. Expected: The minutes field opens on the stored 30 minutes.
  2. Enter 45 minutes with a new note and save. Expected: The order stores 45 minutes with the new note.
  3. Refresh the panel. Expected: The field shows 45 minutes, so the second save replaced the entry instead of adding one.
  • order-desk-e2e:executor.order.time-again
  • e2e
  • executor
  • work-log
#248
Estimates 4
Accepting 1
#249 Accepts the estimate and the order starts e2e high blocker

The customer accepts the proposed estimate and the order leaves the pre-work state: the answer block disappears and the executor is offered the work-time form, which only an order in progress has. The case reads both sides, so the acceptance is proved to have a consequence. _Automated by tests/estimates/customer-estimates.spec.ts._

  1. Sign in as the customer and open the customer panel. Expected: The row offers the answer block with its accept action.
  2. Click the accept action. Expected: The answer block disappears and the row reads as in progress.
  3. Open the order card. Expected: The card reads as in progress, and the order carries an accepted estimate.
  4. Sign in as the executor and open the executor panel. Expected: The work-time form is offered for the order and the estimate form is gone, so the work has started.
  • order-desk-e2e:estimates.customer.accept
  • e2e
  • estimates
  • accepting
#249
Rejecting 1
#250 Rejects the estimate with a comment and the order returns to the pool e2e high critical

The customer answers the proposal with a rejection and a comment. The order does not stay with the executor: the assignment is released, the estimate is recorded as rejected with the customer's reason, and the order is offered to the pool again, which is what makes a rejection actionable. _Automated by tests/estimates/customer-estimates.spec.ts._

  1. Sign in as the customer and open the customer panel. Expected: The row offers the answer block for the pending estimate.
  2. Type a reason and click the reject action. Expected: The answer block disappears and the row reads as awaiting distribution.
  3. Read the order through the API as the customer. Expected: The order is awaiting distribution without an executor, and its estimate is rejected with the comment.
  4. Sign in as the executor and open the executor panel. Expected: The order offers its claim action again, and the estimate form is gone because it is no longer assigned.
  • order-desk-e2e:estimates.customer.reject
  • e2e
  • estimates
  • rejecting
#250
Proposal visibility 1
#251 Offers no estimate controls to the customer before the executor proposes e2e medium

An assigned order without a proposal asks the customer nothing; once the executor proposes, the same order offers accept and reject. The pair of readings is the point: the control appears because of the proposal, not because the order became assigned. _Automated by tests/estimates/customer-estimates.spec.ts._

  1. Sign in as the customer and open the customer panel. Expected: The row reads as assigned and offers no answer block.
  2. Sign in as the executor and propose an estimate from the panel. Expected: The estimate form is replaced by the stored proposal.
  3. Sign in as the customer and open the panel again. Expected: The same row now offers the answer block with the accept and reject actions.
  • order-desk-e2e:estimates.customer.await-proposal
  • e2e
  • estimates
  • proposal-visibility
#251
Guards 1
#252 Refuses a second answer to an estimate that is already accepted e2e medium

Once an estimate is accepted the panel stops offering an answer, and a second answer sent straight to the API is refused with a state conflict that leaves the order exactly as the first acceptance produced it. _Automated by tests/estimates/customer-estimates.spec.ts._

  1. Sign in as the customer and open the customer panel. Expected: The row offers no answer block.
  2. Send an acceptance for the same estimate to the API with the page's own session. Expected: The API answers 409 with a state conflict.
  3. Read the order through the API as the customer. Expected: The order is still in progress and its estimate is still accepted.
  • order-desk-e2e:estimates.customer.answer-twice
  • e2e
  • estimates
  • guards
#252
Review 5
Submitting 1
#253 Submits the finished work and the order reaches review e2e high blocker

While the order is in progress the executor records time and submits the result; the work affordances disappear and the customer is offered the two answers. Submission is the only way an invoice can ever follow, so the case ends at the customer's side of the boundary. _Automated by tests/review/review.spec.ts._

  1. Sign in as the executor and open the executor panel. Expected: The order offers the work-time form and the submit action.
  2. Click the submit action. Expected: The work-time form and the submit action disappear.
  3. Sign in as the customer and open the customer panel. Expected: The row reads as under review and offers the accept-work and request-revision actions.
  4. Read the order through the API as the customer. Expected: The order is under review.
  • order-desk-e2e:review.executor.submit
  • e2e
  • review
  • submitting
#253
Accepting 1
#254 Accepts the work and the order keeps its status e2e high blocker

The customer accepts a submitted result: the review controls are answered and disappear, and the order stays in review because the acceptance is a recorded fact and not a status. The administrator is then offered the invoice, which is the only next step the lifecycle allows. _Automated by tests/review/review.spec.ts._

  1. Sign in as the customer and open the customer panel. Expected: The row offers the answer block with the accept-work action.
  2. Click the accept-work action. Expected: The answer block disappears and the row still reads as under review.
  3. Read the order through the API as the customer. Expected: The order is still under review and carries an acceptance time.
  4. Sign in as the administrator and open the administrator panel. Expected: The order offers the issue-invoice action.
  • order-desk-e2e:review.customer.accept-work
  • e2e
  • review
  • accepting
#254
Revision requests 1
#255 Requests changes with a comment and the order moves to revision e2e high critical

The customer asks for changes with a written reason: the answer block is consumed, the order moves to revision, and the executor is handed the order back with a resume control instead of a submit control. That swap is what tells the executor work is needed. _Automated by tests/review/review.spec.ts._

  1. Sign in as the customer and open the customer panel. Expected: The row offers the answer block with the request-revision action.
  2. Type a reason and send the request. Expected: The answer block disappears and the row reads as needing revision.
  3. Sign in as the executor and open the executor panel. Expected: The resolve action is offered for the order and the submit action is not, so the work has to be taken on again.
  4. Read the order through the API as the customer. Expected: The order needs revision.
  • order-desk-e2e:review.customer.request-revision
  • e2e
  • review
  • revision-requests
#255
Resuming 1
#256 Resumes after a revision request and submits the result again e2e high critical

The executor takes the revision request on, the order returns to work, and a second submission reaches the customer's review again. It is the loop the revision feature exists for, and it proves the pair of actions rather than either one. _Automated by tests/review/review.spec.ts._

  1. Sign in as the executor and open the executor panel. Expected: The order offers the action that starts the requested changes.
  2. Click the action that starts the changes. Expected: The work-time form and the submit action are offered again.
  3. Submit the result a second time. Expected: The work affordances disappear, so the order left the executor again.
  4. Sign in as the customer and open the customer panel. Expected: The answer block is offered a second time and the order is under review.
  • order-desk-e2e:review.executor.resume
  • e2e
  • review
  • resuming
#256
Guards 1
#257 Refuses to accept work that was never submitted for review e2e medium

Acceptance belongs to a submitted result: on an order that is still in progress the customer is offered no review controls and an acceptance sent straight to the API is refused with a state conflict that leaves the order — and its acceptance time — untouched. _Automated by tests/review/review.spec.ts._

  1. Sign in as the customer and open the customer panel. Expected: The row reads as in progress and offers no answer block.
  2. Send an acceptance to the API with the page's own session. Expected: The API answers 409 with a state conflict.
  3. Read the order through the API as the customer. Expected: The order is still in progress and carries no acceptance time.
  • order-desk-e2e:review.customer.accept-before-review
  • e2e
  • review
  • guards
#257
Money 7
Invoicing 2
#258 Issues an invoice for an accepted work e2e high critical

The administrator issues the invoice for work the customer accepted: the order moves to the invoiced status, the invoice carries a numbered amount that matches the approved estimate, and the customer's panel is where the payment is reported from. _Automated by tests/invoices/money.spec.ts._

  1. Sign in as the administrator and open the administrator panel. Expected: The order offers the issue-invoice action.
  2. Click the issue action. Expected: The order offers its payment review block and the order moves to the invoiced status.
  3. Read the order through the API as the administrator. Expected: The order is invoiced, its invoice is issued, numbered, and worth the approved amount.
  4. Sign in as the customer and open the customer panel. Expected: The row offers the invoice with the payment reporting control.
  • order-desk-e2e:money.admin.issue-invoice
  • e2e
  • money
  • invoicing
#258
#263 Voids an unpaid invoice and issues a new one e2e medium

An unpaid invoice can be voided with a reason, and the order stays invoiced so a replacement can be issued. The second invoice is a new record with a new number rather than an edit, which is the reason the invoice snapshots its amounts at issue time. _Automated by tests/invoices/money.spec.ts._

  1. Sign in as the administrator and open the administrator panel. Expected: The order offers the void form with a reason field for the issued invoice.
  2. Type a reason and void the invoice. Expected: The order keeps its invoiced status and the invoice is recorded as void.
  3. Issue the invoice again. Expected: The order holds two invoices: the void one and a newly issued one with another number.
  • order-desk-e2e:money.admin.void-invoice
  • e2e
  • money
  • invoicing
#263
Payment reports 1
#259 Reports a payment and hands the receipt to the administrator e2e high critical

The customer uploads a receipt for the invoice, and the administrator is offered that file for review. The case asserts the stored report and the review controls, because a receipt that does not reach the reviewer is the same as one that was never sent. _Automated by tests/invoices/money.spec.ts._

  1. Sign in as the customer and open the customer panel. Expected: The row offers the receipt upload and the report action for the invoice.
  2. Choose a PDF receipt and report the payment. Expected: The order stores the report as pending review under the file name that was uploaded.
  3. Sign in as the administrator and open the administrator panel. Expected: The order offers the submitted receipt for download together with the confirm and reject actions.
  • order-desk-e2e:money.customer.report-payment
  • e2e
  • money
  • payment-reports
#259
Payment review 2
#260 Confirms the reported payment and the order is paid e2e high critical

The administrator confirms the receipt the customer sent: the report becomes confirmed, the invoice becomes paid and the order moves to the paid status. Completion is a separate act, so the customer already sees a paid invoice while the order is still open. _Automated by tests/invoices/money.spec.ts._

  1. Sign in as the administrator and open the administrator panel. Expected: The order offers the confirm action for the pending receipt.
  2. Click the confirm action. Expected: The order moves to the paid status and offers the completion action.
  3. Read the order through the API as the administrator. Expected: The invoice is paid and its report is confirmed.
  4. Sign in as the customer and open the customer panel. Expected: The row reads as an invoice that has been paid.
  • order-desk-e2e:money.admin.confirm-payment
  • e2e
  • money
  • payment-review
#260
#262 Rejects a payment report and keeps the order invoiced e2e medium

A refused receipt does not end the invoice: the administrator rejects the report with a reason, the order stays payable, and the customer's panel offers the upload again. The case pins the recoverable path a wrong receipt has to have. _Automated by tests/invoices/money.spec.ts._

  1. Sign in as the administrator and open the administrator panel. Expected: The order offers the reject action for the pending receipt.
  2. Type a reason and reject the receipt. Expected: The order shows the receipt as rejected with the review comment.
  3. Read the order through the API as the administrator. Expected: The order is still invoiced, its invoice is still issued and the report is rejected.
  4. Sign in as the customer and open the customer panel. Expected: The receipt upload is offered again, so the customer can send a better one.
  • order-desk-e2e:money.admin.reject-report
  • e2e
  • money
  • payment-review
#262
Completion 1
#261 Completes a paid order e2e high critical

Completion is the last step and a separate one: the administrator closes an order whose payment was confirmed, and only then does the customer's row read as completed. The case exists because the product keeps paying and closing apart on purpose. _Automated by tests/invoices/money.spec.ts._

  1. Sign in as the administrator and open the administrator panel. Expected: The order offers the completion action.
  2. Click the completion action. Expected: The completion block disappears from the order.
  3. Read the order through the API as the administrator. Expected: The order is completed and carries a completion time.
  4. Sign in as the customer, open the panel and open the order card. Expected: Both the row and the card read as completed.
  • order-desk-e2e:money.admin.complete
  • e2e
  • money
  • completion
#261
Guards 1
#264 Refuses to void a paid invoice e2e medium

A paid invoice is immutable: the administrator is offered no void control for it, and a void sent straight to the API is refused with a state conflict that leaves the invoice paid and the order where it was. There is no post-payment correction by design. _Automated by tests/invoices/money.spec.ts._

  1. Sign in as the administrator and open the administrator panel. Expected: The paid invoice offers no void form.
  2. Send a void for the paid invoice to the API with the page's own session. Expected: The API answers 409 with a state conflict.
  3. Read the order through the API as the administrator. Expected: The invoice is still paid and the order is still in the paid status.
  • order-desk-e2e:money.admin.void-paid
  • e2e
  • money
  • guards
#264
Administration 8
Assignment 2
#265 Assigns a pool order to an executor and takes it out of the pool e2e high critical

The administrator assigns a pooled order to a chosen executor: the order leaves the pool, names that executor and offers them the estimate form. The case reads the executor's own panel, because an assignment the executor cannot act on is not an assignment. _Automated by tests/admin/admin.spec.ts._

  1. Sign in as the administrator and open the administrator panel. Expected: The pooled order offers the assign form with a list of executors.
  2. Choose the executor and submit the assignment. Expected: The order shows the executor it now belongs to.
  3. Read the order through the API as the administrator. Expected: The order is assigned to the chosen executor.
  4. Sign in as that executor and open the executor panel. Expected: The order offers no claim action and does offer the estimate form, so it is the executor's work.
  • order-desk-e2e:admin.orders.assign
  • e2e
  • administration
  • assignment
#265
#266 Reassigns an order to another executor and withdraws the pending estimate e2e high critical

Reassigning an assigned order moves it to another executor and withdraws the proposal the previous one made, because the new executor has a rate of their own and has to price the work again. The case asserts the withdrawn estimate and the second executor's estimate form. _Automated by tests/admin/admin.spec.ts._

  1. Sign in as the administrator and open the administrator panel. Expected: The assigned order offers the assign form with the second executor.
  2. Reassign the order to the second executor. Expected: The order shows the new executor.
  3. Read the order through the API as the administrator. Expected: The order is assigned to the new executor and the previous proposal is withdrawn.
  4. Sign in as the second executor, then as the first, and open the executor panel. Expected: The new executor is offered the estimate form and the previous one is not offered any action.
  • order-desk-e2e:admin.orders.reassign
  • e2e
  • administration
  • assignment
#266
Guards 1
#267 Refuses to assign an order to the executor who already owns it e2e medium

An assignment has to move the order to somebody else: the select does not offer the executor who already owns it, and the same assignment sent to the API is refused with a state conflict that leaves the order with the executor it had. _Automated by tests/admin/admin.spec.ts._

  1. Sign in as the administrator and open the administrator panel. Expected: The assign form offers the executors, and the current owner cannot be chosen.
  2. Send the same assignment to the API with the page's own session. Expected: The API answers 409 with a state conflict.
  3. Read the order through the API as the administrator. Expected: The order is still assigned to the same executor.
  • order-desk-e2e:admin.orders.assign-claimed
  • e2e
  • administration
  • guards
#267
Accounts 3
#268 Creates an executor account that can sign in e2e high critical

The administrator creates an executor from the accounts screen, and the account works: the credentials the form took sign in, the panel that opens is the executor's, and the profile confirms the role. Only executors are created here, because customers register themselves. _Automated by tests/admin/admin.spec.ts._

  1. Sign in as the administrator and open the accounts screen. Expected: The screen offers the form that creates an executor.
  2. Fill the name, the e-mail and the password and submit. Expected: The executor list shows the new account with its e-mail.
  3. Sign in with the new credentials. Expected: The executor panel opens.
  4. Open the profile. Expected: The profile names the executor role and offers the hourly rate card.
  • order-desk-e2e:admin.users.create-executor
  • e2e
  • administration
  • accounts
#268
#269 Resets an executor password and the old one stops working e2e high critical

There is no password recovery by e-mail, so an administrator resets the password from the account row. The case proves the reset reached the credential: the old password is refused on the sign-in form and the new one opens the panel. _Automated by tests/admin/admin.spec.ts._

  1. Sign in as the administrator, open the accounts screen and reset the password. Expected: The account keeps its place in the list.
  2. Sign in with the old password. Expected: The sign-in form stays on screen and no panel opens.
  3. Sign in with the new password. Expected: The executor panel opens.
  • order-desk-e2e:admin.users.reset-password
  • e2e
  • administration
  • accounts
#269
#270 Deactivates an executor and blocks the sign-in e2e high critical

A deactivated executor keeps the account but loses the workspace: the panel loads and every domain call is refused, so the order list shows its load error instead of work. The case asserts the refusal on the screen and on the API, because the sign-in itself is not what the product blocks. _Automated by tests/admin/admin.spec.ts._

  1. Sign in as the administrator, open the accounts screen and deactivate the executor. Expected: The row shows the account as inactive.
  2. Sign in as the deactivated executor and open the executor panel. Expected: The panel reports a load error instead of an order list.
  3. Read the own profile through the API with the page's session. Expected: The API answers 401, so the account cannot use the domain at all.
  • order-desk-e2e:admin.users.deactivate
  • e2e
  • administration
  • accounts
#270
Categories 2
#271 Creates a category that the customer's form then offers e2e high critical

Only an administrator creates categories, and the point of one is that a customer can choose it: the case creates the category on the administrator's screen and then selects it by name on the customer's create-order form, which proves it reached the list the form builds from. _Automated by tests/admin/admin.spec.ts._

  1. Sign in as the administrator and open the categories screen. Expected: The screen offers the form that creates a category.
  2. Fill the name and submit. Expected: The category list shows the new category.
  3. Sign in as the customer, open the panel and open the create-order form. Expected: The category select offers the new category and accepts it as a choice.
  • order-desk-e2e:admin.categories.create
  • e2e
  • administration
  • categories
#271
#272 Deactivates a category and the customer's form stops offering it e2e medium

A deactivated category stops being offered to customers while it keeps existing for the orders that already carry it. The case asserts the absence on the customer's form next to the presence of a category that stayed active, so it cannot pass on a form that lost every category. _Automated by tests/admin/admin.spec.ts._

  1. Sign in as the administrator, open the categories screen and deactivate one category. Expected: The row shows the category as inactive.
  2. Sign in as the customer and open the create-order form. Expected: The category select offers the active category and does not offer the deactivated one.
  • order-desk-e2e:admin.categories.deactivate
  • e2e
  • administration
  • categories
#272
Profile 5
Name 1
#273 Renames the account and the profile keeps the new name e2e medium

A customer edits the name on their own profile and saves it: the field shows the new value, the stored account carries it and a reload reads it back. The API wants the current password as proof, so saving is also the case's check that the form sends it. _Automated by tests/profile/profile.spec.ts._

  1. Sign in as the customer and open the profile. Expected: The profile form holds the account's current name and names the customer role.
  2. Replace the name and save with the current password. Expected: The name field shows the new value.
  3. Read the account through the API. Expected: The stored name is the new one.
  4. Reload the profile. Expected: The new name is still shown.
  • order-desk-e2e:profile.customer.name
  • e2e
  • profile
  • name
#273
Rate (read) 1
#274 Shows the saved hourly rate on the executor's profile e2e medium

An executor whose rate is set sees it on the profile card and in the rate form, and a reload keeps it. The rate is the value an estimate amount is computed from, so reading the stored one rather than a default is what makes every estimate assertable. _Automated by tests/profile/profile.spec.ts._

  1. Sign in as the executor and open the profile. Expected: The rate card and the rate form are visible.
  2. Read the value the rate field holds. Expected: It is the rate the precondition wrote.
  3. Reload the profile. Expected: The same rate is shown and the save action is still offered.
  • order-desk-e2e:profile.executor.rate-read
  • e2e
  • profile
  • rate-read
#274
Role boundary 1
#275 Offers a customer no hourly rate and the role as read-only e2e low

The hourly rate is an executor attribute: a customer's profile names the role and offers no rate form, so the screen does not invite an action the API would refuse with a forbidden answer. _Automated by tests/profile/profile.spec.ts._

  1. Sign in as the customer and open the profile. Expected: The role block names the customer role and the name and e-mail fields are offered.
  2. Look for the rate controls. Expected: Neither the rate card, the rate form nor the rate field is rendered.
  • order-desk-e2e:profile.customer.role-boundary
  • e2e
  • profile
  • role-boundary
#275
Password 1
#276 Changes the password from the profile and signs in with the new one e2e medium critical

The customer changes the password from their profile, and the credential is what changed: the new password opens the panel and the old one is refused on the form. The second half is the point — a form that says success while the old password still works would pass a one-sided case. _Automated by tests/profile/profile.spec.ts._

  1. Sign in as the customer, open the profile and open the password form. Expected: The form offers a current, a new and a confirmation field.
  2. Fill the three fields and submit. Expected: The form reports the change and stays on the profile.
  3. Sign in with the new password. Expected: The customer panel opens.
  4. Sign in with the original password. Expected: The sign-in form stays on screen and no panel opens.
  • order-desk-e2e:profile.password.change
  • e2e
  • profile
  • password
#276
Rejections 1
#277 Refuses a password change when the current password is wrong e2e low

A wrong current password does not change the credential: the form stays open, the old password keeps working and the password the case tried to set does not. The pair of sign-ins is what proves nothing was written. _Automated by tests/profile/profile.spec.ts._

  1. Sign in as the customer, open the password form and submit it with a wrong current password. Expected: The password form is still on screen.
  2. Sign in with the original password. Expected: The customer panel opens.
  3. Sign in with the password the form tried to set. Expected: The sign-in form stays on screen and no panel opens.
  • order-desk-e2e:profile.password.wrong-current
  • e2e
  • profile
  • rejections
#277
Public + auth 6
Sign-in 1
#278 Signs a customer in from the landing page and opens the customer panel e2e high blocker

A visitor lands on the marketing page, follows the sign-in link, authenticates with the baseline customer and is left on the customer panel. It is the first step of every other journey in the suite, and the only place where the session cookie and the redirect after signing in are observed together. _Automated by tests/auth/auth.spec.ts._

  1. Open the landing page. Expected: The landing page is visible and offers the sign-in link.
  2. Follow the sign-in link. Expected: The sign-in screen is on screen with the e-mail, password and submit controls.
  3. Sign in with the shared sign-in step. Expected: The customer panel is visible and the address is the customer panel route.
  4. Open the landing page again and follow the dashboard link. Expected: The page offers the dashboard instead of sign-in, and the link opens the customer panel.
  • order-desk-e2e:auth.sign-in.panel
  • e2e
  • public-auth
  • sign-in
#278
Registration 1
#279 Registers a new customer and opens that customer's panel e2e high critical

A visitor creates a customer account through the public form and reaches a customer panel that belongs to that account. Registration is the only path by which a customer exists without an administrator, so the case proves the account, the session and the panel in one walk. _Automated by tests/auth/auth.spec.ts._

  1. Open the registration page. Expected: The registration form offers a name, an e-mail, a password and a submit control.
  2. Fill the three fields with a new account and submit. Expected: The customer panel opens, and it shows the empty board because the account has no orders.
  3. Reload the panel. Expected: The session survives the reload and the empty board is still shown.
  • order-desk-e2e:auth.register.customer
  • e2e
  • public-auth
  • registration
#279
Sign-out 1
#280 Signs out from the panel and needs a new sign-in to return e2e medium critical

A signed-in customer uses whichever sign-out control the viewport shows and is returned to the public page. Afterwards the panel is no longer reachable: the route guard sends the browser to the sign-in form, which is the part of sign-out a cookie check alone cannot prove. _Automated by tests/auth/auth.spec.ts._

  1. Sign the account in and open the customer panel. Expected: The customer panel is visible.
  2. Click the sign-out control the viewport shows. Expected: The landing page is visible and offers sign-in again.
  3. Open the customer panel address. Expected: The address becomes the sign-in route and the customer panel is not rendered.
  • order-desk-e2e:auth.sign-out.control
  • e2e
  • public-auth
  • sign-out
#280
Landing 1
#281 Shows a signed-in visitor the way to their own panel e2e medium

An executor who opens the public page while signed in is offered a link to their own panel instead of a sign-in link, and the link leads to the executor panel rather than to a generic one. The page has to read the session, which no unit test of the landing page can do. _Automated by tests/auth/auth.spec.ts._

  1. Open the landing page. Expected: The dashboard link is offered and the sign-in link is not.
  2. Follow the dashboard link. Expected: The executor panel is visible and the address is the executor panel route.
  • order-desk-e2e:auth.landing.session-aware
  • e2e
  • public-auth
  • landing
#281
Session replacement 1
#282 Replaces a live session when another role signs in e2e medium

Signing in as another role while a session already exists swaps the session instead of stacking two: the new panel opens and the previous role's panel is no longer reachable in that browser. The case is what makes a second role reachable inside one case without a second browser context. _Automated by tests/auth/auth.spec.ts._

  1. Open the customer panel. Expected: The customer panel is visible.
  2. Sign in as the baseline executor through the shared sign-in step. Expected: The executor panel is visible.
  3. Open the customer panel address. Expected: The address becomes the executor panel route, because the session now belongs to the executor.
  • order-desk-e2e:auth.session.replace
  • e2e
  • public-auth
  • session-replacement
#282
Rejections 1
#283 Keeps the visitor on the sign-in form when the password is wrong e2e medium

A wrong password is refused visibly: the visitor stays on the sign-in form with no panel behind it, and the same form still accepts the right password immediately afterwards. The second half is what keeps the case from passing on a form that simply never works. _Automated by tests/auth/auth.spec.ts._

  1. Submit the sign-in form with the right e-mail and a wrong password. Expected: The sign-in route stays on screen, the form is visible and no panel is rendered.
  2. Submit the same form with the account's password. Expected: The customer panel is visible.
  • order-desk-e2e:auth.sign-in.wrong-password
  • e2e
  • public-auth
  • rejections
#283
Access control 1
Screen guard 1
#284 Redirects a role away from another role's panel e2e high critical

A signed-in customer who types the address of another role's panel is returned to their own panel instead: the foreign panel never renders, and the address is the assertion because the redirect only happens once the session has loaded. Only a browser without a session reaches the sign-in form, which is why the last step walks the customer's own panel. _Automated by tests/guards/guards.spec.ts._

  1. Open the administrator panel address. Expected: The address becomes the customer panel route and the administrator panel is not rendered.
  2. Open the executor panel address. Expected: The address becomes the customer panel route and the executor panel is not rendered.
  3. Open the customer panel address. Expected: The customer panel is visible, so the session is healthy and only the foreign panels were refused.
  • order-desk-e2e:guards.ui.foreign-panel
  • e2e
  • access-control
  • screen-guard
#284
setup 3
setup/auth.setup.ts 3
#207 signs the baseline admin in and stores the session setup undefined
#208 signs the baseline customer in and stores the session setup undefined
#209 signs the baseline executor in and stores the session setup undefined
Web 26
Orders list 5
#211 narrows the list by status, category and a case-insensitive search unit high

Filtering runs in the browser, over the orders the customer already loaded, so a defect here hides work from the person who owns it without any error: the list simply looks shorter. The search covers both the title and the description, ignores leading and trailing spaces, and folds case with the locale of the interface, so a Russian customer finds Замена by typing замена while a Turkish one keeps the dotted and dotless i apart. _Automated by apps/web/src/order-list-controls.spec.ts._

  1. Filter a list by status. Expected: Only orders with exactly that status remain; an empty status keeps all of them.
  2. Filter the same list by categoryId. Expected: Only orders of that category remain.
  3. Search for a fragment written in a different case, padded with spaces. Expected: Orders whose title or description contains the fragment match, and the padding does not.
  4. Combine a status, a category and a search that no order satisfies. Expected: The result is empty rather than the union of the individual matches.
  • order-desk:web.orders.filter-orders
  • unit
  • web
  • orders-list
#211
#212 lists every category once, sorted by the locale of the interface unit medium

The category filter is built from the orders that are on screen, because the customer panel does not load the category dictionary. A category used by ten orders must therefore appear once, and the options have to follow the collation of the interface language instead of the byte order, otherwise a Russian customer reads a list that looks unsorted. _Automated by apps/web/src/order-list-controls.spec.ts._

  1. Build the options from several orders that share two categories. Expected: Each category appears exactly once, keeping its name.
  2. Sort the same orders with the ru locale. Expected: The options follow Russian collation, not the order of the input.
  • order-desk:web.orders.category-options
  • unit
  • web
  • orders-list
#212
#213 clamps the requested page to the range the list actually has unit medium

The page number comes from the user, so it arrives out of range: a filter can shrink the list while page three is open, and a hand-edited or restored state can ask for page zero. Slicing the array with an unclamped page renders an empty screen with a non-zero total, which reads as a data loss rather than as a wrong page. _Automated by apps/web/src/order-list-controls.spec.ts._

  1. Paginate a list shorter than one page with page 1. Expected: One page holds every item and totalPages is 1.
  2. Ask for a page below 1 or above totalPages. Expected: The returned page is clamped, and the items are those of the clamped page.
  3. Paginate an empty list. Expected: totalPages stays 1 instead of 0, so the paginator never divides by zero.
  • order-desk:web.orders.pagination
  • unit
  • web
  • orders-list
#213
#214 shows the reset action only while a filter is active unit medium

The reset button is the only way out of a filter that hides the order a customer is looking for. Rendering it always adds a control that does nothing, hiding it behind an active filter strands the user, and a search made of spaces must not count as active, because that reads as a filter that matches nothing. _Automated by apps/web/src/order-list-controls.spec.tsx._

  1. Render the controls with empty filters. Expected: The search field and both selects are present and there is no reset action.
  2. Render them with a status chosen. Expected: The reset action appears.
  3. Type a single space into the search field. Expected: Nothing counts as an active filter, so the reset action stays hidden.
  • order-desk:web.orders.controls-reset
  • unit
  • web
  • orders-list
#214
#294 keeps the order card in place when it is pressed unit high

The order card is a container, not a control: the detail link, the action buttons and the draft form inside it answer their own presses. A press transform on the card itself scales the whole card under the pointer, which a tester reported as a card that pumps on every click, and on a long list it also makes the row under the cursor shift while the click is still travelling to the control the person aimed at. The case reads the stylesheet as the contract and asserts that the card carries no press state while the pointer feedback that belongs to it stays. _Automated by apps/web/test/orders-card-styles.spec.ts._

  1. Collect the rules of the order card from the stylesheet. Expected: The card has a base rule and a hover rule, and no other state.
  2. Inspect the base rule for a transform and the state list for an :active rule. Expected: Neither exists, so pressing the card moves nothing.
  3. Inspect the hover rule. Expected: The card still answers the pointer with a border and a shadow, because only the press was wrong.
  • order-desk:web.orders.card-press
  • unit
  • web
  • orders-list
#294
API client 2
#215 turns a failed response into the status, the code and the message of the API unit high critical

Every panel shows failures through the same ApiError, and the localization picks the text by its code. A mapping defect surfaces as the wrong message rather than as a crash: a validation error reported as an internal one sends the user to support, and a missing code falls back to the status code so the interface still says something precise. _Automated by apps/web/src/api.spec.ts._

  1. Reject a request with 400 and a body that carries message and code. Expected: ApiError exposes the status, the body code and the joined message.
  2. Reject a request with a status the body does not describe. Expected: The code follows the status table, and the message falls back to the status text.
  3. Reject a request with a validation body whose message is an array. Expected: The messages are joined instead of being rendered as [object Object].
  • order-desk:web.api.error-contract
  • unit
  • web
  • api-client
#215
#216 sends JSON by default, reads `204` as empty and reports an unreachable server unit high

The client is the single place that knows about cookies, the content type and the empty body. A request sent without credentials loses the session, a JSON body sent without its header is rejected by the API, and parsing 204 as JSON throws on every delete and void operation, so those three rules are the contract every panel relies on. _Automated by apps/web/src/api.spec.ts._

  1. Send a request with a string body and no explicit content type. Expected: The request carries Content-Type: application/json and credentials: include.
  2. Send a FormData body. Expected: The content type is left to the browser, so the multipart boundary survives.
  3. Resolve a 204 response. Expected: The call resolves with undefined instead of parsing an empty body.
  4. Make fetch reject with a transport error. Expected: The caller receives ApiError with status 0 and code NETWORK_ERROR.
  • order-desk:web.api.request-shape
  • unit
  • web
  • api-client
#216
Localization 5
#217 fills in the placeholders it was given and leaves the rest untouched unit medium

Messages are templates with {name}-style placeholders, and a wrong substitution shows raw braces or undefined to the user. The formatter must also survive a missing parameter without emptying the sentence, because a half-rendered message still tells more than a blank one. _Automated by apps/web/src/i18n/template.spec.ts._

  1. Format a template with every placeholder supplied. Expected: Each placeholder is replaced by its value, numbers included.
  2. Format a template with no parameters. Expected: The template is returned unchanged.
  3. Format a template whose placeholder has no value. Expected: That placeholder stays as written instead of becoming undefined.
  • order-desk:web.i18n.template
  • unit
  • web
  • localization
#217
#218 picks the plural form of the interface locale and fills in the count unit medium

Russian needs three forms and English two, so the choice has to come from Intl.PluralRules of the selected locale rather than from an n === 1 test. A form the catalogue does not carry must fall back to other, otherwise a count of five renders an empty label. _Automated by apps/web/src/i18n/provider.spec.tsx._

  1. Select the plural form for 1 and for 5 in English. Expected: The first uses one, the second uses other, and {count} is filled in.
  2. Select the form for 2 and for 5 in Russian. Expected: The first uses few, the second uses many.
  3. Select a form the catalogue omits. Expected: The other form is used instead of an empty string.
  • order-desk:web.i18n.plural
  • unit
  • web
  • localization
#218
#219 translates a failure by its code, by its status, or to the fallback unit high

errorMessage is what the user reads when a panel fails, and it prefers the code the API sent over the bare status. A defect shows a raw ApiError or an English string inside a Russian interface, so the precedence and the fallback are pinned here rather than in each panel. _Automated by apps/web/src/i18n/provider.spec.tsx._

  1. Translate an error that carries a code the catalogue knows. Expected: The message of that code is returned.
  2. Translate an error that carries only a status. Expected: The message of the code that status maps to is returned.
  3. Translate an unknown object and a plain TypeError. Expected: The unknown object yields the caller's fallback, and TypeError yields the network message.
  • order-desk:web.i18n.error-message
  • unit
  • web
  • localization
#219
#295 labels the landing hero button as a registration action in every language unit high

The wording defect was reported against one language but the landing page is published in three, and a fix applied only to the English catalogue would leave Russian and Spanish visitors with Go to orders. The case reads the label out of every catalogue the provider can select, so a translation that keeps the old wording fails here instead of in a review of the two languages nobody on the team speaks. _Automated by apps/web/src/i18n/catalogue.spec.ts._

  1. Collect the landing hero label from the English, Russian and Spanish catalogues. Expected: English reads Register, Russian reads Зарегистрироваться, Spanish reads Registrarse.
  • order-desk:web.i18n.cta-register
  • unit
  • web
  • localization
#295
#296 keeps the hours next to the amount in every language unit high

An estimate is a price for a number of hours, and a card that shows only the amount tells the customer nothing about the work behind it: a tester reported 90 where the product promises 2 h (90$). Every place that prints an estimate now fills one template, so the case renders that template in each language and asserts that the hours, the currency sign and the parentheses survive translation rather than relying on the one language the reviewer happens to read. _Automated by apps/web/src/i18n/template.spec.ts._

  1. Render the estimate template with two hours and an amount of ninety for every language. Expected: Each result carries the hours and the amount inside parentheses.
  2. Compare the rendered strings with the expected wording of each language. Expected: English and Spanish read 2 h (90$), Russian reads 2 ч (90$), and none drops a figure.
  • order-desk:web.i18n.estimate-figures
  • unit
  • web
  • localization
#296
Motion 3
#220 resists progressively the further a gesture is dragged past its limit unit low

The sheet is drag-only, so the resistance past the open position is the whole feedback that the gesture has reached its limit. The curve has to grow with the drag but stay below it, or the sheet feels glued; it must be odd in its input, so dragging back past the limit mirrors the movement instead of jumping. _Automated by apps/web/src/motion/spring.spec.ts._

  1. Compute the offset for a small overshoot and for a larger one on the same dimension. Expected: Both follow the pointer, and the larger overshoot yields the larger offset.
  2. Compute the offset for +x and for -x. Expected: The two are exact mirrors.
  3. Compare the offset with the raw overshoot. Expected: The offset is always smaller in magnitude, which is the resistance itself.
  • order-desk:web.motion.rubberband
  • unit
  • web
  • motion
#220
#221 reads the throw velocity from a pointer history and drops a stale one unit low

A released gesture keeps its momentum, so the sheet continues in the direction it was thrown. A history that stopped moving before the release must read as zero, otherwise a sheet that was dragged and held still flies away on release, and a single sample has no velocity at all. _Automated by apps/web/src/motion/spring.spec.ts._

  1. Read the velocity of two samples moving down over 100 ms. Expected: The result is positive and proportional to the distance over time.
  2. Read the velocity of a history whose last sample is older than 100 ms. Expected: The result is 0, because the pointer had come to rest.
  3. Read the velocity of zero or one sample. Expected: The result is 0.
  • order-desk:web.motion.release-velocity
  • unit
  • web
  • motion
#221
#222 settles on its target and reports rest instead of oscillating forever unit low

The integrator drives every animated surface. It must reach the target and stop emitting frames, because a spring that never rests keeps a request-animation-frame loop alive and burns a phone battery on a screen that looks still. A retarget during the run has to keep the current position, so the motion redirects instead of jumping back. _Automated by apps/web/src/motion/spring.spec.ts._

  1. Advance a spring from 0 towards 1 until it reports rest. Expected: It converges to the target within the rest distance and then stops.
  2. Retarget the spring while it is in flight. Expected: The next value continues from the current position, without a jump back to the start.
  • order-desk:web.motion.spring-settles
  • unit
  • web
  • motion
#222
Orders page 5
#223 renders the orders the api returns and drops the loading state unit high critical

The customer panel is the first screen that shows real data, and it is wired by hand: a fetch on mount, a loading flag, an empty state and a list. A defect in that wiring leaves a customer staring at a spinner or at nothing here yet although the orders exist, which no unit test of the filter helpers can catch. The case mounts the application at /customer with the session of a customer and the api stubbed at fetch, so the providers and the router are the ones the production build uses. _Automated by apps/web/test/integration/customer-orders-page.spec.tsx._

  1. Open /customer. Expected: The panel renders its loading placeholder while the request is in flight.
  2. Wait for the answers of GET /orders, GET /categories and GET /users/executors/available. Expected: A card appears for each order, showing its title.
  3. Inspect the list region. Expected: The loading placeholder and the empty state are gone, because orders are present.
  • order-desk:web.orders-page.loads-orders
  • unit
  • web
  • orders-page
#223
#224 narrows the rendered list to the typed search and restores it with the reset action unit high

The filter helpers are covered on their own, but a customer meets them through the toolbar: typing has to narrow the rendered list, an empty result has to explain itself instead of showing a bare list, and the reset control has to bring every order back. The case exercises that loop on the mounted page, so a toolbar that stops calling the filter, or a reset that clears the fields without resetting the list, fails here. _Automated by apps/web/test/integration/customer-orders-page.spec.tsx._

  1. Type a fragment of one order's title into the search field. Expected: Only the matching order remains; the other card is gone.
  2. Replace the search with a fragment that no order contains. Expected: The list is replaced by the nothing found state with a reset control.
  3. Press the reset control. Expected: Both orders are rendered again and the nothing found state is gone.
  • order-desk:web.orders-page.search-narrows-list
  • unit
  • web
  • orders-page
#224
#225 offers a retry that recovers from a failed load without a reload unit high critical

A failed load must not look like an empty account: the panel has to say that loading failed, report the reason in the reader's language, and offer a retry that asks again. The case answers the first request with 503, then lets the retry succeed, which is the path a customer takes after a short outage. A panel that shows the empty state, stays silent about the failure, or retries without refetching fails here. _Automated by apps/web/test/integration/customer-orders-page.spec.tsx._

  1. Open /customer. Expected: The error block with the retry control replaces the list; no order card appears.
  2. Read the notification. Expected: It reports an unavailable service in the reader's language, not a generic failure.
  3. Press the retry control while GET /orders succeeds. Expected: The orders are rendered, the error block disappears, and the api received a second GET /orders.
  • order-desk:web.orders-page.retry-after-failure
  • unit
  • web
  • orders-page
#225
#298 shows the estimate hours and the amount together on the order card unit high

The estimate is the moment a customer decides, and the card used to print the amount alone, so a tester read 90 with no way to tell how much work it buys. The card now prints the hours and the price as one figure, and the case mounts the panel with a pending estimate to assert the whole sentence a customer reads before accepting or rejecting it. _Automated by apps/web/test/integration/customer-orders-page.spec.tsx._

  1. Open /customer with one order whose estimate is pending. Expected: The card offers the accept and reject controls for that estimate.
  2. Read the estimate line above the controls. Expected: It prints the hours and the amount together, 2 h (90$), instead of the amount alone.
  • order-desk:web.orders-page.estimate-figures
  • unit
  • web
  • orders-page
#298
#299 offers a file field in the create form and attaches the chosen files to the new draft unit high critical

A customer describes the work with a photo or a PDF, and the order form is the only place that is open while the order is being described, so a form without a file field leaves the customer with no way to hand the executor the evidence at all. The api only accepts attachments on a draft, which fixes the order of the calls: the draft has to exist before the upload, and the upload has to finish before the order is sent. The case fills the form, chooses a file, submits and inspects both what the api received and in which order. _Automated by apps/web/test/integration/customer-orders-page.spec.tsx._

  1. Open /customer and press new order. Expected: The task form opens with a file field next to the description fields.
  2. Fill in the title and the description, choose a PNG file and press create and send. Expected: The api receives POST /orders, then POST /orders/<id>/attachments carrying that file as multipart form data, then POST /orders/<id>/submit.
  3. Read the notification once the list has reloaded. Expected: It reports that the order was sent for distribution.
  • order-desk:web.orders-page.attaches-files-on-create
  • unit
  • web
  • orders-page
#299
Executor panel 3
#226 claims a pool order and moves it into the assigned group unit high critical

Claiming is the executor's first action and the only one that takes work away from everybody else, so the panel has to send the claim and then re-read the list instead of trusting the click. Without the reload the order stays in the pool on screen while the server has already assigned it, and a second claim fails with a conflict the executor cannot explain. The case mounts the panel, claims the only pool order and asserts both the request and the regrouping. _Automated by apps/web/test/integration/executor-panel.spec.tsx._

  1. Open /executor. Expected: The order is rendered inside the pool group and the assigned group is empty.
  2. Press claim on that order. Expected: The panel sends POST /orders/<id>/claim and then asks for the list again.
  3. Inspect both groups once the list has reloaded. Expected: The order is now inside the assigned group and gone from the pool.
  • order-desk:web.executor-panel.claims-pool-order
  • unit
  • web
  • executor-panel
#226
#302 steps the estimate hours by a whole hour and sends the number it shows unit high

The estimate field is a number spinner, and its step is what one press of an arrow adds. A step copied from a money field made every press move the value by 0.0001, which a tester reported as hours that cannot be raised to a plan at all: the number looked unchanged while the ratio applied to the hourly rate kept its four decimal places. The case asserts the contract of the control and what the panel sends when the executor proposes the hours the field shows. _Automated by apps/web/test/integration/executor-panel.spec.tsx._

  1. Open /executor and read the estimate field of the assigned order. Expected: The field steps by one and starts at one whole hour.
  2. Enter 3 and press propose estimate. Expected: The api receives POST /orders/<id>/estimate with {"hours":3}.
  • order-desk:web.executor-panel.estimate-whole-hours
  • unit
  • web
  • executor-panel
#302
#303 shows the hours and the amount of the latest estimate on the assigned card unit high

The executor watches the same estimate from the other side, and the assigned card printed only the amount. Two roles read one number differently - the customer wants the price, the executor wants the workload - so the case asserts that the card in the executor workspace carries the hours next to the amount as well, which is the shared card the administrator sees too. _Automated by apps/web/test/integration/executor-panel.spec.tsx._

  1. Open /executor. Expected: The order is rendered inside the assigned group with the estimate line.
  2. Read the estimate line. Expected: It prints 2 h (90$) and the status of the estimate, not the amount alone.
  • order-desk:web.executor-panel.estimate-figures
  • unit
  • web
  • executor-panel
#303
Landing page 1
#297 labels the hero button of a returning customer as a registration action unit high

A tester who opened the landing page with a customer session read Go to orders on the hero button and filed the wording as a defect: the button advertises registration, not a second way into the workspace that the top navigation already offers. The case mounts the landing page with that session and asserts the label, while pinning the destination so the wording change cannot silently send a signed-in customer to the registration form. _Automated by apps/web/test/integration/landing.spec.tsx._

  1. Open / with the session of a customer. Expected: The landing page renders its hero actions.
  2. Read the primary hero button and follow where it points. Expected: The button reads Register and still points at /customer, not at /register.
  • order-desk:web.landing.register-label
  • unit
  • web
  • landing-page
#297
Authentication 2
#300 opens the workspace of the signed-in user instead of returning to the login page unit high critical

The authentication client keeps the last session it fetched in a store-wide atom, and the panel route reads that atom the moment it mounts. Right after a sign-in the atom still holds the answer from before the login, so a route that trusts it sends the visitor back to the login page, where nothing waits for the session: the tester who reported the defect stayed on the form with valid credentials. The case mounts the real router and the real form with a stub that keeps the stale atom and answers the server call with a customer, which is the state the application is in immediately after signing in. _Automated by apps/web/test/integration/login-redirect.spec.tsx._

  1. Open /login and submit the credentials of a customer. Expected: The form reports no error and leaves the login page.
  2. Inspect the page the browser lands on. Expected: The customer workspace is rendered with its orders region, not the login form.
  3. Inspect the address and the visible page again. Expected: The panel stayed, because the route confirmed the session with the server instead of trusting the stale atom.
  • order-desk:web.auth.login-opens-workspace
  • unit
  • web
  • authentication
#300
#301 sends a visitor without a session from a workspace to the login page unit high critical

Waiting for the server before deciding who is signed in must not become a way into the workspace: a visitor who holds no session cookie has to be sent to the login form, with the address they asked for kept so that the form can return them to it. The case mounts a workspace route with a stub that answers both the atom and the server call with nobody, so the redirect is the only correct outcome. _Automated by apps/web/test/integration/login-redirect.spec.tsx._

  1. Open /customer without a session. Expected: The login form is rendered.
  2. Inspect the workspace route. Expected: No panel is mounted and no panel data is requested.
  • order-desk:web.auth.signed-out-visits-login
  • unit
  • web
  • authentication
#301

Rendered from the Qase export without JavaScript. Each case links to itself (#case-ID) so a single case can be shared. Back to the demo project. Демо-проект по-русски.