mirror of
https://github.com/tenrok/OverlayScrollbars.git
synced 2026-06-18 17:40:36 +03:00
31 lines
865 B
TypeScript
31 lines
865 B
TypeScript
import 'jest-playwright-preset';
|
|
import 'expect-playwright';
|
|
import url from './.build/build.html';
|
|
|
|
describe('TrinsicObserver', () => {
|
|
beforeAll(async () => {
|
|
await page.goto(url);
|
|
});
|
|
|
|
test('with IntersectionObserver', async () => {
|
|
await page.click('#start');
|
|
await expect(page).toHaveSelector('#testResult.passed');
|
|
});
|
|
|
|
test('with ResizeObserver', async () => {
|
|
await page.click('#ioPolyfill');
|
|
await page.waitForTimeout(500);
|
|
await page.click('#start');
|
|
await expect(page).toHaveSelector('#testResult.passed');
|
|
});
|
|
|
|
test('with ResizeObserver polyfill', async () => {
|
|
await page.click('#ioPolyfill');
|
|
await page.waitForTimeout(500);
|
|
await page.click('#roPolyfill');
|
|
await page.waitForTimeout(500);
|
|
await page.click('#start');
|
|
await expect(page).toHaveSelector('#testResult.passed');
|
|
});
|
|
});
|