import { readFileSync } from 'node:fs'; import { shallowMount } from '@vue/test-utils'; import { describe, expect, it, vi } from 'vitest'; import Messages from './views/Messages.vue'; const store = { getters: { 'conversation/getGroupedConversation': [] }, dispatch: vi.fn(), }; describe('widget conversation layout', () => { it('keeps the widget mount point in the full-height viewport chain', () => { const widgetHtml = readFileSync('widget.html', 'utf8'); expect(widgetHtml).toContain('
'); }); it('keeps messages scrolling independently from the footer', () => { const wrapper = shallowMount(Messages, { global: { mocks: { $store: store }, stubs: { ChatFooter: { template: '