feat: Add e2e test documentation site with generation scripts and VitePress configuration.#24837
feat: Add e2e test documentation site with generation scripts and VitePress configuration.#24837ShaileshParmar11 merged 9 commits intomainfrom
Conversation
…ePress configuration.
…ervice entity permission tests.
…nd update doc generation.
Code Review 👍 Approved with suggestionsWell-designed Playwright documentation generator with minor code quality and workflow concerns.
|
| Auto-apply | ✅ Code review | Compact |
|
|
|
Was this helpful? React with 👍 / 👎 | This comment will update automatically (Docs)
|
| - 'openmetadata-ui/src/main/resources/ui/playwright/e2e/**/*.spec.ts' | ||
| - 'openmetadata-ui/src/main/resources/ui/playwright/doc-generator/**' |
There was a problem hiding this comment.
Not sure if we can just check on /playwright folder?
Also can we have on demande to force run this workflow when needed?
| git commit -m "docs: auto-generate playwright documentation" | ||
| git push | ||
|
|
||
| - name: Comment on PR |
There was a problem hiding this comment.
Which PR this will add comment? since it's running on main?
There was a problem hiding this comment.
It will run agains each PR, If PR has playwright changes then it will update docs and push into PR.
…ePress configuration. (#24837) * feat: Add e2e test documentation site with generation scripts and VitePress configuration. * feat: migrate e2e documentation generation to Playwright and update service entity permission tests. * docs: Improve Playwright E2E test documentation with JSDoc comments and update doc generation. * docs: Add link to E2E Test Documentation in README. * fix: Correctly escape backslashes in Playwright generated markdown tables and refine the documentation CI workflow. * minor fix * fix node version issue * minor change



This pull request introduces a robust, automated system for generating and maintaining up-to-date documentation for Playwright end-to-end (E2E) tests. The changes include a new documentation generator, workflow automation for both local development and CI, and updates to project configuration to support this workflow. The result is always-current, detailed E2E test documentation with minimal manual effort.
The most important changes are:
Automated Playwright Documentation Generation
generate.jsand related tooling) that parses Playwright E2E test files, extracts test cases and steps, categorizes them by domain, and outputs comprehensive markdown documentation toplaywright/docs. The generator uses Playwright's own test listing and the TypeScript compiler API for accurate extraction and metrics. [1] [2]Workflow and CI Integration
.github/workflows/playwright-docs-check.yml) that runs on pull requests affecting Playwright tests or documentation generator code. This workflow verifies if the documentation is up to date, auto-generates docs if necessary, and pushes fixes back to the PR branch, ensuring documentation never falls out of sync..lintstagedrc.yamlto auto-run the documentation generator and stage changes whenever Playwright test files are modified locally, providing a first line of automation before CI.Project Configuration and Documentation
package.jsonto add agenerate:e2e-docsscript for manual documentation generation.README.mdin the doc-generator directory, explaining the architecture, usage, and automation workflow of the documentation system.README.mdwith a link to the generated E2E test documentation for greater visibility and discoverability.Linting and Ignore Rules
.eslintignoreto exclude the documentation generator directory from linting, and disabled themax-lenrule for test files in.eslintrc.yamlto avoid unnecessary lint errors. [1] [2]These changes collectively ensure that Playwright test documentation is always accurate, detailed, and automatically maintained as part of the development workflow.