{
  "generated": "2026-11-20",
  "project": "HECHO",
  "source": "Qase export, 2026-11-18",
  "dashboard": "https://app.qase.io/public/dashboard/02b2c322baf3bf995d17f820b8b3d5ffc1e616a2",
  "page": "https://qa.gnikitin.dev/demo/test-cases/",
  "stats": {
    "total": 295,
    "byLayer": {
      "unit": 194,
      "api": 33,
      "e2e": 65,
      "setup": 3
    },
    "highPriority": 190,
    "securityType": 67,
    "automated": 295,
    "topLevelSuites": 17,
    "maxDepth": 3
  },
  "suites": [
    {
      "id": 1,
      "title": "API",
      "path": "API",
      "count": 13,
      "caseIds": [],
      "suites": [
        {
          "id": 2,
          "title": "Error responses",
          "path": "API › Error responses",
          "count": 5,
          "caseIds": [
            1,
            2,
            3,
            4,
            5
          ],
          "suites": []
        },
        {
          "id": 3,
          "title": "Documentation",
          "path": "API › Documentation",
          "count": 2,
          "caseIds": [
            6,
            7
          ],
          "suites": []
        },
        {
          "id": 25,
          "title": "Access control",
          "path": "API › Access control",
          "count": 6,
          "caseIds": [
            69,
            70,
            71,
            72,
            73,
            74
          ],
          "suites": []
        }
      ]
    },
    {
      "id": 4,
      "title": "Orders",
      "path": "Orders",
      "count": 39,
      "caseIds": [],
      "suites": [
        {
          "id": 5,
          "title": "Request validation",
          "path": "Orders › Request validation",
          "count": 2,
          "caseIds": [
            8,
            89
          ],
          "suites": []
        },
        {
          "id": 6,
          "title": "Lifecycle",
          "path": "Orders › Lifecycle",
          "count": 7,
          "caseIds": [
            9,
            10,
            11,
            12,
            13,
            14,
            15
          ],
          "suites": []
        },
        {
          "id": 26,
          "title": "Files",
          "path": "Orders › Files",
          "count": 14,
          "caseIds": [
            75,
            76,
            77,
            78,
            79,
            80,
            82,
            148,
            149,
            150,
            154,
            155,
            156,
            157
          ],
          "suites": []
        },
        {
          "id": 45,
          "title": "Quotas",
          "path": "Orders › Quotas",
          "count": 5,
          "caseIds": [
            143,
            144,
            145,
            146,
            147
          ],
          "suites": []
        },
        {
          "id": 60,
          "title": "Distribution",
          "path": "Orders › Distribution",
          "count": 3,
          "caseIds": [
            181,
            182,
            183
          ],
          "suites": []
        },
        {
          "id": 61,
          "title": "Draft editing",
          "path": "Orders › Draft editing",
          "count": 2,
          "caseIds": [
            184,
            185
          ],
          "suites": []
        },
        {
          "id": 62,
          "title": "Estimates",
          "path": "Orders › Estimates",
          "count": 3,
          "caseIds": [
            186,
            187,
            188
          ],
          "suites": []
        },
        {
          "id": 63,
          "title": "Acceptance and cancellation",
          "path": "Orders › Acceptance and cancellation",
          "count": 2,
          "caseIds": [
            189,
            190
          ],
          "suites": []
        },
        {
          "id": 64,
          "title": "Comments",
          "path": "Orders › Comments",
          "count": 1,
          "caseIds": [
            191
          ],
          "suites": []
        }
      ]
    },
    {
      "id": 7,
      "title": "Invoices",
      "path": "Invoices",
      "count": 18,
      "caseIds": [],
      "suites": [
        {
          "id": 8,
          "title": "Payment reports",
          "path": "Invoices › Payment reports",
          "count": 13,
          "caseIds": [
            16,
            17,
            18,
            107,
            158,
            159,
            164,
            165,
            166,
            167,
            168,
            169,
            197
          ],
          "suites": []
        },
        {
          "id": 30,
          "title": "Request validation",
          "path": "Invoices › Request validation",
          "count": 2,
          "caseIds": [
            92,
            93
          ],
          "suites": []
        },
        {
          "id": 53,
          "title": "Voiding",
          "path": "Invoices › Voiding",
          "count": 3,
          "caseIds": [
            170,
            171,
            172
          ],
          "suites": []
        }
      ]
    },
    {
      "id": 9,
      "title": "Users",
      "path": "Users",
      "count": 18,
      "caseIds": [],
      "suites": [
        {
          "id": 10,
          "title": "Profile",
          "path": "Users › Profile",
          "count": 2,
          "caseIds": [
            19,
            20
          ],
          "suites": []
        },
        {
          "id": 11,
          "title": "Executor rates",
          "path": "Users › Executor rates",
          "count": 3,
          "caseIds": [
            21,
            22,
            23
          ],
          "suites": []
        },
        {
          "id": 31,
          "title": "Request validation",
          "path": "Users › Request validation",
          "count": 3,
          "caseIds": [
            94,
            95,
            96
          ],
          "suites": []
        },
        {
          "id": 35,
          "title": "Accounts",
          "path": "Users › Accounts",
          "count": 5,
          "caseIds": [
            108,
            109,
            110,
            111,
            198
          ],
          "suites": []
        },
        {
          "id": 36,
          "title": "Executors and customers",
          "path": "Users › Executors and customers",
          "count": 5,
          "caseIds": [
            112,
            113,
            114,
            115,
            116
          ],
          "suites": []
        }
      ]
    },
    {
      "id": 12,
      "title": "DevTools",
      "path": "DevTools",
      "count": 25,
      "caseIds": [],
      "suites": [
        {
          "id": 13,
          "title": "Access guard",
          "path": "DevTools › Access guard",
          "count": 5,
          "caseIds": [
            24,
            25,
            26,
            27,
            28
          ],
          "suites": []
        },
        {
          "id": 14,
          "title": "Seed cleanup",
          "path": "DevTools › Seed cleanup",
          "count": 2,
          "caseIds": [
            29,
            30
          ],
          "suites": []
        },
        {
          "id": 15,
          "title": "Reset",
          "path": "DevTools › Reset",
          "count": 4,
          "caseIds": [
            31,
            32,
            33,
            118
          ],
          "suites": []
        },
        {
          "id": 32,
          "title": "Request validation",
          "path": "DevTools › Request validation",
          "count": 2,
          "caseIds": [
            97,
            98
          ],
          "suites": []
        },
        {
          "id": 37,
          "title": "Users",
          "path": "DevTools › Users",
          "count": 8,
          "caseIds": [
            119,
            120,
            121,
            122,
            123,
            124,
            125,
            126
          ],
          "suites": []
        },
        {
          "id": 38,
          "title": "Seed import",
          "path": "DevTools › Seed import",
          "count": 4,
          "caseIds": [
            127,
            128,
            129,
            130
          ],
          "suites": []
        }
      ]
    },
    {
      "id": 16,
      "title": "Orders (integration)",
      "path": "Orders (integration)",
      "count": 21,
      "caseIds": [],
      "suites": [
        {
          "id": 17,
          "title": "Lifecycle",
          "path": "Orders (integration) › Lifecycle",
          "count": 16,
          "caseIds": [
            34,
            35,
            36,
            37,
            38,
            39,
            40,
            41
          ],
          "suites": [
            {
              "id": 18,
              "title": "Access control",
              "path": "Orders (integration) › Lifecycle › Access control",
              "count": 5,
              "caseIds": [
                42,
                43,
                44,
                45,
                46
              ],
              "suites": []
            },
            {
              "id": 19,
              "title": "Request validation",
              "path": "Orders (integration) › Lifecycle › Request validation",
              "count": 3,
              "caseIds": [
                47,
                48,
                49
              ],
              "suites": []
            }
          ]
        },
        {
          "id": 46,
          "title": "Quotas",
          "path": "Orders (integration) › Quotas",
          "count": 1,
          "caseIds": [
            151
          ],
          "suites": []
        },
        {
          "id": 51,
          "title": "Attachments",
          "path": "Orders (integration) › Attachments",
          "count": 1,
          "caseIds": [
            161
          ],
          "suites": []
        },
        {
          "id": 65,
          "title": "Administration",
          "path": "Orders (integration) › Administration",
          "count": 2,
          "caseIds": [
            192,
            193
          ],
          "suites": []
        },
        {
          "id": 66,
          "title": "Time tracking",
          "path": "Orders (integration) › Time tracking",
          "count": 1,
          "caseIds": [
            194
          ],
          "suites": []
        }
      ]
    },
    {
      "id": 20,
      "title": "Tooling",
      "path": "Tooling",
      "count": 14,
      "caseIds": [],
      "suites": [
        {
          "id": 21,
          "title": "Qase manifest",
          "path": "Tooling › Qase manifest",
          "count": 7,
          "caseIds": [
            50,
            51,
            52,
            60,
            61,
            67,
            117
          ],
          "suites": []
        },
        {
          "id": 22,
          "title": "Qase sync",
          "path": "Tooling › Qase sync",
          "count": 6,
          "caseIds": [
            63,
            64,
            65,
            66,
            68,
            210
          ],
          "suites": []
        },
        {
          "id": 41,
          "title": "Qase enums",
          "path": "Tooling › Qase enums",
          "count": 1,
          "caseIds": [
            134
          ],
          "suites": []
        }
      ]
    },
    {
      "id": 23,
      "title": "Archive",
      "path": "Archive",
      "count": 3,
      "caseIds": [],
      "suites": [
        {
          "id": 24,
          "title": "Tooling",
          "path": "Archive › Tooling",
          "count": 0,
          "caseIds": [],
          "suites": []
        },
        {
          "id": 50,
          "title": "Orders",
          "path": "Archive › Orders",
          "count": 2,
          "caseIds": [
            81,
            83
          ],
          "suites": []
        },
        {
          "id": 67,
          "title": "Deployment",
          "path": "Archive › Deployment",
          "count": 1,
          "caseIds": [
            136
          ],
          "suites": []
        }
      ]
    },
    {
      "id": 27,
      "title": "Categories",
      "path": "Categories",
      "count": 7,
      "caseIds": [],
      "suites": [
        {
          "id": 28,
          "title": "Catalogue",
          "path": "Categories › Catalogue",
          "count": 5,
          "caseIds": [
            84,
            85,
            86,
            87,
            88
          ],
          "suites": []
        },
        {
          "id": 29,
          "title": "Request validation",
          "path": "Categories › Request validation",
          "count": 2,
          "caseIds": [
            90,
            91
          ],
          "suites": []
        }
      ]
    },
    {
      "id": 33,
      "title": "Storage",
      "path": "Storage",
      "count": 9,
      "caseIds": [],
      "suites": [
        {
          "id": 34,
          "title": "Objects",
          "path": "Storage › Objects",
          "count": 9,
          "caseIds": [
            99,
            100,
            101,
            102,
            103,
            104,
            105,
            106,
            132
          ],
          "suites": []
        }
      ]
    },
    {
      "id": 39,
      "title": "Auth",
      "path": "Auth",
      "count": 18,
      "caseIds": [],
      "suites": [
        {
          "id": 40,
          "title": "Configuration",
          "path": "Auth › Configuration",
          "count": 2,
          "caseIds": [
            131,
            133
          ],
          "suites": []
        },
        {
          "id": 44,
          "title": "Rate limiting",
          "path": "Auth › Rate limiting",
          "count": 5,
          "caseIds": [
            138,
            139,
            140,
            141,
            142
          ],
          "suites": []
        },
        {
          "id": 68,
          "title": "Registration",
          "path": "Auth › Registration",
          "count": 2,
          "caseIds": [
            195,
            196
          ],
          "suites": []
        },
        {
          "id": 136,
          "title": "Administrator provisioning",
          "path": "Auth › Administrator provisioning",
          "count": 7,
          "caseIds": [
            285,
            286,
            287,
            288,
            289,
            290,
            291
          ],
          "suites": []
        },
        {
          "id": 137,
          "title": "Administrator credentials",
          "path": "Auth › Administrator credentials",
          "count": 2,
          "caseIds": [
            292,
            293
          ],
          "suites": []
        }
      ]
    },
    {
      "id": 42,
      "title": "Deployment",
      "path": "Deployment",
      "count": 5,
      "caseIds": [],
      "suites": [
        {
          "id": 43,
          "title": "Client address",
          "path": "Deployment › Client address",
          "count": 2,
          "caseIds": [
            135,
            137
          ],
          "suites": []
        },
        {
          "id": 49,
          "title": "Response headers",
          "path": "Deployment › Response headers",
          "count": 1,
          "caseIds": [
            160
          ],
          "suites": []
        },
        {
          "id": 52,
          "title": "Container hardening",
          "path": "Deployment › Container hardening",
          "count": 2,
          "caseIds": [
            162,
            163
          ],
          "suites": []
        }
      ]
    },
    {
      "id": 47,
      "title": "Files",
      "path": "Files",
      "count": 2,
      "caseIds": [],
      "suites": [
        {
          "id": 48,
          "title": "Content type",
          "path": "Files › Content type",
          "count": 2,
          "caseIds": [
            152,
            153
          ],
          "suites": []
        }
      ]
    },
    {
      "id": 54,
      "title": "Invoices (integration)",
      "path": "Invoices (integration)",
      "count": 9,
      "caseIds": [],
      "suites": [
        {
          "id": 55,
          "title": "Issuing",
          "path": "Invoices (integration) › Issuing",
          "count": 2,
          "caseIds": [
            173,
            174
          ],
          "suites": []
        },
        {
          "id": 56,
          "title": "Voiding",
          "path": "Invoices (integration) › Voiding",
          "count": 2,
          "caseIds": [
            175,
            176
          ],
          "suites": []
        },
        {
          "id": 57,
          "title": "Payment review",
          "path": "Invoices (integration) › Payment review",
          "count": 3,
          "caseIds": [
            177,
            178,
            199
          ],
          "suites": []
        },
        {
          "id": 58,
          "title": "Completion",
          "path": "Invoices (integration) › Completion",
          "count": 1,
          "caseIds": [
            179
          ],
          "suites": []
        },
        {
          "id": 59,
          "title": "Documents",
          "path": "Invoices (integration) › Documents",
          "count": 1,
          "caseIds": [
            180
          ],
          "suites": []
        }
      ]
    },
    {
      "id": 69,
      "title": "E2E",
      "path": "E2E",
      "count": 65,
      "caseIds": [],
      "suites": [
        {
          "id": 70,
          "title": "Orders",
          "path": "E2E › Orders",
          "count": 13,
          "caseIds": [],
          "suites": [
            {
              "id": 71,
              "title": "Creating",
              "path": "E2E › Orders › Creating",
              "count": 3,
              "caseIds": [
                200,
                201,
                202
              ],
              "suites": []
            },
            {
              "id": 72,
              "title": "Submitting",
              "path": "E2E › Orders › Submitting",
              "count": 3,
              "caseIds": [
                203,
                204,
                206
              ],
              "suites": []
            },
            {
              "id": 73,
              "title": "Guards",
              "path": "E2E › Orders › Guards",
              "count": 2,
              "caseIds": [
                205,
                241
              ],
              "suites": []
            },
            {
              "id": 93,
              "title": "Claiming",
              "path": "E2E › Orders › Claiming",
              "count": 3,
              "caseIds": [
                239,
                240,
                242
              ],
              "suites": []
            },
            {
              "id": 94,
              "title": "Estimating",
              "path": "E2E › Orders › Estimating",
              "count": 2,
              "caseIds": [
                243,
                244
              ],
              "suites": []
            }
          ]
        },
        {
          "id": 83,
          "title": "Customer orders",
          "path": "E2E › Customer orders",
          "count": 12,
          "caseIds": [],
          "suites": [
            {
              "id": 84,
              "title": "Editing",
              "path": "E2E › Customer orders › Editing",
              "count": 1,
              "caseIds": [
                227
              ],
              "suites": []
            },
            {
              "id": 85,
              "title": "Guards",
              "path": "E2E › Customer orders › Guards",
              "count": 2,
              "caseIds": [
                228,
                231
              ],
              "suites": []
            },
            {
              "id": 86,
              "title": "Cancellation",
              "path": "E2E › Customer orders › Cancellation",
              "count": 2,
              "caseIds": [
                229,
                230
              ],
              "suites": []
            },
            {
              "id": 87,
              "title": "Paging",
              "path": "E2E › Customer orders › Paging",
              "count": 1,
              "caseIds": [
                232
              ],
              "suites": []
            },
            {
              "id": 88,
              "title": "Empty states",
              "path": "E2E › Customer orders › Empty states",
              "count": 1,
              "caseIds": [
                233
              ],
              "suites": []
            },
            {
              "id": 89,
              "title": "Card over list",
              "path": "E2E › Customer orders › Card over list",
              "count": 1,
              "caseIds": [
                234
              ],
              "suites": []
            },
            {
              "id": 90,
              "title": "Visibility",
              "path": "E2E › Customer orders › Visibility",
              "count": 1,
              "caseIds": [
                235
              ],
              "suites": []
            },
            {
              "id": 91,
              "title": "Comments",
              "path": "E2E › Customer orders › Comments",
              "count": 1,
              "caseIds": [
                236
              ],
              "suites": []
            },
            {
              "id": 92,
              "title": "Attachments",
              "path": "E2E › Customer orders › Attachments",
              "count": 2,
              "caseIds": [
                237,
                238
              ],
              "suites": []
            }
          ]
        },
        {
          "id": 95,
          "title": "Executor",
          "path": "E2E › Executor",
          "count": 4,
          "caseIds": [],
          "suites": [
            {
              "id": 96,
              "title": "Declining",
              "path": "E2E › Executor › Declining",
              "count": 1,
              "caseIds": [
                245
              ],
              "suites": []
            },
            {
              "id": 97,
              "title": "Guards",
              "path": "E2E › Executor › Guards",
              "count": 1,
              "caseIds": [
                246
              ],
              "suites": []
            },
            {
              "id": 98,
              "title": "Work log",
              "path": "E2E › Executor › Work log",
              "count": 2,
              "caseIds": [
                247,
                248
              ],
              "suites": []
            }
          ]
        },
        {
          "id": 99,
          "title": "Estimates",
          "path": "E2E › Estimates",
          "count": 4,
          "caseIds": [],
          "suites": [
            {
              "id": 100,
              "title": "Accepting",
              "path": "E2E › Estimates › Accepting",
              "count": 1,
              "caseIds": [
                249
              ],
              "suites": []
            },
            {
              "id": 101,
              "title": "Rejecting",
              "path": "E2E › Estimates › Rejecting",
              "count": 1,
              "caseIds": [
                250
              ],
              "suites": []
            },
            {
              "id": 102,
              "title": "Proposal visibility",
              "path": "E2E › Estimates › Proposal visibility",
              "count": 1,
              "caseIds": [
                251
              ],
              "suites": []
            },
            {
              "id": 103,
              "title": "Guards",
              "path": "E2E › Estimates › Guards",
              "count": 1,
              "caseIds": [
                252
              ],
              "suites": []
            }
          ]
        },
        {
          "id": 104,
          "title": "Review",
          "path": "E2E › Review",
          "count": 5,
          "caseIds": [],
          "suites": [
            {
              "id": 105,
              "title": "Submitting",
              "path": "E2E › Review › Submitting",
              "count": 1,
              "caseIds": [
                253
              ],
              "suites": []
            },
            {
              "id": 106,
              "title": "Accepting",
              "path": "E2E › Review › Accepting",
              "count": 1,
              "caseIds": [
                254
              ],
              "suites": []
            },
            {
              "id": 107,
              "title": "Revision requests",
              "path": "E2E › Review › Revision requests",
              "count": 1,
              "caseIds": [
                255
              ],
              "suites": []
            },
            {
              "id": 108,
              "title": "Resuming",
              "path": "E2E › Review › Resuming",
              "count": 1,
              "caseIds": [
                256
              ],
              "suites": []
            },
            {
              "id": 109,
              "title": "Guards",
              "path": "E2E › Review › Guards",
              "count": 1,
              "caseIds": [
                257
              ],
              "suites": []
            }
          ]
        },
        {
          "id": 110,
          "title": "Money",
          "path": "E2E › Money",
          "count": 7,
          "caseIds": [],
          "suites": [
            {
              "id": 111,
              "title": "Invoicing",
              "path": "E2E › Money › Invoicing",
              "count": 2,
              "caseIds": [
                258,
                263
              ],
              "suites": []
            },
            {
              "id": 112,
              "title": "Payment reports",
              "path": "E2E › Money › Payment reports",
              "count": 1,
              "caseIds": [
                259
              ],
              "suites": []
            },
            {
              "id": 113,
              "title": "Payment review",
              "path": "E2E › Money › Payment review",
              "count": 2,
              "caseIds": [
                260,
                262
              ],
              "suites": []
            },
            {
              "id": 114,
              "title": "Completion",
              "path": "E2E › Money › Completion",
              "count": 1,
              "caseIds": [
                261
              ],
              "suites": []
            },
            {
              "id": 115,
              "title": "Guards",
              "path": "E2E › Money › Guards",
              "count": 1,
              "caseIds": [
                264
              ],
              "suites": []
            }
          ]
        },
        {
          "id": 116,
          "title": "Administration",
          "path": "E2E › Administration",
          "count": 8,
          "caseIds": [],
          "suites": [
            {
              "id": 117,
              "title": "Assignment",
              "path": "E2E › Administration › Assignment",
              "count": 2,
              "caseIds": [
                265,
                266
              ],
              "suites": []
            },
            {
              "id": 118,
              "title": "Guards",
              "path": "E2E › Administration › Guards",
              "count": 1,
              "caseIds": [
                267
              ],
              "suites": []
            },
            {
              "id": 119,
              "title": "Accounts",
              "path": "E2E › Administration › Accounts",
              "count": 3,
              "caseIds": [
                268,
                269,
                270
              ],
              "suites": []
            },
            {
              "id": 120,
              "title": "Categories",
              "path": "E2E › Administration › Categories",
              "count": 2,
              "caseIds": [
                271,
                272
              ],
              "suites": []
            }
          ]
        },
        {
          "id": 121,
          "title": "Profile",
          "path": "E2E › Profile",
          "count": 5,
          "caseIds": [],
          "suites": [
            {
              "id": 122,
              "title": "Name",
              "path": "E2E › Profile › Name",
              "count": 1,
              "caseIds": [
                273
              ],
              "suites": []
            },
            {
              "id": 123,
              "title": "Rate (read)",
              "path": "E2E › Profile › Rate (read)",
              "count": 1,
              "caseIds": [
                274
              ],
              "suites": []
            },
            {
              "id": 124,
              "title": "Role boundary",
              "path": "E2E › Profile › Role boundary",
              "count": 1,
              "caseIds": [
                275
              ],
              "suites": []
            },
            {
              "id": 125,
              "title": "Password",
              "path": "E2E › Profile › Password",
              "count": 1,
              "caseIds": [
                276
              ],
              "suites": []
            },
            {
              "id": 126,
              "title": "Rejections",
              "path": "E2E › Profile › Rejections",
              "count": 1,
              "caseIds": [
                277
              ],
              "suites": []
            }
          ]
        },
        {
          "id": 127,
          "title": "Public + auth",
          "path": "E2E › Public + auth",
          "count": 6,
          "caseIds": [],
          "suites": [
            {
              "id": 128,
              "title": "Sign-in",
              "path": "E2E › Public + auth › Sign-in",
              "count": 1,
              "caseIds": [
                278
              ],
              "suites": []
            },
            {
              "id": 129,
              "title": "Registration",
              "path": "E2E › Public + auth › Registration",
              "count": 1,
              "caseIds": [
                279
              ],
              "suites": []
            },
            {
              "id": 130,
              "title": "Sign-out",
              "path": "E2E › Public + auth › Sign-out",
              "count": 1,
              "caseIds": [
                280
              ],
              "suites": []
            },
            {
              "id": 131,
              "title": "Landing",
              "path": "E2E › Public + auth › Landing",
              "count": 1,
              "caseIds": [
                281
              ],
              "suites": []
            },
            {
              "id": 132,
              "title": "Session replacement",
              "path": "E2E › Public + auth › Session replacement",
              "count": 1,
              "caseIds": [
                282
              ],
              "suites": []
            },
            {
              "id": 133,
              "title": "Rejections",
              "path": "E2E › Public + auth › Rejections",
              "count": 1,
              "caseIds": [
                283
              ],
              "suites": []
            }
          ]
        },
        {
          "id": 134,
          "title": "Access control",
          "path": "E2E › Access control",
          "count": 1,
          "caseIds": [],
          "suites": [
            {
              "id": 135,
              "title": "Screen guard",
              "path": "E2E › Access control › Screen guard",
              "count": 1,
              "caseIds": [
                284
              ],
              "suites": []
            }
          ]
        }
      ]
    },
    {
      "id": 74,
      "title": "setup",
      "path": "setup",
      "count": 3,
      "caseIds": [],
      "suites": [
        {
          "id": 75,
          "title": "setup/auth.setup.ts",
          "path": "setup › setup/auth.setup.ts",
          "count": 3,
          "caseIds": [
            207,
            208,
            209
          ],
          "suites": []
        }
      ]
    },
    {
      "id": 76,
      "title": "Web",
      "path": "Web",
      "count": 26,
      "caseIds": [],
      "suites": [
        {
          "id": 77,
          "title": "Orders list",
          "path": "Web › Orders list",
          "count": 5,
          "caseIds": [
            211,
            212,
            213,
            214,
            294
          ],
          "suites": []
        },
        {
          "id": 78,
          "title": "API client",
          "path": "Web › API client",
          "count": 2,
          "caseIds": [
            215,
            216
          ],
          "suites": []
        },
        {
          "id": 79,
          "title": "Localization",
          "path": "Web › Localization",
          "count": 5,
          "caseIds": [
            217,
            218,
            219,
            295,
            296
          ],
          "suites": []
        },
        {
          "id": 80,
          "title": "Motion",
          "path": "Web › Motion",
          "count": 3,
          "caseIds": [
            220,
            221,
            222
          ],
          "suites": []
        },
        {
          "id": 81,
          "title": "Orders page",
          "path": "Web › Orders page",
          "count": 5,
          "caseIds": [
            223,
            224,
            225,
            298,
            299
          ],
          "suites": []
        },
        {
          "id": 82,
          "title": "Executor panel",
          "path": "Web › Executor panel",
          "count": 3,
          "caseIds": [
            226,
            302,
            303
          ],
          "suites": []
        },
        {
          "id": 138,
          "title": "Landing page",
          "path": "Web › Landing page",
          "count": 1,
          "caseIds": [
            297
          ],
          "suites": []
        },
        {
          "id": 139,
          "title": "Authentication",
          "path": "Web › Authentication",
          "count": 2,
          "caseIds": [
            300,
            301
          ],
          "suites": []
        }
      ]
    }
  ],
  "cases": [
    {
      "id": 1,
      "title": "adds a stable code and preserves validation messages",
      "description": "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.\n\n_Automated by `src/common/api-exception.filter.spec.ts`._",
      "priority": "high",
      "severity": "normal",
      "type": "functional",
      "layer": "unit",
      "automation": "automated",
      "tags": [
        "order-desk:api.error-responses.validation-code",
        "unit",
        "api",
        "error-responses"
      ],
      "suite": "API › Error responses",
      "url": "https://qa.gnikitin.dev/demo/test-cases/#case-1",
      "steps": [
        {
          "position": 1,
          "action": "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\"`."
        }
      ]
    },
    {
      "id": 2,
      "title": "distinguishes forbidden operations from missing records",
      "description": "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.\n\n_Automated by `src/common/api-exception.filter.spec.ts`._",
      "priority": "high",
      "severity": "major",
      "type": "functional",
      "layer": "unit",
      "automation": "automated",
      "tags": [
        "order-desk:api.error-responses.forbidden-vs-not-found",
        "unit",
        "api",
        "error-responses"
      ],
      "suite": "API › Error responses",
      "url": "https://qa.gnikitin.dev/demo/test-cases/#case-2",
      "steps": [
        {
          "position": 1,
          "action": "Build an error response from a `ForbiddenException`.",
          "expected": "The response carries `code: \"FORBIDDEN\"`."
        },
        {
          "position": 2,
          "action": "Build an error response from a `NotFoundException`.",
          "expected": "The response carries `code: \"NOT_FOUND\"`, distinct from the forbidden code."
        }
      ]
    },
    {
      "id": 3,
      "title": "does not expose unexpected server error details",
      "description": "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.\n\n_Automated by `src/common/api-exception.filter.spec.ts`._",
      "priority": "high",
      "severity": "critical",
      "type": "security",
      "layer": "unit",
      "automation": "automated",
      "tags": [
        "order-desk:api.error-responses.hides-server-details",
        "unit",
        "api",
        "error-responses"
      ],
      "suite": "API › Error responses",
      "url": "https://qa.gnikitin.dev/demo/test-cases/#case-3",
      "steps": [
        {
          "position": 1,
          "action": "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."
        }
      ]
    },
    {
      "id": 4,
      "title": "converts oversized uploads into a client error",
      "description": "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.\n\n_Automated by `src/common/api-exception.filter.spec.ts`._",
      "priority": "medium",
      "severity": "normal",
      "type": "functional",
      "layer": "unit",
      "automation": "automated",
      "tags": [
        "order-desk:api.error-responses.oversized-upload",
        "unit",
        "api",
        "error-responses"
      ],
      "suite": "API › Error responses",
      "url": "https://qa.gnikitin.dev/demo/test-cases/#case-4",
      "steps": [
        {
          "position": 1,
          "action": "Build an error response from a `MulterError` with `code: \"LIMIT_FILE_SIZE\"`.",
          "expected": "The response is `413` with `code: \"PAYLOAD_TOO_LARGE\"`."
        }
      ]
    },
    {
      "id": 5,
      "title": "maps database uniqueness violations to a conflict response",
      "description": "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.\n\n_Automated by `src/common/api-exception.filter.spec.ts`._",
      "priority": "medium",
      "severity": "major",
      "type": "functional",
      "layer": "unit",
      "automation": "automated",
      "tags": [
        "order-desk:api.error-responses.unique-violation",
        "unit",
        "api",
        "error-responses"
      ],
      "suite": "API › Error responses",
      "url": "https://qa.gnikitin.dev/demo/test-cases/#case-5",
      "steps": [
        {
          "position": 1,
          "action": "Build an error response from a `PrismaClientKnownRequestError` with `code: \"P2002\"`.",
          "expected": "The response is `409` with `code: \"CONFLICT\"`."
        }
      ]
    },
    {
      "id": 6,
      "title": "removes devtools routes and schemas from the document while the feature flag is off",
      "description": "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.\n\n_Automated by `src/common/swagger-document.spec.ts`._",
      "priority": "medium",
      "severity": "normal",
      "type": "security",
      "layer": "unit",
      "automation": "automated",
      "tags": [
        "order-desk:api.documentation.hides-devtools",
        "unit",
        "api",
        "documentation"
      ],
      "suite": "API › Documentation",
      "url": "https://qa.gnikitin.dev/demo/test-cases/#case-6",
      "steps": [
        {
          "position": 1,
          "action": "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."
        }
      ]
    },
    {
      "id": 7,
      "title": "keeps the devtools routes and schemas once the feature flag is on",
      "description": "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.\n\n_Automated by `src/common/swagger-document.spec.ts`._",
      "priority": "low",
      "severity": "normal",
      "type": "functional",
      "layer": "unit",
      "automation": "automated",
      "tags": [
        "order-desk:api.documentation.keeps-devtools",
        "unit",
        "api",
        "documentation"
      ],
      "suite": "API › Documentation",
      "url": "https://qa.gnikitin.dev/demo/test-cases/#case-7",
      "steps": [
        {
          "position": 1,
          "action": "Call `hideDisabledDevTools(document, true)` on the same fixture.",
          "expected": "All three paths and all three schemas are still present, in their original order."
        }
      ]
    },
    {
      "id": 69,
      "title": "refuses a request without a session",
      "description": "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.\n\n_Automated by `src/auth/session.guard.spec.ts`._",
      "priority": "high",
      "severity": "critical",
      "type": "security",
      "layer": "unit",
      "automation": "automated",
      "tags": [
        "order-desk:auth.session-guard.rejects-anonymous",
        "unit",
        "api",
        "access-control"
      ],
      "suite": "API › Access control",
      "url": "https://qa.gnikitin.dev/demo/test-cases/#case-69",
      "steps": [
        {
          "position": 1,
          "action": "Call `canActivate` while the session lookup resolves `null`.",
          "expected": "The guard throws `UnauthorizedException` and the request handler never runs."
        }
      ]
    },
    {
      "id": 70,
      "title": "refuses a session whose account was deactivated",
      "description": "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.\n\n_Automated by `src/auth/session.guard.spec.ts`._",
      "priority": "high",
      "severity": "critical",
      "type": "security",
      "layer": "unit",
      "automation": "automated",
      "tags": [
        "order-desk:auth.session-guard.rejects-deactivated-account",
        "unit",
        "api",
        "access-control"
      ],
      "suite": "API › Access control",
      "url": "https://qa.gnikitin.dev/demo/test-cases/#case-70",
      "steps": [
        {
          "position": 1,
          "action": "Call `canActivate` with that session.",
          "expected": "The guard throws `UnauthorizedException(\"This account is deactivated\")`."
        }
      ]
    },
    {
      "id": 71,
      "title": "resolves the session from the incoming request headers",
      "description": "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.\n\n_Automated by `src/auth/session.guard.spec.ts`._",
      "priority": "medium",
      "severity": "major",
      "type": "functional",
      "layer": "unit",
      "automation": "automated",
      "tags": [
        "order-desk:auth.session-guard.forwards-request-headers",
        "unit",
        "api",
        "access-control"
      ],
      "suite": "API › Access control",
      "url": "https://qa.gnikitin.dev/demo/test-cases/#case-71",
      "steps": [
        {
          "position": 1,
          "action": "Call `canActivate` for a request carrying `authorization: Bearer <token>`.",
          "expected": "The session lookup receives a `Headers` instance that still carries the original `authorization` value."
        }
      ]
    },
    {
      "id": 72,
      "title": "refuses a role outside the decorator's list",
      "description": "`@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.\n\n_Automated by `src/auth/session.guard.spec.ts`._",
      "priority": "high",
      "severity": "critical",
      "type": "security",
      "layer": "unit",
      "automation": "automated",
      "tags": [
        "order-desk:auth.session-guard.enforces-required-role",
        "unit",
        "api",
        "access-control"
      ],
      "suite": "API › Access control",
      "url": "https://qa.gnikitin.dev/demo/test-cases/#case-72",
      "steps": [
        {
          "position": 1,
          "action": "Call `canActivate` with an active executor session.",
          "expected": "The guard throws `ForbiddenException`, distinct from the `401` of a missing session."
        },
        {
          "position": 2,
          "action": "Call `canActivate` with an active session that carries no role at all.",
          "expected": "The guard throws the same `ForbiddenException`."
        }
      ]
    },
    {
      "id": 73,
      "title": "admits a role from the decorator's list",
      "description": "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.\n\n_Automated by `src/auth/session.guard.spec.ts`._",
      "priority": "high",
      "severity": "major",
      "type": "functional",
      "layer": "unit",
      "automation": "automated",
      "tags": [
        "order-desk:auth.session-guard.admits-required-role",
        "unit",
        "api",
        "access-control"
      ],
      "suite": "API › Access control",
      "url": "https://qa.gnikitin.dev/demo/test-cases/#case-73",
      "steps": [
        {
          "position": 1,
          "action": "Call `canActivate`.",
          "expected": "The guard returns `true` and exposes the session as `request.authSession`."
        }
      ]
    },
    {
      "id": 74,
      "title": "admits any active user when no role is required",
      "description": "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\".\n\n_Automated by `src/auth/session.guard.spec.ts`._",
      "priority": "medium",
      "severity": "normal",
      "type": "functional",
      "layer": "unit",
      "automation": "automated",
      "tags": [
        "order-desk:auth.session-guard.allows-any-active-user",
        "unit",
        "api",
        "access-control"
      ],
      "suite": "API › Access control",
      "url": "https://qa.gnikitin.dev/demo/test-cases/#case-74",
      "steps": [
        {
          "position": 1,
          "action": "Call `canActivate` on an undecorated handler with an active customer session.",
          "expected": "The guard returns `true`."
        }
      ]
    },
    {
      "id": 8,
      "title": "rejects required strings that contain only whitespace",
      "description": "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.\n\n_Automated by `src/orders/orders.dto.spec.ts`._",
      "priority": "high",
      "severity": "normal",
      "type": "functional",
      "layer": "unit",
      "automation": "automated",
      "tags": [
        "order-desk:orders.validation.whitespace-title",
        "unit",
        "orders",
        "request-validation"
      ],
      "suite": "Orders › Request validation",
      "url": "https://qa.gnikitin.dev/demo/test-cases/#case-8",
      "steps": [
        {
          "position": 1,
          "action": "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`."
        }
      ]
    },
    {
      "id": 89,
      "title": "keeps the cancellation reason optional but bounded",
      "description": "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.\n\n_Automated by `src/orders/orders.dto.spec.ts`._",
      "priority": "medium",
      "severity": "normal",
      "type": "functional",
      "layer": "unit",
      "automation": "automated",
      "tags": [
        "order-desk:orders.validation.cancel-reason",
        "unit",
        "orders",
        "request-validation"
      ],
      "suite": "Orders › Request validation",
      "url": "https://qa.gnikitin.dev/demo/test-cases/#case-89",
      "steps": [
        {
          "position": 1,
          "action": "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."
        },
        {
          "position": 2,
          "action": "Validate `reason: 42`.",
          "expected": "The result reports an error for `reason`."
        }
      ]
    },
    {
      "id": 9,
      "title": "shows every role only the orders it may see",
      "description": "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.\n\n_Automated by `src/orders/orders.service.spec.ts`._",
      "priority": "high",
      "severity": "critical",
      "type": "security",
      "layer": "unit",
      "automation": "automated",
      "tags": [
        "order-desk:orders.lifecycle.executor-list-scope",
        "unit",
        "orders",
        "lifecycle"
      ],
      "suite": "Orders › Lifecycle",
      "url": "https://qa.gnikitin.dev/demo/test-cases/#case-9",
      "steps": [
        {
          "position": 1,
          "action": "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."
        },
        {
          "position": 2,
          "action": "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."
        }
      ]
    },
    {
      "id": 10,
      "title": "rejects customers who try to access another customer's order",
      "description": "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.\n\n_Automated by `src/orders/orders.service.spec.ts`._",
      "priority": "high",
      "severity": "critical",
      "type": "security",
      "layer": "unit",
      "automation": "automated",
      "tags": [
        "order-desk:orders.lifecycle.foreign-order-access",
        "unit",
        "orders",
        "lifecycle"
      ],
      "suite": "Orders › Lifecycle",
      "url": "https://qa.gnikitin.dev/demo/test-cases/#case-10",
      "steps": [
        {
          "position": 1,
          "action": "Call `get(\"order-1\")` as `customer-1` with the `CUSTOMER` role.",
          "expected": "The call rejects with `ForbiddenException` and returns no order payload."
        }
      ]
    },
    {
      "id": 11,
      "title": "submits unassigned drafts to the distribution pool and records the transition",
      "description": "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.\n\n_Automated by `src/orders/orders.service.spec.ts`._",
      "priority": "high",
      "severity": "critical",
      "type": "functional",
      "layer": "unit",
      "automation": "automated",
      "tags": [
        "order-desk:orders.lifecycle.submit-to-pool",
        "unit",
        "orders",
        "lifecycle"
      ],
      "suite": "Orders › Lifecycle",
      "url": "https://qa.gnikitin.dev/demo/test-cases/#case-11",
      "steps": [
        {
          "position": 1,
          "action": "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."
        },
        {
          "position": 2,
          "action": "Inspect the history written by the same call.",
          "expected": "One `OrderStatusHistory` row records `changedById: customer-1`, `fromStatus: NEW` and `toStatus: WAITING_DISTRIBUTION`."
        }
      ]
    },
    {
      "id": 12,
      "title": "requires a comment when a customer rejects an estimate",
      "description": "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.\n\n_Automated by `src/orders/orders.service.spec.ts`._",
      "priority": "high",
      "severity": "major",
      "type": "functional",
      "layer": "unit",
      "automation": "automated",
      "tags": [
        "order-desk:orders.lifecycle.reject-estimate-comment",
        "unit",
        "orders",
        "lifecycle"
      ],
      "suite": "Orders › Lifecycle",
      "url": "https://qa.gnikitin.dev/demo/test-cases/#case-12",
      "steps": [
        {
          "position": 1,
          "action": "Call `respondToEstimate` with `{ accepted: false }` and no comment.",
          "expected": "The call rejects with `BadRequestException` and no transaction is started."
        }
      ]
    },
    {
      "id": 13,
      "title": "does not allow cancelling an invoiced order",
      "description": "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.\n\n_Automated by `src/orders/orders.service.spec.ts`._",
      "priority": "medium",
      "severity": "major",
      "type": "functional",
      "layer": "unit",
      "automation": "automated",
      "tags": [
        "order-desk:orders.lifecycle.cancel-after-invoice",
        "unit",
        "orders",
        "lifecycle"
      ],
      "suite": "Orders › Lifecycle",
      "url": "https://qa.gnikitin.dev/demo/test-cases/#case-13",
      "steps": [
        {
          "position": 1,
          "action": "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."
        }
      ]
    },
    {
      "id": 14,
      "title": "does not complete an order before payment is confirmed",
      "description": "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.\n\n_Automated by `src/orders/orders.service.spec.ts`._",
      "priority": "high",
      "severity": "critical",
      "type": "functional",
      "layer": "unit",
      "automation": "automated",
      "tags": [
        "order-desk:orders.lifecycle.complete-requires-payment",
        "unit",
        "orders",
        "lifecycle"
      ],
      "suite": "Orders › Lifecycle",
      "url": "https://qa.gnikitin.dev/demo/test-cases/#case-14",
      "steps": [
        {
          "position": 1,
          "action": "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."
        }
      ]
    },
    {
      "id": 15,
      "title": "completes an order only after a paid invoice exists",
      "description": "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.\n\n_Automated by `src/orders/orders.service.spec.ts`._",
      "priority": "high",
      "severity": "critical",
      "type": "functional",
      "layer": "unit",
      "automation": "automated",
      "tags": [
        "order-desk:orders.lifecycle.complete-after-payment",
        "unit",
        "orders",
        "lifecycle"
      ],
      "suite": "Orders › Lifecycle",
      "url": "https://qa.gnikitin.dev/demo/test-cases/#case-15",
      "steps": [
        {
          "position": 1,
          "action": "Call `complete` as an administrator.",
          "expected": "The order returns as `COMPLETED`, and the stored row carries `status: COMPLETED` with a `completedAt` date."
        },
        {
          "position": 2,
          "action": "Inspect the history written by the same call.",
          "expected": "One row records `fromStatus: INVOICE_PAID` and `toStatus: COMPLETED`."
        }
      ]
    },
    {
      "id": 75,
      "title": "refuses an upload without a file",
      "description": "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.\n\n_Automated by `src/orders/order-files.service.spec.ts`._",
      "priority": "high",
      "severity": "major",
      "type": "functional",
      "layer": "unit",
      "automation": "automated",
      "tags": [
        "order-desk:orders.files.requires-file",
        "unit",
        "orders",
        "files"
      ],
      "suite": "Orders › Files",
      "url": "https://qa.gnikitin.dev/demo/test-cases/#case-75",
      "steps": [
        {
          "position": 1,
          "action": "Call `upload` with `file: undefined`.",
          "expected": "The service throws `BadRequestException(\"A file is required\")` before checking access or touching the storage."
        }
      ]
    },
    {
      "id": 76,
      "title": "refuses a file above the 1 MB limit",
      "description": "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.\n\n_Automated by `src/orders/order-files.service.spec.ts`._",
      "priority": "high",
      "severity": "major",
      "type": "functional",
      "layer": "unit",
      "automation": "automated",
      "tags": [
        "order-desk:orders.files.rejects-oversized-file",
        "unit",
        "orders",
        "files"
      ],
      "suite": "Orders › Files",
      "url": "https://qa.gnikitin.dev/demo/test-cases/#case-76",
      "steps": [
        {
          "position": 1,
          "action": "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`."
        }
      ]
    },
    {
      "id": 77,
      "title": "accepts a file of exactly the 1 MB limit",
      "description": "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.\n\n_Automated by `src/orders/order-files.service.spec.ts`._",
      "priority": "medium",
      "severity": "normal",
      "type": "functional",
      "layer": "unit",
      "automation": "automated",
      "tags": [
        "order-desk:orders.files.accepts-limit-size",
        "unit",
        "orders",
        "files"
      ],
      "suite": "Orders › Files",
      "url": "https://qa.gnikitin.dev/demo/test-cases/#case-77",
      "steps": [
        {
          "position": 1,
          "action": "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."
        }
      ]
    },
    {
      "id": 78,
      "title": "refuses an upload before it reaches the storage",
      "description": "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.\n\n_Automated by `src/orders/order-files.service.spec.ts`._",
      "priority": "high",
      "severity": "critical",
      "type": "security",
      "layer": "unit",
      "automation": "automated",
      "tags": [
        "order-desk:orders.files.checks-upload-access-first",
        "unit",
        "orders",
        "files"
      ],
      "suite": "Orders › Files",
      "url": "https://qa.gnikitin.dev/demo/test-cases/#case-78",
      "steps": [
        {
          "position": 1,
          "action": "Call `upload` with a valid file.",
          "expected": "The `ForbiddenException` from the access check reaches the caller, and neither `createObjectKey` nor `put` runs."
        }
      ]
    },
    {
      "id": 79,
      "title": "removes the stored object when the record cannot be saved",
      "description": "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.\n\n_Automated by `src/orders/order-files.service.spec.ts`._",
      "priority": "high",
      "severity": "major",
      "type": "functional",
      "layer": "unit",
      "automation": "automated",
      "tags": [
        "order-desk:orders.files.removes-orphan-on-failure",
        "unit",
        "orders",
        "files"
      ],
      "suite": "Orders › Files",
      "url": "https://qa.gnikitin.dev/demo/test-cases/#case-79",
      "steps": [
        {
          "position": 1,
          "action": "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."
        }
      ]
    },
    {
      "id": 80,
      "title": "stores a safe, bounded file name",
      "description": "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.\n\n_Automated by `src/orders/order-files.service.spec.ts`._",
      "priority": "high",
      "severity": "major",
      "type": "security",
      "layer": "unit",
      "automation": "automated",
      "tags": [
        "order-desk:orders.files.sanitizes-uploaded-name",
        "unit",
        "orders",
        "files"
      ],
      "suite": "Orders › Files",
      "url": "https://qa.gnikitin.dev/demo/test-cases/#case-80",
      "steps": [
        {
          "position": 1,
          "action": "Call `upload` with `originalname` set to `..\\..\\etc/passwd\\u0000.png`.",
          "expected": "The row stores `filename: \"passwd.png\"`."
        },
        {
          "position": 2,
          "action": "Call `upload` with a name of only spaces.",
          "expected": "The row stores `filename: \"attachment\"`."
        },
        {
          "position": 3,
          "action": "Call `upload` with a 300-character name.",
          "expected": "The stored name is cut to 255 characters."
        }
      ]
    },
    {
      "id": 82,
      "title": "answers not found for an attachment of another order",
      "description": "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.\n\n_Automated by `src/orders/order-files.service.spec.ts`._",
      "priority": "high",
      "severity": "critical",
      "type": "security",
      "layer": "unit",
      "automation": "automated",
      "tags": [
        "order-desk:orders.files.scopes-download-to-order",
        "unit",
        "orders",
        "files"
      ],
      "suite": "Orders › Files",
      "url": "https://qa.gnikitin.dev/demo/test-cases/#case-82",
      "steps": [
        {
          "position": 1,
          "action": "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."
        }
      ]
    },
    {
      "id": 148,
      "title": "refuses an attachment above the quota of the order",
      "description": "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.\n\n_Automated by `src/orders/order-files.service.spec.ts`._",
      "priority": "high",
      "severity": "major",
      "type": "security",
      "layer": "unit",
      "automation": "automated",
      "tags": [
        "order-desk:orders.files.rejects-attachment-over-quota",
        "unit",
        "orders",
        "files"
      ],
      "suite": "Orders › Files",
      "url": "https://qa.gnikitin.dev/demo/test-cases/#case-148",
      "steps": [
        {
          "position": 1,
          "action": "Upload a third attachment to that order.",
          "expected": "The call answers `ConflictException`, the storage receives no `put` and the order keeps two rows."
        }
      ]
    },
    {
      "id": 149,
      "title": "refuses an upload above the daily quota of the account",
      "description": "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.\n\n_Automated by `src/orders/order-files.service.spec.ts`._",
      "priority": "high",
      "severity": "major",
      "type": "security",
      "layer": "unit",
      "automation": "automated",
      "tags": [
        "order-desk:orders.files.rejects-daily-upload-quota",
        "unit",
        "orders",
        "files"
      ],
      "suite": "Orders › Files",
      "url": "https://qa.gnikitin.dev/demo/test-cases/#case-149",
      "steps": [
        {
          "position": 1,
          "action": "Upload another file to a fresh order.",
          "expected": "The call answers `ConflictException`, the storage receives no `put` and the two earlier rows stay."
        }
      ]
    },
    {
      "id": 150,
      "title": "does not count the uploads of earlier days",
      "description": "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.\n\n_Automated by `src/orders/order-files.service.spec.ts`._",
      "priority": "medium",
      "severity": "normal",
      "type": "functional",
      "layer": "unit",
      "automation": "automated",
      "tags": [
        "order-desk:orders.files.counts-only-the-last-day",
        "unit",
        "orders",
        "files"
      ],
      "suite": "Orders › Files",
      "url": "https://qa.gnikitin.dev/demo/test-cases/#case-150",
      "steps": [
        {
          "position": 1,
          "action": "Upload a file today.",
          "expected": "The object is stored and the order gains the attachment."
        }
      ]
    },
    {
      "id": 154,
      "title": "records the uploader, size, object key and detected type",
      "description": "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.\n\n_Automated by `src/orders/order-files.service.spec.ts`._",
      "priority": "medium",
      "severity": "normal",
      "type": "functional",
      "layer": "unit",
      "automation": "automated",
      "tags": [
        "order-desk:orders.files.stores-upload-metadata",
        "unit",
        "orders",
        "files"
      ],
      "suite": "Orders › Files",
      "url": "https://qa.gnikitin.dev/demo/test-cases/#case-154",
      "steps": [
        {
          "position": 1,
          "action": "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\"`."
        }
      ]
    },
    {
      "id": 155,
      "title": "refuses a file that is not an image or a PDF whatever type the request declares",
      "description": "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.\n\n_Automated by `src/orders/order-files.service.spec.ts`._",
      "priority": "high",
      "severity": "critical",
      "type": "security",
      "layer": "unit",
      "automation": "automated",
      "tags": [
        "order-desk:orders.files.rejects-executable-type",
        "unit",
        "orders",
        "files"
      ],
      "suite": "Orders › Files",
      "url": "https://qa.gnikitin.dev/demo/test-cases/#case-155",
      "steps": [
        {
          "position": 1,
          "action": "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."
        }
      ]
    },
    {
      "id": 156,
      "title": "stores the type detected from the bytes instead of the declared one",
      "description": "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.\n\n_Automated by `src/orders/order-files.service.spec.ts`._",
      "priority": "high",
      "severity": "major",
      "type": "security",
      "layer": "unit",
      "automation": "automated",
      "tags": [
        "order-desk:orders.files.stores-detected-type",
        "unit",
        "orders",
        "files"
      ],
      "suite": "Orders › Files",
      "url": "https://qa.gnikitin.dev/demo/test-cases/#case-156",
      "steps": [
        {
          "position": 1,
          "action": "Upload a PNG that declares `text/html`.",
          "expected": "The attachment row stores `contentType: \"image/png\"`, and the object is written with the same type."
        }
      ]
    },
    {
      "id": 157,
      "title": "serves every download as a neutral binary stream",
      "description": "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.\n\n_Automated by `src/orders/order-files.service.spec.ts`._",
      "priority": "high",
      "severity": "major",
      "type": "security",
      "layer": "unit",
      "automation": "automated",
      "tags": [
        "order-desk:orders.files.download-serves-neutral-type",
        "unit",
        "orders",
        "files"
      ],
      "suite": "Orders › Files",
      "url": "https://qa.gnikitin.dev/demo/test-cases/#case-157",
      "steps": [
        {
          "position": 1,
          "action": "Download an attachment whose row and object both report `image/png`.",
          "expected": "The result carries `contentType: \"application/octet-stream\"` and the stored file name."
        }
      ]
    },
    {
      "id": 143,
      "title": "keeps the documented quotas when nothing is configured",
      "description": "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.\n\n_Automated by `src/orders/order-quotas.spec.ts`._",
      "priority": "high",
      "severity": "normal",
      "type": "security",
      "layer": "unit",
      "automation": "automated",
      "tags": [
        "order-desk:orders.quotas.defaults",
        "unit",
        "orders",
        "quotas"
      ],
      "suite": "Orders › Quotas",
      "url": "https://qa.gnikitin.dev/demo/test-cases/#case-143",
      "steps": [
        {
          "position": 1,
          "action": "Resolve the quotas from an empty environment.",
          "expected": "20 attachments per order, 100 attachments per account per day and 20 open orders per customer."
        }
      ]
    },
    {
      "id": 144,
      "title": "reads the three quotas from the environment",
      "description": "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.\n\n_Automated by `src/orders/order-quotas.spec.ts`._",
      "priority": "medium",
      "severity": "normal",
      "type": "functional",
      "layer": "unit",
      "automation": "automated",
      "tags": [
        "order-desk:orders.quotas.environment",
        "unit",
        "orders",
        "quotas"
      ],
      "suite": "Orders › Quotas",
      "url": "https://qa.gnikitin.dev/demo/test-cases/#case-144",
      "steps": [
        {
          "position": 1,
          "action": "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."
        }
      ]
    },
    {
      "id": 145,
      "title": "refuses a quota it cannot read instead of ignoring the setting",
      "description": "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.\n\n_Automated by `src/orders/order-quotas.spec.ts`._",
      "priority": "high",
      "severity": "major",
      "type": "security",
      "layer": "unit",
      "automation": "automated",
      "tags": [
        "order-desk:orders.quotas.invalid",
        "unit",
        "orders",
        "quotas"
      ],
      "suite": "Orders › Quotas",
      "url": "https://qa.gnikitin.dev/demo/test-cases/#case-145",
      "steps": [
        {
          "position": 1,
          "action": "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."
        }
      ]
    },
    {
      "id": 146,
      "title": "refuses a new order when the customer is at the open-order quota",
      "description": "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.\n\n_Automated by `src/orders/orders.service.spec.ts`._",
      "priority": "high",
      "severity": "major",
      "type": "security",
      "layer": "unit",
      "automation": "automated",
      "tags": [
        "order-desk:orders.create.rejects-open-order-quota",
        "unit",
        "orders",
        "quotas"
      ],
      "suite": "Orders › Quotas",
      "url": "https://qa.gnikitin.dev/demo/test-cases/#case-146",
      "steps": [
        {
          "position": 1,
          "action": "Create an order for that customer.",
          "expected": "The call answers `ConflictException`, and the database still holds exactly the two earlier orders."
        }
      ]
    },
    {
      "id": 147,
      "title": "does not count completed and cancelled orders against the quota",
      "description": "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.\n\n_Automated by `src/orders/orders.service.spec.ts`._",
      "priority": "high",
      "severity": "major",
      "type": "functional",
      "layer": "unit",
      "automation": "automated",
      "tags": [
        "order-desk:orders.create.ignores-closed-orders",
        "unit",
        "orders",
        "quotas"
      ],
      "suite": "Orders › Quotas",
      "url": "https://qa.gnikitin.dev/demo/test-cases/#case-147",
      "steps": [
        {
          "position": 1,
          "action": "Create an order for that customer.",
          "expected": "The order is created and the database holds three orders."
        }
      ]
    },
    {
      "id": 181,
      "title": "returns work in progress to the assignment stage for the new executor",
      "description": "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.\n\n_Automated by `src/orders/orders.service.spec.ts`._",
      "priority": "high",
      "severity": "critical",
      "type": "functional",
      "layer": "unit",
      "automation": "automated",
      "tags": [
        "order-desk:orders.assign.restarts-started-work",
        "unit",
        "orders",
        "distribution"
      ],
      "suite": "Orders › Distribution",
      "url": "https://qa.gnikitin.dev/demo/test-cases/#case-181",
      "steps": [
        {
          "position": 1,
          "action": "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`."
        },
        {
          "position": 2,
          "action": "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."
        },
        {
          "position": 3,
          "action": "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."
        }
      ]
    },
    {
      "id": 182,
      "title": "assigns a pooled order and moves a later reassignment into the history",
      "description": "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.\n\n_Automated by `src/orders/orders.service.spec.ts`._",
      "priority": "high",
      "severity": "critical",
      "type": "functional",
      "layer": "unit",
      "automation": "automated",
      "tags": [
        "order-desk:orders.assign.reassigns-with-history",
        "unit",
        "orders",
        "distribution"
      ],
      "suite": "Orders › Distribution",
      "url": "https://qa.gnikitin.dev/demo/test-cases/#case-182",
      "steps": [
        {
          "position": 1,
          "action": "Assign the order to `executor-1` as the administrator.",
          "expected": "The order is `ASSIGNED` to `executor-1` with one `ACTIVE` assignment."
        },
        {
          "position": 2,
          "action": "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."
        },
        {
          "position": 3,
          "action": "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."
        }
      ]
    },
    {
      "id": 183,
      "title": "refuses an inactive executor, the current one and a closed order",
      "description": "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.\n\n_Automated by `src/orders/orders.service.spec.ts`._",
      "priority": "high",
      "severity": "major",
      "type": "functional",
      "layer": "unit",
      "automation": "automated",
      "tags": [
        "order-desk:orders.assign.requires-active-executor",
        "unit",
        "orders",
        "distribution"
      ],
      "suite": "Orders › Distribution",
      "url": "https://qa.gnikitin.dev/demo/test-cases/#case-183",
      "steps": [
        {
          "position": 1,
          "action": "Assign the waiting order to the inactive executor and to a missing id.",
          "expected": "Both calls answer `BadRequestException`."
        },
        {
          "position": 2,
          "action": "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`."
        },
        {
          "position": 3,
          "action": "Assign the completed order to the active executor.",
          "expected": "The call answers `ConflictException` and the closed order keeps its status."
        }
      ]
    },
    {
      "id": 184,
      "title": "stores the edited draft with trimmed values and releases the executor the customer detaches",
      "description": "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.\n\n_Automated by `src/orders/orders.service.spec.ts`._",
      "priority": "high",
      "severity": "critical",
      "type": "functional",
      "layer": "unit",
      "automation": "automated",
      "tags": [
        "order-desk:orders.draft.update-fields",
        "unit",
        "orders",
        "draft-editing"
      ],
      "suite": "Orders › Draft editing",
      "url": "https://qa.gnikitin.dev/demo/test-cases/#case-184",
      "steps": [
        {
          "position": 1,
          "action": "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`."
        },
        {
          "position": 2,
          "action": "Read the assignment history.",
          "expected": "The single assignment is `RELEASED` with an end date."
        }
      ]
    },
    {
      "id": 185,
      "title": "refuses to edit a submitted draft, another customer's order and an unavailable category",
      "description": "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.\n\n_Automated by `src/orders/orders.service.spec.ts`._",
      "priority": "high",
      "severity": "major",
      "type": "functional",
      "layer": "unit",
      "automation": "automated",
      "tags": [
        "order-desk:orders.draft.refuses-invalid-edits",
        "unit",
        "orders",
        "draft-editing"
      ],
      "suite": "Orders › Draft editing",
      "url": "https://qa.gnikitin.dev/demo/test-cases/#case-185",
      "steps": [
        {
          "position": 1,
          "action": "Edit the submitted order.",
          "expected": "The call answers `ConflictException` and the order keeps its status."
        },
        {
          "position": 2,
          "action": "Edit the order of the other customer.",
          "expected": "The call answers `ForbiddenException` and the owner stays unchanged."
        },
        {
          "position": 3,
          "action": "Move a draft to the inactive category.",
          "expected": "The call answers `BadRequestException` and the draft keeps no category change."
        }
      ]
    },
    {
      "id": 186,
      "title": "refuses an estimate from an executor without a positive hourly rate",
      "description": "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.\n\n_Automated by `src/orders/orders.service.spec.ts`._",
      "priority": "high",
      "severity": "major",
      "type": "functional",
      "layer": "unit",
      "automation": "automated",
      "tags": [
        "order-desk:orders.estimates.requires-rate",
        "unit",
        "orders",
        "estimates"
      ],
      "suite": "Orders › Estimates",
      "url": "https://qa.gnikitin.dev/demo/test-cases/#case-186",
      "steps": [
        {
          "position": 1,
          "action": "Propose two hours for the order.",
          "expected": "The call answers `BadRequestException`."
        },
        {
          "position": 2,
          "action": "Read the estimate table.",
          "expected": "No estimate row exists."
        }
      ]
    },
    {
      "id": 187,
      "title": "multiplies the stored rate by the proposed hours and keeps the rate of the proposal",
      "description": "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.\n\n_Automated by `src/orders/orders.service.spec.ts`._",
      "priority": "high",
      "severity": "critical",
      "type": "functional",
      "layer": "unit",
      "automation": "automated",
      "tags": [
        "order-desk:orders.estimates.amount-from-rate",
        "unit",
        "orders",
        "estimates"
      ],
      "suite": "Orders › Estimates",
      "url": "https://qa.gnikitin.dev/demo/test-cases/#case-187",
      "steps": [
        {
          "position": 1,
          "action": "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`."
        },
        {
          "position": 2,
          "action": "Raise the executor's rate to 99 and propose one hour for the second order.",
          "expected": "The new estimate stores rate 99."
        },
        {
          "position": 3,
          "action": "Read the first estimate again.",
          "expected": "It still stores rate 45.5, so the accepted amount cannot drift with the profile."
        }
      ]
    },
    {
      "id": 188,
      "title": "answers conflict when a proposal is already waiting for the customer",
      "description": "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.\n\n_Automated by `src/orders/orders.service.spec.ts`._",
      "priority": "high",
      "severity": "major",
      "type": "functional",
      "layer": "unit",
      "automation": "automated",
      "tags": [
        "order-desk:orders.estimates.single-pending",
        "unit",
        "orders",
        "estimates"
      ],
      "suite": "Orders › Estimates",
      "url": "https://qa.gnikitin.dev/demo/test-cases/#case-188",
      "steps": [
        {
          "position": 1,
          "action": "Propose two hours while the estimate insert raises the uniqueness violation.",
          "expected": "The call answers `ConflictException`."
        },
        {
          "position": 2,
          "action": "Read the estimate table.",
          "expected": "Neither proposal was stored."
        }
      ]
    },
    {
      "id": 189,
      "title": "accepts the work once and refuses a second acceptance",
      "description": "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.\n\n_Automated by `src/orders/orders.service.spec.ts`._",
      "priority": "high",
      "severity": "critical",
      "type": "functional",
      "layer": "unit",
      "automation": "automated",
      "tags": [
        "order-desk:orders.lifecycle.accept-once",
        "unit",
        "orders",
        "acceptance-and-cancellation"
      ],
      "suite": "Orders › Acceptance and cancellation",
      "url": "https://qa.gnikitin.dev/demo/test-cases/#case-189",
      "steps": [
        {
          "position": 1,
          "action": "Accept the work.",
          "expected": "The order keeps `ON_REVIEW` and records an `acceptedAt` date."
        },
        {
          "position": 2,
          "action": "Accept the same work again.",
          "expected": "The call answers `ConflictException`."
        },
        {
          "position": 3,
          "action": "Read the status history.",
          "expected": "Exactly one entry records the acceptance note."
        }
      ]
    },
    {
      "id": 190,
      "title": "cancels a started assignment without a reason and withdraws the estimate awaiting the customer",
      "description": "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.\n\n_Automated by `src/orders/orders.service.spec.ts`._",
      "priority": "high",
      "severity": "critical",
      "type": "functional",
      "layer": "unit",
      "automation": "automated",
      "tags": [
        "order-desk:orders.cancel.releases-assignment",
        "unit",
        "orders",
        "acceptance-and-cancellation"
      ],
      "suite": "Orders › Acceptance and cancellation",
      "url": "https://qa.gnikitin.dev/demo/test-cases/#case-190",
      "steps": [
        {
          "position": 1,
          "action": "Cancel the order without a reason as the customer.",
          "expected": "The order is `CANCELLED` with `cancellationReason: null`."
        },
        {
          "position": 2,
          "action": "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."
        },
        {
          "position": 3,
          "action": "Read the status history.",
          "expected": "One entry records `ASSIGNED` to `CANCELLED` without a note."
        }
      ]
    },
    {
      "id": 191,
      "title": "records a comment from a participant and refuses an outsider",
      "description": "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.\n\n_Automated by `src/orders/orders.service.spec.ts`._",
      "priority": "medium",
      "severity": "major",
      "type": "functional",
      "layer": "unit",
      "automation": "automated",
      "tags": [
        "order-desk:orders.comments.participants-only",
        "unit",
        "orders",
        "comments"
      ],
      "suite": "Orders › Comments",
      "url": "https://qa.gnikitin.dev/demo/test-cases/#case-191",
      "steps": [
        {
          "position": 1,
          "action": "Add a padded comment as the owning customer.",
          "expected": "The stored comment carries the trimmed text and the customer as its author."
        },
        {
          "position": 2,
          "action": "Add a comment as the other customer.",
          "expected": "The call answers `ForbiddenException`."
        },
        {
          "position": 3,
          "action": "Read the comment table.",
          "expected": "Only the first comment exists."
        }
      ]
    },
    {
      "id": 16,
      "title": "stores a customer receipt without marking the invoice paid or completing the order",
      "description": "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.\n\n_Automated by `src/invoices/invoices.service.spec.ts`._",
      "priority": "high",
      "severity": "critical",
      "type": "functional",
      "layer": "unit",
      "automation": "automated",
      "tags": [
        "order-desk:invoices.payment-reports.receipt-stored",
        "unit",
        "invoices",
        "payment-reports"
      ],
      "suite": "Invoices › Payment reports",
      "url": "https://qa.gnikitin.dev/demo/test-cases/#case-16",
      "steps": [
        {
          "position": 1,
          "action": "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`."
        },
        {
          "position": 2,
          "action": "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."
        }
      ]
    },
    {
      "id": 17,
      "title": "confirms payment and moves the order to INVOICE_PAID without completing it",
      "description": "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.\n\n_Automated by `src/invoices/invoices.service.spec.ts`._",
      "priority": "high",
      "severity": "critical",
      "type": "functional",
      "layer": "unit",
      "automation": "automated",
      "tags": [
        "order-desk:invoices.payment-reports.confirm-payment",
        "unit",
        "invoices",
        "payment-reports"
      ],
      "suite": "Invoices › Payment reports",
      "url": "https://qa.gnikitin.dev/demo/test-cases/#case-17",
      "steps": [
        {
          "position": 1,
          "action": "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."
        },
        {
          "position": 2,
          "action": "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."
        }
      ]
    },
    {
      "id": 18,
      "title": "does not allow executors to read customer payment receipts",
      "description": "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.\n\n_Automated by `src/invoices/invoices.service.spec.ts`._",
      "priority": "high",
      "severity": "major",
      "type": "security",
      "layer": "unit",
      "automation": "automated",
      "tags": [
        "order-desk:invoices.payment-reports.executor-denied",
        "unit",
        "invoices",
        "payment-reports"
      ],
      "suite": "Invoices › Payment reports",
      "url": "https://qa.gnikitin.dev/demo/test-cases/#case-18",
      "steps": [
        {
          "position": 1,
          "action": "Call `paymentReportFile` as a user with the `EXECUTOR` role.",
          "expected": "The call rejects with `ForbiddenException` and object storage is never read."
        }
      ]
    },
    {
      "id": 107,
      "title": "refuses a second receipt while one is awaiting review",
      "description": "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.\n\n_Automated by `src/invoices/invoices.service.spec.ts`._",
      "priority": "medium",
      "severity": "major",
      "type": "functional",
      "layer": "unit",
      "automation": "automated",
      "tags": [
        "order-desk:invoices.payment-reports.duplicate-guard",
        "unit",
        "invoices",
        "payment-reports"
      ],
      "suite": "Invoices › Payment reports",
      "url": "https://qa.gnikitin.dev/demo/test-cases/#case-107",
      "steps": [
        {
          "position": 1,
          "action": "Call `reportPayment` again as the owning customer.",
          "expected": "The call rejects with `ConflictException`."
        },
        {
          "position": 2,
          "action": "Inspect the stored reports and the object storage.",
          "expected": "Exactly one report row remains, and the newly uploaded object is deleted again."
        }
      ]
    },
    {
      "id": 158,
      "title": "refuses a receipt whose bytes are not an image or a PDF",
      "description": "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.\n\n_Automated by `src/invoices/invoices.service.spec.ts`._",
      "priority": "high",
      "severity": "major",
      "type": "security",
      "layer": "unit",
      "automation": "automated",
      "tags": [
        "order-desk:invoices.payment-reports.rejects-unsupported-type",
        "unit",
        "invoices",
        "payment-reports"
      ],
      "suite": "Invoices › Payment reports",
      "url": "https://qa.gnikitin.dev/demo/test-cases/#case-158",
      "steps": [
        {
          "position": 1,
          "action": "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."
        }
      ]
    },
    {
      "id": 159,
      "title": "serves a receipt download as a neutral binary stream",
      "description": "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.\n\n_Automated by `src/invoices/invoices.service.spec.ts`._",
      "priority": "high",
      "severity": "major",
      "type": "security",
      "layer": "unit",
      "automation": "automated",
      "tags": [
        "order-desk:invoices.payment-reports.receipt-download-neutral-type",
        "unit",
        "invoices",
        "payment-reports"
      ],
      "suite": "Invoices › Payment reports",
      "url": "https://qa.gnikitin.dev/demo/test-cases/#case-159",
      "steps": [
        {
          "position": 1,
          "action": "Download the receipt as the owning customer.",
          "expected": "The result carries `contentType: \"application/octet-stream\"`, the stored file name and the bytes."
        }
      ]
    },
    {
      "id": 164,
      "title": "rejects a receipt with the administrator's reason and leaves the invoice unpaid",
      "description": "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.\n\n_Automated by `src/invoices/invoices.service.spec.ts`._",
      "priority": "high",
      "severity": "critical",
      "type": "functional",
      "layer": "unit",
      "automation": "automated",
      "tags": [
        "order-desk:invoices.payment-reports.reject-records-reason",
        "unit",
        "invoices",
        "payment-reports"
      ],
      "suite": "Invoices › Payment reports",
      "url": "https://qa.gnikitin.dev/demo/test-cases/#case-164",
      "steps": [
        {
          "position": 1,
          "action": "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."
        },
        {
          "position": 2,
          "action": "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`."
        },
        {
          "position": 3,
          "action": "Read the status history.",
          "expected": "One entry records `INVOICE_ISSUED` to `INVOICE_ISSUED` with the rejection reason in its note."
        }
      ]
    },
    {
      "id": 165,
      "title": "refuses a second decision on a receipt that was already reviewed",
      "description": "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.\n\n_Automated by `src/invoices/invoices.service.spec.ts`._",
      "priority": "high",
      "severity": "major",
      "type": "functional",
      "layer": "unit",
      "automation": "automated",
      "tags": [
        "order-desk:invoices.payment-reports.rejects-reviewed-report",
        "unit",
        "invoices",
        "payment-reports"
      ],
      "suite": "Invoices › Payment reports",
      "url": "https://qa.gnikitin.dev/demo/test-cases/#case-165",
      "steps": [
        {
          "position": 1,
          "action": "Reject the already confirmed report.",
          "expected": "The call answers `ConflictException`."
        },
        {
          "position": 2,
          "action": "Confirm the same report.",
          "expected": "The call answers `ConflictException` as well."
        },
        {
          "position": 3,
          "action": "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."
        }
      ]
    },
    {
      "id": 166,
      "title": "refuses a payment report without a receipt or with a file above 1 MB",
      "description": "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.\n\n_Automated by `src/invoices/invoices.service.spec.ts`._",
      "priority": "high",
      "severity": "critical",
      "type": "functional",
      "layer": "unit",
      "automation": "automated",
      "tags": [
        "order-desk:invoices.payment-reports.requires-receipt-file",
        "unit",
        "invoices",
        "payment-reports"
      ],
      "suite": "Invoices › Payment reports",
      "url": "https://qa.gnikitin.dev/demo/test-cases/#case-166",
      "steps": [
        {
          "position": 1,
          "action": "Report payment without a file.",
          "expected": "The call answers `BadRequestException`."
        },
        {
          "position": 2,
          "action": "Report payment with a file that reports 1 048 577 bytes.",
          "expected": "The call answers `BadRequestException`."
        },
        {
          "position": 3,
          "action": "Inspect the storage stub and the payment report table.",
          "expected": "No object key was requested, nothing was stored and no report row exists."
        }
      ]
    },
    {
      "id": 167,
      "title": "accepts a receipt only while the invoice and its order still await payment",
      "description": "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.\n\n_Automated by `src/invoices/invoices.service.spec.ts`._",
      "priority": "high",
      "severity": "critical",
      "type": "functional",
      "layer": "unit",
      "automation": "automated",
      "tags": [
        "order-desk:invoices.payment-reports.invoice-must-be-active",
        "unit",
        "invoices",
        "payment-reports"
      ],
      "suite": "Invoices › Payment reports",
      "url": "https://qa.gnikitin.dev/demo/test-cases/#case-167",
      "steps": [
        {
          "position": 1,
          "action": "Report payment against the voided invoice as its owning customer.",
          "expected": "The call answers `ConflictException`."
        },
        {
          "position": 2,
          "action": "Report payment against the invoice of the paid order.",
          "expected": "The call answers `ConflictException`."
        },
        {
          "position": 3,
          "action": "Inspect the storage stub and the report table.",
          "expected": "No object was stored and neither attempt left a report row."
        }
      ]
    },
    {
      "id": 168,
      "title": "lets only the customer who owns the order submit a receipt",
      "description": "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.\n\n_Automated by `src/invoices/invoices.service.spec.ts`._",
      "priority": "high",
      "severity": "critical",
      "type": "security",
      "layer": "unit",
      "automation": "automated",
      "tags": [
        "order-desk:invoices.payment-reports.only-owner-customer",
        "unit",
        "invoices",
        "payment-reports"
      ],
      "suite": "Invoices › Payment reports",
      "url": "https://qa.gnikitin.dev/demo/test-cases/#case-168",
      "steps": [
        {
          "position": 1,
          "action": "Report payment as an executor.",
          "expected": "The call answers `ForbiddenException`."
        },
        {
          "position": 2,
          "action": "Report payment as a different customer.",
          "expected": "The call answers `ForbiddenException` as well."
        },
        {
          "position": 3,
          "action": "Inspect the storage stub and the report table.",
          "expected": "No object key was requested and no report row was stored."
        }
      ]
    },
    {
      "id": 169,
      "title": "answers not found for an invoice that belongs to another order",
      "description": "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.\n\n_Automated by `src/invoices/invoices.service.spec.ts`._",
      "priority": "high",
      "severity": "major",
      "type": "security",
      "layer": "unit",
      "automation": "automated",
      "tags": [
        "order-desk:invoices.payment-reports.scopes-to-order",
        "unit",
        "invoices",
        "payment-reports"
      ],
      "suite": "Invoices › Payment reports",
      "url": "https://qa.gnikitin.dev/demo/test-cases/#case-169",
      "steps": [
        {
          "position": 1,
          "action": "Report payment for an invoice id that exists on another order.",
          "expected": "The call answers `NotFoundException` rather than `ForbiddenException`."
        },
        {
          "position": 2,
          "action": "Inspect the storage stub and the report table.",
          "expected": "Nothing was stored and no report row exists."
        }
      ]
    },
    {
      "id": 197,
      "title": "accepts a receipt while the order already holds its attachment quota",
      "description": "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.\n\n_Automated by `src/invoices/invoices.service.spec.ts`._",
      "priority": "high",
      "severity": "major",
      "type": "functional",
      "layer": "unit",
      "automation": "automated",
      "tags": [
        "order-desk:invoices.payment-reports.quota-exempt",
        "unit",
        "invoices",
        "payment-reports"
      ],
      "suite": "Invoices › Payment reports",
      "url": "https://qa.gnikitin.dev/demo/test-cases/#case-197",
      "steps": [
        {
          "position": 1,
          "action": "Call `reportPayment` with a receipt as the owning customer.",
          "expected": "The call succeeds and stores a `PENDING` payment report for the invoice."
        },
        {
          "position": 2,
          "action": "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."
        }
      ]
    },
    {
      "id": 92,
      "title": "requires a non-blank reason to void an invoice",
      "description": "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.\n\n_Automated by `src/invoices/invoices.dto.spec.ts`._",
      "priority": "high",
      "severity": "major",
      "type": "functional",
      "layer": "unit",
      "automation": "automated",
      "tags": [
        "order-desk:invoices.validation.void-reason",
        "unit",
        "invoices",
        "request-validation"
      ],
      "suite": "Invoices › Request validation",
      "url": "https://qa.gnikitin.dev/demo/test-cases/#case-92",
      "steps": [
        {
          "position": 1,
          "action": "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`."
        }
      ]
    },
    {
      "id": 93,
      "title": "requires a non-blank reason to reject a payment report",
      "description": "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.\n\n_Automated by `src/invoices/invoices.dto.spec.ts`._",
      "priority": "high",
      "severity": "major",
      "type": "functional",
      "layer": "unit",
      "automation": "automated",
      "tags": [
        "order-desk:invoices.validation.reject-reason",
        "unit",
        "invoices",
        "request-validation"
      ],
      "suite": "Invoices › Request validation",
      "url": "https://qa.gnikitin.dev/demo/test-cases/#case-93",
      "steps": [
        {
          "position": 1,
          "action": "Validate a readable reason and `\"\"` against `RejectPaymentReportDto`.",
          "expected": "The readable reason passes; the empty one reports an error for `reason`."
        }
      ]
    },
    {
      "id": 170,
      "title": "voids an unpaid invoice with the administrator's reason and keeps the order open for a new one",
      "description": "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.\n\n_Automated by `src/invoices/invoices.service.spec.ts`._",
      "priority": "high",
      "severity": "critical",
      "type": "functional",
      "layer": "unit",
      "automation": "automated",
      "tags": [
        "order-desk:invoices.void.records-reason",
        "unit",
        "invoices",
        "voiding"
      ],
      "suite": "Invoices › Voiding",
      "url": "https://qa.gnikitin.dev/demo/test-cases/#case-170",
      "steps": [
        {
          "position": 1,
          "action": "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."
        },
        {
          "position": 2,
          "action": "Inspect the order after the same call.",
          "expected": "The order is still `INVOICE_ISSUED`, so a replacement invoice can be issued."
        },
        {
          "position": 3,
          "action": "Read the status history.",
          "expected": "One entry records `INVOICE_ISSUED` to `INVOICE_ISSUED` with a note naming the invoice number and the reason."
        }
      ]
    },
    {
      "id": 171,
      "title": "refuses to void an invoice while its payment receipt awaits review",
      "description": "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.\n\n_Automated by `src/invoices/invoices.service.spec.ts`._",
      "priority": "high",
      "severity": "critical",
      "type": "functional",
      "layer": "unit",
      "automation": "automated",
      "tags": [
        "order-desk:invoices.void.blocked-by-pending-report",
        "unit",
        "invoices",
        "voiding"
      ],
      "suite": "Invoices › Voiding",
      "url": "https://qa.gnikitin.dev/demo/test-cases/#case-171",
      "steps": [
        {
          "position": 1,
          "action": "Void the invoice as the administrator.",
          "expected": "The call answers `ConflictException`."
        },
        {
          "position": 2,
          "action": "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."
        }
      ]
    },
    {
      "id": 172,
      "title": "refuses to void a paid invoice and reports an unknown invoice as not found",
      "description": "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.\n\n_Automated by `src/invoices/invoices.service.spec.ts`._",
      "priority": "high",
      "severity": "critical",
      "type": "functional",
      "layer": "unit",
      "automation": "automated",
      "tags": [
        "order-desk:invoices.void.refuses-paid-invoice",
        "unit",
        "invoices",
        "voiding"
      ],
      "suite": "Invoices › Voiding",
      "url": "https://qa.gnikitin.dev/demo/test-cases/#case-172",
      "steps": [
        {
          "position": 1,
          "action": "Void the paid invoice with a reason.",
          "expected": "The call answers `ConflictException`."
        },
        {
          "position": 2,
          "action": "Void an invoice id that the order does not have.",
          "expected": "The call answers `NotFoundException`."
        },
        {
          "position": 3,
          "action": "Inspect the stored invoice and the history.",
          "expected": "The invoice is still `PAID` with its original `paidAt`, and no history row was written."
        }
      ]
    },
    {
      "id": 19,
      "title": "stores a trimmed name and marks a changed email unverified",
      "description": "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.\n\n_Automated by `src/users/users.service.spec.ts`._",
      "priority": "high",
      "severity": "major",
      "type": "functional",
      "layer": "unit",
      "automation": "automated",
      "tags": [
        "order-desk:users.profile.update-normalizes",
        "unit",
        "users",
        "profile"
      ],
      "suite": "Users › Profile",
      "url": "https://qa.gnikitin.dev/demo/test-cases/#case-19",
      "steps": [
        {
          "position": 1,
          "action": "Seed a verified customer and call `updateOwnProfile` with the current password.",
          "expected": "The call succeeds and returns the profile without a password field."
        },
        {
          "position": 2,
          "action": "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`."
        }
      ]
    },
    {
      "id": 20,
      "title": "leaves the profile untouched when the current password is wrong",
      "description": "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.\n\n_Automated by `src/users/users.service.spec.ts`._",
      "priority": "high",
      "severity": "critical",
      "type": "security",
      "layer": "unit",
      "automation": "automated",
      "tags": [
        "order-desk:users.profile.wrong-password",
        "unit",
        "users",
        "profile"
      ],
      "suite": "Users › Profile",
      "url": "https://qa.gnikitin.dev/demo/test-cases/#case-20",
      "steps": [
        {
          "position": 1,
          "action": "Call `updateOwnProfile` with `currentPassword: \"wrong-password\"` and a new name.",
          "expected": "The call rejects with `BadRequestException`."
        },
        {
          "position": 2,
          "action": "Read the stored user row.",
          "expected": "The name, email and verification flag are exactly what the seed contained."
        }
      ]
    },
    {
      "id": 21,
      "title": "stores the hourly rate an executor sets for themselves",
      "description": "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.\n\n_Automated by `src/users/users.service.spec.ts`._",
      "priority": "medium",
      "severity": "normal",
      "type": "functional",
      "layer": "unit",
      "automation": "automated",
      "tags": [
        "order-desk:users.executor-rates.self-service",
        "unit",
        "users",
        "executor-rates"
      ],
      "suite": "Users › Executor rates",
      "url": "https://qa.gnikitin.dev/demo/test-cases/#case-21",
      "steps": [
        {
          "position": 1,
          "action": "Call `updateOwnHourlyRate(\"executor-1\", 45.5)`.",
          "expected": "The call succeeds and returns the executor profile."
        },
        {
          "position": 2,
          "action": "Read the stored user row.",
          "expected": "The rate is a `Prisma.Decimal` with the value `45.5`."
        },
        {
          "position": 3,
          "action": "Format the returned rate for an invoice.",
          "expected": "The value renders as `45.50`."
        }
      ]
    },
    {
      "id": 22,
      "title": "refuses a rate update for anyone who is not an active executor",
      "description": "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.\n\n_Automated by `src/users/users.service.spec.ts`._",
      "priority": "medium",
      "severity": "major",
      "type": "security",
      "layer": "unit",
      "automation": "automated",
      "tags": [
        "order-desk:users.executor-rates.inactive-rejected",
        "unit",
        "users",
        "executor-rates"
      ],
      "suite": "Users › Executor rates",
      "url": "https://qa.gnikitin.dev/demo/test-cases/#case-22",
      "steps": [
        {
          "position": 1,
          "action": "Call `updateOwnHourlyRate` as the customer, the deactivated executor and an unknown id.",
          "expected": "Every call rejects with `NotFoundException`."
        },
        {
          "position": 2,
          "action": "Read the stored user rows.",
          "expected": "All three rates are still empty."
        }
      ]
    },
    {
      "id": 23,
      "title": "offers customers only the active executors, without rates or emails",
      "description": "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.\n\n_Automated by `src/users/users.service.spec.ts`._",
      "priority": "medium",
      "severity": "normal",
      "type": "functional",
      "layer": "unit",
      "automation": "automated",
      "tags": [
        "order-desk:users.executor-rates.active-only-list",
        "unit",
        "users",
        "executor-rates"
      ],
      "suite": "Users › Executor rates",
      "url": "https://qa.gnikitin.dev/demo/test-cases/#case-23",
      "steps": [
        {
          "position": 1,
          "action": "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`."
        }
      ]
    },
    {
      "id": 94,
      "title": "rejects an executor name that is blank or longer than 120 characters",
      "description": "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.\n\n_Automated by `src/users/users.dto.spec.ts`._",
      "priority": "high",
      "severity": "normal",
      "type": "functional",
      "layer": "unit",
      "automation": "automated",
      "tags": [
        "order-desk:users.validation.executor-name",
        "unit",
        "users",
        "request-validation"
      ],
      "suite": "Users › Request validation",
      "url": "https://qa.gnikitin.dev/demo/test-cases/#case-94",
      "steps": [
        {
          "position": 1,
          "action": "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`."
        }
      ]
    },
    {
      "id": 95,
      "title": "keeps the hourly rate positive with at most four decimals",
      "description": "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.\n\n_Automated by `src/users/users.dto.spec.ts`._",
      "priority": "high",
      "severity": "major",
      "type": "functional",
      "layer": "unit",
      "automation": "automated",
      "tags": [
        "order-desk:users.validation.hourly-rate",
        "unit",
        "users",
        "request-validation"
      ],
      "suite": "Users › Request validation",
      "url": "https://qa.gnikitin.dev/demo/test-cases/#case-95",
      "steps": [
        {
          "position": 1,
          "action": "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`."
        }
      ]
    },
    {
      "id": 96,
      "title": "requires the current password and a real change in the profile update",
      "description": "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.\n\n_Automated by `src/users/users.dto.spec.ts`._",
      "priority": "high",
      "severity": "major",
      "type": "functional",
      "layer": "unit",
      "automation": "automated",
      "tags": [
        "order-desk:users.validation.profile",
        "unit",
        "users",
        "request-validation"
      ],
      "suite": "Users › Request validation",
      "url": "https://qa.gnikitin.dev/demo/test-cases/#case-96",
      "steps": [
        {
          "position": 1,
          "action": "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."
        },
        {
          "position": 2,
          "action": "Validate a whitespace-only `name` with a valid `currentPassword`.",
          "expected": "The result reports an error for `name`."
        }
      ]
    },
    {
      "id": 108,
      "title": "keeps an executor active while unfinished orders remain",
      "description": "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.\n\n_Automated by `src/users/users.service.spec.ts`._",
      "priority": "high",
      "severity": "critical",
      "type": "functional",
      "layer": "unit",
      "automation": "automated",
      "tags": [
        "order-desk:users.accounts.deactivate-guard",
        "unit",
        "users",
        "accounts"
      ],
      "suite": "Users › Accounts",
      "url": "https://qa.gnikitin.dev/demo/test-cases/#case-108",
      "steps": [
        {
          "position": 1,
          "action": "Call `setActive(\"executor-1\", false)`.",
          "expected": "The call rejects with `ConflictException`."
        },
        {
          "position": 2,
          "action": "Read the account and its sessions.",
          "expected": "The account is still active, its timestamp is untouched and the session survives."
        }
      ]
    },
    {
      "id": 109,
      "title": "ends every session of a deactivated account",
      "description": "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.\n\n_Automated by `src/users/users.service.spec.ts`._",
      "priority": "high",
      "severity": "critical",
      "type": "functional",
      "layer": "unit",
      "automation": "automated",
      "tags": [
        "order-desk:users.accounts.deactivate",
        "unit",
        "users",
        "accounts"
      ],
      "suite": "Users › Accounts",
      "url": "https://qa.gnikitin.dev/demo/test-cases/#case-109",
      "steps": [
        {
          "position": 1,
          "action": "Call `setActive(\"customer-1\", false)`.",
          "expected": "The call returns the account with `isActive: false`."
        },
        {
          "position": 2,
          "action": "Read the sessions table.",
          "expected": "Only the executor session remains; both customer sessions are gone."
        },
        {
          "position": 3,
          "action": "Read the orders table.",
          "expected": "The open order of the customer is untouched."
        }
      ]
    },
    {
      "id": 110,
      "title": "replaces the stored password hash and ends the sessions of the account",
      "description": "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.\n\n_Automated by `src/users/users.service.spec.ts`._",
      "priority": "high",
      "severity": "critical",
      "type": "security",
      "layer": "unit",
      "automation": "automated",
      "tags": [
        "order-desk:users.accounts.password-reset",
        "unit",
        "users",
        "accounts"
      ],
      "suite": "Users › Accounts",
      "url": "https://qa.gnikitin.dev/demo/test-cases/#case-110",
      "steps": [
        {
          "position": 1,
          "action": "Call `resetPassword(\"executor-1\", \"new-password\")`.",
          "expected": "The call resolves with `{ success: true }`."
        },
        {
          "position": 2,
          "action": "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."
        },
        {
          "position": 3,
          "action": "Read the sessions table.",
          "expected": "Both sessions of the account are gone."
        }
      ]
    },
    {
      "id": 111,
      "title": "refuses a password reset for an administrator or an account without a password",
      "description": "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.\n\n_Automated by `src/users/users.service.spec.ts`._",
      "priority": "high",
      "severity": "major",
      "type": "security",
      "layer": "unit",
      "automation": "automated",
      "tags": [
        "order-desk:users.accounts.reset-scope",
        "unit",
        "users",
        "accounts"
      ],
      "suite": "Users › Accounts",
      "url": "https://qa.gnikitin.dev/demo/test-cases/#case-111",
      "steps": [
        {
          "position": 1,
          "action": "Call `resetPassword` for the administrator.",
          "expected": "The call rejects with `NotFoundException`."
        },
        {
          "position": 2,
          "action": "Call `resetPassword` for the executor without a password account.",
          "expected": "The call rejects with `BadRequestException`."
        },
        {
          "position": 3,
          "action": "Read the accounts table.",
          "expected": "No credential account was created or changed."
        }
      ]
    },
    {
      "id": 198,
      "title": "refuses to deactivate an administrator account",
      "description": "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.\n\n_Automated by `src/users/users.service.spec.ts`._",
      "priority": "high",
      "severity": "critical",
      "type": "security",
      "layer": "unit",
      "automation": "automated",
      "tags": [
        "order-desk:users.accounts.deactivate-refuses-admin",
        "unit",
        "users",
        "accounts"
      ],
      "suite": "Users › Accounts",
      "url": "https://qa.gnikitin.dev/demo/test-cases/#case-198",
      "steps": [
        {
          "position": 1,
          "action": "Call `setActive(\"admin-1\", false)` and then `setActive(\"admin-1\", true)`.",
          "expected": "Both calls reject with `NotFoundException`."
        },
        {
          "position": 2,
          "action": "Read the user and session tables.",
          "expected": "The administrator is still `ADMIN` and `isActive: true`, and its session is still stored."
        }
      ]
    },
    {
      "id": 112,
      "title": "creates an active executor and drops the session its sign-up opened",
      "description": "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.\n\n_Automated by `src/users/users.service.spec.ts`._",
      "priority": "high",
      "severity": "critical",
      "type": "functional",
      "layer": "unit",
      "automation": "automated",
      "tags": [
        "order-desk:users.executors.create",
        "unit",
        "users",
        "executors-and-customers"
      ],
      "suite": "Users › Executors and customers",
      "url": "https://qa.gnikitin.dev/demo/test-cases/#case-112",
      "steps": [
        {
          "position": 1,
          "action": "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."
        },
        {
          "position": 2,
          "action": "Read the user and session tables.",
          "expected": "One executor row exists and no session was left behind."
        },
        {
          "position": 3,
          "action": "Inspect the sign-up the service asked Better Auth for.",
          "expected": "It received the trimmed name and the lower-cased email."
        }
      ]
    },
    {
      "id": 113,
      "title": "refuses a second executor for an email that already has an account",
      "description": "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.\n\n_Automated by `src/users/users.service.spec.ts`._",
      "priority": "high",
      "severity": "major",
      "type": "functional",
      "layer": "unit",
      "automation": "automated",
      "tags": [
        "order-desk:users.executors.create-duplicate",
        "unit",
        "users",
        "executors-and-customers"
      ],
      "suite": "Users › Executors and customers",
      "url": "https://qa.gnikitin.dev/demo/test-cases/#case-113",
      "steps": [
        {
          "position": 1,
          "action": "Call `createExecutor` with the same address in another case.",
          "expected": "The call rejects with `ConflictException`."
        },
        {
          "position": 2,
          "action": "Inspect the sign-up and the user table.",
          "expected": "Better Auth was never called and the only row is the original customer."
        }
      ]
    },
    {
      "id": 114,
      "title": "removes the half-created account when the executor role cannot be stored",
      "description": "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.\n\n_Automated by `src/users/users.service.spec.ts`._",
      "priority": "medium",
      "severity": "major",
      "type": "functional",
      "layer": "unit",
      "automation": "automated",
      "tags": [
        "order-desk:users.executors.create-rollback",
        "unit",
        "users",
        "executors-and-customers"
      ],
      "suite": "Users › Executors and customers",
      "url": "https://qa.gnikitin.dev/demo/test-cases/#case-114",
      "steps": [
        {
          "position": 1,
          "action": "Call `createExecutor` with a fresh address.",
          "expected": "The call fails with the database error."
        },
        {
          "position": 2,
          "action": "Read the user table.",
          "expected": "No account remains for the address."
        }
      ]
    },
    {
      "id": 115,
      "title": "renames an executor and reports anyone else as not found",
      "description": "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.\n\n_Automated by `src/users/users.service.spec.ts`._",
      "priority": "medium",
      "severity": "normal",
      "type": "functional",
      "layer": "unit",
      "automation": "automated",
      "tags": [
        "order-desk:users.executors.update",
        "unit",
        "users",
        "executors-and-customers"
      ],
      "suite": "Users › Executors and customers",
      "url": "https://qa.gnikitin.dev/demo/test-cases/#case-115",
      "steps": [
        {
          "position": 1,
          "action": "Call `updateExecutor` for the executor with a padded name.",
          "expected": "The stored name is the trimmed one."
        },
        {
          "position": 2,
          "action": "Call `updateExecutor` for the customer and for the unknown id.",
          "expected": "Both calls reject with `NotFoundException`."
        }
      ]
    },
    {
      "id": 116,
      "title": "lists customers separately from executors",
      "description": "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.\n\n_Automated by `src/users/users.service.spec.ts`._",
      "priority": "medium",
      "severity": "normal",
      "type": "functional",
      "layer": "unit",
      "automation": "automated",
      "tags": [
        "order-desk:users.customers.list",
        "unit",
        "users",
        "executors-and-customers"
      ],
      "suite": "Users › Executors and customers",
      "url": "https://qa.gnikitin.dev/demo/test-cases/#case-116",
      "steps": [
        {
          "position": 1,
          "action": "Call `listCustomers(false)`.",
          "expected": "Only the active customer is returned."
        },
        {
          "position": 2,
          "action": "Call `listCustomers(true)`.",
          "expected": "Both customers are returned, ordered by name, and the executor is not among them."
        },
        {
          "position": 3,
          "action": "Inspect a returned row.",
          "expected": "The payload has no `hourlyRate` field."
        }
      ]
    },
    {
      "id": 24,
      "title": "hides devtools endpoints when the feature flag is disabled",
      "description": "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.\n\n_Automated by `src/devtools/devtools.guard.spec.ts`._",
      "priority": "high",
      "severity": "major",
      "type": "security",
      "layer": "unit",
      "automation": "automated",
      "tags": [
        "order-desk:devtools.access-guard.flag-off",
        "unit",
        "devtools",
        "access-guard"
      ],
      "suite": "DevTools › Access guard",
      "url": "https://qa.gnikitin.dev/demo/test-cases/#case-24",
      "steps": [
        {
          "position": 1,
          "action": "Call `canActivate` with a valid `x-devtools-api-key` header.",
          "expected": "The guard throws `NotFoundException`."
        }
      ]
    },
    {
      "id": 25,
      "title": "fails explicitly when enabled without an API key",
      "description": "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.\n\n_Automated by `src/devtools/devtools.guard.spec.ts`._",
      "priority": "medium",
      "severity": "major",
      "type": "security",
      "layer": "unit",
      "automation": "automated",
      "tags": [
        "order-desk:devtools.access-guard.missing-key-config",
        "unit",
        "devtools",
        "access-guard"
      ],
      "suite": "DevTools › Access guard",
      "url": "https://qa.gnikitin.dev/demo/test-cases/#case-25",
      "steps": [
        {
          "position": 1,
          "action": "Call `canActivate` with an arbitrary key header.",
          "expected": "The guard throws `InternalServerErrorException`."
        }
      ]
    },
    {
      "id": 26,
      "title": "rejects a missing or incorrect API key",
      "description": "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.\n\n_Automated by `src/devtools/devtools.guard.spec.ts`._",
      "priority": "high",
      "severity": "critical",
      "type": "security",
      "layer": "unit",
      "automation": "automated",
      "tags": [
        "order-desk:devtools.access-guard.rejects-wrong-key",
        "unit",
        "devtools",
        "access-guard"
      ],
      "suite": "DevTools › Access guard",
      "url": "https://qa.gnikitin.dev/demo/test-cases/#case-26",
      "steps": [
        {
          "position": 1,
          "action": "Call `canActivate` without the `x-devtools-api-key` header.",
          "expected": "The guard throws `UnauthorizedException`."
        },
        {
          "position": 2,
          "action": "Call `canActivate` with `x-devtools-api-key: wrong-development-key-at-least-32`.",
          "expected": "The guard throws `UnauthorizedException` as well."
        }
      ]
    },
    {
      "id": 27,
      "title": "accepts the configured API key",
      "description": "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.\n\n_Automated by `src/devtools/devtools.guard.spec.ts`._",
      "priority": "high",
      "severity": "critical",
      "type": "security",
      "layer": "unit",
      "automation": "automated",
      "tags": [
        "order-desk:devtools.access-guard.accepts-key",
        "unit",
        "devtools",
        "access-guard"
      ],
      "suite": "DevTools › Access guard",
      "url": "https://qa.gnikitin.dev/demo/test-cases/#case-27",
      "steps": [
        {
          "position": 1,
          "action": "Call `canActivate` with the configured key in `x-devtools-api-key`.",
          "expected": "The guard returns `true` and lets the request continue."
        }
      ]
    },
    {
      "id": 28,
      "title": "fails explicitly when configured with a weak API key",
      "description": "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.\n\n_Automated by `src/devtools/devtools.guard.spec.ts`._",
      "priority": "medium",
      "severity": "major",
      "type": "security",
      "layer": "unit",
      "automation": "automated",
      "tags": [
        "order-desk:devtools.access-guard.weak-key",
        "unit",
        "devtools",
        "access-guard"
      ],
      "suite": "DevTools › Access guard",
      "url": "https://qa.gnikitin.dev/demo/test-cases/#case-28",
      "steps": [
        {
          "position": 1,
          "action": "Call `canActivate` with the same short key.",
          "expected": "The guard throws `InternalServerErrorException`."
        }
      ]
    },
    {
      "id": 29,
      "title": "clears payment reports and invoices before deleting seed orders and users",
      "description": "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.\n\n_Automated by `src/devtools/devtools.service.spec.ts`._",
      "priority": "high",
      "severity": "major",
      "type": "functional",
      "layer": "unit",
      "automation": "automated",
      "tags": [
        "order-desk:devtools.seed-cleanup.order",
        "unit",
        "devtools",
        "seed-cleanup"
      ],
      "suite": "DevTools › Seed cleanup",
      "url": "https://qa.gnikitin.dev/demo/test-cases/#case-29",
      "steps": [
        {
          "position": 1,
          "action": "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."
        },
        {
          "position": 2,
          "action": "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."
        },
        {
          "position": 3,
          "action": "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."
        }
      ]
    },
    {
      "id": 30,
      "title": "reports a conflict when seed records are still referenced elsewhere",
      "description": "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.\n\n_Automated by `src/devtools/devtools.service.spec.ts`._",
      "priority": "medium",
      "severity": "major",
      "type": "functional",
      "layer": "unit",
      "automation": "automated",
      "tags": [
        "order-desk:devtools.seed-cleanup.conflict",
        "unit",
        "devtools",
        "seed-cleanup"
      ],
      "suite": "DevTools › Seed cleanup",
      "url": "https://qa.gnikitin.dev/demo/test-cases/#case-30",
      "steps": [
        {
          "position": 1,
          "action": "Call `clearSeed`.",
          "expected": "The call rejects with `ConflictException`."
        },
        {
          "position": 2,
          "action": "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."
        }
      ]
    },
    {
      "id": 31,
      "title": "wipes every table in dependency order and recreates the administrator from the environment",
      "description": "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.\n\n_Automated by `src/devtools/devtools.service.spec.ts`._",
      "priority": "high",
      "severity": "blocker",
      "type": "functional",
      "layer": "unit",
      "automation": "automated",
      "tags": [
        "order-desk:devtools.reset.full",
        "unit",
        "devtools",
        "reset"
      ],
      "suite": "DevTools › Reset",
      "url": "https://qa.gnikitin.dev/demo/test-cases/#case-31",
      "steps": [
        {
          "position": 1,
          "action": "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."
        },
        {
          "position": 2,
          "action": "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`."
        },
        {
          "position": 3,
          "action": "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."
        }
      ]
    },
    {
      "id": 32,
      "title": "keeps stored files when the purge is not requested",
      "description": "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.\n\n_Automated by `src/devtools/devtools.service.spec.ts`._",
      "priority": "medium",
      "severity": "normal",
      "type": "functional",
      "layer": "unit",
      "automation": "automated",
      "tags": [
        "order-desk:devtools.reset.keeps-files",
        "unit",
        "devtools",
        "reset"
      ],
      "suite": "DevTools › Reset",
      "url": "https://qa.gnikitin.dev/demo/test-cases/#case-32",
      "steps": [
        {
          "position": 1,
          "action": "Call `reset({ purgeFiles: false })`.",
          "expected": "Object storage is never asked to delete anything, `report.files` is `null` and the administrator is still created."
        }
      ]
    },
    {
      "id": 33,
      "title": "refuses to reset when the administrator credentials are not configured",
      "description": "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.\n\n_Automated by `src/devtools/devtools.service.spec.ts`._",
      "priority": "medium",
      "severity": "major",
      "type": "functional",
      "layer": "unit",
      "automation": "automated",
      "tags": [
        "order-desk:devtools.reset.requires-admin",
        "unit",
        "devtools",
        "reset"
      ],
      "suite": "DevTools › Reset",
      "url": "https://qa.gnikitin.dev/demo/test-cases/#case-33",
      "steps": [
        {
          "position": 1,
          "action": "Call `reset({ purgeFiles: true })`.",
          "expected": "The call rejects with `BadRequestException` and no transaction is opened."
        }
      ]
    },
    {
      "id": 118,
      "title": "reports a failed file purge without undoing the reset",
      "description": "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.\n\n_Automated by `src/devtools/devtools.service.spec.ts`._",
      "priority": "medium",
      "severity": "major",
      "type": "functional",
      "layer": "unit",
      "automation": "automated",
      "tags": [
        "order-desk:devtools.reset.purge-failure",
        "unit",
        "devtools",
        "reset"
      ],
      "suite": "DevTools › Reset",
      "url": "https://qa.gnikitin.dev/demo/test-cases/#case-118",
      "steps": [
        {
          "position": 1,
          "action": "Call `reset({ purgeFiles: true })`.",
          "expected": "The call resolves, `report.files` is `{ deleted: 0, failed: 0, error: \"Bucket unreachable\" }` and the administrator is still created."
        }
      ]
    },
    {
      "id": 97,
      "title": "accepts a reset only with the confirmation phrase",
      "description": "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.\n\n_Automated by `src/devtools/devtools.dto.spec.ts`._",
      "priority": "high",
      "severity": "critical",
      "type": "functional",
      "layer": "unit",
      "automation": "automated",
      "tags": [
        "order-desk:devtools.validation.reset-confirmation",
        "unit",
        "devtools",
        "request-validation"
      ],
      "suite": "DevTools › Request validation",
      "url": "https://qa.gnikitin.dev/demo/test-cases/#case-97",
      "steps": [
        {
          "position": 1,
          "action": "Validate `confirm: \"reset-all-data\"`, then `confirm: \"reset\"`.",
          "expected": "The exact phrase passes; any other value reports an error for `confirm`."
        },
        {
          "position": 2,
          "action": "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."
        }
      ]
    },
    {
      "id": 98,
      "title": "validates the role, email and password of a test account",
      "description": "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.\n\n_Automated by `src/devtools/devtools.dto.spec.ts`._",
      "priority": "high",
      "severity": "major",
      "type": "functional",
      "layer": "unit",
      "automation": "automated",
      "tags": [
        "order-desk:devtools.validation.create-user",
        "unit",
        "devtools",
        "request-validation"
      ],
      "suite": "DevTools › Request validation",
      "url": "https://qa.gnikitin.dev/demo/test-cases/#case-98",
      "steps": [
        {
          "position": 1,
          "action": "Validate a customer account with an email and an eight-character password.",
          "expected": "The payload passes."
        },
        {
          "position": 2,
          "action": "Validate `role: \"customer\"`, a seven-character password and `email: \"not-an-email\"`.",
          "expected": "Each payload reports an error for `role`, `password` and `email` respectively."
        }
      ]
    },
    {
      "id": 119,
      "title": "creates a test account with a normalized email and revokes its sign-up session",
      "description": "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.\n\n_Automated by `src/devtools/devtools.service.spec.ts`._",
      "priority": "medium",
      "severity": "major",
      "type": "functional",
      "layer": "unit",
      "automation": "automated",
      "tags": [
        "order-desk:devtools.users.create-normalizes",
        "unit",
        "devtools",
        "users"
      ],
      "suite": "DevTools › Users",
      "url": "https://qa.gnikitin.dev/demo/test-cases/#case-119",
      "steps": [
        {
          "position": 1,
          "action": "Call `createUser(EXECUTOR, \" New.Executor@Example.Test \", \"executor-password\")`.",
          "expected": "The returned id belongs to a user stored with `new.executor@example.test`."
        },
        {
          "position": 2,
          "action": "Inspect the stored user.",
          "expected": "The email is normalized, the name is the local part of it and the role is `EXECUTOR`."
        },
        {
          "position": 3,
          "action": "Inspect the sessions.",
          "expected": "No session is left, because the sign-up session was revoked."
        }
      ]
    },
    {
      "id": 120,
      "title": "refuses a second account for an email that is already in use",
      "description": "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.\n\n_Automated by `src/devtools/devtools.service.spec.ts`._",
      "priority": "medium",
      "severity": "major",
      "type": "functional",
      "layer": "unit",
      "automation": "automated",
      "tags": [
        "order-desk:devtools.users.create-duplicate",
        "unit",
        "devtools",
        "users"
      ],
      "suite": "DevTools › Users",
      "url": "https://qa.gnikitin.dev/demo/test-cases/#case-120",
      "steps": [
        {
          "position": 1,
          "action": "Call `createUser(CUSTOMER, \" TAKEN@Example.Test \", \"customer-password\")`.",
          "expected": "The call rejects with `ConflictException` before sign-up is attempted."
        },
        {
          "position": 2,
          "action": "Inspect the users.",
          "expected": "Only the pre-existing account is stored."
        }
      ]
    },
    {
      "id": 121,
      "title": "removes the account again when the role cannot be applied",
      "description": "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.\n\n_Automated by `src/devtools/devtools.service.spec.ts`._",
      "priority": "high",
      "severity": "critical",
      "type": "functional",
      "layer": "unit",
      "automation": "automated",
      "tags": [
        "order-desk:devtools.users.create-compensates",
        "unit",
        "devtools",
        "users"
      ],
      "suite": "DevTools › Users",
      "url": "https://qa.gnikitin.dev/demo/test-cases/#case-121",
      "steps": [
        {
          "position": 1,
          "action": "Call `createUser(EXECUTOR, \"new.executor@example.test\", \"executor-password\")`.",
          "expected": "The call rejects with the database error."
        },
        {
          "position": 2,
          "action": "Inspect the users, accounts and sessions.",
          "expected": "All three tables are empty, so no half-created login survives."
        }
      ]
    },
    {
      "id": 122,
      "title": "lists the accounts of one role in creation order",
      "description": "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.\n\n_Automated by `src/devtools/devtools.service.spec.ts`._",
      "priority": "low",
      "severity": "minor",
      "type": "functional",
      "layer": "unit",
      "automation": "automated",
      "tags": [
        "order-desk:devtools.users.list",
        "unit",
        "devtools",
        "users"
      ],
      "suite": "DevTools › Users",
      "url": "https://qa.gnikitin.dev/demo/test-cases/#case-122",
      "steps": [
        {
          "position": 1,
          "action": "Call `listUsers(EXECUTOR)`.",
          "expected": "Only the three executors come back, ordered by creation date, including the inactive one."
        },
        {
          "position": 2,
          "action": "Inspect the fields of a returned account.",
          "expected": "Exactly `id`, `name`, `email`, `role`, `isActive` and `createdAt` are present."
        }
      ]
    },
    {
      "id": 123,
      "title": "normalizes a new email, unverifies it and ends the sessions",
      "description": "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.\n\n_Automated by `src/devtools/devtools.service.spec.ts`._",
      "priority": "high",
      "severity": "major",
      "type": "functional",
      "layer": "unit",
      "automation": "automated",
      "tags": [
        "order-desk:devtools.users.update-email",
        "unit",
        "devtools",
        "users"
      ],
      "suite": "DevTools › Users",
      "url": "https://qa.gnikitin.dev/demo/test-cases/#case-123",
      "steps": [
        {
          "position": 1,
          "action": "Call `updateUser(\"user-1\", { email: \" Changed@Example.Test \" })`.",
          "expected": "The stored email becomes `changed@example.test` and `emailVerified` turns false."
        },
        {
          "position": 2,
          "action": "Inspect the sessions.",
          "expected": "The session of `user-1` is gone while the session of `user-2` survives."
        },
        {
          "position": 3,
          "action": "Inspect the returned account.",
          "expected": "It reports the new email and the unchanged role."
        }
      ]
    },
    {
      "id": 124,
      "title": "replaces the stored password hash and ends the sessions, keeping the email verified",
      "description": "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.\n\n_Automated by `src/devtools/devtools.service.spec.ts`._",
      "priority": "high",
      "severity": "critical",
      "type": "security",
      "layer": "unit",
      "automation": "automated",
      "tags": [
        "order-desk:devtools.users.update-password",
        "unit",
        "devtools",
        "users"
      ],
      "suite": "DevTools › Users",
      "url": "https://qa.gnikitin.dev/demo/test-cases/#case-124",
      "steps": [
        {
          "position": 1,
          "action": "Call `updateUser(\"user-1\", { password: \"new-password-123\" })`.",
          "expected": "The stored hash verifies against `new-password-123` and no longer against `old-password`."
        },
        {
          "position": 2,
          "action": "Inspect the user and the sessions.",
          "expected": "The email stays verified and the session is gone."
        }
      ]
    },
    {
      "id": 125,
      "title": "refuses a password change for an account without a credential provider",
      "description": "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.\n\n_Automated by `src/devtools/devtools.service.spec.ts`._",
      "priority": "medium",
      "severity": "major",
      "type": "functional",
      "layer": "unit",
      "automation": "automated",
      "tags": [
        "order-desk:devtools.users.update-without-credential",
        "unit",
        "devtools",
        "users"
      ],
      "suite": "DevTools › Users",
      "url": "https://qa.gnikitin.dev/demo/test-cases/#case-125",
      "steps": [
        {
          "position": 1,
          "action": "Call `updateUser(\"user-1\", { password: \"new-password-123\" })`.",
          "expected": "The call rejects with `BadRequestException`."
        },
        {
          "position": 2,
          "action": "Inspect the account and the sessions.",
          "expected": "The provider row has no password and the session is still there."
        }
      ]
    },
    {
      "id": 126,
      "title": "refuses an empty patch, an unknown user and an email that is already taken",
      "description": "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.\n\n_Automated by `src/devtools/devtools.service.spec.ts`._",
      "priority": "medium",
      "severity": "major",
      "type": "functional",
      "layer": "unit",
      "automation": "automated",
      "tags": [
        "order-desk:devtools.users.update-rejects",
        "unit",
        "devtools",
        "users"
      ],
      "suite": "DevTools › Users",
      "url": "https://qa.gnikitin.dev/demo/test-cases/#case-126",
      "steps": [
        {
          "position": 1,
          "action": "Call `updateUser(\"user-1\", {})`.",
          "expected": "The call rejects with `BadRequestException`."
        },
        {
          "position": 2,
          "action": "Call `updateUser(\"user-missing\", { isActive: false })`.",
          "expected": "The call rejects with `NotFoundException`."
        },
        {
          "position": 3,
          "action": "Call `updateUser(\"user-1\", { email: \"SECOND@example.test\" })`.",
          "expected": "The call rejects with `ConflictException` and both users keep their original emails."
        }
      ]
    },
    {
      "id": 127,
      "title": "imports the fixture with credential accounts, status history and invoices",
      "description": "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.\n\n_Automated by `src/devtools/devtools.service.spec.ts`._",
      "priority": "high",
      "severity": "critical",
      "type": "functional",
      "layer": "unit",
      "automation": "automated",
      "tags": [
        "order-desk:devtools.seed.imports-fixture",
        "unit",
        "devtools",
        "seed-import"
      ],
      "suite": "DevTools › Seed import",
      "url": "https://qa.gnikitin.dev/demo/test-cases/#case-127",
      "steps": [
        {
          "position": 1,
          "action": "Call `seed()`.",
          "expected": "The report names the fixture version, every fixture user with its email, and the number of imported orders."
        },
        {
          "position": 2,
          "action": "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."
        },
        {
          "position": 3,
          "action": "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."
        },
        {
          "position": 4,
          "action": "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."
        }
      ]
    },
    {
      "id": 128,
      "title": "refuses to import when a fixture email belongs to another account",
      "description": "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.\n\n_Automated by `src/devtools/devtools.service.spec.ts`._",
      "priority": "medium",
      "severity": "major",
      "type": "functional",
      "layer": "unit",
      "automation": "automated",
      "tags": [
        "order-desk:devtools.seed.rejects-email-conflict",
        "unit",
        "devtools",
        "seed-import"
      ],
      "suite": "DevTools › Seed import",
      "url": "https://qa.gnikitin.dev/demo/test-cases/#case-128",
      "steps": [
        {
          "position": 1,
          "action": "Call `seed()`.",
          "expected": "The call rejects with `ConflictException` naming that email address."
        },
        {
          "position": 2,
          "action": "Inspect the users, orders and categories.",
          "expected": "Only the pre-existing account is stored; no fixture row was created."
        }
      ]
    },
    {
      "id": 129,
      "title": "refuses to seed without a seed password of at least eight characters",
      "description": "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.\n\n_Automated by `src/devtools/devtools.service.spec.ts`._",
      "priority": "high",
      "severity": "major",
      "type": "functional",
      "layer": "unit",
      "automation": "automated",
      "tags": [
        "order-desk:devtools.seed.requires-password",
        "unit",
        "devtools",
        "seed-import"
      ],
      "suite": "DevTools › Seed import",
      "url": "https://qa.gnikitin.dev/demo/test-cases/#case-129",
      "steps": [
        {
          "position": 1,
          "action": "Call `seed()` with the variable unset.",
          "expected": "The call rejects with `BadRequestException`."
        },
        {
          "position": 2,
          "action": "Call `seed()` with `DEVTOOLS_SEED_PASSWORD=\"short\"`.",
          "expected": "The call rejects with `BadRequestException` and no user is created."
        }
      ]
    },
    {
      "id": 130,
      "title": "re-seeds over its own rows instead of failing on them",
      "description": "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.\n\n_Automated by `src/devtools/devtools.service.spec.ts`._",
      "priority": "medium",
      "severity": "major",
      "type": "functional",
      "layer": "unit",
      "automation": "automated",
      "tags": [
        "order-desk:devtools.seed.replaces-previous",
        "unit",
        "devtools",
        "seed-import"
      ],
      "suite": "DevTools › Seed import",
      "url": "https://qa.gnikitin.dev/demo/test-cases/#case-130",
      "steps": [
        {
          "position": 1,
          "action": "Call `seed()` twice.",
          "expected": "Both calls succeed and report the same number of orders."
        },
        {
          "position": 2,
          "action": "Inspect the tables.",
          "expected": "Users, accounts, orders, status history rows and invoices each appear exactly as often as in the fixture, with no duplicates."
        }
      ]
    },
    {
      "id": 34,
      "title": "creates a draft order for the current customer",
      "description": "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.\n\n_Automated by `test/integration/orders-lifecycle.spec.ts`._",
      "priority": "high",
      "severity": "critical",
      "type": "functional",
      "layer": "api",
      "automation": "automated",
      "tags": [
        "order-desk:integration.lifecycle.create-draft",
        "api",
        "orders-integration",
        "lifecycle"
      ],
      "suite": "Orders (integration) › Lifecycle",
      "url": "https://qa.gnikitin.dev/demo/test-cases/#case-34",
      "steps": [
        {
          "position": 1,
          "action": "`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."
        },
        {
          "position": 2,
          "action": "Inspect `status`, `customerId`, `executorId` and `categoryId` of that order.",
          "expected": "`NEW`, the caller's ID, `null` and the requested category."
        },
        {
          "position": 3,
          "action": "Inspect `statusHistory`.",
          "expected": "Exactly one entry, `fromStatus: null` and `toStatus: NEW`."
        }
      ]
    },
    {
      "id": 35,
      "title": "rejects a draft that references an unavailable category",
      "description": "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`.\n\n_Automated by `test/integration/orders-lifecycle.spec.ts`._",
      "priority": "high",
      "severity": "major",
      "type": "functional",
      "layer": "api",
      "automation": "automated",
      "tags": [
        "order-desk:integration.lifecycle.unknown-category",
        "api",
        "orders-integration",
        "lifecycle"
      ],
      "suite": "Orders (integration) › Lifecycle",
      "url": "https://qa.gnikitin.dev/demo/test-cases/#case-35",
      "steps": [
        {
          "position": 1,
          "action": "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."
        },
        {
          "position": 2,
          "action": "`POST /api/orders` as the customer with that category.",
          "expected": "`400` with `code: BAD_REQUEST`."
        },
        {
          "position": 3,
          "action": "Read the error message.",
          "expected": "`Category is not available`, the text the web form shows next to the category picker."
        }
      ]
    },
    {
      "id": 36,
      "title": "moves a submitted draft into the executor pool",
      "description": "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.\n\n_Automated by `test/integration/orders-lifecycle.spec.ts`._",
      "priority": "high",
      "severity": "critical",
      "type": "functional",
      "layer": "api",
      "automation": "automated",
      "tags": [
        "order-desk:integration.lifecycle.submit-to-pool",
        "api",
        "orders-integration",
        "lifecycle"
      ],
      "suite": "Orders (integration) › Lifecycle",
      "url": "https://qa.gnikitin.dev/demo/test-cases/#case-36",
      "steps": [
        {
          "position": 1,
          "action": "`POST /api/orders/{id}/submit` as the owning customer.",
          "expected": "`201` with the updated order."
        },
        {
          "position": 2,
          "action": "Inspect `status`, `executorId` and `submittedAt`.",
          "expected": "`WAITING_DISTRIBUTION`, `null` and a non-null submission timestamp."
        },
        {
          "position": 3,
          "action": "Inspect `statusHistory`.",
          "expected": "The entries are `NEW` and `WAITING_DISTRIBUTION`, in that order."
        }
      ]
    },
    {
      "id": 37,
      "title": "grants a pooled order to exactly one of two concurrent claims",
      "description": "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.\n\n_Automated by `test/integration/orders-lifecycle.spec.ts`._",
      "priority": "high",
      "severity": "blocker",
      "type": "functional",
      "layer": "api",
      "automation": "automated",
      "tags": [
        "order-desk:integration.lifecycle.concurrent-claim",
        "api",
        "orders-integration",
        "lifecycle"
      ],
      "suite": "Orders (integration) › Lifecycle",
      "url": "https://qa.gnikitin.dev/demo/test-cases/#case-37",
      "steps": [
        {
          "position": 1,
          "action": "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."
        },
        {
          "position": 2,
          "action": "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`."
        },
        {
          "position": 3,
          "action": "Read the order back as the customer.",
          "expected": "`status: ASSIGNED`, exactly one entry in `assignments`, and exactly one `ASSIGNED` entry in `statusHistory`."
        }
      ]
    },
    {
      "id": 38,
      "title": "accepts an estimate and drives the order to customer acceptance",
      "description": "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`.\n\n_Automated by `test/integration/orders-lifecycle.spec.ts`._",
      "priority": "high",
      "severity": "critical",
      "type": "functional",
      "layer": "api",
      "automation": "automated",
      "tags": [
        "order-desk:integration.lifecycle.accept-estimate",
        "api",
        "orders-integration",
        "lifecycle"
      ],
      "suite": "Orders (integration) › Lifecycle",
      "url": "https://qa.gnikitin.dev/demo/test-cases/#case-38",
      "steps": [
        {
          "position": 1,
          "action": "`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`."
        },
        {
          "position": 2,
          "action": "`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`."
        },
        {
          "position": 3,
          "action": "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`."
        },
        {
          "position": 4,
          "action": "`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."
        }
      ]
    },
    {
      "id": 39,
      "title": "returns work for revision and lets the executor resume it",
      "description": "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.\n\n_Automated by `test/integration/orders-lifecycle.spec.ts`._",
      "priority": "high",
      "severity": "major",
      "type": "functional",
      "layer": "api",
      "automation": "automated",
      "tags": [
        "order-desk:integration.lifecycle.revision",
        "api",
        "orders-integration",
        "lifecycle"
      ],
      "suite": "Orders (integration) › Lifecycle",
      "url": "https://qa.gnikitin.dev/demo/test-cases/#case-39",
      "steps": [
        {
          "position": 1,
          "action": "`POST /api/orders/{id}/submit-review` as the executor.",
          "expected": "The order becomes `ON_REVIEW`."
        },
        {
          "position": 2,
          "action": "`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`."
        },
        {
          "position": 3,
          "action": "`POST /api/orders/{id}/resume-revisions` as the executor.",
          "expected": "The order returns to `IN_PROGRESS`."
        }
      ]
    },
    {
      "id": 40,
      "title": "rejects an estimate and returns the order to the pool",
      "description": "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.\n\n_Automated by `test/integration/orders-lifecycle.spec.ts`._",
      "priority": "high",
      "severity": "major",
      "type": "functional",
      "layer": "api",
      "automation": "automated",
      "tags": [
        "order-desk:integration.lifecycle.reject-estimate",
        "api",
        "orders-integration",
        "lifecycle"
      ],
      "suite": "Orders (integration) › Lifecycle",
      "url": "https://qa.gnikitin.dev/demo/test-cases/#case-40",
      "steps": [
        {
          "position": 1,
          "action": "`POST /api/orders/{id}/estimate` as the executor with `hours: 4`.",
          "expected": "`201` with a `PENDING` estimate."
        },
        {
          "position": 2,
          "action": "`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`."
        },
        {
          "position": 3,
          "action": "Inspect the assignment of the rejected executor.",
          "expected": "It records `outcome: RELEASED`."
        }
      ]
    },
    {
      "id": 41,
      "title": "requires a reason when an administrator cancels work in progress",
      "description": "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.\n\n_Automated by `test/integration/orders-lifecycle.spec.ts`._",
      "priority": "high",
      "severity": "major",
      "type": "functional",
      "layer": "api",
      "automation": "automated",
      "tags": [
        "order-desk:integration.lifecycle.cancel-reason",
        "api",
        "orders-integration",
        "lifecycle"
      ],
      "suite": "Orders (integration) › Lifecycle",
      "url": "https://qa.gnikitin.dev/demo/test-cases/#case-41",
      "steps": [
        {
          "position": 1,
          "action": "`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`."
        },
        {
          "position": 2,
          "action": "`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`."
        },
        {
          "position": 3,
          "action": "Repeat the administrative cancel with `{\"reason\": \"The customer changed plans\"}`.",
          "expected": "`201` with `status: CANCELLED` and `cancellationReason` equal to the submitted text."
        }
      ]
    },
    {
      "id": 42,
      "title": "rejects requests without a session",
      "description": "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.\n\n_Automated by `test/integration/orders-lifecycle.spec.ts`._",
      "priority": "high",
      "severity": "critical",
      "type": "security",
      "layer": "api",
      "automation": "automated",
      "tags": [
        "order-desk:integration.access-control.no-session",
        "api",
        "orders-integration",
        "lifecycle",
        "access-control"
      ],
      "suite": "Orders (integration) › Lifecycle › Access control",
      "url": "https://qa.gnikitin.dev/demo/test-cases/#case-42",
      "steps": [
        {
          "position": 1,
          "action": "Use an HTTP client without the session cookie.",
          "expected": "The request carries no credentials at all."
        },
        {
          "position": 2,
          "action": "`GET /api/orders`.",
          "expected": "The session guard rejects the request before any order query runs."
        },
        {
          "position": 3,
          "action": "Inspect the response.",
          "expected": "`401` with `code: UNAUTHENTICATED` and no order data."
        }
      ]
    },
    {
      "id": 43,
      "title": "hides a customer order from another customer",
      "description": "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.\n\n_Automated by `test/integration/orders-lifecycle.spec.ts`._",
      "priority": "high",
      "severity": "critical",
      "type": "security",
      "layer": "api",
      "automation": "automated",
      "tags": [
        "order-desk:integration.access-control.foreign-order",
        "api",
        "orders-integration",
        "lifecycle",
        "access-control"
      ],
      "suite": "Orders (integration) › Lifecycle › Access control",
      "url": "https://qa.gnikitin.dev/demo/test-cases/#case-43",
      "steps": [
        {
          "position": 1,
          "action": "`GET /api/orders/{id}` as the second customer.",
          "expected": "`403` with `code: FORBIDDEN`."
        },
        {
          "position": 2,
          "action": "Read the error message.",
          "expected": "`You cannot access this order` - the body reveals neither the title nor the address of the order."
        },
        {
          "position": 3,
          "action": "`GET /api/orders` as the second customer.",
          "expected": "The foreign order ID is absent from the returned list."
        }
      ]
    },
    {
      "id": 44,
      "title": "shows a pooled order to executors and hides it once it is claimed",
      "description": "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.\n\n_Automated by `test/integration/orders-lifecycle.spec.ts`._",
      "priority": "high",
      "severity": "major",
      "type": "security",
      "layer": "api",
      "automation": "automated",
      "tags": [
        "order-desk:integration.access-control.pool-visibility",
        "api",
        "orders-integration",
        "lifecycle",
        "access-control"
      ],
      "suite": "Orders (integration) › Lifecycle › Access control",
      "url": "https://qa.gnikitin.dev/demo/test-cases/#case-44",
      "steps": [
        {
          "position": 1,
          "action": "`GET /api/orders/{id}` as the first executor.",
          "expected": "`200` with `status: WAITING_DISTRIBUTION`."
        },
        {
          "position": 2,
          "action": "`POST /api/orders/{id}/claim` as the second executor.",
          "expected": "`201`, the order is now assigned to the second executor."
        },
        {
          "position": 3,
          "action": "`GET /api/orders/{id}` as the first executor again.",
          "expected": "`403`, because the order left the pool."
        }
      ]
    },
    {
      "id": 45,
      "title": "refuses order creation for an executor",
      "description": "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.\n\n_Automated by `test/integration/orders-lifecycle.spec.ts`._",
      "priority": "high",
      "severity": "major",
      "type": "security",
      "layer": "api",
      "automation": "automated",
      "tags": [
        "order-desk:integration.access-control.executor-create",
        "api",
        "orders-integration",
        "lifecycle",
        "access-control"
      ],
      "suite": "Orders (integration) › Lifecycle › Access control",
      "url": "https://qa.gnikitin.dev/demo/test-cases/#case-45",
      "steps": [
        {
          "position": 1,
          "action": "Sign in as an executor.",
          "expected": "The session carries the `EXECUTOR` role."
        },
        {
          "position": 2,
          "action": "`POST /api/orders` with a valid-looking body.",
          "expected": "The role guard rejects the request before the DTO rules are evaluated."
        },
        {
          "position": 3,
          "action": "Inspect the response.",
          "expected": "`403` with `code: FORBIDDEN` and the message `This role cannot access the requested resource`."
        }
      ]
    },
    {
      "id": 46,
      "title": "refuses administrative completion for a customer",
      "description": "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.\n\n_Automated by `test/integration/orders-lifecycle.spec.ts`._",
      "priority": "high",
      "severity": "major",
      "type": "security",
      "layer": "api",
      "automation": "automated",
      "tags": [
        "order-desk:integration.access-control.customer-complete",
        "api",
        "orders-integration",
        "lifecycle",
        "access-control"
      ],
      "suite": "Orders (integration) › Lifecycle › Access control",
      "url": "https://qa.gnikitin.dev/demo/test-cases/#case-46",
      "steps": [
        {
          "position": 1,
          "action": "Sign in as the customer who owns the order.",
          "expected": "Ownership alone does not grant administrative actions."
        },
        {
          "position": 2,
          "action": "`POST /api/orders/{id}/complete` as that customer.",
          "expected": "The role check refuses the request before the payment gate runs."
        },
        {
          "position": 3,
          "action": "Inspect the response.",
          "expected": "`403` with `code: FORBIDDEN`; the order status is unchanged."
        }
      ]
    },
    {
      "id": 47,
      "title": "rejects unknown fields instead of ignoring them",
      "description": "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.\n\n_Automated by `test/integration/orders-lifecycle.spec.ts`._",
      "priority": "medium",
      "severity": "major",
      "type": "functional",
      "layer": "api",
      "automation": "automated",
      "tags": [
        "order-desk:integration.validation.unknown-fields",
        "api",
        "orders-integration",
        "lifecycle",
        "request-validation"
      ],
      "suite": "Orders (integration) › Lifecycle › Request validation",
      "url": "https://qa.gnikitin.dev/demo/test-cases/#case-47",
      "steps": [
        {
          "position": 1,
          "action": "`POST /api/orders` as the customer with the extra field `priority: \"urgent\"`.",
          "expected": "The global validation pipe inspects the payload before the service runs."
        },
        {
          "position": 2,
          "action": "Inspect the response status.",
          "expected": "`400` with `code: BAD_REQUEST`, not a `201` that silently dropped the field."
        },
        {
          "position": 3,
          "action": "Inspect the message list.",
          "expected": "It contains `property priority should not exist`."
        }
      ]
    },
    {
      "id": 48,
      "title": "rejects a title that contains only whitespace",
      "description": "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.\n\n_Automated by `test/integration/orders-lifecycle.spec.ts`._",
      "priority": "medium",
      "severity": "normal",
      "type": "functional",
      "layer": "api",
      "automation": "automated",
      "tags": [
        "order-desk:integration.validation.whitespace-title",
        "api",
        "orders-integration",
        "lifecycle",
        "request-validation"
      ],
      "suite": "Orders (integration) › Lifecycle › Request validation",
      "url": "https://qa.gnikitin.dev/demo/test-cases/#case-48",
      "steps": [
        {
          "position": 1,
          "action": "`POST /api/orders` as the customer with `title: \"   \"`.",
          "expected": "The pipe trims the title to an empty string before the checks run."
        },
        {
          "position": 2,
          "action": "Inspect the response status.",
          "expected": "`400`; no order is created."
        },
        {
          "position": 3,
          "action": "Inspect the message list.",
          "expected": "At least one message names `title`."
        }
      ]
    },
    {
      "id": 49,
      "title": "rejects a deadline that is not an ISO-8601 date",
      "description": "`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.\n\n_Automated by `test/integration/orders-lifecycle.spec.ts`._",
      "priority": "medium",
      "severity": "normal",
      "type": "functional",
      "layer": "api",
      "automation": "automated",
      "tags": [
        "order-desk:integration.validation.deadline-format",
        "api",
        "orders-integration",
        "lifecycle",
        "request-validation"
      ],
      "suite": "Orders (integration) › Lifecycle › Request validation",
      "url": "https://qa.gnikitin.dev/demo/test-cases/#case-49",
      "steps": [
        {
          "position": 1,
          "action": "`POST /api/orders` as the customer with `dueAt: \"tomorrow\"`.",
          "expected": "The value cannot be parsed as an ISO-8601 timestamp."
        },
        {
          "position": 2,
          "action": "Inspect the response status.",
          "expected": "`400`; the request never reaches Prisma."
        },
        {
          "position": 3,
          "action": "Inspect the message list.",
          "expected": "At least one message names `dueAt`."
        }
      ]
    },
    {
      "id": 151,
      "title": "accepts the attachments up to the order quota and answers the next one with a 409",
      "description": "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.\n\n_Automated by `test/integration/orders-attachment-quota.spec.ts`._",
      "priority": "high",
      "severity": "major",
      "type": "security",
      "layer": "api",
      "automation": "automated",
      "tags": [
        "order-desk:integration.quota.attachment-limit",
        "api",
        "orders-integration",
        "quotas"
      ],
      "suite": "Orders (integration) › Quotas",
      "url": "https://qa.gnikitin.dev/demo/test-cases/#case-151",
      "steps": [
        {
          "position": 1,
          "action": "Upload three 1-pixel PNG files to the order as that customer.",
          "expected": "Every call answers `201` with the stored attachment."
        },
        {
          "position": 2,
          "action": "Upload a fourth file.",
          "expected": "The call answers `409`."
        },
        {
          "position": 3,
          "action": "Read the order.",
          "expected": "It lists exactly the three accepted file names."
        }
      ]
    },
    {
      "id": 161,
      "title": "refuses a page uploaded as a photo with a 415 and downloads the stored file as a binary stream",
      "description": "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.\n\n_Automated by `test/integration/orders-attachment-quota.spec.ts`._",
      "priority": "high",
      "severity": "critical",
      "type": "security",
      "layer": "api",
      "automation": "automated",
      "tags": [
        "order-desk:integration.attachment-content-type.enforced",
        "api",
        "orders-integration",
        "attachments"
      ],
      "suite": "Orders (integration) › Attachments",
      "url": "https://qa.gnikitin.dev/demo/test-cases/#case-161",
      "steps": [
        {
          "position": 1,
          "action": "Upload an HTML document named `photo.png` to that order as the customer.",
          "expected": "The call answers `415`."
        },
        {
          "position": 2,
          "action": "Upload a real 1-pixel PNG to the same order.",
          "expected": "The call answers `201` with the stored attachment."
        },
        {
          "position": 3,
          "action": "Download the stored attachment and read its response headers.",
          "expected": "`200`, `content-type: application/octet-stream` and a `content-disposition` that starts with `attachment`."
        }
      ]
    },
    {
      "id": 192,
      "title": "reassigns work in progress and returns the order to the estimate stage",
      "description": "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.\n\n_Automated by `test/integration/orders-lifecycle.spec.ts`._",
      "priority": "high",
      "severity": "critical",
      "type": "functional",
      "layer": "api",
      "automation": "automated",
      "tags": [
        "order-desk:integration.orders.reassign-after-start",
        "api",
        "orders-integration",
        "administration"
      ],
      "suite": "Orders (integration) › Administration",
      "url": "https://qa.gnikitin.dev/demo/test-cases/#case-192",
      "steps": [
        {
          "position": 1,
          "action": "`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."
        },
        {
          "position": 2,
          "action": "Read the order as the previous executor.",
          "expected": "`403`, because the order no longer belongs to that account."
        },
        {
          "position": 3,
          "action": "Read the time entry of the order.",
          "expected": "It still holds 150 minutes recorded by the previous executor."
        },
        {
          "position": 4,
          "action": "Propose a three-hour estimate as `executorB`.",
          "expected": "`201`, so the new executor can price the work before it starts again."
        }
      ]
    },
    {
      "id": 193,
      "title": "returns a declined assignment to the pool and withdraws its pending estimate",
      "description": "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.\n\n_Automated by `test/integration/orders-lifecycle.spec.ts`._",
      "priority": "high",
      "severity": "critical",
      "type": "functional",
      "layer": "api",
      "automation": "automated",
      "tags": [
        "order-desk:integration.orders.decline",
        "api",
        "orders-integration",
        "administration"
      ],
      "suite": "Orders (integration) › Administration",
      "url": "https://qa.gnikitin.dev/demo/test-cases/#case-193",
      "steps": [
        {
          "position": 1,
          "action": "`POST /api/orders/{id}/decline` as `executorA` with the comment `\"No availability this week\"`.",
          "expected": "`201`; the order is `WAITING_DISTRIBUTION` without an executor."
        },
        {
          "position": 2,
          "action": "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."
        },
        {
          "position": 3,
          "action": "Claim the order as `executorB`.",
          "expected": "`201` with `executorB` assigned, so the pool works again."
        }
      ]
    },
    {
      "id": 194,
      "title": "keeps one summary time entry that is editable only while the work is in progress",
      "description": "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.\n\n_Automated by `test/integration/orders-lifecycle.spec.ts`._",
      "priority": "medium",
      "severity": "major",
      "type": "functional",
      "layer": "api",
      "automation": "automated",
      "tags": [
        "order-desk:integration.orders.time-overwrite",
        "api",
        "orders-integration",
        "time-tracking"
      ],
      "suite": "Orders (integration) › Time tracking",
      "url": "https://qa.gnikitin.dev/demo/test-cases/#case-194",
      "steps": [
        {
          "position": 1,
          "action": "Record 90 minutes, then 120 minutes with a comment.",
          "expected": "Both calls answer `201`; the second returns 120 minutes with the comment."
        },
        {
          "position": 2,
          "action": "Read the order as the customer.",
          "expected": "The single `timeEntry` holds 120 minutes."
        },
        {
          "position": 3,
          "action": "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."
        }
      ]
    },
    {
      "id": 50,
      "title": "keeps every case key unique",
      "description": "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.\n\n_Automated by `src/test-support/qase-manifest.spec.ts`._",
      "priority": "low",
      "severity": "minor",
      "type": "functional",
      "layer": "unit",
      "automation": "automated",
      "tags": [
        "order-desk:tooling.qase-manifest.unique-keys",
        "unit",
        "tooling",
        "qase-manifest"
      ],
      "suite": "Tooling › Qase manifest",
      "url": "https://qa.gnikitin.dev/demo/test-cases/#case-50",
      "steps": [
        {
          "position": 1,
          "action": "Collect the `key` of every manifest entry.",
          "expected": "The number of distinct keys equals the number of entries."
        }
      ]
    },
    {
      "id": 51,
      "title": "gives every case a suite path and an automated layer",
      "description": "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.\n\n_Automated by `src/test-support/qase-manifest.spec.ts`._",
      "priority": "low",
      "severity": "minor",
      "type": "functional",
      "layer": "unit",
      "automation": "automated",
      "tags": [
        "order-desk:tooling.qase-manifest.suite-paths",
        "unit",
        "tooling",
        "qase-manifest"
      ],
      "suite": "Tooling › Qase manifest",
      "url": "https://qa.gnikitin.dev/demo/test-cases/#case-51",
      "steps": [
        {
          "position": 1,
          "action": "Walk every manifest entry.",
          "expected": "Each entry has at least one suite segment, and its `layer` is one of `e2e`, `api` or `unit`."
        }
      ]
    },
    {
      "id": 52,
      "title": "resolves generated case IDs only through manifest keys",
      "description": "`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.\n\n_Automated by `src/test-support/qase-manifest.spec.ts`._",
      "priority": "low",
      "severity": "minor",
      "type": "regression",
      "layer": "unit",
      "automation": "automated",
      "tags": [
        "order-desk:tooling.qase-manifest.generated-ids",
        "unit",
        "tooling",
        "qase-manifest"
      ],
      "suite": "Tooling › Qase manifest",
      "url": "https://qa.gnikitin.dev/demo/test-cases/#case-52",
      "steps": [
        {
          "position": 1,
          "action": "Compare the keys of the generated ID map with the manifest keys.",
          "expected": "Every generated key still exists in the manifest."
        }
      ]
    },
    {
      "id": 60,
      "title": "documents every case with a description, steps and layer-specific detail",
      "description": "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.\n\n_Automated by `src/test-support/qase-manifest.spec.ts`._",
      "priority": "low",
      "severity": "minor",
      "type": "functional",
      "layer": "unit",
      "automation": "automated",
      "tags": [
        "order-desk:tooling.qase-manifest.case-content",
        "unit",
        "tooling",
        "qase-manifest"
      ],
      "suite": "Tooling › Qase manifest",
      "url": "https://qa.gnikitin.dev/demo/test-cases/#case-60",
      "steps": [
        {
          "position": 1,
          "action": "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."
        },
        {
          "position": 2,
          "action": "Check the cases of the `api` layer.",
          "expected": "Each of them has preconditions and at least three steps, so it is replayable by hand."
        }
      ]
    },
    {
      "id": 61,
      "title": "links every case to exactly one spec through qc()",
      "description": "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.\n\n_Automated by `src/test-support/qase-manifest.spec.ts`._",
      "priority": "low",
      "severity": "minor",
      "type": "regression",
      "layer": "unit",
      "automation": "automated",
      "tags": [
        "order-desk:tooling.qase-manifest.spec-coverage",
        "unit",
        "tooling",
        "qase-manifest"
      ],
      "suite": "Tooling › Qase manifest",
      "url": "https://qa.gnikitin.dev/demo/test-cases/#case-61",
      "steps": [
        {
          "position": 1,
          "action": "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."
        }
      ]
    },
    {
      "id": 67,
      "title": "links every manifest key to a generated case ID",
      "description": "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.\n\n_Automated by `src/test-support/qase-manifest.spec.ts`._",
      "priority": "high",
      "severity": "major",
      "type": "regression",
      "layer": "unit",
      "automation": "automated",
      "tags": [
        "order-desk:tooling.qase-manifest.linked-ids",
        "unit",
        "tooling",
        "qase-manifest"
      ],
      "suite": "Tooling › Qase manifest",
      "url": "https://qa.gnikitin.dev/demo/test-cases/#case-67",
      "steps": [
        {
          "position": 1,
          "action": "Compare every manifest key with the generated ID map.",
          "expected": "Each key resolves to a numeric TestOps case ID."
        }
      ]
    },
    {
      "id": 117,
      "title": "labels every case with a specific type instead of other",
      "description": "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`.\n\n_Automated by `src/test-support/qase-manifest.spec.ts`._",
      "priority": "low",
      "severity": "minor",
      "type": "functional",
      "layer": "unit",
      "automation": "automated",
      "tags": [
        "order-desk:tooling.qase-manifest.case-type",
        "unit",
        "tooling",
        "qase-manifest"
      ],
      "suite": "Tooling › Qase manifest",
      "url": "https://qa.gnikitin.dev/demo/test-cases/#case-117",
      "steps": [
        {
          "position": 1,
          "action": "Walk every manifest entry and read its `type`.",
          "expected": "Each entry declares a type and none of them is `other`."
        }
      ]
    },
    {
      "id": 63,
      "title": "adopts an existing case by its order-desk tag so a rename keeps its ID",
      "description": "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.\n\n_Automated by `src/test-support/qase/sync-plan.spec.ts`._",
      "priority": "medium",
      "severity": "major",
      "type": "integration",
      "layer": "unit",
      "automation": "automated",
      "tags": [
        "order-desk:tooling.qase-sync.adoption",
        "unit",
        "tooling",
        "qase-sync"
      ],
      "suite": "Tooling › Qase sync",
      "url": "https://qa.gnikitin.dev/demo/test-cases/#case-63",
      "steps": [
        {
          "position": 1,
          "action": "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."
        },
        {
          "position": 2,
          "action": "Inspect the planned archive moves.",
          "expected": "The matched case is not archived, because its key is still in the catalogue."
        }
      ]
    },
    {
      "id": 64,
      "title": "moves a retired case into the Archive suite instead of deleting it",
      "description": "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.\n\n_Automated by `src/test-support/qase/sync-plan.spec.ts`._",
      "priority": "medium",
      "severity": "major",
      "type": "integration",
      "layer": "unit",
      "automation": "automated",
      "tags": [
        "order-desk:tooling.qase-sync.archive",
        "unit",
        "tooling",
        "qase-sync"
      ],
      "suite": "Tooling › Qase sync",
      "url": "https://qa.gnikitin.dev/demo/test-cases/#case-64",
      "steps": [
        {
          "position": 1,
          "action": "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."
        },
        {
          "position": 2,
          "action": "Plan the same sync again with the case already inside `Archive`.",
          "expected": "No further move is planned, so repeated syncs stay idempotent."
        }
      ]
    },
    {
      "id": 65,
      "title": "brings an archived case back to its suite when its key returns",
      "description": "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.\n\n_Automated by `src/test-support/qase/sync-plan.spec.ts`._",
      "priority": "low",
      "severity": "major",
      "type": "integration",
      "layer": "unit",
      "automation": "automated",
      "tags": [
        "order-desk:tooling.qase-sync.restore",
        "unit",
        "tooling",
        "qase-sync"
      ],
      "suite": "Tooling › Qase sync",
      "url": "https://qa.gnikitin.dev/demo/test-cases/#case-65",
      "steps": [
        {
          "position": 1,
          "action": "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."
        },
        {
          "position": 2,
          "action": "Compare the planned target suite with the manifest suite.",
          "expected": "The matched case is patched back into the manifest suite, not left in `Archive`."
        }
      ]
    },
    {
      "id": 66,
      "title": "refuses to guess when two cases carry the same catalogue tag",
      "description": "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.\n\n_Automated by `src/test-support/qase/sync-plan.spec.ts`._",
      "priority": "medium",
      "severity": "critical",
      "type": "integration",
      "layer": "unit",
      "automation": "automated",
      "tags": [
        "order-desk:tooling.qase-sync.conflicts",
        "unit",
        "tooling",
        "qase-sync"
      ],
      "suite": "Tooling › Qase sync",
      "url": "https://qa.gnikitin.dev/demo/test-cases/#case-66",
      "steps": [
        {
          "position": 1,
          "action": "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."
        },
        {
          "position": 2,
          "action": "Run the sync with that plan.",
          "expected": "The sync throws before creating, updating or archiving anything."
        }
      ]
    },
    {
      "id": 68,
      "title": "reports a dry run as drift when applying it would write anything",
      "description": "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.\n\n_Automated by `src/test-support/qase/sync-plan.spec.ts`._",
      "priority": "high",
      "severity": "major",
      "type": "integration",
      "layer": "unit",
      "automation": "automated",
      "tags": [
        "order-desk:tooling.qase-sync.drift",
        "unit",
        "tooling",
        "qase-sync"
      ],
      "suite": "Tooling › Qase sync",
      "url": "https://qa.gnikitin.dev/demo/test-cases/#case-68",
      "steps": [
        {
          "position": 1,
          "action": "Summarize a dry run in which every catalogue entry already matches TestOps.",
          "expected": "No drift is reported and the check passes."
        },
        {
          "position": 2,
          "action": "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."
        }
      ]
    },
    {
      "id": 210,
      "title": "writes each case tag once when a layer repeats a suite slug",
      "description": "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.\n\n_Automated by `src/test-support/qase/sync-plan.spec.ts`._",
      "priority": "medium",
      "severity": "major",
      "type": "integration",
      "layer": "unit",
      "automation": "automated",
      "tags": [
        "order-desk:tooling.qase-sync.tags",
        "unit",
        "tooling",
        "qase-sync"
      ],
      "suite": "Tooling › Qase sync",
      "url": "https://qa.gnikitin.dev/demo/test-cases/#case-210",
      "steps": [
        {
          "position": 1,
          "action": "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."
        },
        {
          "position": 2,
          "action": "Sync that case and plan the sync again.",
          "expected": "The second plan is empty instead of asking for another update."
        }
      ]
    },
    {
      "id": 134,
      "title": "sends the field codes TestOps actually stores instead of the order of its dropdown",
      "description": "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.\n\n_Automated by `src/test-support/qase/enums.spec.ts`._",
      "priority": "high",
      "severity": "major",
      "type": "regression",
      "layer": "unit",
      "automation": "automated",
      "tags": [
        "order-desk:tooling.qase-enums.field-ids",
        "unit",
        "tooling",
        "qase-enums"
      ],
      "suite": "Tooling › Qase enums",
      "url": "https://qa.gnikitin.dev/demo/test-cases/#case-134",
      "steps": [
        {
          "position": 1,
          "action": "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."
        },
        {
          "position": 2,
          "action": "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."
        }
      ]
    },
    {
      "id": 81,
      "title": "records the uploader, size and object key",
      "description": "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.\n\n_Automated by `src/orders/order-files.service.spec.ts`._",
      "priority": "medium",
      "severity": "normal",
      "type": "functional",
      "layer": "unit",
      "automation": "automated",
      "tags": [
        "order-desk:orders.files.stores-declared-metadata",
        "unit",
        "orders",
        "files"
      ],
      "suite": "Archive › Orders",
      "url": "https://qa.gnikitin.dev/demo/test-cases/#case-81",
      "steps": [
        {
          "position": 1,
          "action": "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`."
        }
      ]
    },
    {
      "id": 83,
      "title": "falls back to the stored content type of the object",
      "description": "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.\n\n_Automated by `src/orders/order-files.service.spec.ts`._",
      "priority": "medium",
      "severity": "normal",
      "type": "functional",
      "layer": "unit",
      "automation": "automated",
      "tags": [
        "order-desk:orders.files.download-falls-back-to-stored-type",
        "unit",
        "orders",
        "files"
      ],
      "suite": "Archive › Orders",
      "url": "https://qa.gnikitin.dev/demo/test-cases/#case-83",
      "steps": [
        {
          "position": 1,
          "action": "Call `download` for a row without `contentType` whose object reports `image/png`.",
          "expected": "The result carries `contentType: \"image/png\"` and the stored file name."
        },
        {
          "position": 2,
          "action": "Call `download` for a row and an object that both lack a content type.",
          "expected": "The result carries `contentType: \"application/octet-stream\"`."
        }
      ]
    },
    {
      "id": 136,
      "title": "sends the resolved address as both the real-IP and the forwarded header",
      "description": "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.\n\n_Automated by `src/common/reverse-proxy.spec.ts`._",
      "priority": "high",
      "severity": "major",
      "type": "functional",
      "layer": "unit",
      "automation": "automated",
      "tags": [
        "order-desk:deployment.client-address.forwards-resolved-address",
        "unit",
        "deployment",
        "client-address"
      ],
      "suite": "Archive › Deployment",
      "url": "https://qa.gnikitin.dev/demo/test-cases/#case-136",
      "steps": [
        {
          "position": 1,
          "action": "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."
        }
      ]
    },
    {
      "id": 84,
      "title": "keeps retired categories out of the default list",
      "description": "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.\n\n_Automated by `src/categories/categories.service.spec.ts`._",
      "priority": "high",
      "severity": "major",
      "type": "functional",
      "layer": "unit",
      "automation": "automated",
      "tags": [
        "order-desk:categories.list.hides-inactive",
        "unit",
        "categories",
        "catalogue"
      ],
      "suite": "Categories › Catalogue",
      "url": "https://qa.gnikitin.dev/demo/test-cases/#case-84",
      "steps": [
        {
          "position": 1,
          "action": "Seed one active `Plumbing` category and one retired one, then call `list(false)`.",
          "expected": "Only the active category is returned."
        }
      ]
    },
    {
      "id": 85,
      "title": "shows retired categories when asked for the full catalogue",
      "description": "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.\n\n_Automated by `src/categories/categories.service.spec.ts`._",
      "priority": "medium",
      "severity": "normal",
      "type": "functional",
      "layer": "unit",
      "automation": "automated",
      "tags": [
        "order-desk:categories.list.includes-inactive",
        "unit",
        "categories",
        "catalogue"
      ],
      "suite": "Categories › Catalogue",
      "url": "https://qa.gnikitin.dev/demo/test-cases/#case-85",
      "steps": [
        {
          "position": 1,
          "action": "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."
        }
      ]
    },
    {
      "id": 86,
      "title": "stores a new category with its name trimmed",
      "description": "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.\n\n_Automated by `src/categories/categories.service.spec.ts`._",
      "priority": "medium",
      "severity": "major",
      "type": "functional",
      "layer": "unit",
      "automation": "automated",
      "tags": [
        "order-desk:categories.create.trims-name",
        "unit",
        "categories",
        "catalogue"
      ],
      "suite": "Categories › Catalogue",
      "url": "https://qa.gnikitin.dev/demo/test-cases/#case-86",
      "steps": [
        {
          "position": 1,
          "action": "Call `create(\"  Repair \", \"user-1\")`.",
          "expected": "The returned and stored category is named `Repair`, records `createdById: \"user-1\"` and starts active."
        }
      ]
    },
    {
      "id": 87,
      "title": "renames a category with its name trimmed",
      "description": "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.\n\n_Automated by `src/categories/categories.service.spec.ts`._",
      "priority": "medium",
      "severity": "normal",
      "type": "functional",
      "layer": "unit",
      "automation": "automated",
      "tags": [
        "order-desk:categories.rename.trims-name",
        "unit",
        "categories",
        "catalogue"
      ],
      "suite": "Categories › Catalogue",
      "url": "https://qa.gnikitin.dev/demo/test-cases/#case-87",
      "steps": [
        {
          "position": 1,
          "action": "Call `rename(\"category-1\", \" Painting \")`.",
          "expected": "The stored row `category-1` is named `Painting` and keeps its active flag."
        }
      ]
    },
    {
      "id": 88,
      "title": "retires and restores a category without touching its name",
      "description": "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.\n\n_Automated by `src/categories/categories.service.spec.ts`._",
      "priority": "medium",
      "severity": "major",
      "type": "functional",
      "layer": "unit",
      "automation": "automated",
      "tags": [
        "order-desk:categories.set-active.toggles-flag",
        "unit",
        "categories",
        "catalogue"
      ],
      "suite": "Categories › Catalogue",
      "url": "https://qa.gnikitin.dev/demo/test-cases/#case-88",
      "steps": [
        {
          "position": 1,
          "action": "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`."
        }
      ]
    },
    {
      "id": 90,
      "title": "rejects a category name that is blank or over the length limit",
      "description": "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.\n\n_Automated by `src/categories/category.dto.spec.ts`._",
      "priority": "high",
      "severity": "normal",
      "type": "functional",
      "layer": "unit",
      "automation": "automated",
      "tags": [
        "order-desk:categories.validation.create",
        "unit",
        "categories",
        "request-validation"
      ],
      "suite": "Categories › Request validation",
      "url": "https://qa.gnikitin.dev/demo/test-cases/#case-90",
      "steps": [
        {
          "position": 1,
          "action": "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`."
        }
      ]
    },
    {
      "id": 91,
      "title": "applies the same rules when a category is renamed",
      "description": "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.\n\n_Automated by `src/categories/category.dto.spec.ts`._",
      "priority": "medium",
      "severity": "normal",
      "type": "functional",
      "layer": "unit",
      "automation": "automated",
      "tags": [
        "order-desk:categories.validation.rename",
        "unit",
        "categories",
        "request-validation"
      ],
      "suite": "Categories › Request validation",
      "url": "https://qa.gnikitin.dev/demo/test-cases/#case-91",
      "steps": [
        {
          "position": 1,
          "action": "Validate a 101-character name against `UpdateCategoryDto`.",
          "expected": "The result reports an error for `name`."
        }
      ]
    },
    {
      "id": 99,
      "title": "namespaces a new object under the order that owns it",
      "description": "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.\n\n_Automated by `src/storage/object-storage.service.spec.ts`._",
      "priority": "high",
      "severity": "major",
      "type": "functional",
      "layer": "unit",
      "automation": "automated",
      "tags": [
        "order-desk:storage.objects.namespace",
        "unit",
        "storage",
        "objects"
      ],
      "suite": "Storage › Objects",
      "url": "https://qa.gnikitin.dev/demo/test-cases/#case-99",
      "steps": [
        {
          "position": 1,
          "action": "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/`."
        }
      ]
    },
    {
      "id": 100,
      "title": "stores an upload with its length and content type",
      "description": "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.\n\n_Automated by `src/storage/object-storage.service.spec.ts`._",
      "priority": "high",
      "severity": "critical",
      "type": "functional",
      "layer": "unit",
      "automation": "automated",
      "tags": [
        "order-desk:storage.objects.put",
        "unit",
        "storage",
        "objects"
      ],
      "suite": "Storage › Objects",
      "url": "https://qa.gnikitin.dev/demo/test-cases/#case-100",
      "steps": [
        {
          "position": 1,
          "action": "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`."
        }
      ]
    },
    {
      "id": 101,
      "title": "falls back to a binary content type for untyped uploads",
      "description": "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.\n\n_Automated by `src/storage/object-storage.service.spec.ts`._",
      "priority": "medium",
      "severity": "normal",
      "type": "functional",
      "layer": "unit",
      "automation": "automated",
      "tags": [
        "order-desk:storage.objects.put.default-type",
        "unit",
        "storage",
        "objects"
      ],
      "suite": "Storage › Objects",
      "url": "https://qa.gnikitin.dev/demo/test-cases/#case-101",
      "steps": [
        {
          "position": 1,
          "action": "Call `put` with `mimetype: \"\"`.",
          "expected": "The object is stored with `application/octet-stream` as its content type."
        }
      ]
    },
    {
      "id": 102,
      "title": "returns the stored bytes together with their content type",
      "description": "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.\n\n_Automated by `src/storage/object-storage.service.spec.ts`._",
      "priority": "high",
      "severity": "critical",
      "type": "functional",
      "layer": "unit",
      "automation": "automated",
      "tags": [
        "order-desk:storage.objects.get",
        "unit",
        "storage",
        "objects"
      ],
      "suite": "Storage › Objects",
      "url": "https://qa.gnikitin.dev/demo/test-cases/#case-102",
      "steps": [
        {
          "position": 1,
          "action": "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."
        }
      ]
    },
    {
      "id": 103,
      "title": "fails loudly when the bucket answers without a body",
      "description": "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.\n\n_Automated by `src/storage/object-storage.service.spec.ts`._",
      "priority": "medium",
      "severity": "normal",
      "type": "functional",
      "layer": "unit",
      "automation": "automated",
      "tags": [
        "order-desk:storage.objects.get.empty",
        "unit",
        "storage",
        "objects"
      ],
      "suite": "Storage › Objects",
      "url": "https://qa.gnikitin.dev/demo/test-cases/#case-103",
      "steps": [
        {
          "position": 1,
          "action": "Call `get` while the bucket answers without a body.",
          "expected": "The promise rejects with a message that contains the requested key."
        }
      ]
    },
    {
      "id": 104,
      "title": "deletes one object by key",
      "description": "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.\n\n_Automated by `src/storage/object-storage.service.spec.ts`._",
      "priority": "high",
      "severity": "major",
      "type": "functional",
      "layer": "unit",
      "automation": "automated",
      "tags": [
        "order-desk:storage.objects.delete",
        "unit",
        "storage",
        "objects"
      ],
      "suite": "Storage › Objects",
      "url": "https://qa.gnikitin.dev/demo/test-cases/#case-104",
      "steps": [
        {
          "position": 1,
          "action": "Call `delete` for one of two stored keys.",
          "expected": "The bucket no longer holds that object and still holds the other one."
        }
      ]
    },
    {
      "id": 105,
      "title": "purges the bucket page by page and counts every deletion",
      "description": "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.\n\n_Automated by `src/storage/object-storage.service.spec.ts`._",
      "priority": "high",
      "severity": "critical",
      "type": "functional",
      "layer": "unit",
      "automation": "automated",
      "tags": [
        "order-desk:storage.objects.purge.pages",
        "unit",
        "storage",
        "objects"
      ],
      "suite": "Storage › Objects",
      "url": "https://qa.gnikitin.dev/demo/test-cases/#case-105",
      "steps": [
        {
          "position": 1,
          "action": "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."
        }
      ]
    },
    {
      "id": 106,
      "title": "counts failed deletions instead of aborting the purge",
      "description": "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.\n\n_Automated by `src/storage/object-storage.service.spec.ts`._",
      "priority": "medium",
      "severity": "major",
      "type": "functional",
      "layer": "unit",
      "automation": "automated",
      "tags": [
        "order-desk:storage.objects.purge.failures",
        "unit",
        "storage",
        "objects"
      ],
      "suite": "Storage › Objects",
      "url": "https://qa.gnikitin.dev/demo/test-cases/#case-106",
      "steps": [
        {
          "position": 1,
          "action": "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."
        }
      ]
    },
    {
      "id": 132,
      "title": "reads the bucket settings on the first call instead of at construction",
      "description": "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.\n\n_Automated by `src/storage/object-storage.service.spec.ts`._",
      "priority": "high",
      "severity": "major",
      "type": "functional",
      "layer": "unit",
      "automation": "automated",
      "tags": [
        "order-desk:storage.objects.config-lazy",
        "unit",
        "storage",
        "objects"
      ],
      "suite": "Storage › Objects",
      "url": "https://qa.gnikitin.dev/demo/test-cases/#case-132",
      "steps": [
        {
          "position": 1,
          "action": "Create the service without any `S3_*` setting and call `put`.",
          "expected": "The call rejects with `S3_BUCKET is required`."
        },
        {
          "position": 2,
          "action": "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."
        }
      ]
    },
    {
      "id": 131,
      "title": "loads the auth and database modules without their settings",
      "description": "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.\n\n_Automated by `src/auth/auth.spec.ts`._",
      "priority": "medium",
      "severity": "major",
      "type": "functional",
      "layer": "unit",
      "automation": "automated",
      "tags": [
        "order-desk:auth.config.lazy",
        "unit",
        "auth",
        "configuration"
      ],
      "suite": "Auth › Configuration",
      "url": "https://qa.gnikitin.dev/demo/test-cases/#case-131",
      "steps": [
        {
          "position": 1,
          "action": "Import `auth.ts` and `prisma.service.ts` with a fresh module registry.",
          "expected": "Both imports resolve and neither throws."
        },
        {
          "position": 2,
          "action": "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."
        }
      ]
    },
    {
      "id": 133,
      "title": "answers the handler probe the node adapter mounts it with",
      "description": "`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.\n\n_Automated by `src/auth/auth.spec.ts`._",
      "priority": "high",
      "severity": "blocker",
      "type": "functional",
      "layer": "unit",
      "automation": "automated",
      "tags": [
        "order-desk:auth.config.mounts-handler",
        "unit",
        "auth",
        "configuration"
      ],
      "suite": "Auth › Configuration",
      "url": "https://qa.gnikitin.dev/demo/test-cases/#case-133",
      "steps": [
        {
          "position": 1,
          "action": "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."
        },
        {
          "position": 2,
          "action": "Read `auth.handler`.",
          "expected": "The property is a function, ready to receive a request."
        }
      ]
    },
    {
      "id": 138,
      "title": "keeps the limiter on with the defaults the application documents",
      "description": "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.\n\n_Automated by `src/auth/rate-limit.spec.ts`._",
      "priority": "high",
      "severity": "blocker",
      "type": "security",
      "layer": "unit",
      "automation": "automated",
      "tags": [
        "order-desk:auth.rate-limit.defaults",
        "unit",
        "auth",
        "rate-limiting"
      ],
      "suite": "Auth › Rate limiting",
      "url": "https://qa.gnikitin.dev/demo/test-cases/#case-138",
      "steps": [
        {
          "position": 1,
          "action": "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."
        }
      ]
    },
    {
      "id": 139,
      "title": "reads the switch, the window and the limit from the environment",
      "description": "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.\n\n_Automated by `src/auth/rate-limit.spec.ts`._",
      "priority": "high",
      "severity": "major",
      "type": "functional",
      "layer": "unit",
      "automation": "automated",
      "tags": [
        "order-desk:auth.rate-limit.environment",
        "unit",
        "auth",
        "rate-limiting"
      ],
      "suite": "Auth › Rate limiting",
      "url": "https://qa.gnikitin.dev/demo/test-cases/#case-139",
      "steps": [
        {
          "position": 1,
          "action": "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."
        }
      ]
    },
    {
      "id": 140,
      "title": "refuses a value it cannot read instead of silently ignoring the setting",
      "description": "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.\n\n_Automated by `src/auth/rate-limit.spec.ts`._",
      "priority": "high",
      "severity": "major",
      "type": "security",
      "layer": "unit",
      "automation": "automated",
      "tags": [
        "order-desk:auth.rate-limit.invalid",
        "unit",
        "auth",
        "rate-limiting"
      ],
      "suite": "Auth › Rate limiting",
      "url": "https://qa.gnikitin.dev/demo/test-cases/#case-140",
      "steps": [
        {
          "position": 1,
          "action": "Resolve the settings with `AUTH_RATE_LIMIT_MAX=0`.",
          "expected": "The resolver throws and names `AUTH_RATE_LIMIT_MAX`."
        },
        {
          "position": 2,
          "action": "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."
        }
      ]
    },
    {
      "id": 141,
      "title": "hands the credential rule to the Better Auth instance",
      "description": "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.\n\n_Automated by `src/auth/auth.spec.ts`._",
      "priority": "high",
      "severity": "blocker",
      "type": "security",
      "layer": "unit",
      "automation": "automated",
      "tags": [
        "order-desk:auth.rate-limit.wired-into-instance",
        "unit",
        "auth",
        "rate-limiting"
      ],
      "suite": "Auth › Rate limiting",
      "url": "https://qa.gnikitin.dev/demo/test-cases/#case-141",
      "steps": [
        {
          "position": 1,
          "action": "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."
        }
      ]
    },
    {
      "id": 142,
      "title": "answers the fourth password change within ten seconds with a 429",
      "description": "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.\n\n_Automated by `test/integration/auth-rate-limit.spec.ts`._",
      "priority": "high",
      "severity": "critical",
      "type": "security",
      "layer": "api",
      "automation": "automated",
      "tags": [
        "order-desk:auth.rate-limit.enforced",
        "api",
        "auth",
        "rate-limiting"
      ],
      "suite": "Auth › Rate limiting",
      "url": "https://qa.gnikitin.dev/demo/test-cases/#case-142",
      "steps": [
        {
          "position": 1,
          "action": "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."
        },
        {
          "position": 2,
          "action": "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."
        },
        {
          "position": 3,
          "action": "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."
        }
      ]
    },
    {
      "id": 195,
      "title": "registers a visitor as an active customer without an administrator",
      "description": "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.\n\n_Automated by `test/integration/auth-registration.spec.ts`._",
      "priority": "high",
      "severity": "critical",
      "type": "functional",
      "layer": "api",
      "automation": "automated",
      "tags": [
        "order-desk:integration.auth.self-registration",
        "api",
        "auth",
        "registration"
      ],
      "suite": "Auth › Registration",
      "url": "https://qa.gnikitin.dev/demo/test-cases/#case-195",
      "steps": [
        {
          "position": 1,
          "action": "Send `POST /api/auth/sign-up/email` with a name, a fresh email and a password.",
          "expected": "`200` and a session cookie."
        },
        {
          "position": 2,
          "action": "Read `/api/users/me` with that cookie.",
          "expected": "`200` with the new email and `role: CUSTOMER`."
        },
        {
          "position": 3,
          "action": "List customers with `includeInactive=true` as the administrator.",
          "expected": "The new account is present with `isActive: true`."
        }
      ]
    },
    {
      "id": 196,
      "title": "keeps a self-registered visitor a customer when the body asks for an administrator",
      "description": "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.\n\n_Automated by `test/integration/auth-registration.spec.ts`._",
      "priority": "high",
      "severity": "blocker",
      "type": "security",
      "layer": "api",
      "automation": "automated",
      "tags": [
        "order-desk:integration.auth.registration-ignores-privileged-input",
        "api",
        "auth",
        "registration"
      ],
      "suite": "Auth › Registration",
      "url": "https://qa.gnikitin.dev/demo/test-cases/#case-196",
      "steps": [
        {
          "position": 1,
          "action": "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."
        },
        {
          "position": 2,
          "action": "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."
        },
        {
          "position": 3,
          "action": "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`."
        }
      ]
    },
    {
      "id": 285,
      "title": "creates the administrator with a credential account when none exists",
      "description": "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.\n\n_Automated by `src/auth/admin-account.spec.ts`._",
      "priority": "high",
      "severity": "blocker",
      "type": "functional",
      "layer": "unit",
      "automation": "automated",
      "tags": [
        "order-desk:auth.admin-account.creates-missing-administrator",
        "unit",
        "auth",
        "administrator-provisioning"
      ],
      "suite": "Auth › Administrator provisioning",
      "url": "https://qa.gnikitin.dev/demo/test-cases/#case-285",
      "steps": [
        {
          "position": 1,
          "action": "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."
        },
        {
          "position": 2,
          "action": "Read the account rows of the new user.",
          "expected": "A single `credential` account holds a hash that `verifyPassword` accepts for the environment password."
        }
      ]
    },
    {
      "id": 286,
      "title": "moves a new ADMIN_EMAIL onto the existing administrator and keeps its id",
      "description": "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.\n\n_Automated by `src/auth/admin-account.spec.ts`._",
      "priority": "high",
      "severity": "blocker",
      "type": "functional",
      "layer": "unit",
      "automation": "automated",
      "tags": [
        "order-desk:auth.admin-account.renames-the-single-administrator",
        "unit",
        "auth",
        "administrator-provisioning"
      ],
      "suite": "Auth › Administrator provisioning",
      "url": "https://qa.gnikitin.dev/demo/test-cases/#case-286",
      "steps": [
        {
          "position": 1,
          "action": "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."
        },
        {
          "position": 2,
          "action": "Compare the user rows before and after.",
          "expected": "The same user id now holds the new email, and no second administrator appeared."
        },
        {
          "position": 3,
          "action": "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."
        },
        {
          "position": 4,
          "action": "Verify the stored hash against the new password.",
          "expected": "`verifyPassword` accepts the new password."
        }
      ]
    },
    {
      "id": 287,
      "title": "writes nothing when the stored password already matches ADMIN_PASSWORD",
      "description": "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.\n\n_Automated by `src/auth/admin-account.spec.ts`._",
      "priority": "high",
      "severity": "major",
      "type": "regression",
      "layer": "unit",
      "automation": "automated",
      "tags": [
        "order-desk:auth.admin-account.leaves-a-matching-administrator-alone",
        "unit",
        "auth",
        "administrator-provisioning"
      ],
      "suite": "Auth › Administrator provisioning",
      "url": "https://qa.gnikitin.dev/demo/test-cases/#case-287",
      "steps": [
        {
          "position": 1,
          "action": "Run the provisioning with the same credentials.",
          "expected": "The outcome reports that nothing changed."
        },
        {
          "position": 2,
          "action": "Read the credential account and the sessions.",
          "expected": "The hash string is byte-identical and the sessions still exist."
        }
      ]
    },
    {
      "id": 288,
      "title": "rewrites the password of a disabled administrator and revokes its sessions",
      "description": "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.\n\n_Automated by `src/auth/admin-account.spec.ts`._",
      "priority": "high",
      "severity": "blocker",
      "type": "functional",
      "layer": "unit",
      "automation": "automated",
      "tags": [
        "order-desk:auth.admin-account.replaces-a-stale-password",
        "unit",
        "auth",
        "administrator-provisioning"
      ],
      "suite": "Auth › Administrator provisioning",
      "url": "https://qa.gnikitin.dev/demo/test-cases/#case-288",
      "steps": [
        {
          "position": 1,
          "action": "Run the provisioning with a new `ADMIN_PASSWORD`.",
          "expected": "The outcome reports an update with a password change and no email change."
        },
        {
          "position": 2,
          "action": "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."
        },
        {
          "position": 3,
          "action": "Read the sessions.",
          "expected": "The administrator's sessions are revoked, the customer's session survives."
        }
      ]
    },
    {
      "id": 289,
      "title": "adds the credential account a password-less administrator is missing",
      "description": "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.\n\n_Automated by `src/auth/admin-account.spec.ts`._",
      "priority": "medium",
      "severity": "major",
      "type": "functional",
      "layer": "unit",
      "automation": "automated",
      "tags": [
        "order-desk:auth.admin-account.attaches-a-credential-account",
        "unit",
        "auth",
        "administrator-provisioning"
      ],
      "suite": "Auth › Administrator provisioning",
      "url": "https://qa.gnikitin.dev/demo/test-cases/#case-289",
      "steps": [
        {
          "position": 1,
          "action": "Run the provisioning.",
          "expected": "The outcome reports an update with a password change."
        },
        {
          "position": 2,
          "action": "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."
        }
      ]
    },
    {
      "id": 290,
      "title": "stops instead of promoting an account that already owns ADMIN_EMAIL",
      "description": "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.\n\n_Automated by `src/auth/admin-account.spec.ts`._",
      "priority": "high",
      "severity": "critical",
      "type": "security",
      "layer": "unit",
      "automation": "automated",
      "tags": [
        "order-desk:auth.admin-account.refuses-a-taken-email",
        "unit",
        "auth",
        "administrator-provisioning"
      ],
      "suite": "Auth › Administrator provisioning",
      "url": "https://qa.gnikitin.dev/demo/test-cases/#case-290",
      "steps": [
        {
          "position": 1,
          "action": "Run the provisioning with that email.",
          "expected": "It throws `The account <email> already exists and is not an administrator`."
        },
        {
          "position": 2,
          "action": "Read the user and account rows.",
          "expected": "The account keeps its `CUSTOMER` role, no second user appears and no credential account was written."
        }
      ]
    },
    {
      "id": 291,
      "title": "names the competing administrators instead of renaming one of them",
      "description": "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.\n\n_Automated by `src/auth/admin-account.spec.ts`._",
      "priority": "medium",
      "severity": "major",
      "type": "functional",
      "layer": "unit",
      "automation": "automated",
      "tags": [
        "order-desk:auth.admin-account.refuses-ambiguous-administrators",
        "unit",
        "auth",
        "administrator-provisioning"
      ],
      "suite": "Auth › Administrator provisioning",
      "url": "https://qa.gnikitin.dev/demo/test-cases/#case-291",
      "steps": [
        {
          "position": 1,
          "action": "Run the provisioning with a third email.",
          "expected": "It throws a message that lists both existing administrator emails."
        },
        {
          "position": 2,
          "action": "Read the user rows.",
          "expected": "Both administrators keep their emails; nothing was renamed or created."
        }
      ]
    },
    {
      "id": 292,
      "title": "lower-cases and trims ADMIN_EMAIL before it reaches the database",
      "description": "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.\n\n_Automated by `src/auth/admin-account.spec.ts`._",
      "priority": "medium",
      "severity": "major",
      "type": "functional",
      "layer": "unit",
      "automation": "automated",
      "tags": [
        "order-desk:auth.admin-credentials.normalises-the-email",
        "unit",
        "auth",
        "administrator-credentials"
      ],
      "suite": "Auth › Administrator credentials",
      "url": "https://qa.gnikitin.dev/demo/test-cases/#case-292",
      "steps": [
        {
          "position": 1,
          "action": "Read the credentials from that environment.",
          "expected": "The address comes back trimmed and lower-cased."
        }
      ]
    },
    {
      "id": 293,
      "title": "rejects ADMIN_PASSWORD below the length Better Auth accepts",
      "description": "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.\n\n_Automated by `src/auth/admin-account.spec.ts`._",
      "priority": "medium",
      "severity": "major",
      "type": "functional",
      "layer": "unit",
      "automation": "automated",
      "tags": [
        "order-desk:auth.admin-credentials.refuses-a-short-password",
        "unit",
        "auth",
        "administrator-credentials"
      ],
      "suite": "Auth › Administrator credentials",
      "url": "https://qa.gnikitin.dev/demo/test-cases/#case-293",
      "steps": [
        {
          "position": 1,
          "action": "Read the credentials from that environment.",
          "expected": "It throws `ADMIN_PASSWORD must be at least 8 characters` before any database write."
        }
      ]
    },
    {
      "id": 135,
      "title": "replaces the forwarded address instead of appending to it",
      "description": "`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.\n\n_Automated by `src/common/reverse-proxy.spec.ts`._",
      "priority": "high",
      "severity": "critical",
      "type": "security",
      "layer": "unit",
      "automation": "automated",
      "tags": [
        "order-desk:deployment.client-address.overwrites-forwarded-for",
        "unit",
        "deployment",
        "client-address"
      ],
      "suite": "Deployment › Client address",
      "url": "https://qa.gnikitin.dev/demo/test-cases/#case-135",
      "steps": [
        {
          "position": 1,
          "action": "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`."
        },
        {
          "position": 2,
          "action": "Search the whole file for `$proxy_add_x_forwarded_for`.",
          "expected": "No occurrence remains, so no other location can append a client-supplied value."
        },
        {
          "position": 3,
          "action": "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."
        }
      ]
    },
    {
      "id": 137,
      "title": "takes CF-Connecting-IP only from the tunnel and the container network",
      "description": "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.\n\n_Automated by `src/common/reverse-proxy.spec.ts`._",
      "priority": "high",
      "severity": "critical",
      "type": "security",
      "layer": "unit",
      "automation": "automated",
      "tags": [
        "order-desk:deployment.client-address.trusts-cloudflare",
        "unit",
        "deployment",
        "client-address"
      ],
      "suite": "Deployment › Client address",
      "url": "https://qa.gnikitin.dev/demo/test-cases/#case-137",
      "steps": [
        {
          "position": 1,
          "action": "Read the `real_ip_header` directive.",
          "expected": "It names `CF-Connecting-IP`, the header Cloudflare sets at the edge."
        },
        {
          "position": 2,
          "action": "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."
        },
        {
          "position": 3,
          "action": "Read the `real_ip_recursive` directive.",
          "expected": "It is `off`, so the header is not walked as a chain."
        }
      ]
    },
    {
      "id": 160,
      "title": "refuses to let the browser re-interpret a declared type",
      "description": "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.\n\n_Automated by `src/common/reverse-proxy.spec.ts`._",
      "priority": "high",
      "severity": "major",
      "type": "security",
      "layer": "unit",
      "automation": "automated",
      "tags": [
        "order-desk:deployment.headers.nosniff",
        "deployment",
        "response-headers",
        "unit"
      ],
      "suite": "Deployment › Response headers",
      "url": "https://qa.gnikitin.dev/demo/test-cases/#case-160",
      "steps": [
        {
          "position": 1,
          "action": "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."
        }
      ]
    },
    {
      "id": 162,
      "title": "runs the API as the unprivileged user without a writable home",
      "description": "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.\n\n_Automated by `src/common/container-hardening.spec.ts`._",
      "priority": "high",
      "severity": "major",
      "type": "security",
      "layer": "unit",
      "automation": "automated",
      "tags": [
        "order-desk:deployment.container.non-root",
        "unit",
        "deployment",
        "container-hardening"
      ],
      "suite": "Deployment › Container hardening",
      "url": "https://qa.gnikitin.dev/demo/test-cases/#case-162",
      "steps": [
        {
          "position": 1,
          "action": "Collect every `USER` directive of `apps/api/Dockerfile` and take the last one.",
          "expected": "It is `node`, so no later directive brings `root` back."
        },
        {
          "position": 2,
          "action": "Read the `CMD` line.",
          "expected": "It runs `prisma migrate deploy` and then `exec node dist/main.js`, and it never calls `pnpm`."
        }
      ]
    },
    {
      "id": 163,
      "title": "keeps the root filesystem read-only inside a bounded container",
      "description": "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.\n\n_Automated by `src/common/container-hardening.spec.ts`._",
      "priority": "high",
      "severity": "major",
      "type": "security",
      "layer": "unit",
      "automation": "automated",
      "tags": [
        "order-desk:deployment.container.read-only-filesystem-and-limits",
        "unit",
        "deployment",
        "container-hardening"
      ],
      "suite": "Deployment › Container hardening",
      "url": "https://qa.gnikitin.dev/demo/test-cases/#case-163",
      "steps": [
        {
          "position": 1,
          "action": "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`."
        },
        {
          "position": 2,
          "action": "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."
        }
      ]
    },
    {
      "id": 152,
      "title": "recognises the accepted formats by their signature",
      "description": "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.\n\n_Automated by `src/common/file-signature.spec.ts`._",
      "priority": "high",
      "severity": "major",
      "type": "security",
      "layer": "unit",
      "automation": "automated",
      "tags": [
        "order-desk:files.signature.detected-types",
        "unit",
        "files",
        "content-type"
      ],
      "suite": "Files › Content type",
      "url": "https://qa.gnikitin.dev/demo/test-cases/#case-152",
      "steps": [
        {
          "position": 1,
          "action": "Detect the type of a PNG, a JPEG, a GIF, a WebP and a PDF.",
          "expected": "Each call answers with its own media type."
        },
        {
          "position": 2,
          "action": "Read the documented allowlist.",
          "expected": "It reads `PNG, JPEG, GIF, WebP and PDF`."
        }
      ]
    },
    {
      "id": 153,
      "title": "refuses a file whose bytes are not an accepted format",
      "description": "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.\n\n_Automated by `src/common/file-signature.spec.ts`._",
      "priority": "high",
      "severity": "critical",
      "type": "security",
      "layer": "unit",
      "automation": "automated",
      "tags": [
        "order-desk:files.signature.rejects-unknown",
        "unit",
        "files",
        "content-type"
      ],
      "suite": "Files › Content type",
      "url": "https://qa.gnikitin.dev/demo/test-cases/#case-153",
      "steps": [
        {
          "position": 1,
          "action": "Detect the type of an HTML document, an `MZ` executable, a ZIP archive and an empty buffer.",
          "expected": "Every call answers `undefined`."
        },
        {
          "position": 2,
          "action": "Detect the type of a PNG signature truncated to four bytes and of a `RIFF`/`WAVE` file.",
          "expected": "Both answer `undefined`."
        }
      ]
    },
    {
      "id": 173,
      "title": "numbers issued invoices sequentially and snapshots the accepted work",
      "description": "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.\n\n_Automated by `test/integration/invoices-lifecycle.spec.ts`._",
      "priority": "high",
      "severity": "critical",
      "type": "functional",
      "layer": "api",
      "automation": "automated",
      "tags": [
        "order-desk:integration.invoices.numbering",
        "api",
        "invoices-integration",
        "issuing"
      ],
      "suite": "Invoices (integration) › Issuing",
      "url": "https://qa.gnikitin.dev/demo/test-cases/#case-173",
      "steps": [
        {
          "position": 1,
          "action": "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."
        },
        {
          "position": 2,
          "action": "Issue an invoice for the second order.",
          "expected": "The sequence segment is exactly one greater than the previous invoice."
        },
        {
          "position": 3,
          "action": "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."
        }
      ]
    },
    {
      "id": 174,
      "title": "refuses a second active invoice for the same order",
      "description": "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.\n\n_Automated by `test/integration/invoices-lifecycle.spec.ts`._",
      "priority": "high",
      "severity": "critical",
      "type": "functional",
      "layer": "api",
      "automation": "automated",
      "tags": [
        "order-desk:integration.invoices.one-active",
        "api",
        "invoices-integration",
        "issuing"
      ],
      "suite": "Invoices (integration) › Issuing",
      "url": "https://qa.gnikitin.dev/demo/test-cases/#case-174",
      "steps": [
        {
          "position": 1,
          "action": "Issue an invoice for the order again as the administrator.",
          "expected": "`409` with `code: CONFLICT` and the message about an already active invoice."
        },
        {
          "position": 2,
          "action": "Read the order as its customer.",
          "expected": "It still carries exactly one invoice, the original one, and that invoice is `ISSUED`."
        },
        {
          "position": 3,
          "action": "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."
        }
      ]
    },
    {
      "id": 175,
      "title": "voids an unpaid invoice with a reason and reissues it under a new number",
      "description": "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.\n\n_Automated by `test/integration/invoices-lifecycle.spec.ts`._",
      "priority": "high",
      "severity": "critical",
      "type": "functional",
      "layer": "api",
      "automation": "automated",
      "tags": [
        "order-desk:integration.invoices.void-and-reissue",
        "api",
        "invoices-integration",
        "voiding"
      ],
      "suite": "Invoices (integration) › Voiding",
      "url": "https://qa.gnikitin.dev/demo/test-cases/#case-175",
      "steps": [
        {
          "position": 1,
          "action": "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."
        },
        {
          "position": 2,
          "action": "Issue a replacement invoice for the same order.",
          "expected": "`201` with a different invoice id and a greater sequence segment than the voided invoice."
        },
        {
          "position": 3,
          "action": "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`."
        }
      ]
    },
    {
      "id": 176,
      "title": "refuses to void an invoice after the customer has paid it",
      "description": "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.\n\n_Automated by `test/integration/invoices-lifecycle.spec.ts`._",
      "priority": "high",
      "severity": "critical",
      "type": "functional",
      "layer": "api",
      "automation": "automated",
      "tags": [
        "order-desk:integration.invoices.void-after-payment",
        "api",
        "invoices-integration",
        "voiding"
      ],
      "suite": "Invoices (integration) › Voiding",
      "url": "https://qa.gnikitin.dev/demo/test-cases/#case-176",
      "steps": [
        {
          "position": 1,
          "action": "Void the paid invoice with a reason as the administrator.",
          "expected": "`409` with `code: CONFLICT`."
        },
        {
          "position": 2,
          "action": "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."
        },
        {
          "position": 3,
          "action": "Read the order status.",
          "expected": "The order is still `INVOICE_PAID`, so the payment cannot be undone by voiding."
        }
      ]
    },
    {
      "id": 177,
      "title": "reviews a receipt, accepts a new upload after a rejection and marks the invoice paid",
      "description": "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.\n\n_Automated by `test/integration/invoices-lifecycle.spec.ts`._",
      "priority": "high",
      "severity": "critical",
      "type": "functional",
      "layer": "api",
      "automation": "automated",
      "tags": [
        "order-desk:integration.invoices.receipt-cycle",
        "api",
        "invoices-integration",
        "payment-review"
      ],
      "suite": "Invoices (integration) › Payment review",
      "url": "https://qa.gnikitin.dev/demo/test-cases/#case-177",
      "steps": [
        {
          "position": 1,
          "action": "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`."
        },
        {
          "position": 2,
          "action": "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`."
        },
        {
          "position": 3,
          "action": "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`."
        },
        {
          "position": 4,
          "action": "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."
        }
      ]
    },
    {
      "id": 178,
      "title": "keeps the receipt away from the executor and serves it to the administrator as a download",
      "description": "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.\n\n_Automated by `test/integration/invoices-lifecycle.spec.ts`._",
      "priority": "high",
      "severity": "critical",
      "type": "security",
      "layer": "api",
      "automation": "automated",
      "tags": [
        "order-desk:integration.invoices.receipt-access",
        "api",
        "invoices-integration",
        "payment-review"
      ],
      "suite": "Invoices (integration) › Payment review",
      "url": "https://qa.gnikitin.dev/demo/test-cases/#case-178",
      "steps": [
        {
          "position": 1,
          "action": "Download the receipt as the executor assigned to the order.",
          "expected": "`403` with `code: FORBIDDEN`."
        },
        {
          "position": 2,
          "action": "Download the receipt as a different customer.",
          "expected": "`403` with `code: FORBIDDEN`."
        },
        {
          "position": 3,
          "action": "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."
        }
      ]
    },
    {
      "id": 199,
      "title": "accepts a receipt while the order already holds its attachment quota",
      "description": "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.\n\n_Automated by `test/integration/invoices-lifecycle.spec.ts`._",
      "priority": "high",
      "severity": "critical",
      "type": "functional",
      "layer": "api",
      "automation": "automated",
      "tags": [
        "order-desk:integration.invoices.receipt-quota-exempt",
        "api",
        "invoices-integration",
        "payment-review"
      ],
      "suite": "Invoices (integration) › Payment review",
      "url": "https://qa.gnikitin.dev/demo/test-cases/#case-199",
      "steps": [
        {
          "position": 1,
          "action": "Issue an invoice for the accepted order as the administrator.",
          "expected": "`201` with status `ISSUED` for an order that already holds three attachments."
        },
        {
          "position": 2,
          "action": "Upload a receipt to `/orders/{id}/invoices/{invoiceId}/payment-reports`.",
          "expected": "`201` with a `PENDING` report named `receipt.pdf`."
        },
        {
          "position": 3,
          "action": "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."
        }
      ]
    },
    {
      "id": 179,
      "title": "completes a paid order once and refuses the second completion",
      "description": "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.\n\n_Automated by `test/integration/invoices-lifecycle.spec.ts`._",
      "priority": "high",
      "severity": "critical",
      "type": "functional",
      "layer": "api",
      "automation": "automated",
      "tags": [
        "order-desk:integration.invoices.complete-after-payment",
        "api",
        "invoices-integration",
        "completion"
      ],
      "suite": "Invoices (integration) › Completion",
      "url": "https://qa.gnikitin.dev/demo/test-cases/#case-179",
      "steps": [
        {
          "position": 1,
          "action": "Complete the order as the administrator.",
          "expected": "`201` with status `COMPLETED` and a `completedAt` timestamp."
        },
        {
          "position": 2,
          "action": "Complete the same order again.",
          "expected": "`409` with `code: CONFLICT`."
        },
        {
          "position": 3,
          "action": "Read the order as the customer.",
          "expected": "The order is `COMPLETED` and its last history entry records `INVOICE_PAID` to `COMPLETED`."
        }
      ]
    },
    {
      "id": 180,
      "title": "serves the invoice PDF to the participants and hides it from another customer",
      "description": "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.\n\n_Automated by `test/integration/invoices-lifecycle.spec.ts`._",
      "priority": "medium",
      "severity": "major",
      "type": "functional",
      "layer": "api",
      "automation": "automated",
      "tags": [
        "order-desk:integration.invoices.pdf-stream",
        "api",
        "invoices-integration",
        "documents"
      ],
      "suite": "Invoices (integration) › Documents",
      "url": "https://qa.gnikitin.dev/demo/test-cases/#case-180",
      "steps": [
        {
          "position": 1,
          "action": "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."
        },
        {
          "position": 2,
          "action": "Download the same PDF as the assigned executor.",
          "expected": "`200` as well, because the executor sees the invoice amounts."
        },
        {
          "position": 3,
          "action": "Download the same PDF as another customer.",
          "expected": "`403`, because the order is not visible to that account."
        }
      ]
    },
    {
      "id": 200,
      "title": "Saves a new order as a draft and leaves it editable",
      "description": "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.\n\n_Automated by `tests/orders/customer-orders.spec.ts`._",
      "priority": "high",
      "severity": "critical",
      "type": "functional",
      "layer": "e2e",
      "automation": "automated",
      "tags": [
        "order-desk-e2e:orders.draft.create",
        "e2e",
        "orders",
        "creating"
      ],
      "suite": "E2E › Orders › Creating",
      "url": "https://qa.gnikitin.dev/demo/test-cases/#case-200",
      "steps": [
        {
          "position": 1,
          "action": "Open the customer panel.",
          "expected": "The panel is empty: the empty state is visible instead of an order list."
        },
        {
          "position": 2,
          "action": "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."
        },
        {
          "position": 3,
          "action": "Reload the panel.",
          "expected": "The same row is still there with the status label Draft, and Edit is offered for it."
        }
      ]
    },
    {
      "id": 201,
      "title": "Creates and submits an order in one form submission",
      "description": "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.\n\n_Automated by `tests/orders/customer-orders.spec.ts`._",
      "priority": "high",
      "severity": "critical",
      "type": "functional",
      "layer": "e2e",
      "automation": "automated",
      "tags": [
        "order-desk-e2e:orders.draft.create-submit",
        "e2e",
        "orders",
        "creating"
      ],
      "suite": "E2E › Orders › Creating",
      "url": "https://qa.gnikitin.dev/demo/test-cases/#case-201",
      "steps": [
        {
          "position": 1,
          "action": "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."
        },
        {
          "position": 2,
          "action": "Look at the row's actions.",
          "expected": "The submit action is not offered, because the order is past the draft status."
        },
        {
          "position": 3,
          "action": "Reload the panel.",
          "expected": "The row still shows Awaiting distribution."
        }
      ]
    },
    {
      "id": 202,
      "title": "Keeps the optional due date and location on a saved draft",
      "description": "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.\n\n_Automated by `tests/orders/customer-orders.spec.ts`._",
      "priority": "medium",
      "severity": "major",
      "type": "functional",
      "layer": "e2e",
      "automation": "automated",
      "tags": [
        "order-desk-e2e:orders.draft.create-optional",
        "e2e",
        "orders",
        "creating"
      ],
      "suite": "E2E › Orders › Creating",
      "url": "https://qa.gnikitin.dev/demo/test-cases/#case-202",
      "steps": [
        {
          "position": 1,
          "action": "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."
        },
        {
          "position": 2,
          "action": "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."
        },
        {
          "position": 3,
          "action": "Close the card, reload the panel and open the card again.",
          "expected": "Both values are unchanged."
        }
      ]
    },
    {
      "id": 203,
      "title": "Submits a draft without an executor and puts it in the pool",
      "description": "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.\n\n_Automated by `tests/orders/customer-orders.spec.ts`._",
      "priority": "high",
      "severity": "critical",
      "type": "functional",
      "layer": "e2e",
      "automation": "automated",
      "tags": [
        "order-desk-e2e:orders.draft.submit-pool",
        "e2e",
        "orders",
        "submitting"
      ],
      "suite": "E2E › Orders › Submitting",
      "url": "https://qa.gnikitin.dev/demo/test-cases/#case-203",
      "steps": [
        {
          "position": 1,
          "action": "Open the customer panel.",
          "expected": "The row shows Draft and offers the submit action for that order."
        },
        {
          "position": 2,
          "action": "Click the submit action of the row.",
          "expected": "The same row shows Awaiting distribution and no longer offers the submit action."
        },
        {
          "position": 3,
          "action": "Reload the panel.",
          "expected": "The status is still Awaiting distribution."
        }
      ]
    },
    {
      "id": 204,
      "title": "Submits a draft with a chosen executor and assigns it",
      "description": "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.\n\n_Automated by `tests/orders/customer-orders.spec.ts`._",
      "priority": "high",
      "severity": "critical",
      "type": "functional",
      "layer": "e2e",
      "automation": "automated",
      "tags": [
        "order-desk-e2e:orders.draft.submit-executor",
        "e2e",
        "orders",
        "submitting"
      ],
      "suite": "E2E › Orders › Submitting",
      "url": "https://qa.gnikitin.dev/demo/test-cases/#case-204",
      "steps": [
        {
          "position": 1,
          "action": "Open the customer panel.",
          "expected": "The row shows Draft and names the executor it carries."
        },
        {
          "position": 2,
          "action": "Click the submit action of the row.",
          "expected": "The row shows Assigned and not Awaiting distribution."
        },
        {
          "position": 3,
          "action": "Reload the panel.",
          "expected": "The row still shows Assigned."
        }
      ]
    },
    {
      "id": 206,
      "title": "Offers a submitted order to executors in the pool",
      "description": "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.\n\n_Automated by `tests/orders/customer-orders.spec.ts`._",
      "priority": "high",
      "severity": "critical",
      "type": "functional",
      "layer": "e2e",
      "automation": "automated",
      "tags": [
        "order-desk-e2e:orders.submit.pool-visibility",
        "e2e",
        "orders",
        "submitting"
      ],
      "suite": "E2E › Orders › Submitting",
      "url": "https://qa.gnikitin.dev/demo/test-cases/#case-206",
      "steps": [
        {
          "position": 1,
          "action": "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."
        },
        {
          "position": 2,
          "action": "Sign in as the customer, open the panel and click the submit action of the row.",
          "expected": "The row shows Awaiting distribution."
        },
        {
          "position": 3,
          "action": "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."
        }
      ]
    },
    {
      "id": 205,
      "title": "Rejects submitting the same order twice",
      "description": "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.\n\n_Automated by `tests/orders/customer-orders.spec.ts`._",
      "priority": "medium",
      "severity": "major",
      "type": "regression",
      "layer": "e2e",
      "automation": "automated",
      "tags": [
        "order-desk-e2e:orders.draft.submit-again",
        "e2e",
        "orders",
        "guards"
      ],
      "suite": "E2E › Orders › Guards",
      "url": "https://qa.gnikitin.dev/demo/test-cases/#case-205",
      "steps": [
        {
          "position": 1,
          "action": "Open the customer panel.",
          "expected": "The row shows Awaiting distribution and the submit action is not offered, because the UI already reflects the guard."
        },
        {
          "position": 2,
          "action": "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."
        },
        {
          "position": 3,
          "action": "Reload the panel.",
          "expected": "Exactly one row carries that title and its status is still Awaiting distribution."
        }
      ]
    },
    {
      "id": 241,
      "title": "Refuses a claim on an order another executor already took",
      "description": "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.\n\n_Automated by `tests/executor/executor-orders.spec.ts`._",
      "priority": "medium",
      "severity": "major",
      "type": "regression",
      "layer": "e2e",
      "automation": "automated",
      "tags": [
        "order-desk-e2e:executor.pool.claim-locked",
        "e2e",
        "orders",
        "guards"
      ],
      "suite": "E2E › Orders › Guards",
      "url": "https://qa.gnikitin.dev/demo/test-cases/#case-241",
      "steps": [
        {
          "position": 1,
          "action": "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."
        },
        {
          "position": 2,
          "action": "Send a claim for the order to the API with the second executor's session.",
          "expected": "The API answers 409 with a state conflict."
        },
        {
          "position": 3,
          "action": "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."
        }
      ]
    },
    {
      "id": 239,
      "title": "Claims an order from the pool and becomes its executor",
      "description": "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.\n\n_Automated by `tests/executor/executor-orders.spec.ts`._",
      "priority": "high",
      "severity": "critical",
      "type": "functional",
      "layer": "e2e",
      "automation": "automated",
      "tags": [
        "order-desk-e2e:executor.pool.claim",
        "e2e",
        "orders",
        "claiming"
      ],
      "suite": "E2E › Orders › Claiming",
      "url": "https://qa.gnikitin.dev/demo/test-cases/#case-239",
      "steps": [
        {
          "position": 1,
          "action": "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."
        },
        {
          "position": 2,
          "action": "Click the claim action of the order.",
          "expected": "The claim action disappears and the estimate form is offered for the same order."
        },
        {
          "position": 3,
          "action": "Open the order card.",
          "expected": "The card reads as assigned and names this executor."
        },
        {
          "position": 4,
          "action": "Refresh the panel.",
          "expected": "The estimate form is still offered and no claim action is rendered, so the ownership survived a fresh read."
        }
      ]
    },
    {
      "id": 240,
      "title": "Shows an order submitted with the executor chosen as assigned already",
      "description": "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.\n\n_Automated by `tests/executor/executor-orders.spec.ts`._",
      "priority": "high",
      "severity": "major",
      "type": "functional",
      "layer": "e2e",
      "automation": "automated",
      "tags": [
        "order-desk-e2e:executor.order.preassigned",
        "e2e",
        "orders",
        "claiming"
      ],
      "suite": "E2E › Orders › Claiming",
      "url": "https://qa.gnikitin.dev/demo/test-cases/#case-240",
      "steps": [
        {
          "position": 1,
          "action": "Sign in as the executor and open the executor panel.",
          "expected": "The order is listed without a claim action."
        },
        {
          "position": 2,
          "action": "Look at the row's actions.",
          "expected": "The estimate form is offered, so the order needs a price before work can start."
        },
        {
          "position": 3,
          "action": "Open the order card.",
          "expected": "The card reads as assigned and names this executor."
        }
      ]
    },
    {
      "id": 242,
      "title": "Opens a pooled order and reads the full description",
      "description": "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.\n\n_Automated by `tests/executor/executor-orders.spec.ts`._",
      "priority": "medium",
      "severity": "major",
      "type": "functional",
      "layer": "e2e",
      "automation": "automated",
      "tags": [
        "order-desk-e2e:executor.pool.detail",
        "e2e",
        "orders",
        "claiming"
      ],
      "suite": "E2E › Orders › Claiming",
      "url": "https://qa.gnikitin.dev/demo/test-cases/#case-242",
      "steps": [
        {
          "position": 1,
          "action": "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."
        },
        {
          "position": 2,
          "action": "Close the card.",
          "expected": "The address is the panel route and the order still offers its claim action."
        }
      ]
    },
    {
      "id": 243,
      "title": "Proposes an estimate and leaves the order assigned",
      "description": "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.\n\n_Automated by `tests/executor/executor-orders.spec.ts`._",
      "priority": "high",
      "severity": "critical",
      "type": "functional",
      "layer": "e2e",
      "automation": "automated",
      "tags": [
        "order-desk-e2e:executor.estimate.propose",
        "e2e",
        "orders",
        "estimating"
      ],
      "suite": "E2E › Orders › Estimating",
      "url": "https://qa.gnikitin.dev/demo/test-cases/#case-243",
      "steps": [
        {
          "position": 1,
          "action": "Sign in as the executor and open the executor panel.",
          "expected": "The order offers the hours field and its submit control."
        },
        {
          "position": 2,
          "action": "Enter three hours and submit the estimate.",
          "expected": "The form is replaced by the stored proposal."
        },
        {
          "position": 3,
          "action": "Open the order card.",
          "expected": "The card still reads as assigned, not as in progress."
        },
        {
          "position": 4,
          "action": "Read the order through the API as the executor.",
          "expected": "The order carries one pending estimate of three hours worth the rate times three."
        }
      ]
    },
    {
      "id": 244,
      "title": "Offers the proposed estimate to the customer for a decision",
      "description": "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.\n\n_Automated by `tests/executor/executor-orders.spec.ts`._",
      "priority": "high",
      "severity": "critical",
      "type": "functional",
      "layer": "e2e",
      "automation": "automated",
      "tags": [
        "order-desk-e2e:executor.estimate.handoff",
        "e2e",
        "orders",
        "estimating"
      ],
      "suite": "E2E › Orders › Estimating",
      "url": "https://qa.gnikitin.dev/demo/test-cases/#case-244",
      "steps": [
        {
          "position": 1,
          "action": "Sign in as the customer and open the customer panel.",
          "expected": "The order's row reads as assigned."
        },
        {
          "position": 2,
          "action": "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."
        },
        {
          "position": 3,
          "action": "Open the order card.",
          "expected": "The card still reads as assigned, because only the answer moves the order on."
        }
      ]
    },
    {
      "id": 227,
      "title": "Edits a draft order and the change survives a reload",
      "description": "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.\n\n_Automated by `tests/orders/customer-orders-edit.spec.ts`._",
      "priority": "high",
      "severity": "critical",
      "type": "functional",
      "layer": "e2e",
      "automation": "automated",
      "tags": [
        "order-desk-e2e:orders.draft.edit",
        "e2e",
        "customer-orders",
        "editing"
      ],
      "suite": "E2E › Customer orders › Editing",
      "url": "https://qa.gnikitin.dev/demo/test-cases/#case-227",
      "steps": [
        {
          "position": 1,
          "action": "Sign in as the customer and open the panel.",
          "expected": "The draft row offers its draft actions, including the edit action."
        },
        {
          "position": 2,
          "action": "Click the edit action of the row.",
          "expected": "The edit form opens with the stored title and description prefilled."
        },
        {
          "position": 3,
          "action": "Change the title and the description and save the draft.",
          "expected": "The form closes and the row shows the new title."
        },
        {
          "position": 4,
          "action": "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."
        }
      ]
    },
    {
      "id": 228,
      "title": "Refuses to edit an order that already left the draft",
      "description": "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.\n\n_Automated by `tests/orders/customer-orders-edit.spec.ts`._",
      "priority": "medium",
      "severity": "major",
      "type": "security",
      "layer": "e2e",
      "automation": "automated",
      "tags": [
        "order-desk-e2e:orders.draft.edit-after-submit",
        "e2e",
        "customer-orders",
        "guards"
      ],
      "suite": "E2E › Customer orders › Guards",
      "url": "https://qa.gnikitin.dev/demo/test-cases/#case-228",
      "steps": [
        {
          "position": 1,
          "action": "Sign in as the customer and open the panel.",
          "expected": "The submitted row offers no edit action and no draft actions block."
        },
        {
          "position": 2,
          "action": "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."
        },
        {
          "position": 3,
          "action": "Reload the panel.",
          "expected": "The row still shows the original title and the order is still awaiting distribution."
        }
      ]
    },
    {
      "id": 231,
      "title": "Refuses a customer cancellation once work has started",
      "description": "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.\n\n_Automated by `tests/orders/customer-orders-edit.spec.ts`._",
      "priority": "medium",
      "severity": "major",
      "type": "security",
      "layer": "e2e",
      "automation": "automated",
      "tags": [
        "order-desk-e2e:orders.cancel.after-work-by-customer",
        "e2e",
        "customer-orders",
        "guards"
      ],
      "suite": "E2E › Customer orders › Guards",
      "url": "https://qa.gnikitin.dev/demo/test-cases/#case-231",
      "steps": [
        {
          "position": 1,
          "action": "Sign in as the customer and open the order card.",
          "expected": "The card offers no cancel form."
        },
        {
          "position": 2,
          "action": "Send a cancellation to the API with the page's own session.",
          "expected": "The API answers 403 forbidden, not a state conflict."
        },
        {
          "position": 3,
          "action": "Reload the panel.",
          "expected": "The order is still in progress, so the refusal changed nothing."
        }
      ]
    },
    {
      "id": 229,
      "title": "Cancels a submitted order before work starts",
      "description": "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.\n\n_Automated by `tests/orders/customer-orders-edit.spec.ts`._",
      "priority": "high",
      "severity": "critical",
      "type": "functional",
      "layer": "e2e",
      "automation": "automated",
      "tags": [
        "order-desk-e2e:orders.cancel.before-work",
        "e2e",
        "customer-orders",
        "cancellation"
      ],
      "suite": "E2E › Customer orders › Cancellation",
      "url": "https://qa.gnikitin.dev/demo/test-cases/#case-229",
      "steps": [
        {
          "position": 1,
          "action": "Sign in as the executor and open the executor panel.",
          "expected": "The order is listed in the pool and offers its claim action."
        },
        {
          "position": 2,
          "action": "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."
        },
        {
          "position": 3,
          "action": "Sign in as the executor again and open the executor panel.",
          "expected": "The order offers no claim action, because it left the pool."
        }
      ]
    },
    {
      "id": 230,
      "title": "Cancelling an assigned order withdraws the estimate awaiting an answer",
      "description": "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.\n\n_Automated by `tests/orders/customer-orders-edit.spec.ts`._",
      "priority": "medium",
      "severity": "major",
      "type": "functional",
      "layer": "e2e",
      "automation": "automated",
      "tags": [
        "order-desk-e2e:orders.cancel.withdraws-estimate",
        "e2e",
        "customer-orders",
        "cancellation"
      ],
      "suite": "E2E › Customer orders › Cancellation",
      "url": "https://qa.gnikitin.dev/demo/test-cases/#case-230",
      "steps": [
        {
          "position": 1,
          "action": "Sign in as the customer and open the panel.",
          "expected": "The row offers the answer block for the pending estimate."
        },
        {
          "position": 2,
          "action": "Open the order card and submit the cancel form.",
          "expected": "The cancel form disappears."
        },
        {
          "position": 3,
          "action": "Close the card and look at the row.",
          "expected": "The estimate answer block is gone, and the order reads as cancelled."
        },
        {
          "position": 4,
          "action": "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."
        }
      ]
    },
    {
      "id": 232,
      "title": "Walks a long list with the next and previous page controls",
      "description": "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.\n\n_Automated by `tests/orders/customer-order-lists.spec.ts`._",
      "priority": "high",
      "severity": "critical",
      "type": "functional",
      "layer": "e2e",
      "automation": "automated",
      "tags": [
        "order-desk-e2e:orders.list.paging",
        "e2e",
        "customer-orders",
        "paging"
      ],
      "suite": "E2E › Customer orders › Paging",
      "url": "https://qa.gnikitin.dev/demo/test-cases/#case-232",
      "steps": [
        {
          "position": 1,
          "action": "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."
        },
        {
          "position": 2,
          "action": "Click the next page control.",
          "expected": "One row is listed and the summary reports the second page of two."
        },
        {
          "position": 3,
          "action": "Click the previous page control.",
          "expected": "Ten rows are listed again and the summary reports the first page."
        }
      ]
    },
    {
      "id": 233,
      "title": "Shows the empty board for a customer without orders",
      "description": "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.\n\n_Automated by `tests/orders/customer-order-lists.spec.ts`._",
      "priority": "high",
      "severity": "major",
      "type": "functional",
      "layer": "e2e",
      "automation": "automated",
      "tags": [
        "order-desk-e2e:orders.list.empty-board",
        "e2e",
        "customer-orders",
        "empty-states"
      ],
      "suite": "E2E › Customer orders › Empty states",
      "url": "https://qa.gnikitin.dev/demo/test-cases/#case-233",
      "steps": [
        {
          "position": 1,
          "action": "Sign in as the customer and open the panel.",
          "expected": "The empty board is visible and the list container is absent."
        },
        {
          "position": 2,
          "action": "Look for the filtered-out state.",
          "expected": "The no-results screen is not shown, because nothing was filtered."
        }
      ]
    },
    {
      "id": 234,
      "title": "Opens the order card over the list from a deep link",
      "description": "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.\n\n_Automated by `tests/orders/customer-order-lists.spec.ts`._",
      "priority": "low",
      "severity": "minor",
      "type": "functional",
      "layer": "e2e",
      "automation": "automated",
      "tags": [
        "order-desk-e2e:orders.list.deep-link",
        "e2e",
        "customer-orders",
        "card-over-list"
      ],
      "suite": "E2E › Customer orders › Card over list",
      "url": "https://qa.gnikitin.dev/demo/test-cases/#case-234",
      "steps": [
        {
          "position": 1,
          "action": "Open the order card address directly.",
          "expected": "The card is visible and shows the order's title, not the loading placeholder."
        },
        {
          "position": 2,
          "action": "Close the card.",
          "expected": "The address is the panel route and the row is listed again."
        }
      ]
    },
    {
      "id": 235,
      "title": "Keeps another customer's order out of the list",
      "description": "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.\n\n_Automated by `tests/orders/customer-order-lists.spec.ts`._",
      "priority": "medium",
      "severity": "major",
      "type": "security",
      "layer": "e2e",
      "automation": "automated",
      "tags": [
        "order-desk-e2e:orders.list.foreign-order",
        "e2e",
        "customer-orders",
        "visibility"
      ],
      "suite": "E2E › Customer orders › Visibility",
      "url": "https://qa.gnikitin.dev/demo/test-cases/#case-235",
      "steps": [
        {
          "position": 1,
          "action": "Sign in as the first customer and open the panel.",
          "expected": "Their own order is listed."
        },
        {
          "position": 2,
          "action": "Search for the other customer's title.",
          "expected": "The no-results state is shown and the foreign order never appears."
        },
        {
          "position": 3,
          "action": "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."
        }
      ]
    },
    {
      "id": 236,
      "title": "Leaves a comment the other participant can read",
      "description": "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.\n\n_Automated by `tests/orders/customer-order-files.spec.ts`._",
      "priority": "high",
      "severity": "critical",
      "type": "functional",
      "layer": "e2e",
      "automation": "automated",
      "tags": [
        "order-desk-e2e:orders.comment.visibility",
        "e2e",
        "customer-orders",
        "comments"
      ],
      "suite": "E2E › Customer orders › Comments",
      "url": "https://qa.gnikitin.dev/demo/test-cases/#case-236",
      "steps": [
        {
          "position": 1,
          "action": "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."
        },
        {
          "position": 2,
          "action": "Read the order through the API as the customer.",
          "expected": "The order carries that comment."
        },
        {
          "position": 3,
          "action": "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."
        }
      ]
    },
    {
      "id": 237,
      "title": "Uploads an attachment the other participant can see",
      "description": "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.\n\n_Automated by `tests/orders/customer-order-files.spec.ts`._",
      "priority": "medium",
      "severity": "critical",
      "type": "functional",
      "layer": "e2e",
      "automation": "automated",
      "tags": [
        "order-desk-e2e:orders.attachment.upload",
        "e2e",
        "customer-orders",
        "attachments"
      ],
      "suite": "E2E › Customer orders › Attachments",
      "url": "https://qa.gnikitin.dev/demo/test-cases/#case-237",
      "steps": [
        {
          "position": 1,
          "action": "Sign in as the customer and open the draft card.",
          "expected": "The card offers the attachment form."
        },
        {
          "position": 2,
          "action": "Choose a PNG file and attach it.",
          "expected": "The card lists the file under the name it was uploaded with."
        },
        {
          "position": 3,
          "action": "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."
        },
        {
          "position": 4,
          "action": "Submit the order to the executor and open its card from the executor panel.",
          "expected": "The executor finds the same file on the card."
        }
      ]
    },
    {
      "id": 238,
      "title": "Downloads an attachment with its filename",
      "description": "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.\n\n_Automated by `tests/orders/customer-order-files.spec.ts`._",
      "priority": "medium",
      "severity": "major",
      "type": "functional",
      "layer": "e2e",
      "automation": "automated",
      "tags": [
        "order-desk-e2e:orders.attachment.download",
        "e2e",
        "customer-orders",
        "attachments"
      ],
      "suite": "E2E › Customer orders › Attachments",
      "url": "https://qa.gnikitin.dev/demo/test-cases/#case-238",
      "steps": [
        {
          "position": 1,
          "action": "Sign in as the customer and open the draft card.",
          "expected": "The card lists the attachment with its name."
        },
        {
          "position": 2,
          "action": "Download the attachment.",
          "expected": "The browser receives a file named exactly as the attachment."
        }
      ]
    },
    {
      "id": 245,
      "title": "Declines an assigned order and it returns to the pool",
      "description": "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.\n\n_Automated by `tests/executor/executor-orders.spec.ts`._",
      "priority": "high",
      "severity": "critical",
      "type": "functional",
      "layer": "e2e",
      "automation": "automated",
      "tags": [
        "order-desk-e2e:executor.order.decline",
        "e2e",
        "executor",
        "declining"
      ],
      "suite": "E2E › Executor › Declining",
      "url": "https://qa.gnikitin.dev/demo/test-cases/#case-245",
      "steps": [
        {
          "position": 1,
          "action": "Sign in as the first executor and open the executor panel.",
          "expected": "The order offers the decline action and no claim action."
        },
        {
          "position": 2,
          "action": "Click the decline action.",
          "expected": "The decline action and the estimate form disappear, and the claim action is offered again."
        },
        {
          "position": 3,
          "action": "Sign in as the second executor and open the panel.",
          "expected": "The order offers its claim action, so it is back in the pool."
        },
        {
          "position": 4,
          "action": "Read the order through the API as the customer.",
          "expected": "The order is awaiting distribution and carries no executor."
        }
      ]
    },
    {
      "id": 246,
      "title": "Refuses to decline an order that is not an assignment",
      "description": "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.\n\n_Automated by `tests/executor/executor-orders.spec.ts`._",
      "priority": "low",
      "severity": "major",
      "type": "security",
      "layer": "e2e",
      "automation": "automated",
      "tags": [
        "order-desk-e2e:executor.order.decline-pool",
        "e2e",
        "executor",
        "guards"
      ],
      "suite": "E2E › Executor › Guards",
      "url": "https://qa.gnikitin.dev/demo/test-cases/#case-246",
      "steps": [
        {
          "position": 1,
          "action": "Sign in as the executor and open the executor panel.",
          "expected": "The order offers its claim action and no decline action."
        },
        {
          "position": 2,
          "action": "Send a decline for the order to the API with the executor's session.",
          "expected": "The API answers 409 with a state conflict."
        },
        {
          "position": 3,
          "action": "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."
        }
      ]
    },
    {
      "id": 247,
      "title": "Records work time on an order in progress",
      "description": "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.\n\n_Automated by `tests/executor/executor-orders.spec.ts`._",
      "priority": "high",
      "severity": "critical",
      "type": "functional",
      "layer": "e2e",
      "automation": "automated",
      "tags": [
        "order-desk-e2e:executor.order.time",
        "e2e",
        "executor",
        "work-log"
      ],
      "suite": "E2E › Executor › Work log",
      "url": "https://qa.gnikitin.dev/demo/test-cases/#case-247",
      "steps": [
        {
          "position": 1,
          "action": "Sign in as the executor and open the executor panel.",
          "expected": "The order offers the minutes field, the note field and the save action."
        },
        {
          "position": 2,
          "action": "Enter 90 minutes with a note and save.",
          "expected": "The order stores that entry with its note."
        },
        {
          "position": 3,
          "action": "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."
        }
      ]
    },
    {
      "id": 248,
      "title": "Replaces the recorded time instead of adding a second entry",
      "description": "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.\n\n_Automated by `tests/executor/executor-orders.spec.ts`._",
      "priority": "medium",
      "severity": "major",
      "type": "functional",
      "layer": "e2e",
      "automation": "automated",
      "tags": [
        "order-desk-e2e:executor.order.time-again",
        "e2e",
        "executor",
        "work-log"
      ],
      "suite": "E2E › Executor › Work log",
      "url": "https://qa.gnikitin.dev/demo/test-cases/#case-248",
      "steps": [
        {
          "position": 1,
          "action": "Sign in as the executor and open the executor panel.",
          "expected": "The minutes field opens on the stored 30 minutes."
        },
        {
          "position": 2,
          "action": "Enter 45 minutes with a new note and save.",
          "expected": "The order stores 45 minutes with the new note."
        },
        {
          "position": 3,
          "action": "Refresh the panel.",
          "expected": "The field shows 45 minutes, so the second save replaced the entry instead of adding one."
        }
      ]
    },
    {
      "id": 249,
      "title": "Accepts the estimate and the order starts",
      "description": "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.\n\n_Automated by `tests/estimates/customer-estimates.spec.ts`._",
      "priority": "high",
      "severity": "blocker",
      "type": "functional",
      "layer": "e2e",
      "automation": "automated",
      "tags": [
        "order-desk-e2e:estimates.customer.accept",
        "e2e",
        "estimates",
        "accepting"
      ],
      "suite": "E2E › Estimates › Accepting",
      "url": "https://qa.gnikitin.dev/demo/test-cases/#case-249",
      "steps": [
        {
          "position": 1,
          "action": "Sign in as the customer and open the customer panel.",
          "expected": "The row offers the answer block with its accept action."
        },
        {
          "position": 2,
          "action": "Click the accept action.",
          "expected": "The answer block disappears and the row reads as in progress."
        },
        {
          "position": 3,
          "action": "Open the order card.",
          "expected": "The card reads as in progress, and the order carries an accepted estimate."
        },
        {
          "position": 4,
          "action": "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."
        }
      ]
    },
    {
      "id": 250,
      "title": "Rejects the estimate with a comment and the order returns to the pool",
      "description": "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.\n\n_Automated by `tests/estimates/customer-estimates.spec.ts`._",
      "priority": "high",
      "severity": "critical",
      "type": "functional",
      "layer": "e2e",
      "automation": "automated",
      "tags": [
        "order-desk-e2e:estimates.customer.reject",
        "e2e",
        "estimates",
        "rejecting"
      ],
      "suite": "E2E › Estimates › Rejecting",
      "url": "https://qa.gnikitin.dev/demo/test-cases/#case-250",
      "steps": [
        {
          "position": 1,
          "action": "Sign in as the customer and open the customer panel.",
          "expected": "The row offers the answer block for the pending estimate."
        },
        {
          "position": 2,
          "action": "Type a reason and click the reject action.",
          "expected": "The answer block disappears and the row reads as awaiting distribution."
        },
        {
          "position": 3,
          "action": "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."
        },
        {
          "position": 4,
          "action": "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."
        }
      ]
    },
    {
      "id": 251,
      "title": "Offers no estimate controls to the customer before the executor proposes",
      "description": "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.\n\n_Automated by `tests/estimates/customer-estimates.spec.ts`._",
      "priority": "medium",
      "severity": "major",
      "type": "functional",
      "layer": "e2e",
      "automation": "automated",
      "tags": [
        "order-desk-e2e:estimates.customer.await-proposal",
        "e2e",
        "estimates",
        "proposal-visibility"
      ],
      "suite": "E2E › Estimates › Proposal visibility",
      "url": "https://qa.gnikitin.dev/demo/test-cases/#case-251",
      "steps": [
        {
          "position": 1,
          "action": "Sign in as the customer and open the customer panel.",
          "expected": "The row reads as assigned and offers no answer block."
        },
        {
          "position": 2,
          "action": "Sign in as the executor and propose an estimate from the panel.",
          "expected": "The estimate form is replaced by the stored proposal."
        },
        {
          "position": 3,
          "action": "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."
        }
      ]
    },
    {
      "id": 252,
      "title": "Refuses a second answer to an estimate that is already accepted",
      "description": "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.\n\n_Automated by `tests/estimates/customer-estimates.spec.ts`._",
      "priority": "medium",
      "severity": "major",
      "type": "security",
      "layer": "e2e",
      "automation": "automated",
      "tags": [
        "order-desk-e2e:estimates.customer.answer-twice",
        "e2e",
        "estimates",
        "guards"
      ],
      "suite": "E2E › Estimates › Guards",
      "url": "https://qa.gnikitin.dev/demo/test-cases/#case-252",
      "steps": [
        {
          "position": 1,
          "action": "Sign in as the customer and open the customer panel.",
          "expected": "The row offers no answer block."
        },
        {
          "position": 2,
          "action": "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."
        },
        {
          "position": 3,
          "action": "Read the order through the API as the customer.",
          "expected": "The order is still in progress and its estimate is still accepted."
        }
      ]
    },
    {
      "id": 253,
      "title": "Submits the finished work and the order reaches review",
      "description": "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.\n\n_Automated by `tests/review/review.spec.ts`._",
      "priority": "high",
      "severity": "blocker",
      "type": "functional",
      "layer": "e2e",
      "automation": "automated",
      "tags": [
        "order-desk-e2e:review.executor.submit",
        "e2e",
        "review",
        "submitting"
      ],
      "suite": "E2E › Review › Submitting",
      "url": "https://qa.gnikitin.dev/demo/test-cases/#case-253",
      "steps": [
        {
          "position": 1,
          "action": "Sign in as the executor and open the executor panel.",
          "expected": "The order offers the work-time form and the submit action."
        },
        {
          "position": 2,
          "action": "Click the submit action.",
          "expected": "The work-time form and the submit action disappear."
        },
        {
          "position": 3,
          "action": "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."
        },
        {
          "position": 4,
          "action": "Read the order through the API as the customer.",
          "expected": "The order is under review."
        }
      ]
    },
    {
      "id": 254,
      "title": "Accepts the work and the order keeps its status",
      "description": "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.\n\n_Automated by `tests/review/review.spec.ts`._",
      "priority": "high",
      "severity": "blocker",
      "type": "functional",
      "layer": "e2e",
      "automation": "automated",
      "tags": [
        "order-desk-e2e:review.customer.accept-work",
        "e2e",
        "review",
        "accepting"
      ],
      "suite": "E2E › Review › Accepting",
      "url": "https://qa.gnikitin.dev/demo/test-cases/#case-254",
      "steps": [
        {
          "position": 1,
          "action": "Sign in as the customer and open the customer panel.",
          "expected": "The row offers the answer block with the accept-work action."
        },
        {
          "position": 2,
          "action": "Click the accept-work action.",
          "expected": "The answer block disappears and the row still reads as under review."
        },
        {
          "position": 3,
          "action": "Read the order through the API as the customer.",
          "expected": "The order is still under review and carries an acceptance time."
        },
        {
          "position": 4,
          "action": "Sign in as the administrator and open the administrator panel.",
          "expected": "The order offers the issue-invoice action."
        }
      ]
    },
    {
      "id": 255,
      "title": "Requests changes with a comment and the order moves to revision",
      "description": "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.\n\n_Automated by `tests/review/review.spec.ts`._",
      "priority": "high",
      "severity": "critical",
      "type": "functional",
      "layer": "e2e",
      "automation": "automated",
      "tags": [
        "order-desk-e2e:review.customer.request-revision",
        "e2e",
        "review",
        "revision-requests"
      ],
      "suite": "E2E › Review › Revision requests",
      "url": "https://qa.gnikitin.dev/demo/test-cases/#case-255",
      "steps": [
        {
          "position": 1,
          "action": "Sign in as the customer and open the customer panel.",
          "expected": "The row offers the answer block with the request-revision action."
        },
        {
          "position": 2,
          "action": "Type a reason and send the request.",
          "expected": "The answer block disappears and the row reads as needing revision."
        },
        {
          "position": 3,
          "action": "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."
        },
        {
          "position": 4,
          "action": "Read the order through the API as the customer.",
          "expected": "The order needs revision."
        }
      ]
    },
    {
      "id": 256,
      "title": "Resumes after a revision request and submits the result again",
      "description": "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.\n\n_Automated by `tests/review/review.spec.ts`._",
      "priority": "high",
      "severity": "critical",
      "type": "functional",
      "layer": "e2e",
      "automation": "automated",
      "tags": [
        "order-desk-e2e:review.executor.resume",
        "e2e",
        "review",
        "resuming"
      ],
      "suite": "E2E › Review › Resuming",
      "url": "https://qa.gnikitin.dev/demo/test-cases/#case-256",
      "steps": [
        {
          "position": 1,
          "action": "Sign in as the executor and open the executor panel.",
          "expected": "The order offers the action that starts the requested changes."
        },
        {
          "position": 2,
          "action": "Click the action that starts the changes.",
          "expected": "The work-time form and the submit action are offered again."
        },
        {
          "position": 3,
          "action": "Submit the result a second time.",
          "expected": "The work affordances disappear, so the order left the executor again."
        },
        {
          "position": 4,
          "action": "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."
        }
      ]
    },
    {
      "id": 257,
      "title": "Refuses to accept work that was never submitted for review",
      "description": "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.\n\n_Automated by `tests/review/review.spec.ts`._",
      "priority": "medium",
      "severity": "major",
      "type": "security",
      "layer": "e2e",
      "automation": "automated",
      "tags": [
        "order-desk-e2e:review.customer.accept-before-review",
        "e2e",
        "review",
        "guards"
      ],
      "suite": "E2E › Review › Guards",
      "url": "https://qa.gnikitin.dev/demo/test-cases/#case-257",
      "steps": [
        {
          "position": 1,
          "action": "Sign in as the customer and open the customer panel.",
          "expected": "The row reads as in progress and offers no answer block."
        },
        {
          "position": 2,
          "action": "Send an acceptance to the API with the page's own session.",
          "expected": "The API answers 409 with a state conflict."
        },
        {
          "position": 3,
          "action": "Read the order through the API as the customer.",
          "expected": "The order is still in progress and carries no acceptance time."
        }
      ]
    },
    {
      "id": 258,
      "title": "Issues an invoice for an accepted work",
      "description": "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.\n\n_Automated by `tests/invoices/money.spec.ts`._",
      "priority": "high",
      "severity": "critical",
      "type": "functional",
      "layer": "e2e",
      "automation": "automated",
      "tags": [
        "order-desk-e2e:money.admin.issue-invoice",
        "e2e",
        "money",
        "invoicing"
      ],
      "suite": "E2E › Money › Invoicing",
      "url": "https://qa.gnikitin.dev/demo/test-cases/#case-258",
      "steps": [
        {
          "position": 1,
          "action": "Sign in as the administrator and open the administrator panel.",
          "expected": "The order offers the issue-invoice action."
        },
        {
          "position": 2,
          "action": "Click the issue action.",
          "expected": "The order offers its payment review block and the order moves to the invoiced status."
        },
        {
          "position": 3,
          "action": "Read the order through the API as the administrator.",
          "expected": "The order is invoiced, its invoice is issued, numbered, and worth the approved amount."
        },
        {
          "position": 4,
          "action": "Sign in as the customer and open the customer panel.",
          "expected": "The row offers the invoice with the payment reporting control."
        }
      ]
    },
    {
      "id": 263,
      "title": "Voids an unpaid invoice and issues a new one",
      "description": "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.\n\n_Automated by `tests/invoices/money.spec.ts`._",
      "priority": "medium",
      "severity": "major",
      "type": "functional",
      "layer": "e2e",
      "automation": "automated",
      "tags": [
        "order-desk-e2e:money.admin.void-invoice",
        "e2e",
        "money",
        "invoicing"
      ],
      "suite": "E2E › Money › Invoicing",
      "url": "https://qa.gnikitin.dev/demo/test-cases/#case-263",
      "steps": [
        {
          "position": 1,
          "action": "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."
        },
        {
          "position": 2,
          "action": "Type a reason and void the invoice.",
          "expected": "The order keeps its invoiced status and the invoice is recorded as void."
        },
        {
          "position": 3,
          "action": "Issue the invoice again.",
          "expected": "The order holds two invoices: the void one and a newly issued one with another number."
        }
      ]
    },
    {
      "id": 259,
      "title": "Reports a payment and hands the receipt to the administrator",
      "description": "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.\n\n_Automated by `tests/invoices/money.spec.ts`._",
      "priority": "high",
      "severity": "critical",
      "type": "functional",
      "layer": "e2e",
      "automation": "automated",
      "tags": [
        "order-desk-e2e:money.customer.report-payment",
        "e2e",
        "money",
        "payment-reports"
      ],
      "suite": "E2E › Money › Payment reports",
      "url": "https://qa.gnikitin.dev/demo/test-cases/#case-259",
      "steps": [
        {
          "position": 1,
          "action": "Sign in as the customer and open the customer panel.",
          "expected": "The row offers the receipt upload and the report action for the invoice."
        },
        {
          "position": 2,
          "action": "Choose a PDF receipt and report the payment.",
          "expected": "The order stores the report as pending review under the file name that was uploaded."
        },
        {
          "position": 3,
          "action": "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."
        }
      ]
    },
    {
      "id": 260,
      "title": "Confirms the reported payment and the order is paid",
      "description": "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.\n\n_Automated by `tests/invoices/money.spec.ts`._",
      "priority": "high",
      "severity": "critical",
      "type": "functional",
      "layer": "e2e",
      "automation": "automated",
      "tags": [
        "order-desk-e2e:money.admin.confirm-payment",
        "e2e",
        "money",
        "payment-review"
      ],
      "suite": "E2E › Money › Payment review",
      "url": "https://qa.gnikitin.dev/demo/test-cases/#case-260",
      "steps": [
        {
          "position": 1,
          "action": "Sign in as the administrator and open the administrator panel.",
          "expected": "The order offers the confirm action for the pending receipt."
        },
        {
          "position": 2,
          "action": "Click the confirm action.",
          "expected": "The order moves to the paid status and offers the completion action."
        },
        {
          "position": 3,
          "action": "Read the order through the API as the administrator.",
          "expected": "The invoice is paid and its report is confirmed."
        },
        {
          "position": 4,
          "action": "Sign in as the customer and open the customer panel.",
          "expected": "The row reads as an invoice that has been paid."
        }
      ]
    },
    {
      "id": 262,
      "title": "Rejects a payment report and keeps the order invoiced",
      "description": "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.\n\n_Automated by `tests/invoices/money.spec.ts`._",
      "priority": "medium",
      "severity": "major",
      "type": "functional",
      "layer": "e2e",
      "automation": "automated",
      "tags": [
        "order-desk-e2e:money.admin.reject-report",
        "e2e",
        "money",
        "payment-review"
      ],
      "suite": "E2E › Money › Payment review",
      "url": "https://qa.gnikitin.dev/demo/test-cases/#case-262",
      "steps": [
        {
          "position": 1,
          "action": "Sign in as the administrator and open the administrator panel.",
          "expected": "The order offers the reject action for the pending receipt."
        },
        {
          "position": 2,
          "action": "Type a reason and reject the receipt.",
          "expected": "The order shows the receipt as rejected with the review comment."
        },
        {
          "position": 3,
          "action": "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."
        },
        {
          "position": 4,
          "action": "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."
        }
      ]
    },
    {
      "id": 261,
      "title": "Completes a paid order",
      "description": "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.\n\n_Automated by `tests/invoices/money.spec.ts`._",
      "priority": "high",
      "severity": "critical",
      "type": "functional",
      "layer": "e2e",
      "automation": "automated",
      "tags": [
        "order-desk-e2e:money.admin.complete",
        "e2e",
        "money",
        "completion"
      ],
      "suite": "E2E › Money › Completion",
      "url": "https://qa.gnikitin.dev/demo/test-cases/#case-261",
      "steps": [
        {
          "position": 1,
          "action": "Sign in as the administrator and open the administrator panel.",
          "expected": "The order offers the completion action."
        },
        {
          "position": 2,
          "action": "Click the completion action.",
          "expected": "The completion block disappears from the order."
        },
        {
          "position": 3,
          "action": "Read the order through the API as the administrator.",
          "expected": "The order is completed and carries a completion time."
        },
        {
          "position": 4,
          "action": "Sign in as the customer, open the panel and open the order card.",
          "expected": "Both the row and the card read as completed."
        }
      ]
    },
    {
      "id": 264,
      "title": "Refuses to void a paid invoice",
      "description": "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.\n\n_Automated by `tests/invoices/money.spec.ts`._",
      "priority": "medium",
      "severity": "major",
      "type": "security",
      "layer": "e2e",
      "automation": "automated",
      "tags": [
        "order-desk-e2e:money.admin.void-paid",
        "e2e",
        "money",
        "guards"
      ],
      "suite": "E2E › Money › Guards",
      "url": "https://qa.gnikitin.dev/demo/test-cases/#case-264",
      "steps": [
        {
          "position": 1,
          "action": "Sign in as the administrator and open the administrator panel.",
          "expected": "The paid invoice offers no void form."
        },
        {
          "position": 2,
          "action": "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."
        },
        {
          "position": 3,
          "action": "Read the order through the API as the administrator.",
          "expected": "The invoice is still paid and the order is still in the paid status."
        }
      ]
    },
    {
      "id": 265,
      "title": "Assigns a pool order to an executor and takes it out of the pool",
      "description": "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.\n\n_Automated by `tests/admin/admin.spec.ts`._",
      "priority": "high",
      "severity": "critical",
      "type": "functional",
      "layer": "e2e",
      "automation": "automated",
      "tags": [
        "order-desk-e2e:admin.orders.assign",
        "e2e",
        "administration",
        "assignment"
      ],
      "suite": "E2E › Administration › Assignment",
      "url": "https://qa.gnikitin.dev/demo/test-cases/#case-265",
      "steps": [
        {
          "position": 1,
          "action": "Sign in as the administrator and open the administrator panel.",
          "expected": "The pooled order offers the assign form with a list of executors."
        },
        {
          "position": 2,
          "action": "Choose the executor and submit the assignment.",
          "expected": "The order shows the executor it now belongs to."
        },
        {
          "position": 3,
          "action": "Read the order through the API as the administrator.",
          "expected": "The order is assigned to the chosen executor."
        },
        {
          "position": 4,
          "action": "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."
        }
      ]
    },
    {
      "id": 266,
      "title": "Reassigns an order to another executor and withdraws the pending estimate",
      "description": "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.\n\n_Automated by `tests/admin/admin.spec.ts`._",
      "priority": "high",
      "severity": "critical",
      "type": "functional",
      "layer": "e2e",
      "automation": "automated",
      "tags": [
        "order-desk-e2e:admin.orders.reassign",
        "e2e",
        "administration",
        "assignment"
      ],
      "suite": "E2E › Administration › Assignment",
      "url": "https://qa.gnikitin.dev/demo/test-cases/#case-266",
      "steps": [
        {
          "position": 1,
          "action": "Sign in as the administrator and open the administrator panel.",
          "expected": "The assigned order offers the assign form with the second executor."
        },
        {
          "position": 2,
          "action": "Reassign the order to the second executor.",
          "expected": "The order shows the new executor."
        },
        {
          "position": 3,
          "action": "Read the order through the API as the administrator.",
          "expected": "The order is assigned to the new executor and the previous proposal is withdrawn."
        },
        {
          "position": 4,
          "action": "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."
        }
      ]
    },
    {
      "id": 267,
      "title": "Refuses to assign an order to the executor who already owns it",
      "description": "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.\n\n_Automated by `tests/admin/admin.spec.ts`._",
      "priority": "medium",
      "severity": "major",
      "type": "security",
      "layer": "e2e",
      "automation": "automated",
      "tags": [
        "order-desk-e2e:admin.orders.assign-claimed",
        "e2e",
        "administration",
        "guards"
      ],
      "suite": "E2E › Administration › Guards",
      "url": "https://qa.gnikitin.dev/demo/test-cases/#case-267",
      "steps": [
        {
          "position": 1,
          "action": "Sign in as the administrator and open the administrator panel.",
          "expected": "The assign form offers the executors, and the current owner cannot be chosen."
        },
        {
          "position": 2,
          "action": "Send the same assignment to the API with the page's own session.",
          "expected": "The API answers 409 with a state conflict."
        },
        {
          "position": 3,
          "action": "Read the order through the API as the administrator.",
          "expected": "The order is still assigned to the same executor."
        }
      ]
    },
    {
      "id": 268,
      "title": "Creates an executor account that can sign in",
      "description": "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.\n\n_Automated by `tests/admin/admin.spec.ts`._",
      "priority": "high",
      "severity": "critical",
      "type": "functional",
      "layer": "e2e",
      "automation": "automated",
      "tags": [
        "order-desk-e2e:admin.users.create-executor",
        "e2e",
        "administration",
        "accounts"
      ],
      "suite": "E2E › Administration › Accounts",
      "url": "https://qa.gnikitin.dev/demo/test-cases/#case-268",
      "steps": [
        {
          "position": 1,
          "action": "Sign in as the administrator and open the accounts screen.",
          "expected": "The screen offers the form that creates an executor."
        },
        {
          "position": 2,
          "action": "Fill the name, the e-mail and the password and submit.",
          "expected": "The executor list shows the new account with its e-mail."
        },
        {
          "position": 3,
          "action": "Sign in with the new credentials.",
          "expected": "The executor panel opens."
        },
        {
          "position": 4,
          "action": "Open the profile.",
          "expected": "The profile names the executor role and offers the hourly rate card."
        }
      ]
    },
    {
      "id": 269,
      "title": "Resets an executor password and the old one stops working",
      "description": "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.\n\n_Automated by `tests/admin/admin.spec.ts`._",
      "priority": "high",
      "severity": "critical",
      "type": "functional",
      "layer": "e2e",
      "automation": "automated",
      "tags": [
        "order-desk-e2e:admin.users.reset-password",
        "e2e",
        "administration",
        "accounts"
      ],
      "suite": "E2E › Administration › Accounts",
      "url": "https://qa.gnikitin.dev/demo/test-cases/#case-269",
      "steps": [
        {
          "position": 1,
          "action": "Sign in as the administrator, open the accounts screen and reset the password.",
          "expected": "The account keeps its place in the list."
        },
        {
          "position": 2,
          "action": "Sign in with the old password.",
          "expected": "The sign-in form stays on screen and no panel opens."
        },
        {
          "position": 3,
          "action": "Sign in with the new password.",
          "expected": "The executor panel opens."
        }
      ]
    },
    {
      "id": 270,
      "title": "Deactivates an executor and blocks the sign-in",
      "description": "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.\n\n_Automated by `tests/admin/admin.spec.ts`._",
      "priority": "high",
      "severity": "critical",
      "type": "security",
      "layer": "e2e",
      "automation": "automated",
      "tags": [
        "order-desk-e2e:admin.users.deactivate",
        "e2e",
        "administration",
        "accounts"
      ],
      "suite": "E2E › Administration › Accounts",
      "url": "https://qa.gnikitin.dev/demo/test-cases/#case-270",
      "steps": [
        {
          "position": 1,
          "action": "Sign in as the administrator, open the accounts screen and deactivate the executor.",
          "expected": "The row shows the account as inactive."
        },
        {
          "position": 2,
          "action": "Sign in as the deactivated executor and open the executor panel.",
          "expected": "The panel reports a load error instead of an order list."
        },
        {
          "position": 3,
          "action": "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."
        }
      ]
    },
    {
      "id": 271,
      "title": "Creates a category that the customer's form then offers",
      "description": "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.\n\n_Automated by `tests/admin/admin.spec.ts`._",
      "priority": "high",
      "severity": "critical",
      "type": "functional",
      "layer": "e2e",
      "automation": "automated",
      "tags": [
        "order-desk-e2e:admin.categories.create",
        "e2e",
        "administration",
        "categories"
      ],
      "suite": "E2E › Administration › Categories",
      "url": "https://qa.gnikitin.dev/demo/test-cases/#case-271",
      "steps": [
        {
          "position": 1,
          "action": "Sign in as the administrator and open the categories screen.",
          "expected": "The screen offers the form that creates a category."
        },
        {
          "position": 2,
          "action": "Fill the name and submit.",
          "expected": "The category list shows the new category."
        },
        {
          "position": 3,
          "action": "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."
        }
      ]
    },
    {
      "id": 272,
      "title": "Deactivates a category and the customer's form stops offering it",
      "description": "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.\n\n_Automated by `tests/admin/admin.spec.ts`._",
      "priority": "medium",
      "severity": "major",
      "type": "functional",
      "layer": "e2e",
      "automation": "automated",
      "tags": [
        "order-desk-e2e:admin.categories.deactivate",
        "e2e",
        "administration",
        "categories"
      ],
      "suite": "E2E › Administration › Categories",
      "url": "https://qa.gnikitin.dev/demo/test-cases/#case-272",
      "steps": [
        {
          "position": 1,
          "action": "Sign in as the administrator, open the categories screen and deactivate one category.",
          "expected": "The row shows the category as inactive."
        },
        {
          "position": 2,
          "action": "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."
        }
      ]
    },
    {
      "id": 273,
      "title": "Renames the account and the profile keeps the new name",
      "description": "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.\n\n_Automated by `tests/profile/profile.spec.ts`._",
      "priority": "medium",
      "severity": "major",
      "type": "functional",
      "layer": "e2e",
      "automation": "automated",
      "tags": [
        "order-desk-e2e:profile.customer.name",
        "e2e",
        "profile",
        "name"
      ],
      "suite": "E2E › Profile › Name",
      "url": "https://qa.gnikitin.dev/demo/test-cases/#case-273",
      "steps": [
        {
          "position": 1,
          "action": "Sign in as the customer and open the profile.",
          "expected": "The profile form holds the account's current name and names the customer role."
        },
        {
          "position": 2,
          "action": "Replace the name and save with the current password.",
          "expected": "The name field shows the new value."
        },
        {
          "position": 3,
          "action": "Read the account through the API.",
          "expected": "The stored name is the new one."
        },
        {
          "position": 4,
          "action": "Reload the profile.",
          "expected": "The new name is still shown."
        }
      ]
    },
    {
      "id": 274,
      "title": "Shows the saved hourly rate on the executor's profile",
      "description": "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.\n\n_Automated by `tests/profile/profile.spec.ts`._",
      "priority": "medium",
      "severity": "major",
      "type": "functional",
      "layer": "e2e",
      "automation": "automated",
      "tags": [
        "order-desk-e2e:profile.executor.rate-read",
        "e2e",
        "profile",
        "rate-read"
      ],
      "suite": "E2E › Profile › Rate (read)",
      "url": "https://qa.gnikitin.dev/demo/test-cases/#case-274",
      "steps": [
        {
          "position": 1,
          "action": "Sign in as the executor and open the profile.",
          "expected": "The rate card and the rate form are visible."
        },
        {
          "position": 2,
          "action": "Read the value the rate field holds.",
          "expected": "It is the rate the precondition wrote."
        },
        {
          "position": 3,
          "action": "Reload the profile.",
          "expected": "The same rate is shown and the save action is still offered."
        }
      ]
    },
    {
      "id": 275,
      "title": "Offers a customer no hourly rate and the role as read-only",
      "description": "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.\n\n_Automated by `tests/profile/profile.spec.ts`._",
      "priority": "low",
      "severity": "minor",
      "type": "functional",
      "layer": "e2e",
      "automation": "automated",
      "tags": [
        "order-desk-e2e:profile.customer.role-boundary",
        "e2e",
        "profile",
        "role-boundary"
      ],
      "suite": "E2E › Profile › Role boundary",
      "url": "https://qa.gnikitin.dev/demo/test-cases/#case-275",
      "steps": [
        {
          "position": 1,
          "action": "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."
        },
        {
          "position": 2,
          "action": "Look for the rate controls.",
          "expected": "Neither the rate card, the rate form nor the rate field is rendered."
        }
      ]
    },
    {
      "id": 276,
      "title": "Changes the password from the profile and signs in with the new one",
      "description": "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.\n\n_Automated by `tests/profile/profile.spec.ts`._",
      "priority": "medium",
      "severity": "critical",
      "type": "functional",
      "layer": "e2e",
      "automation": "automated",
      "tags": [
        "order-desk-e2e:profile.password.change",
        "e2e",
        "profile",
        "password"
      ],
      "suite": "E2E › Profile › Password",
      "url": "https://qa.gnikitin.dev/demo/test-cases/#case-276",
      "steps": [
        {
          "position": 1,
          "action": "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."
        },
        {
          "position": 2,
          "action": "Fill the three fields and submit.",
          "expected": "The form reports the change and stays on the profile."
        },
        {
          "position": 3,
          "action": "Sign in with the new password.",
          "expected": "The customer panel opens."
        },
        {
          "position": 4,
          "action": "Sign in with the original password.",
          "expected": "The sign-in form stays on screen and no panel opens."
        }
      ]
    },
    {
      "id": 277,
      "title": "Refuses a password change when the current password is wrong",
      "description": "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.\n\n_Automated by `tests/profile/profile.spec.ts`._",
      "priority": "low",
      "severity": "major",
      "type": "security",
      "layer": "e2e",
      "automation": "automated",
      "tags": [
        "order-desk-e2e:profile.password.wrong-current",
        "e2e",
        "profile",
        "rejections"
      ],
      "suite": "E2E › Profile › Rejections",
      "url": "https://qa.gnikitin.dev/demo/test-cases/#case-277",
      "steps": [
        {
          "position": 1,
          "action": "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."
        },
        {
          "position": 2,
          "action": "Sign in with the original password.",
          "expected": "The customer panel opens."
        },
        {
          "position": 3,
          "action": "Sign in with the password the form tried to set.",
          "expected": "The sign-in form stays on screen and no panel opens."
        }
      ]
    },
    {
      "id": 278,
      "title": "Signs a customer in from the landing page and opens the customer panel",
      "description": "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.\n\n_Automated by `tests/auth/auth.spec.ts`._",
      "priority": "high",
      "severity": "blocker",
      "type": "smoke",
      "layer": "e2e",
      "automation": "automated",
      "tags": [
        "order-desk-e2e:auth.sign-in.panel",
        "e2e",
        "public-auth",
        "sign-in"
      ],
      "suite": "E2E › Public + auth › Sign-in",
      "url": "https://qa.gnikitin.dev/demo/test-cases/#case-278",
      "steps": [
        {
          "position": 1,
          "action": "Open the landing page.",
          "expected": "The landing page is visible and offers the sign-in link."
        },
        {
          "position": 2,
          "action": "Follow the sign-in link.",
          "expected": "The sign-in screen is on screen with the e-mail, password and submit controls."
        },
        {
          "position": 3,
          "action": "Sign in with the shared sign-in step.",
          "expected": "The customer panel is visible and the address is the customer panel route."
        },
        {
          "position": 4,
          "action": "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."
        }
      ]
    },
    {
      "id": 279,
      "title": "Registers a new customer and opens that customer's panel",
      "description": "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.\n\n_Automated by `tests/auth/auth.spec.ts`._",
      "priority": "high",
      "severity": "critical",
      "type": "functional",
      "layer": "e2e",
      "automation": "automated",
      "tags": [
        "order-desk-e2e:auth.register.customer",
        "e2e",
        "public-auth",
        "registration"
      ],
      "suite": "E2E › Public + auth › Registration",
      "url": "https://qa.gnikitin.dev/demo/test-cases/#case-279",
      "steps": [
        {
          "position": 1,
          "action": "Open the registration page.",
          "expected": "The registration form offers a name, an e-mail, a password and a submit control."
        },
        {
          "position": 2,
          "action": "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."
        },
        {
          "position": 3,
          "action": "Reload the panel.",
          "expected": "The session survives the reload and the empty board is still shown."
        }
      ]
    },
    {
      "id": 280,
      "title": "Signs out from the panel and needs a new sign-in to return",
      "description": "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.\n\n_Automated by `tests/auth/auth.spec.ts`._",
      "priority": "medium",
      "severity": "critical",
      "type": "functional",
      "layer": "e2e",
      "automation": "automated",
      "tags": [
        "order-desk-e2e:auth.sign-out.control",
        "e2e",
        "public-auth",
        "sign-out"
      ],
      "suite": "E2E › Public + auth › Sign-out",
      "url": "https://qa.gnikitin.dev/demo/test-cases/#case-280",
      "steps": [
        {
          "position": 1,
          "action": "Sign the account in and open the customer panel.",
          "expected": "The customer panel is visible."
        },
        {
          "position": 2,
          "action": "Click the sign-out control the viewport shows.",
          "expected": "The landing page is visible and offers sign-in again."
        },
        {
          "position": 3,
          "action": "Open the customer panel address.",
          "expected": "The address becomes the sign-in route and the customer panel is not rendered."
        }
      ]
    },
    {
      "id": 281,
      "title": "Shows a signed-in visitor the way to their own panel",
      "description": "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.\n\n_Automated by `tests/auth/auth.spec.ts`._",
      "priority": "medium",
      "severity": "major",
      "type": "functional",
      "layer": "e2e",
      "automation": "automated",
      "tags": [
        "order-desk-e2e:auth.landing.session-aware",
        "e2e",
        "public-auth",
        "landing"
      ],
      "suite": "E2E › Public + auth › Landing",
      "url": "https://qa.gnikitin.dev/demo/test-cases/#case-281",
      "steps": [
        {
          "position": 1,
          "action": "Open the landing page.",
          "expected": "The dashboard link is offered and the sign-in link is not."
        },
        {
          "position": 2,
          "action": "Follow the dashboard link.",
          "expected": "The executor panel is visible and the address is the executor panel route."
        }
      ]
    },
    {
      "id": 282,
      "title": "Replaces a live session when another role signs in",
      "description": "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.\n\n_Automated by `tests/auth/auth.spec.ts`._",
      "priority": "medium",
      "severity": "major",
      "type": "functional",
      "layer": "e2e",
      "automation": "automated",
      "tags": [
        "order-desk-e2e:auth.session.replace",
        "e2e",
        "public-auth",
        "session-replacement"
      ],
      "suite": "E2E › Public + auth › Session replacement",
      "url": "https://qa.gnikitin.dev/demo/test-cases/#case-282",
      "steps": [
        {
          "position": 1,
          "action": "Open the customer panel.",
          "expected": "The customer panel is visible."
        },
        {
          "position": 2,
          "action": "Sign in as the baseline executor through the shared sign-in step.",
          "expected": "The executor panel is visible."
        },
        {
          "position": 3,
          "action": "Open the customer panel address.",
          "expected": "The address becomes the executor panel route, because the session now belongs to the executor."
        }
      ]
    },
    {
      "id": 283,
      "title": "Keeps the visitor on the sign-in form when the password is wrong",
      "description": "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.\n\n_Automated by `tests/auth/auth.spec.ts`._",
      "priority": "medium",
      "severity": "major",
      "type": "security",
      "layer": "e2e",
      "automation": "automated",
      "tags": [
        "order-desk-e2e:auth.sign-in.wrong-password",
        "e2e",
        "public-auth",
        "rejections"
      ],
      "suite": "E2E › Public + auth › Rejections",
      "url": "https://qa.gnikitin.dev/demo/test-cases/#case-283",
      "steps": [
        {
          "position": 1,
          "action": "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."
        },
        {
          "position": 2,
          "action": "Submit the same form with the account's password.",
          "expected": "The customer panel is visible."
        }
      ]
    },
    {
      "id": 284,
      "title": "Redirects a role away from another role's panel",
      "description": "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.\n\n_Automated by `tests/guards/guards.spec.ts`._",
      "priority": "high",
      "severity": "critical",
      "type": "security",
      "layer": "e2e",
      "automation": "automated",
      "tags": [
        "order-desk-e2e:guards.ui.foreign-panel",
        "e2e",
        "access-control",
        "screen-guard"
      ],
      "suite": "E2E › Access control › Screen guard",
      "url": "https://qa.gnikitin.dev/demo/test-cases/#case-284",
      "steps": [
        {
          "position": 1,
          "action": "Open the administrator panel address.",
          "expected": "The address becomes the customer panel route and the administrator panel is not rendered."
        },
        {
          "position": 2,
          "action": "Open the executor panel address.",
          "expected": "The address becomes the customer panel route and the executor panel is not rendered."
        },
        {
          "position": 3,
          "action": "Open the customer panel address.",
          "expected": "The customer panel is visible, so the session is healthy and only the foreign panels were refused."
        }
      ]
    },
    {
      "id": 207,
      "title": "signs the baseline admin in and stores the session",
      "description": "",
      "priority": "undefined",
      "severity": "normal",
      "type": "other",
      "layer": "setup",
      "automation": "automated",
      "tags": [],
      "suite": "setup › setup/auth.setup.ts",
      "url": "https://qa.gnikitin.dev/demo/test-cases/#case-207",
      "steps": []
    },
    {
      "id": 208,
      "title": "signs the baseline customer in and stores the session",
      "description": "",
      "priority": "undefined",
      "severity": "normal",
      "type": "other",
      "layer": "setup",
      "automation": "automated",
      "tags": [],
      "suite": "setup › setup/auth.setup.ts",
      "url": "https://qa.gnikitin.dev/demo/test-cases/#case-208",
      "steps": []
    },
    {
      "id": 209,
      "title": "signs the baseline executor in and stores the session",
      "description": "",
      "priority": "undefined",
      "severity": "normal",
      "type": "other",
      "layer": "setup",
      "automation": "automated",
      "tags": [],
      "suite": "setup › setup/auth.setup.ts",
      "url": "https://qa.gnikitin.dev/demo/test-cases/#case-209",
      "steps": []
    },
    {
      "id": 211,
      "title": "narrows the list by status, category and a case-insensitive search",
      "description": "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.\n\n_Automated by `apps/web/src/order-list-controls.spec.ts`._",
      "priority": "high",
      "severity": "major",
      "type": "functional",
      "layer": "unit",
      "automation": "automated",
      "tags": [
        "order-desk:web.orders.filter-orders",
        "unit",
        "web",
        "orders-list"
      ],
      "suite": "Web › Orders list",
      "url": "https://qa.gnikitin.dev/demo/test-cases/#case-211",
      "steps": [
        {
          "position": 1,
          "action": "Filter a list by `status`.",
          "expected": "Only orders with exactly that status remain; an empty status keeps all of them."
        },
        {
          "position": 2,
          "action": "Filter the same list by `categoryId`.",
          "expected": "Only orders of that category remain."
        },
        {
          "position": 3,
          "action": "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."
        },
        {
          "position": 4,
          "action": "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."
        }
      ]
    },
    {
      "id": 212,
      "title": "lists every category once, sorted by the locale of the interface",
      "description": "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.\n\n_Automated by `apps/web/src/order-list-controls.spec.ts`._",
      "priority": "medium",
      "severity": "normal",
      "type": "functional",
      "layer": "unit",
      "automation": "automated",
      "tags": [
        "order-desk:web.orders.category-options",
        "unit",
        "web",
        "orders-list"
      ],
      "suite": "Web › Orders list",
      "url": "https://qa.gnikitin.dev/demo/test-cases/#case-212",
      "steps": [
        {
          "position": 1,
          "action": "Build the options from several orders that share two categories.",
          "expected": "Each category appears exactly once, keeping its name."
        },
        {
          "position": 2,
          "action": "Sort the same orders with the `ru` locale.",
          "expected": "The options follow Russian collation, not the order of the input."
        }
      ]
    },
    {
      "id": 213,
      "title": "clamps the requested page to the range the list actually has",
      "description": "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.\n\n_Automated by `apps/web/src/order-list-controls.spec.ts`._",
      "priority": "medium",
      "severity": "normal",
      "type": "functional",
      "layer": "unit",
      "automation": "automated",
      "tags": [
        "order-desk:web.orders.pagination",
        "unit",
        "web",
        "orders-list"
      ],
      "suite": "Web › Orders list",
      "url": "https://qa.gnikitin.dev/demo/test-cases/#case-213",
      "steps": [
        {
          "position": 1,
          "action": "Paginate a list shorter than one page with page `1`.",
          "expected": "One page holds every item and `totalPages` is `1`."
        },
        {
          "position": 2,
          "action": "Ask for a page below `1` or above `totalPages`.",
          "expected": "The returned page is clamped, and the items are those of the clamped page."
        },
        {
          "position": 3,
          "action": "Paginate an empty list.",
          "expected": "`totalPages` stays `1` instead of `0`, so the paginator never divides by zero."
        }
      ]
    },
    {
      "id": 214,
      "title": "shows the reset action only while a filter is active",
      "description": "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.\n\n_Automated by `apps/web/src/order-list-controls.spec.tsx`._",
      "priority": "medium",
      "severity": "normal",
      "type": "functional",
      "layer": "unit",
      "automation": "automated",
      "tags": [
        "order-desk:web.orders.controls-reset",
        "unit",
        "web",
        "orders-list"
      ],
      "suite": "Web › Orders list",
      "url": "https://qa.gnikitin.dev/demo/test-cases/#case-214",
      "steps": [
        {
          "position": 1,
          "action": "Render the controls with empty filters.",
          "expected": "The search field and both selects are present and there is no reset action."
        },
        {
          "position": 2,
          "action": "Render them with a status chosen.",
          "expected": "The reset action appears."
        },
        {
          "position": 3,
          "action": "Type a single space into the search field.",
          "expected": "Nothing counts as an active filter, so the reset action stays hidden."
        }
      ]
    },
    {
      "id": 294,
      "title": "keeps the order card in place when it is pressed",
      "description": "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.\n\n_Automated by `apps/web/test/orders-card-styles.spec.ts`._",
      "priority": "high",
      "severity": "major",
      "type": "functional",
      "layer": "unit",
      "automation": "automated",
      "tags": [
        "order-desk:web.orders.card-press",
        "unit",
        "web",
        "orders-list"
      ],
      "suite": "Web › Orders list",
      "url": "https://qa.gnikitin.dev/demo/test-cases/#case-294",
      "steps": [
        {
          "position": 1,
          "action": "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."
        },
        {
          "position": 2,
          "action": "Inspect the base rule for a transform and the state list for an `:active` rule.",
          "expected": "Neither exists, so pressing the card moves nothing."
        },
        {
          "position": 3,
          "action": "Inspect the hover rule.",
          "expected": "The card still answers the pointer with a border and a shadow, because only the press was wrong."
        }
      ]
    },
    {
      "id": 215,
      "title": "turns a failed response into the status, the code and the message of the API",
      "description": "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.\n\n_Automated by `apps/web/src/api.spec.ts`._",
      "priority": "high",
      "severity": "critical",
      "type": "functional",
      "layer": "unit",
      "automation": "automated",
      "tags": [
        "order-desk:web.api.error-contract",
        "unit",
        "web",
        "api-client"
      ],
      "suite": "Web › API client",
      "url": "https://qa.gnikitin.dev/demo/test-cases/#case-215",
      "steps": [
        {
          "position": 1,
          "action": "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."
        },
        {
          "position": 2,
          "action": "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."
        },
        {
          "position": 3,
          "action": "Reject a request with a validation body whose `message` is an array.",
          "expected": "The messages are joined instead of being rendered as `[object Object]`."
        }
      ]
    },
    {
      "id": 216,
      "title": "sends JSON by default, reads `204` as empty and reports an unreachable server",
      "description": "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.\n\n_Automated by `apps/web/src/api.spec.ts`._",
      "priority": "high",
      "severity": "major",
      "type": "functional",
      "layer": "unit",
      "automation": "automated",
      "tags": [
        "order-desk:web.api.request-shape",
        "unit",
        "web",
        "api-client"
      ],
      "suite": "Web › API client",
      "url": "https://qa.gnikitin.dev/demo/test-cases/#case-216",
      "steps": [
        {
          "position": 1,
          "action": "Send a request with a string body and no explicit content type.",
          "expected": "The request carries `Content-Type: application/json` and `credentials: include`."
        },
        {
          "position": 2,
          "action": "Send a `FormData` body.",
          "expected": "The content type is left to the browser, so the multipart boundary survives."
        },
        {
          "position": 3,
          "action": "Resolve a `204` response.",
          "expected": "The call resolves with `undefined` instead of parsing an empty body."
        },
        {
          "position": 4,
          "action": "Make `fetch` reject with a transport error.",
          "expected": "The caller receives `ApiError` with status `0` and code `NETWORK_ERROR`."
        }
      ]
    },
    {
      "id": 217,
      "title": "fills in the placeholders it was given and leaves the rest untouched",
      "description": "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.\n\n_Automated by `apps/web/src/i18n/template.spec.ts`._",
      "priority": "medium",
      "severity": "normal",
      "type": "functional",
      "layer": "unit",
      "automation": "automated",
      "tags": [
        "order-desk:web.i18n.template",
        "unit",
        "web",
        "localization"
      ],
      "suite": "Web › Localization",
      "url": "https://qa.gnikitin.dev/demo/test-cases/#case-217",
      "steps": [
        {
          "position": 1,
          "action": "Format a template with every placeholder supplied.",
          "expected": "Each placeholder is replaced by its value, numbers included."
        },
        {
          "position": 2,
          "action": "Format a template with no parameters.",
          "expected": "The template is returned unchanged."
        },
        {
          "position": 3,
          "action": "Format a template whose placeholder has no value.",
          "expected": "That placeholder stays as written instead of becoming `undefined`."
        }
      ]
    },
    {
      "id": 218,
      "title": "picks the plural form of the interface locale and fills in the count",
      "description": "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.\n\n_Automated by `apps/web/src/i18n/provider.spec.tsx`._",
      "priority": "medium",
      "severity": "normal",
      "type": "functional",
      "layer": "unit",
      "automation": "automated",
      "tags": [
        "order-desk:web.i18n.plural",
        "unit",
        "web",
        "localization"
      ],
      "suite": "Web › Localization",
      "url": "https://qa.gnikitin.dev/demo/test-cases/#case-218",
      "steps": [
        {
          "position": 1,
          "action": "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."
        },
        {
          "position": 2,
          "action": "Select the form for `2` and for `5` in Russian.",
          "expected": "The first uses `few`, the second uses `many`."
        },
        {
          "position": 3,
          "action": "Select a form the catalogue omits.",
          "expected": "The `other` form is used instead of an empty string."
        }
      ]
    },
    {
      "id": 219,
      "title": "translates a failure by its code, by its status, or to the fallback",
      "description": "`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.\n\n_Automated by `apps/web/src/i18n/provider.spec.tsx`._",
      "priority": "high",
      "severity": "major",
      "type": "functional",
      "layer": "unit",
      "automation": "automated",
      "tags": [
        "order-desk:web.i18n.error-message",
        "unit",
        "web",
        "localization"
      ],
      "suite": "Web › Localization",
      "url": "https://qa.gnikitin.dev/demo/test-cases/#case-219",
      "steps": [
        {
          "position": 1,
          "action": "Translate an error that carries a code the catalogue knows.",
          "expected": "The message of that code is returned."
        },
        {
          "position": 2,
          "action": "Translate an error that carries only a status.",
          "expected": "The message of the code that status maps to is returned."
        },
        {
          "position": 3,
          "action": "Translate an unknown object and a plain `TypeError`.",
          "expected": "The unknown object yields the caller's fallback, and `TypeError` yields the network message."
        }
      ]
    },
    {
      "id": 295,
      "title": "labels the landing hero button as a registration action in every language",
      "description": "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.\n\n_Automated by `apps/web/src/i18n/catalogue.spec.ts`._",
      "priority": "high",
      "severity": "major",
      "type": "functional",
      "layer": "unit",
      "automation": "automated",
      "tags": [
        "order-desk:web.i18n.cta-register",
        "unit",
        "web",
        "localization"
      ],
      "suite": "Web › Localization",
      "url": "https://qa.gnikitin.dev/demo/test-cases/#case-295",
      "steps": [
        {
          "position": 1,
          "action": "Collect the landing hero label from the English, Russian and Spanish catalogues.",
          "expected": "English reads `Register`, Russian reads `Зарегистрироваться`, Spanish reads `Registrarse`."
        }
      ]
    },
    {
      "id": 296,
      "title": "keeps the hours next to the amount in every language",
      "description": "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.\n\n_Automated by `apps/web/src/i18n/template.spec.ts`._",
      "priority": "high",
      "severity": "major",
      "type": "functional",
      "layer": "unit",
      "automation": "automated",
      "tags": [
        "order-desk:web.i18n.estimate-figures",
        "unit",
        "web",
        "localization"
      ],
      "suite": "Web › Localization",
      "url": "https://qa.gnikitin.dev/demo/test-cases/#case-296",
      "steps": [
        {
          "position": 1,
          "action": "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."
        },
        {
          "position": 2,
          "action": "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."
        }
      ]
    },
    {
      "id": 220,
      "title": "resists progressively the further a gesture is dragged past its limit",
      "description": "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.\n\n_Automated by `apps/web/src/motion/spring.spec.ts`._",
      "priority": "low",
      "severity": "minor",
      "type": "functional",
      "layer": "unit",
      "automation": "automated",
      "tags": [
        "order-desk:web.motion.rubberband",
        "unit",
        "web",
        "motion"
      ],
      "suite": "Web › Motion",
      "url": "https://qa.gnikitin.dev/demo/test-cases/#case-220",
      "steps": [
        {
          "position": 1,
          "action": "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."
        },
        {
          "position": 2,
          "action": "Compute the offset for `+x` and for `-x`.",
          "expected": "The two are exact mirrors."
        },
        {
          "position": 3,
          "action": "Compare the offset with the raw overshoot.",
          "expected": "The offset is always smaller in magnitude, which is the resistance itself."
        }
      ]
    },
    {
      "id": 221,
      "title": "reads the throw velocity from a pointer history and drops a stale one",
      "description": "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.\n\n_Automated by `apps/web/src/motion/spring.spec.ts`._",
      "priority": "low",
      "severity": "minor",
      "type": "functional",
      "layer": "unit",
      "automation": "automated",
      "tags": [
        "order-desk:web.motion.release-velocity",
        "unit",
        "web",
        "motion"
      ],
      "suite": "Web › Motion",
      "url": "https://qa.gnikitin.dev/demo/test-cases/#case-221",
      "steps": [
        {
          "position": 1,
          "action": "Read the velocity of two samples moving down over 100 ms.",
          "expected": "The result is positive and proportional to the distance over time."
        },
        {
          "position": 2,
          "action": "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."
        },
        {
          "position": 3,
          "action": "Read the velocity of zero or one sample.",
          "expected": "The result is `0`."
        }
      ]
    },
    {
      "id": 222,
      "title": "settles on its target and reports rest instead of oscillating forever",
      "description": "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.\n\n_Automated by `apps/web/src/motion/spring.spec.ts`._",
      "priority": "low",
      "severity": "minor",
      "type": "functional",
      "layer": "unit",
      "automation": "automated",
      "tags": [
        "order-desk:web.motion.spring-settles",
        "unit",
        "web",
        "motion"
      ],
      "suite": "Web › Motion",
      "url": "https://qa.gnikitin.dev/demo/test-cases/#case-222",
      "steps": [
        {
          "position": 1,
          "action": "Advance a spring from `0` towards `1` until it reports rest.",
          "expected": "It converges to the target within the rest distance and then stops."
        },
        {
          "position": 2,
          "action": "Retarget the spring while it is in flight.",
          "expected": "The next value continues from the current position, without a jump back to the start."
        }
      ]
    },
    {
      "id": 223,
      "title": "renders the orders the api returns and drops the loading state",
      "description": "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.\n\n_Automated by `apps/web/test/integration/customer-orders-page.spec.tsx`._",
      "priority": "high",
      "severity": "critical",
      "type": "integration",
      "layer": "unit",
      "automation": "automated",
      "tags": [
        "order-desk:web.orders-page.loads-orders",
        "unit",
        "web",
        "orders-page"
      ],
      "suite": "Web › Orders page",
      "url": "https://qa.gnikitin.dev/demo/test-cases/#case-223",
      "steps": [
        {
          "position": 1,
          "action": "Open `/customer`.",
          "expected": "The panel renders its loading placeholder while the request is in flight."
        },
        {
          "position": 2,
          "action": "Wait for the answers of `GET /orders`, `GET /categories` and `GET /users/executors/available`.",
          "expected": "A card appears for each order, showing its title."
        },
        {
          "position": 3,
          "action": "Inspect the list region.",
          "expected": "The loading placeholder and the empty state are gone, because orders are present."
        }
      ]
    },
    {
      "id": 224,
      "title": "narrows the rendered list to the typed search and restores it with the reset action",
      "description": "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.\n\n_Automated by `apps/web/test/integration/customer-orders-page.spec.tsx`._",
      "priority": "high",
      "severity": "major",
      "type": "integration",
      "layer": "unit",
      "automation": "automated",
      "tags": [
        "order-desk:web.orders-page.search-narrows-list",
        "unit",
        "web",
        "orders-page"
      ],
      "suite": "Web › Orders page",
      "url": "https://qa.gnikitin.dev/demo/test-cases/#case-224",
      "steps": [
        {
          "position": 1,
          "action": "Type a fragment of one order's title into the search field.",
          "expected": "Only the matching order remains; the other card is gone."
        },
        {
          "position": 2,
          "action": "Replace the search with a fragment that no order contains.",
          "expected": "The list is replaced by the `nothing found` state with a reset control."
        },
        {
          "position": 3,
          "action": "Press the reset control.",
          "expected": "Both orders are rendered again and the `nothing found` state is gone."
        }
      ]
    },
    {
      "id": 225,
      "title": "offers a retry that recovers from a failed load without a reload",
      "description": "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.\n\n_Automated by `apps/web/test/integration/customer-orders-page.spec.tsx`._",
      "priority": "high",
      "severity": "critical",
      "type": "integration",
      "layer": "unit",
      "automation": "automated",
      "tags": [
        "order-desk:web.orders-page.retry-after-failure",
        "unit",
        "web",
        "orders-page"
      ],
      "suite": "Web › Orders page",
      "url": "https://qa.gnikitin.dev/demo/test-cases/#case-225",
      "steps": [
        {
          "position": 1,
          "action": "Open `/customer`.",
          "expected": "The error block with the retry control replaces the list; no order card appears."
        },
        {
          "position": 2,
          "action": "Read the notification.",
          "expected": "It reports an unavailable service in the reader's language, not a generic failure."
        },
        {
          "position": 3,
          "action": "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`."
        }
      ]
    },
    {
      "id": 298,
      "title": "shows the estimate hours and the amount together on the order card",
      "description": "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.\n\n_Automated by `apps/web/test/integration/customer-orders-page.spec.tsx`._",
      "priority": "high",
      "severity": "major",
      "type": "integration",
      "layer": "unit",
      "automation": "automated",
      "tags": [
        "order-desk:web.orders-page.estimate-figures",
        "unit",
        "web",
        "orders-page"
      ],
      "suite": "Web › Orders page",
      "url": "https://qa.gnikitin.dev/demo/test-cases/#case-298",
      "steps": [
        {
          "position": 1,
          "action": "Open `/customer` with one order whose estimate is pending.",
          "expected": "The card offers the accept and reject controls for that estimate."
        },
        {
          "position": 2,
          "action": "Read the estimate line above the controls.",
          "expected": "It prints the hours and the amount together, `2 h (90$)`, instead of the amount alone."
        }
      ]
    },
    {
      "id": 299,
      "title": "offers a file field in the create form and attaches the chosen files to the new draft",
      "description": "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.\n\n_Automated by `apps/web/test/integration/customer-orders-page.spec.tsx`._",
      "priority": "high",
      "severity": "critical",
      "type": "integration",
      "layer": "unit",
      "automation": "automated",
      "tags": [
        "order-desk:web.orders-page.attaches-files-on-create",
        "unit",
        "web",
        "orders-page"
      ],
      "suite": "Web › Orders page",
      "url": "https://qa.gnikitin.dev/demo/test-cases/#case-299",
      "steps": [
        {
          "position": 1,
          "action": "Open `/customer` and press `new order`.",
          "expected": "The task form opens with a file field next to the description fields."
        },
        {
          "position": 2,
          "action": "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`."
        },
        {
          "position": 3,
          "action": "Read the notification once the list has reloaded.",
          "expected": "It reports that the order was sent for distribution."
        }
      ]
    },
    {
      "id": 226,
      "title": "claims a pool order and moves it into the assigned group",
      "description": "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.\n\n_Automated by `apps/web/test/integration/executor-panel.spec.tsx`._",
      "priority": "high",
      "severity": "critical",
      "type": "integration",
      "layer": "unit",
      "automation": "automated",
      "tags": [
        "order-desk:web.executor-panel.claims-pool-order",
        "unit",
        "web",
        "executor-panel"
      ],
      "suite": "Web › Executor panel",
      "url": "https://qa.gnikitin.dev/demo/test-cases/#case-226",
      "steps": [
        {
          "position": 1,
          "action": "Open `/executor`.",
          "expected": "The order is rendered inside the pool group and the assigned group is empty."
        },
        {
          "position": 2,
          "action": "Press `claim` on that order.",
          "expected": "The panel sends `POST /orders/<id>/claim` and then asks for the list again."
        },
        {
          "position": 3,
          "action": "Inspect both groups once the list has reloaded.",
          "expected": "The order is now inside the assigned group and gone from the pool."
        }
      ]
    },
    {
      "id": 302,
      "title": "steps the estimate hours by a whole hour and sends the number it shows",
      "description": "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.\n\n_Automated by `apps/web/test/integration/executor-panel.spec.tsx`._",
      "priority": "high",
      "severity": "major",
      "type": "integration",
      "layer": "unit",
      "automation": "automated",
      "tags": [
        "order-desk:web.executor-panel.estimate-whole-hours",
        "unit",
        "web",
        "executor-panel"
      ],
      "suite": "Web › Executor panel",
      "url": "https://qa.gnikitin.dev/demo/test-cases/#case-302",
      "steps": [
        {
          "position": 1,
          "action": "Open `/executor` and read the estimate field of the assigned order.",
          "expected": "The field steps by one and starts at one whole hour."
        },
        {
          "position": 2,
          "action": "Enter `3` and press `propose estimate`.",
          "expected": "The api receives `POST /orders/<id>/estimate` with `{\"hours\":3}`."
        }
      ]
    },
    {
      "id": 303,
      "title": "shows the hours and the amount of the latest estimate on the assigned card",
      "description": "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.\n\n_Automated by `apps/web/test/integration/executor-panel.spec.tsx`._",
      "priority": "high",
      "severity": "major",
      "type": "integration",
      "layer": "unit",
      "automation": "automated",
      "tags": [
        "order-desk:web.executor-panel.estimate-figures",
        "unit",
        "web",
        "executor-panel"
      ],
      "suite": "Web › Executor panel",
      "url": "https://qa.gnikitin.dev/demo/test-cases/#case-303",
      "steps": [
        {
          "position": 1,
          "action": "Open `/executor`.",
          "expected": "The order is rendered inside the assigned group with the estimate line."
        },
        {
          "position": 2,
          "action": "Read the estimate line.",
          "expected": "It prints `2 h (90$)` and the status of the estimate, not the amount alone."
        }
      ]
    },
    {
      "id": 297,
      "title": "labels the hero button of a returning customer as a registration action",
      "description": "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.\n\n_Automated by `apps/web/test/integration/landing.spec.tsx`._",
      "priority": "high",
      "severity": "major",
      "type": "integration",
      "layer": "unit",
      "automation": "automated",
      "tags": [
        "order-desk:web.landing.register-label",
        "unit",
        "web",
        "landing-page"
      ],
      "suite": "Web › Landing page",
      "url": "https://qa.gnikitin.dev/demo/test-cases/#case-297",
      "steps": [
        {
          "position": 1,
          "action": "Open `/` with the session of a customer.",
          "expected": "The landing page renders its hero actions."
        },
        {
          "position": 2,
          "action": "Read the primary hero button and follow where it points.",
          "expected": "The button reads `Register` and still points at `/customer`, not at `/register`."
        }
      ]
    },
    {
      "id": 300,
      "title": "opens the workspace of the signed-in user instead of returning to the login page",
      "description": "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.\n\n_Automated by `apps/web/test/integration/login-redirect.spec.tsx`._",
      "priority": "high",
      "severity": "critical",
      "type": "integration",
      "layer": "unit",
      "automation": "automated",
      "tags": [
        "order-desk:web.auth.login-opens-workspace",
        "unit",
        "web",
        "authentication"
      ],
      "suite": "Web › Authentication",
      "url": "https://qa.gnikitin.dev/demo/test-cases/#case-300",
      "steps": [
        {
          "position": 1,
          "action": "Open `/login` and submit the credentials of a customer.",
          "expected": "The form reports no error and leaves the login page."
        },
        {
          "position": 2,
          "action": "Inspect the page the browser lands on.",
          "expected": "The customer workspace is rendered with its orders region, not the login form."
        },
        {
          "position": 3,
          "action": "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."
        }
      ]
    },
    {
      "id": 301,
      "title": "sends a visitor without a session from a workspace to the login page",
      "description": "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.\n\n_Automated by `apps/web/test/integration/login-redirect.spec.tsx`._",
      "priority": "high",
      "severity": "critical",
      "type": "integration",
      "layer": "unit",
      "automation": "automated",
      "tags": [
        "order-desk:web.auth.signed-out-visits-login",
        "unit",
        "web",
        "authentication"
      ],
      "suite": "Web › Authentication",
      "url": "https://qa.gnikitin.dev/demo/test-cases/#case-301",
      "steps": [
        {
          "position": 1,
          "action": "Open `/customer` without a session.",
          "expected": "The login form is rendered."
        },
        {
          "position": 2,
          "action": "Inspect the workspace route.",
          "expected": "No panel is mounted and no panel data is requested."
        }
      ]
    }
  ]
}