Skip to content

docs(e2e): add documentation screenshot capture tool#13894

Open
dj4oC wants to merge 2 commits into
masterfrom
docs-screenshot-capture
Open

docs(e2e): add documentation screenshot capture tool#13894
dj4oC wants to merge 2 commits into
masterfrom
docs-screenshot-capture

Conversation

@dj4oC

@dj4oC dj4oC commented Jun 19, 2026

Copy link
Copy Markdown
Contributor

Description

Adds a small Playwright tool under tests/e2e/docs that automatically captures end-user documentation screenshots from a live ownCloud Web instance, so the screenshots used in the user documentation never drift from the product.

Each "tour" in tours.ts is a documented flow: an ordered list of steps with a title, a caption and a run action that drives the UI. Running the tool logs in, performs each step, saves a screenshot per step under output/<tour-id>/NN-<shot>.png, and writes an output/manifest.json that pairs every screenshot with its caption.

The initial tours mirror the Web for users documentation (whose screenshots are currently outdated):

  • webtour — top navigation: app switcher, global search, account + storage, preferences/appearance
  • storagetour — left sidebar: Personal, Shares, Spaces, Deleted files
  • filesidebar — right sidebar: details, sharing, sharing roles, versions
  • contextualhelp — the ? help icons and the guidance popovers they open

How to run

It reuses the repository's Playwright install — no new dependencies:

OCIS_URL=https://localhost:9200 OCIS_USER=admin OCIS_PASSWORD=admin pnpm docs:screenshots

It first seeds best-effort, idempotent demo data (a versioned file, a trashed item, a project space and one incoming share) so the tours have something to show. Generated screenshots and the manifest land in tests/e2e/docs/output/ (git-ignored — they are build artefacts, regenerated on demand). Adding a new tour is just another entry in tours.ts.

Notes

  • Purely additive: a new tests/e2e/docs/ directory, one root package.json script (docs:screenshots), and a changelog item. No existing code or the existing e2e suite is touched.
  • Not wired into CI; it is a tool to run on demand when refreshing documentation screenshots.

Testing

  • eslint is clean on the new files; the code is ESM and matches the repo ("type": "module").
  • The tour/login logic and the seeding API calls (WebDAV upload + versions, OCS share, Graph user/space) were validated against a live oCIS instance, with all four tours capturing successfully.

@kw-security

kw-security commented Jun 19, 2026

Copy link
Copy Markdown

Snyk checks have passed. No issues have been found so far.

Status Scan Engine Critical High Medium Low Total (0)
Open Source Security 0 0 0 0 0 issues
Licenses 0 0 0 0 0 issues
Code Security 0 0 0 0 0 issues

💻 Catch issues earlier using the plugins for VS Code, JetBrains IDEs, Visual Studio, and Eclipse.

Adds tests/e2e/docs, a Playwright tool that captures end-user
documentation screenshots from a live ownCloud Web instance so the
screenshots used in the user documentation never drift from the product.

Each "tour" (data in tours.ts) drives the UI through a documented flow
and saves a captioned screenshot per step plus a manifest.json. The
initial tours mirror the "Web for users" documentation: top navigation,
the file sidebars, sharing roles and contextual help. It reuses the
repository's Playwright install (run with `pnpm docs:screenshots`) and
seeds best-effort demo data so the tours have something to show.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Signed-off-by: David Walter <david.walter@kiteworks.com>
@dj4oC dj4oC force-pushed the docs-screenshot-capture branch from 4cd6b3e to 5a86e62 Compare June 19, 2026 09:25
@sonarqubecloud

Copy link
Copy Markdown

Quality Gate Failed Quality Gate failed

Failed conditions
13.4% Duplication on New Code (required ≤ 3%)

See analysis details on SonarQube Cloud

Fixes the build (prettier --check) and the SonarCloud duplication gate on the
documentation screenshot capture tool:

- format capture.spec.ts and the support files with prettier
- extract the repeated UI sequences (open Personal + select report.md + open
  the right sidebar, open the Shares panel, navigate a left-sidebar section)
  into shared helpers in support/oc.ts, so the filesidebar/contextualhelp/
  storagetour steps no longer duplicate those blocks

No behavioral change to the captured tours.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Signed-off-by: David Walter <david.walter@kiteworks.com>
@sonarqubecloud

Copy link
Copy Markdown

@dj4oC dj4oC requested review from LukasHirt and PrajwolAmatya June 19, 2026 18:46
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants