Skip to content

Testing

Parnian Hajian edited this page Apr 23, 2026 · 1 revision

Testing

solid.drive uses Vitest with @testing-library/react for automated tests, and a structured manual QA checklist for flows that require real Solid Pod interactions.


Automated Tests

Running Tests

npm test                  # run the full suite once
npm run test:watch        # watch mode, re-runs on file changes
npm run test:coverage     # run with V8 coverage report

Test files live alongside the source files they cover (.test.ts / .test.tsx).

Coverage Target

The project targets 80 % coverage across statements, branches, functions, and lines. Coverage reports are generated by @vitest/coverage-v8 and checked in CI on every pull request.

💡
When adding a new feature or fixing a bug, write the test first. The red, green, refactor cycle catches integration issues early before they reach a real Pod.

Manual QA Checklist

Some flows, particularly sharing and access requests, require two real Solid Pod accounts and cannot be meaningfully replicated in a jsdom environment. Use this checklist to verify the full user experience before releasing.

Setup

  1. Register two accounts on solidcommunity.net: one acts as the owner, one as the recipient.

  2. Add each account as a contact of the other via the Profile sidebar.

  3. Use Google Chrome for the most consistent behaviour across Solid provider redirects.

Do not use inrupt.net when testing locally. It blocks OIDC redirect URIs pointing to localhost. Use solidcommunity.net or solidweb.org.

Authentication

  • ❏ Log in with solidcommunity.net: redirect completes successfully and the user’s display name appears in the header

  • ❏ Refresh the page: session is restored without prompting for login again

  • ❏ Log out: session is cleared and the login screen reappears

Upload

  • ❏ Upload an image: a thumbnail preview appears on the file card

  • ❏ Upload a video: an inline video player appears on the file card

  • ❏ Upload an audio file: an audio player appears on the file card

  • ❏ Upload a PDF: an embedded viewer appears on the file card

  • ❏ Attempt to upload a file without filling in the title: the upload button stays disabled until the field is completed

  • ❏ Upload a second file: the catalog is updated correctly with no duplicate link in the WebID profile

  • ❏ Attempt to upload the same file twice: the duplicate is rejected

Browse & Navigate

  • ❏ Navigate into a subfolder by clicking its row: the breadcrumb updates correctly

  • ❏ Click a breadcrumb item to jump back up to a parent level

  • ❏ Confirm that system files (.acl, catalog.ttl, .shared-.ttl) are *not visible in the file list

File Details

  • ❏ Click the Info button on a file card: all metadata fields (title, type, size, upload date, publisher name) are populated correctly

  • ❏ Switch language while the info panel is open: labels update immediately

  • ❏ Publisher field shows a human-readable name, not a raw WebID URI

Download

  • ❏ Click the Download button on a file card: the browser saves the file locally

  • ❏ Confirm that the download comes directly from the Pod with no server redirect

Delete

  • ❏ Delete a file and confirm the prompt: the card disappears from the explorer

  • ❏ Verify on the Pod that the container, binary, index.ttl, and catalog entry are all removed

Sharing (requires two accounts)

  • ❏ Add the second account as a contact using its WebID

  • ❏ Confirm that the contact’s display name and avatar appear in the Profile sidebar

  • ❏ Click Request Access on the contact’s entry: the request is sent

  • ❏ Switch to the second account and confirm the pending request is visible in the sidebar

  • Accept the request: the first account’s "Shared with Me" section now shows the second account’s shared files

  • Deny the request: the first account sees a "Denied" state next to the contact’s name

  • ❏ Re-request access: the cycle restarts from the beginning

  • ❏ Share a file directly via the Share button (no request needed): the file appears immediately in the recipient’s "Shared with Me" section

  • Revoke access: the file disappears from the recipient’s "Shared with Me" section

  • ❏ Attempt to access the revoked file via its direct URL while logged in as the recipient: the Pod returns 403

Language

  • ❏ Switch to German: all UI labels update immediately without a page reload

  • ❏ Refresh the page: German remains active

Clone this wiki locally