> ## Documentation Index
> Fetch the complete documentation index at: https://www.minitap.ai/docs/llms.txt
> Use this file to discover all available pages before exploring further.

# Web apps

> Test a web app by its URL or from your repository, on the browsers and screen sizes your users have.

Mini tests a web app in the browser, at a URL you give it or on a build of your repository it serves itself. This page covers which address a run opens, the browsers and screen sizes you can pick, and how to change both for a single run.

| You want to test | Set this up |
| - | - |
| Your production or staging site | The **Web app URL** in the app's settings |
| Every commit, before it's deployed | A linked repository: Mini builds and serves each commit |
| A pull request's preview deployment | A per-run URL, from **Run tests** or the GitHub Action's `web-url` |
| A site behind a firewall or a VPN | See [Reach private apps](https://www.minitap.ai/docs/minitest/setup/private-apps.md) |

## Where a run points

Open the app and go to **App settings → General → Web configuration**.

* **Web app URL** is the address Mini opens on every run: production, staging, or any host Mini can reach.
* With a repository linked to the app, you can leave the URL empty. Mini then builds your frontend at the commit it tests and serves it on a preview host. A run on a commit always tests that commit's build, even when the app also has a URL.

To test another address once, without changing the app, set the URL for that run. In **Run tests**, the web card has a **Web URL for this run** field. In CI, pass `web-url` to the GitHub Action:

```yaml theme={"theme":{"light":"github-light","dark":"vesper"}}
- uses: minitap-ai/minitest-trigger@v2
  with:
    run-web: true
    web-url: https://pr-142.preview.example.com
```

A per-run URL is ignored when the run tests a commit's build. The CLI and Slack run the app's configured URL. See the [GitHub Action reference](https://www.minitap.ai/docs/minitest/reference/minitest-trigger-action.md#web-runs) for every web input.

## Preview hosts for repository builds

When Mini builds a commit of your web app, it serves the build on a generated host:

```text theme={"theme":{"light":"github-light","dark":"vesper"}}
<preview_key>--<workspace_slug>.preview.minitap.ai
```

`<workspace_slug>` is your workspace slug, shown in **Settings → General**. `<preview_key>` changes with every build, so each build gets its own host.

The build receives `MINITAP_PREVIEW_URL`, set to that host. You don't add the variable yourself. Where your build config needs the address, write `{{MINITAP_PREVIEW_URL}}` and Mini fills it in at build time:

```env theme={"theme":{"light":"github-light","dark":"vesper"}}
MINITAP_PREVIEW_URL=https://<preview_key>--<workspace_slug>.preview.minitap.ai
```

If your app uses OAuth or any list of allowed origins, add this wildcard to your provider once, so every preview build signs in without a change per build:

```text theme={"theme":{"light":"github-light","dark":"vesper"}}
*--<workspace_slug>.preview.minitap.ai
```

## Browsers and screen sizes

In **App settings → General → Web configuration**, **What devices do your users use to visit your website?** sets the app's default targets. Pick one or more:

| Device | Browsers | Spec for the GitHub Action |
| - | - | - |
| **Desktop** | Chrome, Firefox, Edge | `chrome:desktop`, `firefox:desktop`, `edge:desktop` |
| **Tablet** | Chrome, Firefox, Edge | `chrome:tablet`, `firefox:tablet`, `edge:tablet` |
| **Mobile** | Chrome on Android, Safari on iPhone | `chrome:mobile`, `safari:mobile` |

Mini runs the scenarios on each target you pick. Desktop and tablet keep a fixed viewport for the whole run. Safari is available on iPhone only.

## Pick targets for one run

| Where you start the run | How targets are chosen |
| - | - |
| **Run tests** in the dashboard | The web card starts from the app's defaults. Add or remove targets for this run. |
| GitHub Action | `run-web: true` runs the defaults. `web-targets` runs an explicit list, like `chrome:desktop,safari:mobile`. Set one or the other. |
| CLI | `minitest run start "<scenario>" --web` or `minitest run all --web` runs the defaults. |
| Slack | The app's defaults. |

```yaml theme={"theme":{"light":"github-light","dark":"vesper"}}
- uses: minitap-ai/minitest-trigger@v2
  with:
    web-targets: chrome:desktop,safari:mobile
    web-url: https://pr-142.preview.example.com
```

## Camera feed for web scenarios

When a scenario scans a QR code or takes a photo with the webcam, give it the image or video the camera should show. Open the scenario and set its **Camera** property; without one, the scenario uses the **Default feed**. The file loops as the camera on desktop and tablet targets. Chrome on Android and Safari on iPhone ignore it.

From the CLI, pass a local file or the ID of a file you already uploaded:

```bash theme={"theme":{"light":"github-light","dark":"vesper"}}
minitest --app <app_id> scenario update <scenario_id> --camera-media ./fixtures/checkin-qr.png
minitest --app <app_id> scenario update <scenario_id> --clear-camera-media
```

Videos can be up to 50 MB and images up to 25 MB.

## Next steps

> [card] [Reach private apps](https://www.minitap.ai/docs/minitest/setup/private-apps.md)
>
> Staging behind a firewall, a VPN or a country restriction.

> [card] [Test accounts and sign-in](https://www.minitap.ai/docs/minitest/setup/test-accounts.md)
>
> The users Mini signs in as on your site.

> [card] [Pull request checks](https://www.minitap.ai/docs/minitest/runs/pull-request-checks.md)
>
> A verdict on every PR, against its preview or its commit.

> [card] [What Mini can do on the web](https://www.minitap.ai/docs/minitest/reference/capabilities.md)
>
> Cookies, offline mode, the browser speaker and more.


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.