优化
This commit is contained in:
@@ -3,10 +3,10 @@ import { resolve } from 'node:path'
|
||||
import { describe, expect, it } from 'vitest'
|
||||
|
||||
const pages = [
|
||||
['src/modules/container-loading/pages/ContainersView.vue', ':loading="loading"', 'LoadErrorState', 'empty-text="暂无货柜"', 'statusText(row.planStatus)', 'platform:firstleg:container:view', '@retry="loadRows"'],
|
||||
['src/modules/container-loading/pages/ContainersView.vue', ':loading="loading"', 'LoadErrorState', 'empty-text="暂无货柜"', 'statusText(row.planStatus)', 'platform:firstleg:container:list', '@retry="loadRows"'],
|
||||
['src/modules/loading-lists/components/LoadingListsView.vue', ':loading="loading"', 'LoadErrorState', ':empty-text="`暂无符合筛选条件的${title}`"', 'loadingListStatusLabel(row.status)', 'canView', '@retry="load"'],
|
||||
['src/modules/ocean-bookings/pages/OceanBookingsView.vue', ':loading="loading"', 'LoadErrorState', 'empty-text="暂无符合筛选条件的订舱"', 'oceanBookingStatusLabel(row.status)', 'platform:firstleg:ocean-booking:view', '@retry="load"'],
|
||||
['src/modules/trucking/pages/TruckAppointmentsView.vue', ':loading="loading"', 'LoadErrorState', 'empty-text="暂无符合筛选条件的拖车预约"', 'statusLabel(row.status)', 'platform:firstleg:truck-appointment:view', '@retry="load"'],
|
||||
['src/modules/ocean-bookings/pages/OceanBookingsView.vue', ':loading="loading"', 'LoadErrorState', 'empty-text="暂无符合筛选条件的订舱"', 'oceanBookingStatusLabel(row.status)', '<Eye :size="15" />查看', '@retry="load"'],
|
||||
['src/modules/trucking/pages/TruckAppointmentsView.vue', ':loading="loading"', 'LoadErrorState', 'empty-text="暂无符合筛选条件的拖车预约"', 'statusLabel(row.status)', '<Eye :size="15" />详情', '@retry="load"'],
|
||||
] as const
|
||||
|
||||
function source(path: string) {
|
||||
@@ -14,13 +14,13 @@ function source(path: string) {
|
||||
}
|
||||
|
||||
describe('domestic outbound list state contracts', () => {
|
||||
it.each(pages)('%s exposes loading, error, empty, translated status, view permission and retry states', (path, loading, error, empty, status, viewPermission, retry) => {
|
||||
it.each(pages)('%s exposes loading, error, empty, translated status, detail action and retry states', (path, loading, error, empty, status, detailAction, retry) => {
|
||||
const content = source(path)
|
||||
expect(content).toContain(loading)
|
||||
expect(content).toContain(error)
|
||||
expect(content).toContain(empty)
|
||||
expect(content).toContain(status)
|
||||
expect(content).toContain(viewPermission)
|
||||
expect(content).toContain(detailAction)
|
||||
expect(content).toContain(retry)
|
||||
})
|
||||
|
||||
|
||||
@@ -26,6 +26,8 @@ import { containerLoadingRoutes } from '@/modules/container-loading/routes'
|
||||
import { loadingListRoutes } from '@/modules/loading-lists/routes'
|
||||
import { financeRoutes } from '@/modules/finance/routes'
|
||||
import { notificationRoutes } from '@/modules/notifications/routes'
|
||||
import { domesticContainerRoutes } from '@/modules/domestic-containers/routes'
|
||||
import { supplierRoutes } from '@/modules/suppliers/routes'
|
||||
|
||||
const router = createRouter({
|
||||
history: createWebHistory(),
|
||||
@@ -55,6 +57,8 @@ const router = createRouter({
|
||||
...loadingListRoutes,
|
||||
...financeRoutes,
|
||||
...notificationRoutes,
|
||||
...domesticContainerRoutes,
|
||||
...supplierRoutes,
|
||||
...customerRoutes,
|
||||
...warehouseRoutes,
|
||||
...unifiedOrderRoutes,
|
||||
|
||||
Reference in New Issue
Block a user