2026-05-20 21:00:47 +08:00
|
|
|
import assert from 'node:assert/strict'
|
|
|
|
|
import { readFileSync } from 'node:fs'
|
|
|
|
|
import test from 'node:test'
|
|
|
|
|
import { fileURLToPath } from 'node:url'
|
|
|
|
|
|
|
|
|
|
const detailTemplate = readFileSync(
|
|
|
|
|
fileURLToPath(new URL('../src/views/TravelRequestDetailView.vue', import.meta.url)),
|
|
|
|
|
'utf8'
|
|
|
|
|
)
|
|
|
|
|
const detailScript = readFileSync(
|
|
|
|
|
fileURLToPath(new URL('../src/views/scripts/TravelRequestDetailView.js', import.meta.url)),
|
|
|
|
|
'utf8'
|
|
|
|
|
)
|
2026-05-26 09:15:14 +08:00
|
|
|
const detailStyles = readFileSync(
|
|
|
|
|
fileURLToPath(new URL('../src/assets/styles/views/travel-request-detail-view.css', import.meta.url)),
|
|
|
|
|
'utf8'
|
|
|
|
|
)
|
2026-05-27 14:35:17 +08:00
|
|
|
const approvalDialog = readFileSync(
|
|
|
|
|
fileURLToPath(new URL('../src/components/travel/TravelRequestApprovalDialog.vue', import.meta.url)),
|
|
|
|
|
'utf8'
|
|
|
|
|
)
|
2026-06-17 14:39:26 +08:00
|
|
|
const confirmDialog = readFileSync(
|
|
|
|
|
fileURLToPath(new URL('../src/components/shared/ConfirmDialog.vue', import.meta.url)),
|
|
|
|
|
'utf8'
|
|
|
|
|
)
|
2026-05-27 17:31:27 +08:00
|
|
|
const budgetAnalysisComponent = readFileSync(
|
|
|
|
|
fileURLToPath(new URL('../src/components/travel/TravelRequestBudgetAnalysis.vue', import.meta.url)),
|
|
|
|
|
'utf8'
|
|
|
|
|
)
|
2026-05-20 21:00:47 +08:00
|
|
|
const reimbursementService = readFileSync(
|
|
|
|
|
fileURLToPath(new URL('../src/services/reimbursements.js', import.meta.url)),
|
|
|
|
|
'utf8'
|
|
|
|
|
)
|
2026-06-17 14:39:26 +08:00
|
|
|
const appShellScript = readFileSync(
|
|
|
|
|
fileURLToPath(new URL('../src/composables/useAppShell.js', import.meta.url)),
|
|
|
|
|
'utf8'
|
|
|
|
|
)
|
2026-05-20 21:00:47 +08:00
|
|
|
|
|
|
|
|
function extractFunction(source, name) {
|
|
|
|
|
const signatureIndex = source.indexOf(`function ${name}(`)
|
|
|
|
|
assert.notEqual(signatureIndex, -1, `${name} should exist`)
|
|
|
|
|
|
|
|
|
|
const bodyStart = source.indexOf('{', signatureIndex)
|
|
|
|
|
assert.notEqual(bodyStart, -1, `${name} should have a body`)
|
|
|
|
|
|
|
|
|
|
let depth = 0
|
|
|
|
|
for (let index = bodyStart; index < source.length; index += 1) {
|
|
|
|
|
const char = source[index]
|
|
|
|
|
if (char === '{') {
|
|
|
|
|
depth += 1
|
|
|
|
|
} else if (char === '}') {
|
|
|
|
|
depth -= 1
|
|
|
|
|
if (depth === 0) {
|
|
|
|
|
return source.slice(signatureIndex, index + 1)
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
assert.fail(`${name} body should be closed`)
|
|
|
|
|
}
|
|
|
|
|
|
2026-05-27 14:35:17 +08:00
|
|
|
test('approval-mode detail collects leader opinion inside confirm dialog before API call', () => {
|
2026-05-20 21:00:47 +08:00
|
|
|
assert.match(detailScript, /approvalMode:/)
|
|
|
|
|
assert.match(detailScript, /const leaderOpinion = ref\(''\)/)
|
|
|
|
|
assert.match(detailScript, /const approveConfirmDialogOpen = ref\(false\)/)
|
2026-06-17 14:39:26 +08:00
|
|
|
assert.match(detailScript, /const approvalRiskConfirmed = ref\(false\)/)
|
|
|
|
|
assert.match(detailScript, /const approvalRiskConfirmItems = computed/)
|
|
|
|
|
assert.match(detailScript, /const approvalRiskConfirmRequired = computed/)
|
2026-05-20 21:00:47 +08:00
|
|
|
assert.match(detailScript, /const canApproveRequest = computed/)
|
2026-05-21 09:28:33 +08:00
|
|
|
assert.match(detailScript, /canApproveLeaderExpenseClaims/)
|
2026-05-27 17:31:27 +08:00
|
|
|
assert.match(detailScript, /canApproveBudgetExpenseApplications/)
|
2026-05-27 14:35:17 +08:00
|
|
|
assert.match(detailScript, /isCurrentDirectManagerForRequest/)
|
|
|
|
|
assert.match(detailScript, /isCurrentRequestApplicant/)
|
2026-05-21 09:28:33 +08:00
|
|
|
assert.match(detailScript, /isFinanceApprovalStage/)
|
2026-05-27 17:31:27 +08:00
|
|
|
assert.match(detailScript, /const isBudgetApprovalStage = computed/)
|
|
|
|
|
assert.match(detailScript, /const showBudgetAnalysis = computed/)
|
2026-05-27 14:35:17 +08:00
|
|
|
assert.match(detailScript, /const isCurrentApplicant = computed/)
|
|
|
|
|
assert.match(detailScript, /const isCurrentDirectManagerApprover = computed/)
|
|
|
|
|
assert.match(detailScript, /const canProcessFinanceApprovalStage = computed/)
|
2026-05-27 17:31:27 +08:00
|
|
|
assert.match(detailScript, /const canProcessBudgetApprovalStage = computed/)
|
2026-06-09 08:32:00 +00:00
|
|
|
assert.match(detailScript, /const canProcessCurrentApprovalStage = computed/)
|
2026-05-21 09:28:33 +08:00
|
|
|
assert.match(detailScript, /approvalOpinionTitle/)
|
|
|
|
|
assert.match(detailScript, /approvalConfirmDescription/)
|
2026-05-27 17:31:27 +08:00
|
|
|
assert.doesNotMatch(detailScript, /approvalNextStage/)
|
2026-05-27 14:35:17 +08:00
|
|
|
assert.doesNotMatch(detailScript, /showApplicationLeaderOpinionInput/)
|
|
|
|
|
assert.doesNotMatch(detailScript, /showLeaderApprovalPanel/)
|
2026-06-17 14:39:26 +08:00
|
|
|
assert.match(detailScript, /const budgetApprovalOpinionRequired = computed/)
|
|
|
|
|
assert.match(detailScript, /const requiresApprovalOpinion = computed\(\(\) => budgetApprovalOpinionRequired\.value\)/)
|
|
|
|
|
assert.match(detailScript, /hasBudgetApprovalWarning\(request\.value\)/)
|
|
|
|
|
assert.match(detailScript, /return '预算审批意见'/)
|
2026-05-27 14:35:17 +08:00
|
|
|
assert.match(detailScript, /buildLeaderApprovalEvents/)
|
2026-05-26 09:15:14 +08:00
|
|
|
assert.match(detailScript, /buildLeaderApprovalInfo/)
|
2026-05-27 14:35:17 +08:00
|
|
|
assert.match(detailScript, /const leaderApprovalEvents = computed/)
|
|
|
|
|
assert.match(detailScript, /const hasLeaderApprovalEvents = computed/)
|
2026-06-02 14:01:51 +08:00
|
|
|
assert.match(detailScript, /const hasSingleLeaderApprovalEvent = computed\(\(\) => leaderApprovalEvents\.value\.length === 1\)/)
|
2026-05-27 14:35:17 +08:00
|
|
|
assert.match(
|
|
|
|
|
detailScript,
|
|
|
|
|
/const showApplicationLeaderOpinion = computed\(\(\) => \(\s*isApplicationDocument\.value\s*&& hasLeaderApprovalEvents\.value\s*\)\)/
|
|
|
|
|
)
|
|
|
|
|
assert.match(detailScript, /isDirectManagerApprovalStage\.value\)[\s\S]*return isCurrentDirectManagerApprover\.value/)
|
2026-06-09 08:32:00 +00:00
|
|
|
assert.match(detailScript, /if \(isDirectManagerApprovalStage\.value\) \{[\s\S]*return isCurrentDirectManagerApprover\.value/)
|
2026-05-27 14:35:17 +08:00
|
|
|
assert.match(detailScript, /canProcessFinanceApprovalStage\.value/)
|
2026-05-27 17:31:27 +08:00
|
|
|
assert.match(detailScript, /canProcessBudgetApprovalStage\.value/)
|
2026-06-09 08:32:00 +00:00
|
|
|
assert.match(detailScript, /const canApproveRequest = computed\(\(\) =>\s*request\.value\.approvalKey === 'in_progress'[\s\S]*&& canProcessCurrentApprovalStage\.value\s*\)/)
|
|
|
|
|
assert.doesNotMatch(
|
|
|
|
|
detailScript,
|
|
|
|
|
/const canApproveRequest = computed\(\(\) =>\s*\(Boolean\(props\.approvalMode\) \|\| isApplicationDocument\.value\)/
|
|
|
|
|
)
|
2026-05-27 14:35:17 +08:00
|
|
|
assert.doesNotMatch(detailScript, /leaderApprovalReadonlyText/)
|
2026-05-26 09:15:14 +08:00
|
|
|
assert.match(detailScript, /resolveGeneratedDraftClaimNo/)
|
2026-06-01 17:07:14 +08:00
|
|
|
assert.match(detailScript, /resolveApproveErrorMessage/)
|
|
|
|
|
assert.match(detailScript, /当前部门未配置 P8 预算审批人,请联系管理员配置后再审批。/)
|
2026-06-17 14:39:26 +08:00
|
|
|
assert.match(detailScript, /预算已超过警戒值,请填写预算审批意见后再通过。/)
|
2026-05-26 09:15:14 +08:00
|
|
|
assert.match(detailScript, /approveActionLabel/)
|
2026-05-27 17:31:27 +08:00
|
|
|
assert.match(detailScript, /approveExpenseClaim\(request\.value\.claimId, \{[\s\S]*opinion: leaderOpinion\.value\.trim\(\) \|\| '同意'/)
|
2026-05-26 09:15:14 +08:00
|
|
|
assert.match(detailScript, /报销草稿 \$\{generatedDraftClaimNo\} 已生成/)
|
2026-06-01 17:07:14 +08:00
|
|
|
assert.match(detailScript, /按预算与风险结果决定下一步/)
|
|
|
|
|
assert.match(detailScript, /无风险且预算充足将直接完成申请/)
|
2026-05-20 21:00:47 +08:00
|
|
|
|
2026-05-27 14:35:17 +08:00
|
|
|
assert.doesNotMatch(detailTemplate, /v-if="showLeaderApprovalPanel"/)
|
|
|
|
|
assert.doesNotMatch(detailTemplate, /showApplicationLeaderOpinionInput/)
|
|
|
|
|
assert.doesNotMatch(detailTemplate, /class="leader-approval-card/)
|
|
|
|
|
assert.doesNotMatch(detailTemplate, /class="inline-leader-opinion/)
|
2026-05-26 09:15:14 +08:00
|
|
|
assert.match(detailTemplate, /v-if="showApplicationLeaderOpinion"/)
|
|
|
|
|
assert.match(detailTemplate, /class="application-leader-opinion"/)
|
2026-05-27 14:35:17 +08:00
|
|
|
assert.match(detailTemplate, /v-if="hasLeaderApprovalEvents"/)
|
|
|
|
|
assert.match(detailTemplate, /class="application-leader-opinion-timeline"/)
|
2026-06-02 14:01:51 +08:00
|
|
|
assert.match(detailTemplate, /:class="\{ 'is-single': hasSingleLeaderApprovalEvent \}"/)
|
2026-05-27 14:35:17 +08:00
|
|
|
assert.match(detailTemplate, /v-for="event in leaderApprovalEvents"/)
|
|
|
|
|
assert.match(detailTemplate, /class="application-leader-opinion-event"/)
|
|
|
|
|
assert.match(detailTemplate, /event\.type === 'returned'/)
|
2026-06-21 23:24:09 +08:00
|
|
|
assert.match(detailTemplate, /class="application-leader-opinion-event-time"/)
|
|
|
|
|
assert.match(detailTemplate, /event\.dateLabel/)
|
|
|
|
|
assert.match(detailTemplate, /event\.timeLabel/)
|
|
|
|
|
assert.match(detailTemplate, /class="application-leader-opinion-event-rail"/)
|
2026-06-21 22:56:34 +08:00
|
|
|
assert.match(detailTemplate, /class="application-leader-opinion-event-status"/)
|
2026-06-21 23:24:09 +08:00
|
|
|
assert.match(detailTemplate, /:title="event\.title"/)
|
|
|
|
|
assert.match(detailTemplate, /class="application-leader-opinion-record"/)
|
|
|
|
|
assert.match(detailTemplate, /class="application-leader-opinion-record-head"/)
|
|
|
|
|
assert.match(detailTemplate, /class="application-leader-opinion-record-title"/)
|
|
|
|
|
assert.match(detailTemplate, /class="application-leader-opinion-record-meta"/)
|
|
|
|
|
assert.match(detailTemplate, /event\.operator/)
|
|
|
|
|
assert.match(detailTemplate, /event\.role/)
|
|
|
|
|
assert.match(detailTemplate, /event\.opinion/)
|
2026-06-21 22:56:34 +08:00
|
|
|
assert.match(detailTemplate, /class="application-leader-opinion-event-foot"/)
|
2026-05-27 14:35:17 +08:00
|
|
|
assert.doesNotMatch(detailTemplate, /leaderApprovalReadonlyText/)
|
|
|
|
|
assert.doesNotMatch(detailTemplate, /\u5f85\u76f4\u5c5e\u9886\u5bfc\u586b\u5199\u5ba1\u6279\u610f\u89c1/)
|
2026-05-26 09:15:14 +08:00
|
|
|
assert.match(detailTemplate, /领导意见/)
|
2026-05-27 17:31:27 +08:00
|
|
|
assert.match(detailTemplate, /<TravelRequestBudgetAnalysis[\s\S]*v-if="showBudgetAnalysis"[\s\S]*:claim-id="request\.claimId"/)
|
2026-05-27 14:35:17 +08:00
|
|
|
assert.match(approvalDialog, /\{\{ opinionTitle \}\}/)
|
|
|
|
|
assert.doesNotMatch(detailTemplate, /v-model="leaderOpinion"/)
|
2026-05-20 21:00:47 +08:00
|
|
|
assert.match(detailTemplate, /@click="handleApproveRequest"/)
|
2026-05-26 09:15:14 +08:00
|
|
|
assert.match(detailTemplate, /\{\{ approveBusy \? approveBusyLabel : approveActionLabel \}\}/)
|
2026-05-20 21:00:47 +08:00
|
|
|
assert.match(detailTemplate, /:open="approveConfirmDialogOpen"/)
|
2026-05-21 09:28:33 +08:00
|
|
|
assert.match(detailTemplate, /:badge="approvalConfirmBadge"/)
|
|
|
|
|
assert.match(detailTemplate, /:description="approvalConfirmDescription"/)
|
2026-05-26 09:15:14 +08:00
|
|
|
assert.match(detailTemplate, /:confirm-text="approveConfirmText"/)
|
|
|
|
|
assert.match(detailTemplate, /:busy-text="approveBusyText"/)
|
2026-06-17 14:39:26 +08:00
|
|
|
assert.match(detailTemplate, /:risk-confirm-required="approvalRiskConfirmRequired"/)
|
|
|
|
|
assert.match(detailTemplate, /v-model:risk-confirmed="approvalRiskConfirmed"/)
|
|
|
|
|
assert.match(detailTemplate, /:risk-confirm-items="approvalRiskConfirmItems"/)
|
2026-05-27 17:31:27 +08:00
|
|
|
assert.doesNotMatch(detailTemplate, /:next-stage="approvalNextStage"/)
|
2026-06-21 22:49:58 +08:00
|
|
|
assert.match(approvalDialog, /size="approval"/)
|
|
|
|
|
assert.match(approvalDialog, /actions-align="end"/)
|
2026-05-27 17:31:27 +08:00
|
|
|
assert.doesNotMatch(approvalDialog, /submit-confirm-summary/)
|
|
|
|
|
assert.doesNotMatch(approvalDialog, /单据编号/)
|
|
|
|
|
assert.doesNotMatch(approvalDialog, /当前节点/)
|
2026-05-27 14:35:17 +08:00
|
|
|
assert.match(detailTemplate, /v-model:opinion="leaderOpinion"/)
|
|
|
|
|
assert.match(detailTemplate, /:opinion-placeholder="approvalOpinionPlaceholder"/)
|
|
|
|
|
assert.match(detailTemplate, /:opinion-hint="approvalOpinionHint"/)
|
|
|
|
|
assert.match(detailTemplate, /:opinion-required="requiresApprovalOpinion"/)
|
2026-05-20 21:00:47 +08:00
|
|
|
assert.match(detailTemplate, /@confirm="confirmApproveRequest"/)
|
2026-05-26 09:15:14 +08:00
|
|
|
assert.match(detailTemplate, /:description="returnDialogDescription"/)
|
2026-05-27 14:35:17 +08:00
|
|
|
assert.match(detailTemplate, /:application="isApplicationDocument"/)
|
2026-05-20 21:00:47 +08:00
|
|
|
|
|
|
|
|
const handleApproveRequest = extractFunction(detailScript, 'handleApproveRequest')
|
|
|
|
|
const confirmApproveRequest = extractFunction(detailScript, 'confirmApproveRequest')
|
|
|
|
|
assert.doesNotMatch(handleApproveRequest, /approveExpenseClaim/)
|
2026-05-27 14:35:17 +08:00
|
|
|
assert.doesNotMatch(handleApproveRequest, /leaderOpinion\.value\.trim/)
|
2026-06-17 14:39:26 +08:00
|
|
|
assert.match(handleApproveRequest, /approvalRiskConfirmed\.value = !approvalRiskConfirmRequired\.value/)
|
2026-05-20 21:00:47 +08:00
|
|
|
assert.match(confirmApproveRequest, /approveExpenseClaim/)
|
2026-06-17 14:39:26 +08:00
|
|
|
assert.match(confirmApproveRequest, /approvalRiskConfirmRequired\.value && !approvalRiskConfirmed\.value/)
|
|
|
|
|
assert.match(confirmApproveRequest, /请先确认已核对风险说明和佐证材料,再继续审批。/)
|
|
|
|
|
assert.match(confirmApproveRequest, /requiresApprovalOpinion\.value && !leaderOpinion\.value\.trim\(\)/)
|
|
|
|
|
assert.match(confirmApproveRequest, /预算已超过警戒值,请填写预算审批意见后再通过。/)
|
|
|
|
|
assert.match(confirmApproveRequest, /emit\('request-updated', \{[\s\S]*claimId: request\.value\.claimId,[\s\S]*claim: responsePayload[\s\S]*\}\)[\s\S]*emit\('backToRequests'\)/)
|
2026-05-27 17:31:27 +08:00
|
|
|
assert.doesNotMatch(confirmApproveRequest, /请先填写领导意见,填写后才能确认审核。/)
|
2026-06-17 14:39:26 +08:00
|
|
|
assert.match(appShellScript, /async function handleRequestUpdated\(payload = \{\}\)/)
|
|
|
|
|
assert.match(appShellScript, /const mappedRequest = mapExpenseClaimToRequest\(payload\.claim\)/)
|
|
|
|
|
assert.match(appShellScript, /upsertRequestSnapshot\(mappedRequest\)/)
|
2026-05-27 14:35:17 +08:00
|
|
|
|
|
|
|
|
assert.match(approvalDialog, /<textarea/)
|
|
|
|
|
assert.match(approvalDialog, /update:opinion/)
|
|
|
|
|
assert.match(approvalDialog, /opinionPlaceholder/)
|
|
|
|
|
assert.match(approvalDialog, /opinionHint/)
|
|
|
|
|
assert.match(approvalDialog, /opinionRequired/)
|
|
|
|
|
assert.match(approvalDialog, /\{\{ currentOpinion\.length \}\}\/500/)
|
2026-06-17 14:39:26 +08:00
|
|
|
assert.match(approvalDialog, /风险说明确认/)
|
|
|
|
|
assert.match(approvalDialog, /riskConfirmRequired/)
|
|
|
|
|
assert.match(approvalDialog, /update:risk-confirmed/)
|
|
|
|
|
assert.match(approvalDialog, /:confirm-disabled="confirmDisabled"/)
|
|
|
|
|
assert.match(approvalDialog, /props\.opinionRequired && !currentOpinion\.value\.trim\(\)/)
|
2026-06-21 22:49:58 +08:00
|
|
|
assert.match(approvalDialog, /\.approval-opinion-field \{[\s\S]*gap: 6px;[\s\S]*margin-top: 8px;/)
|
|
|
|
|
assert.match(approvalDialog, /\.approval-opinion-field textarea \{[\s\S]*min-height: 74px;/)
|
2026-06-17 14:39:26 +08:00
|
|
|
assert.match(confirmDialog, /confirmDisabled:\s*\{\s*type:\s*Boolean,\s*default:\s*false\s*\}/)
|
|
|
|
|
assert.match(confirmDialog, /:disabled="busy \|\| confirmDisabled"/)
|
2026-06-21 22:49:58 +08:00
|
|
|
assert.match(confirmDialog, /\.shared-confirm-card--approval \{[\s\S]*width: min\(460px, calc\(100vw - 40px\)\);/)
|
|
|
|
|
assert.match(confirmDialog, /\.shared-confirm-card--approval h4 \{[\s\S]*font-size: 20px;/)
|
|
|
|
|
assert.match(confirmDialog, /\.shared-confirm-card--approval \.shared-confirm-body \{[\s\S]*max-height: min\(270px, calc\(100dvh - 238px\)\);/)
|
|
|
|
|
assert.match(confirmDialog, /\.shared-confirm-card--approval \.shared-confirm-btn \{[\s\S]*min-width: 118px;[\s\S]*min-height: 38px;/)
|
2026-05-20 21:00:47 +08:00
|
|
|
|
2026-06-21 23:24:09 +08:00
|
|
|
const leaderOpinionPanelRule = detailStyles.match(/^\.application-leader-opinion \{[\s\S]*?\n\}/m)?.[0] ?? ''
|
|
|
|
|
const leaderOpinionTimelineRule = detailStyles.match(/^\.application-leader-opinion-timeline \{[\s\S]*?\n\}/m)?.[0] ?? ''
|
|
|
|
|
const leaderOpinionEventRule = detailStyles.match(/^\.application-leader-opinion-event \{[\s\S]*?\n\}/m)?.[0] ?? ''
|
|
|
|
|
|
2026-05-26 09:15:14 +08:00
|
|
|
assert.match(detailStyles, /\.detail-card-title-with-icon \{[\s\S]*display: inline-flex;[\s\S]*align-items: center;[\s\S]*gap: 8px;/)
|
|
|
|
|
assert.match(detailStyles, /\.detail-card-title-with-icon i \{[\s\S]*font-size: 18px;[\s\S]*line-height: 1;/)
|
|
|
|
|
assert.match(detailStyles, /\.application-leader-opinion-head span \{[\s\S]*display: inline-flex;[\s\S]*align-items: center;[\s\S]*gap: 8px;/)
|
2026-06-21 23:24:09 +08:00
|
|
|
assert.match(leaderOpinionPanelRule, /border-top: 1px solid #e5edf5;/)
|
|
|
|
|
assert.match(leaderOpinionPanelRule, /background: #ffffff;/)
|
|
|
|
|
assert.doesNotMatch(leaderOpinionPanelRule, /linear-gradient|box-shadow/)
|
2026-05-27 14:35:17 +08:00
|
|
|
assert.doesNotMatch(detailStyles, /\.leader-approval-card/)
|
|
|
|
|
assert.doesNotMatch(detailStyles, /\.inline-leader-opinion/)
|
2026-06-21 23:24:09 +08:00
|
|
|
assert.match(leaderOpinionTimelineRule, /gap: 0;/)
|
|
|
|
|
assert.match(leaderOpinionTimelineRule, /padding: 2px 0 0;/)
|
2026-05-27 14:35:17 +08:00
|
|
|
assert.match(detailStyles, /\.application-leader-opinion-event \{/)
|
2026-06-21 23:24:09 +08:00
|
|
|
assert.match(leaderOpinionEventRule, /grid-template-columns: 104px 28px minmax\(0, 1fr\);/)
|
|
|
|
|
assert.match(leaderOpinionEventRule, /padding: 0 0 16px;/)
|
|
|
|
|
assert.doesNotMatch(leaderOpinionEventRule, /linear-gradient|box-shadow/)
|
|
|
|
|
assert.match(detailStyles, /\.application-leader-opinion-event-time \{[\s\S]*justify-items: end;[\s\S]*font-variant-numeric: tabular-nums;/)
|
|
|
|
|
assert.match(detailStyles, /\.application-leader-opinion-event-rail \{[\s\S]*justify-content: center;/)
|
|
|
|
|
assert.match(detailStyles, /\.application-leader-opinion-event-rail::after \{[\s\S]*width: 2px;[\s\S]*background: #e2e8f0;/)
|
|
|
|
|
assert.match(detailStyles, /\.application-leader-opinion-event-status \{[\s\S]*width: 22px;[\s\S]*height: 22px;[\s\S]*border-radius: 999px;/)
|
|
|
|
|
assert.match(detailStyles, /\.application-leader-opinion-record \{[\s\S]*border-bottom: 1px solid #edf2f7;[\s\S]*background: #ffffff;/)
|
|
|
|
|
assert.match(detailStyles, /\.application-leader-opinion-record-meta \{[\s\S]*display: flex;[\s\S]*gap: 6px 16px;/)
|
|
|
|
|
assert.match(detailStyles, /\.application-leader-opinion-record p \{[\s\S]*background: #f8fafc;[\s\S]*font-size: 14px;/)
|
|
|
|
|
assert.match(detailStyles, /\.application-leader-opinion-event\.danger \{[\s\S]*--leader-opinion-tone: #dc2626;/)
|
|
|
|
|
assert.match(detailStyles, /\.application-leader-opinion-event\.success \{[\s\S]*--leader-opinion-tone: #16a34a;/)
|
2026-05-26 09:15:14 +08:00
|
|
|
|
2026-05-20 21:00:47 +08:00
|
|
|
assert.match(reimbursementService, /export function approveExpenseClaim\(claimId, payload = \{\}\)/)
|
|
|
|
|
assert.match(reimbursementService, /\/approve/)
|
2026-05-27 17:31:27 +08:00
|
|
|
assert.match(reimbursementService, /export function fetchExpenseClaimBudgetAnalysis/)
|
|
|
|
|
assert.match(reimbursementService, /\/budget-analysis/)
|
|
|
|
|
assert.match(budgetAnalysisComponent, /预算分析/)
|
|
|
|
|
assert.match(budgetAnalysisComponent, /当前预算额度/)
|
|
|
|
|
assert.match(budgetAnalysisComponent, /此次费用占预算/)
|
|
|
|
|
assert.match(budgetAnalysisComponent, /综合评分/)
|
|
|
|
|
assert.match(budgetAnalysisComponent, /fetchExpenseClaimBudgetAnalysis/)
|
2026-05-20 21:00:47 +08:00
|
|
|
})
|