BBB — TEST DASHBOARD (FUTURISTIC TECH) — RM388.88 BBB TEST DASHBOARD — ADMIN
Enter admin passcode to continue (change in file after deploy)
UNLOCK
CANCEL
Test Checklist & Tools — Full Power
▶ Send Test Webhook
▶ Create Test Stripe Session
▶ Send Test Welcome Email Tip: Use these to speed QA.
Webhook replay posts a sample `checkout.session.completed` JSON to your URL. Ensure your dev server accepts raw JSON and (optionally) verifies with the test webhook secret.
No actions recorded yet. Start tests and log will populate here.
Simulations & Quick Actions
Simulate Stripe Success
Simulate Stripe Decline
QR Preview (placeholder)
Replace with dev QR image URL
Audit Summary
Pass: 0 • Fail: 0 • Pending: 0
Export the audit report after finishing tests.
© BBB Global Network Group (MY) — Test Dashboard • KITA BRADERLICIOUS! `;
const blob = new Blob([html],{type:'text/html'});
downloadBlob(blob, `BBB_Test_Audit_Report_${(new Date()).toISOString().replace(/[:.]/g,'-')}.html`);
}
function downloadBlob(blob, filename){ const url = URL.createObjectURL(blob); const a = document.createElement('a'); a.href = url; a.download = filename; document.body.appendChild(a); a.click(); a.remove(); URL.revokeObjectURL(url); }// Buttons
document.getElementById('export-json').addEventListener('click', exportJSON);
document.getElementById('export-html').addEventListener('click', exportHTML);
document.getElementById('print-report').addEventListener('click', () => window.print());
document.getElementById('reset-all').addEventListener('click', () => { if(confirm('Reset all saved test progress?')) { localStorage.removeItem(STORAGE_KEY); location.reload(); } });// Simulate actions
document.getElementById('simulate-success').addEventListener('click', () => {
const name = document.getElementById('test-member').value; const email = document.getElementById('test-email').value;
appendLog(`[SIM] Stripe Success for ${name} <${email}>`);
[2,3,4,6,7].forEach(id => { state.steps[id].status='pass'; state.steps[id].ts=new Date().toISOString(); });
saveState();
});
document.getElementById('simulate-decline').addEventListener('click', () => {
appendLog('[SIM] Stripe Decline simulated');
state.steps[8].status='pass'; state.steps[8].ts=new Date().toISOString();
state.steps[2].status='fail'; state.steps[2].ts=new Date().toISOString();
saveState();
});// Upload proof simulation
document.getElementById('upload-proof').addEventListener('click', () => {
const f = document.getElementById('proof-file').files[0];
if(!f){ alert('Choose a file to simulate proof upload'); return; }
appendLog(`[SIM] Proof uploaded: ${f.name}. Marking step 5 pending approval.`);
state.steps[5].status='pending'; state.steps[5].ts=null; state.steps[5].notes=`Proof uploaded: ${f.name}`;
saveState();
});// Webhook replay
document.getElementById('send-test-webhook').addEventListener('click', async () => {
const url = document.getElementById('webhook-url').value.trim();
if(!url){ alert('Paste your dev webhook URL first'); return; }
const name = document.getElementById('test-member').value;
const email = document.getElementById('test-email').value;
const payload = {
id: "evt_test_checkout_completed",
type: "checkout.session.completed",
data: {
object: {
id: "cs_test_123",
customer_details: { name, email },
amount_total: 38888,
currency: "myr"
}
}
};
appendLog(`[WEBHOOK] Replaying checkout.session.completed to ${url}`);
try{
const r = await fetch(url, { method:'POST', headers:{'Content-Type':'application/json'}, body: JSON.stringify(payload) });
appendLog(`[WEBHOOK] Response: ${r.status} ${r.statusText}`);
if(r.ok){ state.steps[3].status='pass'; state.steps[3].ts=new Date().toISOString(); appendLog('[WEBHOOK] Marked Step 3 PASS'); saveState(); }
}catch(err){ appendLog(`[WEBHOOK] Error: ${err.message}`); }
});// Stripe create-checkout session call (dev)
document.getElementById('send-stripe-session').addEventListener('click', async () => {
const url = document.getElementById('stripe-create').value.trim();
if(!url){ alert('Paste your dev create-checkout-session endpoint first'); return; }
appendLog(`[STRIPE] Calling create-checkout-session -> ${url}`);
try{
const res = await fetch(url, { method:'POST', headers:{'Content-Type':'application/json'}, body: JSON.stringify({ test:true }) });
const data = await res.json();
appendLog(`[STRIPE] Response: ${res.status} ${res.statusText} — ${JSON.stringify(data)}`);
if(data.id){ appendLog('[STRIPE] Session created. Open Stripe Checkout to finish payment.'); state.steps[2].status='pending'; saveState(); }
}catch(err){ appendLog(`[STRIPE] Error: ${err.message}`); }
});// Simulate welcome email
document.getElementById('simulate-mail').addEventListener('click', () => {
const devEmail = document.getElementById('test-email').value;
appendLog(`[MAIL] Simulate: Welcome email sent to ${devEmail}`);
state.steps[4].status='pass'; state.steps[4].ts=new Date().toISOString(); saveState();
});// QR preview placeholder
document.getElementById('qr-preview').src = 'data:image/svg+xml;utf8,
QR_PLACEHOLDER ';// init
saveState();
render();})();