test(admin): align inbound relationship dialog consumers
This commit is contained in:
@@ -219,13 +219,12 @@ describe('InboundCodeRelationshipDialog contract', () => {
|
|||||||
const root = process.cwd()
|
const root = process.cwd()
|
||||||
expect(existsSync(resolve(root, 'src/shared/components/InboundCodeRelationshipDrawer.vue'))).toBe(false)
|
expect(existsSync(resolve(root, 'src/shared/components/InboundCodeRelationshipDrawer.vue'))).toBe(false)
|
||||||
expect(existsSync(resolve(root, 'src/shared/components/InboundCodeRelationshipDrawer.test.ts'))).toBe(false)
|
expect(existsSync(resolve(root, 'src/shared/components/InboundCodeRelationshipDrawer.test.ts'))).toBe(false)
|
||||||
const consumerFiles = [
|
const dialogConsumerFiles = [
|
||||||
'src/modules/unified-orders/pages/UnifiedOrdersView.vue',
|
|
||||||
'src/modules/inbounds/pages/InboundOrdersView.vue',
|
'src/modules/inbounds/pages/InboundOrdersView.vue',
|
||||||
'src/modules/inbounds/components/InboundTaskList.vue',
|
'src/modules/inbounds/components/InboundTaskList.vue',
|
||||||
'src/modules/overseas-warehouse/pages/InventoryTransactionsView.vue',
|
'src/modules/overseas-warehouse/pages/InventoryTransactionsView.vue',
|
||||||
]
|
]
|
||||||
const consumerSources = consumerFiles.map((file) => readFileSync(resolve(root, file), 'utf8'))
|
const consumerSources = dialogConsumerFiles.map((file) => readFileSync(resolve(root, file), 'utf8'))
|
||||||
const consumers = consumerSources.join('\n')
|
const consumers = consumerSources.join('\n')
|
||||||
expect(consumers).not.toContain('InboundCodeRelationshipDrawer')
|
expect(consumers).not.toContain('InboundCodeRelationshipDrawer')
|
||||||
expect(consumers).not.toMatch(/relationshipOpen|relationshipInboundCode|inboundRelationshipOpen/)
|
expect(consumers).not.toMatch(/relationshipOpen|relationshipInboundCode|inboundRelationshipOpen/)
|
||||||
@@ -233,5 +232,9 @@ describe('InboundCodeRelationshipDialog contract', () => {
|
|||||||
expect(consumer).toContain("import InboundCodeRelationshipDialog from '@/shared/components/InboundCodeRelationshipDialog.vue'")
|
expect(consumer).toContain("import InboundCodeRelationshipDialog from '@/shared/components/InboundCodeRelationshipDialog.vue'")
|
||||||
expect(consumer).toContain('<InboundCodeRelationshipDialog')
|
expect(consumer).toContain('<InboundCodeRelationshipDialog')
|
||||||
})
|
})
|
||||||
|
|
||||||
|
const unifiedOrders = readFileSync(resolve(root, 'src/modules/unified-orders/pages/UnifiedOrdersView.vue'), 'utf8')
|
||||||
|
expect(unifiedOrders).not.toContain('InboundCodeRelationshipDrawer')
|
||||||
|
expect(unifiedOrders).not.toContain('InboundCodeRelationshipDialog')
|
||||||
})
|
})
|
||||||
})
|
})
|
||||||
|
|||||||
Reference in New Issue
Block a user