合入主线登录和营业时段策略,对齐旧界面与 React 访问流程
This commit is contained in:
commit
42395de23a
113 files changed
+1915
-558
No files matched your search
@@ -14,6 +14,7 @@ import { readOnlyPost, ReadOnlyChecks } from './writes/readonly.mjs';
|
||||
import { coverage } from './write-coverage.mjs';
|
||||
import { fullGroups, contracts, assertSequence, assertStepActions, observeStep } from './lib/frozen-write-steps.mjs';
|
||||
import { compare, report } from './lib/diff.js';
|
||||
import { expectedWriteResult } from './lib/main-business-hours.js';
|
||||
|
||||
import { app, git, reference, fixedReference } from './lib/write-reference.mjs';
|
||||
|
||||
@@ -289,7 +290,10 @@ try {
|
||||
if (process.argv.includes('--prove'))
|
||||
assert.equal(process.argv[only + 1], 'settings', '使用 --only settings --prove');
|
||||
const groups = only < 0 ? [...fullGroups] : (process.argv[only + 1] ?? '').split(',');
|
||||
assert.ok(groups.every(group => Object.hasOwn(contracts, group)), '--only 需要指定已冻结的业务组');
|
||||
assert.ok(
|
||||
groups.every(group => Object.hasOwn(contracts, group)),
|
||||
'--only 需要指定已冻结的业务组',
|
||||
);
|
||||
assert.equal(new Set(groups).size, groups.length, '--only 重复指定业务组');
|
||||
const allHits = {},
|
||||
outcomes = {};
|
||||
@@ -332,13 +336,20 @@ try {
|
||||
singular.orderReads = [];
|
||||
}
|
||||
}
|
||||
const diffs = expected === old.result ? raw : compare(expected, next.result);
|
||||
const mainExpected = expectedWriteResult(expected);
|
||||
const mainChanges = compare(expected, mainExpected).diffs;
|
||||
const diffs = compare(mainExpected, next.result);
|
||||
const approved = expected === old.result ? [] : compare(old.result, expected).diffs;
|
||||
console.log(
|
||||
group,
|
||||
Object.keys(old.result.steps).length + ' 步',
|
||||
old.hits.length + '/' + next.hits.length + ' 次 POST',
|
||||
diffs.diffs.length + ' 处未预期差异,' + approved.length + ' 处已确认字段差异',
|
||||
diffs.diffs.length +
|
||||
' 处未预期差异,' +
|
||||
approved.length +
|
||||
' 处已确认字段差异,' +
|
||||
mainChanges.length +
|
||||
' 处主线营业时间字段差异',
|
||||
);
|
||||
outcomes[group] = {
|
||||
readOnly: { old: old.verifiedReads, new: next.verifiedReads },
|
||||
@@ -354,7 +365,9 @@ try {
|
||||
},
|
||||
}
|
||||
: {}),
|
||||
...(approved.length ? { approved, rawDiffs: raw.diffs } : {}),
|
||||
...(mainChanges.length ? { mainBusinessHours: mainChanges } : {}),
|
||||
...(approved.length ? { approved } : {}),
|
||||
...(approved.length || mainChanges.length ? { rawDiffs: raw.diffs } : {}),
|
||||
};
|
||||
for (const [side, rs] of [
|
||||
['old', old],
|
||||
|
||||
Reference in new issue
Block a user