refactor: consolidate finance workflow modules
This commit is contained in:
@@ -40,6 +40,10 @@ const reviewPanelModelScript = readFileSync(
|
||||
fileURLToPath(new URL('../src/views/scripts/travelReimbursementReviewPanelModel.js', import.meta.url)),
|
||||
'utf8'
|
||||
)
|
||||
const createReviewModelScript = readFileSync(
|
||||
fileURLToPath(new URL('../src/views/scripts/travelReimbursementCreateReviewModel.js', import.meta.url)),
|
||||
'utf8'
|
||||
)
|
||||
const messageItemTemplate = readFileSync(
|
||||
fileURLToPath(new URL('../src/components/travel/TravelReimbursementMessageItem.vue', import.meta.url)),
|
||||
'utf8'
|
||||
@@ -130,6 +134,13 @@ test('review drawer tools expose the default review tab before conditional docum
|
||||
)
|
||||
})
|
||||
|
||||
test('create review model remains a thin compatibility layer over review panel model', () => {
|
||||
assert.match(createReviewModelScript, /export \{[\s\S]*buildReviewFactCards[\s\S]*buildReviewRiskItems[\s\S]*\} from '\.\/travelReimbursementReviewPanelModel\.js'/)
|
||||
assert.doesNotMatch(createReviewModelScript, /function buildReviewFactCards/)
|
||||
assert.doesNotMatch(createReviewModelScript, /function buildReviewRiskItems/)
|
||||
assert.doesNotMatch(createReviewModelScript, /const REVIEW_RISK_LEVEL_META/)
|
||||
})
|
||||
|
||||
test('review drawer tool buttons switch modes instead of toggling the active mode closed', () => {
|
||||
assert.match(createViewScriptSurface, /const isReviewOverviewDrawer = computed\(\(\) => reviewDrawerMode\.value === REVIEW_DRAWER_MODE_REVIEW\)/)
|
||||
assert.match(createViewScriptSurface, /function switchReviewDrawerMode\(mode\) \{[\s\S]*if \(reviewDrawerMode\.value === mode\) \{[\s\S]*return[\s\S]*\}/)
|
||||
|
||||
Reference in New Issue
Block a user