Skip to content
Skills Library
Programming · Testing

test-as-user

/test-as-user

Make this session's test account on the Neon dev branch, sign in, and click-test the app at desktop, tablet and phone widths. Use whenever a change needs checking in a real browser.

Licence
AGPL-3.0
Last repository change
02.11.2026

Assessment and security

98/ 100Class: good
Format25 / 25
Frontmatter with name and description, valid name, description up to 1,024 characters, name matching the folder.
Discoverability25 / 25
Description explains when to use the skill, has a reasonable length and uses third person.
Content35 / 35
At least 150 words and at most 500 lines, headings, step lists, examples or code.
Hygiene13 / 15
No placeholders such as TODO, no Windows paths, with a licence.
Riskno signals detected in the scan
Files in this package
1
Scripts
0
HTML comments
0
URLs in SKILL.md
4
Deprecation

No signals detected. Repository changed on 02.11.2026, without references to retired models or APIs.

Licence

AGPL-3.0, copyleft: przeróbki udostępniane innym muszą mieć tę samą licencję.

What it does and when to use it

Make this session's test account on the Neon dev branch, sign in, and click-test the app at desktop, tablet and phone widths. Use whenever a change needs checking in a real browser.

Original author description

Make this session's test account on the Neon dev branch, sign in, and click-test the app at desktop, tablet and phone widths. Use whenever a change needs checking in a real browser.

How it works

  1. 1. Point at the dev branch and check the host
  2. 2. Make the account
  3. 3. Sign in without typing the password
  4. 4. Run the server
  5. 5. Click-test with Playwright
  6. 6. Report honestly
Original SKILL.md headings · 61 lines, 764 words
SKILL.md preview
---
name: test-as-user
description: Make this session's test account on the Neon dev branch, sign in, and click-test the app at desktop, tablet and phone widths. Use whenever a change needs checking in a real browser.
---

# Test as a signed-in user

Each Claude session makes its **own** uniquely named test account on the **dev branch** and keeps it afterwards (never delete test accounts or their data). Never put a password in the repo, a note, a commit, or chat.

## 1. Point at the dev branch and check the host
`npm run dev` already reads `.env.development.local`. Scripts and `npm run migrate` read `.env.local` (live) only, so for any script:

```bash
export DATABASE_URL="$(grep -E '^DATABASE_URL=' .env.development.local | cut -d= -f2- | tr -d '\r"')"
echo "$DATABASE_URL" | sed -E 's#.*@([^/:?]+).*#\1#'   # print ONLY the host
```
Dev host starts `ep-your-dev-branch`. Live starts `ep-your-live-db`. If it is live, stop. (Do not use `set -a; . <(...)`: it failed in Git Bash.)

## 2. Make the account
Also export a throwaway `SESSION_SECRET` (any random string), or the import of `lib/auth.ts` fails. Write a short `tsx` script **in the project root** (so imports resolve), run it, then delete it:
- username `claude-MMDD-` plus a few random letters, display name saying it is a Claude test account;
- `createUser(username, displayName, password)` from `lib/auth.ts`;
- generate a random password and write it **only** to a file in the scratchpad.
Record the username (not the password) in PROGRESS.md's working notes.

## 3. Sign in without typing the password
```bash
curl -c jar.txt -H 'Content-Type: application/json' \
  -d "{\"username\":\"$U\",\"password\":\"$(cat scratchpad/pw.txt)\"}" http://localhost:3000/api/auth/login
curl -b jar.txt -X POST http://localhost:3000/api/privacy/ack
curl -b jar.txt -X POST http://localhost:3000/api/tour/seen
```
The last two stop the home page redirecting to `/welcome`.

## 4. Run the server
Follow `run-app` (it owns starting, attaching to the user's own server, and stopping only what you started). Remember: only one `next dev` per folder, and a change to `app/globals.css` `@theme` is not picked up by a running dev server; build and `next start -p 3100` instead.

## 5. Click-test with Playwright
Playwright is already installed (once, by the owner's request on 2026-10-18) in `C:\Users\you\projects\test-tools` (outside the repo, not in git, never in the project's `package.json`). **Do not `npm i` it again.** Put your test script in the scratchpad and import it by absolute path: `import { chromium } from "file:///C:/Users/you/projects/test-tools/node_modules/playwright-core/index.mjs"`. Launch with `chromium.launch({ channel: "chrome", headless: true })`. (Launching the Chrome program by `executablePath` closed at once on 2026-10-17; the `channel` form worked.) Pass the jar's cookies as `{ name, value, url: "http://localhost:3000" }`. Cookies and the first-run screens: step 3.
- Setting up data is quicker through the API with the jar's cookie in a `Cookie` header and an `Origin` header (the app refuses cross-site writes) than through the screen; then check the screen.
- Write the test so it can run twice: give names a random suffix, or clear what it made first. The dev branch keeps what a test makes.
- After a click that saves, **poll** the API (up to about 6 seconds) instead of sleeping a fixed time; the database can take a moment.
- Playwright's text match also finds the text inside a `<textarea>` (React copies its value there). Wait on the element that shows the saved text, such as a `p`, not on bare text.
- Widths: 1280, 1100 (desktop), 768 (tablet), 390 (phone).
- Sideways scroll: `document.documentElement.scrollWidth <= window.innerWidth`.
- After a client-side navigation use `page.waitForURL`, not `networkidle`.
- Match a list item, not bare text (the same words can appear in a footer).
- A hidden pane freezes animations; step them with `getAnimations()[0].pause()` instead of calling it a bug.
- Prefer reading the page as text to screenshots.

### Accessibility and overflow in the same run
axe-core is in the same `test-tools` folder (`C:/Users/you/projects/test-tools/node_modules/axe-core/axe.min.js`). For each page at 1280, 768 and 390 px, with the new controls opened (a list in reorder mode, a form in edit mode, a details section expanded):
```js
// no sideways scroll
const [scrollW, innerW] = await page.evaluate(() => [document.documentElement.scrollWidth, window.innerWidth]); // scrollW <= innerW
// axe: the rules the project cares about
await page.addScriptTag({ content: readFileSync("node_modules/axe-core/axe.min.js", "utf8") });
const res = await page.evaluate(() => axe.run(document, { runOnly: { type: "tag", values: ["wcag2a", "wcag2aa", "wcag21a", "wcag21aa", "wcag22aa", "best-practice"] } }));
// res.violations: print id, node count and the first target
```
Wait out a fade-in or a transition (about 0.7 s) before running axe on an overlay, or contrast is measured mid-fade. A violation that was already on the page before your change is still worth one line in `docs/open-items.md`. This does not replace `accessibility-pass` (keyboard, focus, screen readers).

## 6. Report honestly
Say what you checked, what you did not (touch and screen readers have never been checked), and any click-tests still owed.

Versions

The database has no other skills named test-as-user.

Database snapshot: 13.11.2026 · package version cbbb1147213c (SHA-256 digest of the entire package)

Downloads in the last 30 days: 1 · ranking

Report a problem with this skill: harmful content, incorrect descriptions or an author’s removal request.

Similar skills

  • 100neon-postgres-branches
    Choose and create the right Neon branch type for testing and development. Use when users ask about Neon branching, migration testing with real data, isolated test environments, schema-only branch workflows for sensitive data, or branch creation via Neon CLI or Neon MCP.
  • 100neon-postgres-branches
    Choose and create the right Neon branch type for testing and development. Use when users ask about Neon branching, migration testing with real data, isolated test environments, schema-only branch workflows for sensitive data, or branch creation via Neon CLI or Neon MCP.
  • 100ui-test
    Interact with and test the CC Director WPF app using the cc-click CLI tool. Use this to click buttons, read text, take screenshots, list elements, right-click session tabs, and navigate the UI.
  • 82dashboard-layout
    A dashboard screen laid out from the decisions it serves: KPI row, charts, filter bar, table, sidebar, every state, at phone, tablet and desktop. Use when a product or a team needs a screen of numbers that reads.
  • 100neon-postgres-branches
    Choose and create the right Neon branch type for testing and development. Use when users ask about Neon branching, migration testing with real data, isolated test environments, schema-only branch workflows for sensitive data, or branch creation via Neon CLI or Neon MCP. Triggers…
  • 100browser
    Browser automation with persistent page state. Use when the assistant needs to inspect, automate, or interact with a page: click, fill, login, scrape, extract data, test UI, take screenshots, or report what is visible. Do not use this skill for plain link opening; use `open…

Feedback and reports

Your message goes to Bartosz Sokoliński. An email address is needed only for a reply. See the privacy policy.