---
module: reports.queries
title: Saved Queries
tab: Testing
order: 35
audience: dev
---

Frontend test checklist for **Saved Queries** (`report.bcos.dev`). Saved Queries live on the **Templates** tab — each report row has a **Queries** button. Click through in the UI and mark each row Pass or Fail.

## Set up
Log in at **report.bcos.dev** — test accounts (all password `Passw0rd-d3v!`):

| Login | Role | Sees |
|-------|------|------|
| `bcos_a@bcos.dev` | Admin | All institutions |
| `msp_a@msp1.bcos.dev` | MSP admin | C1 + C2 only |
| `customer_a@customer1.bcos.dev` | Customer | C1 only |

Queries hang off a **report template**, so first make sure at least one report exists on the **Templates** tab (create one if the list is empty). The ATM picker lists the simulator devices: **C1-ATM-001…**, **C1-TCR-001…** (and C2-/C3- for the other institutions).

## What to test

| # | Do this | ✅ Pass if |
|---|---------|-----------|
| 1 | As `msp_a`, on **Templates** click the **Queries** button on a report row | A **Saved Queries** panel opens beneath that row (shows existing cards, or "No saved queries yet") |
| 2 | Click **+ New Query** → enter a **Name**, pick **Last 30 days**, leave ATMs empty → **Save** | A new query card appears reading **Last 30 days · All ATMs** |
| 3 | Click **Edit** on that card → switch Date Range to **Custom range**, set From/To, move one ATM to the assigned side → **Save** | Card updates to show the custom dates and **1 ATMs** |
| 4 | In **+ New Query**, open the ATM picker as `msp_a` | Only **C1-** and **C2-** devices are listed — no C3- devices |
| 5 | Log in as `customer_a`, open **Queries** → **+ New Query** → ATM picker | Only **C1-** devices are listed — no C2- or C3- |
| 6 | On a report that has its **schedule turned on**, click **Set Scheduled** on a query card | Card gets a **Scheduled** badge and the button changes to **Unschedule** |
| 7 | Open the Queries panel on a report with **no schedule** turned on | Query cards show only **Edit** / **Delete** — there is **no Set Scheduled** button |
| 8 | Click **▶ Run** on the report | Your saved query is listed as a pickable option alongside **Custom (one-off)** |
| 9 | On a query card click **Delete** → **Confirm?** | The card disappears; if it was the scheduled one, the **Scheduled** badge is gone from the panel |

**Report a fail with:** the row #, which login you used, and what you actually saw.
