Keine Beschreibung

html-scroll-parent.test.js 415B

12345678910111213141516
  1. /**
  2. * @jest-environment puppeteer
  3. * @flow
  4. */
  5. import { scroll, screenshot } from '../utils/puppeteer.js';
  6. it('should be positioned on the bottom', async () => {
  7. const page = await browser.newPage();
  8. await page.goto(`${TEST_URL}/html-scroll-parent.html`);
  9. await page.setViewport({ width: 800, height: 400 });
  10. await scroll(page, 'body', 280);
  11. expect(await screenshot(page)).toMatchImageSnapshot();
  12. });