@konradmichalik/ptu
v0.1.0
Published
Playwright TYPO3 utilities - reusable Playwright test infrastructure for TYPO3 backend extensions developed with ddev.
Downloads
224
Maintainers
Readme
ptu — Playwright TYPO3 utilities
Reusable Playwright test infrastructure for TYPO3 backend extensions developed with ddev.
Installation
npm install --save-dev @konradmichalik/ptu @playwright/testUsage
playwright.config.ts:
import { defineTypo3PlaywrightConfig } from '@konradmichalik/ptu';
export default defineTypo3PlaywrightConfig({
hostname: 'my-extension.ddev.site',
defaultVersion: '14',
});Tests/Playwright/support/auth.setup.ts:
import { registerTypo3AuthSetup } from '@konradmichalik/ptu';
registerTypo3AuthSetup();Assumptions
This package assumes the conventions of the ddev-typo3-multi-version-extension
ddev addon:
- per-version TYPO3 instances under
.Build/${version} - a
database_${version}MariaDB schema, reachable via the ddevmysqlclient - sites served at
https://${version}.${hostname} - an admin user
admin/Password1!
runSql(), typo3Cli() and flushCache() shell out from inside the ddev web
container.
Exports
| Export | Purpose |
|---|---|
| defineTypo3PlaywrightConfig | Playwright config factory (baseURL, storageState, setup project) |
| registerTypo3AuthSetup | Registers the backend-login setup test |
| BackendPage | login(), openModule() |
| PageTreePage | search(), node(), nodeTitles(), toolbar() |
| resolveTypo3Version, typo3BaseUrl, typo3BinPath, typo3DatabaseName, typo3AuthStateFile | Environment resolution |
| runSql, typo3Cli, flushCache | Instance manipulation |
