End-to-end testing
Venta ships a Playwright end-to-end test suite covering the core storefront flows: account, login and registration, home, menu and footer, category and product pages, minicart, cart, checkout, and product comparison.
The suite is built on the elgentos/magento2-playwright base package. Its README documents the full option set; the steps below cover the Venta setup.
Location
app/design/frontend/Magebit/venta/web/playwright/Configuration
The suite reads its settings from a .env file in the playwright directory. Copy the example and adjust the values for your environment. The store URLs and admin credentials must match your local Magento instance:
PLAYWRIGHT_BASE_URL=https://your-store.docker/
PLAYWRIGHT_PRODUCTION_URL=https://your-store.docker/
PLAYWRIGHT_REVIEW_URL=https://your-store.docker/
MAGENTO_ADMIN_SLUG=admin
MAGENTO_ADMIN_USERNAME=<admin-user>
MAGENTO_ADMIN_PASSWORD=<admin-password>
MAGENTO_THEME_LOCALE=en_US
MAGENTO_NEW_ACCOUNT_PASSWORD=<new-account-password>
MAGENTO_EXISTING_ACCOUNT_EMAIL_CHROMIUM=user-chromium@example.com
MAGENTO_EXISTING_ACCOUNT_EMAIL_FIREFOX=user-firefox@example.com
MAGENTO_EXISTING_ACCOUNT_EMAIL_WEBKIT=user-webkit@example.com
MAGENTO_EXISTING_ACCOUNT_PASSWORD=<existing-account-password>
MAGENTO_EXISTING_ACCOUNT_CHANGED_PASSWORD=<changed-password>
MAGENTO_COUPON_CODE_CHROMIUM=CHROMIUM321
MAGENTO_COUPON_CODE_FIREFOX=FIREFOX321
MAGENTO_COUPON_CODE_WEBKIT=WEBKIT321WARNING
Keep real credentials out of version control. The .env file holds admin and account passwords for your local store only.
The suite uses a separate existing account per browser engine (Chromium, Firefox, WebKit) and a matching coupon code per engine, so tests run in parallel without colliding on shared state.
Running the tests
From the playwright directory:
Install dependencies:
bashnpm installRun the setup once. This provisions the accounts, coupons, and fixtures the specs expect:
bashnpm run setupRun the suite:
bashnpm test
Run setup again only when the test data is reset or the store is rebuilt.
Layout
Page Object Models live under tests/poms/frontend, one per tested flow. Test data is config-driven under tests/config (element-identifiers.json, outcome-markers.json, slugs.json) so selectors, expected outcomes, and URLs stay separate from the specs. Shared helpers under tests/utils cover fixtures and Magewire request synchronization.