style(web): 移除顶栏 AI 快捷操作区并优化差旅领导意见事件样式
- TopBar 移除 AI 模式下的公司切换/AI 模式切换快捷操作块及 showAiModeUtilityActions 计算属性,清理 top-bar.css 对应样式 - TravelRequestDetailView 领导意见事件重构为状态/意见/审批人结构化布局,travel-request-detail-view.css 补充对应样式 - 同步更新 topbar-ai-mode-switch、ai-sidebar-rail-mode、travel-request-detail-leader-approval 测试
This commit is contained in:
@@ -44,7 +44,7 @@ test('workbench AI mode swaps the traditional rail for the AI three-layer rail',
|
||||
assert.match(appShell, /function openAiSidebarNewChat\(\)/)
|
||||
assert.match(appShell, /function openAiSidebarRecent\(item = \{\}\)/)
|
||||
assert.match(appShell, /function handleAiConversationRename\(payload = \{\}\)/)
|
||||
assert.match(appShell, /import \{ computed, nextTick, onBeforeUnmount, onMounted, ref, watch \} from 'vue'/)
|
||||
assert.match(appShell, /import \{ computed, nextTick, ref, watch \} from 'vue'/)
|
||||
assert.match(appShell, /async function openAiConversationWorkspace\(type, payload = null\)/)
|
||||
assert.match(appShell, /const navigation = handleNavigate\('workbench'\)/)
|
||||
assert.match(appShell, /if \(navigation && typeof navigation\.then === 'function'\)[\s\S]*await navigation/)
|
||||
|
||||
@@ -22,18 +22,23 @@ test('workbench topbar places the colorful AI mode button after the company swit
|
||||
assert.doesNotMatch(topbar, /const topbarWorkbenchMode = ref/)
|
||||
assert.match(topbar, /const isTopbarAiMode = computed\(\(\) => props\.workbenchMode === 'ai'\)/)
|
||||
assert.match(topbar, /const topbarWorkbenchModeTitle = computed/)
|
||||
assert.match(topbar, /const showAiModeUtilityActions = computed\(\(\) => isTopbarAiMode\.value && !isWorkbench\.value\)/)
|
||||
assert.match(topbar, /<div v-if="showAiModeUtilityActions" class="topbar-utility-actions"/)
|
||||
assert.match(topbar, /function toggleTopbarWorkbenchMode\(\)/)
|
||||
assert.match(topbar, /emit\('toggleWorkbenchMode'\)/)
|
||||
})
|
||||
|
||||
test('AI mode business pages do not append company or AI buttons to the right side', () => {
|
||||
assert.equal((topbar.match(/class="company-switcher"/g) || []).length, 1)
|
||||
assert.equal((topbar.match(/class="topbar-ai-mode-toggle"/g) || []).length, 1)
|
||||
assert.doesNotMatch(topbar, /showAiModeUtilityActions/)
|
||||
assert.doesNotMatch(topbar, /class="topbar-utility-actions"/)
|
||||
})
|
||||
|
||||
test('topbar AI mode button keeps a circular colorful text treatment', () => {
|
||||
assert.match(topbarStyles, /\.topbar-ai-mode-toggle\s*\{[\s\S]*width:\s*38px;[\s\S]*height:\s*38px;[\s\S]*border-radius:\s*50%;/)
|
||||
assert.match(topbarStyles, /\.topbar-ai-mode-toggle\s*\{[\s\S]*conic-gradient\(from 210deg,[\s\S]*border-box;/)
|
||||
assert.match(topbarStyles, /\.topbar-ai-mode-toggle__glyph\s*\{[\s\S]*linear-gradient\(135deg,[\s\S]*background-clip:\s*text;[\s\S]*letter-spacing:\s*0;/)
|
||||
assert.match(topbarStyles, /\.topbar-ai-mode-toggle:hover,[\s\S]*\.topbar-ai-mode-toggle:focus-visible\s*\{[\s\S]*transform:\s*translateY\(-1px\);/)
|
||||
assert.match(topbarStyles, /\.topbar-utility-actions\s*\{[\s\S]*display:\s*inline-flex;[\s\S]*justify-content:\s*flex-end;/)
|
||||
assert.doesNotMatch(topbarStyles, /\.topbar-utility-actions/)
|
||||
assert.match(topbarStyles, /@media \(max-width: 960px\)[\s\S]*\.topbar-ai-mode-toggle\s*\{[\s\S]*width:\s*34px;[\s\S]*height:\s*34px;/)
|
||||
assert.match(topbarStyles, /@media \(max-width: 640px\)[\s\S]*\.topbar-ai-mode-toggle\s*\{[\s\S]*flex:\s*0 0 34px;/)
|
||||
})
|
||||
|
||||
@@ -129,6 +129,11 @@ test('approval-mode detail collects leader opinion inside confirm dialog before
|
||||
assert.match(detailTemplate, /v-for="event in leaderApprovalEvents"/)
|
||||
assert.match(detailTemplate, /class="application-leader-opinion-event"/)
|
||||
assert.match(detailTemplate, /event\.type === 'returned'/)
|
||||
assert.match(detailTemplate, /class="application-leader-opinion-event-status"/)
|
||||
assert.match(detailTemplate, /class="application-leader-opinion-event-body"/)
|
||||
assert.match(detailTemplate, /审批意见/)
|
||||
assert.match(detailTemplate, /class="application-leader-opinion-event-foot"/)
|
||||
assert.match(detailTemplate, /class="application-leader-opinion-operator"/)
|
||||
assert.doesNotMatch(detailTemplate, /leaderApprovalReadonlyText/)
|
||||
assert.doesNotMatch(detailTemplate, /\u5f85\u76f4\u5c5e\u9886\u5bfc\u586b\u5199\u5ba1\u6279\u610f\u89c1/)
|
||||
assert.match(detailTemplate, /领导意见/)
|
||||
@@ -204,6 +209,11 @@ test('approval-mode detail collects leader opinion inside confirm dialog before
|
||||
assert.match(detailStyles, /\.application-leader-opinion-timeline\.is-single \{[\s\S]*padding-left: 0;/)
|
||||
assert.match(detailStyles, /\.application-leader-opinion-timeline\.is-single::before,[\s\S]*\.application-leader-opinion-timeline\.is-single \.application-leader-opinion-event::before \{[\s\S]*display: none;/)
|
||||
assert.match(detailStyles, /\.application-leader-opinion-event \{/)
|
||||
assert.match(detailStyles, /\.application-leader-opinion-event \{[\s\S]*border-left: 4px solid var\(--leader-opinion-tone/)
|
||||
assert.match(detailStyles, /\.application-leader-opinion-event-status \{[\s\S]*border-radius: 999px;/)
|
||||
assert.match(detailStyles, /\.application-leader-opinion-event-body \{[\s\S]*background: var\(--leader-opinion-soft-bg/)
|
||||
assert.match(detailStyles, /\.application-leader-opinion-event-body p \{[\s\S]*font-size: 15px;/)
|
||||
assert.match(detailStyles, /\.application-leader-opinion-event-foot span \{[\s\S]*border-radius: 999px;/)
|
||||
assert.match(detailStyles, /\.application-leader-opinion-event\.danger::before \{/)
|
||||
assert.match(detailStyles, /\.application-leader-opinion-event\.success::before \{/)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user