forked from wangziqi/gongxue-base
test: require full h5 interaction evidence
This commit is contained in:
@@ -263,14 +263,20 @@
|
||||
"artifact": "launch-artifacts/taro-h5-interaction-smoke.json",
|
||||
"summary": {
|
||||
"fail": 0,
|
||||
"pass": 26,
|
||||
"pass": 32,
|
||||
"mockApi": {
|
||||
"keyRequests": {
|
||||
"answers": 1,
|
||||
"favorites": 2,
|
||||
"ordersCreated": 1,
|
||||
"paymentsCreated": 1,
|
||||
"orderStatus": 1
|
||||
"orderStatus": 1,
|
||||
"tenantResolve": 3,
|
||||
"tenantContentWrites": 1,
|
||||
"tenantAdminWrites": 1,
|
||||
"crmWrites": 1,
|
||||
"commissionWrites": 1,
|
||||
"platformAdminWrites": 1
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -209,6 +209,30 @@ assert.ok(
|
||||
'missing H5 interaction smoke should be reported as a blocker',
|
||||
);
|
||||
|
||||
const oldTaroInteractionCoverage = runGate(tempDir => {
|
||||
const evidence = createEvidence(tempDir);
|
||||
const item = evidence.checks.find(check => check.id === 'taro.h5-interaction-smoke');
|
||||
item.summary.pass = 26;
|
||||
return evidence;
|
||||
});
|
||||
assert.notEqual(oldTaroInteractionCoverage.status, 0, 'old 26-check H5 interaction evidence should fail launch gate');
|
||||
assert.ok(
|
||||
oldTaroInteractionCoverage.payload.checks?.some(item => item.id === 'check.taro.h5-interaction-smoke.summary' && item.status === 'blocker'),
|
||||
'old H5 interaction coverage should be reported as a blocker',
|
||||
);
|
||||
|
||||
const missingAdminWriteCoverage = runGate(tempDir => {
|
||||
const evidence = createEvidence(tempDir);
|
||||
const item = evidence.checks.find(check => check.id === 'taro.h5-interaction-smoke');
|
||||
item.summary.mockApi.keyRequests.platformAdminWrites = 0;
|
||||
return evidence;
|
||||
});
|
||||
assert.notEqual(missingAdminWriteCoverage.status, 0, 'H5 interaction evidence without platform admin writes should fail launch gate');
|
||||
assert.ok(
|
||||
missingAdminWriteCoverage.payload.checks?.some(item => item.id === 'check.taro.h5-interaction-smoke.summary' && item.status === 'blocker'),
|
||||
'missing platform admin write coverage should be reported as a blocker',
|
||||
);
|
||||
|
||||
const missingTaroReleaseManifest = runGate(tempDir => {
|
||||
const evidence = createEvidence(tempDir);
|
||||
evidence.checks = evidence.checks.filter(item => item.id !== 'taro.h5-release-manifest');
|
||||
|
||||
@@ -166,12 +166,18 @@ const gateChecks = [
|
||||
commandIncludes: 'smoke:taro:h5:interaction',
|
||||
summary: {
|
||||
fail: 0,
|
||||
pass: { gte: 26 },
|
||||
pass: { gte: 32 },
|
||||
'mockApi.keyRequests.answers': { gte: 1 },
|
||||
'mockApi.keyRequests.favorites': { gte: 1 },
|
||||
'mockApi.keyRequests.ordersCreated': { gte: 1 },
|
||||
'mockApi.keyRequests.paymentsCreated': { gte: 1 },
|
||||
'mockApi.keyRequests.orderStatus': { gte: 1 },
|
||||
'mockApi.keyRequests.tenantResolve': { gte: 3 },
|
||||
'mockApi.keyRequests.tenantContentWrites': { gte: 1 },
|
||||
'mockApi.keyRequests.tenantAdminWrites': { gte: 1 },
|
||||
'mockApi.keyRequests.crmWrites': { gte: 1 },
|
||||
'mockApi.keyRequests.commissionWrites': { gte: 1 },
|
||||
'mockApi.keyRequests.platformAdminWrites': { gte: 1 },
|
||||
},
|
||||
},
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user