feat: unify configuration side sheets
This commit is contained in:
@@ -21,6 +21,7 @@ const mobileFilterSheetSource = readFileSync(resolve(process.cwd(), 'src/v2/shar
|
||||
const passwordInputSource = readFileSync(resolve(process.cwd(), 'src/v2/shared/PasswordInput.tsx'), 'utf8');
|
||||
const workspaceFilterPanelSource = readFileSync(resolve(process.cwd(), 'src/v2/shared/WorkspaceFilterPanel.tsx'), 'utf8');
|
||||
const workspaceMetricRailSource = readFileSync(resolve(process.cwd(), 'src/v2/shared/WorkspaceMetricRail.tsx'), 'utf8');
|
||||
const workspaceSideSheetSource = readFileSync(resolve(process.cwd(), 'src/v2/shared/WorkspaceSideSheet.tsx'), 'utf8');
|
||||
const segmentedTabsSource = readFileSync(resolve(process.cwd(), 'src/v2/shared/SegmentedTabs.tsx'), 'utf8');
|
||||
const metricActionSource = readFileSync(resolve(process.cwd(), 'src/v2/shared/MetricActionButton.tsx'), 'utf8');
|
||||
const tablePaginationSource = readFileSync(resolve(process.cwd(), 'src/v2/shared/TablePagination.tsx'), 'utf8');
|
||||
@@ -316,6 +317,7 @@ describe('V2 production entry', () => {
|
||||
expect(corePageSources.OperationsPage).toContain('className="v2-source-table"');
|
||||
expect(corePageSources.OperationsPage).toContain('<Table');
|
||||
expect(corePageSources.OperationsPage).toContain('<SideSheet');
|
||||
expect(corePageSources.OperationsPage).toContain('<WorkspaceSideSheet');
|
||||
expect(corePageSources.OperationsPage).toContain('v2-source-policy-sidesheet');
|
||||
expect(corePageSources.OperationsPage).toContain('className={`v2-source-mobile-card');
|
||||
expect(corePageSources.OperationsPage).not.toContain('<table className="v2-source-table"');
|
||||
@@ -377,7 +379,7 @@ describe('V2 production entry', () => {
|
||||
expect(corePageSources.StatisticsPage).not.toContain('<section className="v2-mileage-query-panel"');
|
||||
expect(corePageSources.StatisticsPage).not.toContain('<section className="v2-mileage-results"');
|
||||
expect(corePageSources.StatisticsPage).toContain('<Tag');
|
||||
expect(corePageSources.StatisticsPage).toContain('<SideSheet');
|
||||
expect(corePageSources.StatisticsPage).toContain('<WorkspaceSideSheet');
|
||||
expect(corePageSources.StatisticsPage).toContain('v2-mileage-source-sidesheet');
|
||||
expect(corePageSources.StatisticsPage).toContain('className="v2-mileage-filter-sidesheet"');
|
||||
expect(corePageSources.StatisticsPage).toContain('<MobileFilterToggle');
|
||||
@@ -388,6 +390,16 @@ describe('V2 production entry', () => {
|
||||
expect(corePageSources[name]).toContain('<MobileFilterSheet');
|
||||
}
|
||||
expect(vehicleSearchSource).toContain("from '../shared/MobileFilterSheet'");
|
||||
for (const name of ['HistoryPage', 'StatisticsPage', 'OperationsPage']) {
|
||||
expect(corePageSources[name]).toContain("from '../shared/WorkspaceSideSheet'");
|
||||
expect(corePageSources[name]).toContain('<WorkspaceSideSheet');
|
||||
}
|
||||
expect(workspaceSideSheetSource).toContain("from '@douyinfe/semi-ui'");
|
||||
expect(workspaceSideSheetSource).toContain('<SideSheet');
|
||||
expect(workspaceSideSheetSource).toContain('className={sheetClassName}');
|
||||
expect(workspaceStyles).toContain('.v2-workspace-config-sidesheet .semi-sidesheet-inner {');
|
||||
expect(workspaceStyles).toContain('.v2-workspace-config-summary {');
|
||||
expect(workspaceStyles).toContain('.v2-workspace-config-footer {');
|
||||
expect(vehicleSearchSource).toContain('<MobileFilterSheet');
|
||||
expect(corePageSources.StatisticsPage).not.toContain('v2-mileage-source-popover');
|
||||
expect(corePageSources.StatisticsPage).toContain('<Table className="v2-mileage-table"');
|
||||
|
||||
Reference in New Issue
Block a user