feat: improve provider testing (#1280)
This commit is contained in:
1 parent
1e2f91fe21
commit
2a955d1391
11 files changed
+128
-8
No files matched your search
@@ -0,0 +1,22 @@
|
||||
import { expect } from '@playwright/test';
|
||||
|
||||
import { test } from './libs/playwright';
|
||||
|
||||
test.describe('Debug page broadcast', () => {
|
||||
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(2);
|
||||
expect(await page2.locator('tr').count()).toBe(2);
|
||||
await page2.click('[data-testid="create-page"]');
|
||||
expect(await page.locator('tr').count()).toBe(3);
|
||||
expect(await page2.locator('tr').count()).toBe(3);
|
||||
});
|
||||
});
|
||||
Reference in new issue
Block a user