forked from wangziqi/gongxue-base
test: strengthen launch security and capacity gates
This commit is contained in:
@@ -1015,6 +1015,15 @@ async function runStudentJourney(browser, portal, api) {
|
||||
await waitForText(page, '会员收银台');
|
||||
checks.push({ id: 'student.profile.to_checkout', status: 'pass', detail: await currentPath(page) });
|
||||
|
||||
await clickText(page, '提交订单');
|
||||
await waitForApiRequest(api, '/api/commerce/orders', 'POST');
|
||||
await waitForApiRequest(api, '/api/commerce/payments/create', 'POST');
|
||||
await waitForText(page, '支付参数已生成');
|
||||
await waitForText(page, 'SMOKE202607010001');
|
||||
await clickText(page, '刷新状态');
|
||||
await waitForApiRequest(api, '/api/commerce/orders/status', 'GET');
|
||||
checks.push({ id: 'student.checkout.order_payment', status: 'pass', detail: '收银台下单、支付参数生成和状态刷新 API 已触发' });
|
||||
|
||||
await navigateAndExpect(page, portal.baseUrl, '/pages/student/review/index?type=wrong', '错题本');
|
||||
await waitForText(page, '开始复习');
|
||||
await waitForText(page, '这是 H5 交互烟测题目');
|
||||
@@ -1213,6 +1222,9 @@ async function main() {
|
||||
keyRequests: {
|
||||
answers: api.requests.filter(item => item.path === '/api/learning/answers').length,
|
||||
favorites: api.requests.filter(item => item.path === '/api/learning/favorites/questions').length,
|
||||
ordersCreated: api.requests.filter(item => item.path === '/api/commerce/orders' && item.method === 'POST').length,
|
||||
paymentsCreated: api.requests.filter(item => item.path === '/api/commerce/payments/create' && item.method === 'POST').length,
|
||||
orderStatus: api.requests.filter(item => item.path === '/api/commerce/orders/status' && item.method === 'GET').length,
|
||||
tenantResolve: api.requests.filter(item => item.path === '/api/tenant/resolve').length,
|
||||
},
|
||||
},
|
||||
|
||||
Reference in New Issue
Block a user