# RM Circle QA ## Member profile gate ``` # unit: profiles.js in isolation (seeding, username rules, code flow, persistence) node qa/profiles-unit.mjs # end to end: the real UI with real inbox sessions TMP=/d/tmp/rmc-e2e-data && rm -rf $TMP && mkdir -p $TMP ssh root@coolify.saasy.top "docker exec \$(docker ps -q --filter name=kr445fqc) cat /app/data/config.json" > $TMP/config.json echo '{}' > $TMP/sponsors.json echo '{"49":{"email":"seeded49@example.com","ts":"x"}}' > $TMP/member-alerts.json node -e "const m=require('./messages.js'); m.init({dataDir:process.argv[1],chain:require('./chain.js'),isProd:false}); require('fs').writeFileSync(process.argv[1]+'/tokens.txt', m.mintSession(21)+'\n'+m.mintSession(49));" $TMP PORT=3399 DATA_DIR=$TMP ADMIN_PASSWORD=localtest node server.js & LOCAL=http://127.0.0.1:3399 TOKEN=$(sed -n 1p $TMP/tokens.txt) TOKEN2=$(sed -n 2p $TMP/tokens.txt) node qa/gate-e2e.mjs ``` Covers: the gate fires on the owner's own page only, cannot be dismissed (Escape, backdrop, no close button), username and email validation, the code flow including a wrong code, completion landing on the dashboard tab, the profile card and in-place editing (dismissable), the seeded email pre-filling at step 2, visitors on every ID-keyed shared link seeing no gate and no 401, and phone-width layout. `devCode` is returned by `/api/public/profile/email-start` only when `NODE_ENV !== 'production'`, which is what lets the test read the code. The live container runs with NODE_ENV=production.