feat: expand vehicle data platform capabilities
This commit is contained in:
@@ -7,14 +7,19 @@ import mainSource from '../main.tsx?raw';
|
||||
|
||||
const v2Styles = readFileSync(resolve(process.cwd(), 'src/v2/styles/v2.css'), 'utf8');
|
||||
const workspaceStyles = readFileSync(resolve(process.cwd(), 'src/v2/styles/workspace.css'), 'utf8');
|
||||
const foundationStyles = readFileSync(resolve(process.cwd(), 'src/v2/styles/foundation.css'), 'utf8');
|
||||
const experienceStyles = readFileSync(resolve(process.cwd(), 'src/v2/styles/experience.css'), 'utf8');
|
||||
const userStyles = readFileSync(resolve(process.cwd(), 'src/v2/styles/users.css'), 'utf8');
|
||||
const corePageSources = Object.fromEntries(['MonitorPage', 'VehiclePage', 'TrackPage', 'HistoryPage', 'StatisticsPage', 'AlertsPage', 'AccessPage', 'UsersPage', 'OperationsPage'].map((name) => [
|
||||
name,
|
||||
readFileSync(resolve(process.cwd(), `src/v2/pages/${name}.tsx`), 'utf8')
|
||||
]));
|
||||
const vehicleSearchSource = readFileSync(resolve(process.cwd(), 'src/v2/pages/VehicleSearchWorkspace.tsx'), 'utf8');
|
||||
const monitorVehicleDetailSource = readFileSync(resolve(process.cwd(), 'src/v2/pages/MonitorVehicleDetailCard.tsx'), 'utf8');
|
||||
const batchVehicleSearchSource = readFileSync(resolve(process.cwd(), 'src/v2/pages/BatchVehicleSearchDialog.tsx'), 'utf8');
|
||||
const reconciliationSource = readFileSync(resolve(process.cwd(), 'src/v2/pages/ReconciliationCenter.tsx'), 'utf8');
|
||||
const profileSyncPanelSource = readFileSync(resolve(process.cwd(), 'src/v2/pages/VehicleProfileSyncPanel.tsx'), 'utf8');
|
||||
const vehicleArchiveSource = readFileSync(resolve(process.cwd(), 'src/v2/pages/VehicleArchiveCard.tsx'), 'utf8');
|
||||
const sourceEvidenceSource = readFileSync(resolve(process.cwd(), 'src/v2/shared/VehicleSourceEvidencePanel.tsx'), 'utf8');
|
||||
const mobileFilterToggleSource = readFileSync(resolve(process.cwd(), 'src/v2/shared/MobileFilterToggle.tsx'), 'utf8');
|
||||
const mobileFilterSheetSource = readFileSync(resolve(process.cwd(), 'src/v2/shared/MobileFilterSheet.tsx'), 'utf8');
|
||||
@@ -44,8 +49,16 @@ describe('V2 production entry', () => {
|
||||
expect(mainSource).toContain("./v2/styles/semi-theme.scss");
|
||||
expect(mainSource).toContain("./v2/styles/v2.css");
|
||||
expect(mainSource).toContain("./v2/styles/workspace.css");
|
||||
expect(mainSource).toContain("./v2/styles/foundation.css");
|
||||
expect(mainSource).toContain("./v2/styles/experience.css");
|
||||
expect(mainSource).toContain("window.history.scrollRestoration = 'manual'");
|
||||
expect(workspaceStyles).toContain('.v2-navigation.semi-navigation .semi-navigation-item-icon-toggle-right:empty');
|
||||
expect(experienceStyles).toContain('.v2-navigation.semi-navigation .semi-navigation-item-icon-toggle-right:empty');
|
||||
expect(experienceStyles).toContain('display: none !important;');
|
||||
expect(experienceStyles).toContain('flex: 0 0 0;');
|
||||
expect(experienceStyles).toContain('grid-template-rows: 14px 44px;');
|
||||
expect(experienceStyles).toContain('grid-template-rows: 11px 28px 10px;');
|
||||
expect(experienceStyles).toContain('line-height: 36px;');
|
||||
expect(workspaceStyles).toContain('.v2-mileage-source-trigger.semi-button .semi-button-content-right > b');
|
||||
expect(workspaceStyles).toContain('.semi-table-row > .semi-table-row-cell:first-child::before');
|
||||
expect(workspaceStyles).not.toContain('.semi-table-row::before');
|
||||
@@ -78,8 +91,6 @@ describe('V2 production entry', () => {
|
||||
expect(corePageSources[name]).toContain('<WorkspaceCommandBar');
|
||||
}
|
||||
for (const [name, eyebrow, tone] of [
|
||||
['StatisticsPage', '每日统计', 'primary'],
|
||||
['AlertsPage', '实时队列', 'warning'],
|
||||
['AccessPage', '接入差异', 'primary'],
|
||||
['HistoryPage', '证据结果', 'primary'],
|
||||
['OperationsPage', '运行快照', 'health']
|
||||
@@ -87,6 +98,10 @@ describe('V2 production entry', () => {
|
||||
expect(corePageSources[name]).toContain(`eyebrow="${eyebrow}"`);
|
||||
expect(corePageSources[name]).toContain(`tone="${tone}"`);
|
||||
}
|
||||
expect(corePageSources.StatisticsPage).toContain("eyebrow={metricView === 'mileage' ? '每日里程' : '每日氢耗'}");
|
||||
expect(corePageSources.StatisticsPage).toContain("tone={metricView === 'mileage' ? 'primary' : 'health'}");
|
||||
expect(corePageSources.AlertsPage).toContain('aria-label="事件执行状态"');
|
||||
expect(corePageSources.AlertsPage).toContain('aria-label="事件中心工作区"');
|
||||
expect(reconciliationSource).toContain('eyebrow="自动对账"');
|
||||
expect(reconciliationSource).toContain('tone="health"');
|
||||
expect(workspaceStyles).toContain('.v2-workspace-panel-header.has-eyebrow');
|
||||
@@ -99,7 +114,8 @@ describe('V2 production entry', () => {
|
||||
expect(vehicleSearchSource).toContain('<WorkspaceMetricRail');
|
||||
expect(vehicleSearchSource).toContain('className="v2-vehicle-directory-metric-rail"');
|
||||
expect(vehicleSearchSource).not.toContain('className="v2-vehicle-directory-summary"');
|
||||
expect(corePageSources.VehiclePage).toContain('<Select');
|
||||
expect(corePageSources.VehiclePage).toContain("lazy(() => import('./VehicleArchiveCard'))");
|
||||
expect(vehicleArchiveSource).toContain('<Select');
|
||||
expect(corePageSources.VehiclePage).toContain('<Card className="v2-identity-band v2-record-card v2-live-card v2-live-overview v2-vehicle-command-card"');
|
||||
expect(corePageSources.VehiclePage).toContain("from '../shared/WorkspaceMetricRail'");
|
||||
expect(corePageSources.VehiclePage).toContain('<WorkspaceMetricRail');
|
||||
@@ -112,7 +128,7 @@ describe('V2 production entry', () => {
|
||||
expect(corePageSources.VehiclePage).not.toContain('<section className="v2-single-map-card');
|
||||
expect(corePageSources.VehiclePage).not.toContain('<section className="v2-identity-band"');
|
||||
expect(corePageSources.VehiclePage).toContain('<SegmentedTabs');
|
||||
expect(corePageSources.VehiclePage).toContain('<Descriptions className="v2-record-descriptions"');
|
||||
expect(vehicleArchiveSource).toContain('<Descriptions className="v2-record-descriptions"');
|
||||
expect(corePageSources.VehiclePage).toContain('<PanelEmpty');
|
||||
expect(corePageSources.VehiclePage).toContain('<PanelLoading className="v2-telemetry-loading"');
|
||||
expect(corePageSources.VehiclePage).toContain('className="v2-vehicle-not-found-state"');
|
||||
@@ -120,18 +136,17 @@ describe('V2 production entry', () => {
|
||||
expect(corePageSources.VehiclePage).not.toContain('<dl className="v2-record-list"');
|
||||
expect(corePageSources.VehiclePage).not.toContain('<section className="v2-not-found"');
|
||||
expect(corePageSources.VehiclePage).toContain('v2-telemetry-protocols');
|
||||
expect(corePageSources.VehiclePage).toContain('<Table');
|
||||
expect(corePageSources.VehiclePage).toContain('className="v2-telemetry-table"');
|
||||
expect(corePageSources.VehiclePage).toContain('<List className="v2-telemetry-mobile-list"');
|
||||
expect(corePageSources.VehiclePage).toContain('<List.Item className="v2-telemetry-mobile-item"');
|
||||
expect(corePageSources.VehiclePage).toContain('className="v2-telemetry-mobile-action"');
|
||||
expect(corePageSources.VehiclePage).toContain('className="v2-telemetry-metric-grid"');
|
||||
expect(corePageSources.VehiclePage).toContain('className={`v2-telemetry-metric-card');
|
||||
expect(corePageSources.VehiclePage).toContain('role="listitem"');
|
||||
expect(corePageSources.VehiclePage).not.toContain('className="v2-telemetry-table"');
|
||||
expect(corePageSources.VehiclePage).not.toContain('className="v2-telemetry-mobile-list"');
|
||||
expect(corePageSources.VehiclePage).toContain("placement={mobileLayout ? 'bottom' : 'right'}");
|
||||
expect(corePageSources.VehiclePage).toContain("from '../shared/WorkspaceSideSheet'");
|
||||
expect(corePageSources.VehiclePage).toContain('<WorkspaceSideSheet');
|
||||
expect(corePageSources.VehiclePage).toContain('className="v2-telemetry-evidence-sidesheet"');
|
||||
expect(corePageSources.VehiclePage).not.toContain('useSideSheetA11y(!!inspectedValue');
|
||||
expect(corePageSources.VehiclePage).toContain("item?.sourceEndpoint ?? ''");
|
||||
expect(corePageSources.VehiclePage).toContain('const columns = useMemo(() => [');
|
||||
expect(corePageSources.VehiclePage).toContain('<List');
|
||||
expect(corePageSources.VehiclePage).toContain('className="v2-event-list"');
|
||||
expect(corePageSources.VehiclePage).toContain('useMobileLayout');
|
||||
@@ -139,15 +154,18 @@ describe('V2 production entry', () => {
|
||||
expect(corePageSources.VehiclePage).not.toContain('<nav className="v2-telemetry-protocols"');
|
||||
expect(corePageSources.VehiclePage).not.toContain('<input');
|
||||
expect(corePageSources.VehiclePage).not.toContain('<button');
|
||||
expect(vehicleSearchSource).toContain("lazy(() => import('./VehicleProfileSyncPanel'))");
|
||||
expect(vehicleSearchSource).toContain("await import('./VehicleProfileSyncPanel')");
|
||||
expect(vehicleSearchSource).toContain('<PanelLoading className="v2-vehicle-directory-loading"');
|
||||
expect(vehicleSearchSource).toContain('<Card className="v2-profile-sync-panel v2-profile-sync-loading"');
|
||||
expect(vehicleSearchSource).toContain('className="v2-profile-sync-sidesheet"');
|
||||
expect(vehicleSearchSource).toContain('variant="task"');
|
||||
expect(vehicleSearchSource).toContain('<PanelLoading compact title="正在加载主档同步工具"');
|
||||
expect(profileSyncPanelSource).toContain('<Upload');
|
||||
expect(profileSyncPanelSource).toContain('<Card className="v2-profile-sync-panel"');
|
||||
expect(profileSyncPanelSource).toContain('<WorkspaceSideSheet');
|
||||
expect(profileSyncPanelSource).toContain('ariaLabel="车辆主档批量同步"');
|
||||
expect(profileSyncPanelSource).toContain('<WorkspaceConfirmDialog');
|
||||
expect(profileSyncPanelSource).not.toContain('<input');
|
||||
expect(profileSyncPanelSource).not.toContain('<section className="v2-profile-sync-panel"');
|
||||
expect(vehicleSearchSource).toContain('v2-profile-sync-panel');
|
||||
expect(vehicleSearchSource).toContain('v2-profile-sync-sidesheet');
|
||||
expect(corePageSources.MonitorPage).toContain("lazy(() => import('./MonitorVehicleDetailCard'))");
|
||||
expect(monitorVehicleDetailSource).toContain('<Card className="v2-vehicle-detail"');
|
||||
expect(monitorVehicleDetailSource).toContain("from '../shared/WorkspaceMetricRail'");
|
||||
@@ -232,13 +250,13 @@ describe('V2 production entry', () => {
|
||||
expect(corePageSources.AlertsPage).not.toContain('<Radio');
|
||||
expect(corePageSources.AlertsPage).toContain('is-severity-${event.severity}');
|
||||
expect(corePageSources.AlertsPage).toContain('<Card key={event.id} className={`v2-alert-mobile-card');
|
||||
expect(corePageSources.AlertsPage).toContain('<WorkspaceMetricRail');
|
||||
expect(corePageSources.AlertsPage).toContain('className="v2-alert-metric-rail"');
|
||||
expect(corePageSources.AlertsPage).toContain('className="v2-event-status-tabs"');
|
||||
expect(corePageSources.AlertsPage).not.toContain('className="v2-alert-metric-rail"');
|
||||
expect(corePageSources.AlertsPage).not.toContain('v2-alert-kpis-card v2-alert-context-card');
|
||||
expect(corePageSources.AlertsPage).toContain('<Card className="v2-alert-table-card"');
|
||||
expect(corePageSources.AlertsPage).toContain('<Card className={`v2-alert-inspector');
|
||||
expect(corePageSources.AlertsPage).toContain('<WorkspaceCommandBar');
|
||||
expect(corePageSources.AlertsPage).toContain('className="v2-alert-navigation v2-alert-command-bar"');
|
||||
expect(corePageSources.AlertsPage).toContain('<nav className="v2-alert-navigation"');
|
||||
expect(corePageSources.AlertsPage).not.toContain('<WorkspaceCommandBar');
|
||||
expect(corePageSources.AlertsPage).toContain('<WorkspaceSideSheet\n className="v2-alert-filter-sidesheet"');
|
||||
expect(corePageSources.AlertsPage).toContain('variant="filter"');
|
||||
expect(corePageSources.AlertsPage).toContain('<WorkspaceDetailSideSheet\n className="v2-alert-detail-sidesheet"');
|
||||
@@ -258,20 +276,23 @@ describe('V2 production entry', () => {
|
||||
expect(corePageSources.AlertsPage).not.toContain('<input');
|
||||
expect(corePageSources.AlertsPage).not.toContain('<button');
|
||||
expect(corePageSources.AlertsPage).toContain('<Descriptions className="v2-alert-descriptions"');
|
||||
expect(corePageSources.AlertsPage).toContain('<Timeline className="v2-alert-timeline"');
|
||||
expect(corePageSources.AlertsPage).toContain('<Timeline className="v2-alert-timeline v2-event-execution-trace"');
|
||||
expect(corePageSources.AlertsPage).toContain('<PanelEmpty className="v2-alert-inspector-empty"');
|
||||
expect(corePageSources.AlertsPage).toContain('<Card className="v2-alert-detail-card v2-alert-focus-card"');
|
||||
expect(corePageSources.AlertsPage).toContain('<Collapse className="v2-alert-technical-collapse"');
|
||||
expect(corePageSources.AlertsPage).not.toContain('<section><h3>事件信息</h3>');
|
||||
expect(corePageSources.AlertsPage).not.toContain('<div className="v2-alert-timeline">');
|
||||
expect(corePageSources.AlertsPage).toContain('<Card className="v2-alert-rule-list"');
|
||||
expect(corePageSources.AlertsPage).toContain('<Card className="v2-alert-rule-list v2-alert-automation-library"');
|
||||
expect(corePageSources.AlertsPage).toContain('<Card className="v2-alert-rule-editor"');
|
||||
expect(corePageSources.AlertsPage).toContain('<Card className="v2-alert-notifications"');
|
||||
expect(corePageSources.AlertsPage).toContain('<CardGroup className="v2-alert-notification-cards"');
|
||||
expect(corePageSources.AlertsPage).toContain('<Card className={`v2-alert-notification-card');
|
||||
expect(corePageSources.AlertsPage).toContain('<Descriptions className="v2-alert-channel-descriptions"');
|
||||
expect(corePageSources.AlertsPage).toContain('aria-label="自动化工具栏"');
|
||||
expect(corePageSources.AlertsPage).toContain('aria-label="搜索自动化"');
|
||||
expect(corePageSources.AlertsPage).toContain('aria-label="自动化列表"');
|
||||
expect(corePageSources.AlertsPage).toContain('<AutomationFlow rule={selectedRule}');
|
||||
expect(corePageSources.AlertsPage).toContain('className={`v2-alert-delivery-workspace');
|
||||
expect(corePageSources.AlertsPage).toContain('className="v2-alert-delivery-table"');
|
||||
expect(corePageSources.AlertsPage).toContain('className="v2-alert-delivery-inspector"');
|
||||
expect(corePageSources.AlertsPage).toContain('<PanelEmpty className="v2-alert-notification-empty"');
|
||||
expect(corePageSources.AlertsPage).toContain('<PanelEmpty className="v2-alert-empty"');
|
||||
expect(corePageSources.AlertsPage).toContain('className="v2-alert-empty"');
|
||||
expect(corePageSources.AlertsPage).toContain('<PanelLoading className="v2-alert-loading"');
|
||||
expect(corePageSources.AlertsPage).toContain('<PanelLoading className="v2-alert-notification-loading"');
|
||||
expect(corePageSources.AlertsPage).not.toContain('<Spin');
|
||||
@@ -368,6 +389,14 @@ describe('V2 production entry', () => {
|
||||
expect(corePageSources.UsersPage).not.toContain('<details');
|
||||
expect(corePageSources.UsersPage).not.toContain('<summary');
|
||||
expect(corePageSources.UsersPage).not.toContain('<button');
|
||||
expect(corePageSources.UsersPage).toContain("import '../styles/users.css'");
|
||||
expect(userStyles).toContain('--v2-user-row-columns: 40px');
|
||||
expect(userStyles).toContain('.v2-customer-list .v2-user-list-row.semi-list-item');
|
||||
expect(userStyles).toContain('.v2-user-list > .semi-card-body > .v2-user-directory-header {\n display: none;');
|
||||
expect(userStyles).toContain('.v2-customer-list-scroll::-webkit-scrollbar');
|
||||
expect(userStyles).toContain('grid-template-columns: repeat(2, minmax(0, 1fr));');
|
||||
expect(userStyles).toContain('.v2-user-editor-sidesheet .v2-workspace-config-summary > span:first-child');
|
||||
expect(userStyles).toContain('.v2-user-identity-overview {\n display: none;');
|
||||
expect(workspaceStyles).toContain('Short landscape account governance.');
|
||||
expect(workspaceStyles).toContain('.v2-user-discovery-shell {');
|
||||
expect(workspaceStyles).toContain('grid-template-columns: minmax(260px, 1.08fr) minmax(220px, .92fr);');
|
||||
@@ -458,7 +487,7 @@ describe('V2 production entry', () => {
|
||||
expect(corePageSources.TrackPage).toContain('<List className="v2-track-evidence-list v2-track-event-list"');
|
||||
expect(corePageSources.TrackPage).toContain('<List.Item className="v2-track-evidence-item"');
|
||||
expect(corePageSources.TrackPage).toContain('<WorkspaceEmptyGuide');
|
||||
expect(corePageSources.TrackPage).toContain('title="先选择车辆,再开始轨迹回放"');
|
||||
expect(corePageSources.TrackPage).toContain("'先选择车辆,再开始轨迹回放'");
|
||||
expect(corePageSources.TrackPage).toContain("from '../shared/WorkspaceSideSheet'");
|
||||
expect(corePageSources.TrackPage).toContain('<WorkspaceSideSheet');
|
||||
expect(corePageSources.TrackPage).toContain('variant="editor"');
|
||||
@@ -502,6 +531,7 @@ describe('V2 production entry', () => {
|
||||
expect(corePageSources.StatisticsPage).toContain('<Tag');
|
||||
expect(corePageSources.StatisticsPage).toContain('<WorkspaceSideSheet');
|
||||
expect(corePageSources.StatisticsPage).toContain('v2-mileage-source-sidesheet');
|
||||
expect(corePageSources.StatisticsPage).toContain('v2-mileage-source-popover');
|
||||
expect(corePageSources.StatisticsPage).toContain('className="v2-mileage-filter-sidesheet"');
|
||||
expect(corePageSources.StatisticsPage).toContain('<MobileFilterToggle');
|
||||
expect(corePageSources.StatisticsPage).toContain('<MobileFilterSheet');
|
||||
@@ -531,7 +561,6 @@ describe('V2 production entry', () => {
|
||||
expect(appShellSource).toContain('<WorkspaceDialog');
|
||||
expect(appShellSource).not.toContain('<Modal');
|
||||
expect(vehicleSearchSource).toContain('<MobileFilterSheet');
|
||||
expect(corePageSources.StatisticsPage).not.toContain('v2-mileage-source-popover');
|
||||
expect(corePageSources.StatisticsPage).toContain('<Table className="v2-mileage-table"');
|
||||
expect(v2Styles).toContain('.v2-mileage-table.semi-table-wrapper :is(.semi-table-row-head,.semi-table-row-cell).is-plate');
|
||||
expect(v2Styles).toContain('.v2-mileage-table.semi-table-wrapper :is(.semi-table-row-head,.semi-table-row-cell).is-total');
|
||||
@@ -551,11 +580,12 @@ describe('V2 production entry', () => {
|
||||
expect(corePageSources.MonitorPage).toContain('<Input');
|
||||
expect(corePageSources.MonitorPage).toContain('<Select');
|
||||
expect(corePageSources.MonitorPage).toContain('<WorkspaceSideSheet');
|
||||
expect(corePageSources.MonitorPage).toContain('v2-monitor-batch-sidesheet');
|
||||
expect(corePageSources.MonitorPage).toContain("lazy(() => import('./BatchVehicleSearchDialog'))");
|
||||
expect(batchVehicleSearchSource).toContain('v2-monitor-batch-sidesheet');
|
||||
expect(corePageSources.MonitorPage).toContain('v2-monitor-qr-sidesheet');
|
||||
expect(corePageSources.MonitorPage).not.toContain('<Modal');
|
||||
expect(corePageSources.MonitorPage).not.toContain('v2-monitor-qr-backdrop');
|
||||
expect(corePageSources.MonitorPage).toContain('<TextArea');
|
||||
expect(batchVehicleSearchSource).toContain('<TextArea');
|
||||
expect(corePageSources.MonitorPage).toContain('<SegmentedTabs');
|
||||
expect(corePageSources.MonitorPage).toContain('ariaLabel="监控视图"');
|
||||
expect(corePageSources.MonitorPage).toContain('variant="filled"');
|
||||
@@ -589,7 +619,7 @@ describe('V2 production entry', () => {
|
||||
expect(corePageSources.MonitorPage).not.toContain('<section className="v2-filterbar"');
|
||||
expect(corePageSources.MonitorPage).not.toContain('<section className="v2-kpis"');
|
||||
expect(corePageSources.MonitorPage).not.toContain('<section className="v2-monitor-table-panel"');
|
||||
expect(corePageSources.MonitorPage).toContain('<Card className="v2-monitor-mobile-card"');
|
||||
expect(corePageSources.MonitorPage).toContain('<Card className={`v2-monitor-mobile-card');
|
||||
expect(reconciliationSource).toContain("from '@douyinfe/semi-ui'");
|
||||
expect(reconciliationSource).toContain('<RadioGroup');
|
||||
expect(reconciliationSource).toContain('<Select');
|
||||
@@ -657,17 +687,17 @@ describe('V2 production entry', () => {
|
||||
}
|
||||
expect(corePageSources.AccessPage).toContain("from '../shared/WorkspaceMetricRail'");
|
||||
expect(corePageSources.AccessPage).toContain('<WorkspaceMetricRail');
|
||||
expect(corePageSources.AlertsPage).toContain("from '../shared/WorkspaceMetricRail'");
|
||||
expect(corePageSources.AlertsPage).toContain('<WorkspaceMetricRail');
|
||||
expect(corePageSources.AlertsPage).not.toContain("from '../shared/WorkspaceMetricRail'");
|
||||
expect(corePageSources.AlertsPage).toContain('className="v2-event-status-tabs"');
|
||||
expect(corePageSources.OperationsPage).toContain("from '../shared/WorkspaceMetricRail'");
|
||||
expect(corePageSources.OperationsPage).toContain('<WorkspaceMetricRail');
|
||||
expect(corePageSources.HistoryPage).toContain('className="v2-history-result-meta"');
|
||||
expect(corePageSources.AlertsPage).toContain('<Tag className={`v2-alert-severity');
|
||||
expect(corePageSources.AlertsPage).toContain('<Tag className={`v2-alert-status');
|
||||
expect(corePageSources.AlertsPage).toContain('function EventExecutionTag');
|
||||
expect(corePageSources.AlertsPage).toContain('className={`v2-event-execution');
|
||||
expect(corePageSources.AlertsPage).toContain('className="v2-alert-inspector-heading"');
|
||||
expect(corePageSources.AlertsPage).toContain('className="v2-alert-rule-list-heading"');
|
||||
expect(corePageSources.AlertsPage).toContain('className="v2-alert-rule-editor-heading"');
|
||||
expect(corePageSources.AlertsPage).toContain('variant="filled"');
|
||||
expect(corePageSources.AlertsPage).toContain('variant="line"');
|
||||
expect(corePageSources.AccessPage).toContain('<Tag className="v2-access-connection-tag"');
|
||||
expect(corePageSources.OperationsPage).toContain('<Tag className={`v2-ops-health-tag');
|
||||
expect(reconciliationSource).toContain('<Tag className={`v2-reconcile-severity');
|
||||
@@ -678,7 +708,7 @@ describe('V2 production entry', () => {
|
||||
expect(workspaceStyles).toContain('bottom: calc(264px + env(safe-area-inset-bottom));');
|
||||
expect(v2Styles).toContain('grid-template-rows: minmax(0, 1fr);');
|
||||
expect(appShellSource).toContain("section === 'tracks' ? ' is-track-workspace' : ''");
|
||||
expect(corePageSources.TrackPage).toContain("monitorReturn ? ' has-monitor-return' : ''");
|
||||
expect(corePageSources.TrackPage).toContain("monitorReturn || vehicleReturn ? ' has-monitor-return' : ''");
|
||||
expect(v2Styles).toContain('.v2-track-page.has-monitor-return { grid-template-rows: auto minmax(0, 1fr); }');
|
||||
expect(v2Styles).toContain('.v2-content.is-track-workspace { min-height: 0; overflow: hidden; }');
|
||||
expect(workspaceStyles).toContain('.v2-workspace-panel-header.is-inverted > .v2-workspace-panel-copy > h5.semi-typography');
|
||||
@@ -730,6 +760,63 @@ describe('V2 production entry', () => {
|
||||
expect(appShellSource).not.toContain('v2-mobile-more-sheet');
|
||||
});
|
||||
|
||||
test('keeps short-landscape password login readable and ordered', () => {
|
||||
const landscapeStart = experienceStyles.indexOf(
|
||||
'@media (max-width: 900px) and (max-height: 480px) and (orientation: landscape)'
|
||||
);
|
||||
expect(landscapeStart).toBeGreaterThanOrEqual(0);
|
||||
const landscapeStyles = experienceStyles.slice(landscapeStart);
|
||||
|
||||
expect(landscapeStyles).toContain('grid-template-columns: minmax(208px, .62fr) minmax(0, 1fr);');
|
||||
expect(landscapeStyles).toContain('grid-template-rows: 1fr auto auto auto auto 1fr;');
|
||||
expect(landscapeStyles).toContain(':root .v2-auth-fields > label {');
|
||||
expect(landscapeStyles).toContain('font-size: 11px;');
|
||||
expect(landscapeStyles).toContain(':root .v2-auth-fields > label .semi-input-wrapper {');
|
||||
expect(landscapeStyles).toContain('height: 44px;');
|
||||
expect(landscapeStyles).toContain(':root .v2-auth-form > .semi-button,');
|
||||
expect(landscapeStyles).toContain('grid-row: 4;');
|
||||
});
|
||||
|
||||
test('reserves the compact navigation rail across the intermediate shell breakpoint', () => {
|
||||
expect(foundationStyles).toContain('--v2-sidebar-width-compact: 72px;');
|
||||
expect(appShellSource).toContain('const compactLayout = useMobileLayout(1100);');
|
||||
expect(experienceStyles).toContain('@media (min-width: 681px) and (max-width: 1100px)');
|
||||
expect(experienceStyles).toContain(':root .v2-sidebar.is-collapsed + .v2-main');
|
||||
expect(experienceStyles).toContain('width: calc(100% - var(--v2-sidebar-width-compact));');
|
||||
expect(experienceStyles).toContain('margin-left: var(--v2-sidebar-width-compact);');
|
||||
});
|
||||
|
||||
test('keeps the mobile operations command surfaces and review metrics inside the viewport', () => {
|
||||
expect(experienceStyles).toContain('.v2-ops-page > .v2-ops-command-bar,');
|
||||
expect(experienceStyles).toContain('.v2-ops-page > .v2-ops-navigation {');
|
||||
expect(experienceStyles).toContain('width: auto;');
|
||||
expect(experienceStyles).toContain('.v2-reconcile-metric-rail.is-queue.has-context > .semi-card-body {');
|
||||
expect(experienceStyles).toContain('grid-template-columns: minmax(0, 1fr);');
|
||||
expect(experienceStyles).toContain('.v2-reconcile-metric-rail .v2-workspace-metric-list {');
|
||||
expect(experienceStyles).toContain('grid-template-columns: repeat(2, minmax(0, 1fr));');
|
||||
expect(experienceStyles).toContain('grid-template-rows: 14px 27px 14px;');
|
||||
});
|
||||
|
||||
test('keeps compact-shell actions and the short-landscape operations queue usable', () => {
|
||||
expect(experienceStyles).toContain(':root .v2-topbar-actions > .v2-help-trigger.semi-button,');
|
||||
expect(experienceStyles).toContain(':root .v2-help-trigger-label,');
|
||||
expect(experienceStyles).toContain(':root .v2-current-user .semi-button-content {');
|
||||
expect(experienceStyles).toContain('.v2-ops-workspace.is-reconciliation .v2-reconcile-heading {');
|
||||
expect(experienceStyles).toContain('.v2-ops-workspace.is-reconciliation .v2-reconcile-toolbar {');
|
||||
expect(experienceStyles).toContain('grid-template-columns: minmax(210px, 1.45fr) repeat(3, minmax(104px, .8fr));');
|
||||
expect(experienceStyles).toContain('.v2-ops-workspace.is-reconciliation .v2-reconcile-pagination {');
|
||||
expect(experienceStyles).toContain('height: 36px;');
|
||||
});
|
||||
|
||||
test('reserves the portrait access viewport for the evidence list', () => {
|
||||
expect(experienceStyles).toContain('Portrait access evidence viewport.');
|
||||
expect(experienceStyles).toContain('@media (max-width: 680px) and (orientation: portrait)');
|
||||
expect(experienceStyles).toContain('.v2-access-page-v3 {\n padding-bottom: 0;');
|
||||
expect(experienceStyles).toContain('.v2-access-mobile-discovery > .v2-mobile-filter-toggle.semi-button');
|
||||
expect(experienceStyles).toContain('.v2-access-table-v3 > .semi-card-body > .v2-workspace-panel-header {\n display: none;');
|
||||
expect(experienceStyles).toContain('.v2-access-metric-rail.is-queue.semi-card');
|
||||
});
|
||||
|
||||
test('applies rendering containment to off-screen vehicle items instead of the visible scroller', () => {
|
||||
const ruleBody = (selector: string) => {
|
||||
const start = v2Styles.indexOf(`${selector} {`);
|
||||
|
||||
Reference in New Issue
Block a user