diff --git a/src/shared/components/InboundCodeRelationshipDrawer.test.ts b/src/shared/components/InboundCodeRelationshipDrawer.test.ts index 9926df7b..b84e1163 100644 --- a/src/shared/components/InboundCodeRelationshipDrawer.test.ts +++ b/src/shared/components/InboundCodeRelationshipDrawer.test.ts @@ -88,6 +88,9 @@ describe('InboundCodeRelationshipDrawer contract', () => { expect(wrapper.text()).toContain('PLT-LAX-001') expect(wrapper.text()).toContain('SKU-001') expect(wrapper.text()).not.toMatch(/9007199254740993[1-9]/) + expect(wrapper.find('.relationship-sections').exists()).toBe(true) + expect(wrapper.findAll('.relationship-section')).toHaveLength(3) + expect(wrapper.findAll('.relationship-status')).toHaveLength(3) await wrapper.setProps({ modelValue: false }) await wrapper.setProps({ modelValue: true }) @@ -135,4 +138,13 @@ describe('InboundCodeRelationshipDrawer contract', () => { expect(source).toContain('text-overflow:ellipsis') expect(source).toContain(':title="display(baseAssociation.inboundCode)"') }) + + it('keeps sections and status badges within the drawer at desktop and narrow widths', () => { + expect(source).toContain('.relationship-sections{display:grid;width:100%;min-width:0') + expect(source).toContain('.relationship-section{box-sizing:border-box;width:100%;min-width:0') + expect(source).toContain('flex-wrap:wrap') + expect(source).toContain('.relationship-section h3{flex:1 1 auto;min-width:0') + expect(source).toContain('.relationship-status{flex:0 0 auto;max-width:100%}') + expect(source).toContain('.inventory-table{max-width:100%') + }) }) diff --git a/src/shared/components/InboundCodeRelationshipDrawer.vue b/src/shared/components/InboundCodeRelationshipDrawer.vue index 726a227a..ae7a9d05 100644 --- a/src/shared/components/InboundCodeRelationshipDrawer.vue +++ b/src/shared/components/InboundCodeRelationshipDrawer.vue @@ -53,7 +53,7 @@ watch(() => [props.modelValue, props.inboundCode, props.canReadBase, props.canRe