# Room Amenities – Manual Test Checklist (Add Room & Edit Room)

Use this list to manually verify room amenities in **Add Room** and **Edit Room** (EMS → Hotels → "+ Add Room Type" / Edit room).

---

## Add Room – Normal cases


| #   | Check                        | Steps                                                                                               | Expected                                                                                           |
| --- | ---------------------------- | --------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------- |
| 1   | Amenities section is visible | Open Add Room Type modal for any hotel.                                                             | "Amenities" label, text input (placeholder "e.g. WiFi, TV, Mini bar"), and "Add" button are shown. |
| 2   | Add one amenity              | Type "WiFi" in the amenities input, click Add.                                                      | "WiFi" appears in the list below; input clears.                                                    |
| 3   | Add multiple amenities       | Add "WiFi", then "TV", then "Mini bar".                                                             | All three appear in order.                                                                         |
| 4   | Submit with amenities        | Fill all required fields (room name, type, price, rooms, beds, dates), add "WiFi" and "TV", submit. | Success message; new room appears in list; room has amenities WiFi, TV (e.g. in Edit or API/DB).   |
| 5   | Submit with no amenities     | Fill all required fields, do not add any amenity, submit.                                           | Room is created with empty amenities array.                                                        |


---

## Add Room – Edge cases


| #   | Check                         | Steps                                            | Expected                                                                      |
| --- | ----------------------------- | ------------------------------------------------ | ----------------------------------------------------------------------------- |
| 6   | Add with only spaces          | Type spaces in amenities input, click Add.       | Nothing is added (trimmed/ignored).                                           |
| 7   | Add empty then type           | Click Add with empty input.                      | Nothing is added; no error.                                                   |
| 8   | Add then remove before submit | Add "WiFi", click Remove (×) on it, then submit. | Room is created with no amenities.                                            |
| 9   | Long amenity name             | Add a very long string (e.g. 200+ chars).        | Either accepted and saved, or validation prevents it; no UI break.            |
| 10  | Special characters            | Add "Wi-Fi", "TV (32)", "AC & heating".          | Saved and displayed correctly (no XSS, encoding issues).                      |
| 11  | Duplicate amenity             | Add "WiFi" twice.                                | Both entries appear (or duplicates are prevented, depending on product rule). |
| 12  | Add via Enter key             | Type "AC" and press Enter.                       | "AC" is added like when clicking Add.                                         |
| 13  | Many amenities                | Add 15–20 amenities.                             | List scrolls or wraps; reorder/remove still work; submit succeeds.            |


---

## Edit Room – Normal cases


| #   | Check                           | Steps                                                             | Expected                                         |
| --- | ------------------------------- | ----------------------------------------------------------------- | ------------------------------------------------ |
| 14  | Existing amenities shown        | Open Edit on a room that has amenities (e.g. WiFi, TV, Mini bar). | All existing amenities are listed.               |
| 15  | Add new amenity and save        | In Edit, add "AC", click Update Room.                             | Room updates; new list includes original + "AC". |
| 16  | Remove one amenity and save     | In Edit, remove one item (e.g. "WiFi"), click Update Room.        | Room updates; that amenity is gone.              |
| 17  | No change to amenities and save | Open Edit, change only e.g. price, click Update Room.             | Room updates; amenities unchanged.               |
| 18  | Room with no amenities          | Open Edit on a room that has no amenities.                        | Amenities section is empty; can add new ones.    |


---

## Edit Room – Edge cases


| #   | Check                            | Steps                                                            | Expected                                                   |
| --- | -------------------------------- | ---------------------------------------------------------------- | ---------------------------------------------------------- |
| 19  | Remove all amenities             | In Edit, remove every amenity one by one, then Update.           | Room saves with empty amenities.                           |
| 20  | Reorder then save                | Drag to reorder amenities (if drag-and-drop is enabled), Update. | New order is persisted.                                    |
| 21  | Edit amenity text (if supported) | Click an amenity to edit its text, change it, blur/save.         | Updated text is saved on Update Room.                      |
| 22  | Add, remove, add again           | Add "X", remove "X", add "Y", Update.                            | Final list has "Y" (and any existing); "X" is not present. |
| 23  | Same edge cases as Add           | Long names, special chars, duplicates, Enter key, many items.    | Same expectations as in Add Room edge cases 9–13.          |


---

## Cross-cutting / integration


| #   | Check                         | Steps                                                         | Expected                                                              |
| --- | ----------------------------- | ------------------------------------------------------------- | --------------------------------------------------------------------- |
| 24  | Cancel with unsaved amenities | Add/Edit, add amenities, click Cancel (or close modal).       | Modal closes; no save; data not persisted.                            |
| 25  | API/network error on submit   | Submit with amenities while backend is down or returns error. | Error message shown; amenities (and form) not lost so user can retry. |
| 26  | Backend persistence           | After save, reload page or re-open Edit.                      | Amenities match what was saved (order and content).                   |


---

## Date range (Available From / Available To)

| #   | Check | Steps | Expected |
| --- | ----- | ----- | -------- |
| 27  | **To before From** | Set Available From e.g. 06-Mar-2026, Available To 03-Feb-2026. Submit. | Error: "Available To date cannot be before Available From date." Submit blocked. |
| 28  | Same day (From = To) | Set From and To to the same date. Submit. | Valid; room created/updated (1-day availability). |
| 29  | Valid range | From before To (e.g. 01-Jan-2026, To 31-Dec-2026). Submit. | Success; dates saved correctly. |

---

## Quick reference – where to test

- **Add Room:** EMS → Hotels → choose a hotel → "+ Add Room Type".
- **Edit Room:** EMS → Hotels → on a room card → pencil (Edit) → modal.

Focus areas for **amenities**: add, remove, reorder (if available), submit with empty/many/special values, and that saved data round-trips correctly in Edit.