QA pass on the member profile gate: stable button ids, completion opens the dashboard tab, local devCode, 47-test E2E suite

Findings fixed: the gate's buttons had no stable ids (fragile to test and maintain), and finishing the
gate left the member on the pitch tab where the profile card and Messages are not visible, so
completion now opens the Position Dashboard tab. /api/public/profile/email-start returns devCode
outside production so the flow is testable locally, matching the InstantAdPay pattern.

qa/profiles-unit.mjs (28 assertions) and qa/gate-e2e.mjs (47 assertions, real sessions, real UI) with
a README. All pass.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
This commit is contained in:
martbost
2026-09-16 17:40:03 -05:00
parent 2c5fff20f5
commit 2f90e1a97f
7 changed files with 232 additions and 10 deletions
+1
View File
@@ -1466,6 +1466,7 @@ async function handleApi(req,res,pathname){
if(!s)return json(res,401,{error:'Not signed in.'});
const b=await bodyJson(req).catch(()=>null);
const r=profiles.startEmail(s.id,b&&b.email);
if(r.ok&&!IS_PROD&&r.devCode===undefined)r.devCode=profiles.peekCode(s.id); // local testing only; never in production
return json(res,r.error?400:200,r);
}
if(req.method==='POST'&&pathname==='/api/public/profile/email-verify'){