fix: complete October 22 workflow feedback and request failure recovery
This commit is contained in:
@@ -5,12 +5,12 @@ import { readFile } from 'node:fs/promises'
|
||||
const page = await readFile(new URL('../pages/picking/picking.vue', import.meta.url), 'utf8')
|
||||
|
||||
test('saving a seal is single-flight and submits the pending photo through the atomic evidence command', () => {
|
||||
assert.match(page, /:disabled="evidenceReadOnly \|\| sealSaving \|\| !sealReadyToSave"/)
|
||||
assert.match(page, /:disabled="evidenceReadOnly \|\| evidenceUploading \|\| sealSaving \|\| !sealReadyToSave"/)
|
||||
assert.match(page, /sealSaving \? '上传中…' : '保存并上传'/)
|
||||
assert.match(page, /async saveSealNo\(\) \{[\s\S]*?if \(this\.sealSaving\) return/)
|
||||
assert.match(page, /find\(\(item\) => item\.localPath && !item\.id\)/)
|
||||
assert.match(page, /await this\.queueEvidenceUpload\('SEAL', current\.localPath, String\(this\.sealNo\)\.trim\(\)\)/)
|
||||
assert.match(page, /stableOperationId\('evidence-upload',[\s\S]*?evidenceType: type,[\s\S]*?expectedVersion,[\s\S]*?localPath: path,[\s\S]*?sealNo: sealNo \|\| ''/)
|
||||
assert.match(page, /operationId: `evidence-\$\{Date.now\(\)\}/)
|
||||
assert.doesNotMatch(page, /seal-no-[^\n]*Date\.now\(\)/)
|
||||
assert.match(page, /this\.sealSaving = true[\s\S]*?finally \{[\s\S]*?this\.sealSaving = false/)
|
||||
})
|
||||
|
||||
Reference in New Issue
Block a user