---
module: devices.agent-scripts
title: Agent Scripts
tab: Testing
order: 35
audience: dev
---

Frontend test checklist for **Agent Scripts** (`devices.bcos.dev` → **Settings → Agent Scripts**). Click through in the UI and mark each row Pass or Fail.

## Set up
Log in at **devices.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 |
| `customer_a@customer1.bcos.dev` | Customer | C1 · read-only |

Test devices are the simulators: **C1-ATM-001…** (connected ATMs) and **C1-TCR-001…** (TCR machines, which are excluded from pushes).

## What to test

| # | Do this | ✅ Pass if |
|---|---------|-----------|
| 1 | As `msp_a`, open **Settings → Agent Scripts** | Page loads with a **+ Add Script** button and a table headed **Name / Description / Updated** |
| 2 | Click **+ Add Script**, name it `qa-cleanup.cmd`, add a description + some content, click **Add Script** | Panel slides closed, green "created" toast appears, and the row shows a blue **CMD** tag next to the name |
| 3 | **+ Add Script** again, name it `qa-check.txt`, add content, click **Add Script** | Inline error **"Name must end with .cmd, .sh, or .ps1"** — nothing is saved |
| 4 | Add a script but leave the **Script Content** editor empty, click **Add Script** | Inline error **"Script content is required."** — nothing is saved |
| 5 | Add `qa-tidy.ps1` and `qa-run.sh` | The `.ps1` row shows a purple **PS1** tag and the `.sh` row a green **SH** tag |
| 6 | Click **Edit** on `qa-cleanup.cmd` | The **Script Name** field is greyed out / can't be changed; description + content are editable, and **Save Changes** shows an "updated" toast |
| 7 | Click **Push** next to `qa-cleanup.cmd` | Modal opens showing a count of **connected ATMs**, a note that **TCR machines are excluded**, and a **Push to [n] ATMs** button; clicking it shows a green "pushed to n ATMs" toast |
| 8 | Click **Delete** on `qa-check`/a test script, confirm in the dialog | Confirm dialog appears; after confirming, the row disappears from the table with a "deleted" toast |
| 9 | Log in as `customer_a` and try to reach **Settings → Agent Scripts** | You **cannot manage scripts** — the page is unavailable / the list fails to load / there is **no + Add Script button** (customers have no access) |

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