RoyLee1224 commented on issue #56486: URL: https://github.com/apache/airflow/issues/56486#issuecomment-3536049779
Hi @bbovenzi, I've done some research on this, and Vitest 4.0 has `toMatchScreenshot` to support component-level testing. Perhaps we should try hybrid approach: ### 1. For Component-Level Visual Regression Test (Use Vitest): We can upgrade to Vitest 4.0 and configure its browser mode, integrating into our existing unit test workflow. ### 2. For Documentation (Full-Page Screenshots): Perhaps we should introduce Playwright. ### Why a separate tool? As far as I understand, Vitest runs in-browser. So we would need to build and maintain a complete API mock of Airflow using MSW (Mock Service Worker). This would be a very large and complex task. Playwright avoids this. It runs externally and can easily mock APIs on a per-test basis using`page.route()`. Plus, Playwright's "Projects" config is perfectly designed to generate both light and dark theme screenshots from a single test run. ### Proposed Plan: **Components**: Upgrade to Vitest 4.0 and start adding component-level visual tests using **toMatchScreenshot**. **Docs**: Introduce a standalone Playwright test suite specifically for generating the full-page documentation screenshots. **Optional**: Integrate this with a visual diff service. For example, Argos CI has great Playwright support, looks awesome. https://argos-ci.com/playwright -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: [email protected] For queries about this service, please contact Infrastructure at: [email protected]
