import { test, expect } from '@playwright/test'; import { login, createChannelViaAPI, sendMessageViaAPI, channelURL, } from '../helpers/auth'; test.describe('Internal Chat - Messaging', () => { let channelId; let accountId; const baseURL = 'http://localhost:3000'; test.beforeEach(async ({ page }) => { const { data } = await login(page, baseURL); accountId = data.account_id; const channel = await createChannelViaAPI(page, { name: `msg-test-${Date.now()}`, description: 'Messaging test channel', }); channelId = channel.id; }); test('send a text message via UI and verify it appears', async ({ page }) => { await page.goto(channelURL(accountId, channelId)); await page.waitForLoadState('networkidle'); // MessageEditor.vue has a