合入主线登录和营业时段策略,对齐旧界面与 React 访问流程
This commit is contained in:
commit
42395de23a
113 files changed
+1915
-558
No files matched your search
+30
-1
@@ -488,6 +488,35 @@ async function flowAssistant2(b) {
|
||||
await b.logout();
|
||||
}
|
||||
|
||||
// 在 adc0ca8 与 3e9af71 上运行同一浏览器场景得到的文字增量。基线文件保留原样。
|
||||
function expectedSnapshot(label, frozen) {
|
||||
if (label === '01-login-page') {
|
||||
const oldShell = [
|
||||
'云端数据库和飞书同步的真实状态,会在系统内显示。',
|
||||
'麦麦麦珠宝开单 · 库存 · 订单利润退出',
|
||||
'01 开单02 待交付03 每日购料04 回收/置换05 订单06 库存07 每日对账08 团队账目09 私域运营概况登记人数10 店铺与打印设置一次录入,沿同一张单收款、交货、复核。',
|
||||
'金额按分记录,黄金精确到 0.001g。实际收退款由经办人核实。',
|
||||
].join('\n');
|
||||
return frozen.replace(oldShell + '\n', '');
|
||||
}
|
||||
if (['12-owner-tab-settings', '29-owner-settings-saved'].includes(label)) {
|
||||
return frozen
|
||||
.replace(
|
||||
'开单默认费用\n',
|
||||
[
|
||||
'营业时间(北京时间)',
|
||||
'开始时间',
|
||||
'结束时间',
|
||||
'结束时间早于开始时间,表示营业到次日。两项留空时暂停员工访问。超级管理员可全天登录和使用账本。',
|
||||
'开单默认费用',
|
||||
'',
|
||||
].join('\n'),
|
||||
)
|
||||
.replace('contact=\ncertificate=', 'contact=\nbusinessOpen=\nbusinessClose=\ncertificate=');
|
||||
}
|
||||
return frozen;
|
||||
}
|
||||
|
||||
function compareSnapshots(snapshots) {
|
||||
const expected = fs.existsSync(BASE_UI)
|
||||
? fs
|
||||
@@ -502,7 +531,7 @@ function compareSnapshots(snapshots) {
|
||||
for (const { label, text } of snapshots) {
|
||||
const file = path.join(BASE_UI, label + '.txt');
|
||||
if (!fs.existsSync(file)) continue;
|
||||
const a = fs.readFileSync(file, 'utf8').split('\n'),
|
||||
const a = expectedSnapshot(label, fs.readFileSync(file, 'utf8')).split('\n'),
|
||||
c = text.split('\n');
|
||||
if (a.join('\n') === c.join('\n')) continue;
|
||||
let i = 0;
|
||||
|
||||
Reference in new issue
Block a user