mirror of
https://github.com/toeverything/AFFiNE.git
synced 2024-12-26 07:04:53 +03:00
7dcbe64d4e
Co-authored-by: Himself65 <himself65@outlook.com>
20 lines
750 B
TypeScript
20 lines
750 B
TypeScript
import { test } from '@affine-test/kit/playwright';
|
|
import { expect } from '@playwright/test';
|
|
|
|
test('should broadcast a message to all debug pages', async ({
|
|
page,
|
|
context,
|
|
}) => {
|
|
await page.goto('http://localhost:8080/_debug/broadcast');
|
|
const page2 = await context.newPage();
|
|
await page2.goto('http://localhost:8080/_debug/broadcast');
|
|
await page.waitForSelector('#__next');
|
|
await page2.waitForSelector('#__next');
|
|
await page.click('[data-testid="create-page"]');
|
|
expect(await page.locator('tr').count()).toBe(3);
|
|
expect(await page2.locator('tr').count()).toBe(3);
|
|
await page2.click('[data-testid="create-page"]');
|
|
expect(await page.locator('tr').count()).toBe(4);
|
|
expect(await page2.locator('tr').count()).toBe(4);
|
|
});
|