# QA a React App in a Real Browser

An agent runs the Cypress Real World App, walks sign-up, bank account, payment and request flows in Chromium, and finds that a $0.00 payment goes through.

[Run this on Rush](https://cloud.getrush.ai/run/qa-in-browser/react/). Opens the console with this prompt ready to send, in a Project that has your repository.

## What the agent does

The agent reads `package.json`, installs with `CYPRESS_INSTALL_BINARY=0 yarn install --frozen-lockfile`, and runs `yarn types`, `yarn build` and `yarn test:unit:ci` on the untouched clone. It starts `yarn start` (Vite on :3000, the Express API on :3001) and checks both answer with `curl`.

In Chromium it signs up at `/signup` (submitting the empty form first), signs in, adds a bank account through onboarding, checks `/bankaccounts`, pays a contact $25 from `/transaction/new`, requests $40, then tries an amount of 0. Between steps it reads `data/database.json` to confirm balances and queries `/users/search?q=Ibrahim` to see why a search returned an unrelated name.

## Start it with one API call

`POST https://api.phoenix.so/o/{org}/sessions`

```json
{
  "agent": "claude",
  "input": "Start this app in the sandbox and test it in the browser as a QA tester: sign up, add a bank account, send a payment and request one. For each flow record the steps, a screenshot per step and the result. Write qa-report.md with every defect, its steps to reproduce and its severity. Change no code.",
  "resources": [
    {
      "url": "https://github.com/your-org/your-app"
    }
  ]
}
```

1. **Get an API key.** In the console, open Settings, then API keys, and create a key for your org. Send it in the Authorization header as a Bearer token.
2. **Send the request.** POST the body in request.json to https://api.phoenix.so/o/{org}/sessions, with your repository as the resources URL. The run starts in its own cloud sandbox.
3. **Read what came back.** Follow the run on its live stream or wait for the run.completed webhook, then read the result and its trajectory.

## What comes back

Tried on cypress-io/cypress-realworld-app at 0729f68: no code change. `qa-report.md` covers 4 flows with 21 screenshots and 3 defects: D1 (medium), PAY and REQUEST stay enabled at amount 0, a complete transaction with amount 0 is stored and "Paid $0.00 for zero" is shown; D2 (low), the sender's balance stays $0.00 after paying $25; D3 (low), console errors for `stop-color` and `stop-opacity` on every load. The baseline `yarn test:unit:ci` ended `Tests  44 passed | 10 skipped (54)`, and `yarn types` exited 0 again after the QA pass. The only diff is `data/database.json` (108 insertions, 3 deletions), which the app writes as it runs.

For the reviewer: whether D2 is intended, and keeping `data/database.json` out of any commit. The Cypress suites were not run (the binary was skipped at install), and negative amounts, a $0 request and accepting a request were not tested. The agent had to start the sandbox's Chromium itself before the browser CLI connected.

## Run it on every release candidate before sign-off

A teammate starts this prompt from the console in the Project that holds the app. Others in the org read the run as it clicks through; the starter or an org admin can send a follow-up such as "now try a negative amount", one of the gaps this report lists.

## Why run it on Rush?

Every flow the prompt named passed. The agent then went back to the payment form with an amount of 0, saw PAY enabled, and confirmed in `data/database.json` that a complete $0 transaction was stored. It filed D2 as a low-severity defect and flagged it as possibly by design.

## Frequently asked questions

### Where do the report and screenshots end up?

The report and 21 screenshots were written into `/workspace/.rush/artifacts/`: `qa-report.md` at the top, the screenshots under `shots/`. Nothing was pushed and no pull request was opened.

### Why did a search for "Ibrahim" return Kristian Bradtke?

The backend's search is fuzzy (`performSearch`). The agent queried the API directly and listed it as observation O1, not a defect.

## More React jobs

- [Review Pull Requests for Accessibility in a React App](https://getrush.ai/run/review-accessibility/react/)
- [Review Pull Requests Automatically in a React App](https://getrush.ai/run/review-pull-requests/react/)
- [Add Missing Tests to Every Pull Request in a React App](https://getrush.ai/run/test-every-pull-request/react/)

## The same job on other stacks

- [QA a Next.js App in a Real Browser](https://getrush.ai/run/qa-in-browser/nextjs/)
- [QA a Nuxt App in a Real Browser](https://getrush.ai/run/qa-in-browser/nuxt/)

## More jobs like this: Steer a run as a team

- [Redesign a Page in a Next.js App with Your Team](https://getrush.ai/run/redesign-page/nextjs/)

## Keep reading

- [How a Rush run works on your repository, from request to pull request](https://getrush.ai/cloud/)
- [Compare cloud agents, agent sandboxes and AI code review](https://getrush.ai/compare/)
- [Rush pricing: Free, Pro and Max](https://getrush.ai/pricing/)
