等员工列表更新完成后验证店铺保存并固定运行起始版本
This commit is contained in:
1 parent
7d2007955f
commit
340100ce6c
2 files changed
+10
-3
No files matched your search
@@ -16,6 +16,7 @@ import { compare, report } from './lib/diff.js';
|
||||
|
||||
import { app, git, reference, fixedReference } from './lib/write-reference.mjs';
|
||||
|
||||
const candidate = git('rev-parse', 'HEAD');
|
||||
const temp = fs.mkdtempSync(path.join(os.tmpdir(), 'ledger-write-parity-'));
|
||||
let oldApp;
|
||||
const day = '2026-11-20';
|
||||
@@ -306,7 +307,7 @@ try {
|
||||
: process.argv[only + 1].split(',');
|
||||
const allHits = {},
|
||||
outcomes = {};
|
||||
console.log('旧版', reference, '新版', git('rev-parse', 'HEAD'));
|
||||
console.log('旧版', reference, '新版', candidate);
|
||||
process.env.WEB_NEXT = '1';
|
||||
browser = await chromium.launch();
|
||||
for (const group of groups) {
|
||||
@@ -377,7 +378,7 @@ try {
|
||||
const name = only < 0 ? 'all' : groups.join('-') + (process.argv.includes('--prove') ? '-negative' : '');
|
||||
fs.writeFileSync(
|
||||
path.join(output, name + '.json'),
|
||||
redact(JSON.stringify({ reference, head: git('rev-parse', 'HEAD'), outcomes, coverage: routes }, null, 2)),
|
||||
redact(JSON.stringify({ reference, head: candidate, outcomes, coverage: routes }, null, 2)),
|
||||
);
|
||||
} finally {
|
||||
await browser?.close();
|
||||
|
||||
@@ -49,11 +49,17 @@ export default async function settings(ctx) {
|
||||
await form.locator('[name=verified]').check();
|
||||
await write(ctx, owner, title + '员工', endpoint + verb, () => submit(form));
|
||||
}
|
||||
// 旧界面先关闭员工弹窗,再更新店铺表单并重载员工列表。
|
||||
await row.waitFor({ state: 'detached' });
|
||||
await owner.locator('[data-employee="owner"]').waitFor();
|
||||
const shop = owner.locator('#shop-settings-form'),
|
||||
print = owner.locator('#print-settings');
|
||||
await fill(shop, { storeName: '迁移对照店铺' });
|
||||
await fill(print, { rows: '8' });
|
||||
await write(ctx, owner, '保存店铺名称', '/api/shop-settings', () => submit(shop));
|
||||
await write(ctx, owner, '保存店铺名称', '/api/shop-settings', async () => {
|
||||
assert.equal(await shop.locator('[name=storeName]').inputValue(), '迁移对照店铺');
|
||||
await submit(shop);
|
||||
});
|
||||
assert.equal(await print.locator('[name=rows]').inputValue(), '8');
|
||||
await write(ctx, owner, '保存打印设置', '/api/printing', () => owner.locator('button[form=print-settings]').click());
|
||||
await ctx.step('备份并下载完整账本', async () => {
|
||||
|
||||
Reference in new issue
Block a user