Migration to Playwright
Opened this issue · 0 comments
Martynienas commented
Added long lived branch named Playwright:
Currently it's just a proof concept and most of the functionality is broken:
- With some hacks managed to make Visual Regression example suite successfully execute on Chrome browser.
What is done:
-
Uninstalled all puppeteer dependencies
- jest-puppeteer
- puppeteer
-
Added Playwright dependencies:
- playwright
- jest-playwright-preset
- eslint-plugin-jest-playwright
Hacks:
- content of test-environment/setup.js is commented out - jest-environment-puppeteer is missing
- jest.config.js global Setup and Teardown - also testEnvironment and setupFilesAfterEnv are commented out - relays on removed dependencies
- Toggled of screenshots by default (fails if enabled)
Steps taken into right direction:
- Added jest-playwright.config.js - configuration file for Playwright - currently contains the following settings:
- Tests executed on Chrome,Firefox and Webkit
- Executed in Headless mode
- devtools: false,
- Changed page.waitFor -> page.waitForSelector
- page.setViewport ->page.setViewportSize
Following steps:
- Fix global Setup
- Fix global TearDown
- Fix testEnvironment setup
- Fix setupFilesAfterEnv setup
- Fix remaining tests
- Fix logging
- Fix Screenshots
- Fix Visual Regression tests to be able to handle screenshots based on browser it is executing on