import { test } from "@playwright/test";test("multi-user chat between Buyer and Support", async ({ browser }) => {
// Session 1: Buyer
const buyerContext = await browser.newContext();
const buyerPage = await buyerContext.newPage();
await buyerPage.goto("/chat");
await buyerPage.fill("#message", "I need assistance");
await buyerPage.click("#send");
// Session 2: Support agent (isolated cookies and storage)
const agentContext = await browser.newContext();
const agentPage = await agentContext.newPage();
await agentPage.goto("/support");
await agentPage.getByText("I need assistance").waitFor();
await buyerContext.close();
await agentContext.close();
});